fix(app): show one readable brief for attention requests - #5330
Conversation
Signed-off-by: huangruiteng <14976749+huangruiteng@users.noreply.github.com>
Signed-off-by: huangruiteng <14976749+huangruiteng@users.noreply.github.com>
huangruiteng
left a comment
There was a problem hiding this comment.
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
审阅完整 base 649826221289cd4cb3dd8880d016e0afbbaca0fc → head 6bf0c732e0864cdf4bb6a83fd1e42c8e2e75eab5。No blocking finding. 这是可独立交付的阅读体验改进,不能据此宣称完整 GQ10 或已安装 App 验收完成。
动机
普通任务是打开一条“需要你决定”的事项,读懂对象、原因和证据,再进入已有操作预览。主干把摘要与详情重复显示,正文中的 Markdown 原样露出,技术标识占据主要阅读空间。同一公开请求的打包对照复现了这个问题;改动直接改善这条现有路径,无须用户重新描述对象。
改动思路
最强的反对理由是:如果只是美化卡片,却让用户误认为已授权、隐藏失效来源或增加确认步骤,就不值得合入。这里复用既有安全 Markdown 和共享 drawer,删除重复摘要卡,把标识放进可选折叠区;没有另建管家专用状态、能力或执行入口。正文、原因、证据和当前 Goal 同处一个界面,已有新预览与只读、失效、被替代来源约束仍然有效。仅改字号不能同时解决重复内容、原始标记和键盘折叠区问题。
具体改动
关键代码讲解
AttentionDetailCard:5 消费既有WorkspaceAttention。完整requestText始终显示;缺正文时明确称为“现有摘要”。原因和证据复用安全渲染器,生命周期仍来自类型化 details。标识折叠不改变请求身份,替代事项仍经已有同来源、同 Goal 的 successor 选择。ContextDrawer键盘处理 :247 纳入原生summary,只循环可见控件;关闭的菜单内容不能截走焦点。Escape 与原入口焦点恢复沿用已有 owner。attention 分支删除另一张摘要卡,Goal 标签仍在 drawer header。previewDecision:336 本次未改:先检查只读和生命周期,再将选中 Goal/Todo 送往gate.resolve的新预览。浏览器验证请求只发出一次准确作用域的 preview,没有 apply;展开、刷新和替代导航没有额外决定。MarkdownText:127 本次未改,直接构造 React 节点。正文 HTML 保持惰性文本,脚本链接不变成可点击链接;没有新增 HTML 注入或第二套解析规则。
全量 diff 为 7 文件、+137/-54:产品 4 文件,既有浏览器验证 1 文件,中英文 RFC 2 文件。已应用相邻简化:删除重复卡和无调用翻译,扩展已有 smoke,未保留另一套临时场景。RFC 同时说明已验证的打包展示边界和仍未完成的跨目标排序、最多两项建议、真实采用;无需新建平行路线。
对主干的风险
风险集中在共享 drawer 的焦点循环、长正文可读性和来源失效后的操作可达性。打包桌面中文、390px 英文及只读来源验证通过;另覆盖完整末尾文本、证据链接、折叠区、Escape 返回、离线、缺失、被替代事项和摘要来源,以及不可执行的 HTML/脚本链接。源 build/完整性、共享 contract/SSR 和隔离真实 native typed action/HTTP 验证通过。相同 fixture 的主干打包版有两张卡并被回归断言拒绝,本 head 为一张。
最终本地 premerge 13 项选定检查及 3 项 diff hygiene 全通过,无失败、跳过或 manual hold。最初 vocabulary 检查缺 root npm 依赖,修复安装环境后原检查通过;没有修改预算或降低门槛。已有大 bundle 警告保留。未查询或等待远端 CI;结论依据当前 capability 要求的本地证据。精确范围质量回执 cqr_90c42a82ebb6825b5b8e 有效。
残余风险与最强缺失验证:尚无原生已安装 WebView 的读回,也未验证真实组合排序和接收方采用。浏览器 preview 服务为 fixture,不能证明决定实际生效;独立 native action smoke 只证明原有操作 owner。这些限制不影响本次明确的打包展示切片,完整 GQ10 仍留在现有 P1 工作。CLI/Lark 协议、持久状态、权限和排程未改变,首屏入口未变。回退本 PR 即恢复旧展示,不涉及状态迁移。
我的整体评价
批准这项有界增量:用户在现有入口即可读到一份完整事项说明,并沿原有预览继续,不增加找对象、补背景或确认负担。通用 TS 展示归属清楚,规则和效果 owner 没有复制。产品运行面仍须维护者合并;本 review 不代表自合并授权、已安装交付或父目标结算。
English verdict: APPROVE — reviewed exact head 6bf0c732e0864cdf4bb6a83fd1e42c8e2e75eab5; no blocking finding. The shared packaged drawer improves a real request-reading path while retaining existing preview/source fences. Required local checks pass; installed WebView and full portfolio prioritization/adoption remain unqualified. Leave the product change for maintainer merge.
|
This pull request has merge conflicts with Choose the remote for the base repository, not an out-of-date fork. git fetch upstream
git rebase upstream/main
# Resolve each conflict, git add the resolved files, then git rebase --continue.
git push --force-with-lease origin HEADFor a same-repository clone whose Keep the DCO |
cocolord
left a comment
There was a problem hiding this comment.
评审提交:6bf0c732e0864cdf4bb6a83fd1e42c8e2e75eab5。这是 whole-PR、exact-head 评审。我完整检查了 7 个变更文件、现有 Markdown/attention lifecycle/preview owner、正负浏览器路径、远端 checks,以及与最新 main 的真实三方合并结果。功能实现本身是正向且验证充分的;当前唯一 blocker 是两份规范文档尚未整合主干新增契约。
动机
这个 PR 要解决的是一个真实而具体的用户问题:打开“需要你处理”的事项后,现有 drawer 会重复显示摘要,Markdown 仍是字面文本,Todo/Agent 等技术标识与真正需要判断的正文、原因和证据争夺注意力。对操作者而言,这会延长理解路径,也容易让人依据列表标签而不是完整请求做决定。当前实现把正文、原因/建议和证据放在一张可读 brief 中,把标识和声明范围收进键盘可达的 diagnostics,并在只有摘要时明确标注,符合“先看懂再决定”的目标。
从长期维护看,这也是净改进:它删除重复展示结构,复用现有 typed attention、Markdown renderer 和 decision-preview owner,没有新增状态机、存储或权限来源。exact-head 的 development 与 packaged Chromium 场景均通过,实际用户路径从重复且难读变为一份完整、窄屏可读的说明。
改动思路
入口仍是 Personal Workspace 的 attention selection;ContextDrawer 只把现有 WorkspaceAttention 交给新的 AttentionDetailCard。这个组件负责展示 lifecycle、priority、age、完整 request、reason、evidence、successor 和折叠后的 ids;Markdown 继续由既有 MarkdownText 直接构造 React node,原始 HTML 保持 inert,只有 http/https 链接可点击。
权限边界没有移动:canReviewAttention 与 readOnly 仍决定是否显示操作,previewDecision 仍以精确 goal_id/todo_id 创建既有 gate.resolve preview,阅读、展开 diagnostics、刷新和跳转 replacement 都不产生写入。正向路径验证完整请求只产生一次显式 preview;负向路径验证 read-only、offline、missing、superseded、summary-only 和恶意 HTML 都不能绕过既有约束。summary 被纳入 focus trap,同时用 checkVisibility 排除关闭 disclosure 内的后代,保留 Escape 返回来源焦点。
具体改动
阻塞问题
- [P1] 请先把两份双语 RFC 与最新主干有意识地合并。 当前 head 的 base 是
6498262,最新main是3ec049e,中间已有 31 个提交。GitHub 返回mergeable=CONFLICTING/mergeStateStatus=DIRTY;git merge-tree精确报告docs/architecture/rfcs/app-conversation-and-async-inbox-v0.md与docs/architecture/rfcs/app-conversation-and-async-inbox-v0.zh-CN.md两个 content conflict。这个 PR 在同一产品表达区域加入 readable-attention 与 packaged decision-detail 契约,而主干已加入 activity/waiting 和 pending-receipt recovery 契约。不能简单选择 ours/theirs:一边会丢本 PR 已验证的“完整请求/原因/证据、摘要明确标注、Markdown 不授予权限”,另一边会丢主干新的等待可见性与恢复语义,还可能造成中英文不一致。请 rebase/merge 最新 main,在两种语言中保留双方内容,发布新 head 后重跑 build、两种 attention browser smoke 和 required checks。
关键代码讲解
AttentionDetailCard是唯一的新展示 owner:优先展示完整请求、原因与证据,缺正文时明确显示 summary-only;successor 只负责选择替代事项,标识默认折叠。它不决定权限,也不产生 preview。ContextDrawer的 attention 分支删除旧的重复 cards,仍用canReviewAttention与readOnly控制操作。previewDecision保持精确 Goal/Todo payload,只创建 review preview,不 apply。- focus trap 新增原生
summary,并过滤不可见 descendants,因此 diagnostics 可用键盘打开,关闭的 more/details 不会把 Tab 困在隐藏控件中,Escape 仍返回原 request。 MarkdownText没有被复制或放宽:它继续直接输出 React nodes,不使用dangerouslySetInnerHTML,raw HTML 与javascript:链接不会执行。dashboard-attention-details-browser-smoke.mjs把验证扩到中/英文、desktop/narrow、read-only、overflow、Markdown、focus、唯一 preview、offline/missing/superseded/summary-only 与零额外写入,是与产品边界匹配的 durable smoke。
对主干的风险
UI 实现的风险闭合得比较好。我从 committed lockfile 在 exact-head 临时 worktree 安装依赖,npm run build:chat 通过;development 与 packaged 两条 Chromium smoke 都输出 ok。它们验证一张 detail card、safe link、raw HTML inert、窄屏无横向溢出、diagnostics 键盘行为、read-only 零写入、失效/缺失事项无 action、superseded replacement、summary-only 文案,以及唯一且精确的 gate.resolve preview。没有发现 substring state classifier、第二套权限 owner、静默 default change 或把机器义务称为 guidance;通用生产文案保持 domain-neutral,release-review 文本只存在于合成 fixture。
远端当前重跑中,DCO、dependency review、desktop、chat bundle、dashboard acceptance、TypeScript core 和多数 Python lanes 均通过。Frontstage 的 release-baseline marker,以及两个 Python generation/hook failure,与此前主干/基线签名一致,也不执行这 7 个 attention 文件;我没有把它们伪装成本 PR 的产品 blocker。真正阻塞是尚不存在可验证的 combined tree:exact-head smoke 全绿不能证明人工冲突解决后仍同时保留主干 activity/recovery 和本 PR readable-detail 契约。
语义与 CI 对齐
本 PR 复用现有 WorkspaceAttention、canReviewAttention、MarkdownText 和 gate.resolve 词汇。readOnly、lifecycle、exact Todo identity 与 preview-only 是机器强制;reason/recommendation/boundary 是说明性 guidance。行为变化已在双语 RFC、i18n 和 browser smoke 中披露,且没有新 schema、CLI、capability 或 migration。语义本身 aligned,但 RFC 冲突必须在新 exact head 同步解决,之后用 clean merge-tree、npm run build:chat、development/packaged attention smoke 和 required checks 重新闭环。
我的整体评价
结论是 REQUEST_CHANGES。从产品收益、代码边界和测试深度看,这个改动值得合入:一份可读 brief 明显改善决策体验,组件拆分很小,正负路径覆盖也比普通 UI PR 扎实;future-facing pass 已通过复用现有 owner 完成,不需要再扩抽象。我的拒绝不是因为功能实现或已知旧基线 CI,而是当前提交确实无法与最新主干合并,且冲突位于承载双方新语义的双语 canonical RFC。
请在新 head 中有意识地保留两边契约并重跑上述验证。只要 combined tree 干净、双语一致、targeted browser/build 与 required checks 闭合,我会按新 exact head 重新评审;本次 review 不授权 merge,也不要求扩大产品范围。
English verdict: REQUEST_CHANGES on exact head 6bf0c732e0864cdf4bb6a83fd1e42c8e2e75eab5. The readable-attention implementation is a well-scoped improvement: development and packaged Chromium validation pass across Markdown safety, narrow/read-only states, keyboard focus, lifecycle failures, replacement navigation, and exactly one preview. The sole blocker is integration: GitHub and git merge-tree report content conflicts in both canonical App conversation RFCs, where this PR's readable-decision contract overlaps newer main activity/waiting and pending-receipt recovery contracts. Rebase or merge current main, preserve both bilingual contract sets, rerun the targeted build/browser checks and required CI, and submit the new exact head for review.
Signed-off-by: huangruiteng <huangrt01@163.com>
huangruiteng
left a comment
There was a problem hiding this comment.
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
Exact reviewed head: e5692ed48373f85f57c81d9a0505c758325409ec; integrated base: 7e60e69999d9dd00c6d19a93221982a2f1f736b1.
动机
评审的是整个 PR,而不是只检查冲突。用户打开“需要你处理”的事项,应直接读懂完整请求、原因和证据,再决定是否预览操作。当前主干把摘要与详情分成两张卡,Markdown 字面显示,技术标识抢占阅读空间。本 PR 在原入口提供一份可读说明,属于 App 体验的有界增量,不能代表完整的跨项目优先级判断已交付。
改动思路
最小方案是复用原有 WorkspaceAttention、MarkdownText 和决定预览 owner,而非新增报告或权限层。本实现保持这个边界。AttentionDetailCard 只展示事实与来源;ContextDrawer 仍检查只读、生命周期和精确 Goal/Todo。阅读、展开诊断、刷新、打开替代事项都不授权执行。模型解释、组合排序和接收方采用仍由原路线负责。
具体改动
整合最新主干后,两份 canonical RFC 同时保留本 PR 的 readable-decision 契约与主干的等待/活动、pending-receipt recovery 契约,已解决此前评审的唯一冲突 blocker。四个产品文件负责一张 Markdown brief、状态/优先级/等待年龄、折叠标识、窄屏布局和中英文文案;删除重复摘要卡及无调用翻译。焦点循环纳入原生 summary,并通过 checkVisibility 排除关闭 disclosure 的后代。既有浏览器 smoke 扩展正文末尾、证据、只读、来源失效和 HTML 安全验收,没有新建临时测试框架。检查了整个七文件 diff 和未修改的 previewDecision/MarkdownText 调用链。
对主干的风险
主要风险是共享 drawer 焦点与长正文可达性、来源失效后的错误操作。当前精确提交的 TypeScript/打包 build、真实 Chromium 打包场景及隔离 native typed action/HTTP 验证通过。相同请求在不可变 main 打包版因两张卡失败,当前 head 一张通过;桌面中文、390px 英文和只读场景覆盖安全链接、完整正文、Escape 返回、唯一正确作用域 preview、零 apply,离线/缺失/被替代/摘要来源保持可辨认。浏览器 API fixture 不证明实际决定已应用,独立 native smoke 验证既有 action owner;不宣称原生安装或完整 GQ10 验收。
最终 risk-based premerge 全部通过,质量回执绑定当前范围。无未处理失败、跳过必需检查或 manual hold;未查询或等待远端 CI。公开边界扫描与 DCO 通过。相邻简化已应用在重复卡和焦点归属,未扩大抽象或增加兼容层。
我的整体评价
APPROVE:此前文档冲突已修复,组合后的主干与本 PR 契约保持一致,整个用户阅读/预览路径已重新验证。按所有者明确授权完成本次合并;这份评审只批准当前提交的展示增量,不把展示成功等同于决策采用、跨项目排序或父目标完成。
English verdict: APPROVE - exact head e5692ed48373f85f57c81d9a0505c758325409ec; integration blockers resolved and affected native/packaged invariants plus risk-based premerge pass. Owner-authorized merge; broader adoption and installed delivery are separate readbacks.
Signed-off-by: huangruiteng <huangrt01@163.com>
huangruiteng
left a comment
There was a problem hiding this comment.
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
Exact reviewed head: a380e4df1ad12de0fed3a29e7ebf0c393a328e1c; integrated base: fd5f31bb3ad57448c32df6c7cddde36d07446934.
动机
评审的是整个 PR,而不是只检查冲突。用户打开“需要你处理”的事项,应直接读懂完整请求、原因和证据,再决定是否预览操作。当前主干把摘要与详情分成两张卡,Markdown 字面显示,技术标识抢占阅读空间。本 PR 在原入口提供一份可读说明,属于 App 体验的有界增量,不能代表完整的跨项目优先级判断已交付。
改动思路
最小方案是复用原有 WorkspaceAttention、MarkdownText 和决定预览 owner,而非新增报告或权限层。本实现保持这个边界。AttentionDetailCard 只展示事实与来源;ContextDrawer 仍检查只读、生命周期和精确 Goal/Todo。阅读、展开诊断、刷新、打开替代事项都不授权执行。模型解释、组合排序和接收方采用仍由原路线负责。
具体改动
关键代码讲解
整合最新主干后,两份 canonical RFC 同时保留本 PR 的 readable-decision 契约与主干的等待/活动、pending-receipt recovery 契约,已解决此前评审的唯一冲突 blocker。四个产品文件负责一张 Markdown brief、状态/优先级/等待年龄、折叠标识、窄屏布局和中英文文案;删除重复摘要卡及无调用翻译。焦点循环纳入原生 summary,并通过 checkVisibility 排除关闭 disclosure 的后代。既有浏览器 smoke 扩展正文末尾、证据、只读、来源失效和 HTML 安全验收,没有新建临时测试框架。检查了整个七文件 diff 和未修改的 previewDecision/MarkdownText 调用链。
对主干的风险
语义与 CI 对齐
主要风险是共享 drawer 焦点与长正文可达性、来源失效后的错误操作。当前精确提交的 TypeScript/打包 build、真实 Chromium 打包场景及隔离 native typed action/HTTP 验证通过。相同请求在不可变 main 打包版因两张卡失败,当前 head 一张通过;桌面中文、390px 英文和只读场景覆盖安全链接、完整正文、Escape 返回、唯一正确作用域 preview、零 apply,离线/缺失/被替代/摘要来源保持可辨认。浏览器 API fixture 不证明实际决定已应用,独立 native smoke 验证既有 action owner;不宣称原生安装或完整 GQ10 验收。
最终 risk-based premerge 全部通过,质量回执绑定当前范围。无未处理失败、跳过必需检查或 manual hold;未查询或等待远端 CI。公开边界扫描与 DCO 通过。相邻简化已应用在重复卡和焦点归属,未扩大抽象或增加兼容层。
我的整体评价
APPROVE:此前文档冲突已修复,组合后的主干与本 PR 契约保持一致,整个用户阅读/预览路径已重新验证。按所有者明确授权完成本次合并;这份评审只批准当前提交的展示增量,不把展示成功等同于决策采用、跨项目排序或父目标完成。
No blocking finding. Residual risk: browser provider fixtures do not certify model intent quality; installed readback follows merge.
English verdict: APPROVE - exact head a380e4df1ad12de0fed3a29e7ebf0c393a328e1c; integration blockers resolved and affected native/packaged invariants plus risk-based premerge pass. Owner-authorized merge; broader adoption and installed delivery are separate readbacks.
Goal and delivered outcome
Opening an existing “needs you” request currently repeats its summary, leaves Markdown literal, and gives technical identifiers as much space as the decision. This implements the readable-decisions acceptance in the existing shared App drawer.
Before: open the request, reconcile two cards and raw text, then find its evidence and action. After: the same entry opens one readable brief with the full request, recommendation/reason and clickable evidence; diagnostics are optional. The existing fresh preview still targets the selected Goal/Todo. No extra navigation, facts to repeat or approval steps were added.
Scope and continuation
AttentionDetailCard/ContextDrawer, bilingual copy and existing design tokens. Steward and Goal use the same presentation; no manager-specific state owner, new provider or permission contract.Validation
Tested head:
6bf0c732e0864cdf4bb6a83fd1e42c8e2e75eab5; base:649826221289cd4cb3dd8880d016e0afbbaca0fc. Inputs: synthetic/public fixtures; run state: finished.scripts/chat_bundle.py verify --sourcepassed at this head. Existing large-bundle warning retained.npm run smoke:attention-detailsand the personal-workspace contract test passed.LOOPX_ATTENTION_DETAILS_PACKAGED=1 node examples/dashboard-attention-details-browser-smoke.mjspassed: desktop Chinese, 390px English, read-only; Markdown/full body/link; disclosure and return focus; exactly one correctly scoped preview; unavailable/missing/superseded sources; explicit summary-only content; inert HTML/script links. No apply calls.uv run --extra test python examples/loopx-chat-actions-smoke.pypassed against isolated native typed action/HTTP state. No active Goal mutation.npm ci --ignore-scriptsrepaired the environment before rerunning. No gates lowered or checks skipped.Change-quality receipt
cqr_90c42a82ebb6825b5b8everifies the exact seven-file scope; one bounded simplification pass, no unresolved risks. Paid/model evaluation was not run: this is an offline presentation slice, with live interpretation reserved for release qualification. Native installed WebView and real portfolio prioritization are not claimed.Frontend / visual evidence
Source data: public fixture plus synthetic request. The first viewport/navigation is unchanged; the affected state is the opened request drawer.
Before, the same request at the base:
After, packaged desktop Chinese:
After, packaged 390px English:
Attention review: consolidate repeated summary/details into one brief; full request and evidence earn the main reading space. Keep one primary action, optional diagnostics and all source/authority failures visible. No animation or fabricated execution status.
Boundary
DCO sign-offs included. Generated assets, screenshots, local state and raw logs are excluded from the diff. Product-surface changes remain for maintainer merge after exact-head review.