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

When the app is not up, the studio says why and gives one click back #41

shipped production is serving it opened this has it

Landed in pull #47 · run

opened this

trevato/cs reads not up on its studio page today with nothing else — no reason, no link to the deploy that failed, no way to try again — while the dev App page one tab over has all three; say it once, in one function both pages call.

studioApp (src/web/pages/studio.ts:626-684) turns EnvStatus.state into a badge word and stops: error and note are read for the running case only, runId is never linked, and there is no Redeploy. envFacts/envCard (src/web/pages/apps.ts:474-540) already render exactly these facts — commit, served phrase, up-since, a link to the deploy run, the error, Redeploy and Stop for a writer. Two renderings of one truth is the duplication worth folding; the studio then stops sending a person to dev mode to find out what happened.

Done looks like

Files

src/web/pages/apps.ts (lift envFacts into the shared function), src/web/pages/studio.ts (call it in the head), src/web/ui.ts if the shared piece belongs beside servedPhrase, test/studio.test.ts.

Risks

The two pages differ in size and tone — the studio head is one line under the title, the App page is a card — so the shared function has to return the facts, not the card, or the studio grows a box it does not want. EnvStatus.error is a string built from the app's own test output: it is already escaped by the template, and must stay escaped. Careful not to widen what a private app tells a signed-out reader: this page is already behind the repo's read check, keep it there.

Suggested: Mason.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs