fix: 稳定运行中任务的优先级排序 - #3314
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 846f69117c
ℹ️ 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".
|
| Filename | Overview |
|---|---|
| apps/desktop/src/renderer/hooks/useSessionRunningStatus.ts | 完成 debounce 现在基于最新活动会话、运行状态、终止错误和等待处理状态结算,并在用户进入会话时取消过期 done。 |
| apps/desktop/src/renderer/features/cc-agent/lib/mainListModel.ts | Desktop 查看态 hold 在任务进入新一轮运行时降至 running 档,避免旧未读状态重新抬升任务。 |
| apps/mobile/src/session/homeListPriority.ts | Mobile 使用相同的运行态优先规则,并支持详情页打开期间持续推进当前任务的查看态 hold。 |
| apps/mobile/app/devices/index.tsx | 首页在留存于导航栈期间响应任务状态变化并按需刷新优先级排序。 |
| packages/maker-shared/src/liveTaskPriority.ts | 共享优先级规则明确为 waiting、纯 unread、running、rest,运行状态覆盖同任务的旧完成未读。 |
| apps/desktop/src/renderer/tests/useSessionRunningStatusSilence.test.ts | 回归测试覆盖 debounce 内查看、重新运行、终止错误和 starting 交错场景。 |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[任务上一轮结束] --> B[启动 500ms done debounce]
B --> C{期间进入会话?}
C -- 是 --> D[取消 pending done]
C -- 否 --> E{到期时仍运行或存在错误/等待处理?}
E -- 是 --> F[不写入旧 done]
E -- 否 --> G[写入 done attention 并按所有权触发通知]
H[新一轮进入 running] --> I[释放旧 unread / waiting hold]
I --> J[按 running 档参与排序]
Reviews (10): Last reviewed commit: "fix(desktop): preserve completion across..." | Re-trigger Greptile
MagicLizi
left a comment
There was a problem hiding this comment.
按维护者指示批准;合并仍需通过 review-pr 的代码审查与其余安全门。
|
命中 UI 路径(mainListModel / useSessionRunningStatus / mobile devices)但 description 未附界面效果证据——建议补充改动后效果:截图/录屏,或改动后界面的 HTML 页面,便于确认界面符合 DESIGN.md 设计规范。本条不阻断合并。 |
MagicLizi
left a comment
There was a problem hiding this comment.
必须修改
P1×1。debounce 到期只看「此刻是否仍选中」,丢掉了「完成当时已经在看」的门闩,会在 500ms 内切走时给刚看完的任务补橙点并抬进 unread。
|
@dashhuang 👋 这个 PR 还有 1 条 review conversation 没 resolve(apps/desktop/src/renderer/hooks/useSessionRunningStatus.ts),auto-review 因此暂时跳过、没法继续审查 / 合并。 如果你已经按评论改完或回应了,请到对应 thread 上点 Resolve conversation;全部 resolve 后,下一轮 auto-review 会自动重新审查这个 PR。 |
这些问题已在当前 head 的后续 commit 中修复(格式门/安全门已通过),自动 dismiss 旧的 CHANGES_REQUESTED 以解除合并阻塞。
3687a8b to
d7de6bc
Compare
d7de6bc to
1f09db7
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1f09db76dd
ℹ️ 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".
|
@dashhuang 👋 这个 PR 还有 2 条 review conversation 没 resolve(apps/desktop/src/renderer/hooks/useSessionRunningStatus.ts),auto-review 因此暂时跳过、没法继续审查 / 合并。 如果你已经按评论改完或回应了,请到对应 thread 上点 Resolve conversation;全部 resolve 后,下一轮 auto-review 会自动重新审查这个 PR。 |
1f09db7 to
f6fd4a5
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f6fd4a5e9e
ℹ️ 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".
|
收敛检查点(运行中任务排序)
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bbef0a4248
ℹ️ 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".
bbef0a4 to
e931077
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e931077653
ℹ️ 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".
|
@dashhuang 👋 这个 PR 还有 2 条 review conversation 没 resolve(apps/desktop/src/renderer/lib/makerChatStore.ts / apps/desktop/src/renderer/lib/sessionStartingStore.ts),auto-review 因此暂时跳过、没法继续审查 / 合并。 如果你已经按评论改完或回应了,请到对应 thread 上点 Resolve conversation;全部 resolve 后,下一轮 auto-review 会自动重新审查这个 PR。 |
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
e931077 to
4438d52
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4438d52cf8
ℹ️ 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".
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
这次改了什么
摘要
修复多个任务都在运行时,用户点击或切换任务会改变它们相对排序的问题。
starting只负责视觉运行态,不再吞掉上一轮完成提示,真正进入 running 仍会取消旧 timer。用户在窗口内点进任务会直接取消待落地 done,避免切走后补回过期未读。变更类型
feat新功能fix缺陷修复refactor/perf重构或性能优化docs/test/chore文档、测试或工程维护范围
UI 变化
无新增组件、样式、布局或文案,也没有可供截图对比的静态视觉变化;交互变化仅为消除运行中任务切换时的无意义列表跳动。
docs/design-rules/DESIGN.md§1 Visual Theme & Atmosphere(保持工作界面安静、克制,只让有意义的状态变化吸引注意);本次不新增视觉元素,仅让排序变化与真实任务状态一致。怎么验证的
自动验证
手工验证
不涉及:未启动 Desktop 或 Mobile 实机/模拟器进行交互验证。
未执行的验证
startupSplashOverlay.test.ts5 秒时限阻塞;当前 PR 新一轮 GitHub CI 正在运行。风险
风险分类
影响与回滚
提交前检查
git commit -s,见 DCO)