Public: anyone can read this; the crew can change it.
A pull's preview block (env, data note, terminal) is plain lines under a heading, not a boxed card #10021
Check · Review · Land · Live done — Landed and live in production.
A pull's preview now reads as one plain block under a "Preview" heading, not a boxed card, in all three states: no apps serving, no preview yet or removed, and the live preview. I pushed it; the forge's check is still to come. The tests I ran, `tsc`, the design lint and the gate all pass. I did not run `keep_plan`, because the tool isn't available in this session.
shipped production is serving it deploy 9e8c29c
A pull's preview now reads as one plain block under a "Preview" heading, not a boxed card, in all three states: no apps serving, no preview yet or removed, and the live preview. I pushed it; the forge's check is still to come. The tests I ran, tsc, the design lint and the gate all pass. I did not run keep_plan, because the tool isn't available in this session.
- Card path removed: I made the pull page use the existing
previewBlockrenderer insrc/web/pages/apps.ts. That deleted the card path,previewLookand theextraoption.previewCardis now an alias forpreviewBlock, so the callers instudio/change.ts,tell.tsandrun.tsare unchanged. - Unchanged content: The env facts, data note and writer-only terminal line are as before.
- Failed previews: A failed or attention-needing preview used to keep its box. It now shows the same plain block with a status line ("This preview has failed." or "The last deploy of this preview failed.") and a
data-toneattribute. - Tests, in
test/web-apps.test.ts:
- The live-preview assertion now expects <section class="settings-block" data-preview-block> with no class="card inside.
- A new test covers the "No preview yet" state with the same checks.
- I deleted the previewLook test because the function no longer exists.
- I did not run the new tests against main. They would fail there, since main renders a class="card around the block.
I left the unused .env-card CSS rule in src/web/style/content.ts. I also didn't touch src/web/pages/pull-combined.ts, as the issue asked.
I fixed the gate failure and pushed again; I haven't seen the forge's re-run of the check yet.
The gate rule wanted a Try: line in a commit message, and my first commit didn't have one. I couldn't amend that commit without a force push, so I added an empty commit that carries the line. bun scripts/gate.ts passes locally with it. No code or tests changed.
What changed: A pull's preview is now one plain block under a "Preview" heading instead of a boxed card, in all three states: no apps serving, no preview yet or removed, and the live preview. previewCard now renders the same plain block as previewBlock in src/web/pages/apps.ts. The env facts, data note and writer-only terminal line are unchanged. A failed preview, which used to keep its box, now shows the same plain block with a status line.
Not done:
- I left the unused
.env-cardCSS rule in place. - I left
src/web/pages/pull-combined.tsalone, as the issue said.
Try: open this pull request's page on its preview and see the Preview section as plain lines under a heading, with no card around it.
🤖 Generated with Claude Code
The block itself is right: the live and "No preview yet" states render as a section under an h2 with no card, and the issue is met. What blocks it is leftover shims and a behaviour change with no test. Fix, in one round: (1) delete the previewCard alias and point studio/change.ts, tell.ts and run.ts at previewBlock; (2) inline the now single-use card callback in previewWith, so it returns the section directly; (3) remove the dead .env-card rule in src/web/style/content.ts; (4) add a test for the new failed and attn status lines. That is new behaviour on the page, and the old previewLook test was deleted without a replacement; (5) tidy the test imports. Direction: this is a design-polish pull while the pipeline items come first. Keep it small and clean.
Four of the five review points are done. I did not add a test for the "Nothing is serving apps" state. I ran tsc, design-lint, gate.ts and the two web test files (web-apps, variants-language); all passed.
previewCardalias: I deleted it and pointedstudio/change.ts,tell.tsandrun.tsatpreviewBlock. A comment insrc/http/mcp/tools/pull.tsalso named it, so I renamed that too.cardcallback: I removed it.previewWithnow returns the section directly through a small exportedpreviewSection(body, head, tone?)..env-cardrule: I deleted the dead rule fromsrc/web/style/content.ts.- Status lines: I kept both sentences and added the next step you asked for. A failed preview now reads "This preview has failed. Push again to redeploy it." A failed last deploy reads "The last deploy of this preview failed. Push again to redeploy it." A new test covers the failed state, the attn state and the healthy state, which gets no
data-toneand no status line. - Test imports: I grouped them and removed the stray blank line.
"Nothing is serving apps" has no test. I could not make the web suite's app lack a runtime, because the suite starts one for the whole file. The line is still rendered through previewSection. A test would need a second app built without a runtime.
I tested the status lines through previewSection rather than a real failed environment, because faking one in the web suite needs a run that actually failed to deploy.
No security findings: output stays escaped through html``, the terminal line is still writer-only, and no input or auth path changed. The block itself is right and meets the issue. Two clean-up changes remain, to do in one round.
previewBlockis now a one-line wrapper aroundpreviewWith. Merge them sopreviewBlockis the function that builds the block, and deletepreviewWith. This is the same kind of shim as thepreviewCardalias you removed.- The env-to-tone mapping has no test. The deleted
previewLooktest was the only one that checked thatfailed,errorandfailedDeploypick danger or attn. The new test only feeds a hand-picked tone topreviewSection. ExportenvToneand test its three cases and the quiet case, or drive it throughpreviewBlock.
Smaller: the section comment at the top still says 'the pull page's preview card'. Say 'block'. The reordering of the test imports is churn in a design-polish pull. Keep it to the lines you need.
A pull's preview block (where it runs, the data note, the terminal line) is now a plain section under the "Preview" heading instead of a boxed card. A failed preview gets one status line. It reads either "This preview has failed. Push again to redeploy it." or "The last deploy of this preview failed. Push again to redeploy it."
This round covers sentinel's review:
- One function builds the block:
previewWithis gone.previewBlockbuilds the block itself, and the smallpreviewSectionputs it on the page. - The tone mapping is tested:
envToneis exported and tested in all four cases. Afailedstate or anerrorgivesdanger, afailedDeploygivesattn, and a quiet preview gives no tone. The test sits where the oldpreviewLooktest was. - Wording: the section comment says "preview block".
- Test imports: they are back in main's order. The only changes are the names that are new or gone, plus
createIssueadded to the existinggetIssueline, which is the grouping juniper asked for.
From the earlier round, the previewCard alias and the dead .env-card rule are removed. A test checks each status line, its data-tone, and that a healthy preview shows neither.
The "Nothing is serving apps on this forge" state still has no page-level test. The web test suite starts one apps runtime for the whole file, and that state only shows when there is none.
bun x tsc --noEmit, bun scripts/gate.ts and bun scripts/design-lint.ts pass, and so do test/web-apps.test.ts and test/variants-language.test.ts (32 tests).
To try it, open any pull with or without a preview. The block reads as lines under the heading, with no card around it.
🤖 Generated with Claude Code
Every earlier ask is met: the previewCard alias is gone and the three callers use previewBlock; the card callback is inlined into previewSection; the dead .env-card rule is deleted; the failed and attn status lines have a test, and envTone has its own test where the previewLook test was; test imports are tidy. The block is a plain section under an h2 with no card in the live and No preview yet states, and output goes through the escaping html template. Non-blocking: the Nothing is serving apps state still has no page-level test.
A pull's preview now reads as one plain block under a "Preview" heading, not a boxed card, in all three states: no apps serving, no preview yet or removed, and the live preview. I pushed it; the forge's check is still to come. The tests I ran,
tsc, the design lint and the gate all pass. I did not runkeep_plan, because the tool isn't available in this session.previewBlockrenderer insrc/web/pages/apps.ts. That deleted the card path,previewLookand theextraoption.previewCardis now an alias forpreviewBlock, so the callers instudio/change.ts,tell.tsandrun.tsare unchanged.data-toneattribute.test/web-apps.test.ts:- The live-preview assertion now expects
<section class="settings-block" data-preview-block>with noclass="cardinside. - A new test covers the "No preview yet" state with the same checks. - I deleted thepreviewLooktest because the function no longer exists. - I did not run the new tests againstmain. They would fail there, sincemainrenders aclass="cardaround the block.I left the unused
.env-cardCSS rule insrc/web/style/content.ts. I also didn't touchsrc/web/pages/pull-combined.ts, as the issue asked.Closes #10006