[Bug]: 回溯会话功能导致其他会话记录被清空
Version line
v2 — Go rewrite (1.x), main-v2 (active development)
Exact version
1.8.1
What happened?
回溯-回滚代码和对话点击后,所有会话内容都一起被清空了。代码没有被回滚,退出桌面端重新打开后对话记录恢复到没有点击回溯前的状态
Steps to reproduce
在多轮对话中,对最早的一个对话点击回溯-回滚代码和对话
OS / platform
macOS 26
Relevant logs or output
回溯功能需要 1.7.0 版本之后的新对话,旧会话不支持,确认一下你的会话是什么时候创建的呢,
此外在点击了确认回滚之后,我们提供了撤销回滚的操作,只要你在回滚后没发送消息,应该是不会实际回滚的
会话是在1.8.1版本下新建的,表现为UI界面当下进入所有会话都是清空的状态,退出APP重启后所有数据展示为未回滚的状态(含最初点击回滚的对话)
已提交修复 PR:#5399
这次修复也覆盖“回溯目标找错导致前端乐观 UI 异常截断”的风险:前端现在优先使用后端传来的 checkpoint turn 定位回溯点;如果找不到对应边界,不再默认把 transcript 截到开头,而是交给后端执行并刷新状态。这样可以避免因为前端推断失败造成会话列表/当前 transcript 看起来被清空。
Closing this as fixed by #5399 (merged as d9dd4ab55c7d53ac701d4a424a0d3aa03cac87fd).
The fix makes the frontend use authoritative backend checkpoint turn metadata for rewind targeting and avoids optimistic transcript truncation when the frontend cannot find the boundary, preventing the apparent session clearing caused by a bad local rewind target.
Verification in the PR: go test ./..., go test -C desktop ./..., focused frontend checkpoint/history tests, and git diff --check passed.
Release status: the fixing commit is included in Desktop v1.13.0, so users should pick up the fix by upgrading to Desktop v1.13.0 or newer.