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 #47

Merged opened this

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

Merged

An environment's facts are now one function in the component vocabulary, and the studio head calls it.

shipped production is serving it deploy bf488b2

opened this

An environment's facts are now one function in the component vocabulary, and the studio head calls it.

ui.ts gains envFacts (commit, how fast it came up, uptime, a link to the deploy run, and the deployment's own note and error), envActions (the Redeploy and Stop POST forms, writers only) and envPhrase (the state as a sentence rather than a badge). apps.ts drops its private copy of all three: the App page's card asks for the URL line with { url: true } and its markup is unchanged, and a pull's preview card stops re-rendering note and error itself — test/web-apps.test.ts passes untouched. .env-facts/.env-error lose their .env-card scope so the same facts read the same outside a card.

The studio head then renders those facts under the title from the EnvStatus it already had — no second request, no new read: a failed production says what failed in the app's own (escaped) words and links the deploy run's log, a stopped one says it is not running and offers Redeploy, and a writer also gets Stop, posting to /:owner/:name/app/:env/redeploy and /stop, which make the same-origin check. A reader sees the facts and no buttons. The badge keeps not up, not running, starting and serving · tests failed — a serving app is still never called down for red tests — and the one wording change is deliberate: the badge says live instead of live 3.4s after the push, because the facts line directly under it now says exactly that, and the same string twice in 30px reads like a bug.

What to look at: the three new cases in test/studio.test.ts, which reach into the runtime's environment map to stand up a failed, a stopped and a red-tests-but-serving production rather than run three real deploys for a rendering test; and docs/DESIGN.md's environment-card row, updated to name the shared functions. Six tests in the check suite fail identically before and after this branch in this sandbox — all of them git-over-HTTP pushes that need credentials the sandbox refuses (remote: auth required); nothing here touches them.

🤖 Generated with Claude Code

Closes #41

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs