Skip to content

修复大型 Codex 会话索引与 Open 会话首屏展示 - #244

Draft
zszz3 wants to merge 4 commits into
mainfrom
fix/incremental-codex-indexing
Draft

修复大型 Codex 会话索引与 Open 会话首屏展示#244
zszz3 wants to merge 4 commits into
mainfrom
fix/incremental-codex-indexing

Conversation

@zszz3

@zszz3 zszz3 commented Jul 29, 2026

Copy link
Copy Markdown
Owner

改动内容

  • V1 与 V2 的 Codex JSONL 首次索引改为流式解析,避免大型会话因 Node 字符串上限而消失。
  • 恢复会话后复用数据库中的解析结果,只读取新增尾部;文件截断、回滚或元数据变化时回退为完整重建。
  • Session 默认列表优先展示当前 Open 的会话,即使它早于普通首屏的 30 条结果。
  • 增加面向用户的 Bug 修复 release note。

原因与影响

此前索引器会一次性读取整个 Codex JSONL,超大文件会读取失败并被跳过;恢复旧会话后也会重复解析历史内容。默认分页还只会在已取回的 30 条中标记 Open。

修复后,大型会话可以稳定进入 Session 页面,续写索引只读取新增内容,正在运行的旧会话也会出现在首屏。

验证

  • V1/V2 TypeScript 类型检查通过
  • V1 npm test:1101 passed,1 skipped
  • V2 npm test:完整 Vitest 与脚本测试通过
  • release-note:check 通过
  • git diff --check 通过

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant