mirror of
https://github.com/NanmiCoder/cc-haha
synced 2026-07-18 13:23:33 +08:00
Large desktop installs can accumulate huge JSONL transcripts, and the sidebar session list previously loaded each requested transcript into memory on cache misses. The main branch cache from #651 handles repeated hot refreshes, so this change keeps that cache and replaces cache-miss list metadata extraction with a sequential streaming summary scan for paginated files only. It also makes Windows sidecar shutdown prefer taskkill /T so stale child processes are less likely to survive app stop paths. Constraint: Must preserve main's short session-list cache from #651 while reducing cache-miss memory growth. Rejected: Rely only on the #651 cache | cache expiry, first load, and pagination still hit full JSONL reads. Rejected: Add a persistent summary index | larger persistence migration risk than needed for this issue. Confidence: medium Scope-risk: moderate Directive: Do not replace the streaming scanner with full readJsonlFile calls without re-running large-transcript pressure tests. Tested: bun test src/server/__tests__/sessions.test.ts Tested: bun run check:server Tested: bun run check:native Tested: bun run check:desktop Tested: synthetic pressure test with 140 sessions x 1200 JSONL entries showed lower RSS growth than main baseline. Not-tested: Windows live taskkill /T process-tree cleanup.
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