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

The New forge page at /forges/new, where the owner spawns a forge for a client, speaks the home page's language #9876

Merged opened this

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

Merged

`/forges/new` now uses headed sections instead of cards, and `new-forge.ts` has no `card(` left. I haven't run the whole suite. The forge's own check does that on this push.

shipped production is serving it deploy 7ab3f87

opened this

/forges/new now uses headed sections instead of cards, and new-forge.ts has no card( left. I haven't run the whole suite. The forge's own check does that on this push.

What changed

  • Form: a <section class="settings-block"> headed "Its name and apps".
  • Plan preview: a section headed "The plan". It keeps id="plan".
  • Answer: a section headed "The link to send". When the forge already existed, it is headed "Its link".
  • No-room case: the same shape, headed "No room".
  • Claim link: still only in the POST answer's body, with cache-control: no-store. Nothing moved into a URL or a cached response, and the form is still a plain <form> that works without JavaScript.
  • Docs: the /forges line in docs/design/areas/lists.md now also names /forges/new.
  • No new class.

Tests

  • New test/new-forge-language.test.ts GETs the form and POSTs do=plan as a signed-in user. It asserts the settings-block sections and no class="card. I didn't run it against main, but main drew cards there, so it would fail.
  • It passes with the existing spawn, anon, size, pick and cold-read tests and forges-language.
  • tsc is clean, design-lint is clean, and gate.ts printed nothing.

What I chose not to do

  • The final spawn answer, with the claim link, is not covered by a test. I rely on the no-store line being untouched.

Closes #9864

commented

/forges/new now uses headed sections instead of cards, and new-forge.ts has no card( left. I haven't run the whole suite. The forge's own check does that on this push.

What changed

  • Form: a <section class="settings-block"> headed "Its name and apps".
  • Plan preview: a section headed "The plan". It keeps id="plan".
  • Answer: a section headed "The link to send". When the forge already existed, it is headed "Its link".
  • No-room case: the same shape, headed "No room".
  • Claim link: still only in the POST answer's body, with cache-control: no-store. Nothing moved into a URL or a cached response, and the form is still a plain <form> that works without JavaScript.
  • Docs: the /forges line in docs/design/areas/lists.md now also names /forges/new.
  • No new class.

Tests

  • New test/new-forge-language.test.ts GETs the form and POSTs do=plan as a signed-in user. It asserts the settings-block sections and no class="card. I didn't run it against main, but main drew cards there, so it would fail.
  • It passes with the existing spawn, anon, size, pick and cold-read tests and forges-language.
  • tsc is clean, design-lint is clean, and gate.ts printed nothing.

What I chose not to do

  • The final spawn answer, with the claim link, is not covered by a test. I rely on the no-store line being untouched.
commented

The gate failed because no commit had a "Try:" line. I added an empty commit that carries one and pushed it. I did not rewrite history or touch the code.

The line reads: "Try: open /forges/new on the preview signed in; the form, then See the plan, are headed sections with no boxes."

bun scripts/gate.ts printed nothing locally, so the gate should now pass. I haven't seen the forge's check re-run on this push.

Pull description

/forges/new now uses headed sections instead of cards, as /forges does. The form ("Its name and apps"), the plan preview ("The plan", still id="plan") and the answer with the claim link ("The link to send") are each a <section class="settings-block"> under an <h2>. The no-room case is the same shape. No card( is left in src/web/pages/new-forge.ts, and no class was added.

The claim link is still shown once, only in the POST answer's body, with cache-control: no-store. The form still works without JavaScript.

The /forges line in docs/design/areas/lists.md now also names /forges/new. test/new-forge-language.test.ts GETs the form and POSTs do=plan as a signed-in user, and asserts the sections and no class="card.

What I chose not to do: I did not add a test for the final spawn answer with the claim link. I rely on the no-store line being untouched.

Try: open /forges/new on the preview while signed in. Press See the plan to see the plan section.

🤖 Generated with Claude Code

Changes requested — before the latest push

Direction fits and the shape matches /forges, but two things to fix in one round. (1) The answer view (the claim-link section, new h2 "The link to send" / "Its link") is the box-2 behaviour and has no test; add one that spawns and asserts the settings-block section, no card, and cache-control: no-store on that POST answer, plus the existed ("Its link") variant. Likewise the no-room branch ("No room") is untested. (2) Fix the grammar in the docs line ("speak ... and adds"). Nothing else found: no new class, no card( left, no secrets, mutations unchanged.

commented

This round adds the three missing tests and fixes the docs grammar. Nothing under src/ changed. bun x tsc --noEmit is clean, bun scripts/design-lint.ts is clean, and test/new-forge-language.test.ts passes (5 tests). I didn't run the rest of the suite; the forge's check does that on push.

What changed

  • Spawn answer: a test spawns a forge and asserts the 201 response carries cache-control: no-store. It checks the "The link to send" h2 in a settings-block with the claim-link row, and no card or card-body.
  • Already-exists answer: spawning the same name again gives the 200 "already exists" page with the "Its link" h2. The page has no claim-link, so the link isn't shown a second time.
  • No room: with the fake placement reporting no room, /forges/new shows a "No room" settings-block carrying the host's message, with no form and no card.
  • Docs: docs/design/areas/lists.md now reads "speak the home page's language and add no class".

The tests use a fake placement and probe, as test/spawn-anon.test.ts does, so nothing real is spawned. Each spawned child's background boot is awaited in afterAll.

I did not run a revert to confirm the new tests fail without the headings.

My first push of the tests had a TypeScript error (an untyped plan parameter). The second commit fixes it.

To try it: open /forges/new on the preview and spawn a forge to see the link page. Spawn the same name again to see "Its link".

🤖 Generated with Claude Code

Approved

Approved. The preview shows /forges/new as a headed settings-block ("Its name and apps") with no card; the plan, the claim-link answer, the already-exists answer and the no-room case are covered by tests. No new class, no behaviour change on the write path, no-store kept, still a plain post form. Two things next: (1) add a test that the plan section is reachable with JavaScript off via the form submit (do=plan) and keeps focus order sane on a 360px phone, e.g. the second Spawn button placed after the plan; (2) the Spawn button sits both in the plan and at the form end, so check a screen reader hears one clear primary action, and give the no-room h2 a more human wording than "No room" (say what to do).

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs