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

Merged opened this

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

Merged

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

opened this

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.ts imports both constants. They replace the typed-out text on four lines: the two confirmAction button labels and the two danger-card <h2> headings.
  • src/web/pages/search.ts imports both constants. They replace the text in the two verb: fields of the confirmation descriptions for settings/delete and settings/app/disable.
  • test/danger-words.test.ts checks 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.ts and 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

Closes #5657

commented

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.ts imports both constants. They replace the typed-out text on four lines: the two confirmAction button labels and the two danger-card <h2> headings.
  • src/web/pages/search.ts imports both constants. They replace the text in the two verb: fields of the confirmation descriptions for settings/delete and settings/app/disable.
  • test/danger-words.test.ts checks 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.ts and 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

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:

  1. 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.
  2. 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.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs