Repository navigation
fix(desktop): avoid destroyed-window exception on notification shutdown - #1685
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Oct 1, 2026
This branch was successfully deployed
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.
Problem and resulting behavior
Closing/destroying the owning desktop window after #1676 can show Electron's uncaught
TypeError: Object has been destroyeddialog.ActivityController.stop()disposed its queue and immediately rebuilt it, queryingowner.isVisible()after destruction. A packaged workspace smoke returned exit 0 despite the visible dialog.Stop is now terminal and idempotent: dispose without rebuilding, abort pending reads, and ignore further polls. Surface transitions/preferences cannot restart a stopped controller. Native foreground reads and delayed preference publication check owner destruction. Regressions cover real retirement semantics, repeated stop, destroyed window transitions, timer cleanup and late responses; the controller regression reproduces the reported exception against unchanged dev.
Verification
pnpm test:owner:desktop: 24 files / 106 tests passed; desktoptypecheckpassed.pnpm electron:tsc; existingcompanion-preview.js --smoke: passed, including native owner/pet destruction.pnpm electron:smoke:workspace --skip-build --keep-package: unsigned macOS arm64 package passed all 12 receipt checks, including shell CLI, managed Pi, scheduled issue and cleanup.pnpm electron:smoke:startup --app-path <candidate executable>: no Recent and unavailable Recent passed against the repaired package.Broader Sep30/Oct1 acceptance on clean dev
0a10220d: full build, root/UI/desktop/CLI/Guardian/central-spec typechecks, required critical 18/18, Guardian system, Electron PTY and startup passed. Full hermetic suite completed with 7494 pass / 27 fail / 8 skip across 882 files: 21 Supervisor PTY failures are being addressed separately by #1682/#1684; four startup/config assertions inherit real legacy desktop preferences (#1686); two CLI package-channel tests assume executable shell fixtures although Darwin fixtures now contain Mach-O bytes (#1687). These baseline failures are not claimed as accepted. Native demo checks passed but teardown logged a separate IPC EPIPE (#1688).Boundary touch and remaining evidence
Desktop lifecycle only; no trading, credentials, persisted shape change, release, or signing. Windows/Intel native exit, macOS Dock restore, multi-monitor composition and signed updater installation remain unverified locally. Notification journal mapping and policy behavior are unchanged.