Skip to content

fix(workspace): restore ContextHelp on ExecutionObservationReadback summary - #9210

Merged
loopx-agent merged 1 commit into
mainfrom
codex/fix-execution-observation-context-help-20261121
Nov 21, 2026
Merged

loopx-agent merged 1 commit into
mainfrom
codex/fix-execution-observation-context-help-20261121

Conversation

@loopx-agent

@loopx-agent loopx-agent commented Nov 21, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Resolves the v2.4.0 packaged frontend release blocker exposed after PR #9071 (b422ace0ee), restoring S5/S11 Explanations-on-Demand (<ContextHelp>) inside ExecutionObservationReadback and updating the contract & browser verification coverage across these exact 3 files:

  • work-yardstick-readback.tsx: Restores <ContextHelp label={zh ? "执行观测说明" : "Execution observation guide"}> inside ExecutionObservationReadback's <summary> (shared across GoalExploreResults and GoalResearchHistory) and removes the duplicate trailing <p> disclaimer inside <details>.
  • personal-workspace-contract.test.mjs: Updates the execution_observation contract check to read work-yardstick-readback.tsx and assert BOTH goal-research-history.tsx delegating execution_observation to <ExecutionObservationReadback> AND ExecutionObservationReadback's <summary> attaching <ContextHelp label={zh ? "执行观测说明" ...}>.
  • execution-feedback-browser-smoke.mjs: Verifies the collapsed <details> fields first, clicks the 执行观测说明 ContextHelp trigger button, asserts the [popover] renders /不等于方法有效/, and dismisses cleanly with Escape across both file and sqlite backends and desktop (1280×900) / narrow (390×844) viewports.

First-Screen & Populated Visual Evidence

  • Tested Revision & Boundary: Packaged & Vite bundles built at 568ecf2baaf0084c4d8b2986e49d68b5c8141113 on origin/main (d28ec76f424c7ae6095c2c4e486eb33b9e4a5b8e), exercised via execution-feedback-browser-smoke.mjs over both file and sqlite authority fixtures (zh-CN, 0 horizontal overflow on desktop 1280×900 and phone 390×844).
Surface / Viewport Captured State (568ecf2baa, sqlite fixture)
Execution Observation Detail · Desktop 1280×900 After Execution Observation detail desktop
Research History Reader · Desktop 1280×900 After Execution Observation reader desktop
Research History Reader · Narrow 390×844 After Execution Observation reader 390px

Verification

  • npm --prefix apps/presentation/dashboard run check:css-custom-properties — passed (43 stylesheets, 3798 bare references / 1899 --pw-*, 0 undefined references)
  • npm --prefix apps/presentation/dashboard run build (tsc --noEmit && vite build && npm run build:chat) — passed
  • Personal-workspace unit & contract tests (smoke: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-order 11/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.mjs 46/46, workspace-theme.test.mjs, font-token.test.mjs, personal-workspace-contract.test.mjs 4/4, server-startup.test.mjs) — all passed
  • LOOPX_PLAYWRIGHT_PACKAGE=... node smoke/execution-feedback-browser-smoke.mjs — file and sqlite (HTTP -> saved/history reader, missing/rejected/recovery, desktop/narrow) passed
  • Governance & release checks (568ecf2baaf0084c4d8b2986e49d68b5c8141113):
    • check_rfc_bilingual.py (--base origin/main & --base 92271fe114916428be6fd36558bb7a93fbe49da8) — passed
    • release-readiness-doc-smoke.py --release-notes docs/product/releases/v2.4.0.md (13 surfaces) — release-readiness-doc-smoke ok
    • loopx check --scan-path apps/presentation/dashboard — 0 errors (34 files scanned)
    • Goal-bound CQR (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/4 direct checks + 2/2 selected canaries passed (0 failures, manual_hold_count: 0)

…ummary

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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.md at 568ecf2baaf0084c4d8b2986e49d68b5c8141113 (specifically EXPLANATIONS-ON-DEMAND, POPULATED-PAGE-REVIEW, and NO-DUPLICATE-EXPLANATION).
    • EXPLANATIONS-ON-DEMAND: Auxiliary methodology/caveat prose lives inside ContextHelp beside 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 populated file/sqlite fixtures inspected across collapsed default, expanded detail, desktop (1280×900), and narrow (390×844) views.

改动思路 / Approach

该回归源于组件抽离时未保留 ContextHelp 入口却保留了底部提示段落。PR #9210 的策略是直接在唯一共享所有者 ExecutionObservationReadback 上恢复标准 ContextHelp 控件并删除底部重复段落,而不是在两个调用方分别补丁。

  1. Architecture boundary (retain): Keeping the disclosure, <ContextHelp>, and key-value layout together inside the shared presenter ExecutionObservationReadback avoids duplicating disclosure logic across GoalExploreResults and GoalResearchHistory, requires no new state or API surface, and stays cleanly localized to apps/presentation/dashboard/src/features/personal-workspace/.
  2. PR boundary: Scope is strictly limited to ExecutionObservationReadback, the existing personal-workspace-contract.test.mjs source-contract check, and the existing execution-feedback-browser-smoke.mjs Playwright smoke (+12 / -4 across 3 files); sibling WorkYardstickReadback remains untouched (out_of_scope).

具体改动 / Changes

关键代码讲解

  1. apps/presentation/dashboard/src/features/personal-workspace/work-yardstick-readback.tsx (ExecutionObservationReadback at L28-L45)

    • Imports ContextHelp from ./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) calls event.stopPropagation() on the .context-help-trigger button click, so activating (i) opens the popover="auto" tooltip without toggling <details> open or closed, while Escape dismisses :popover-open via 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) and GoalResearchHistory (goal-research-history.tsx:186) both render <ExecutionObservationReadback observation={...} zh={zh}/>.
  2. apps/presentation/dashboard/src/features/personal-workspace/personal-workspace-contract.test.mjs

    • Adds yardstickReadback = source("./work-yardstick-readback.tsx") and verifies both goal-research-history.tsx delegating execution_observation to <ExecutionObservationReadback (L744) AND ExecutionObservationReadback's <summary> attaching <ContextHelp label={zh ? "执行观测说明" (L745).
    • Counterfactual verified on origin/main (d28ec76f42): assertion ExecutionObservationReadback[\s\S]*?<summary>[\s\S]*?<ContextHelp fails as expected before this PR and passes (4/4 blocks) on exact head 568ecf2baa.
  3. 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-popover visibility with /不等于方法有效/, dismisses with Escape, and completes desktop (1280×900) and narrow (390×844) responsive + fault-injection/recovery checks across both file and sqlite backends.

