Repository navigation
fix(workspace): restore ContextHelp on ExecutionObservationReadback summary - #9210
Conversation
…ummary Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · Gemini · Google · self_reported
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
This exact-head review of PR #9210 (9210@568ecf2baaf0084c4d8b2986e49d68b5c8141113) approves the fix restoring <ContextHelp> on ExecutionObservationReadback and removes the duplicate bottom disclaimer paragraph.
动机 / Motivation
Research page users inspecting execution observations in GoalExploreResults or GoalResearchHistory hit an unexpected UX regression after an earlier extraction PR removed the contextual help button from the disclosure header and left a duplicated inline paragraph inside the expanded panel.
Before this fix, the collapsed header 实际执行与资源观测 showed no help trigger on hover, focus, or tap, while expanding the panel forced readers through redundant disclaimer prose already meant for on-demand ContextHelp; after this fix, hovering, focusing, or tapping the inline (i) button opens the 执行观测说明 explanation without expanding the details panel, and expanding the panel displays only the 8 recorded key-value fields.
Observably, both rendered research surfaces keep the default view concise while keeping the provenance caveat (来源记录的执行观测;不等于方法有效或当前候选已通过验收。) reachable via keyboard/mouse/touch and dismissible with Escape.
This PR stays strictly scoped to ExecutionObservationReadback, its source contract assertion, and its browser smoke check; it intentionally does not refactor sibling WorkYardstickReadback or other unrelated research disclosures.
- Specification basis: Evaluated against
docs/development/design.mdat568ecf2baaf0084c4d8b2986e49d68b5c8141113(specificallyEXPLANATIONS-ON-DEMAND,POPULATED-PAGE-REVIEW, andNO-DUPLICATE-EXPLANATION).EXPLANATIONS-ON-DEMAND: Auxiliary methodology/caveat prose lives insideContextHelpbeside the owning<summary>label (ExecutionObservationReadback) rather than inline footnotes.NO-DUPLICATE-EXPLANATION: Duplicate trailing<p>inside<details>removed so the same caveat is not repeated twice.POPULATED-PAGE-REVIEW: Rendered populatedfile/sqlitefixtures inspected across collapsed default, expanded detail, desktop (1280×900), and narrow (390×844) views.
改动思路 / Approach
该回归源于组件抽离时未保留 ContextHelp 入口却保留了底部提示段落。PR #9210 的策略是直接在唯一共享所有者 ExecutionObservationReadback 上恢复标准 ContextHelp 控件并删除底部重复段落,而不是在两个调用方分别补丁。
- Architecture boundary (
retain): Keeping the disclosure,<ContextHelp>, and key-value layout together inside the shared presenterExecutionObservationReadbackavoids duplicating disclosure logic acrossGoalExploreResultsandGoalResearchHistory, requires no new state or API surface, and stays cleanly localized toapps/presentation/dashboard/src/features/personal-workspace/. - PR boundary: Scope is strictly limited to
ExecutionObservationReadback, the existingpersonal-workspace-contract.test.mjssource-contract check, and the existingexecution-feedback-browser-smoke.mjsPlaywright smoke (+12 / -4across 3 files); siblingWorkYardstickReadbackremains untouched (out_of_scope).
具体改动 / Changes
关键代码讲解
-
apps/presentation/dashboard/src/features/personal-workspace/work-yardstick-readback.tsx(ExecutionObservationReadbackat L28-L45)- Imports
ContextHelpfrom./context-help(L2). - Updates
<summary>(L33) to render<span>{zh ? "实际执行与资源观测" : "Execution and resource observations"}</span>paired with<ContextHelp label={zh ? "执行观测说明" : "Execution observation guide"}><p>{zh ? "来源记录的执行观测;不等于方法有效或当前候选已通过验收。" : "Source-recorded execution observations; not proof of method benefit or current-candidate acceptance."}</p></ContextHelp>. - Why click-isolation works:
context-help.tsx(L58) callsevent.stopPropagation()on the.context-help-triggerbutton click, so activating(i)opens thepopover="auto"tooltip without toggling<details>open or closed, whileEscapedismisses:popover-openvia window capture listener (context-help.tsx:L40). - Removes the duplicate trailing
<p>disclaimer inside<details>(L43-L44). - Callers verified unchanged:
GoalExploreResults(goal-explore-results.tsx:156) andGoalResearchHistory(goal-research-history.tsx:186) both render<ExecutionObservationReadback observation={...} zh={zh}/>.
- Imports
-
apps/presentation/dashboard/src/features/personal-workspace/personal-workspace-contract.test.mjs- Adds
yardstickReadback = source("./work-yardstick-readback.tsx")and verifies bothgoal-research-history.tsxdelegatingexecution_observationto<ExecutionObservationReadback(L744) ANDExecutionObservationReadback's<summary>attaching<ContextHelp label={zh ? "执行观测说明"(L745). - Counterfactual verified on
origin/main(d28ec76f42): assertionExecutionObservationReadback[\s\S]*?<summary>[\s\S]*?<ContextHelpfails as expected before this PR and passes (4/4blocks) on exact head568ecf2baa.
- Adds
-
apps/presentation/dashboard/smoke/execution-feedback-browser-smoke.mjs- After expanding
<details>, asserts all<dl>fields (broad-search → targeted-check,counterexample ruled out,12.5 / 60,未测量,input-v1,artifact:negative-result) without relying on removed paragraph text, clicks执行观测说明button, waits for.context-help-popovervisibility with/不等于方法有效/, dismisses withEscape, and completes desktop (1280×900) and narrow (390×844) responsive + fault-injection/recovery checks across bothfileandsqlitebackends.
- After expanding
独立复现验证结果 (exact head 568ecf2baaf0084c4d8b2986e49d68b5c8141113)
- CSS custom properties & production builds:
check:css-custom-properties(43stylesheets,62tokens,0undefined references) andnpm --prefix apps/presentation/dashboard run build(tsc --noEmit && vite build && build:chat) passed. - Unit & contract suite:
personal-workspace-contract.test.mjs(4/4tests),smoke:goal-work-browse(4/4),smoke:team-report(4/4+ report smoke),smoke:answer-report,smoke:chat-model-menu,smoke:goal-order(3/3hierarchy + order),smoke:goal-activity,smoke:proposal-recency,smoke:delegation-preflight,conversation-order.test.mjs, 6 personal-workspace.test.mjssuites (46/46),workspace-theme.test.mjs,font-token.test.mjs, andserver-startup.test.mjsall passed (0failures). - Real browser E2E (
execution-feedback-browser-smoke.mjs): Passed end-to-end across bothfileandsqliteproviders (1280×900desktop,390×844narrow mobile, zero horizontal overflow, fault-injectionresult-0absent & wrong SHA-256 alert clearing stale reader + recovery,source_unchanged: true,mutation_attempts: 0). Plus independent Playwright probe verified clicking执行观测说明BEFORE opening<details>leavesopen === nullwhile rendering the visible.context-help-popoveron both1280×900and390×844. - Governance checks:
check_rfc_bilingual.py --base origin/main --head HEADpassed;loopx check --scan-path apps/presentation/dashboardreported0errors;loopx canary premerge --from-git-diff --git-diff-base origin/mainpassed4/4direct checks and2/2selected catalog canaries (0failures); PR description's 3 rendered visual attachment URLs all returnedHTTP 200 image/png(34,107,150,772,40,173bytes); DCOSigned-off-bypresent andgit merge-tree HEAD origin/mainclean.
对主干的风险 / Risks
- Sibling consistency (non-blocking):
WorkYardstickReadbackin the same file (work-yardstick-readback.tsx:9-24) still uses a trailing<p>rather than<ContextHelp>on<summary>; kept untouched to avoid widening this hotfix PR beyond the reported#9071regression. - Mobile 390px center-hit geometry (non-blocking): At
390×844,@media (max-width: 640px)enlarges.context-help-triggerto44×44px(x≈175..219px), which overlaps the geometric midpoint (x=195px) of the328px-wide<summary>row. Tapping the text label (实际执行与资源观测,x≈46..172px) or open area toggles<details>, while tapping(i)opens the tooltip cleanly without toggling<details>, though future Playwright scripts targeting narrow<summary>clicks should click the textspanrather than an unpositioned<summary>midpoint. - Uninspected locale / attachment variant: Built-in Playwright smoke exercised
zh-CNUI copy (实际执行与资源观测/执行观测说明);encopy (Execution and resource observations/Execution observation guide) was inspected in source (work-yardstick-readback.tsx:33) rather than a separate English browser capture. - Remote CI (
not_consulted): Goal policy setswait_for_ci: false; remote GitHub checks were not queried or waited on.
我的整体评价 / Verdict
Visual inspection verdict (inspected): Directly inspected locally built desktop (1280x900) and narrow (390x844) rendered captures from execution-feedback-browser-smoke.mjs and an open-popover Playwright capture across default collapsed, expanded key-value detail, and open ContextHelp tooltip states on built dist and chat assets at exact head 568ecf2; primary finding narrative, ExecutionObservationReadback disclosure summary, inline (i) ContextHelp trigger, 8-row dl values (including wrapped 64-char candidate SHA-256), and floating explanation bubble all render with clean contrast, zero clipping, zero horizontal overflow, and no duplicate disclaimer prose.
Unverified scope: English (en) rendered screenshots of ExecutionObservationReadback, open-popover visual captures saved in PR attachments (verified instead via local Playwright visual inspection), and sibling WorkYardstickReadback (untouched by this PR).
PR #9210 精准且克制地修复了 PR #9071 引入的 ExecutionObservationReadback ContextHelp 缺失与底部段落重复问题:复用现有共享 presenter 与 ContextHelp 机制、+12/-4 严格限定在目标组件、契约测试与浏览器 smoke 三文件内,桌面与窄屏真实渲染、交互与构建全绿通过。同意合并(已遵守本地优先、不等待远程 CI 的评审策略)。
English verdict: APPROVE on exact head 568ecf2: restores ContextHelp on ExecutionObservationReadback, removes the duplicate disclaimer, updates source-contract and Playwright checks cleanly, and passes full dashboard builds, unit/contract suites, rendered desktop/mobile visual inspection, and canary premerge validation.
Summary
Resolves the
v2.4.0packaged frontend release blocker exposed after PR#9071(b422ace0ee), restoring S5/S11 Explanations-on-Demand (<ContextHelp>) insideExecutionObservationReadbackand updating the contract & browser verification coverage across these exact 3 files:work-yardstick-readback.tsx: Restores<ContextHelp label={zh ? "执行观测说明" : "Execution observation guide"}>insideExecutionObservationReadback's<summary>(shared acrossGoalExploreResultsandGoalResearchHistory) and removes the duplicate trailing<p>disclaimer inside<details>.personal-workspace-contract.test.mjs: Updates theexecution_observationcontract check to readwork-yardstick-readback.tsxand assert BOTHgoal-research-history.tsxdelegatingexecution_observationto<ExecutionObservationReadback>ANDExecutionObservationReadback's<summary>attaching<ContextHelp label={zh ? "执行观测说明" ...}>.execution-feedback-browser-smoke.mjs: Verifies the collapsed<details>fields first, clicks the执行观测说明ContextHelptrigger button, asserts the[popover]renders/不等于方法有效/, and dismisses cleanly withEscapeacross bothfileandsqlitebackends and desktop (1280×900) / narrow (390×844) viewports.First-Screen & Populated Visual Evidence
568ecf2baaf0084c4d8b2986e49d68b5c8141113onorigin/main(d28ec76f424c7ae6095c2c4e486eb33b9e4a5b8e), exercised viaexecution-feedback-browser-smoke.mjsover bothfileandsqliteauthority fixtures (zh-CN,0horizontal overflow on desktop1280×900and phone390×844).568ecf2baa,sqlitefixture)1280×9001280×900390×844Verification
npm --prefix apps/presentation/dashboard run check:css-custom-properties— passed (43stylesheets,3798bare references /1899 --pw-*,0undefined references)npm --prefix apps/presentation/dashboard run build(tsc --noEmit && vite build && npm run build:chat) — passedsmoke:goal-work-browse,smoke:team-report,smoke:answer-report,smoke:chat-model-menu,smoke:goal-order,smoke:goal-activity,smoke:proposal-recency,smoke:delegation-preflight,smoke:conversation-history-order11/11,conversation-order.test.mjs,steering-recovery.test.mjs,composer-keyboard.test.mjs,runtime-readiness.test.mjs,attention-notifications.test.mjs,since-you-looked.test.mjs,goal-suggestions.test.mjs46/46,workspace-theme.test.mjs,font-token.test.mjs,personal-workspace-contract.test.mjs4/4,server-startup.test.mjs) — all passedLOOPX_PLAYWRIGHT_PACKAGE=... node smoke/execution-feedback-browser-smoke.mjs—fileandsqlite(HTTP -> saved/history reader, missing/rejected/recovery, desktop/narrow) passed568ecf2baaf0084c4d8b2986e49d68b5c8141113):check_rfc_bilingual.py(--base origin/main&--base 92271fe114916428be6fd36558bb7a93fbe49da8) — passedrelease-readiness-doc-smoke.py --release-notes docs/product/releases/v2.4.0.md(13 surfaces) —release-readiness-doc-smoke okloopx check --scan-path apps/presentation/dashboard—0errors (34files scanned)personal-loopx-maintenance):cqr_0b1ddacaf33ec8c7bd3e(status: valid,scope_fingerprint: 0b1ddacaf33ec8c7bd3ea79d9227f7fba9f829ffdda3417143b1e9bcca30a638)loopx canary premerge --from-git-diff --git-diff-base origin/main --goal-id personal-loopx-maintenance—4/4direct checks +2/2selected canaries passed (0failures,manual_hold_count: 0)