Skip to content

text: every step is reported, with the top, and only one hand's typing joins - #479

Merged
foxnne merged 1 commit into
mainfrom
text/steps
Oct 17, 2026
Merged

foxnne merged 1 commit into
mainfrom
text/steps

Conversation

@foxnne

@foxnne foxnne commented Oct 17, 2026

Copy link
Copy Markdown
Collaborator

Part of fizzyedit/plans#14: plans/SHARED_HISTORY_PLAN.md, step 3 (text's half; pixi's follows in its repo).

What changes

  • Text reports every step through Host.recordStep, not only while recording. The host keeps who made each one (sdk: who made each step: Author, act, and the host's author map #474); working alone, it keeps nothing. Encoding a step's effect still happens only while the document is recorded, so a document nobody records costs one call per step.
  • Each step carries top: the last applied entry after it (History.lastApplied), for added, joined, undone and redone alike. The host knows the top step and its author without asking for the line, which Undo's "Undo Claude's …" label (step 5) needs.
  • One hand's typing never joins another's run. History.end takes may_join. The editor's edit hook fills it from Host.mayMerge on the step on top. When that step is someone else's, VSCode's grouping rule doesn't get to fold the new keystroke into it: an agent typing doesn't extend the person's step, nor the person an agent's.
  • Typing calls documentEdited, as its doc comment always said it did. A person's typing runs no command, so it still raises no activity bubble.

SDK impact

Verified

  • macOS:
    • New unit test: an edit with may_join = false starts a step of its own where VSCode's rule would have joined it. The existing history tests pass true and behave as before.
    • zig build test: 573/574 (1 skipped). check-tests-reached passes.
    • test-integration: 53/53 steps, 556/556 tests. The whole-editor test's check from app: whose frame it is, and bubbles that say who #475, that the tour adds no unattributed step, now covers real steps: the tour's typing and commands are each attributed to the tape. Two warnings print, and both are on unmodified main too (a demo replay mismatch and a float position).
    • check-fmt, check-web, test-sdk-version.

🤖 Generated with Claude Code

…g joins

The text half of plans/SHARED_HISTORY_PLAN.md's step 3. Text reports every step through
Host.recordStep, not only while recording, so the host knows who made it (fizzy#474); it
encodes the step's effect only while recording, as before. Each step carries the top (the last
applied entry), so Undo can name whose step it takes back. History.end takes may_join, which the
editor fills from Host.mayMerge on the step on top: an agent's typing never joins the person's
run, nor theirs an agent's. Typing also tells the host it edited (documentEdited), as the doc
comment always said.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@foxnne
foxnne merged commit 2606073 into main Oct 17, 2026
11 checks passed
@foxnne
foxnne deleted the text/steps branch October 17, 2026 14:42
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