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
docs: record what V3.20.0 taught about off-origin fallbacks and the release notes
Tw93d761a69355a3
diff --git a/.agents/skills/release/SKILL.md b/.agents/skills/release/SKILL.mdindex e6c4766a..c65a9506 100644--- a/.agents/skills/release/SKILL.md+++ b/.agents/skills/release/SKILL.md@@ -76,7 +76,13 @@ Before writing notes, `gh release view <previous release>` and treat its structuSpecial thanks to @user for the reports and PRs behind this release. If Pake helps you, please consider giving it a star and recommending it to your friends.+### Pake App++If you would rather click than type commands, [Pake App](https://pake.run/) makes apps from a ready-made gallery or any URL on Mac, Windows and Linux, with no Node.js or Rust to install, and adds ad blocking and updates for the apps you made. You can [download it here](https://pake.run/). The CLI stays free and open source.+> https://github.com/tw93/Pake```+The Pake App section goes in every release, in English only and without a price (maintainer 2026-11-21, V3.20.0, after Mole's releases). Name only what the app does on all three platforms. A regression that appeared and was fixed between two `V*` tags is not a changelog item, even when an npm-only version carried it: V3.20.0 left out the Linux title bar that 3.19.5 lost and 3.19.6 gave back.+Apply with `gh release edit VX.Y.Z --title "VX.Y.Z Codename" --notes-file notes.md`.diff --git a/.claude/rules/tauri-runtime.md b/.claude/rules/tauri-runtime.mdindex 3bd2b3f2..6fad6d53 100644--- a/.claude/rules/tauri-runtime.md+++ b/.claude/rules/tauri-runtime.md@@ -43,3 +43,4 @@ paths:- macOS menu navigation must keep working on blank error pages: Reload uses native `WebviewWindow::reload`, Go Home uses `navigate` + `resolve_home_url`, Back/Forward use the platform WKWebView history API rather than page `eval`. Copy URL reads `window.url()` so it does not depend on a live JS document.- The release profile is `panic = "unwind"` (2026-11-19), not `abort`: under abort an Objective-C exception that crosses a Rust frame ends the app, since Wry's `objc2::exception::catch` cannot hold, and WebKit raises one whenever an `ipc://` answer arrives for a request a closing or leaving page had out. Measured on macOS 26.7 with both mitigations off (no `deferWindowClose`, `CLOSE_GRACE` 0): the abort build died on the first sign-in popup with a crash report, the unwind build finished all three flows of `tests/integration/signin-popup-server.mjs` and stayed up. It costs about 1.9 MB per architecture on macOS (12.8 to 14.7 MB on arm64). Windows and Linux have no such exception and pay more (the Windows x64 binary went from 11.9 to 16.4 MB), so the CLI passes `CARGO_PROFILE_RELEASE_PANIC=abort` to their release builds (`getPanicStrategyEnvironment` in `bin/builders/env.ts`), as any other builder of those platforms should; the profile's default stays unwind so that a builder that forgets is only larger, never back to the crash. Do not switch the profile back for size; `tests/unit/popup-close.test.ts` holds it. The close delay and the grace stay: they let the popup's last calls finish, which unwinding does not.- Built-in ad blocking (`content-blocking` feature, `src-tauri/src/app/content_blocking.rs`) embeds the lists of `filters/`, which `node scripts/update-filter-lists.mjs` downloads; they age within days, so update them before a runtime release. A change to the lists or to their conversion is then run on real pages with `node tests/blocking/run.mjs` (macOS, about 15 minutes for the 60 pages of `tests/blocking/sites.txt`), because unit tests on the conversion let I-23 ship: it loads each page in an offscreen WKWebView without blocking, with the two WebKit lists a Mac or Linux app compiles and with the hiding script a Windows app injects, and fails a page that loses its icons, most of its elements or most of a long text. It first proves it can fail, on a list that hides every `svg`. Pages change from one load to the next, so a difference is loaded three times before it counts, and a cookie notice that is half of a short page's text is the cookies list working. Measured in a Windows 11 VM on 2026-11-21: the 644 KB generic hiding style costs about 12 ms to add on a page and 2 to 8 ms more on a full style recalculation (stackoverflow.com, bilibili.com, theguardian.com), so it is not trimmed per site. Scriptlet rules (`+js(...)`) and procedural selectors are dropped on purpose: the scriptlets that block YouTube's ads change every few days, and lists embedded at build time would be stale and could stop playback instead; they need a way to update lists in installed apps first.+- IPC reaches only the packaged entry origins (`remote_capability` in `config.rs`): once the window is on another site, every `invoke` from an injected script is rejected, so the script's fallback is what actually runs there and has to be right by itself. `window.pakeConfig.url` is absolute for a web app but only a file name for a local one, so a fallback that assigns it to `location.href` loads that name from the site the window is on; `packagedHomeUrl()` in `event.js` builds the bundled page's address instead (`http://tauri.localhost/` on Windows, `tauri://localhost/` elsewhere, as `resolve_home_url` in `navigation.rs`). Unit tests with a resolving `invoke` mock do not see this: a shortcut or command a page can use off the packaged origin gets a test with a rejecting `invoke`, and is pressed in a built app after navigating away, for a web app and a local-file app. Without CI that is a cross-built Windows runtime in a VM (`SendKeys` after `AppActivate`, the page writing `location.href` into `document.title`) and a `--no-bundle` runtime under `xvfb-run` on Linux (`xdotool key` after a click, the page reporting to a local HTTP server, since a title is not readable there). Before V3.20.0 this caught Ctrl+Shift+H sending a local app on example.org to `example.org/index.html`.