Skip to content

Windows Theme Switcher v2.1.3

Latest

Choose a tag to compare

@DashAkoul DashAkoul released this 27 Oct 17:41

v2.1.3 — third audit pass

A third review pass covering what the first two did not: multi-monitor placement, the dev scripts, the documentation, bundle assets and the dependency tree. Twelve findings, all fixed. Full report: docs/AUDIT.md.

Fixed: the popup opened on the wrong monitor

The window is created hidden with no position, so current_monitor() answered for wherever Windows happened to park it — on a multi-monitor setup that is usually the primary screen, not the one whose tray icon was just clicked. target_monitor() now picks the monitor under the cursor, falling back to current_monitor() and then primary_monitor().

Fixed: the smoke test script had been broken for a while

scripts/smoke_test.sh pointed at Windows Theme Switcher.exe, but the binary is named after the crate (windows-theme-switcher.exe), so it always failed with "binary not found" — and its comments still described a v1 onboarding window. It now checks the right path, that the process stays alive, that startup lands in the log, and that a second launch exits on its own. Cleanup uses taskkill, because kill does not terminate a Windows GUI process reliably.

Fixed: the error screen had no close button

If get_app_state failed, App.tsx rendered only the error body — no header, no ✕. The popup could only be dismissed by clicking outside, which looks like a broken window. The header is now a shared PanelHeader used by both screens.

Fixed: the testing guide described a different app

docs/TESTING.md claimed 13 MB idle and 45 MB after opening the panel, and its sample log quoted lines that no longer exist (starting in tray (no webview), panel created, applied profile 'dark' in 412ms). Anyone testing against it would have reported a false failure. Rewritten with the measured numbers and the real log strings, plus sections for multi-monitor, log rotation and invalid-config recovery.

Optimisation

  • crate-type reduced to ["rlib"] — staticlib/cdylib are only needed for the mobile targets this project does not build
  • unused favicon removed (a Tauri window has no tab strip)
  • the body scrolls when content exceeds the fixed height (large Windows text scaling), and the error text is selectable so it can be copied into a bug report

Dependency audit (first run)

cargo audit over 473 crates. zip 4.6.1 carries three advisories (RUSTSEC-2026-0367/0368/0369 — symlink traversal while extracting). They are not reachable here: tauri-plugin-updater calls verify() (minisign, against the pubkey in tauri.conf.json) before install_inner(), so ZipArchive::extract only ever sees a signed archive fetched over HTTPS from this project's own release. Recorded with the reasoning in src-tauri/.cargo/audit.toml, so the decision is reviewable and easy to revisit when the plugin moves to zip >= 9.

npm audit: 0 vulnerabilities. The two remaining Rust warnings (proc-macro-error unmaintained, glib unsound) are build-time-only and Linux-only respectively.

Verified on the release build

  • panel renders identically (same palette)
  • light → dark in 2 ms, dark → light in 1 ms
  • idle working set 148 KB
  • scripts/smoke_test.sh passes end to end
  • 37 unit tests, no compiler warnings, tsc clean, cargo audit clean