diff --git a/apps/presentation/dashboard/src/features/personal-workspace/goal-research-progress.tsx b/apps/presentation/dashboard/src/features/personal-workspace/goal-research-progress.tsx index 36809a3704..f552954c5f 100644 --- a/apps/presentation/dashboard/src/features/personal-workspace/goal-research-progress.tsx +++ b/apps/presentation/dashboard/src/features/personal-workspace/goal-research-progress.tsx @@ -137,11 +137,12 @@ function NativeResults({native, zh, onCitation}: {native: ResearchProgressPack[" : {zh ? "未知" : "Unknown"}{key === "best_valid" ? · {outcomes.metric.unit} : null}}; }; return
-

{historical ? (zh ? "历史原生测量" : "Historical native measurements") : (zh ? "原生测量" : "Native measurements")}

+

{historical ? (zh ? "历史原生测量" : "Historical native measurements") : (zh ? "原生测量" : "Native measurements")}

+ {historical ?

{zh ? "来源已变化或不可读;以下仅为历史捕获,当前结果未核验。" : "The source changed or is unavailable. These are historical captures; current results are unverified."}

: null}

{zh ? "最佳只限本次捕获窗口;原生保留与最后提交可能不同。未采集的值保留未知,不记零。" : "Best is limited to this capture; retained and final submissions can differ. Uncaptured values remain unknown, not zero."}

{zh ? "检验过收益、采用了证据及原目标达成各需各自证据,不能由这些数值推断。" : "Utility testing, evidence adoption and original-objective success each need their own evidence; these values cannot establish them."}

- {historical ?

{zh ? "来源已变化或不可读;以下仅为历史捕获,当前结果未核验。" : "The source changed or is unavailable. These are historical captures; current results are unverified."}

: null}
{value(points[0])}

{outcomes.metric.name} · {outcomes.metric.higher_is_better ? (zh ? "越高越好" : "higher is better") : (zh ? "越低越好" : "lower is better")}

{points.slice(1).map(value)}
@@ -237,22 +238,27 @@ function ResearchMetrics({pack: p, zh, onCitation}: {pack: ResearchProgressPack export function ResearchProgress({pack: p, packs, selectedId, zh, onSelect, onCitation, analysisOpen = false, includeReport = true}: {pack: ResearchProgressPack | null; packs: Pick[]; selectedId: string; zh: boolean; analysisOpen?: boolean; includeReport?: boolean; onSelect: (id: string) => void; onCitation: (citation: AssessmentCitation, origin?: HTMLButtonElement) => void}) { const measured = p?.solver_usage, usage = measured?.projection, result = p?.result; + const historical = p?.applicability === "historical"; + const resultHelp = historical ? (result ? (zh ? "历史分析 · 当前判断未核验" : "Historical analysis · Current judgments unverified") + : (zh ? "历史来源 · 所选范围尚未分析" : "Historical source · Selected scope not analyzed")) + : p && !result ? (zh ? "所选范围尚未分析" : "Selected scope not analyzed") : (zh ? "指标说明" : "About these metrics"); const incomplete = usage?.incomplete_turn; const coverage = usage?.request_coverage; const number = (n: number) => new Intl.NumberFormat(zh ? "zh-CN" : "en", {maximumFractionDigits: 1}).format(n); const duration = (s: number) => `${number(s / 60)} ${zh ? "分钟" : "min"}`; const stamp = (s: string) => new Intl.DateTimeFormat(zh ? "zh-CN" : "en", {timeZone: "UTC", year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", hour12: false}).format(new Date(s)); return
-

{p?.native_outcomes ? (zh ? "研究结果" : "Research results") : (zh ? "研究效果判读" : "Research effectiveness")}

+

{p?.native_outcomes ? (zh ? "研究结果" : "Research results") : (zh ? "研究效果判读" : "Research effectiveness")}

+ {historical ?

{zh ? "来源或方法已变化;历史捕获与判读不能当作当前结果。" : "The source or method changed; historical captures and judgments cannot establish current results."}

: null} + {p && !result ?

{zh ? "可先浏览已采集的测量与记录;深度分析需单独点击,不会随浏览自动运行。" : "Captured measurements and records remain readable. Deep analysis requires a separate action and never runs while browsing."}

: null} {p ?

{p.title}

: null}

{zh ? "分析器判读未校准,仅限所选片段;范围外或未捕获的工作未纳入。数字为“是 / 适用片段”,未知仍在分母中;点选指标可看依据。" : "Uncalibrated judgments of selected episodes only; work outside this scope or not captured is excluded. Counts are yes / eligible episodes, including unknowns. Select a metric for evidence."}

{zh ? "不适用来自原始片段的明确取样规则,不算“否”或“未知”;展开指标可看被排除的片段。" : "Ineligible episodes follow the source's explicit selection, not a no or unknown judgment. Expand a metric to identify them."}

{zh ? "收益检验的“是”不保证收益为正;无益重复的“是”表示发现问题。六项分别判断,不合成总分、成功率或原生收益。" : "Yes for benefit testing does not imply positive utility; yes for repetition identifies a problem. The six judgments are not a total score, success rate or native utility."}

{p?.selection.exhaustive ? (zh ? "仅覆盖声明的固定分析范围,不等于覆盖全部研究。" : "Covers the declared fixed analysis scope, not necessarily the whole study.") : p?.selection.population_episodes == null ? (zh ? "定向抽样,全程覆盖未知。" : "Purposive sample; whole-run coverage is unknown.") : (zh ? "定向抽样,不代表全程。" : "Purposive sample, not the whole run.")}

{zh ? "原生测量缺失时保持未采集;分析器判读不能补成实际收益。完整取样规则与版本在“来源与用量”中。" : "Missing native measurements remain uncaptured; judgments cannot supply realized utility. Full selection rules and revisions are under Sources and usage."}

-
{p && !result ?

{zh ? "所选范围尚未分析" : "No analysis for the selected scope"}

: null}
{p ?

{number(p.episode_count)} {zh ? "个片段" : "episodes"} · {p.selection.exhaustive ? (zh ? "固定范围" : "Fixed scope") : (zh ? "定向抽样" : "Purposive sample")}{result ? (zh ? " · 未校准" : " · Uncalibrated") : ""}

: null}
{packs.length > 1 ? : null}
+
{p ?

{number(p.episode_count)} {zh ? "个片段" : "episodes"} · {p.selection.exhaustive ? (zh ? "固定范围" : "Fixed scope") : (zh ? "定向抽样" : "Purposive sample")}{result ? (zh ? " · 未校准" : " · Uncalibrated") : ""}

: null}
{packs.length > 1 ? : null}
{p ? <> - {p.applicability === "historical" ?

{zh ? "历史分析:来源或方法已变化,不能当作当前判断。" : "Historical analysis: the source or method changed; these are not current judgments."}

: null} {p.native_outcomes ? : null} {p.native_outcomes ? : null} {result?.synthesis ? includeReport && !analysisOpen && <> diff --git a/docs/development/assets/research-report-episodes/research-help-after-desktop.png b/docs/development/assets/research-report-episodes/research-help-after-desktop.png new file mode 100644 index 0000000000..18d82c1033 Binary files /dev/null and b/docs/development/assets/research-report-episodes/research-help-after-desktop.png differ diff --git a/docs/development/assets/research-report-episodes/research-help-after-detail.png b/docs/development/assets/research-report-episodes/research-help-after-detail.png new file mode 100644 index 0000000000..ae6635a989 Binary files /dev/null and b/docs/development/assets/research-report-episodes/research-help-after-detail.png differ diff --git a/docs/development/assets/research-report-episodes/research-help-after-narrow.png b/docs/development/assets/research-report-episodes/research-help-after-narrow.png new file mode 100644 index 0000000000..c735f0c42a Binary files /dev/null and b/docs/development/assets/research-report-episodes/research-help-after-narrow.png differ diff --git a/docs/development/assets/research-report-episodes/research-help-before-desktop.png b/docs/development/assets/research-report-episodes/research-help-before-desktop.png new file mode 100644 index 0000000000..557a0c1a7d Binary files /dev/null and b/docs/development/assets/research-report-episodes/research-help-before-desktop.png differ diff --git a/docs/development/assets/research-report-episodes/research-help-before-narrow.png b/docs/development/assets/research-report-episodes/research-help-before-narrow.png new file mode 100644 index 0000000000..3475980655 Binary files /dev/null and b/docs/development/assets/research-report-episodes/research-help-before-narrow.png differ diff --git a/examples/personal-workspace-browser/research-history.mjs b/examples/personal-workspace-browser/research-history.mjs index 7537385d99..17c370be19 100644 --- a/examples/personal-workspace-browser/research-history.mjs +++ b/examples/personal-workspace-browser/research-history.mjs @@ -147,6 +147,7 @@ export const researchHistoryScenario = { assert.equal(await native.locator('.research-native-basis').evaluate(e => e.open), false); assert.equal(await nativePage.locator('.research-progress-basis').evaluate(e => e.open), false); assert.equal(await nativePage.getByRole('button',{name:'所选范围尚未分析',exact:true}).isVisible(), true, 'Measured progress remains readable before model analysis; the unknown analysis is contextual help'); + assert.equal(await nativePage.locator('.research-progress > header .context-help-trigger').count(), 1, 'Result state and interpretation share one heading help entry'); await nativePage.screenshot({path: resolve(outputDir, 'research-native-default-desktop.png'), animations: 'disabled'}); await native.getByRole('button', {name: /首次提交.*查看原始证据/}).click(); const original = nativePage.getByRole('region', {name: '引用原文', exact: true}); @@ -1069,6 +1070,8 @@ Path(sys.argv[1]).write_text(json.dumps({'goal_id':goal,'display_name':'Syntheti await basis.locator(':scope > summary').click(); assert.match(await nativeResults.innerText(), /历史原生测量/, 'Stale measurements retain their historical identity'); const currentSource = nativeResults.getByRole('button',{name:'当前来源未核验',exact:true}); + assert.equal(await nativeResults.locator(':scope > .research-progress-title .context-help-trigger').count(), 1, 'Historical measurement state and its basis share the owning heading'); + assert.equal(await nativeResults.locator(':scope > .context-help').count(), 0, 'A historical warning is not an orphan glyph between the heading and data'); await currentSource.focus(); await page.getByRole('tooltip').getByText(/当前结果未核验/).waitFor(); await page.keyboard.press('Escape');