Fix headless startup window minimization - #831
Draft
qayshp wants to merge 3 commits into
Draft
Conversation
qayshp
commented
Jul 23, 2026
qayshp
left a comment
Author
There was a problem hiding this comment.
Self-review: the null guard addresses the reported crash and the focused regression check covers both headless and ordinary window paths. I found one minor diagnostics follow-up to address before this draft is marked ready.
Author
Validation updateValidated on the current SIP-enabled Tahoe host:
A fresh live application startup was not completed. The normal production build remains blocked by the unrelated pre-existing |
Author
|
Latest-head validation (
|
This was referenced Jul 28, 2026
qayshp
marked this pull request as ready for review
July 28, 2026 07:02
qayshp
marked this pull request as draft
July 28, 2026 07:30
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.
Summary
BrowserWindow.Root cause
Headless mode returns from
AppWindow.build()without creating aBrowserWindow. During server initialization,preChecks()still reads the independentstart_minimizedsetting and unconditionally callsthis.window.minimize(). When both settings are enabled, the null window dereference rejects startup before the HTTP server begins listening.The minimization decision now goes through a small null-safe helper. This keeps the normal GUI behavior unchanged while making the headless combination a no-op.
User impact
BlueBubbles can start headlessly from SSH, a LaunchAgent, or another session without a WindowServer connection even when
start_minimizedremains enabled. Existing GUI launches with start-minimized enabled still minimize their window.Validation
Passed:
npm --workspace @bluebubbles/server run test:headless-windowsrc/server/index.tsandsrc/server/utils/WindowUtils.ts--noEmitcheck forWindowUtils.tsgit diff --checkThe full repository checks still expose unrelated errors in unchanged
origin/developmentfiles:max-lenerrors insrc/server/api/privateApi/modes/dylibPlugins/index.tslines 143 and 158.NodeJS.Timer/clearIntervaltype mismatch insrc/server/lib/ScheduledService.tsline 39.Fixes #789.
Related: #733.