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
Claude Code Haha Desktop
基于 Tauri 2 + React 的桌面客户端。
开发
bun install
bun run tauri dev
构建
# macOS (Apple Silicon)
./scripts/build-macos-arm64.sh
# Windows (x64, MSI only)
.\scripts\build-windows-x64.ps1
构建产物位于 build-artifacts/ 目录,文件名会显式包含平台、架构和包类型。
常见问题
macOS 提示"已损坏,无法打开"
xattr -cr /Applications/Claude\ Code\ Haha.app