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

The confirm page before a destructive action speaks the home page's language #9861

Merged opened this

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

Merged

The confirm page before a destructive action no longer puts its content in a box. `confirmBody` in `src/web/pages/search.ts` now renders the page heading (the one `<h1>`), the one sentence saying what will happen, the typed-phrase field when the route needs one, and the danger button next to Cancel. The red `card(...)` and its icon and `<h2>` header are gone. Only the markup changed: the list of r…

shipped production is serving it deploy f21b126

opened this

The confirm page before a destructive action no longer puts its content in a box. confirmBody in src/web/pages/search.ts now renders the page heading (the one <h1>), the one sentence saying what will happen, the typed-phrase field when the route needs one, and the danger button next to Cancel. The red card(...) and its icon and <h2> header are gone. Only the markup changed: the list of routes that can be confirmed, the to path checks, the same-origin back taken from the referer and the typed-phrase check are all as they were.

  • Test: I added one to test/confirm-detach.test.ts. It checks that the confirm page has exactly one <h1>, no class="card, and still posts to the confirmed route.
  • Docs: docs/design/areas/dialog.md gets a note that this page is a plain page, not a dialog, and adds no new class.
  • Not done: the danger button keeps its danger style, since it is the one destructive control on the page. I left the plain <p> for the sentence as it is.

Checks: I ran the test/confirm-*.test.ts suites, account-unlink-confirm and conversation-confirm: 55 pass, 0 fail. bun scripts/design-lint.ts, bun scripts/gate.ts and bun x tsc --noEmit are clean. scripts/fast.ts named 1304 test files for this diff (over its time budget), so I ran only the confirm suites and the forge's full check covers the rest. The keep_plan tool wasn't available in this run, so no plan was kept on the issue.

To try it: on a fork, open Settings › Danger and click "Detach from parent". The confirm page shows the heading, the sentence, the Detach button and Cancel, with no box around them.

🤖 Generated with Claude Code

Closes #9860

commented

The confirm page before a destructive action no longer puts its content in a box. confirmBody in src/web/pages/search.ts now renders the page heading (the one <h1>), the one sentence saying what will happen, the typed-phrase field when the route needs one, and the danger button next to Cancel. The red card(...) and its icon and <h2> header are gone. Only the markup changed: the list of routes that can be confirmed, the to path checks, the same-origin back taken from the referer and the typed-phrase check are all as they were.

  • Test: I added one to test/confirm-detach.test.ts. It checks that the confirm page has exactly one <h1>, no class="card, and still posts to the confirmed route.
  • Docs: docs/design/areas/dialog.md gets a note that this page is a plain page, not a dialog, and adds no new class.
  • Not done: the danger button keeps its danger style, since it is the one destructive control on the page. I left the plain <p> for the sentence as it is.

Checks: I ran the test/confirm-*.test.ts suites, account-unlink-confirm and conversation-confirm: 55 pass, 0 fail. bun scripts/design-lint.ts, bun scripts/gate.ts and bun x tsc --noEmit are clean. scripts/fast.ts named 1304 test files for this diff (over its time budget), so I ran only the confirm suites and the forge's full check covers the rest. The keep_plan tool wasn't available in this run, so no plan was kept on the issue.

To try it: on a fork, open Settings › Danger and click "Detach from parent". The confirm page shows the heading, the sentence, the Detach button and Cancel, with no box around them.

🤖 Generated with Claude Code

commented

The confirm page before a destructive action no longer puts its content in a box. confirmBody in src/web/pages/search.ts now renders the page heading (the one <h1>), the one sentence saying what will happen, the typed-phrase field when the route needs one, and the danger button next to Cancel. The red card(...) and its icon and <h2> header are gone. Only the markup changed: the list of routes that can be confirmed, the to path checks, the same-origin back taken from the referer and the typed-phrase check are all as they were.

  • Test: I added one to test/confirm-detach.test.ts. It checks that the confirm page has exactly one <h1>, no class="card, and still posts to the confirmed route.
  • Docs: docs/design/areas/dialog.md gets a note that this page is a plain page, not a dialog, and adds no new class.
  • Not done: the danger button keeps its danger style, since it is the one destructive control on the page. I left the plain <p> for the sentence as it is.

Failed check: the first push failed the gate rule that wants a Try: line in a commit message. I added an empty commit carrying that line instead of rewriting history, since force pushes are refused. Locally scripts/gate.ts printed nothing on either run, so it may not be applying this rule here; the forge's check will show whether the new commit satisfies it.

Checks: the code hasn't changed since the first push, where the test/confirm-*.test.ts suites, account-unlink-confirm and conversation-confirm passed (55 pass, 0 fail), and bun scripts/design-lint.ts and bun x tsc --noEmit were clean. scripts/fast.ts named 1304 test files for this diff (over its time budget), so I ran only the confirm suites and the forge's full check covers the rest. The keep_plan tool wasn't available in this run, so no plan was kept on the issue.

Try: on a fork, open Settings › Danger and click "Detach from parent". The confirm page shows the heading, the sentence, the Detach button and Cancel, with no box around them.

🤖 Generated with Claude Code

Approved

The confirm page drops its red card, keeps one h1, one sentence, the form and a danger button beside Cancel. The route allow-list, same-origin back and typed-phrase check are untouched. Works with JavaScript off (a plain post form, Cancel is an <a>). No new class, so nothing for dialog.md beyond the note. Next, two things: (1) add a test for a route that needs a typed phrase, to show the field still renders without the box; (2) the removed alert icon leaves the danger button as the only cue, so check the phone picture of a phrase route reads clearly at 360px.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs