From c76b148dd11488dccd65a0ff91f9baf1e932e500 Mon Sep 17 00:00:00 2001 From: Jack Rothrock Date: Wed, 2 Sep 2026 13:11:56 -0600 Subject: [PATCH] fix(project): loading state instead of "isn't running" FOUC MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Opening a project page rendered the terminal dock's "this project isn't running — press ▶ Start above" (and the container shell's "container not running", and a "▶ Start" power button) before the first /status poll resolved — so a RUNNING project flashed the not-running state on every open. useStatus already exposes `loaded` (false until the first poll lands). Gate the three spots on it: while status is still loading, show a pulsing "checking status…" placeholder in the screen frames and a spinner on the power toggle, instead of asserting the project is stopped. Same first-load discipline as the mitm skeleton and the projects list. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../webui/app-src/src/pages/ProjectPage.tsx | 14 ++- .../webui/app-src/src/styles/dashboard.css | 4 + ...{index-CICttlge.css => index-CWE_PSZI.css} | 2 +- .../{index-DABWRuku.js => index-DhOWyWKG.js} | 86 +++++++++---------- .../dashboard/webui/static/app/index.html | 4 +- 5 files changed, 61 insertions(+), 49 deletions(-) rename internal/dashboard/webui/static/app/assets/{index-CICttlge.css => index-CWE_PSZI.css} (99%) rename internal/dashboard/webui/static/app/assets/{index-DABWRuku.js => index-DhOWyWKG.js} (80%) diff --git a/internal/dashboard/webui/app-src/src/pages/ProjectPage.tsx b/internal/dashboard/webui/app-src/src/pages/ProjectPage.tsx index f27c5b1..a7845c2 100644 --- a/internal/dashboard/webui/app-src/src/pages/ProjectPage.tsx +++ b/internal/dashboard/webui/app-src/src/pages/ProjectPage.tsx @@ -43,7 +43,7 @@ const HOST_H_DEFAULT = 320; const CHAT_W_DEFAULT = 420; export function ProjectPage({ id }: { id: string }) { - const { projects } = useStatus(4000); + const { projects, loaded: statusLoaded } = useStatus(4000); const me = useMemo(() => projects.find((p) => p.id === id), [projects, id]); const name = me?.name || id; @@ -212,9 +212,9 @@ export function ProjectPage({ id }: { id: string }) { )}