Skip to content

Improve track-specific report readability (Browser Use, Replay, Extract, Web Fetch, WCXB, Lexbench) - #401

Merged
lanyue-llk merged 9 commits into
mainfrom
report/trackfix-read
Nov 25, 2026
Merged

lanyue-llk merged 9 commits into
mainfrom
report/trackfix-read

Conversation

@lanyue-llk

Copy link
Copy Markdown
Contributor

Purpose

Second part of #398, after the correctness fixes in #399: track-specific readability findings and the #389 leftovers. Measured values (scores, counts, latencies) are unchanged in every track.

flowchart TD
  D[Measured data] --> L[Home lead: system + population + rate]
  L --> R[Ranking + one-sentence basis]
  R --> M[指标说明: basis, latency policy, coverage rules]
  R --> I[Inventory: diagnose only failures]
  I --> E[Evidence viewer: overview + one section per record]
  C[Release checks / tests] -. guard .-> L & R & I & E
Loading

What changed

Browser Use

  • B3: the home page now opens with the system under test, the population and the pass rate. Example: "CowAgent 使用 GPT-5.6 Sol 驱动 Chromium、Moli 1.1.3,自主完成 90 个网站任务;已记录的 2 个结果中通过 1 个(50.0%)". The scope sentence follows as secondary text.
  • B4: the circle style was on every .audit-ladder span, so whole sentences turned into 30 px circles. It now applies only to .step-no. This also fixes the B7 vertical text at 390 px.
  • B5: the dialog action bar is static below 600 px.
  • B6: all 90 frozen selection rationales now have English text. A test checks that none is left in Chinese.
  • B8: the h1 no longer uses break-all. The pairwise A/B headers are now registry baseline/comparison relations ("只有基线浏览器通过"). The evidence viewer is split into an overview of scalar fields, one section per nested record and an "All" view. The raw JSON download is kept.

Trajectory Replay

  • B10: only failed inventory rows show "诊断". The visual gate tolerates all-pass runs. Curated inline <code> wraps at 390 px.

Web Extract

  • B18 (generated tables): comparison tables are ranked by page-hit macro F1, with ties broken by name. Tables that declare a rank column are checked.
  • B21: the eyebrow is localized. The theme toggle has aria-label and aria-pressed.
  • Remove the last instance knowledge and hidden render state from shared code #389: report.js no longer lists product fields. Python injects them from the benchmark declaration.

Web Fetch / WCXB / Codex saved matrix / Lexbench / WebMainBench

  • B12: a tie of three or more is stated by its size, computed from data, together with the speed leader.
  • B13: one sentence sits beside the ranking. The basis, latency policy and coverage rules moved into "指标说明".
  • B15: empty "—" card lines are dropped. The preview height follows its content, capped at 470 px. Row-to-card anchors are checked.
  • B16: a method shared by every configuration is stated once.
  • B14, partial: author wording was replaced ("入库" → "保存", "旧分数" → "原有分数"). The guide now sorts descending like home. Status bands sit below the H1, with a check. .json evidence is pretty-printed. Timeouts name the limit that fired against the call time. "English" already opens the not-generated notice.
  • B22: Lexbench shows reader labels instead of round_off_baseline. The run ID is secondary.
  • Remove the last instance knowledge and hidden render state from shared code #389: the WebMainBench report derives its attempt links and check counts from the bound data, with a 40-case control.

Not changed here

Baselines

Changed intentionally, text, row order and hashes only:

  • browser-use*: lead, English rationales, pair labels, CSS.
  • trajectory-replay*: diagnose buttons.
  • web-extract-*: row order and eyebrow.
  • web-fetch, wcxb, webmainbench-sample and lexbench*: moved text and labels.

No measured value changed. Allowlists are unchanged. The scorer hash is unchanged, because src/lexbench_webfetch/ was not touched.

Verification

  • uv run --frozen --all-extras python -m pytest tests -n 8 --dist worksteal -q: 21674 passed, 78 skipped, 2 xfailed. lexbench-webfetch version scoring hash unchanged (0fe89317…).
  • make lint-check passes.
  • Fixture reports were rebuilt and screenshotted at 1440/390 px, light/dark, zh/en. Routes covered: Browser Use home and evidence viewer, curated method, Extract, Web Fetch/WCXB and Lexbench. There is no horizontal page scroll.

Closes #398

@lexmount-ocr lexmount-ocr Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Review complete · ebb6e83

This review found 3 issue(s), including 3 blocking issue(s).

