cmux-next updates: confirm before Roll Back from the pulled-build banner, palette and menu
Follow-up to #22896 (its post-hoc review's medium finding): the pulled-build banner's Roll Back quit into the kept build with no question, though updates.rollback is destructive.
What changed:
DestructiveConfirmationnow has a question forupdates.rollback: "Roll Back to the Previous Version?" / "cmux quits and reopens the build this Mac kept. Your terminals and agents keep running." Before this, the palette and menu "Roll Back to Previous Version…" also ran straight away, because the presenter had no prompt for that id. Those two are fixed by the same line.PulledBuildWatchgets aconfirmRollBackclosure. The App sets it to the registry's confirmation presenter forupdates.rollback, so the banner asks the same question as the palette and menu. Cancel leaves the banner as it was. With no presenter set, nothing runs.- The strings live in
UpdaterStringsand the updater catalog, with all 21 locales. - The CLI and control method already refuse without
--confirmand are unchanged.
Tests (PulledBuildWatchTests, an existing registered file):
- The double-press test now also checks the question is asked once.
- New: Cancel doesn't roll back, the banner is unchanged, and a later confirmed press rolls back.
- New: with no presenter, Roll Back does nothing.
The tests and the fix are in one commit. The tests use the new confirmRollBack property, so on base they would fail to compile rather than fail as assertions. Nothing was compiled locally (no Mac builds on Leo's machines); CI compiles it.
No capture: the only new UI is the standard CmuxDialogSpec confirmation that appears when a person picks Roll Back. No capture scene or tour reaches it. The banner needs the running build to be on the pulled list with a kept build on the Mac, and a scripted updates.rollback is refused before any dialog. The dialog's text is in the strings above.
Overlap: #23275 reverts #22896 and would conflict with this; that decision waits for Leo. #22814 also touches rollback code (UpdateDropBack) and may conflict.
🤖 Generated with Claude Code
Agent session: cosmic-gray
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Roll Back now asks for confirmation everywhere it's offered. The pulled-build banner previously quit into the kept build with no question; the palette and menu also ran straight away because the confirmation presenter had no prompt for updates.rollback.
- Wires
PulledBuildWatchto the sameupdates.rollbackdestructive confirmation the palette and menu use, via a newconfirmRollBackclosure. - Cancel leaves the banner as it was and runs nothing; a later confirmed press still rolls back.
- With no presenter wired, Roll Back does nothing.
- Adds the confirmation text to
UpdaterStringsand the localized catalog in 21 locales.