mirror of
https://github.com/NanmiCoder/cc-haha
synced 2026-07-16 13:03:31 +08:00
Notification clicks and repeated launches can enter the native app through OS-level activation paths, so the desktop runtime now registers Tauri's single-instance guard before sidecars or other plugins start. A second launch restores and focuses the existing main window instead of creating another app process. Constraint: macOS and Windows launch paths must reuse the running desktop instance. Rejected: Handle only notification click callbacks | does not cover Dock, shortcut, installer, or Windows relaunch paths. Confidence: high Scope-risk: narrow Directive: Keep the single-instance plugin before sidecar startup so duplicate launches cannot create extra runtime processes. Tested: SKIP_INSTALL=1 ./desktop/scripts/build-macos-arm64.sh Tested: open -n built app twice; desktop_count stayed 1 with pid 69821 Tested: bun run check:native Tested: cargo test --manifest-path desktop/src-tauri/Cargo.toml Tested: cd desktop && bun run test -- desktopNotifications.test.ts Tested: cd desktop && bun run lint
27 lines
643 B
TOML
27 lines
643 B
TOML
[package]
|
|
name = "claude-code-desktop"
|
|
version = "0.2.1"
|
|
edition = "2021"
|
|
|
|
[lib]
|
|
name = "claude_code_desktop_lib"
|
|
crate-type = ["staticlib", "cdylib", "rlib"]
|
|
|
|
[build-dependencies]
|
|
tauri-build = { version = "=2.5.6", features = [] }
|
|
|
|
[dependencies]
|
|
tauri = { version = "=2.10.3", features = ["tray-icon"] }
|
|
tauri-runtime = "=2.10.1"
|
|
tauri-runtime-wry = "=2.10.1"
|
|
tauri-plugin-shell = "2"
|
|
tauri-plugin-dialog = "2"
|
|
tauri-plugin-process = "2"
|
|
tauri-plugin-updater = "2"
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
anyhow = "1.0.102"
|
|
portable-pty = "0.9.0"
|
|
tauri-plugin-notification = "2"
|
|
tauri-plugin-single-instance = "2"
|