From cd3979efce0fe7c4f119e3906d0f4f8573d5cf55 Mon Sep 17 00:00:00 2001 From: Mitchell-Johnson Date: Thu, 17 Sep 2026 14:07:56 -0700 Subject: [PATCH] Dashboard: stop flex children shrinking (bar text overflowed), wrap the bar, gate saves on loaded layout, fix double v in footer Co-Authored-By: Claude Fable 5.1 --- web/src/Dashboard.tsx | 7 ++++--- web/src/Shell.tsx | 2 +- web/src/styles.css | 3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/web/src/Dashboard.tsx b/web/src/Dashboard.tsx index 9179348..b5c6724 100644 --- a/web/src/Dashboard.tsx +++ b/web/src/Dashboard.tsx @@ -260,6 +260,7 @@ export default function Dashboard() { const [err, setErr] = useState('') const [layout, setLayout] = useState(() => normalize({})) const [editing, setEditing] = useState(false) + const [loaded, setLoaded] = useState(false) const hist = useRef(null) const saveTimer = useRef(undefined) const intervalRef = useRef(DEFAULT_INTERVAL) @@ -278,7 +279,7 @@ export default function Dashboard() { useEffect(() => { let stop = false let timer: number | undefined - api.dashPrefs().then((p) => { if (!stop) setLayout(normalize(p)) }).catch(() => { /* defaults */ }) + api.dashPrefs().then((p) => { if (!stop) { setLayout(normalize(p)); setLoaded(true) } }).catch(() => setErr('could not load layout')) const seed = async () => { try { hist.current = await api.metricsHistory(); setLatest(await api.metrics()); setErr('') } catch (e) { setErr(e instanceof Error ? e.message : 'failed') } @@ -364,12 +365,12 @@ export default function Dashboard() { - · charts show the last {fmtWindow(layout.intervalMs)} · ▲▼ reorder, ✕ hides a module or row + · last {fmtWindow(layout.intervalMs)} · ▲▼ reorder · ✕ hide ) : last {fmtWindow(latest.interval_ms || layout.intervalMs)} · {fmtMs(latest.interval_ms || layout.intervalMs)}} {editing && } - + {visible('tile').length > 0 && ( diff --git a/web/src/Shell.tsx b/web/src/Shell.tsx index 1e93655..17e4f3b 100644 --- a/web/src/Shell.tsx +++ b/web/src/Shell.tsx @@ -98,7 +98,7 @@ export default function Shell({ me, onLoggedOut }: { me: Me; onLoggedOut: () => setCtrl={(v) => handles.current[activeTerm.id]?.armCtrl(v)} />}