修复管理工具窗口居中与会话删除残留 - #1806
Open
success-crypto wants to merge 2 commits into
Open
Conversation
Author
|
已按 #1619 的反馈基于 v1.2.45 重做为最小补丁,仅处理首次启动居中,不再修改窗口生命周期逻辑。当前 |
success-crypto
force-pushed
the
agent/center-manager-on-startup
branch
from
August 13, 2026 13:43
8f36b01 to
0742100
Compare
根因:普通删除流程只要任一正文数据库删除成功就会返回成功,但不会继续清理其他 SQLite 中的 local_thread_catalog 和 thread_timeline_ledger,导致正文及 rollout 已不存在时侧栏标题仍然保留。 修改内容: - 普通删除遍历正文库与 thread-reference 数据库,备份并删除相同 thread ID 的目录和时间线行,正确递增 catalog revision; - 部分数据库失败时返回部分成功及失败原因,保留可撤销备份;撤销前统一预检冲突; - 将旧 session_index 清理升级为历史已删除会话清理,综合 threads、自动化记录、消息正文、活动及归档 rollout 判断真实来源; - 预览显示标题、更新时间、工作区及 catalog/timeline/session_index/global-state 残留来源;默认不选择,并在执行前二次确认; - 使用快照哈希和 catalog revision 防止预览后覆盖新数据,执行前要求完全退出 Codex App/ChatGPT; - 结构化清理 session_index 和 global-state,仅移除 thread 专属键、精确 ID 绑定与数组元素,保留普通文本; - 每批创建包含数据库行、原文件、哈希和删除统计的 manifest 备份,并提供冲突安全的撤销入口; - 增加正常删除、历史空壳、归档保护、远程主机保护、并发变化、写入失败和撤销冲突测试。 验证: - cargo test -p codex-plus-data:68 项通过; - cargo test -p codex-plus-manager --lib:50 项通过; - npm run check:通过; - npm run test:56 项通过; - npm run vite:build:通过。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题与根因
本 PR 现在包含两组相互独立的管理器修复。
修改内容
管理器窗口
正常会话删除
历史已删除会话清理
备份与撤销
用户影响
验证
严格 Clippy 仍会被 markdown、provider_sync 和 storage 中 14 个既有警告阻断;本次新增 historical_cleanup 模块没有剩余 Clippy 报错。