diff --git a/src/components/InputPanel.tsx b/src/components/InputPanel.tsx index c9cd33e..333c60d 100644 --- a/src/components/InputPanel.tsx +++ b/src/components/InputPanel.tsx @@ -9,7 +9,6 @@ import { Flame, Wand2, } from "lucide-react"; -import { EqualizerIcon } from "./EqualizerIcon"; import type { InputValues, Language, Vocals } from "../lib/types"; import { formatElapsed, useElapsed } from "../lib/useElapsed"; import { randomStyle } from "../lib/llm"; @@ -123,16 +122,6 @@ export function InputPanel({ return (
- {/* Brand */} -
- -
-

- MelodyMuse -

-
-
- {/* Main textarea */}
@@ -157,7 +146,7 @@ export function InputPanel({ value={values.idea} onChange={(e) => set("idea", e.target.value)} onKeyDown={onCmdEnter} - rows={4} + rows={5} placeholder="Describe your music idea…" className="textarea text-[15px] leading-relaxed" required diff --git a/src/pages/HomePage.tsx b/src/pages/HomePage.tsx index 38d617c..ac137ec 100644 --- a/src/pages/HomePage.tsx +++ b/src/pages/HomePage.tsx @@ -96,18 +96,24 @@ export function HomePage() { return () => window.clearTimeout(id); }, [input]); - // Check the server on mount. If unreachable, surface a quiet header hint. + // Check the server on mount and re-check periodically so the header + // "Server offline" hint stays current without a manual refresh. useEffect(() => { - const ctrl = new AbortController(); - (async () => { + let cancelled = false; + const check = async () => { try { - const s = await getServerStatus(ctrl.signal); - setServerOk(Boolean(s.ok)); + const s = await getServerStatus(); + if (!cancelled) setServerOk(Boolean(s.ok)); } catch { - setServerOk(false); + if (!cancelled) setServerOk(false); } - })(); - return () => ctrl.abort(); + }; + check(); + const id = window.setInterval(check, 30_000); + return () => { + cancelled = true; + window.clearInterval(id); + }; }, []); // Clean up any in-flight request on unmount.