Skip to content

fix empty new session history race - #51

Merged
LetItBe12345 merged 1 commit into
mainfrom
agent/fix-empty-new-session-history-race
Jul 29, 2026
Merged

fix empty new session history race#51
LetItBe12345 merged 1 commit into
mainfrom
agent/fix-empty-new-session-history-race

Conversation

@LetItBe12345

Copy link
Copy Markdown
Owner

修复内容

  • 将未发送首条消息的新会话作为独立 Renderer 显示状态
  • 取消旧 Session 的历史恢复,忽略迟到的历史、OMP 投影事件和中断输入
  • 临时新会话期间不选中 Runtime 底层持有的旧 Session,不显示旧标题
  • 显式切回旧 Session 时再恢复其历史

原因

旧 Session 的 getMessages() 可以在用户点击“新建对话”后才返回。历史恢复 effect 没有把临时新会话纳入取消条件,因此迟到结果会覆盖空白投影。

测试

  • pnpm test:workspace-session:3 个测试文件,37 项通过
  • pnpm check:25 个测试文件,167 项通过;类型、Lint 和格式检查通过
  • OMP_RPC_FAKE=1 node scripts/rpc-smoke.mjs:通过
  • pnpm build:通过

新增回归用例覆盖迟到历史、迟到 OMP 事件、Runtime 快照、侧栏选中状态和显式切回。CI 的 Workspace/Session 专项步骤会单独运行该用例。

@LetItBe12345
LetItBe12345 merged commit 09425a9 into main Jul 29, 2026
1 of 2 checks passed
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