Repository navigation
history: a sprite's history as a line, and going to a step - #49
Merged
Merged
Conversation
Pixi now gives fizzy its history as a line (`historyLine`: each step's id and what it did, how many are applied, a version that moves with it) and goes to any step on it (`historyGoTo`), so a sprite gets fizzy's transport (undo and redo as seeks, the line to scrub) and its track can be exported as a tape. Going to a step undoes or redoes there quietly: one move, not a toast for each step on the way. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
foxnne
marked this pull request as ready for review
October 17, 2026 15:01
This was referenced Oct 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of fizzy's
plans/RECORDING_PLAN.md(fizzyedit/plans#17): step 5's pixi half, which step 6's export needs. Builds against SDK 0.2.29 (historyLine/historyGoTohave been on the document vtable since 0.2.27).What changes
historyLine: each step's id (the ones history: pixel changes are recorded as steps, and play back exactly #45 added) and a title from its kind ("Draw", "Reorder Layers", "Rename Layer", …), the undo stack then the redo stack, and how many are applied.versionmoves with every append, undo and redo, so fizzy asks again only when the line moved.historyGoTo(id): undoes or redoes until that step is the last applied (0: before any).History.quiet). A plain undo or redo still shows its toast.error.PersonBusy), aspixi.drawwaits one out: an undo under an open stroke would leave that stroke's record of what it drew over wrong.linewalks the id lists and stacks to the shorter of the two, so a stack pushed to outsideappendreads short rather than crashing. Clearing the history movesversiontoo.What it gives a sprite:
historyGoTo, writes the file, and comes forward again.Verified
zig buildagainst the pinned SDK 0.2.29 andzig build test(4/4).After review: the sprite round trip rerun (strokes, a fill, an undo, a stroke, then export, save and play) gave 4 steps, replayed to identical pixel rows.
In a running fizzy (Debug, fizzy#478's branch, its own profile, driven through the agent plugin's bridge):
fizzy.tracks.exportwrote a 646-byte tape of 7 steps;pixi.read, every layer).For that run pixi was built with
min_sdk_versionlowered to the branch's 0.2.28 and the change reverted: the branch predates SDK 0.2.29.Not done: "Layer" and "Animation" name both adding and deleting one; which it is depends on how the change's
actionreads on each stack, worth getting right in its own change.line/stepsTo/goTohave no tests:Historyneeds pixi's runtime, whichzig build testdoesn't have.Noticed: the agent's "the person changed this sprite" note (commands: an agent hears what the person changed since its last call #46) counted the export's rewind as the person undoing and redoing 4 steps. The rewind runs through undo and redo. It's harmless (it only asks the agent to look again), and the note could ignore moves made while
quietif that matters.🤖 Generated with Claude Code