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 @@ -187,7 +187,7 @@ function NativeResults({native, zh, onCitation}: {native: ResearchProgressPack["
<div><dt>{zh ? "来源" : "Source"}</dt><dd>{native.artifact}<br/><code>{native.artifact_sha256}</code></dd></div></dl>
<dl>{points.map(([key, cn, en]) => {
const point = outcomes[key];
return point ? <div key={key}><dt>{zh ? cn : en}</dt><dd>{String(point.value)} {outcomes.metric.unit}<br/><code>{point.candidate_ref}</code><br/>{zh ? "提交" : "Submission"} {point.submission_index} · {zh ? "提交时间" : "Submitted at"}: {point.submitted_at ?? (zh ? "未知" : "Unknown")}<br/>{zh ? "收到结果" : "Result received"}: {point.observed_at}</dd></div> : null;
return point ? <div key={key}><dt>{zh ? cn : en}</dt><dd>{String(point.value)} {outcomes.metric.unit}<br/><code>{point.candidate_ref}</code><br/>{zh ? "提交" : "Submission"} {point.submission_index} · {zh ? "提交时间" : "Submitted at"}: {point.submitted_at ?? (zh ? "未知" : "Unknown")}<br/>{zh ? "观测时间" : "Observed at"}: <time dateTime={point.observed_at}>{point.observed_at}</time></dd></div> : null;
})}</dl>
<ul>{outcomes.limitations.map((line, i) => <li key={i}>{line}</li>)}</ul>
</details></div>
Expand Down
10 changes: 10 additions & 0 deletions examples/personal-workspace-browser/research-native-reading.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,12 @@ export const researchNativeReadingScenario = {
assert.match(await native.locator(".research-native-best .research-native-unit").textContent(), new RegExp(c.unit ?? "points"), "The raw unit remains visible even when no valid measurement exists");
assert.match(await native.locator(".research-native-scope").innerText(), new RegExp(`${c.values.filter(v => v !== null).length} / ${c.values.length}.*有效结果`));
if (c.partial) assert.match(await native.innerText(), /部分窗口 · 起点未知/);
if (c.id === "partial") {
const sources = native.locator(".research-native-basis");
await sources.locator("summary").click();
assert.match(await sources.innerText(), /提交时间: 未知\s+观测时间: 2026-01-01T00:03:00Z/);
await sources.locator("summary").click();
}
if (c.id === "invalid-first") {
const measureUnknownRetention = () => native.evaluate(section => {
const retained = section.querySelector('[data-native-point="retained"]');
Expand Down Expand Up @@ -267,6 +273,10 @@ export const researchNativeReadingScenario = {
await selector.selectOption({label: "decimal"});
await page.waitForFunction(() => document.querySelector('[data-native-point="best_valid"] strong')?.textContent === "0.8765");
assert.equal(await page.locator("[data-retained-improvement]").textContent(), "+0.0642");
const sources = page.locator(".research-native-basis");
await sources.locator("summary").click();
assert.match(await sources.innerText(), /Submitted at: Unknown\s+Observed at: 2026-01-01T00:02:00Z/);
await sources.locator("summary").click();
await page.getByRole("button", {name: "About native measurements", exact: true}).focus();
await page.getByRole("tooltip").waitFor({state: "visible"});
await page.keyboard.press("Escape");
Expand Down
Loading