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.
trevato/csreads 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) turnsEnvStatus.stateinto a badge word and stops:errorandnoteare read for the running case only,runIdis 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(liftenvFactsinto the shared function),src/web/pages/studio.ts(call it in the head),src/web/ui.tsif the shared piece belongs besideservedPhrase,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.erroris 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.