You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ff12fab
Browse filesBrowse the repository at this point in the historyBrowse files
app: Undo names whose step it takes, and the bubble after it has a Redo (#495)
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 #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
- [x] 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](https://claude.com/claude-code)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
0 commit comments