Public: anyone can read this; the crew can change it.
A repository's Danger zone, delete and detach from parent, speaks the home page's language #9990
Check · Review · Land · Live done — Landed and live in production.
`/:owner/:name/settings/danger` no longer uses cards. The detach and the delete are each a `<section class="settings-block">` with an `<h2>` ("Detach from parent", "Delete this repository"). Before, they were danger-toned `card()`s with an icon in the head. The page text is the same: what goes, what survives, no undo. Both danger buttons still go through `/-/confirm`.
shipped production is serving it deploy f21b126
/:owner/:name/settings/danger no longer uses cards. The detach and the delete are each a <section class="settings-block"> with an <h2> ("Detach from parent", "Delete this repository"). Before, they were danger-toned card()s with an icon in the head. The page text is the same: what goes, what survives, no undo. Both danger buttons still go through /-/confirm.
What moved:
src/web/pages/detach.ts:detachCardis split in two.detachSection(db, repo, viewer)looks up the parent and the job.detachBlock({ name, action, job })takes plain data and returns the section's HTML. The split lets a test render the running state ("started 5m ago") and the failure toast without starting a real repack or touching the job map. The section keepsid="detach", so the fork home page's#detachlink still lands on it.src/web/pages/danger.ts: the delete is a plain section and thecard/iconimports are gone. The.settings-blockspacing rule does the job of the old<div class="mt">wrapper.test/fork-detach.test.ts: one import changes fromdetachCardtodetachSection, for the rename only. Its assertions are unchanged.docs/design/areas/settings.md: a paragraph describes the shape. It adds no new component class.
The typed-back check in repoDelete and the detach worker in actions/detach.ts are not touched.
test/danger-language.test.ts is new and checks that:
- there is no
class="cardinside<main>; - each section is a
settings-blockunder its<h2>; - the detach plan names the parent;
- the running and failed states render as above;
- a delete POST with only the short name gets a 303 back to the danger page and the repository is still there;
- a stranger gets the 404.
It fails on main (detachBlock does not exist there and the page has cards) and passes with the change.
Checks run: scripts/gate.ts, tsc --noEmit and design-lint pass. scripts/fast.ts said the change reaches too many tests to run here, so I ran the seven test files that cover the danger page, detach and delete: 74 pass, 1 fails. The failure is in test/guest-contribute.test.ts ("a person's own agent attaches by OAuth…"): its git push exits 128. It fails the same way on main in this sandbox, so this change didn't cause it, and the forge's full check runs it on push.
To try it, open Settings › Danger zone on a fork. There are two plain sections, Detach from parent and then Delete this repository. Confirming the delete with anything other than owner/name returns you to the page with "Nothing was deleted."
I couldn't keep a plan on the issue: the keep_plan tool the issue asks for isn't available in this run.
🤖 Generated with Claude Code
On a repository's Settings › Danger zone (/:owner/:name/settings/danger), the detach and the delete are no longer boxed cards. Each is now a <section class="settings-block"> with an <h2>: "Detach from parent" and "Delete this repository". The words on the page are the same: what goes, what survives, no undo. Both danger buttons still go through /-/confirm.
What moved:
src/web/pages/detach.ts:detachCardis split in two.
- detachSection(db, repo, viewer) finds the parent and the detach job.
- detachBlock({ name, action, job }) turns that plain data into the section's HTML.
- With the split, a test can render the running state ("started 5m ago") and the failure toast without starting a real detach or touching the worker.
- The section keeps id="detach", so the fork home page's #detach link still lands on it.
src/web/pages/danger.ts: the delete is a plain section, and thecard/iconimports are gone. The settings-block's own spacing replaces the old<div class="mt">wrapper.test/fork-detach.test.ts: one import changes fromdetachCardtodetachSectionbecause of the rename. Its assertions are unchanged.docs/design/areas/settings.md: a paragraph describes the page's shape. No new component class.
The typed-back check in repoDelete and actions/detach.ts are not touched.
The new test/danger-language.test.ts checks that:
- there is no
class="cardinside<main>; - each section is a settings-block under its
<h2>; - the detach plan names the parent;
- the running and failed detach states render;
- a delete POST with only the short name gets a 303 back to the danger page, and the repository still exists;
- a stranger gets the 404.
It fails on main and passes with the change.
The second commit adds the Try: line the gate requires; the first push failed the check without it. Here, scripts/gate.ts (with the base set to the merge-base), tsc --noEmit and design-lint pass, and the danger, detach, delete-with-forks and confirm-detach test files all pass. scripts/fast.ts named too many test files to run here, so I picked those. Last time, one test in test/guest-contribute.test.ts failed: its git push exits 128 in this sandbox, and it fails the same way on main.
I couldn't keep a plan on the issue because the keep_plan tool wasn't available in this run.
Try: sign in as a fork's admin on the preview and open /<owner>/<fork>/settings/danger. You should see two plain sections, Detach from parent and Delete this repository, with no card. Confirm the delete with anything other than owner/name and the page answers "Nothing was deleted."
🤖 Generated with Claude Code
Both danger blocks are now settings-blocks under an h2, with no card. The words, the /-/confirm buttons and the #detach anchor are kept. Splitting detachBlock out as plain data is a clean way to test the running and failed states. The delete refusal, the 404 for a non-admin and the design note in settings.md are covered. I read the diff and the tests. I did not run the preview or look at the screenshots. Next: 1) show the delete refusal flash on the page in a test, not just the redirect; 2) add a terminal danger-zone screen if the TUI lacks one.
/:owner/:name/settings/dangerno longer uses cards. The detach and the delete are each a<section class="settings-block">with an<h2>("Detach from parent", "Delete this repository"). Before, they were danger-tonedcard()s with an icon in the head. The page text is the same: what goes, what survives, no undo. Both danger buttons still go through/-/confirm.What moved:
src/web/pages/detach.ts:detachCardis split in two.detachSection(db, repo, viewer)looks up the parent and the job.detachBlock({ name, action, job })takes plain data and returns the section's HTML. The split lets a test render the running state ("started 5m ago") and the failure toast without starting a real repack or touching the job map. The section keepsid="detach", so the fork home page's#detachlink still lands on it.src/web/pages/danger.ts: the delete is a plain section and thecard/iconimports are gone. The.settings-blockspacing rule does the job of the old<div class="mt">wrapper.test/fork-detach.test.ts: one import changes fromdetachCardtodetachSection, for the rename only. Its assertions are unchanged.docs/design/areas/settings.md: a paragraph describes the shape. It adds no new component class.The typed-back check in
repoDeleteand the detach worker inactions/detach.tsare not touched.test/danger-language.test.tsis new and checks that:class="cardinside<main>;settings-blockunder its<h2>;It fails on main (
detachBlockdoes not exist there and the page has cards) and passes with the change.Checks run:
scripts/gate.ts,tsc --noEmitanddesign-lintpass.scripts/fast.tssaid the change reaches too many tests to run here, so I ran the seven test files that cover the danger page, detach and delete: 74 pass, 1 fails. The failure is intest/guest-contribute.test.ts("a person's own agent attaches by OAuth…"): itsgit pushexits 128. It fails the same way on main in this sandbox, so this change didn't cause it, and the forge's full check runs it on push.To try it, open Settings › Danger zone on a fork. There are two plain sections, Detach from parent and then Delete this repository. Confirming the delete with anything other than
owner/namereturns you to the page with "Nothing was deleted."I couldn't keep a plan on the issue: the
keep_plantool the issue asks for isn't available in this run.🤖 Generated with Claude Code
Closes #9952