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

Every destructive confirm names what is lost and the way back in one sentence #16059

Merged opened this

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

Merged

Two of the destructive confirms now say what is lost and the way back, one sentence each, and a test fails if either line goes missing. Those two are the only ones src/web/dangerwords.ts builds.

Notes

shipped production is serving it deploy 3fede26

opened this

Two of the destructive confirms now say what is lost and the way back, one sentence each, and a test fails if either line goes missing. Those two are the only ones src/web/danger_words.ts builds. The other confirms in /-/confirm, such as archive, move and delete branch, are written inline in search.ts and I left them alone. bun x tsc --noEmit, bun scripts/gate.ts --fix, the design lint and 123 tests in the danger tests plus the settings and delete tests I picked by name all passed. I didn't run the full suite.

  • What changed: danger_words.ts now holds a lost line and a wayBack line for "Stop running as an app" and "Delete this repository". dangerDetail(verb) joins them, and /-/confirm in search.ts calls it for both instead of its own inline text. The two sentences it replaced carried the same facts.
  • Reworded: the delete confirm no longer ends "This cannot be undone." The way-back line now says "There is no way back: forks are detached first and keep working, but this repository cannot be restored."
  • Test: test/danger-words.test.ts goes through every entry in DANGERS and fails if lost or wayBack is empty or isn't exactly one sentence. It also checks that search.ts calls dangerDetail for both acts.
  • Not done: the settings-page paragraphs (danger.ts, settings.ts) keep their own wording, because they are page copy and not the confirm. The TUI wording is unchanged.
[{"go":"/-/confirm?to=/trevato/forge/settings/app/disable","look":"The paragraph under the title","expect":"One sentence on what stops and is removed, then one on the way back: code untouched, restarts from empty data."},
{"go":"/-/confirm?to=/trevato/forge/settings/delete","look":"The paragraph under the title","expect":"One sentence on what is lost, then one saying there is no way back and that forks keep working."}]

Closes #16044

2 earlier comments
commented

Two of the destructive confirms now say what is lost and the way back, one sentence each, and a test fails if either line goes missing. Those two are the only ones src/web/danger_words.ts builds. The other confirms in /-/confirm, such as archive, move and delete branch, are written inline in search.ts and I left them alone. bun x tsc --noEmit, bun scripts/gate.ts --fix, the design lint and 123 tests in the danger tests plus the settings and delete tests I picked by name all passed. I didn't run the full suite.

  • What changed: danger_words.ts now holds a lost line and a wayBack line for "Stop running as an app" and "Delete this repository". dangerDetail(verb) joins them, and /-/confirm in search.ts calls it for both instead of its own inline text. The two sentences it replaced carried the same facts.
  • Reworded: the delete confirm no longer ends "This cannot be undone." The way-back line now says "There is no way back: forks are detached first and keep working, but this repository cannot be restored."
  • Test: test/danger-words.test.ts goes through every entry in DANGERS and fails if lost or wayBack is empty or isn't exactly one sentence. It also checks that search.ts calls dangerDetail for both acts.
  • Not done: the settings-page paragraphs (danger.ts, settings.ts) keep their own wording, because they are page copy and not the confirm. The TUI wording is unchanged.
[{"go":"/-/confirm?to=/trevato/forge/settings/app/disable","look":"The paragraph under the title","expect":"One sentence on what stops and is removed, then one on the way back: code untouched, restarts from empty data."},
{"go":"/-/confirm?to=/trevato/forge/settings/delete","look":"The paragraph under the title","expect":"One sentence on what is lost, then one saying there is no way back and that forks keep working."}]
commented

<!-- look-pages a58ebac0a812 --> Look pages for a58ebac, from the gate:

  • look pages (none): this pull changes src/web/danger_words.ts, src/web/pages/search.ts but the forge could not trace the route of /settings/security/controls (an inline or wrapped handler), so it could not infer a page; the reviewer decides. A "Looks: <path>" line naming the nearest page, or a "No look: <why>" line (10+ characters), says it
commented

The "stop running as an app" and "delete this repository" confirms now say what is lost and the way back, one sentence each. A test fails if either line is missing. The gate passes locally and I pushed. I haven't seen the forge's check run on this last push.

The comment on the pull was about the first push, which had no Looks: line. I added a No look: line to a commit message, because /-/confirm isn't among the pages in app.looks in forge.json. A Looks: /-/confirm line was rejected for that reason. The gate no longer reports a look-page problem.

  • The words: src/web/danger_words.ts holds a lost line and a wayBack line for each act. dangerDetail(verb) joins them, and /-/confirm in search.ts uses it for both. Delete's way-back line reads "There is no way back: forks are detached first and keep working, but this repository cannot be restored." That replaces the old "This cannot be undone."
  • The test: test/danger-words.test.ts goes through every entry in DANGERS. It fails if lost or wayBack is empty or isn't exactly one sentence.
  • The terminal: the palette's delete prompt in src/tui/screens/deleterepo.ts shows the same two sentences before asking for the name.
  • How-to: docs/features/danger-confirms.md is new.
  • Gate lines: the later commits also carry the Direction: … ahead of #6534 line the gate asked for.
  • Left alone: the other confirms in search.ts (archive, move, delete branch and so on) are written inline and don't come from danger_words.ts. The settings-page paragraphs keep their own wording.
[{"go":"/-/confirm?to=/trevato/forge/settings/app/disable","look":"The paragraph under the title","expect":"One sentence on what stops and is removed, then one on the way back: code untouched, restarts from empty data."},
{"go":"/-/confirm?to=/trevato/forge/settings/delete","look":"The paragraph under the title","expect":"One sentence on what is lost, then one saying there is no way back and that forks keep working."}]
Approved

Both confirms work in the preview. /-/confirm for app/disable shows what stops and is removed, then the way back (code untouched, restarts from empty data). The one for delete shows what is lost, then "There is no way back" with forks kept. It is plain words in a plain paragraph, with no new markup, so it works without JavaScript. The words are defined once and reused by the TUI delete prompt. The how-to is in docs/features, not the README. Next, in order: 1) Replace the source-grep test (expect(text).toContain("dangerDetail(...)")) with one that renders /-/confirm and asserts both lines appear in the response, so it fails on behaviour and not on spelling. 2) Move the other inline confirms in search.ts (archive, move, delete branch) onto DANGERS, so the lost/way-back guarantee covers every destructive confirm, not only two.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs