Skip to content

Offer a notice's Undo only while ⌘Z would take its gesture - #6844

Merged
max-sixty merged 1 commit into
mainfrom
changes-into-versions
Nov 23, 2026
Merged

max-sixty merged 1 commit into
mainfrom
changes-into-versions

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

A notice's Undo now shows only while ⌘Z would take the gesture the notice reports. Before, a Resolve that left no thread open said "All threads resolved · Undo ⌘Z", and a pick made while that notice stood left it unchanged: ⌘Z then took back the pick, while a click on the notice's Undo took back the Resolve. Now the notice keeps its words and drops the press once another gesture is the newest.

Where to look. offerUndo (undo.js) names ⌘Z's command only while ⌘Z's next target is its gesture, and no command otherwise; the field draws no press without keys, as it already does for Show changes while Versions stands. The press's own run, which took back its gesture by attempt, goes, since the press now only shows when ⌘Z's own press would take the same gesture. ⌘Z twice, or Reopen in Threads, still takes the Resolve back.

Max picked this on the handoff page for #6827's follow-ups, over keeping the click. Tests: test_a_resolve_s_notice_stands_for_that_resolve_alone now holds that the notice offers no Undo once another tab's Reopen is the newest gesture (it held the reverse); it, the other Resolve-notice test, every way back from a settlement, pnpm run check:browser and pnpm run test:runtime pass.

This was written by Claude Code on behalf of max-sixty

A Resolve that leaves no thread open says "All threads resolved · Undo ⌘Z". If
the user picks an option while that notice stands, ⌘Z then takes back the pick,
yet the notice still showed Undo ⌘Z, and a click on it took back the Resolve:
the key the press showed did something other than the press.

The notice's Undo (`offerUndo`, undo.js) now names ⌘Z's command only while ⌘Z
would take the gesture the notice reports, and no command otherwise, so the
field draws no press, as it draws none for Show changes while Versions stands.
The notice keeps its words, and still leaves when the gesture is refused or
taken back. The press makes ⌘Z's own press, so the press's own `run`, which
looked up its gesture by attempt, goes.

Max chose this on the handoff page for #6827's follow-ups, over keeping a click
that takes back the Resolve while ⌘Z takes the pick. ⌘Z twice, or Reopen in
Threads, still takes the Resolve back.

Behavior changed in tests: test_a_resolve_s_notice_stands_for_that_resolve_alone
held that the notice's Undo took back its Resolve after another tab's Reopen
made that Reopen the newest gesture. It now holds that the notice keeps its
words and offers no Undo then, and that the agent picking the Resolve up leaves
the Undo standing. That test, test_resolving_a_thread_from_threads_moves_on_to_the_next,
test_every_way_back_from_a_settlement_returns_the_user_where_they_made_it,
`pnpm run check:browser` and `pnpm run test:runtime` pass.
@max-sixty
max-sixty merged commit d50f42b into main Nov 23, 2026
5 of 6 checks passed
@max-sixty
max-sixty deleted the changes-into-versions branch November 23, 2026 05:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants