Skip to content

fix(desktop): preserve sidebar preferences and finish quitting - #895

Merged
nixuuu merged 1 commit into
devfrom
fix/guard-destroyed-browserwindow-references
Nov 16, 2026
Merged

nixuuu merged 1 commit into
devfrom
fix/guard-destroyed-browserwindow-references

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 16, 2026

Copy link
Copy Markdown
Member

Change

Closing the last Windows window could throw Object has been destroyed after shutdown was latched, leaving services running and both Open and Quit in the tray inactive. Check BrowserWindow and WebContents liveness before session revocation, header authorization and IPC authorization; capture navigation targets before teardown.

Local desktop sidebar preferences now use a stable scope instead of the gateway's random port, preserving grouping, project order and the Working section across restarts. Remote desktop and server scopes stay isolated. Existing port-derived records cannot be reliably migrated, so users may need to select their preferences once after upgrading.

Fixes: #835
Fixes: #583

Verification

  • 39 focused tests passed: desktop session security, IPC delivery, app routes, quit guard and device-view persistence. Temp-directory checks passed.
  • Desktop typecheck, lint and formatting of edited files, and diff checks passed locally.
  • Real Electron on Linux reproduced the old destroyed-window getter failure. The patched lifecycle completed session revocation and quit when closing the last window, invoking Quit with live windows, and invoking Quit after closing the main window while settings remained open.
  • Updated desktop and UI/API documentation. No UI layout or copy changes; copy audit is not applicable.

The full repository gate runs in CI. Native Windows verification remains outstanding; the Linux lifecycle smoke does not verify Windows integration or the full packaged runtime shutdown.

Guard destroyed BrowserWindow references before session revocation and request authorization so closing a window cannot latch shutdown and leave tray actions inactive. Keep local device preferences scoped independently of the gateway port.

Fixes: #835
Fixes: #583
@nixuuu
nixuuu enabled auto-merge (squash) November 16, 2026 22:00
@nixuuu
nixuuu merged commit 61228c5 into dev Nov 16, 2026
15 checks passed
@nixuuu
nixuuu deleted the fix/guard-destroyed-browserwindow-references branch November 16, 2026 22:06
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