mirror of
https://github.com/NanmiCoder/cc-haha
synced 2026-07-16 13:03:31 +08:00
Large desktop histories were making session discovery parse every JSONL before pagination, while automatic title updates could still overwrite manual names during resumed sessions. This keeps listing bounded to the requested page, preserves custom titles, and blocks deleted placeholder sessions from being recreated by prewarm startup. Constraint: Desktop session storage remains JSONL-compatible with the CLI Rejected: Virtualize the sidebar in this patch | does not fix backend JSONL parsing cost Rejected: Disable title generation globally | would regress useful titles for unnamed sessions Confidence: high Scope-risk: moderate Directive: Do not reintroduce all-file JSONL parsing on /api/sessions list paths without a heavy-session benchmark Tested: ANTHROPIC_API_KEY=test-key bun test src/server/__tests__/title-service.test.ts src/server/__tests__/sessions.test.ts Tested: ANTHROPIC_API_KEY=test-key bun test src/server/__tests__/conversations.test.ts Tested: cd desktop && bun run lint Tested: cd desktop && bun run build Tested: heavy local preview with 240 sessions, 320 messages each, and 40 restored tabs Not-tested: native packaged desktop runtime under Windows with the same heavy fixture Related: https://github.com/NanmiCoder/cc-haha/issues/237 Related: https://github.com/NanmiCoder/cc-haha/issues/248