Skip to content

app: a demo's hold on the panes survives a failed copy and a launch - #639

Merged
foxnne merged 1 commit into
mainfrom
app/demo-panes-followup
Oct 19, 2026
Merged

foxnne merged 1 commit into
mainfrom
app/demo-panes-followup

Conversation

@foxnne

@foxnne foxnne commented Oct 19, 2026

Copy link
Copy Markdown
Collaborator

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

  • None

Verified

  • 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.
  • zig build, zig build check-web, scripts/check-fmt.sh.

🤖 Generated with Claude Code

- Nothing is saved while a demo holds the panes, whatever else happens (`Workbench.holding`): a
  copy that could not be made was swallowed, and the demo's panes saved over the person's. Where
  there is no copy, the end reads theirs back from disk, which nothing overwrote.
- A demo started before the first rebuild restored last session's panes held the default tree,
  and the saved panes loaded mid-demo. That restore now waits for the demo to end.
- Each document reopens into the pane it was in, recorded when the demo began, rather than the
  current one, so the arrangement put back does not depend on the layout's saved assignments.

The demo test now starts from the person's own two panes and checks both, each with its
document, after a demo that split the editor.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@foxnne
foxnne enabled auto-merge (squash) October 19, 2026 14:50
@foxnne
foxnne merged commit 0ea67b5 into main Oct 19, 2026
11 checks passed
@foxnne
foxnne deleted the app/demo-panes-followup branch October 19, 2026 15:03
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