Turn any website into a lightweight desktop app with one command, on macOS, Windows and Linux.
Rust chatgptclaudeclidesktopdesktop-appelectron-alternativegeminilinuxmacosnativefierno-electronrusttauriweb-to-desktopwebsite-to-appwebviewwindowsyoutube
test: hold macOS to WebKit's own fullscreen with a Rust source test
Tw933becd7952589
diff --git a/docs/incidents.md b/docs/incidents.mdindex ec0c2feb..3bfff62f 100644--- a/docs/incidents.md+++ b/docs/incidents.md@@ -19,25 +19,25 @@ When a review skill, its prompt or the model running it changes, rerun it on the## Incidents-| ID | Reported | Symptom | Introduced | Fixed | Layer | Caught by |-| ---- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | -------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------- |-| I-01 | 2026-06-29 | `--zoom 99.5` passed the CLI range check and produced a `pake.json` the app could not load (#1274); the same value later still passed through `--config` | unknown | 7edf2af4 | unit | `rejects malformed zoom values instead of truncating them`, `rejects fractional zoom like the --zoom flag` |-| I-02 | 2026-07-13 | Apps started at login on Windows showed a blank taskbar icon (#1323) | unknown | 83a1c476 | field | `reapplies the icon after every explicit window show`, `targets the large taskbar icon instead of only the small window icon` |-| I-03 | 2026-08-01 | A SPA link under `/assets/` was intercepted as a download and a 403 response was toasted as a successful download (#1339) | unknown | f61b3267 | unit | `navigates SPA routes under /assets/ instead of treating them as downloads`, `rejects non-success HTTP responses before writing the file` |-| I-04 | 2026-08-08 | On Windows a window hidden with `--hide-on-close` could never be restored from the tray (#1343) | unknown | 4ba7e65d | native | `acts on one edge of the click, not both`, `treats a minimized window as not on screen` |-| I-05 | 2026-08-10 | Apps built with `--new-window` aborted (SIGABRT) on Cmd+click or `target=_blank` links on macOS 26 (#1347) | unknown | 71dccbb5 | native | `uses WebKit's target configuration with a fresh user content controller` |-| I-06 | 2026-09-10 | Fullscreen video on Windows lost its captions, progress bar and player controls (#1373) | unknown | f671ded1 | native | `preserves WebView2 native fullscreen and keeps the other platform polyfill`, `tests/browser/fullscreen.mjs` |-| I-07 | 2026-09-20 | Playing a video crashed apps on Wayland with WebKitGTK 2.52 after the 3.17.1 fix had covered only X11 (#1386, #1374) | unknown | 3c978e1e | field | `modern_wayland_uses_shm_instead_of_disabling_compositing`, `shm_preserves_legacy_webkit_niri_and_explicit_modes` |-| I-08 | 2026-09-25 | `window.print()` failed with "webview.print not allowed" because the capability lacked the print permission (#1396) | unknown | 187cabb1 | review | `window_print_reaches_the_webview_only_from_trusted_contexts` |-| I-09 | 2026-09-28 | `--windows-toolchain gnu --keep-binary` left a raw `.exe` that would not start without `WebView2Loader.dll` beside it (#1402) | 1fe55a88 | 3e906e81 | unit | `copies WebView2Loader.dll beside the raw binary for gnu`, `records the DLL as an artifact after the binary with --keep-binary` |-| I-10 | 2026-10-15 | On macOS the Enter that confirms a Chinese input method candidate reached the page and sent the message early (#1415) | unknown | f4b4e3cb | field | `keeps the candidate-confirming Enter (keyCode 229) away from the page` |-| I-11 | 2026-10-28 | After one failed Windows build, every later build refused to start with "A previous Pake process left a compilation cache lock" until the lock was deleted by hand | 5d66c330 | 16d79b66 | native | `a failed Windows build whose taskkill exits %i keeps the workspace %i times` |-| I-12 | 2026-08-31 | `--enable-drag-drop`, documented as enabling drag-and-drop uploads, kept Tauri's handler instead, so file drops never reached the page and Windows HTML5 drag and drop broke (#1030, #1132) | bd764f5f | f62e7225 | native | `forwards window/zoom/wasm/new_window flags verbatim` |-| I-13 | 2026-11-13 | During a stalled remote `--icon` download, SIGINT/SIGTERM waited for the 10-second timeout and logged "Icon download timed out!" before cancelling | 5d66c330 | 891521b4 | unit | `tests/unit/icon.test.ts`, `does not try another favicon source after the build is cancelled` |-| I-14 | 2026-11-17 | On macOS a page's `alert()`, `confirm()` and `prompt()` showed nothing: `confirm()` returned false at once, so a site that confirms before logging out did nothing | unknown | 3e7ab18d | native | `sets the delegate again, since WebKit caches what it answers`, `answers the three WKUIDelegate panels WebKit would otherwise skip` |-| I-15 | 2026-11-18 | On macOS, Google sign-in on TikTok, Notion and X ended in a blank window after the password, or the button did nothing: a sized sign-in popup was opened in the app's own window | 0419e982 | 41e1a6f9 | native | `gives a sized popup of the app's own site its own window`, `tests/integration/signin-popup-server.mjs` |-| I-16 | 2026-11-18 | On macOS, Google sign-in on X still ended in a blank popup that never closed after 3.19.2: the popup opened blank and lost its opener to x.com's opener policy | 41e1a6f9 | d95ac6f4 | native | `a_popup_web_view_is_built_blank_so_the_engine_loads_its_address_once`, `tests/integration/signin-popup-server.mjs` |-| I-17 | 2026-11-18 | On macOS a page whose web process died stayed white, and quitting the app then aborted it with a crash report: Wry unwraps the URL such a web view no longer has | unknown | 14cd4ba4 | native | `never asks Wry for the URL of a web view that has none`, `is reloaded, within the same limit as on Windows and Linux` |-| I-18 | 2026-11-18 | With --new-window, an internal target=\_blank link the page handled itself still opened in the system browser (Douyin's episode list opened douyin.com/undefined) | unknown | c2a45111 | native | `a new-window link the page handled itself opens nothing`, `leaves a new-window link the page handled itself alone` |-| I-19 | 2026-11-18 | DeepSeek showed "Abnormal usage environment" in every packaged app: its page reads `"__TAURI__" in window`, and withGlobalTauri put that name on every site | 6bbecdb1 | b3e1c8b9 | native | `is the only way Pake's injected scripts reach the native side`, `a_site_sees_no_tauri_global_api_and_the_users_own_code_keeps_the_name` |-| I-20 | 2026-11-18 | On macOS YouTube's fullscreen button made the window full screen but left the video a small box, and the button could not leave: the polyfill stood in for WebKit's own fullscreen | unknown | cd60cc83 | native | `macOS keeps the engine's own fullscreen instead of the polyfill`, `tests/browser/fullscreen.mjs` |+| ID | Reported | Symptom | Introduced | Fixed | Layer | Caught by |+| ---- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | -------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |+| I-01 | 2026-06-29 | `--zoom 99.5` passed the CLI range check and produced a `pake.json` the app could not load (#1274); the same value later still passed through `--config` | unknown | 7edf2af4 | unit | `rejects malformed zoom values instead of truncating them`, `rejects fractional zoom like the --zoom flag` |+| I-02 | 2026-07-13 | Apps started at login on Windows showed a blank taskbar icon (#1323) | unknown | 83a1c476 | field | `reapplies the icon after every explicit window show`, `targets the large taskbar icon instead of only the small window icon` |+| I-03 | 2026-08-01 | A SPA link under `/assets/` was intercepted as a download and a 403 response was toasted as a successful download (#1339) | unknown | f61b3267 | unit | `navigates SPA routes under /assets/ instead of treating them as downloads`, `rejects non-success HTTP responses before writing the file` |+| I-04 | 2026-08-08 | On Windows a window hidden with `--hide-on-close` could never be restored from the tray (#1343) | unknown | 4ba7e65d | native | `acts on one edge of the click, not both`, `treats a minimized window as not on screen` |+| I-05 | 2026-08-10 | Apps built with `--new-window` aborted (SIGABRT) on Cmd+click or `target=_blank` links on macOS 26 (#1347) | unknown | 71dccbb5 | native | `uses WebKit's target configuration with a fresh user content controller` |+| I-06 | 2026-09-10 | Fullscreen video on Windows lost its captions, progress bar and player controls (#1373) | unknown | f671ded1 | native | `preserves WebView2 native fullscreen and keeps the other platform polyfill`, `tests/browser/fullscreen.mjs` |+| I-07 | 2026-09-20 | Playing a video crashed apps on Wayland with WebKitGTK 2.52 after the 3.17.1 fix had covered only X11 (#1386, #1374) | unknown | 3c978e1e | field | `modern_wayland_uses_shm_instead_of_disabling_compositing`, `shm_preserves_legacy_webkit_niri_and_explicit_modes` |+| I-08 | 2026-09-25 | `window.print()` failed with "webview.print not allowed" because the capability lacked the print permission (#1396) | unknown | 187cabb1 | review | `window_print_reaches_the_webview_only_from_trusted_contexts` |+| I-09 | 2026-09-28 | `--windows-toolchain gnu --keep-binary` left a raw `.exe` that would not start without `WebView2Loader.dll` beside it (#1402) | 1fe55a88 | 3e906e81 | unit | `copies WebView2Loader.dll beside the raw binary for gnu`, `records the DLL as an artifact after the binary with --keep-binary` |+| I-10 | 2026-10-15 | On macOS the Enter that confirms a Chinese input method candidate reached the page and sent the message early (#1415) | unknown | f4b4e3cb | field | `keeps the candidate-confirming Enter (keyCode 229) away from the page` |+| I-11 | 2026-10-28 | After one failed Windows build, every later build refused to start with "A previous Pake process left a compilation cache lock" until the lock was deleted by hand | 5d66c330 | 16d79b66 | native | `a failed Windows build whose taskkill exits %i keeps the workspace %i times` |+| I-12 | 2026-08-31 | `--enable-drag-drop`, documented as enabling drag-and-drop uploads, kept Tauri's handler instead, so file drops never reached the page and Windows HTML5 drag and drop broke (#1030, #1132) | bd764f5f | f62e7225 | native | `forwards window/zoom/wasm/new_window flags verbatim` |+| I-13 | 2026-11-13 | During a stalled remote `--icon` download, SIGINT/SIGTERM waited for the 10-second timeout and logged "Icon download timed out!" before cancelling | 5d66c330 | 891521b4 | unit | `tests/unit/icon.test.ts`, `does not try another favicon source after the build is cancelled` |+| I-14 | 2026-11-17 | On macOS a page's `alert()`, `confirm()` and `prompt()` showed nothing: `confirm()` returned false at once, so a site that confirms before logging out did nothing | unknown | 3e7ab18d | native | `sets the delegate again, since WebKit caches what it answers`, `answers the three WKUIDelegate panels WebKit would otherwise skip` |+| I-15 | 2026-11-18 | On macOS, Google sign-in on TikTok, Notion and X ended in a blank window after the password, or the button did nothing: a sized sign-in popup was opened in the app's own window | 0419e982 | 41e1a6f9 | native | `gives a sized popup of the app's own site its own window`, `tests/integration/signin-popup-server.mjs` |+| I-16 | 2026-11-18 | On macOS, Google sign-in on X still ended in a blank popup that never closed after 3.19.2: the popup opened blank and lost its opener to x.com's opener policy | 41e1a6f9 | d95ac6f4 | native | `a_popup_web_view_is_built_blank_so_the_engine_loads_its_address_once`, `tests/integration/signin-popup-server.mjs` |+| I-17 | 2026-11-18 | On macOS a page whose web process died stayed white, and quitting the app then aborted it with a crash report: Wry unwraps the URL such a web view no longer has | unknown | 14cd4ba4 | native | `never asks Wry for the URL of a web view that has none`, `is reloaded, within the same limit as on Windows and Linux` |+| I-18 | 2026-11-18 | With --new-window, an internal target=\_blank link the page handled itself still opened in the system browser (Douyin's episode list opened douyin.com/undefined) | unknown | c2a45111 | native | `a new-window link the page handled itself opens nothing`, `leaves a new-window link the page handled itself alone` |+| I-19 | 2026-11-18 | DeepSeek showed "Abnormal usage environment" in every packaged app: its page reads `"__TAURI__" in window`, and withGlobalTauri put that name on every site | 6bbecdb1 | b3e1c8b9 | native | `is the only way Pake's injected scripts reach the native side`, `a_site_sees_no_tauri_global_api_and_the_users_own_code_keeps_the_name` |+| I-20 | 2026-11-18 | On macOS YouTube's fullscreen button made the window full screen but left the video a small box, and the button could not leave: the polyfill stood in for WebKit's own fullscreen | unknown | cd60cc83 | native | `macOS keeps the engine's own fullscreen instead of the polyfill`, `tests/browser/fullscreen.mjs`, `macos_keeps_webkits_own_fullscreen_instead_of_the_polyfill` |diff --git a/src-tauri/src/app/window.rs b/src-tauri/src/app/window.rsindex d2929cf2..ff687996 100644--- a/src-tauri/src/app/window.rs+++ b/src-tauri/src/app/window.rs@@ -350,6 +350,28 @@ mod popup_tests {assert!(GLOBAL_API_NAME.contains("window.__TAURI__ = window.__PAKE_NATIVE__"));}+ #[test]+ fn macos_keeps_webkits_own_fullscreen_instead_of_the_polyfill() {+ // Under the polyfill YouTube's button made the window full screen and+ // left the video a small box. The script must read the engine's answer+ // and leave before it marks itself installed or replaces anything.+ let script = include_str!("../inject/fullscreen.js").replace("\r\n", "\n");+ let asks = script+ .find("function engineHasFullscreen() {")+ .expect("the script asks the engine first");+ let mac_only = script[asks..]+ .find("if (!/^Mac/.test(navigator.platform || \"\")) return false;")+ .expect("only a Mac's engine is trusted with it");+ let leaves = script+ .find("if (engineHasFullscreen()) return;")+ .expect("the polyfill stays out where the engine has fullscreen");+ let installs = script+ .find("window.__PAKE_FULLSCREEN_POLYFILL__ = true;")+ .expect("the polyfill marks itself installed");+ assert!(mac_only < 200);+ assert!(asks < leaves && leaves < installs);+ }+#[test]fn a_popup_web_view_is_built_blank_so_the_engine_loads_its_address_once() {let google = Url::parse("https://accounts.google.com/gsi/select?client_id=1").unwrap();