Repository navigation
tests: quitting with a demo loaded is covered - #846
Conversation
BundledApp.down quits with no dvui window current, as appQuit does, and the bundled-demos test leaves a demo loaded for it. Agent-Team: macos Worker: claude Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
311202f to
5a79e51
Compare
PM note: how this PR will be handledWhat it is for: tests: quitting with a demo loaded is covered Rules that apply: none special. Things to watch (checked by rule):
What happens next:
A living status comment below is kept current. Nothing here is a merge decision. |
Where this PR standsStage: Done: approved What the PM needs before approving (ticks as it is met; the full CI runs only at the end, after the reviews are clean):
Reviews at the current commit (
Updated 2026-10-25 22:25 UTC by the PM. This comment is edited in place. |
Part of fizzyedit/work#343
Goal
Quitting with a demo loaded must not panic with
current_window was null(fizzyedit/work#343).What changed and why
Cause:
Editor.deinitrunsDemo.deinit, which unloads the player and so callsDemo.end; ending a demo normally restores the layout and panes, which makes dvui calls that need a live window, andappQuithas none. Current main already skips that restore whenDemo.quittingis set (Demo.end/keep), so the crash from the #809 build no longer reproduces. This PR adds the regression test the issue asks for, and no behaviour change:BundledApp.downnow quits asappQuitdoes (no window current), and the bundled-demos test leaves a demo loaded for it.How it was verified
scripts/zb build test-integrationpasses. With thequittingguard inDemo.enddisabled, the same test panics withcurrent_window was null(dataRemove); with it, it passes. fmt, build, test, check-web and test-sdk-version also pass. Headless only, no UI change.Not done / follow-ups
A second
BundledApp.up()in one test binary crashes onPluginStore's globals after anEditor.deinit(stalepending_actions), so the check lives at the end of the existing demos test rather than as its own test.Changes (1 files, +9/-0)
Gates: 6 of 6 passed
scripts/check-fmt.sh(exit 0)scripts/zb build --summary all(exit 0)scripts/zb build test --summary all(exit 0)scripts/zb build test-integration --summary all(exit 0)scripts/zb build check-web --summary all(exit 0)scripts/zb build test-sdk-version --summary all(exit 0)