SIGN IN SIGN UP
tw93 / Pake UNCLAIMED

🤱🏻 Turn any webpage into a desktop app with one command.

0 0 43 Rust

fix: macOS --new-window crash and Rust panic safety (#1194)

LinkedIn (and any site that opens a popup via window.open or
SOAuthorization) was abort()-ing on macOS 26 with a
WKUserContentController _addScriptMessageHandler: NSException because
NewWindowResponse::Allow let WebKit clone the parent's
WKWebViewConfiguration, which already had Tauri's IPC handlers
registered.

Unify all platforms behind open_requested_window so popups get a fresh
Pake WebviewWindow with a new label, and stop reusing
features.opener().target_configuration on macOS. Reposition/resize
hints from the opener are still honored.

Also tighten panic surfaces along the way:
- show_toast logs eval errors instead of unwrap()
- get_data_dir returns Result and propagates IO errors
- check_file_or_append guards against u32 overflow in the suffix loop
- set_global_shortcut logs plugin / register failures and degrades
- set_window/build_window return Result instead of expect()
- pake.json windows[].first() yields a readable error
- top-level Tauri build failure exits cleanly instead of panicking

Split inject/component.js into inject/toast.js and inject/fullscreen.js
so the polyfill can be opted out per-app later, and update
new-window-macos.test.js to lock in the fix and prevent regressions.

Co-authored-by: Cursor <cursoragent@cursor.com>
T
Tw93 committed
847154ee0b0d04925902becda1bd172ef9d61f84
Parent: 8a81f71