Skip to content

armgit / Pake

Public Imported from GitHub
0

Turn any website into a lightweight desktop app with one command, on macOS, Windows and Linux.

docs: name the new inject files and the npm-only hotfix precedent

Tw9300fcbfd28965
diff --git a/.agents/skills/bugs/SKILL.md b/.agents/skills/bugs/SKILL.md
index ebc0c4fd..e644579f 100644
--- a/.agents/skills/bugs/SKILL.md
+++ b/.agents/skills/bugs/SKILL.md
@@ -22,17 +22,17 @@ Aim it at a boundary, not at a file.
Name the area and the depth. A whole-repo sweep with no budget produces speculation; pick one hotspot and go deep. Start from the Hotspot Map in `AGENTS.md` (Current Risk Areas + table below) rather than inventing a scope.
-| Hotspot | Primary paths | Locked tests (examples) |
-| -------------------------- | -------------------------------------------------------- | --------------------------------------------------------------------------------- |
-| Link / download heuristics | `src-tauri/src/inject/event.js` | `event-link-guard.test.js`, `download-http-status.test.ts` |
-| Download success semantics | `src-tauri/src/app/invoke.rs`, `window.rs` `on_download` | `download-http-status.test.ts` |
-| Menu / focused window | `src-tauri/src/app/menu.rs` | `menu-focused-window.test.ts` |
-| Startup visibility | `src-tauri/src/lib.rs`, `setup.rs` | `startup-window-reveal.test.ts` |
-| Auth / popup | `inject/auth.js`, `inject/event.js` | `auth-sso-patterns.test.js`, `new-window-macos.test.js` |
-| Clipboard | `inject/event.js` | `event-clipboard-shortcuts.test.js` |
-| Multi-window / icon | `window.rs`, `setup.rs` | `window-icon-reapply.test.ts`, `startup-window-reveal.test.ts` |
-| Platform fake capability | `auth.rs`, proxy, WebKit flags in `lib.rs` | `macos-proxy-feature.test.ts`, `lib.rs` `linux_webkit_safe_mode_*` (`cargo test`) |
-| CLI / config contract | `bin/`, `schema/pake.schema.json` | `config-file.test.ts`, `cli-options.test.ts` |
+| Hotspot | Primary paths | Locked tests (examples) |
+| -------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
+| Link / download heuristics | `src-tauri/src/inject/event.js`, `link_policy.js`, `frame_links.js` | `event-link-guard.test.js`, `download-http-status.test.ts`, `frame-links.test.js` |
+| Download success semantics | `src-tauri/src/app/invoke.rs`, `window.rs` `on_download` | `download-http-status.test.ts` |
+| Menu / focused window | `src-tauri/src/app/menu.rs` | `menu-focused-window.test.ts` |
+| Startup visibility | `src-tauri/src/lib.rs`, `setup.rs` | `startup-window-reveal.test.ts` |
+| Auth / popup | `inject/auth.js`, `inject/event.js`, `inject/frame_links.js` | `auth-sso-patterns.test.js`, `new-window-macos.test.js`, `frame-links.test.js`, `popup-routing.mjs` (Playwright, manual) |
+| Clipboard | `inject/event.js` | `event-clipboard-shortcuts.test.js` |
+| Multi-window / icon | `window.rs`, `setup.rs` | `window-icon-reapply.test.ts`, `startup-window-reveal.test.ts` |
+| Platform fake capability | `auth.rs`, proxy, WebKit flags in `lib.rs` | `macos-proxy-feature.test.ts`, `lib.rs` `linux_webkit_safe_mode_*` (`cargo test`) |
+| CLI / config contract | `bin/`, `schema/pake.schema.json` | `config-file.test.ts`, `cli-options.test.ts` |
The AGENTS.md Hotspot Map third column is regression risk, not an open-bug list. Confirm against Current Risk Areas and the tests above before treating a row as a live defect.
@@ -54,12 +54,12 @@ Highest historical yield first. For each, read the matching Risk Areas note in `
| Boundary | What to ask | Where it lives |
| -------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------- |
-| Download / navigation heuristics | Would a SPA route under this path/extension be intercepted? Prefer extension + `download` attr + query hints over broad path roots. | `inject/event.js` |
+| Download / navigation heuristics | Would a SPA route under this path/extension be intercepted? Prefer extension + `download` attr + query hints over broad path roots. | `inject/event.js`, `inject/link_policy.js`, `inject/frame_links.js` |
| Success vs transport | Is HTTP non-2xx, empty body, or missing file still toasted as success? | `invoke.rs`, `on_download` |
| Window identity | Does this path hardcode `"pake"` when the user may be on `pake-N` or the focused window? | `menu.rs`, `invoke.rs`, `setup.rs`, `window.rs` |
| Eval on dead pages | Does this menu/shortcut need a page JS context? Error and blank shells have none; prefer native `reload` / `navigate` / platform history. | `menu.rs` |
| Startup vs user control | Can page-load or fallback re-show a window the user already hid? Latch every user visibility path. | `lib.rs`, `setup.rs` |
-| Auth / popup | Does macOS auth still crash, strand about:blank, or open the system browser for SSO? Apple Sign-In stays native popup. | `auth.js`, `event.js` |
+| Auth / popup | Does macOS auth still crash, strand about:blank, or open the system browser for SSO? Apple Sign-In stays native popup. | `auth.js`, `event.js`, `frame_links.js`, `link_policy.js` |
| Clipboard | Does keydown steal native paste (images/files)? Is fallback gated on trusted keyup + TTL? | `event.js` |
| Platform capability | Is this flag real on WKWebView / WebView2 / WebKitGTK, or a Chromium-only no-op? | `auth.rs`, `window.rs`, `lib.rs` |
| Config dual track | Can a config file smuggle a value the CLI flag rejects? | `bin/helpers/merge.ts`, schema |
diff --git a/.agents/skills/code-review/SKILL.md b/.agents/skills/code-review/SKILL.md
index b3704dd7..27dd2c43 100644
--- a/.agents/skills/code-review/SKILL.md
+++ b/.agents/skills/code-review/SKILL.md
@@ -29,7 +29,7 @@ Use Waza `/check` for the generic review method. This adapter adds Pake-specific
- [ ] New helper in `bin/utils/` or `bin/helpers/` has a matching `tests/unit/<basename>.test.ts`.
- [ ] Binary parsers have a round-trip test, not only builder assertions.
- [ ] Linux WebKit/AppImage runtime flag changes keep the default conservative, add or update tests for the decision logic, and update `docs/faq*.md` when users need a fallback command.
-- [ ] macOS `--new-window` or auth URL changes include targeted tests for popup/auth routing in `src-tauri/src/inject/event.js`.
+- [ ] macOS `--new-window`, auth URL, or frame-link changes (`auth.js`, `event.js`, `frame_links.js`, `link_policy.js`) run `node tests/browser/popup-routing.mjs` with an installed Playwright runtime; see AGENTS.md Current Risk Areas for why classifier-only unit tests do not prove routing.
## Quick Review Commands
@@ -48,6 +48,10 @@ pnpm test -- --no-build
# Build CLI and catch TypeScript errors
pnpm run cli:build
+
+# Popup/auth routing probe: manual only, needs a Playwright runtime
+# (tests/browser/*.mjs are outside vitest and Playwright is not a devDependency)
+node tests/browser/popup-routing.mjs
```
## Review Output Format
diff --git a/.agents/skills/release/SKILL.md b/.agents/skills/release/SKILL.md
index 6a05b370..4c06fe9b 100644
--- a/.agents/skills/release/SKILL.md
+++ b/.agents/skills/release/SKILL.md
@@ -75,7 +75,7 @@ Do not collapse these into "released" without naming which surface was verified.
## npm-Only Hotfix (no tag)
-For CLI or Rust-template fixes that must reach npm fast without an app release. Precedent: 3.15.0, 3.15.2 through 3.15.5, and 3.15.7 shipped this way; the version number is still consumed, so the next `V*` tag skips over it.
+For CLI or Rust-template fixes that must reach npm fast without an app release. Most 3.15.x and 3.16.x point releases shipped this way; the version number is still consumed, so the next `V*` tag skips over it.
1. [ ] Bump all four version files, rebuild `dist/cli.js` with `pnpm run cli:build`, stage the version files, and stage the ignored artifact with `git add -f dist/cli.js`
2. [ ] Run `pnpm run release:check`. For a Rust-template fix, also run the narrow current-platform Rust check before pushing. Do not run `npx vitest run` separately because `release:check` already includes it.