Repository navigation
fix(workspace): stop the read-only source badge from repeating the Goal title - #7380
Conversation
775ab0e to
884b294
Compare
…al title loopx-project#7376 replaced the badge's tooltip with a ContextHelp whose accessible name is "<source> · <read only>". When the Goal title already names the source the visible label is deliberately omitted, so that name and the disclosure heading repeat a title already on screen and announced to assistive technology. The shipped SSR contract then fails in the required chat-bundle-browser step, which keeps merge-gate red for every PR whose classification runs core tests. Name the help by its purpose when the source is already the Goal title, keep the source in the on-demand disclosure, and scope the smoke assertion to the badge's persistent label and visible text instead of a raw HTML slice that now swallows the hidden panel. Fixes loopx-project#7378 Signed-off-by: JasonBuildAI <jasonbuildai@users.noreply.github.com>
884b294 to
0cb32b0
Compare
|
已把分支 rebase 到最新 改动内容没有变化,只是消除了 |
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · gpt-6.1-sol · OpenAI · reasoning_effort=max · declaration_source=runtime_reported.
详细中文评审
动机
浏览只读来源工作区的用户,尤其通过键盘或窄屏查看来源说明时,会遇到重复标题。 当 Goal 标题就是来源名称时,原帮助按钮再次朗读同一名称;修改后按钮说明用途,展开正文仍完整保留原始来源。 独立基线复现重复名称;当前头的中英帮助名称、完整来源正文、键盘触摸悬停和失败重试均通过实测,默认首屏像素一致。 本次只修复来源帮助的用途名称,不改变只读权限,不重新设计整个工作区,也不宣称安装后的 App 或原生读屏语音已验收。
依据是先于实现读取的 设计约定@e2c37fe73721689fbd47581a67d900eeaacb9029 与 #7378 的具体复现。验收对应 ATTENTION-purpose(主次和用途)、SOURCE-provenance(原始来源及只读后果)和 HELP-interaction(可访问、可关闭、窄屏可用),没有用新增断言反向定义全部需求。相同来源名称只需在页面主标题处突出,次要帮助控件应让人知道它解释什么。
改动思路
复用现有 ContextHelp、来源描述和翻译字典。既有代码已经根据标题与来源是否完全相等决定是否再显示一个来源标签;现在把同一个判断提为本地派生值,也用于帮助名称。同名时显示“只读来源说明”/“Read-only source help”,不同名仍保留来源名称和只读说明。没有新增配置、持久状态、组件或启发式分类;这个相等判断只选择展示措辞,不决定权限或来源覆盖。
具体改动
发布前检测到 rebase,旧头 884b294 更新为当前头 0cb32b0,当前 PR 基线为 8cb50a2。独立比较确认完整补丁、三个文件及帮助/构建 owners 均相同;原始缺陷反例保留其 e2c37fe 版本。当前头重新完成构建、66 项断言、浏览器全部上述交互与密集研究页面、来源恢复及拒写、严格质量和原生 gate,不以旧截图替代新主干的整页核验。完整 diff 为三文件 +18/-6,生产部分 +7/-2。ChannelHeader 新增一个派生布尔值并复用两处,i18n 增加两个语言值,现有 smoke 增强同名与不同名断言。来源正文继续使用原始 readOnlySourceLabel,不因改标题而删去溯源信息。无来源、来源不可用和执行中的既有分支保持原 owner。
关键代码讲解
sourceNamedByTitle@159:输入是当前 Goal 标题和来源标签;直接相等时为帮助选择用途名,同时抑制重复的可见来源标签。来源标签为空时不会进入来源控件分支,因此两个 undefined 相等不会激活只读来源。ContextHelp@6:实现未修改,继续负责焦点、指针、触摸和关闭时机。新名称同时进入按钮的可访问名称及展开标题,正文仍显示完整原始来源;它不授予执行权限。header.readOnlySourceHelp@698:扩展现有中英字典,不另建翻译或状态 owner。实际调用链是个人工作区来源字段→ChannelHeader→ContextHelp;没有只为测试而新增的生产入口。
独立 base/head 均完成 TypeScript/Vite/chat 构建。隔离生成缓存后,当前头编译产物的双语 smoke 共 66 项通过,原始基线复现重复标题失败。最初并发观察因两臂共享生成缓存失效,保留其记录并用独立缓存重跑,未修改源码或业务断言来获得通过。
浏览器核验使用实际打包 React 与原生 RuntimeWorkspaceServer/来源读取边界,status/events 为合成夹具。1512×982 默认首屏的 base/head PNG 逐字节相同;展开后的可见标题确实改变,不能概括成“所有视觉都未变”。390×844 的中英、不同来源与长来源帮助均可读、无横向溢出。实际 Tab/Shift+Tab、Escape 保留焦点,触摸打开,指针移入帮助后经过 250ms 仍保持打开、离开后关闭,覆盖原 180ms 延时边界。
整页带六项长任务、混合完成/阻塞状态及 24 条长中英问题;实际查看展开列表下部和完整原始问题,再返回问题列表并核对焦点。默认层次仍突出 Goal、未知指标和任务,次要来源信息留在帮助中。来源真实返回 503 时显示不可用与 Retry,恢复后仍回到原来源命名空间;两臂直接请求写操作均为 405。缺失研究分析的错误保持可见,没有执行模型分析。严格质量回执 cqr_6e2218397aa376b9f743 已物理读回全字段一致;Goal 绑定的原生标准 premerge 4 项直接检查与 2 项选择检查通过,无失败或人工 hold,语义 advisory 的支持范围限制也保留。
对主干的风险
最强反例是:名称变清楚却丢掉不同来源或长来源正文,或 SSR 通过但真实焦点/悬停/触摸与窄屏失败。本次分别通过不同来源双臂比较、长来源展开、原生交互、真实错误恢复和整页长内容核验覆盖。只读后端拒绝和来源 owner 未改变;没有新增指令、开关、业务写入或隐含授权。代码规模与确定性的展示问题相称,本地比较复用已是有用简化,无需增加跨层抽象。
边界是源码构建的打包界面与原生 HTTP,合成来源数据;没有验收安装后的 App/Host、原生读屏语音、Windows 或所有设备组合。无来源等既有分支保留双语编译覆盖;默认像素相同不单独证明所有动态行为。当前 wait_for_ci=false,未读取、轮询或触发 hosted CI。这些限制没有被计作通过,也没有据局部帮助改善宣称长期效果或完整费用收益。
我的整体评价
APPROVE,限 0cb32b00c9f98c82f7270ba1494ced0bd7f6145b;未发现阻断问题。 这项修改让已存在的来源帮助用途更明确,原始来源与只读后果仍可读,验证包含原始缺陷反例、两个语言、真实交互和失败恢复。使用体验为 improved,长期控制面行为为 preserved;安装资格和因果收益仍未证明。现有 ContextHelp、来源字段和 i18n 已足够;本地派生布尔值复用两个位置,不增加配置、组件或状态。 来源帮助用途名和现有双语断言;只读与来源恢复 owner 不变。 已检查真实浏览器的默认、展开、下部与原始问题页面;来源帮助需要展开核验,并按既有窄屏设计复核中英布局。 未验安装后的 App/Host、原生读屏语音、Windows 与所有设备组合;合成来源没有完整分析包,也没有执行模型分析。评审结论与后续精确 head readiness、维护者合并授权分别处理,本次不合并。
英文简短结论
English verdict: APPROVE — 0cb32b0. Reuses the existing help and localization owners to clarify the same-title source control while preserving provenance and read-only authority. Both builds, 66 compiled-head assertions, independent baseline failure, actual desktop/narrow keyboard/touch/hover and HTTP recovery/denial checks pass. Exact quality and Goal-bound premerge pass. Installed App/native AT speech and long-horizon or full-cost benefits remain unqualified; no merge authority.
Goal And Delivered Outcome
Required merge gate: since #7376, the required
chat-bundle-browserjob ofPython Tests(one of the five jobschecksverifies;checksfeedspytest→merge-gate) fails deterministically for every PR whose changeclassification runs core tests, and the read-only source badge announces the
Goal title twice to assistive technology.
c56f55307).titletooltip with aContextHelpwhose accessible name is"<source> · <read only>". WhenselectedGoal.title === readOnlySourceLabelthe visible label is deliberately omitted, but the newaria-labeland disclosure heading repeat the title that is already on screen and already announced. The shipped SSR contract"The source badge does not repeat the visible Goal title"then fails inapps/presentation/dashboard/smoke/chat-model-menu-smoke.mjs.npm run -s smoke:chat-model-menuexits 1 withAssertionError: The source badge does not repeat the visible Goal titleonf794ee464; it exits 0 withChat model/header: 66 bilingual model, defaults and accessible refresh assertions passed (SSR only)on this head (rowunitbelow).mainatf794ee464.Hosted evidence for the red gate before this change:
run 40297894327 —
chat-bundle-browser (1),(2)and(3)all fail atQualify the actual compiled UI; the release-artifactsbuildjob (40297894021) failsExercise the installed page in a real browserwith the same assertion.Author Declaration
Implemented against
apps/presentation/dashboard/smoke/chat-model-menu-smoke.mjsatf794ee464; fix(workspace): keep source state and folded actions readable #7376's accepted requirement that the read-only source restriction stays explainable on narrow screens.sourceNamedByTitleinchannel-header.tsx; scoped assertion inchat-model-menu-smoke.mjsnpm run -s smoke:chat-model-menuContextHelpbody still rendersheader.readOnlySourceDescriptionwith the sourcepersonal-read-only-source-labelbranchdistinctassertion in the same smokechat-bundle-browsercatalog step passesresearch-historywas run; see Coverage and gaps).Scope And Continuation
Validation
884b294384ea58a4f8a1f05312bb1b563268eb1b(rebased ontoe2c37fe73; the same change was hosted-tested at775ab0e3cbefore the rebase, and the local checks below were re-run at this head)staticpassednpm run -s buildinapps/presentation/dashboard(tsc--noEmit, vite build, chat bundle) exited 0.unitpassednpm run -s smoke:chat-model-menuexits 0:Chat model/header: 66 bilingual model, defaults and accessible refresh assertions passed (SSR only).regression_paritypassedchannel-header.tsxrestored to its pre-fix revision, the updated smoke exits 1 withThe read-only source badge does not repeat the visible Goal title; at this head it exits 0.integrationpassedsmoke:goal-order,smoke:goal-activity,smoke:proposal-recency,conversation-order,composer-keyboard+steering-recovery,runtime-readiness,attention-notifications,since-you-looked,goal-suggestions,workspace-theme,font-token— 11 passed.real_entrypointpassedresearch-historyagainst the built chat bundle passed at this head (226 s); it asserts the unchangedResearch preview · 只读help name and tooltip copy for a source the Goal title does not name.integrationblockedstaticpassedgit diff --checkclean;loopx canary premerge --from-git-diff --git-diff-base upstream/mainreportsstatus: passed,changed_files: 3,failures: 0,manual_holds: 0.ChannelHeader, which the SSR smoke exercises in both locales and in both branches of the new condition. One catalog command,personal-workspace-contract.test.mjs, exits 7 on this native Windows checkout because it matches LF source text against a CRLF working tree; it reproduces unchanged at the base commit and is not touched by this diff. The packaged browser scenario above covers the non-matching branch in the real shipped bundle; the remaining browser-rendered scenarios remain hosted-CI evidence. Hosted evidence at775ab0e3c(same patch, pre-rebase head):chat-bundle-browser (3)passed the whole catalog plus its browser shard, so the catalog assertion is gone. The other shards fail later, inside browser scenarios unrelated to this diff:conversation-activity(30 s locator timeout on.personal-message-elapsed; the same scenario fails at pre-fix(workspace): keep source state and folded actions readable #7376 head2353ec9a7, run 40284818562) andcomposer-session-admission(also failing in fix(chat): preserve latest reply through layout changes #7377's run 40297894327 before this change).Frontend / Visual Evidence
<button class="context-help-trigger" aria-label="Historical run · 只读">plus<strong>Historical run · 只读</strong>inside the badge for a Goal whose title already readsHistorical run.<button class="context-help-trigger" aria-label="只读来源说明">and<strong>只读来源说明</strong>; the disclosure body still reads显示 Historical run 的原始记录;执行控制在原运行环境, and the visible只读chip is unchanged.Type of Change
LoopX Area
Technical Direction
Shared-authority RFC fixture impact
Boundary Checklist
.loopx/,.codex/goals/, and liveACTIVE_GOAL_STATE.md).none.Signed-off-bytrailer (git commit -s).