mirror of
https://github.com/NanmiCoder/cc-haha
synced 2026-07-16 13:03:31 +08:00
Concurrent writes to the same settings file could interleave and leave user preferences in a partially updated state, and a restarted conversation session could still be torn down by an older process exit callback. This serializes per-file settings writes, hardens temp-file handling, adds regression coverage for both service behaviors, and drops an unused sidecar external from the build exclude list. Constraint: Settings writes must remain atomic while allowing multiple service entry points to update the same JSON file Rejected: Keep fire-and-forget writes with unique temp names only | still allows stale reads and last-writer races between callers Confidence: high Scope-risk: moderate Reversibility: clean Directive: Preserve the per-file write lock when adding new settings mutation paths so concurrent writes keep one serialization point Tested: bun test src/server/__tests__/settings.test.ts src/server/__tests__/conversations.test.ts (new settings/conversation cases passed) Not-tested: Root lint script is unavailable; Models API tests in src/server/__tests__/settings.test.ts still fail in this checkout with changed default model/effort expectations
Claude Code Haha Desktop
基于 Tauri 2 + React 的桌面客户端。
开发
bun install
bun run tauri dev
构建
# macOS (Apple Silicon)
./scripts/build-macos-arm64.sh
# Windows (x64)
.\scripts\build-windows-x64.ps1
构建产物位于 build-artifacts/ 目录。
常见问题
macOS 提示"已损坏,无法打开"
xattr -cr /Applications/Claude\ Code\ Haha.app