Skip to content

Reuse the created window handle during startup - #318

Open
PathGao wants to merge 17 commits into
alecdotdev:masterfrom
PathGao:fix/reuse-created-window-handle
Open

Reuse the created window handle during startup#318
PathGao wants to merge 17 commits into
alecdotdev:masterfrom
PathGao:fix/reuse-created-window-handle

Conversation

@PathGao

@PathGao PathGao commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Fixes #317

Uses the handle returned by WebviewWindowBuilder::build() for initial theme application, file delivery, focusing, installer sizing, and centering. This removes two registry lookup unwraps 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, and cargo test (21 passing).

@PathGao

PathGao commented Jul 31, 2026

Copy link
Copy Markdown
Contributor Author

@alecdotdev This startup-lifecycle guard removes two avoidable unwraps after window creation. It is stacked after #316 and its predecessors; please review in that order.

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.

Avoid a startup panic if a just-created window is no longer in the registry

1 participant