Public: anyone can read this; the crew can change it.
A repository's danger-zone labels live in one module, read by Settings and search #5721
Check · Review · Land · Live done — Landed and live in production.
The two danger-zone labels, "Stop running as an app" and "Delete this repository", are now defined in one place, the new module `src/web/danger_words.ts`, as `STOP_APP` and `DELETE_REPO`. I made a new module because no existing one held these words.
shipped production is serving it deploy d7f840c
The two danger-zone labels, "Stop running as an app" and "Delete this repository", are now defined in one place, the new module src/web/danger_words.ts, as STOP_APP and DELETE_REPO. I made a new module because no existing one held these words.
src/web/pages/settings.tsimports both constants. They replace the typed-out text on four lines: the twoconfirmActionbutton labels and the two danger-card<h2>headings.src/web/pages/search.tsimports both constants. They replace the text in the twoverb:fields of the confirmation descriptions forsettings/deleteandsettings/app/disable.test/danger-words.test.tschecks that the constants still read exactly as before. For each of the two pages, read as plain text, it checks that the page imports../danger_words.tsand contains neither sentence, so typing a copy back in fails the test.
No wording changed and only the lines holding the sentences were touched; src/http/mcp.ts and src/http/api.ts were not edited. grep -rn for either sentence under src/ now finds only src/web/danger_words.ts. These tests pass: test/danger-words.test.ts, test/web-apps.test.ts (which checks that "Stop running as an app" is still rendered), and the settings, search, settings-visible, app-domains, proposal-token-settings and studio-shipping suites. bun x tsc --noEmit and bun scripts/design-lint.ts are clean.
To try it, open a repository's Settings and look at its danger zone, or open the confirmation for deleting a repository or stopping its app; both read exactly as before.
🤖 Generated with Claude Code
Approved. The two danger-zone sentences now live in src/web/danger_words.ts, and settings.ts and search.ts import them. The wording is unchanged, so the pages render as before. There is no markup, token or JS change, so the design system is untouched. The preview answers 200. I read the diff, not the screenshots, because nothing visual moved.
Two things I would do next:
- test/danger-words.test.ts asserts on source text with includes(). That is brittle: a reformat or a template-literal split passes it silently. A render-level check would hold better, for example asserting the settings danger page and the search confirmation both contain the constants.
- The sentences are also used elsewhere, such as the MCP and API docs and error text. Mason left those out on purpose. A follow-up issue could decide whether they should read from this module.
The pull is also off the owner current NOW list (arm stability). It is small and harmless, but it should not queue ahead of those items.
The two danger-zone labels, "Stop running as an app" and "Delete this repository", are now defined in one place, the new module
src/web/danger_words.ts, asSTOP_APPandDELETE_REPO. I made a new module because no existing one held these words.src/web/pages/settings.tsimports both constants. They replace the typed-out text on four lines: the twoconfirmActionbutton labels and the two danger-card<h2>headings.src/web/pages/search.tsimports both constants. They replace the text in the twoverb:fields of the confirmation descriptions forsettings/deleteandsettings/app/disable.test/danger-words.test.tschecks that the constants still read exactly as before. For each of the two pages, read as plain text, it checks that the page imports../danger_words.tsand contains neither sentence, so typing a copy back in fails the test.No wording changed and only the lines holding the sentences were touched;
src/http/mcp.tsandsrc/http/api.tswere not edited.grep -rnfor either sentence undersrc/now finds onlysrc/web/danger_words.ts. These tests pass:test/danger-words.test.ts,test/web-apps.test.ts(which checks that "Stop running as an app" is still rendered), and the settings, search, settings-visible, app-domains, proposal-token-settings and studio-shipping suites.bun x tsc --noEmitandbun scripts/design-lint.tsare clean.To try it, open a repository's Settings and look at its danger zone, or open the confirmation for deleting a repository or stopping its app; both read exactly as before.
🤖 Generated with Claude Code
Closes #5657