Reuse the created window handle during startup - #318
Merged
PathGao merged 1 commit intoAug 2, 2026
Conversation
Collaborator
Author
|
@alecdotdev This startup-lifecycle guard removes two avoidable |
This was referenced Jul 31, 2026
PathGao
force-pushed
the
fix/reuse-created-window-handle
branch
from
August 2, 2026 03:58
96b1124 to
ea0db7c
Compare
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.
Fixes #317
Uses the handle returned by
WebviewWindowBuilder::build()for initial theme application, file delivery, focusing, installer sizing, and centering. This removes two registry lookupunwraps that could panic if window lifecycle state changes during startup.Adds a regression test that rejects those startup lookup unwraps.
This is stacked after #316 and its predecessors. Merge the predecessor chain first.
Validated with
npm ci,npm audit(0 vulnerabilities),npm run check(0 errors, 0 warnings),npm test(137 passing),npm run build, andcargo test(21 passing).