Skip to content

feat(desktop): add archived task scope entry - #3294

Open
nothingyuancando wants to merge 7 commits into
makecindy:mainfrom
nothingyuancando:feat/3214-archived-task-entry
Open

feat(desktop): add archived task scope entry#3294
nothingyuancando wants to merge 7 commits into
makecindy:mainfrom
nothingyuancando:feat/3214-archived-task-entry

Conversation

@nothingyuancando

@nothingyuancando nothingyuancando commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

这次改了什么

在“全部任务”范围菜单中新增一级“已归档任务”入口,复用现有 useSidebarFiltersetStatus('archived');进入归档视图后,段头持续显示归档状态,菜单项显示选中态。五种桌面语言均已补齐。

关联 Issue:#3214
明确不包含:新的归档数据模型、IPC、查询接口或第二套筛选状态。

UI 变化

  • 引用的设计规范:docs/design-rules/DESIGN.md §1 Visual Theme & Atmosphere、§2 Color Palette & Roles、§4 Component Stylings;复用现有菜单结构、语义主题 token、图标与选中态,不新增装饰性视觉层。
  • 用户可见变化:范围菜单一级可直接进入“已归档任务”,段头显示当前归档状态。

怎么验证的

自动验证

  • node scripts/check-i18n.mjs:通过(仅仓库既有警告)。
  • node scripts/check-i18n-glossary.mjs:通过(仅仓库既有 proposed 术语警告)。
  • git diff --check:通过。
  • pnpm test:unit:related:已启动,但新 worktree 缺少完整 workspace 依赖,Desktop 测试收集阶段因缺失 @cindy/maker-shared/*@cindy/voice-input-core 等内部包失败;未出现本次改动断言失败。

手工验证

未执行:当前环境没有可运行的 Desktop 实例;交互由现有 Radix 菜单和筛选状态路径承载。

风险

风险分类

  • 无已知风险

影响与回滚

影响范围:Desktop 侧栏归档入口与本地化文案。回滚方式:撤销本 PR commit;不涉及数据迁移、协议、权限或跨平台原生行为。

提交前检查

  • 每个 commit 带 DCO 签名
  • UI 变化已注明设计规范章节
  • 未提交凭证、令牌或授权文件

改动后界面效果证据

以下 HTML 反映改动后的实际结构与状态(对应 MachineSwitcherMenu / MainListScopeHeader;颜色由现有主题 token 提供):

<aside class="sidebar">
  <button type="button" aria-label="任务范围: 全部任务">
    <span>全部任务</span><span aria-hidden="true"></span>
  </button>
  <div role="menu">
    <div role="menuitemcheckbox" aria-checked="true">
      <span aria-hidden="true"></span><span>已归档任务</span><span aria-hidden="true"></span>
    </div>
    <div role="menuitem">远程连接设置</div>
    <div role="menuitem">侧边栏显示设置</div>
  </div>

  <button type="button" aria-label="任务范围: 全部任务, 已归档任务">
    <span>全部任务</span>
    <span aria-hidden="true"></span><span>已归档任务</span>
    <span aria-hidden="true"></span>
  </button>
</aside>

验收重点:归档入口位于范围菜单一级;归档状态在段头持续可见;选中态同时由勾选图标和 aria-checked 表达;菜单继续复用现有 Radix 结构、间距和主题 token,无新增装饰层。

Signed-off-by: nothingyuancando <1579035512@qq.com>
@greptile-apps

greptile-apps Bot commented Aug 23, 2026

Copy link
Copy Markdown

Greptile Summary

本 PR 在桌面端任务范围菜单中新增“已归档任务”一级入口,复用现有侧栏筛选状态,并在段头持续展示当前归档范围。

  • 将同一 filter 状态传入范围菜单,选择入口后设置 archived 状态并保持会话列表可见。
  • 为归档入口和段头状态补充图标、选中语义及无障碍名称。
  • 补齐五种桌面语言的归档任务文案,并增加对应源码结构测试。

Confidence Score: 5/5

当前变更看起来可以安全合并。

未发现仍然存在的阻塞性故障。

Important Files Changed

Filename Overview
apps/desktop/src/renderer/features/cc-agent/sidebar/MachineSwitcherMenu.tsx 新增归档范围入口,将归档筛选同步到菜单选中语义、段头文本和无障碍名称。
apps/desktop/src/renderer/features/cc-agent/sidebar/MainListScopeHeader.tsx 将现有侧栏 filter 传给 MachineSwitcherMenu,使入口与列表消费同一状态。
apps/desktop/src/renderer/tests/machineSwitcherMenu.test.ts 更新静态结构断言,并覆盖归档段头名称及 menuitem/aria-current 语义。
apps/desktop/src/renderer/i18n/locales/en/common.json 新增英文归档任务文案;其余四种桌面语言同步补齐对应键值。

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
    U[用户打开任务范围菜单] --> A[选择已归档任务]
    A --> F[setStatus archived]
    F --> L[会话列表按归档状态过滤]
    F --> H[段头显示归档状态]
    H --> M[菜单项通过 aria-current 表示当前范围]
Loading

Reviews (7): Last reviewed commit: "fix(desktop): expose archived scope as c..." | Re-trigger Greptile

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 443c0b949f

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Signed-off-by: nothingyuancando <1579035512@qq.com>
@nothingyuancando

Copy link
Copy Markdown
Contributor Author

已修复 CI 契约失败并推送 commit 879f95c69:更新 machineSwitcherMenu.test.ts 以校验 filter={filter} prop,并允许归档状态标识位于标题与下拉箭头之间。定向测试 36/36 通过。

@MagicLizi

Copy link
Copy Markdown
Contributor

@nothingyuancando 👋 这个 PR 还有 1 条 review conversation 没 resolve(apps/desktop/src/renderer/features/cc-agent/sidebar/MainListScopeHeader.tsx),auto-review 因此暂时跳过、没法继续审查 / 合并。

如果你已经按评论改完或回应了,请到对应 thread 上点 Resolve conversation;全部 resolve 后,下一轮 auto-review 会自动重新审查这个 PR。

@MagicLizi MagicLizi added the touches:product-ui 改动碰到产品 / UI 面(review-pr 自动维护,仅展示) label Aug 23, 2026
@MagicLizi

Copy link
Copy Markdown
Contributor

这个 PR 改了用户看得见的侧栏范围菜单(新增「已归档任务」入口和选中态),已提交维护者确认,讨论见 #3297

请维护者直接在本 PR 上 Approve;若要改,请 Request Changes。作者这边先不用再推代码等确认结果。

@MagicLizi MagicLizi added the awaiting-discussion 等待维护者讨论(review-pr) label Aug 23, 2026
@MagicLizi

Copy link
Copy Markdown
Contributor

命中 UI 路径(apps/desktop/src/renderer/features/cc-agent/sidebar/MachineSwitcherMenu.tsx / apps/desktop/src/renderer/features/cc-agent/sidebar/MainListScopeHeader.tsx)但 description 未附界面效果证据——建议补充改动后效果:截图/录屏,或改动后界面的 HTML 页面(```html 代码块、.html 附件或在线预览链接),便于确认界面符合 DESIGN.md 设计规范

@nothingyuancando

Copy link
Copy Markdown
Contributor Author

已处理并推送:

  • 修正 packages/device-link/src/__tests__/client.test.ts 的 Windows 时序断言。确认等待期间产生的业务 ACK 也会携带当前 linkRequestId,因此合法上界是确认重试上限加本测试中的 1 个业务 ACK;不再误报 4 > 3
  • 已将 MainListScopeHeader.tsx 相关 review conversation 标记为 resolved。
  • commit: 68ff76394

本地环境缺少完整 workspace 内部包,无法运行该 worktree 的 device-link 测试;失败日志已按 Windows CI 的真实失败断言修正。请 CI 重新运行。

Signed-off-by: nothingyuancando <1579035512@qq.com>
@nothingyuancando
nothingyuancando force-pushed the feat/3214-archived-task-entry branch from 68ff763 to 991ae51 Compare August 23, 2026 12:12

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 991ae51e4a

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Signed-off-by: nothingyuancando <1579035512@qq.com>
@nothingyuancando

Copy link
Copy Markdown
Contributor Author

已处理最新 P2 review:归档范围现在同步加入 MachineSwitcherMenu 按钮的 aria-label,读屏会明确读出“已归档任务”;新增对应契约测试。

commit: 465b5de8a,review thread 已 resolve。

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 465b5de8a3

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Signed-off-by: nothingyuancando <1579035512@qq.com>
@nothingyuancando

Copy link
Copy Markdown
Contributor Author

已处理新 P2 无障碍 review:归档菜单项现在使用 role="menuitemcheckbox"aria-checked 暴露当前是否选中,并补充契约测试。commit: f6af9e681,thread 已 resolve。

@nothingyuancando

Copy link
Copy Markdown
Contributor Author

已按 UI review 建议更新 PR description,新增“改动后界面效果证据”HTML 代码块,覆盖范围按钮、一级归档菜单项、选中态、aria-label/aria-checked,以及远程设置入口,便于按 DESIGN.md 核对。

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c6075aed08

ℹ️ 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-discussion 等待维护者讨论(review-pr) touches:product-ui 改动碰到产品 / UI 面(review-pr 自动维护,仅展示)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants