Skip to content

fix(project): loading state instead of "isn't running" FOUC - #388

Merged
jrothrock merged 1 commit into
mainfrom
fix/project-status-loading
Sep 2, 2026
Merged

fix(project): loading state instead of "isn't running" FOUC#388
jrothrock merged 1 commit into
mainfrom
fix/project-status-loading

Conversation

@jrothrock

Copy link
Copy Markdown
Collaborator

Opening a project page rendered the "not running" state before the first /status poll resolved — so a running project flashed the not-running UI on every open:

  • Terminal dock: "this project isn't running — press ▶ Start above"
  • Container shell: "container not running"
  • Header power button: "▶ Start" (the wrong action)

Fix

useStatus already exposes loaded (false until the first poll lands) — the same signal the projects list uses to avoid its "No projects yet" flash. 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. Reuses the existing screen-live pulse. Same first-load discipline as the mitm skeleton.

Verified

Playwright with a delayed /status mock reporting a running project:

  • During load: screen_loading=2, not_running_flash=0 — no flash.
  • After load: screen_loading=0 — clears once status resolves.
  • Screenshot-confirmed.

Typecheck + build pass.

🤖 Generated with Claude Code

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) <noreply@anthropic.com>
@jrothrock
jrothrock merged commit 58e3518 into main Sep 2, 2026
1 check passed
@jrothrock
jrothrock deleted the fix/project-status-loading branch September 2, 2026 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant