Skip to content

refactor(desktop): move remaining error feedback onto the channel rules #5798

Open

Description

@Colafornia
English

Part of #TBD-tracker. Starts after C1 (#TBD) lands the rule table.

Problem

After C1, the transcript follows the error feedback rules, but the rest of the Desktop app does not. Outside the transcript, Banner is used in about 50 files, hand-written role="alert" in 21 files, and toast.error at 154 call sites. Many of these pick a channel that the C1 table assigns to a different kind of failure.

Desired outcome

Every error feedback site in the Desktop renderer uses the channel the C1 table names. Hand-written alerts are replaced by the Astryx component for that channel.

Scope

One PR per group:

  • Toast audit: classify all 154 toast.error call sites. Keep the ones that match the table, and move the rest.
  • Composer and WorkHub: chat-composer-region.tsx, workhub-dock.tsx, workhub-root.tsx, attachment rejection.
  • Settings: provider, bot, runtime host, permission, data, and web search pages. Coordinate with the page rebuilds in tracking(desktop): align shell chrome and settings with Astryx and DESIGN.md #4679.
  • Panels and dialogs: plan mode, agent graph, work board, session inspector, artifact preview, runtime host dialogs.
  • Remaining hand-written role="alert" sites.

Acceptance criteria

  • Each PR lists every changed site with its old and new channel.
  • No hand-written role="alert" remains where an Astryx component covers the case, or the PR explains why one stays.
  • Each touched surface has a story for its failure state, with a // Real path: comment.
  • Existing e2e coverage for failure feedback, such as expected-failure-feedback.spec.ts, keeps passing.
中文

属于 #TBD-tracker。在 C1(#TBD)合并规则表之后开始。

问题

C1 完成后,对话流遵循了错误提示规则,但桌面端其余部分还没有。对话流之外,约 50 个文件使用 Banner,21 个文件使用手写的 role="alert",toast.error 有 154 处调用。其中很多选择的渠道,在 C1 规则表中属于另一类失败。

期望结果

桌面端渲染层中每一处错误提示都使用 C1 规则表规定的渠道。手写的提示被该渠道对应的 Astryx 组件取代。

范围

每组一个 PR:

  • 提示审计:对全部 154 处 toast.error 调用分类。符合规则表的保留,其余迁移。
  • 输入框和工作台:chat-composer-region.tsx、workhub-dock.tsx、workhub-root.tsx、附件拒收。
  • 设置页:服务商、机器人、运行时主机、权限、数据和网页搜索页面。与 tracking(desktop): align shell chrome and settings with Astryx and DESIGN.md #4679 中的页面重建协同。
  • 面板和对话框:计划模式、智能体图、工作看板、会话检查器、产物预览、运行时主机对话框。
  • 其余手写 role="alert" 的位置。

验收标准

  • 每个 PR 逐条列出修改的位置及其原渠道和新渠道。
  • 凡是 Astryx 组件能覆盖的情况,不再保留手写的 role="alert";如需保留,PR 说明原因。
  • 每个改动的界面都有展示其失败状态的故事,并带 // Real path: 注释。
  • 现有的失败提示端到端测试(如 expected-failure-feedback.spec.ts)保持通过。

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions