The startup setup closure builds a Tauri window successfully, then immediately looks it up twice by label with app.get_webview_window(label).unwrap(). The newly returned window handle already supplies the same operations. If the registry changes during startup/teardown, the lookup can turn a recoverable lifecycle race into a process panic.
Use the handle returned by WebviewWindowBuilder::build() for theme, file delivery, focus, installer sizing, and centering. Add a regression test that rejects registry lookup unwraps in that setup path.
The startup setup closure builds a Tauri window successfully, then immediately looks it up twice by label with
app.get_webview_window(label).unwrap(). The newly returned window handle already supplies the same operations. If the registry changes during startup/teardown, the lookup can turn a recoverable lifecycle race into a process panic.Use the handle returned by
WebviewWindowBuilder::build()for theme, file delivery, focus, installer sizing, and centering. Add a regression test that rejects registry lookup unwraps in that setup path.