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
ci: lint and test the rust code on windows
youxi7983257031aeefe
diff --git a/.github/workflows/quality-and-test.yml b/.github/workflows/quality-and-test.ymlindex 137b8e52..e4318a0e 100644--- a/.github/workflows/quality-and-test.yml+++ b/.github/workflows/quality-and-test.yml@@ -95,6 +95,37 @@ jobs:- name: Run Rust unit testsrun: cargo test --lib+ # Windows-only cfg arms (WebView2 downloads, password autosave, proxy args)+ # never compile on the Linux job, so lint and test them on a Windows host.+ rust-quality-windows:+ name: Rust Code Quality (windows-latest)+ runs-on: windows-latest+ defaults:+ run:+ shell: bash+ working-directory: src-tauri+ steps:+ - uses: actions/checkout@v6+ with:+ persist-credentials: false++ - name: Setup Rust Environment+ uses: ./.github/actions/setup-env+ with:+ mode: build+ rust-cache-save: false++ - name: Install Rust components+ run: rustup component add clippy++ - name: Run Clippy lints+ run: |+ cargo clippy --all-targets -- -D warnings+ cargo clippy --all-targets --features runtime-template,native-download-probe -- -D warnings++ - name: Run Rust unit tests+ run: cargo test --lib+# Fast lane: runs on every PR and push. Skips the heavy real Tauri build# (kept under tests/index.js) but still covers Vitest + integration suites# so feedback stays under ~5 minutes per OS instead of 20+.@@ -202,7 +233,7 @@ jobs:summary:name: Quality Summaryruns-on: ubuntu-latest- needs: [auto-format, rust-quality, validation-fast, validation-full, docker-validation]+ needs: [auto-format, rust-quality, rust-quality-windows, validation-fast, validation-full, docker-validation]if: always()steps:- name: Generate Summary@@ -214,6 +245,7 @@ jobs:echo "|-------|--------|"echo "| Auto Formatting | ${{ needs.auto-format.result == 'success' && 'PASSED' || needs.auto-format.result == 'skipped' && 'SKIPPED' || 'FAILED' }} |"echo "| Rust Quality | ${{ needs.rust-quality.result == 'success' && 'PASSED' || 'FAILED' }} |"+ echo "| Rust Quality (Windows) | ${{ needs.rust-quality-windows.result == 'success' && 'PASSED' || 'FAILED' }} |"echo "| CLI Fast Validation | ${{ needs.validation-fast.result == 'success' && 'PASSED' || 'FAILED' }} |"echo "| Full Tauri Build | ${{ needs.validation-full.result == 'success' && 'PASSED' || needs.validation-full.result == 'skipped' && 'SKIPPED (PR fast lane)' || 'FAILED' }} |"echo "| Docker Packaging | ${{ needs.docker-validation.result == 'success' && 'PASSED' || needs.docker-validation.result == 'skipped' && 'SKIPPED (PR fast lane)' || 'FAILED' }} |"diff --git a/AGENTS.md b/AGENTS.mdindex 4cfe108f..af286b4d 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -145,7 +145,7 @@ Oracles per row live under `tests/unit/` (for example `event-link-guard.test.js`- Download and toast paths must not hardcode `get_webview_window("pake")` when the action originates from a secondary window: IPC commands take the calling `WebviewWindow`, and `on_download` resolves toast by the event webview's label. Authenticated downloads should attach webview session cookies when available. Link-download heuristics prefer real file extensions, the `download` attribute, and `?download` / `?attachment` query hints; Cmd/Ctrl+click is navigation, not "save as"; do not re-add broad SPA roots such as `/assets/`, `/dist/`, `/files/`, or `/releases/` (see #1337, #1339).- The shared download HTTP client pools connections without a cookie jar. Redirects must re-read the calling window's cookies for each HTTP(S) target, progressively narrow Referer, and never restore it after an HTTPS downgrade. Accept page context only from the calling window's actual origin, strip URL credentials, and flush asynchronous file writes before reporting success. Wry 0.54.2 misses macOS literal-IP cookies; only that branch reads the window's full cookie store, with exact IP, Path, Secure and expiry filtering. Keep normal hostnames and other platforms on `cookies_for_url`. Validate the real WebView's User-Agent, Referer, HttpOnly session cookie and wrong-Path exclusion in `tests/integration/ipc-security.mjs`.- 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.-- Not every green CI step is evidence. The old `Test CLI Integration (smoke)` step ended with `|| true` and, because `timeout` took `PAKE_CREATE_APP=1` as the program name, never ran the CLI on any OS; it was removed rather than repaired. The steps that actually fail on regressions are `Run Fast Test Suite` (all three platforms) and `Full Tauri Build` (real `pnpm test` with a build, push and dispatch only). Cite those when claiming a change is verified, and check for `|| true` and `continue-on-error` before treating any other step as proof. `Rust Code Quality` also runs `cargo test --lib`, the only CI gate for the Rust unit tests.+- Not every green CI step is evidence. The old `Test CLI Integration (smoke)` step ended with `|| true` and, because `timeout` took `PAKE_CREATE_APP=1` as the program name, never ran the CLI on any OS; it was removed rather than repaired. The steps that actually fail on regressions are `Run Fast Test Suite` (all three platforms) and `Full Tauri Build` (real `pnpm test` with a build, push and dispatch only). Cite those when claiming a change is verified, and check for `|| true` and `continue-on-error` before treating any other step as proof. `Rust Code Quality` also runs `cargo test --lib`, the only CI gate for the Rust unit tests; its Linux job runs clippy without `-D warnings`, so only the Windows job (`-D warnings`, default features plus `runtime-template,native-download-probe`) fails on lint warnings, and only for Windows cfg arms.- `setup-env` in build mode shares one rust-cache key per OS, and the first job to save wins it: every later restore is a full match and never saves again. A job that installs Rust but does not compile the app (fast lane, clippy) must pass `rust-cache-save: false`, or it seeds an empty target and every release recompiles from scratch. A healthy `v0-rust-pake-build-*` entry is about 1.1 GB and a poisoned one about 109 MB; check `gh cache list --key v0-rust-pake-build` before trusting release timings. Release builds reuse it because the CLI keeps `CARGO_TARGET_DIR` at `src-tauri/target` even inside its private workspace.- `.github/workflows/pake-cli.yaml` and `single-app.yaml` are public build surfaces that external users trigger from their own forks (see `docs/github-actions-usage*.md`). Changes there ship to outside users on push to `main`, independent of `V*` releases; treat them like public API, not internal CI. Their `run:` scripts take inputs through `env:`, never `${{ inputs.* }}` interpolated into bash or pwsh (gated by `tests/integration/workflow-paths.test.js`); on Windows an empty variable is unset, so test it with `IsNullOrEmpty`.- Jobs that compile the app on Linux pin `ubuntu-24.04` instead of `ubuntu-latest` (moving to Ubuntu 26 from 2026-10-19): release `.deb`/`.AppImage` link against the runner's glibc and WebKitGTK, so a runner bump raises the minimum distro for users. Move the pin deliberately, and keep the `matrix.build == 'linux'` conditions in `single-app.yaml` rather than matching the runner label.