Skip to content

fix(workspace): stop the read-only source badge from repeating the Goal title - #7380

Merged
huangruiteng merged 1 commit into
loopx-project:mainfrom
JasonBuildAI:codex/agent-j3w9
Oct 26, 2026
Merged

huangruiteng merged 1 commit into
loopx-project:mainfrom
JasonBuildAI:codex/agent-j3w9

Conversation

@JasonBuildAI

@JasonBuildAI JasonBuildAI commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Goal And Delivered Outcome

Required merge gate: since #7376, the required chat-bundle-browser job of
Python Tests (one of the five jobs checks verifies; checks feeds
pytest → merge-gate) fails deterministically for every PR whose change
classification runs core tests, and the read-only source badge announces the
Goal title twice to assistive technology.

Hosted evidence for the red gate before this change:
run 40297894327 — chat-bundle-browser (1), (2) and (3) all fail at Qualify the actual compiled UI; the release-artifacts build job (40297894021) fails Exercise the installed page in a real browser with the same assertion.

Author Declaration

  • Written by: model agent (DeepSeek Harness, deepseek-v4.1-flash). AI disclosure: this change was drafted with AI assistance at the operator's request, under their direction and review; the operator set the scope and reviewed the result.

Implemented against

Criterion (spec clause) Disposition Symbol / path Test or command
The badge does not repeat the visible Goal title implemented sourceNamedByTitle in channel-header.tsx; scoped assertion in chat-model-menu-smoke.mjs npm run -s smoke:chat-model-menu
The source restriction keeps an on-demand explanation implemented ContextHelp body still renders header.readOnlySourceDescription with the source same smoke
A source the Goal title does not name stays visible implemented unchanged personal-read-only-source-label branch new distinct assertion in the same smoke
Required chat-bundle-browser catalog step passes implemented — smoke exit 0 (see Validation)
  • Self-check before submission: read the final diff, re-ran the failing catalog command before and after, re-ran the new assertion against the pre-fix component, ran the dashboard build and the catalog-adjacent dashboard smokes. Deliberately left out: the remaining packaged Playwright workspace scenarios (only research-history was run; see Coverage and gaps).

Scope And Continuation

  • Completed scope and remaining work: the badge names the help by its purpose when the Goal title already names the source, while the disclosure still explains the source; the SSR contract now asserts the badge's persistent label and visible text instead of a raw HTML slice that swallowed the hidden panel. The visible layout is unchanged.
  • Slice boundary / successor: complete within this scope; no successor.

Validation

  • Tested revision: 884b294384ea58a4f8a1f05312bb1b563268eb1b (rebased onto e2c37fe73; the same change was hosted-tested at 775ab0e3c before the rebase, and the local checks below were re-run at this head)
  • Run state: finished
  • Input classes: synthetic
Check kind Result Public-safe evidence / limitation
static passed npm run -s build in apps/presentation/dashboard (tsc --noEmit, vite build, chat bundle) exited 0.
unit passed npm run -s smoke:chat-model-menu exits 0: Chat model/header: 66 bilingual model, defaults and accessible refresh assertions passed (SSR only).
regression_parity passed With only channel-header.tsx restored to its pre-fix revision, the updated smoke exits 1 with The read-only source badge does not repeat the visible Goal title; at this head it exits 0.
integration passed Catalog-adjacent dashboard checks at this head: smoke: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_entrypoint passed Packaged Playwright scenario research-history against the built chat bundle passed at this head (226 s); it asserts the unchanged Research preview · 只读 help name and tooltip copy for a source the Goal title does not name.
integration blocked The remaining packaged Playwright personal-workspace scenarios were not run on this host; hosted CI owns that gate.
static passed git diff --check clean; loopx canary premerge --from-git-diff --git-diff-base upstream/main reports status: passed, changed_files: 3, failures: 0, manual_holds: 0.
  • Coverage and gaps: the changed behavior is server-rendered markup in 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 at 775ab0e3c (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 head 2353ec9a7, run 40284818562) and composer-session-admission (also failing in fix(chat): preserve latest reply through layout changes #7377's run 40297894327 before this change).

Frontend / Visual Evidence

  • UI impact: changed (accessible name only; no visual change)
  • Before: <button class="context-help-trigger" aria-label="Historical run · 只读"> plus <strong>Historical run · 只读</strong> inside the badge for a Goal whose title already reads Historical run.
  • After: <button class="context-help-trigger" aria-label="只读来源说明"> and <strong>只读来源说明</strong>; the disclosure body still reads 显示 Historical run 的原始记录;执行控制在原运行环境, and the visible 只读 chip is unchanged.
  • States and viewports shown: not applicable — the pixels, DOM structure and responsive layout are unchanged; only the accessible name and disclosure heading change, and the narrow-screen label truncation from fix(workspace): keep source state and folded actions readable #7376 is preserved.
  • Source data: synthetic
  • Attention review: no new element, label or instruction is added; the badge keeps exactly one visible state chip and one on-demand explanation, so the whole-viewport attention balance is untouched.
  • Craft review: no visual token, layout or motion change; the status glyph family and spacing are unchanged.

Type of Change

  • Bug fix

LoopX Area

  • Public docs or presentation surface (README, protocols, dashboard)

Technical Direction

  • Direction / acceptance reference, when applicable: N/A — ordinary regression repair.

Shared-authority RFC fixture impact

  • Production-scale fixture schema: N/A
  • Semantic dimensions changed, or reviewed no-impact rationale: N/A
  • Provider conformance arms run: N/A
  • Read-only legacy/file/PostgreSQL three-arm rehearsal: N/A

Boundary Checklist

  • Neither the diff nor this PR body/comments/attachments disclose private state, credentials, raw traces or verifier output, internal links, or local machine paths (including .loopx/, .codex/goals/, and live ACTIVE_GOAL_STATE.md).
  • I did not duplicate maintainer-owned benchmark work unless a maintainer split out a public issue for it.
  • I kept the change scoped to the linked issue/task.
  • I completed the visual evidence section for UI changes, or marked UI impact none.
  • Every commit includes a DCO Signed-off-by trailer (git commit -s).

…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>
@JasonBuildAI

Copy link
Copy Markdown
Contributor Author

已把分支 rebase 到最新 main(8cb50a2cd),旧 head 884b29438 → 新 head 0cb32b00c。

改动内容没有变化,只是消除了 BEHIND 状态;如果评审需要我可以再补充本地验证结果。

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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。

关键代码讲解

  1. sourceNamedByTitle@159:输入是当前 Goal 标题和来源标签;直接相等时为帮助选择用途名,同时抑制重复的可见来源标签。来源标签为空时不会进入来源控件分支,因此两个 undefined 相等不会激活只读来源。
  2. ContextHelp@6:实现未修改,继续负责焦点、指针、触摸和关闭时机。新名称同时进入按钮的可访问名称及展开标题,正文仍显示完整原始来源;它不授予执行权限。
  3. 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.

@huangruiteng
huangruiteng merged commit cd819fd into loopx-project:main Oct 26, 2026
26 of 32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: the required chat-bundle-browser lane is red on main — the read-only source badge repeats the visible Goal title

3 participants