修复:任务列表改用差量协调 - #92
Open
amazing-fish wants to merge 2 commits into
Open
Conversation
This was referenced Aug 14, 2026
amazing-fish
marked this pull request as ready for review
August 14, 2026 09:08
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6679b78ac1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Comment on lines
+965
to
+966
| if len(target_ids) != len(set(target_ids)): | ||
| raise RuntimeError("筛选和排序结果中存在重复任务 ID") |
There was a problem hiding this comment.
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.
变更概述
task_id -> QListWidgetItem / TodoItemWidget映射,update_list_widget()改为差量协调目标集合和顺序。TodoItemWidget.update_todo()只在正文、优先级、完成态或计时呈现实际变化时写入 Qt 控件。QListWidget.clear();仅映射异常恢复路径保留完整重建。根因与影响
此前每次用户操作都会销毁并重建全部卡片,导致未变化任务重复创建控件、图标、详情浮层和信号连接。现在每次操作只承担目标卡片和必要排序位置的成本,同时保持同步
save_todos()、筛选排序、提醒及空列表占位语义。验证
python -m compileall -q todo_app testsgit diff --checkRan 86 tests in 2.172s — OKDeferredDelete,原QListWidgetItem/TodoItemWidget仍有效。libEGL.so.1,无法在本机启动 PySide6 GUI 用例;远端 CI 已覆盖完整 GUI 自动化测试。Closes #91
Relates #82