Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ Build features so failures are *debuggable without a rebuild*. This is not optio
- **HTTP/IPC boundaries:** check `resp.status().is_success()` before parsing, and put the response body in the error so a 401/403/quota failure reads as itself, not a generic "missing field". Same for subprocess: capture stderr and surface the structured error kind.
- **Diagnose with logs, not hypotheses.** If a bug's cause isn't provable from data in hand, add the logging that would capture it, have the user reproduce, then fix from what the logs show. Don't guess-and-rebuild in a loop.

## Build + reinstall workflow (macOS)
## Build + reinstall workflow (macOS only)

As of 2026-09-11 the dev machine is Omarchy Linux (rebuilt from Windows 11 on 2026-09-01). The macOS steps below (codesign, tccutil, `/Applications` copy, `.app` bundles) are not runnable here; they are kept for when a Mac is available. HEAD is on branch `feat/windows-voice-actions`. Windows path: `docs/WINDOWS.md` describes a work-in-progress NSIS installer built by the GitHub Actions **Windows** workflow (`src-tauri/tauri.windows.conf.json`, targets `nsis`); no fully supported Windows release yet. No Linux build path documented.

**Signing identity (stable — this is why permissions now persist).** `tauri.conf.json` → `bundle.macOS.signingIdentity` is set to the SHA-1 `F6FD1D39BE4E52054A6B72E1EC5E90A03F5E5B77`, a self-signed **"Echo Scribe Local Dev"** code-signing identity in the login keychain. Because every build is signed with the *same* cert, its designated requirement is constant (`identifier "com.echoscribe.app" and certificate root = H"f6fd…"`), so macOS keeps TCC grants (including Screen Recording) across reinstalls — no more per-rebuild re-granting. Do **not** revert the committed config to `"-"` (ad-hoc), which changes the signature every build and drops grants.

Expand Down Expand Up @@ -79,6 +81,9 @@ bun run test:e2e
# blocks publishing on failure. Locally (after a build):
tar -czf EchoScribe-aarch64.tar.gz -C src-tauri/target/release/bundle/macos "Echo Scribe.app"
bash scripts/smoke-test.sh EchoScribe-aarch64.tar.gz

# Installer test: exercises install.sh against a fixture tarball in a throwaway dir
bun run test:installer # = bash scripts/test-installer.sh
```

Don't run `bun tauri dev` from a subagent — it spawns a window that won't terminate cleanly.
Expand Down
26 changes: 23 additions & 3 deletions docs/WINDOWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ calendar matching can then be added back with Windows-native implementations.
Minimum porting checklist:

1. Move macOS-only dependencies behind `cfg(target_os = "macos")`.
2. Add Windows equivalents or feature fallbacks for global hotkeys, focus context,
microphone permission UX, meeting audio capture, screen recording, calendar
lookup, and credential storage.
2. Add Windows equivalents or feature fallbacks for focus context, microphone
permission UX, meeting audio capture, screen recording, calendar lookup, and
credential storage. (Global hotkeys are done — see "Hotkeys on Windows" below.)
3. Replace the unconditional Metal LLM build with a Windows-compatible llama.cpp
backend, likely CPU first, then optional CUDA/Vulkan later.
4. Add Windows sidecar binaries or disable the features that require the current
Expand All @@ -51,6 +51,26 @@ Minimum porting checklist:
6. Publish a Windows installer from Tauri, typically an NSIS `*-setup.exe` or an
MSI package.

## Hotkeys on Windows

Windows has no CGEventTap, so the configured bindings are registered with the
global-shortcut plugin (`RegisterHotKey`) instead of the macOS event tap. Two
consequences the UI has to live with:

- **A shortcut must contain a regular key.** `RegisterHotKey` cannot register a
bare modifier, so the macOS default (Right Control on its own) is not
expressible. Settings reports this rather than silently doing nothing.
- **Left/right modifiers are not distinguished.** "Right Alt + Slash" registers
as "Alt + Slash".
- **Registration is first-come-first-served across the whole system.** If another
running application already owns the combination, registration fails and Echo
Scribe surfaces the problem in Settings next to that shortcut.

Because a second instance of the app would lose that race against the first and
end up with no working hotkey at all, the app registers
`tauri-plugin-single-instance` and focuses the existing window instead of
starting a second process.

## Validation commands for a Windows developer

On a Windows development machine:
Expand Down
105 changes: 105 additions & 0 deletions src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ tauri-build = { version = "2", features = [] }
[dependencies]
tauri = { version = "2", features = ["protocol-asset", "tray-icon", "image-png", "macos-private-api"] }
tauri-plugin-shell = "2"
# Cross-platform URL / mailto / path opening for voice actions. Replaces
# shelling out to macOS `open`, which made launch_app/draft_email/open_url fail
# with "program not found" on Windows.
tauri-plugin-opener = "2"
tauri-plugin-dialog = "2"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
Expand All @@ -46,6 +50,8 @@ tauri-plugin-store = "2"
tauri-plugin-autostart = "2"
tauri-plugin-notification = "2"
tauri-plugin-global-shortcut = "2"
# Keeps a second launch from stealing/losing the global hotkey registration.
tauri-plugin-single-instance = "2"
# ASR / Parakeet via ONNX Runtime. CPU-only — `ort-coreml` was dropped after
# logs showed CoreML accepted only 15/39 encoder ops and 4/35 decoder ops, and
# spent ~50s on first-run graph compilation while still running most of the
Expand Down Expand Up @@ -107,6 +113,16 @@ block2 = "0.6"
core-graphics = "0.24"
core-foundation = "0.10"

[target.'cfg(target_os = "windows")'.dependencies]
# UI Automation, for reading the focused control's text selection without
# synthesizing Ctrl+C (see src/input/uia.rs). Win32 counterpart to the
# objc2-application-services AXUIElement usage on macOS.
windows = { version = "0.58", features = [
"Win32_Foundation",
"Win32_System_Com",
"Win32_UI_Accessibility",
] }

[target.'cfg(not(target_os = "macos"))'.dependencies]
# Non-macOS starts with a CPU-compatible llama.cpp baseline. GPU backends
# such as CUDA or Vulkan should be enabled only after Windows CI is green.
Expand Down
Loading
Loading