@@ -1 +1,4 @@
(()=>{const status=document.getElementById("evidence-viewer-status");const output=document.getElementById("evidence-viewer-content");const raw=document.getElementById("evidence-raw-link");const source=new URLSearchParams(location.search).get("src")||"";const valid=/^artifacts\/[a-z0-9._-]+\/executions\/[0-9]+\/execution-evidence[.]json$/i.test(source)||['data/trajectory-replay-bridge.json','data/trajectory-replay-failure-review.json'].includes(source);const english=document.documentElement.lang==="en";if(!valid){status.textContent=english?"Invalid evidence path.":"证据路径无效。";return;}raw.href=source;raw.hidden=false;fetch(new URL(source,document.baseURI),{credentials:"same-origin"}).then(response=>{if(!response.ok)throw new Error(`HTTP ${response.status}`);return response.json();}).then(value=>{output.textContent=JSON.stringify(value,null,2);status.textContent=english?"Evidence loaded.":"证据已载入。";}).catch(error=>{status.textContent=(english?"Unable to load evidence: ":"无法读取执行证据:")+error.message;});})(); No newline at end of file
(()=>{const status=document.getElementById("evidence-viewer-status");const output=document.getElementById("evidence-viewer-content");const raw=document.getElementById("evidence-raw-link");const tabs=document.getElementById("evidence-viewer-sections");const source=new URLSearchParams(location.search).get("src")||"";const valid=/^artifacts\/[a-z0-9._-]+\/executions\/[0-9]+\/execution-evidence[.]json$/i.test(source)||['data/trajectory-replay-bridge.json','data/trajectory-replay-failure-review.json'].includes(source);const english=document.documentElement.lang==="en";if(!valid){status.textContent=english?"Invalid evidence path.":"证据路径无效。";return;}raw.href=source;raw.hidden=false;
const render=(value,name,pick)=>{output.textContent=JSON.stringify(pick(),null,2);for(const button of tabs.querySelectorAll("button"))button.setAttribute("aria-pressed",String(button.dataset.section===name));};

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

maintainability · low
render never reads its value parameter; the data is supplied entirely by pick(). Remove this parameter and its argument at both call sites to make the function's dependencies explicit.

@media(max-width:600px){main>p.muted,main>h1{width:calc(100% - 28px)}body>nav{padding-inline:14px}}
.publication-article .lead-scope{color:var(--muted);max-width:900px}
@media(max-width:600px){.dialog-actions{position:static}}
.evidence-sections{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.evidence-sections button{padding:7px 12px;border:1px solid var(--line);border-radius:9px;background:var(--panel);color:var(--accent);font:inherit;font-size:13px;cursor:pointer}.evidence-sections button[aria-pressed=true]{background:var(--accent);color:#fff;border-color:var(--accent)}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

bug · medium
The author-level display:flex overrides the browser's default [hidden] styling, and this stylesheet has no hidden-state override. Consequently, tabs.hidden = entries.length < 3 does not hide the controls for scalar-only objects, single-nested-field objects, or {} (which displays a redundant All button). Add .evidence-sections[hidden]{display:none} or apply flex only to .evidence-sections:not([hidden]).

Comment thread src/harness/web_fetch/assets/report.js Outdated
const response=await fetch(source);if(!response.ok)throw Error('HTTP '+response.status);
text=await response.text();
}if(pre.dataset.readable)text=text.replace(/[\x00-\x08\x0b\x0c\x0e-\x1f]/g,c=>'\\x'+c.charCodeAt(0).toString(16).padStart(2,'0'));
}if(/\.json$/i.test((pre.dataset.file||pre.dataset.evidenceFile||'').split(/[?#]/)[0])){try{text=JSON.stringify(JSON.parse(text),null,2)}catch(error){}}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

bug · medium
Parsing and reserializing raw JSON can change the evidence rather than merely indent it. For example, {"id":9007199254740993} is displayed as {"id":9007199254740992}, and duplicate keys are silently discarded. This viewer loads raw response/log artifacts, so such changes can mislead comparisons with the saved output. Use a token-preserving JSON formatter (or retain the original text when lossless formatting is unavailable), and test preservation of large integers and duplicate keys.

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

Addressed OCR round 1 in e2d175d: Web Fetch JSON evidence is now indented only when reserializing preserves every token (large integers, duplicate keys, escapes, number spelling), otherwise the saved bytes are shown, with a Node test for each case; .evidence-sections[hidden] now hides single-section tabs; the unused render parameter is removed.

@lexmount-ocr lexmount-ocr Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Re-review complete · e2d175d

This review found 1 issue(s), including 1 blocking issue(s).

Comment thread src/harness/web_fetch/assets/report.js Outdated
@@ -1,3 +1,6 @@
// Indent JSON only when reserializing preserves every token (large integers, duplicate keys, escapes); otherwise show the saved bytes.
function minifyJson(text){let out='',quoted=false,escaped=false;for(const c of text){if(quoted){out+=c;if(escaped)escaped=false;else if(c==='\\')escaped=true;else if(c==='"')quoted=false}else if(c==='"'){quoted=true;out+=c}else if(!/\s/.test(c))out+=c}return out}
function losslessJson(text){try{const value=JSON.parse(text);return JSON.stringify(value)===minifyJson(text)?JSON.stringify(value,null,2):text}catch(error){return text}}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

performance · medium
Formatting runs synchronously before the large-output safeguard, so large JSON records now require parsing, a character-by-character copy, and up to two serializations on the UI thread. Indentation can also greatly expand small but deeply nested inputs (e.g. 2,000 nested arrays expand from about 4 KB to about 8 MB). The textarea check happens after this work and cannot prevent the stall or allocation spike. Bound formatting by input size and nesting/output budget, falling back to the original text when exceeded; add large and deeply nested JSON regression cases.

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

OCR round 2 (performance) addressed in 5ea2194: JSON is only reformatted below 64 KiB, and the indented form is used only when it stays under 256 KiB; deep-nesting and large-input controls added to tests/test_report_loader.mjs. This was the second OCR cycle.

@lexmount-ocr lexmount-ocr Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Re-review complete · 5ea2194

This review found 2 issue(s), including 2 blocking issue(s).

@@ -1,3 +1,6 @@
// Indent small JSON only when reserializing preserves every token (large integers, duplicate keys, escapes); otherwise show the saved bytes.
function minifyJson(text){let out='',quoted=false,escaped=false;for(const c of text){if(quoted){out+=c;if(escaped)escaped=false;else if(c==='\\')escaped=true;else if(c==='"')quoted=false}else if(c==='"'){quoted=true;out+=c}else if(!/\s/.test(c))out+=c}return out}
function losslessJson(text){if(text.length>64*1024)return text;try{const value=JSON.parse(text);if(JSON.stringify(value)!==minifyJson(text))return text;const indented=JSON.stringify(value,null,2);return indented.length>256*1024?text:indented}catch(error){return text}}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

performance · medium
The output-size guard runs only after the entire indented string has been allocated. For example, the new test's 4,000-character input ('['.repeat(2000)+']'.repeat(2000)) expands to roughly 8 MB before being discarded. Wider structures at similar depth can expand substantially further while still fitting under the 64 KiB input limit. Because this executes synchronously when opening evidence, the fallback does not prevent main-thread stalls or memory pressure. Bound nesting depth or estimate indented output size before calling the pretty-printing stringify; retain the raw text when the bound is exceeded.

const response=await fetch(source);if(!response.ok)throw Error('HTTP '+response.status);
text=await response.text();
}if(pre.dataset.readable)text=text.replace(/[\x00-\x08\x0b\x0c\x0e-\x1f]/g,c=>'\\x'+c.charCodeAt(0).toString(16).padStart(2,'0'));
}if(/\.json$/i.test((pre.dataset.file||pre.dataset.evidenceFile||'').split(/[?#]/)[0]))text=losslessJson(text)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

bug · medium
JSON formatting is bypassed in packaged reports: loadDiagnosticEvidence delegates pre[data-file] to fill(pre) and continues before reaching this line. The generated log dialogs use data-file, and report-loader.js's fill writes the raw text without calling losslessJson, so those JSON records remain unformatted. Apply the same formatting in the delegated loader path and add a test exercising a JSON dialog with fill available.

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

Fixed the packaged-report bypass OCR found: report-loader.js fill now applies the same losslessJson to .json files, with a Node test for indentation and exact-byte fallback (c.f. latest commit).

@lexmount-ocr lexmount-ocr Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Re-review complete · 41f078b

No findings in this incremental review.

@lanyue-llk
lanyue-llk merged commit 544fa9c into main Nov 25, 2026
10 checks passed
@lanyue-llk
lanyue-llk deleted the report/trackfix-read branch November 25, 2026 11:31
lanyue-llk added a commit that referenced this pull request Nov 25, 2026
lanyue-llk added a commit that referenced this pull request Nov 25, 2026
… across tracks (#400)

* Shared report charts, failure-first inventories and detail navigation across tracks

* test(baselines): refresh after rebase on #401

* fix(reporting): paging follows track sort and inline filters, multi-select and button filters survive navigation, restore without track resets; Lexbench fallback within active filters

* test(baselines): refresh for shared inventory script

* fix(reporting): update pager attributes only when they change
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.

Reports: track-specific correctness and readability fixes

1 participant