Context
Dict is a Tauri 2.0 app intended to run on macOS, Windows, and Linux, but development and manual testing have happened almost entirely on macOS. We need confidence that core flows work on the other platforms, plus automated tests to catch regressions.
Platform-specific surfaces to verify
These are the areas most likely to differ across platforms:
- Global hotkey registration + firing (
tauri-plugin-global-shortcut); default differs per-OS (Alt+Space mac / Ctrl+Alt+Space else) and live re-registration via on_shortcut.
- Bare-modifier / Fn trigger — currently macOS-only (NSEvent
flagsChanged monitor in lib.rs). Needs a Windows/Linux equivalent (e.g. low-level keyboard hook) or graceful no-op + UI gating.
- Audio capture (
cpal) — device enumeration, default device, sample formats/rates, resampling to 16 kHz.
- Whisper —
whisper-cli discovery (whisper.rs) and model dir resolution (~/.config/dict/models vs %APPDATA%/dict/models).
- Text injection (
text_injector.rs) — clipboard + paste keystroke (Cmd+V vs Ctrl+V), accessibility/permission model.
- Frontmost-app detection (
frontmost_app.rs) — macOS NSWorkspace / Windows GetForegroundWindow / Linux xdotool.
- Window chrome — vibrancy + overlay title bar are macOS-only; verify the Preferences/overlay windows look/behave acceptably elsewhere.
- Tray — left-click-opens-Settings + right-click menu behavior across platforms.
- Config + capabilities — config path resolution; Tauri capabilities/permissions.
Proposed automated tests
- Unit tests for platform-agnostic logic: settings (de)serialization + defaults (some exist in
settings.rs), accelerator/bare-modifier parsing, whisper arg building, LLM provider/model URL derivation, tone→prompt mapping.
#[cfg(target_os)]-gated tests for path resolution (models/config dirs) per platform.
- CI matrix (GitHub Actions) building on macOS + Windows + Linux (
cargo build/cargo test for src-tauri, plus tauri build), extending .github/workflows/release.yml's matrix to run on PRs.
- Smoke/integration (later): headless launch that asserts startup (hotkey registered, tray created) without crashing, per-OS.
Status
Deferred — tracking for future work. Priority: do the CI build matrix first (cheap regression signal), then unit tests, then per-platform manual passes for the native surfaces above.
Context
Dict is a Tauri 2.0 app intended to run on macOS, Windows, and Linux, but development and manual testing have happened almost entirely on macOS. We need confidence that core flows work on the other platforms, plus automated tests to catch regressions.
Platform-specific surfaces to verify
These are the areas most likely to differ across platforms:
tauri-plugin-global-shortcut); default differs per-OS (Alt+Spacemac /Ctrl+Alt+Spaceelse) and live re-registration viaon_shortcut.flagsChangedmonitor inlib.rs). Needs a Windows/Linux equivalent (e.g. low-level keyboard hook) or graceful no-op + UI gating.cpal) — device enumeration, default device, sample formats/rates, resampling to 16 kHz.whisper-clidiscovery (whisper.rs) and model dir resolution (~/.config/dict/modelsvs%APPDATA%/dict/models).text_injector.rs) — clipboard + paste keystroke (Cmd+V vs Ctrl+V), accessibility/permission model.frontmost_app.rs) — macOS NSWorkspace / Windows GetForegroundWindow / Linux xdotool.Proposed automated tests
settings.rs), accelerator/bare-modifier parsing, whisper arg building, LLM provider/model URL derivation, tone→prompt mapping.#[cfg(target_os)]-gated tests for path resolution (models/config dirs) per platform.cargo build/cargo testforsrc-tauri, plustauri build), extending.github/workflows/release.yml's matrix to run on PRs.Status
Deferred — tracking for future work. Priority: do the CI build matrix first (cheap regression signal), then unit tests, then per-platform manual passes for the native surfaces above.