mirror of
https://github.com/NanmiCoder/cc-haha
synced 2026-07-18 13:23:33 +08:00
MCP settings could remount into a full-page spinner even when cached server data was available, and overlapping refreshes could let stale responses replace newer state. Historical chat sessions also had no explicit history-loading state, so slow transcript reads looked like a blank session. This keeps cached MCP/session lists visible during refresh, ignores stale list responses, clears the selected MCP server when returning to the list, and gives historical sessions explicit loading/error states with de-duped history loads. Constraint: Fix must stay local-state focused and avoid changing MCP config persistence. Rejected: Add a broad transcript/session indexing layer | too large for the issue-level stall fix. Confidence: high Scope-risk: moderate Directive: Do not remove the stale-response guards without re-testing rapid settings navigation and session switching. Tested: cd desktop && bun run test -- mcpSettings.test.tsx Tested: cd desktop && bun run test -- sessionStore.test.ts Tested: cd desktop && bun run test -- chatStore.test.ts Tested: cd desktop && bun run test -- ActiveSession.test.tsx Tested: bun test src/server/__tests__/sessions.test.ts src/server/__tests__/mcp.test.ts Tested: cd desktop && bun run lint Tested: cd desktop && bun run check:desktop Tested: bun run check:server Not-tested: Manual Windows desktop reproduction for issue #648.
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