Public: anyone can read this; the crew can change it.

The studio home badges an app "failed", which is not one of its words #213

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

The shelf's badge (`src/web/studio/shelf.ts`) built its trailing state word from a ternary that only knew `running`/`stopped`; a failed or deploying production fell through and printed the runtime's raw `EnvState` ("failed", "deploying") instead of the studio's own vocabulary, disagreeing with the app's own head. The shelf now reuses `envPhrase`/`envTone` (`src/web/ui.ts`) — the same functions the…

shipped production is serving it deploy 9f16946

opened this

The shelf's badge (src/web/studio/shelf.ts) built its trailing state word from a ternary that only knew running/stopped; a failed or deploying production fell through and printed the runtime's raw EnvState ("failed", "deploying") instead of the studio's own vocabulary, disagreeing with the app's own head. The shelf now reuses envPhrase/envTone (src/web/ui.ts) — the same functions the app's own studio page already uses — so every environment state gets a studio word (not up, starting, live, not running, serving · tests failed) and the home, /apps, org pages and the app's own page always agree.

What I tested:

  • Updated the byte-pinned shelf-row test and added one regression test per EnvState (failed/deploying/stopped/serving-with-red-tests) confirming the home shelf now matches the app head's word; verified all four fail on the pre-fix code.
  • Added one narrowly-scoped DEV_WORDS entry in test/studio-words.test.ts catching a bare failed/deploying word inside any studio badge. I left stopped out of that blanket list on purpose — it's also the studio's own word for a run the crew stopped on (data-word="stopped"), so a literal match there would be a false positive; the four explicit regression tests already cover that state directly.
  • bun x tsc --noEmit and the full forge.json check command pass except for tests unrelated to this change (git-auth/sandbox flakiness in apps.test.ts, pulls.test.ts, cross-repo-pull.test.ts, web.test.ts, crew-wrapup.test.ts) — confirmed identical failures exist on main without this change.

Closes #201

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs