Repository navigation
app: a demo sets the person's panes aside - #623
Merged
Merged
Conversation
A demo closed the person's documents and gave them back, but not the document panes they sat in. A demo that split the editor (a tab dropped on its edge) left its pane behind after it ended, wrote its arrangement over the person's `panes.zon` while it played, and a seek back to a keyframe replayed onto the panes a later moment had made. Now the workbench holds the person's arrangement while a demo has the window and saves nothing (`holdPanes`), a keyframe cuts to one pane (`onePane`), and the end puts theirs back before their documents reopen (`restorePanes`). The hold is a copy of its own: a snapshot borrows the pane names from the live tree, which the first cut replaces. The demo test plays a tape that splits the editor: two panes at its end, one after a seek to the keyframe, the person's own after. Part of fizzyedit/plans#30 (the new tour splits the editor). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4 of 6 tasks
3 tasks done
foxnne
added a commit
that referenced
this pull request
Oct 19, 2026
…639) Part of fizzyedit/plans#30. Review follow-up to #623, which merged before these fixes. ## What changes Three findings from #623's review: - **A failed hold was silent.** `holdPanes` swallowed a copy that couldn't be made, so nothing was held and the demo's panes were saved over the person's `panes.zon`. Now a `holding` flag stops every save while a demo has the window, whatever else happens. Where there is no copy, the end reads the person's arrangement back from disk, which nothing overwrote. - **A demo at launch.** A demo started before the workbench's first rebuild held the default one-pane tree. Then the saved panes (and last session's tabs) loaded in the middle of the demo, and the default came back at its end. That first restore now waits for the demo to end, and runs then. - **Documents reopened into the current pane.** Each document now reopens into the pane it was in, recorded when the demo began. - The review predicted that the other panes would come back empty and be closed. That doesn't happen here: with the old reopen, the new test still passes, because the reloaded layout's region assignments seat each document back in its pane. - The change makes the arrangement put back independent of those assignments. ## SDK impact - [x] None ## Verified - [x] macOS, `zig build test-integration` (81/81 steps, on current `main`). The demo test now starts from the person's own two panes: a file of theirs in one, the site's zip in the other. After a demo that splits the editor, both panes are back, each with its document, through a further rebuild. - [x] `zig build`, `zig build check-web`, `scripts/check-fmt.sh`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
foxnne
added a commit
that referenced
this pull request
Oct 19, 2026
…ry (#629) Part of fizzyedit/plans#30. **Merge after #621 and #626**: this branch is built on both and on `main` (which has #623 and #624), and until they land its diff shows their commits too. Its own change is `src/editor/demos/tour.zig`, `catalog.zig` and `docs/AUTOMATION.md`. ## What changes The tour was the explorer, typing, the palette and a markdown preview, with long holds (8.5 s on the first card). It now covers what a person needs to get around, and what fizzy's windowing does, in 58 seconds: | Chapter | At | What it shows | |---|---|---| | Welcome | 0:00 | a short title card, no hold | | Tabs | 0:03 | a tab dragged into order, another dropped on the editor's edge: a pane beside | | Places | 0:10 | a place's corner button, its picker, and Split | | Floats | 0:18 | the Files view dropped on its own place's middle: a float, carried by its header over the code | | Materials | 0:25 | Liquid Glass, frost, blur, clear and opaque under that float (`fizzy.windowMaterial`, #621), then closing the float sends the view home | | Plugins | 0:38 | the store: everything seen so far is a plugin | | History | 0:42 | typing, the grip at the page's foot filling toward the history's cap (#624), and the bar it opens | | Your turn | 0:54 | where to find it again: Guides on the rail | Each chapter that rearranges the window opens on a keyframe. A snapshot holds documents and settings but not the layout, so a seek or a jump from the guides view lands on a cut rather than on a window still arranged the later way. The catalog names the anchors the tour aims at (`place`, `corner`, `cornerButton`, `historyGrip`, `historyLine`). `docs/AUTOMATION.md` lists the ones its table lacked: `history.grip:`, `history.export:`, `history.collapse:`, `float-header:`, `float-close:` and `picker.empty`. The history chapter shows the bar and how to scrub it, but doesn't scrub. A snapshot puts a document's text back but not its history, so a seek replaying a scrub lands on other text. What making it found, each its own PR: - #621: the window's material had no setting. - #623: a demo left its panes behind, and wrote them over the person's `panes.zon`. - #626: the player checked the previous chapter's snapshot on a rewind. - #624: the grip's fill now measures the history cap, per review. ## SDK impact - [x] None of its own. #621 and #623 have none either; #626 changes no shape. ## Verified - [x] Web, in the browser pane: played start to finish on `?demo=tour`. Every chapter landed: the drags, picker, float, material switches, store and history bar. - [x] macOS, `zig build test-integration` (81/81 steps): - `tests/demos.zig` plays the tour to its end with no timeouts and seeks to random moments and every chapter, landing on what playing reached with no mismatches; - the headless tour test passes, as do #623's panes check and #596's zip check after it. - [x] `zig build`, `zig build check-web`, `zig build check-tests-reached`, `scripts/check-fmt.sh`. - [ ] Windows: - [ ] Linux: ## Follow-ups - A pause before the tour clicks the history grip broke seeks there (the line never drew on replay). Something in the grip's rest timing doesn't follow demo time. The tour clicks it without the pause. - On the web, the float's view covers most of its glass, so the material change shows mainly in its header and edges. A sparser view floated would show it better. - Hosted guides (step 3) and `?view=guides` (step 4) are next. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 19, 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 fizzyedit/plans#30. The new tour drops a tab on the editor's edge, and found this.
What changes
A demo sets the person's session aside (folder, documents, settings) and gives it back at the end, but it never set aside the document panes those documents sat in. A demo that split the editor, for example by dropping a tab on its edge, did three things wrong:
panes.zonwhile it played, because the workbench saves whenever the tree changes;Now:
Workbench.holdPanes(atDemo.begin) keeps the person's arrangement in memory and the pane they were in. While it's held, nothing is saved.Workbench.onePane(at every keyframe) cuts to one pane. The others leave with their leaves (rebuildWorkspaces). A keyframe declares the window outright, and now it does the same for panes.Workbench.restorePanes(atDemo.end, before the person's documents reopen) puts their arrangement back, and saving with it.The hold is a copy of its own, made through
snapshotand thenfromSnapshot. A snapshot borrows the pane names from the live tree "until it next changes", and the first cut replaces that tree. The first version held the snapshot itself, and the names it restored were freed memory:Failed to rebuild workspaces, which now says which error (NoSuchPane).SDK impact
Verified
zig build test-integration(81/81 steps): the demo test plays a tape that drags a tab onto the editor's right edge. It checks two panes at the end, one pane after a seek to the keyframe, the person's own pane count once unloaded, and nothing left held. app: a demo gives back a folder opened from a zip's bytes #596's zip check still passes after all the demos, and so does the headless tour test.zig build,zig build test,zig build check-web,zig build check-tests-reached,scripts/check-fmt.sh.panes.zon, which the web never writes.Follow-ups
plans/WORKSPACES_PLAN.md).🤖 Generated with Claude Code