Files
stemengine_old/start.sh
T
translator eae0787725 fix: dark mode for form controls, lyric preview buttons, sidebar toggle
- theme-overrides.css: add !important to form control dark mode rules
  (background/color/border-color) — MetroUI's un-layered select rule
  was winning the cascade regardless of inline styles; color-scheme: dark
  forces OS-native chrome (dropdown arrow) to dark theme

- ProjectDetail.tsx: add fieldStyle const with CSS vars for all
  select/input/textarea elements; fix standalone inline-style selects
  and container divs (log body, ABC header, Sheet/Text toggles)

- Separator.tsx: update ctrl style to use var(--background/foreground)
  and colorScheme: inherit

- LyricsLivePreview.tsx: replace dark:bg-gray-800 / dark:text-gray-400
  Tailwind dark-mode classes with inline CSS var styles on tab bar
  container and all tab/icon buttons; add lp-btn hover rule

- Sidebar.tsx: fix toggle button clipped by aside overflow:hidden —
  change aside to overflow:visible, wrap collapsed strip in own
  overflow:hidden div

- ThemeContext.tsx: set root.style.colorScheme = r for OS chrome theming

- index.html: add <meta name="color-scheme" content="light dark">

- index.css: Phase 7 — replace @layer base + @apply and @layer utilities
  + theme() with plain CSS (height: 100%, rem values for sidebar widths)
2026-03-12 09:18:53 +09:00

39 lines
1.8 KiB
Bash
Executable File

#!/bin/bash
# StemEngine startup script.
# Builds the React frontend (full build, then watch mode) and starts the
# FastAPI backend. Both processes run in the same container so that
# .tsx/.ts edits on the host are picked up and served without a Docker rebuild.
set -e
FRONTEND=/app/frontend
BACKEND=/app/backend
echo "========================================="
echo " StemEngine startup"
echo "========================================="
# ── Frontend ──────────────────────────────────────────────────────────────────
cd "$FRONTEND"
# Install / sync packages. --prefer-offline uses the local cache first so
# subsequent starts are fast; falls back to the registry if needed.
echo "[frontend] Syncing npm packages..."
npm install --prefer-offline --no-audit --no-fund 2>&1 | grep -v "^npm warn" || true
# Initial full build so backend/static is populated before uvicorn starts.
# Subsequent hot-rebuilds are handled by --watch below.
echo "[frontend] Building..."
npx vite build 2>&1
echo "[frontend] Starting watch mode (rebuilds on .tsx/.ts changes)..."
# CHOKIDAR_USEPOLLING=1: WSL2→Docker bind-mounts don't propagate inotify events,
# so chokidar falls back to stat-based polling to detect host-side edits.
CHOKIDAR_USEPOLLING=1 CHOKIDAR_INTERVAL=800 npx vite build --watch 2>&1 &
# ── Backend ───────────────────────────────────────────────────────────────────
cd /app
echo "[backend] Starting uvicorn..."
exec python3.11 -m uvicorn backend.main:app \
--host 0.0.0.0 --port 8000 --log-level debug --reload