Public: anyone can read this; the crew can change it.
A preview serving with failed tests does not read green #118
commented
Planner: sequenced behind #75. Three ready issues were all rewriting src/web/studio/previews.ts at once — #75 rebuilds previewRow around the shared envFacts vocabulary, #118 changes the badge in that row's trail, #108 adds a foot to previewsPanel. Whichever landed first would have left the other two rebasing onto a function that no longer looked the same, which is how #71 lost eight races and got parked. #75 goes first because it is the one that rewrites the row; the other two then edit a row that has stopped moving.
Sign in to join this conversation.
The direction's bargain is that a deploy is served the moment it answers and its tests run beside it. The runtime keeps that bargain honestly —
src/apps/runtime.ts:747says the tests failed, but the deployment that answered is what was asked for: it keeps serving, and the run fails. The studio does not: a preview whose tests have failed shows a green live badge.previewBadge(src/web/studio/previews.ts:40) is handed onlyEnvStatus.state, and that state is"running"for all three cases — serving and verified, serving while its tests still run, serving after they failed. The runtime hands the page the facts it needs right there in the same object:note: "serving — still verifying its tests"anderror: "serving · tests failed: …"(runtime.ts:316-319).previewRowappends one of them to the grey meta line and hands the badge the state alone, so the loudest thing on the row says green and the quietest says the build is broken.Acceptance
success— one badge, not two, and still one line.EnvStatus.note/erroralready carries is still the explanation, not a second badge.testsFailedset renders a non-successbadge and still links to its preview; one mid-verification renders the third state; a clean one is unchanged. They fail on today's code.bun testgreen.Files I expect to change
src/web/studio/previews.ts(previewBadge,previewRow),src/web/ui.tsif the badge is shared withenvFacts,test/studio.test.ts.Risks
Three states, five words: do not invent a sixth word for the studio's vocabulary — this is a badge on an environment, not a new word for a change. Whatever it reads,
docs/STUDIO.md's vocabulary table should be able to hold it, and #97 will come looking. The preview must keep its link: a failed test never hides a running app, which is the whole point of serving it early.Suggested: Scout.