Skip to content

app: Undo names whose step it takes, and the bubble after it has a Redo - #495

Merged
foxnne merged 1 commit into
mainfrom
app/undo-names-whose
Oct 18, 2026
Merged

foxnne merged 1 commit into
mainfrom
app/undo-names-whose

Conversation

@foxnne

@foxnne foxnne commented Oct 17, 2026 •

Copy link
Copy Markdown
Collaborator

Part of fizzyedit/plans#14 — plans/SHARED_HISTORY_PLAN.md step 5b (after 5a, #487).

What changes

Cmd-Z stays linear: it takes the last change, whoever made it. It now says whose that is.

  • The Edit menu names it. When the step Undo would take was made by someone else, the row reads "Undo Claude's Draw", and Redo likewise. The person's own steps read "Undo", so working alone looks as it always has. The title is dynamic, read when the menu opens; it reads the owner's historyLine only once someone besides the person has acted on the document (Host.step_authors).
  • The bubble after it has a Redo. Pressing Undo (key or menu) on someone else's step shows "Undid Claude's Edit" on the document's pane, in place of the plain "Undo" its run would show, with a Redo that puts the step back. Redo acts only while that step is still next to redo.
  • ActivityFeed.pushAction. A feed item may carry a button. It alone takes clicks, on a small layer of its own, so the rest of the feed still never covers the work. An item with a button stays 6 s instead of 2.4 s. draw returns the tag of the button pressed.
  • Editor.stepToTake finds the step an undo or redo would take, where it leaves the line, and its author. It is shared by the menu title, the bubble and fizzy.undo's expect (which app: fizzy.undo and fizzy.redo take a path and the step expected #487 had inline).

Muting the run's own "Undo" reuses Host.activity_muted (the demo-seek flag) for the duration of that one command. It is put back before the feed draws, and the code says so.

SDK impact

  • None (the fingerprint does not move; test-sdk-version passes).

Verified

  • Integration (headless: the whole editor comes up…): an author labelled "Claude" writes into the document in front.
    • stepToTake names Claude.
    • editor.undo() (Cmd-Z's path) restores the text, and the pane's last feed item reads "Undid Claude's …" with a Redo tagged with that step.
    • Pressing it brings the text back.
  • Seen on macOS in a sandbox fizzy built from this branch: an MCP client named claude-code wrote into an open note.txt, then Cmd-Z was pressed through the input tape.
    • The pane showed "Undid Claude's Edit · Redo" above the history transport.
    • Clicking Redo at its spot brought Claude's line back (text.read: 3 lines again).
  • The Edit menu's title was not looked at on screen; it is the same lookup the test checks.
  • Gates on macOS: check-fmt, zig build test (574/575, 1 skipped), zig build test-integration (53/53 steps), check-web, test-sdk-version.

🤖 Generated with Claude Code

When the step an undo would take was made by someone else, the Edit menu
reads "Undo Claude's Draw" (and Redo likewise), and pressing it says
"Undid Claude's Draw" on the document with a Redo that puts it back. The
person's own steps read "Undo" as always. `Editor.stepToTake` finds the step
and its author for the menu, the bubble and `fizzy.undo` alike.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@foxnne
foxnne merged commit ff12fab into main Oct 18, 2026
11 checks passed
@foxnne
foxnne deleted the app/undo-names-whose branch October 18, 2026 02:09
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.

1 participant