独立复现验证结果 (exact head 568ecf2baaf0084c4d8b2986e49d68b5c8141113)

  • CSS custom properties & production builds: check:css-custom-properties (43 stylesheets, 62 tokens, 0 undefined references) and npm --prefix apps/presentation/dashboard run build (tsc --noEmit && vite build && build:chat) passed.
  • Unit & contract suite: personal-workspace-contract.test.mjs (4/4 tests), smoke:goal-work-browse (4/4), smoke:team-report (4/4 + report smoke), smoke:answer-report, smoke:chat-model-menu, smoke:goal-order (3/3 hierarchy + order), smoke:goal-activity, smoke:proposal-recency, smoke:delegation-preflight, conversation-order.test.mjs, 6 personal-workspace .test.mjs suites (46/46), workspace-theme.test.mjs, font-token.test.mjs, and server-startup.test.mjs all passed (0 failures).
  • Real browser E2E (execution-feedback-browser-smoke.mjs): Passed end-to-end across both file and sqlite providers (1280×900 desktop, 390×844 narrow mobile, zero horizontal overflow, fault-injection result-0 absent & wrong SHA-256 alert clearing stale reader + recovery, source_unchanged: true, mutation_attempts: 0). Plus independent Playwright probe verified clicking 执行观测说明 BEFORE opening <details> leaves open === null while rendering the visible .context-help-popover on both 1280×900 and 390×844.
  • Governance checks: check_rfc_bilingual.py --base origin/main --head HEAD passed; loopx check --scan-path apps/presentation/dashboard reported 0 errors; loopx canary premerge --from-git-diff --git-diff-base origin/main passed 4/4 direct checks and 2/2 selected catalog canaries (0 failures); PR description's 3 rendered visual attachment URLs all returned HTTP 200 image/png (34,107, 150,772, 40,173 bytes); DCO Signed-off-by present and git merge-tree HEAD origin/main clean.

对主干的风险 / Risks

  • Sibling consistency (non-blocking): WorkYardstickReadback in 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 #9071 regression.
  • Mobile 390px center-hit geometry (non-blocking): At 390×844, @media (max-width: 640px) enlarges .context-help-trigger to 44×44px (x≈175..219px), which overlaps the geometric midpoint (x=195px) of the 328px-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 text span rather than an unpositioned <summary> midpoint.
  • Uninspected locale / attachment variant: Built-in Playwright smoke exercised zh-CN UI copy (实际执行与资源观测 / 执行观测说明); en copy (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 sets wait_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.

@loopx-agent
loopx-agent merged commit 55bae0a into main Nov 21, 2026
10 of 13 checks passed
@loopx-agent
loopx-agent deleted the codex/fix-execution-observation-context-help-20261121 branch November 21, 2026 16:17
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.

1 participant