Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,13 @@ try {
assert.match(text, /未测量/);
assert.match(text, /input-v1/);
assert.match(text, /artifact:negative-result/);
assert.match(text, /不等于方法有效/);
const helpTrigger = observation.getByRole("button", {name: "执行观测说明"});
await helpTrigger.click();
const helpPopover = observation.locator(".context-help-popover");
await helpPopover.waitFor({state: "visible"});
assert.match(await helpPopover.innerText(), /不等于方法有效/);
await page.keyboard.press("Escape");
await helpPopover.waitFor({state: "hidden"});
await observation.scrollIntoViewIfNeeded();
await observation.screenshot({path: resolve(output, `after-${provider}-detail.png`), animations: "disabled"});
await page.screenshot({path: resolve(output, `after-${provider}-desktop.png`), animations: "disabled"});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -735,10 +735,12 @@ const overview = source("./goal-overview.tsx");
const overviewCss = source("./goal-overview.css");
const researchHistory = source("./goal-research-history.tsx");
const researchHistoryCss = source("./goal-research-history.css");
const yardstickReadback = source("./work-yardstick-readback.tsx");

assert.match(overview, /goal-overview-worker-status[\s\S]*?<ContextHelp/, "WorkerReadback puts explanation into ContextHelp beside status");
assert.match(overview, /details className="goal-overview-worker-details"/, "WorkerReadback technical details start collapsed");
assert.match(overviewCss, /\.goal-overview-worker-status\s*\{[^}]*display:\s*flex/, "Worker status row is structured via flex");
assert.match(overviewCss, /@media\s*\(max-width:\s*640px\)\s*\{[\s\S]*?\.goal-overview-worker-state dl/, "Worker state has narrow mobile grid rules");
assert.match(researchHistory, /execution_observation[\s\S]*?<ContextHelp label=\{zh \? "执行观测说明"/, "Execution observation explanation is attached to summary ContextHelp");
assert.match(researchHistory, /execution_observation[\s\S]*?<ExecutionObservationReadback/, "Research history delegates execution_observation rendering to ExecutionObservationReadback");
assert.match(yardstickReadback, /export function ExecutionObservationReadback[\s\S]*?<summary>[\s\S]*?<ContextHelp label=\{zh \? "执行观测说明"/, "Execution observation explanation is attached to summary ContextHelp");
assert.match(researchHistoryCss, /margin-inline-start:\s*0;\s*margin-top:\s*8px;/, "Research history mobile action wraps cleanly on 390px");
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type {WorkYardstickCapture, WorkYardstickProfile} from "../../../../../../loopx/control_plane/work_items/yardstick_decision.js";
import {ContextHelp} from "./context-help";

/** A source record, never an acceptance or permission indicator. */
export function WorkYardstickReadback({capture, zh}: {capture: WorkYardstickCapture; zh: boolean}) {
Expand Down Expand Up @@ -29,7 +30,7 @@ export function ExecutionObservationReadback({observation, zh}: {
}) {
const measured = (value: unknown) => value === null ? (zh ? "未测量" : "Not measured") : String(value);
return <details className="explore-reader-details">
<summary>{zh ? "实际执行与资源观测" : "Execution and resource observations"}</summary>
<summary><span>{zh ? "实际执行与资源观测" : "Execution and resource observations"}</span> <ContextHelp label={zh ? "执行观测说明" : "Execution observation guide"}><p>{zh ? "来源记录的执行观测;不等于方法有效或当前候选已通过验收。" : "Source-recorded execution observations; not proof of method benefit or current-candidate acceptance."}</p></ContextHelp></summary>
<dl className="research-finding-sections">
<dt>{zh ? "计划方法 → 实际方法" : "Planned → executed method"}</dt><dd>{String(observation.planned_method_id)} → {String(observation.executed_method_id)}</dd>
{observation.change_reason ? <><dt>{zh ? "改向原因" : "Reason for change"}</dt><dd>{String(observation.change_reason)}</dd></> : null}
Expand All @@ -40,6 +41,5 @@ export function ExecutionObservationReadback({observation, zh}: {
<dt>{zh ? "执行候选 SHA-256" : "Executed candidate SHA-256"}</dt><dd><code>{String(observation.candidate_sha256)}</code></dd>
{observation.result_ref ? <><dt>{zh ? "该候选的结果引用" : "Result for this candidate"}</dt><dd><code>{String(observation.result_ref)}</code></dd></> : null}
</dl>
<p>{zh ? "来源记录的执行观测;不等于方法有效或当前候选已通过验收。" : "Source-recorded execution observations; not proof of method benefit or current-candidate acceptance."}</p>
</details>;
}
Loading