Skip to content

feat(reporting): share one header, theme, table cue, label and unit system - #403

Merged
lanyue-llk merged 5 commits into
mainfrom
report/shell
Nov 25, 2026
Merged

lanyue-llk merged 5 commits into
mainfrom
report/shell

Conversation

@lanyue-llk

@lanyue-llk lanyue-llk commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Purpose

Reader review #395 found five visual systems across the report tracks: different headers, three theme mechanisms (curated replay had no dark theme), nav that wrapped 3–5 rows at 390 px, wide tables clipped with no cue, highlights with no contest, English plurals like "1 tasks", and mixed number formats. This PR moves the header, theme, design tokens, table cue, empty state, plural forms and unit formats into src/harness/reporting/. Every track now renders under that layer.

New structure

flowchart LR
  subgraph reporting["harness/reporting (shared)"]
    css["shell.css<br/>tokens light/dark · header · table cue · empty state"]
    js["shell.js<br/>theme bootstrap (stored, else system) · toggle · overflow cue · sticky first column"]
    hdr["shell.header()<br/>brand · ≤6 pages + More · language · theme"]
    page["shell.page() / shell.table(empty=, action_columns=)"]
    loc["locales: {n|one|many} · placeholders()"]
    pres["presentation: unit_number / milliseconds / percent<br/>check_shell · check_labels · contested highlights"]
  end
  hdr --> page
  css --> page
  js --> page
  WF["Web Fetch · WCXB · WebMainBench"] --> hdr
  WS["Web Search"] --> page
  WE["Web Extract"] --> hdr
  BU["Browser Use"] --> page
  TR["Replay · curated · public · catalog"] --> page
  pres --> gate["release gate (check_presentation) + baseline snapshot"]
Loading

What changed, by finding

  • A1 header. shell.header is the only header: brand, up to six inline pages, then "More", plus the language link and a named theme button. Tracks pass only their entries. Removed: Web Fetch's .top header and its English regex rebuild (it now calls shell.header), the WCXB/WebMainBench header and nav CSS, Search's pill nav, Extract's uppercase eyebrow and tab toolbar, the Browser Use/Replay body>nav CSS, and the curated nav. shell.navigation and BU chinese_link are deleted. One token set lives in shell.css and was moved out of report-style.css. BU/Replay drop their duplicate copies; curated/public replay, Search, Extract and the replay catalog CSS are mapped onto it, which gives curated replay a dark theme.
  • A2 theme. One bootstrap uses the stored report-theme, otherwise prefers-color-scheme. It removes body.dark, html.dark, the wcxb-theme/webmainbench-theme/browser-use-theme/extract-theme/webfetch-theme keys and every track's theme() function.
  • A3 mobile. Below 700 px the header is two compact rows: brand and controls, then one horizontally scrolling row of pages. Measured header height on every track is 79 px at 390 and 53 px at 1440. The language control no longer covers tabs. The header width follows each track's content width (--shell-max/--shell-pad).
  • A4 tables. For any scrolling table, the shell fades the clipped edge, adds a localized "swipe" hint below 700 px, and keeps the first column sticky when the table has no spans. Web Fetch index-column tables opt out.
  • A5 highlights. A winner needs at least two available values in shell.numeric_winners, Web Fetch comparative_rows and six Extract highlighters. check_presentation now rejects a highlight on a single value (negative control in tests). Single-method cohorts are no longer all green.
  • A9 empty states. shell.table(empty=…) and shell.empty_state. Browser Use tables with no rows now show the empty state instead of a header-only table.
  • A11 labels. The catalog API supports {n|singular|plural}, and the Extract JS tr handles it too. Count strings in all tracks use it, and source-keyed catalogs were renamed to match. Shell labels live in reporting/messages.json. Fixed: the double-escaped BU header (<span data-report-en=…> shown as text), "1 calls"/"21 characters" in the WCXB Chinese pages, and "basis:Every"-style labels in Web Fetch/BU.
  • A12 numbers. UNIT_DIGITS + unit_number/with_unit/milliseconds/percent. ms show whole numbers (curated resource tables, Search detail, replay), and highlight comparisons use the displayed precision. WCXB F1 no longer forces 4 decimals ("100.0000%" → "100.0%"). Extract example timing uses 2 decimals.
  • A14 accessibility. The theme control is a toggle button (aria-pressed follows dark mode). check_shell (run by check_presentation on every shell page and by the shared release gate via the shell-top marker) rejects unnamed buttons, empty h1–h3/summary outside dialogs, escaped markup shown as text, more than six inline pages and an unnamed theme control. Sortable tables can declare action_columns, which get no sort button. Replay's empty evidence heading got a default label.
  • Release checks. check_labels covers plurals after 1, English counts in Chinese pages, and labels that run into their values. The baseline snapshot runs it on every page under the shared header, so all characterization fixtures are covered.

Not in this PR (remaining for #396): putting the primary metric right after the name and folding Mean/P50/P95 into one cell in summary tables, breaking wide tables out of the text column, a registry display-name helper and raw-id release check (A11), and vendoring Mermaid (A15).

Baselines

All 19 changed baselines were refreshed. Route digests changed everywhere because the header, CSS and theme script changed. The outlines change only in page headings and table cells, in these ways:

  • plural wording ("1 task", "1 query")
  • whole-number ms ("1,012.00" → "1,012")
  • Browser Use's double-escaped header is now real markup
  • Extract and Search lose the eyebrow
  • curated replay detail pages show breadcrumbs in place of the eyebrow

Measured values are identical. A script compared every number in every table cell of every page against main, rounded to the displayed precision, and found no differences. The only removed number is the duplicate "90" that the double-escaped BU header printed twice. Scored records sections are unchanged.

Verification

  • uv run --frozen --all-extras python -m pytest -n 8 --dist worksteal → 21688 passed, 78 skipped, 2 xfailed
  • pytest tests/baselines → 31 passed after refresh; make lint-check → clean
  • Allowlists: instance-literal 0 → 0, layering 0 → 0
  • uv run --frozen lexbench-webfetch version: scoring-source hash unchanged (0fe89317…)
  • Fixture reports for all tracks built with rr-scripts/build.py. Shell and label checks pass on 417 shell pages. Screenshots were taken at 1440/390 in light and dark, zh and en, and inspected: no horizontal page overflow, one header shape across tracks, dark theme working on curated replay.

Part of #396

@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 · 4ede964

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

Comment thread src/harness/reporting/shell.js Outdated
@@ -0,0 +1,40 @@
(function(){
if(window.reportShell)return;window.reportShell=true;
var root=document.documentElement,stored;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

style · low
The new script uses var, which the JavaScript review rules explicitly prohibit. Use const for bindings that do not change and let for reassigned bindings throughout this file.

Suggestion:

Suggested change
var root=document.documentElement,stored;
const root=document.documentElement;
let stored;

Comment thread src/harness/reporting/shell.js Outdated
if(window.reportShell)return;window.reportShell=true;
var root=document.documentElement,stored;
try{stored=localStorage.getItem('report-theme')}catch(e){}
root.dataset.theme=stored==='dark'||stored==='light'?stored:(window.matchMedia&&matchMedia('(prefers-color-scheme: dark)').matches?'dark':'light');

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

style · low
This nested ternary violates the JavaScript expression rule. Calculate the system-preference fallback separately, then select between the stored theme and that fallback.

Suggestion:

Suggested change
root.dataset.theme=stored==='dark'||stored==='light'?stored:(window.matchMedia&&matchMedia('(prefers-color-scheme: dark)').matches?'dark':'light');
const systemTheme=window.matchMedia&&window.matchMedia('(prefers-color-scheme: dark)').matches?'dark':'light';
root.dataset.theme=stored==='dark'||stored==='light'?stored:systemTheme;

:root{--shell-max:1240px;--shell-pad:24px}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:15px/1.68 system-ui,-apple-system,"PingFang SC","Microsoft YaHei",sans-serif}a{color:var(--accent)}.wrap,main,footer{max-width:1240px;margin:auto;padding-left:24px;padding-right:24px}.eyebrow{font-size:13px;color:var(--accent);font-weight:750}h1{font-size:30px;line-height:1.25;margin:5px 0}h2{font-size:22px;margin:0 0 12px}h3{font-size:17px;margin:18px 0 8px}p,ul,ol{margin:8px 0}.muted{color:var(--muted)}main{padding-top:20px;padding-bottom:40px}.card{background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:24px;margin-bottom:16px}.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.metric{background:var(--panel2);border-radius:10px;padding:16px}.metric strong{display:block;font-size:25px}.metric span{color:var(--muted)}.principles,.hypothesis-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:14px 0}.principles>div,.hypothesis-grid>div{background:var(--panel2);border-radius:10px;padding:14px}.principles strong,.principles span,.hypothesis-grid strong,.hypothesis-grid span{display:block}.principles span,.hypothesis-grid span{margin-top:4px;color:var(--muted)}.call{border-left:3px solid var(--line);background:var(--panel2);padding:10px 12px;margin:8px 0;border-radius:0 8px 8px 0}.chip{display:inline-block;font-size:12px;background:var(--accent-soft);border-radius:999px;padding:2px 8px;margin:2px}.task-verification{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:16px 0}.task-verification>div,.diagnosis-facts>div{background:var(--panel2);border-radius:9px;padding:11px 12px}.task-verification>div:last-child{grid-column:1/-1}.task-verification strong,.task-verification span,.diagnosis-facts strong,.diagnosis-facts span{display:block}.task-verification span,.diagnosis-facts span{margin-top:3px}.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:10px;margin:12px 0}table{width:100%;border-collapse:collapse;min-width:760px}caption{text-align:left;padding:11px 12px;font-weight:750}th,td{border-top:1px solid var(--line);padding:10px 12px;text-align:left;vertical-align:top}th{background:var(--panel2);font-size:13px}.resource-summary table{min-width:860px}.resource-summary thead:first-of-type th{text-align:center}.resource-summary thead:first-of-type th:first-child{text-align:left}.better{color:var(--good);font-weight:800}.worse{color:var(--bad);font-weight:800}details{border:1px solid var(--line);border-radius:9px;padding:10px 12px;margin:9px 0}summary{cursor:pointer;font-weight:750}pre{white-space:pre-wrap;overflow-wrap:anywhere;background:var(--ink);color:var(--accent-soft);padding:13px;border-radius:8px;font:12px/1.55 ui-monospace,monospace}code{font-family:ui-monospace,monospace}.trace{border-left:3px solid var(--line);padding-left:12px;margin:10px 0}.ok{color:var(--good)}.bad{color:var(--bad)}.note{border-left:5px solid var(--accent)}.pager{display:flex;justify-content:space-between;margin-top:22px}.filters{display:grid;grid-template-columns:repeat(4,minmax(140px,1fr));gap:10px;background:var(--panel2);padding:14px;border-radius:10px;margin:14px 0}.filters label{font-size:12px;color:var(--muted);font-weight:700}.filters select,.filters input{display:block;width:100%;margin-top:4px;padding:8px 9px;border:1px solid var(--line);border-radius:7px;background:var(--panel);color:var(--ink)}.filters button{align-self:end;padding:8px 12px;border:1px solid var(--line);border-radius:7px;background:var(--panel);color:var(--accent);font-weight:700;cursor:pointer}.filter-status{align-self:end;color:var(--muted)}.execution-card[hidden]{display:none}.record-grid{overflow:auto;border:1px solid var(--line);border-radius:10px;background:var(--panel)}.record-grid-head,.execution-summary{display:grid;grid-template-columns:minmax(260px,2.2fr) minmax(95px,.7fr) minmax(80px,.55fr) minmax(80px,.55fr) minmax(190px,1.25fr) minmax(110px,.75fr);gap:12px;align-items:center;min-width:950px;padding:10px 12px}.record-grid-head{background:var(--panel2);font-size:13px;font-weight:800}.execution-card{border-top:1px solid var(--line)}.execution-card:first-of-type{border-top:0}.execution-card>details{border:0;border-radius:0;padding:0;margin:0}.execution-card>details>summary{list-style:none}.execution-card>details>summary::-webkit-details-marker{display:none}.execution-summary>span:first-child::before{content:"▸";color:var(--accent);display:inline-block;width:16px}.execution-card>details[open] .execution-summary>span:first-child::before{content:"▾"}.execution-body{border-top:1px solid var(--line);padding:18px 20px;background:var(--panel);min-width:950px}.diagnosis-panel{border-left:4px solid var(--bad);background:var(--failure-bg);border-radius:0 10px 10px 0;padding:14px 16px;margin-bottom:16px}.diagnosis-panel h3{margin-top:0}.diagnosis-facts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.raw-evidence{background:var(--panel)}footer{padding-bottom:30px;color:var(--muted)}@media(max-width:760px){.grid,.task-verification,.diagnosis-facts,.principles,.hypothesis-grid{grid-template-columns:1fr}.task-verification>div:last-child{grid-column:auto}.filters{grid-template-columns:1fr 1fr}.card{padding:18px}h1{font-size:25px}}
.execution-summary{text-decoration:none;color:var(--ink);font-weight:600}.execution-summary:hover{background:var(--accent-soft)}.execution-summary:focus-visible{outline:3px solid var(--accent);outline-offset:-3px}.execution-summary>span:first-child::before{content:"→"}.attempt-block{margin-top:24px}.ok,.bad{font-weight:750}.hypothesis-grid{grid-template-columns:repeat(3,minmax(0,1fr))}@media(max-width:760px){.hypothesis-grid{grid-template-columns:1fr}}
[hidden]{display:none!important}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:14px}.section-heading h2,.section-heading h3{margin:0}.section-heading>a{font-size:13px;text-decoration:none}.provider-failure-link{display:inline-flex;gap:12px;align-items:center;white-space:nowrap;border:1px solid var(--accent-soft);background:var(--accent-soft);padding:5px 10px;border-radius:7px;text-decoration:none;font-size:13px;font-weight:650}.provider-failure-link:hover{background:var(--accent-soft)}.provider-failure-link:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.suite-filter-panel{background:var(--panel)}.suite-filter-controls{display:grid;grid-template-columns:minmax(200px,1.8fr) minmax(110px,1fr) minmax(160px,1.4fr) minmax(110px,1fr) auto;gap:12px;align-items:end}.suite-filter-controls label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:650;color:var(--muted)}.suite-filter-controls input,.suite-filter-controls select,.suite-filter-controls button{width:100%;min-width:0;height:40px;border:1px solid var(--line);border-radius:8px;padding:8px 10px;font:14px system-ui;background:white;color:var(--ink)}.suite-filter-controls button{color:var(--accent);cursor:pointer;font-weight:650}.suite-filter-controls :is(input,select,button):focus-visible{outline:2px solid var(--accent);outline-offset:2px}.empty-state{text-align:center;padding:44px;color:var(--muted)}@media(max-width:900px){.suite-filter-controls{grid-template-columns:repeat(2,minmax(0,1fr))}.suite-search{grid-column:1/-1}}@media(max-width:600px){.section-heading{align-items:flex-start;flex-wrap:wrap}}

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 new shared dark theme sets --ink to #edf6f7, but the suite filter inputs and selects still force background:white. Consequently, entered search text and selected filter values become nearly white on white in dark mode (and the reset button becomes cyan on white). Replace this background with var(--panel) so these controls remain readable under both themes.

*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:15px/1.68 system-ui,-apple-system,"PingFang SC","Microsoft YaHei",sans-serif}a{color:var(--accent)}.wrap,main,footer{max-width:1240px;margin:auto;padding-left:24px;padding-right:24px}.eyebrow{font-size:13px;color:var(--accent);font-weight:750}h1{font-size:30px;line-height:1.25;margin:5px 0}h2{font-size:22px;margin:0 0 12px}h3{font-size:17px;margin:18px 0 8px}p,ul,ol{margin:8px 0}.muted{color:var(--muted)}main{padding-top:20px;padding-bottom:40px}.card{background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:24px;margin-bottom:16px}.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.metric{background:var(--panel2);border-radius:10px;padding:16px}.metric strong{display:block;font-size:25px}.metric span{color:var(--muted)}.principles,.hypothesis-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:14px 0}.principles>div,.hypothesis-grid>div{background:var(--panel2);border-radius:10px;padding:14px}.principles strong,.principles span,.hypothesis-grid strong,.hypothesis-grid span{display:block}.principles span,.hypothesis-grid span{margin-top:4px;color:var(--muted)}.call{border-left:3px solid var(--line);background:var(--panel2);padding:10px 12px;margin:8px 0;border-radius:0 8px 8px 0}.chip{display:inline-block;font-size:12px;background:var(--accent-soft);border-radius:999px;padding:2px 8px;margin:2px}.task-verification{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:16px 0}.task-verification>div,.diagnosis-facts>div{background:var(--panel2);border-radius:9px;padding:11px 12px}.task-verification>div:last-child{grid-column:1/-1}.task-verification strong,.task-verification span,.diagnosis-facts strong,.diagnosis-facts span{display:block}.task-verification span,.diagnosis-facts span{margin-top:3px}.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:10px;margin:12px 0}table{width:100%;border-collapse:collapse;min-width:760px}caption{text-align:left;padding:11px 12px;font-weight:750}th,td{border-top:1px solid var(--line);padding:10px 12px;text-align:left;vertical-align:top}th{background:var(--panel2);font-size:13px}.resource-summary table{min-width:860px}.resource-summary thead:first-of-type th{text-align:center}.resource-summary thead:first-of-type th:first-child{text-align:left}.better{color:var(--good);font-weight:800}.worse{color:var(--bad);font-weight:800}details{border:1px solid var(--line);border-radius:9px;padding:10px 12px;margin:9px 0}summary{cursor:pointer;font-weight:750}pre{white-space:pre-wrap;overflow-wrap:anywhere;background:var(--ink);color:var(--accent-soft);padding:13px;border-radius:8px;font:12px/1.55 ui-monospace,monospace}code{font-family:ui-monospace,monospace}.trace{border-left:3px solid var(--line);padding-left:12px;margin:10px 0}.ok{color:var(--good)}.bad{color:var(--bad)}.note{border-left:5px solid var(--accent)}.pager{display:flex;justify-content:space-between;margin-top:22px}.filters{display:grid;grid-template-columns:repeat(4,minmax(140px,1fr));gap:10px;background:var(--panel2);padding:14px;border-radius:10px;margin:14px 0}.filters label{font-size:12px;color:var(--muted);font-weight:700}.filters select,.filters input{display:block;width:100%;margin-top:4px;padding:8px 9px;border:1px solid var(--line);border-radius:7px;background:var(--panel);color:var(--ink)}.filters button{align-self:end;padding:8px 12px;border:1px solid var(--line);border-radius:7px;background:var(--panel);color:var(--accent);font-weight:700;cursor:pointer}.filter-status{align-self:end;color:var(--muted)}.execution-card[hidden]{display:none}.record-grid{overflow:auto;border:1px solid var(--line);border-radius:10px;background:var(--panel)}.record-grid-head,.execution-summary{display:grid;grid-template-columns:minmax(260px,2.2fr) minmax(95px,.7fr) minmax(80px,.55fr) minmax(80px,.55fr) minmax(190px,1.25fr) minmax(110px,.75fr);gap:12px;align-items:center;min-width:950px;padding:10px 12px}.record-grid-head{background:var(--panel2);font-size:13px;font-weight:800}.execution-card{border-top:1px solid var(--line)}.execution-card:first-of-type{border-top:0}.execution-card>details{border:0;border-radius:0;padding:0;margin:0}.execution-card>details>summary{list-style:none}.execution-card>details>summary::-webkit-details-marker{display:none}.execution-summary>span:first-child::before{content:"▸";color:var(--accent);display:inline-block;width:16px}.execution-card>details[open] .execution-summary>span:first-child::before{content:"▾"}.execution-body{border-top:1px solid var(--line);padding:18px 20px;background:var(--panel);min-width:950px}.diagnosis-panel{border-left:4px solid var(--bad);background:var(--failure-bg);border-radius:0 10px 10px 0;padding:14px 16px;margin-bottom:16px}.diagnosis-panel h3{margin-top:0}.diagnosis-facts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.raw-evidence{background:var(--panel)}footer{padding-bottom:30px;color:var(--muted)}@media(max-width:760px){.grid,.task-verification,.diagnosis-facts,.principles,.hypothesis-grid{grid-template-columns:1fr}.task-verification>div:last-child{grid-column:auto}.filters{grid-template-columns:1fr 1fr}.card{padding:18px}h1{font-size:25px}}
.execution-summary{text-decoration:none;color:var(--ink);font-weight:600}.execution-summary:hover{background:var(--accent-soft)}.execution-summary:focus-visible{outline:3px solid var(--accent);outline-offset:-3px}.execution-summary>span:first-child::before{content:"→"}.attempt-block{margin-top:24px}.ok,.bad{font-weight:750}.hypothesis-grid{grid-template-columns:repeat(3,minmax(0,1fr))}@media(max-width:760px){.hypothesis-grid{grid-template-columns:1fr}}
[hidden]{display:none!important}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:14px}.section-heading h2,.section-heading h3{margin:0}.section-heading>a{font-size:13px;text-decoration:none}.provider-failure-link{display:inline-flex;gap:12px;align-items:center;white-space:nowrap;border:1px solid var(--accent-soft);background:var(--accent-soft);padding:5px 10px;border-radius:7px;text-decoration:none;font-size:13px;font-weight:650}.provider-failure-link:hover{background:var(--accent-soft)}.provider-failure-link:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.suite-filter-panel{background:var(--panel)}.suite-filter-controls{display:grid;grid-template-columns:minmax(200px,1.8fr) minmax(110px,1fr) minmax(160px,1.4fr) minmax(110px,1fr) auto;gap:12px;align-items:end}.suite-filter-controls label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:650;color:var(--muted)}.suite-filter-controls input,.suite-filter-controls select,.suite-filter-controls button{width:100%;min-width:0;height:40px;border:1px solid var(--line);border-radius:8px;padding:8px 10px;font:14px system-ui;background:white;color:var(--ink)}.suite-filter-controls button{color:var(--accent);cursor:pointer;font-weight:650}.suite-filter-controls :is(input,select,button):focus-visible{outline:2px solid var(--accent);outline-offset:2px}.empty-state{text-align:center;padding:44px;color:var(--muted)}@media(max-width:900px){.suite-filter-controls{grid-template-columns:repeat(2,minmax(0,1fr))}.suite-search{grid-column:1/-1}}@media(max-width:600px){.section-heading{align-items:flex-start;flex-wrap:wrap}}
.case-header{display:flex;align-items:center;gap:24px;padding:15px 0;font-size:13px}.case-header a{text-decoration:none}.case-header span{margin-left:auto}.case-detail h1{font-size:25px}.case-detail h2{font-size:19px}.case-detail h3{font-size:14px}.case-id{font-size:12px;overflow-wrap:anywhere}.case-facts{display:flex;gap:40px;padding:12px 0}.case-facts span,.case-facts strong{display:block}.case-facts span{font-size:12px;color:var(--muted)}.case-facts strong{font-size:19px}.case-detail .diagnosis-panel{padding:12px 14px;margin:10px 0}.case-detail .diagnosis-panel>span{margin-left:16px;font-size:13px}.case-start{font-size:13px;overflow-wrap:anywhere}.case-nav{position:sticky;top:0;z-index:2;background:var(--bg);padding:8px 0;border-bottom:1px solid var(--line);margin-bottom:16px}.case-nav a{background:var(--panel);border:1px solid var(--line);font-size:13px}.case-nav a:hover{background:var(--accent-soft)}.case-detail [id]{scroll-margin-top:66px}.case-detail table{min-width:600px}.case-detail th,.case-detail td{padding:9px 12px;font-size:13px;overflow-wrap:anywhere}.step-comparison table{table-layout:fixed}.step-comparison th:first-child{width:50px}.step-comparison th:nth-child(2){width:38%}.step-comparison small{display:block;color:var(--muted)}.evidence-link{display:block;font-size:12px;margin-top:3px}.evidence-item{border-top:1px solid var(--line);padding:16px 0 4px}.evidence-item .section-heading{margin-bottom:4px}.evidence-item p{font-size:12px}.evidence-item pre{max-height:260px;overflow:auto;margin:8px 0;line-height:1.55}.evidence-item:target{outline:2px solid var(--accent);outline-offset:5px}.case-detail a:focus-visible,.case-detail pre:focus-visible,.case-header a:focus-visible{outline:2px solid var(--accent);outline-offset:3px}@media(max-width:650px){.case-header{flex-wrap:wrap;gap:8px 18px}.case-header span{margin-left:0;width:100%}.case-facts{flex-wrap:wrap;gap:12px 24px}.case-detail .diagnosis-panel>span{display:block;margin:4px 0}.case-detail h1{font-size:22px}}

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 task-detail navigation still sticks at top:0 with z-index:2, but the new shared .shell-top also sticks at top:0 with z-index:30 on desktop. Once the detail page is scrolled, its section links slide underneath the shared header and become obscured and unclickable. Offset .case-nav below the shared header above 700px (and adjust the section scroll margin to cover both bars), retaining top:0 when the mobile header is static.

*{box-sizing:border-box}html{scroll-behavior:smooth;max-width:100%;overflow-x:hidden}body{margin:0;max-width:100%;overflow-x:hidden;background:var(--bg);color:var(--ink);font:15px/1.68 system-ui,-apple-system,"PingFang SC","Microsoft YaHei",sans-serif}a{color:var(--accent)}.wrap,main,footer{width:100%;min-width:0;max-width:1240px;margin:auto;padding-left:24px;padding-right:24px}.eyebrow{font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--accent);font-weight:800}h1{font-size:32px;line-height:1.2;margin:5px 0;overflow-wrap:anywhere}h2{font-size:22px;margin:0 0 12px}h3{font-size:17px;margin:18px 0 8px}p,ul,ol{margin:8px 0}.muted{color:var(--muted)}main{overflow:hidden;padding-top:24px;padding-bottom:44px}.card{min-width:0;background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:26px;margin-bottom:18px;box-shadow:0 5px 18px #2637560a}.hero{padding:30px 34px;background:var(--panel)}.hero h2{font-size:28px;line-height:1.3;max-width:900px;overflow-wrap:anywhere}.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.metric{min-width:0;background:var(--panel2);border-radius:12px;padding:17px;border:1px solid var(--panel2)}.metric strong{display:block;font-size:26px;line-height:1.25}.metric span{color:var(--muted);font-size:13px}.metric.good{background:var(--success-bg);border-color:var(--line)}.metric.good strong{color:var(--good)}.metric.warn{background:var(--callout);border-color:var(--line)}.metric.warn strong{color:var(--warn)}.insight-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.insight{min-width:0;border:1px solid var(--line);border-radius:13px;padding:18px;background:var(--panel)}.insight.good{border-left:5px solid var(--good);background:var(--success-bg)}.insight.warn{border-left:5px solid var(--warn);background:var(--callout)}.insight h3{margin:0 0 6px}.insight strong{font-size:22px}.score-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.score-card{min-width:0;border:1px solid var(--line);border-radius:13px;padding:18px}.score-card h3{margin:0 0 12px}.score-line{display:grid;grid-template-columns:92px 1fr 72px;gap:10px;align-items:center;margin:9px 0}.bar{height:10px;background:var(--panel2);border-radius:99px;overflow:hidden}.bar>i{display:block;height:100%;background:var(--accent);border-radius:99px}.score-card.moli .bar>i{background:#7057d9}.principles,.hypothesis-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:14px 0}.principles>div,.hypothesis-grid>div{background:var(--panel2);border-radius:10px;padding:14px}.principles strong,.principles span,.hypothesis-grid strong,.hypothesis-grid span{display:block}.principles span,.hypothesis-grid span{margin-top:4px;color:var(--muted)}.call{border-left:3px solid var(--line);background:var(--panel2);padding:10px 12px;margin:8px 0;border-radius:0 8px 8px 0}.chip{display:inline-block;font-size:12px;background:var(--accent-soft);border-radius:999px;padding:2px 8px;margin:2px}.task-verification{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:16px 0}.task-verification>div,.diagnosis-facts>div{background:var(--panel2);border-radius:9px;padding:11px 12px}.task-verification>div:last-child{grid-column:1/-1}.task-verification strong,.task-verification span,.diagnosis-facts strong,.diagnosis-facts span{display:block}.task-verification span,.diagnosis-facts span{margin-top:3px}.table-wrap{max-width:100%;overflow:auto;overscroll-behavior-inline:contain;border:1px solid var(--line);border-radius:10px;margin:12px 0;scrollbar-width:thin}.table-wrap:focus-visible,.record-grid:focus-visible{outline:3px solid var(--accent);outline-offset:2px}table{width:100%;border-collapse:collapse;min-width:760px}caption{text-align:left;padding:11px 12px;font-weight:750}th,td{border-top:1px solid var(--line);padding:10px 12px;text-align:left;vertical-align:top}th{background:var(--panel2);font-size:13px}.resource-summary table{min-width:860px}.resource-summary thead:first-of-type th{text-align:center}.resource-summary thead:first-of-type th:first-child{text-align:left}.metric-legend{margin:8px 0 4px;color:var(--muted);font-size:12px}.metric-policy{display:inline-block;margin-left:7px;padding:1px 6px;border:1px solid var(--line);border-radius:999px;color:var(--muted);font-size:10px;font-weight:750;white-space:nowrap}.metric-policy.lower,.metric-policy.higher{border-color:var(--line);color:var(--good);background:var(--success-bg)}.better{color:var(--good);font-weight:800}.worse{color:var(--bad);font-weight:800}details{border:1px solid var(--line);border-radius:9px;padding:10px 12px;margin:9px 0}summary{cursor:pointer;font-weight:750}pre{white-space:pre-wrap;overflow-wrap:anywhere;background:var(--ink);color:var(--accent-soft);padding:13px;border-radius:8px;font:12px/1.55 ui-monospace,monospace}code{font-family:ui-monospace,monospace}.trace{border-left:3px solid var(--line);padding-left:12px;margin:10px 0}.ok{color:var(--good)}.bad{color:var(--bad)}.note{border-left:5px solid var(--accent)}.note-inline{background:var(--callout);border-left:4px solid var(--warn);padding:11px 13px;border-radius:0 8px 8px 0}.pager{display:flex;justify-content:space-between;gap:18px;margin-top:22px}.pager a:last-child{text-align:right}.filters{display:grid;grid-template-columns:repeat(4,minmax(140px,1fr));gap:10px;background:var(--panel2);padding:14px;border-radius:10px;margin:14px 0}.filters label{font-size:12px;color:var(--muted);font-weight:700}.filters select,.filters input{display:block;width:100%;margin-top:4px;padding:8px 9px;border:1px solid var(--line);border-radius:7px;background:var(--panel);color:var(--ink)}.filters button{align-self:end;padding:8px 12px;border:1px solid var(--line);border-radius:7px;background:var(--panel);color:var(--accent);font-weight:700;cursor:pointer}.filters button:hover{background:var(--accent-soft)}.filter-status{align-self:end;color:var(--muted)}.execution-card[hidden]{display:none}.record-grid{max-width:100%;overflow:auto;border:1px solid var(--line);border-radius:10px;background:var(--panel)}.record-grid-head,.execution-summary{display:grid;grid-template-columns:minmax(260px,2.2fr) minmax(95px,.7fr) minmax(80px,.55fr) minmax(90px,.6fr) minmax(190px,1.25fr) minmax(110px,.75fr);gap:12px;align-items:center;min-width:970px;padding:10px 12px}.record-grid-head{background:var(--panel2);font-size:13px;font-weight:800}.execution-card{border-top:1px solid var(--line)}.execution-card:first-of-type{border-top:0}.execution-card>details{border:0;border-radius:0;padding:0;margin:0}.execution-card>details>summary{list-style:none}.execution-card>details>summary::-webkit-details-marker{display:none}.execution-summary>span:first-child::before{content:"▸";color:var(--accent);display:inline-block;width:16px}.execution-card>details[open] .execution-summary>span:first-child::before{content:"▾"}.execution-body{border-top:1px solid var(--line);padding:18px 20px;background:var(--panel);min-width:950px}.diagnosis-panel{border-left:4px solid var(--bad);background:var(--failure-bg);border-radius:0 10px 10px 0;padding:14px 16px;margin-bottom:16px}.diagnosis-panel h3{margin-top:0}.diagnosis-facts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.raw-evidence{background:var(--panel)}footer{padding-bottom:30px;color:var(--muted)}@media(max-width:760px){.wrap,main,footer{padding-left:14px;padding-right:14px}.score-grid,.insight-grid,.task-verification,.diagnosis-facts,.principles,.hypothesis-grid{grid-template-columns:1fr}.grid{grid-template-columns:repeat(2,minmax(0,1fr))}.task-verification>div:last-child{grid-column:auto}.filters{grid-template-columns:1fr 1fr}.card{padding:18px;border-radius:12px}.hero{padding:22px 20px}.hero h2{font-size:22px}h1{font-size:25px}}@media(max-width:480px){.metric{padding:14px 12px}.metric strong{font-size:23px}.filters{grid-template-columns:1fr}.score-line{grid-template-columns:82px 1fr 58px;gap:7px}}
@media(max-width:760px){.stackable{border:0;overflow:visible}.stackable table,.stackable tbody,.stackable tr,.stackable td{display:block;width:100%}.stackable table{min-width:0}.stackable thead{display:none}.stackable caption{display:block;margin-bottom:10px;border:1px solid var(--line);border-radius:9px;background:var(--panel2)}.stackable tbody{display:grid;gap:10px}.stackable tr{border:1px solid var(--line);border-radius:9px;overflow:hidden;background:var(--panel)}.stackable td{display:grid;grid-template-columns:minmax(105px,.8fr) minmax(0,1.4fr);gap:12px;border-top:1px solid var(--line);overflow-wrap:anywhere}.stackable td:first-child{border-top:0}.stackable td::before{content:attr(data-label);color:var(--muted);font-size:12px;font-weight:750}:is(.resource-summary,.rule-comparison,.step-comparison)::before{content:"左右滑动查看完整表格 →";display:block;padding:8px 10px;color:var(--muted);font-size:12px;font-weight:700;background:var(--panel)}.record-grid{overflow:visible;border:0}.record-grid-head{display:none}.execution-card{margin-bottom:10px;border:1px solid var(--line);border-radius:9px;overflow:hidden}.execution-summary{min-width:0;grid-template-columns:1fr 1fr;padding:13px}.execution-summary>span{display:grid;grid-template-columns:70px minmax(0,1fr);gap:8px;overflow-wrap:anywhere}.execution-summary>span::before{content:attr(data-label);color:var(--muted);font-size:12px;font-weight:700;width:auto}.execution-summary>span:first-child{grid-column:1/-1;font-weight:750}.execution-summary>span:first-child::before{content:attr(data-label);width:auto}.execution-summary>span:nth-child(5){grid-column:1/-1}}@media(max-width:480px){.stackable td{grid-template-columns:95px minmax(0,1fr)}}
.execution-summary{text-decoration:none;color:var(--ink);font-weight:600}.execution-summary:hover{background:var(--accent-soft)}.execution-summary:focus-visible{outline:3px solid var(--accent);outline-offset:-3px}.execution-summary>span:first-child::before{content:"→"}.attempt-block{margin-top:24px}.ok,.bad{font-weight:750}.hypothesis-grid{grid-template-columns:repeat(3,minmax(0,1fr))}@media(max-width:760px){.hypothesis-grid{grid-template-columns:1fr}}
[hidden]{display:none!important}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:14px}.section-heading h2,.section-heading h3{margin:0}.section-heading>a{font-size:13px;text-decoration:none}.provider-failure-link{display:inline-flex;gap:12px;align-items:center;white-space:nowrap;border:1px solid var(--accent-soft);background:var(--accent-soft);padding:5px 10px;border-radius:7px;text-decoration:none;font-size:13px;font-weight:650}.provider-failure-link:hover{background:var(--accent-soft)}.provider-failure-link:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.suite-filter-panel{background:var(--panel)}.suite-filter-controls{display:grid;grid-template-columns:minmax(200px,1.8fr) minmax(110px,1fr) minmax(160px,1.4fr) minmax(110px,1fr) auto;gap:12px;align-items:end}.suite-filter-controls label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:650;color:var(--muted)}.suite-filter-controls input,.suite-filter-controls select,.suite-filter-controls button{width:100%;min-width:0;height:40px;border:1px solid var(--line);border-radius:8px;padding:8px 10px;font:14px system-ui;background:white;color:var(--ink)}.suite-filter-controls button{color:var(--accent);cursor:pointer;font-weight:650}.suite-filter-controls :is(input,select,button):focus-visible{outline:2px solid var(--accent);outline-offset:2px}.empty-state{text-align:center;padding:44px;color:var(--muted)}@media(max-width:900px){.suite-filter-controls{grid-template-columns:repeat(2,minmax(0,1fr))}.suite-search{grid-column:1/-1}}@media(max-width:600px){.section-heading{align-items:flex-start;flex-wrap:wrap}}

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 suite filter controls still use background:white, but the newly enabled shared dark theme sets --ink to #edf6f7 (and the button's --accent to light cyan). Consequently, entered search text and selected filter values are nearly invisible against the white controls in dark mode. Replace this remaining literal background with var(--panel) so the foreground and background switch together.

Comment on lines +355 to +356
add('length', t('too_little_content_returned', 'Too little content returned'), t('at_least_characters_3', 'At least {get} {get|character|characters}', get=str(metrics.get('minimum_content_chars', t('not_provided_by_the_record', 'Not provided by the record')))),
t('characters_3', '{get} {get|character|characters}', get=str(metrics.get('content_chars', t('not_provided_by_the_record', 'Not provided by the record')))))

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 · low
The new plural placeholders receive stringified counts, but locales.plural() selects singular only when count == 1. Consequently, a recorded count of 1 still renders as “1 characters” (and the field checks above render “1 records”). Pass numeric values through unchanged; formatting already converts them to text, and textual missing-value fallbacks safely select the plural branch. Apply the same fix to the newly pluralized length check in report_explainer.py.

Comment thread src/harness/web_fetch/wcxb_report.py Outdated
style=asset_text('wcxb.css')
script=asset_text('wcxb.js').replace('/*mermaid-script-attributes*/',mermaid_script_attributes('loader'))
style=shell.CSS+asset_text('wcxb.css')
script=shell.SCRIPT+asset_text('wcxb.js').replace('/*mermaid-script-attributes*/',mermaid_script_attributes('loader'))

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 · low
The shared bootstrap sets document.documentElement.dataset.theme and never adds body.dark, but renderFlow() in wcxb.js still checks document.body.classList.contains('dark'). Consequently, opening a WCXB report in dark mode now always renders its Mermaid diagram with the neutral theme. Update that check to use document.documentElement.dataset.theme === 'dark' as part of this migration.

vals+=cell(ms(r['elapsed_ms']),r['elapsed_ms'])+cell(link(target,h('metric_evidence', 'Metric evidence →')))
inspect_rows.append((_wmb_row_attrs(case,r),vals))
analysis+=section(h('page_results_and_responses', 'Page results and responses'),'<p class="wmb-metric-note">'+h('the_complete_matrix_contains_results_and_initially', 'The complete matrix contains {case_count}×{method_count} results and initially shows the {failed_request_count} conversions without body text. Each row states whether body text was produced and whether the final API/worker material is body text, an error response, an error page or no readable response. Open the track ID or method for the complete response, human reference, component scores and the currently supported cause.', case_count=case_count, method_count=method_count, failed_request_count=failed_request_count)+'</p>'+_wmb_controls(cases,labels,english,default_request='failed',failure_types=failure_types)+'<p class="wmb-scroll-note">'+h('scroll_horizontally_for_component_scores_and_latency', 'Scroll horizontally for component scores and latency; both the track ID and method name open the detail.')+'</p>'+_wmb_filter_table(['Track ID',h('method', 'Method'),h('language', 'Language'),h('difficulty', 'Difficulty'),h('table', 'Table'),h('code', 'Code'),h('formula', 'Formula'),h('body_text_produced', 'Body text produced'),h('response_and_body', 'Response and body')]+[metric_labels[m] for m in metric_order[1:]]+[h('final_fetch_latency', 'Final fetch latency'),h('detail', 'Detail')],inspect_rows,'wmb-attempt-matrix',english))
analysis+=section(h('page_results_and_responses', 'Page results and responses'),'<p class="wmb-metric-note">'+h('the_complete_matrix_contains_results_and_initially', 'The complete matrix contains {case_count}×{method_count} {method_count|result|results} and initially shows the {failed_request_count} conversions without body text. Each row states whether body text was produced and whether the final API/worker material is body text, an error response, an error page or no readable response. Open the track ID or method for the complete response, human reference, component scores and the currently supported cause.', case_count=case_count, method_count=method_count, failed_request_count=failed_request_count)+'</p>'+_wmb_controls(cases,labels,english,default_request='failed',failure_types=failure_types)+'<p class="wmb-scroll-note">'+h('scroll_horizontally_for_component_scores_and_latency', 'Scroll horizontally for component scores and latency; both the track ID and method name open the detail.')+'</p>'+_wmb_filter_table(['Track ID',h('method', 'Method'),h('language', 'Language'),h('difficulty', 'Difficulty'),h('table', 'Table'),h('code', 'Code'),h('formula', 'Formula'),h('body_text_produced', 'Body text produced'),h('response_and_body', 'Response and body')]+[metric_labels[m] for m in metric_order[1:]]+[h('final_fetch_latency', 'Final fetch latency'),h('detail', 'Detail')],inspect_rows,'wmb-attempt-matrix',english))

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 · low
Choose the result noun using result_count, not method_count. With multiple cases and one method, this renders e.g. “10×1 result” even though there are ten results. Use {result_count|result|results} and pass result_count=result_count to h().

return sum(target_body[row["attempt_id"]] for row in records if row["provider"] == provider)
css = asset_text("webmainbench-full.css")
js = asset_text("webmainbench-full.js")
css = shell.CSS + asset_text("webmainbench-full.css")

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 shared theme sets only html[data-theme], but webmainbench-full.css still uses .dark .presentation-slide, .dark .slide-facts div, and .dark .slide-facts strong. Consequently, the generated presentation slides (including the error-landscape section) retain white backgrounds while inheriting the body's near-white dark-theme text. Migrate these remaining selectors to [data-theme="dark"] as well so slide headings and prose remain readable.

const script=document.createElement('script');
script.textContent='{'+doc.querySelector('script').textContent+'}';
// The page's own script closes its body; the shared shell script stays in the head.
script.textContent='{'+[...doc.querySelectorAll('body > script')].pop().textContent+'}';

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
Notify the shared shell after installing the saved page (e.g. dispatch report-ready on window after appending its script). stored(path) fetches asynchronously, so DOMContentLoaded/load can run while the placeholder is still present. The shell does not observe DOM replacements, and the report script does not reinitialize it; consequently the newly loaded tables have no overflow hint, fade, sticky first column, or scroll listener until a later click/resize happens. The theme button is unaffected because its handler is delegated.

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

Addressed every review finding in 0c95441:

  • shell.js: switched to const/let and split the nested ternary into systemTheme.
  • Curated and public replay filter controls: background:white is now var(--panel).
  • .case-nav (curated/public) and Search .level-tabs: they now stick at var(--shell-offset), which the shell sets to 53px on desktop and 0 below 700px, where the header is static. Detail section scroll-margin-top includes the offset.
  • Replay standalone article.html: assets/report.css now starts with the shared tokens, so the downloaded article keeps its colors.
  • Stringified counts: locales.plural reads counts written as text ("1", "1,000"), so report_diagnostic/report_explainer render "1 character".
  • WCXB Mermaid theme reads documentElement.dataset.theme. WebMainBench slide selectors use [data-theme="dark"].
  • WebMainBench matrix sentence: the noun follows result_count.
  • Search delivery loader dispatches report-ready after it installs the saved page, so the shell marks its tables.

@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 · 0c95441

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

.shell-top .shell-theme{width:34px;padding:0;font-size:16px}.shell-top .shell-controls a:hover,.shell-top .shell-theme:hover{border-color:var(--accent);text-decoration:none}
.shell-top a:focus-visible,.shell-top summary:focus-visible,.shell-theme:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
@media(max-width:700px){:root{--shell-offset:0px}.shell-top{position:static}.shell-nav{flex-wrap:wrap;padding:6px 16px;gap:2px 4px}.shell-brand{flex:1;order:1}.shell-controls{order:2}.shell-links{order:3;flex:1 0 calc(100% - 96px);margin:0 -4px}.shell-more{order:4}.shell-more>div{position:fixed;left:16px;right:16px;top:auto;min-width:0}}
[data-overflow]{-webkit-mask-image:var(--shell-fade);mask-image:var(--shell-fade)}

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 mask is applied to the entire scroll container, so it also fades the pinned first column once scrollLeft > 1. For example, Search table cells have 10px padding, which puts the beginning of their row labels inside this 28px fade even though those labels are not clipped. This persists at the rightmost scroll position and undermines keeping row identifiers readable. Exempt sticky-column tables from the left mask, or draw the overflow cue at the boundary of the scrolling columns without masking the pinned cells.

Comment thread src/harness/reporting/shell.css Outdated
@media(max-width:700px){:root{--shell-offset:0px}.shell-top{position:static}.shell-nav{flex-wrap:wrap;padding:6px 16px;gap:2px 4px}.shell-brand{flex:1;order:1}.shell-controls{order:2}.shell-links{order:3;flex:1 0 calc(100% - 96px);margin:0 -4px}.shell-more{order:4}.shell-more>div{position:fixed;left:16px;right:16px;top:auto;min-width:0}}
[data-overflow]{-webkit-mask-image:var(--shell-fade);mask-image:var(--shell-fade)}
[data-overflow="right"]{--shell-fade:linear-gradient(to left,transparent 0,#000 28px)}[data-overflow="left"]{--shell-fade:linear-gradient(to right,transparent 0,#000 28px)}[data-overflow="left right"]{--shell-fade:linear-gradient(to right,transparent 0,#000 28px,#000 calc(100% - 28px),transparent 100%)}
table[data-sticky-first] tr>:first-child{position:sticky;left:0;z-index:1;background:var(--panel)}table[data-sticky-first] thead tr>:first-child{z-index:2;background:var(--panel2)}

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 pinned body cells now have z-index:1, but the other sticky headers in tracks such as Replay still have z-index:auto. In a vertically bounded inventory, scrolling both down and sideways lets first-column body cells paint over the non-first-column headers as those headers slide underneath the pinned column. Give all sticky header cells a layer above body cells, and keep the top-left header above both.

t('at_least_records_provide_this_field', '{get}: at least {get2} records provide this field', get=str(check.get('field', t('unnamed_field', 'Unnamed field'))), get2=str(check.get('minimum', t('not_provided_by_the_record', 'Not provided by the record')))),
t('records_provide_this_field', '{get} records provide this field', get=str(check.get('count', t('not_provided_by_the_record', 'Not provided by the record')))))
t('at_least_records_provide_this_field', '{get}: at least {get2} {get2|record|records} provide this field', get=str(check.get('field', t('unnamed_field', 'Unnamed field'))), get2=str(check.get('minimum', t('not_provided_by_the_record', 'Not provided by the record')))),
t('records_provide_this_field', '{get} {get|record|records} provide this field', get=str(check.get('count', t('not_provided_by_the_record', 'Not provided by the record')))))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

other · low
For a count of 1, this renders “1 record provide this field”; the minimum-count message above has the same subject–verb mismatch. English uses these inline strings directly. Please pluralize the verb too, using {get|provides|provide} here and {get2|provides|provide} above (non-blocking wording fix).

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

Round 2, fixed in 5e412aa:

  • Pinned first column: when a scrolling table has a sticky first column, the shell no longer applies the left fade. Only the far edge fades.
  • Sticky layering: inside a table with a pinned column, every thead th sits at z-index 2 and the top-left header at 3, so the headers stay above pinned body cells.
  • Wording: "provides/provide" now agrees with the record count.

The other comments re-anchored on this head are the round-1 findings. All were fixed in 0c95441 (details in the earlier comment).

@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 · 5e412aa

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

Comment thread src/harness/reporting/shell.css Outdated
[data-overflow]{-webkit-mask-image:var(--shell-fade);mask-image:var(--shell-fade)}
[data-overflow="right"]{--shell-fade:linear-gradient(to left,transparent 0,#000 28px)}[data-overflow="left"]{--shell-fade:linear-gradient(to right,transparent 0,#000 28px)}[data-overflow="left right"]{--shell-fade:linear-gradient(to right,transparent 0,#000 28px,#000 calc(100% - 28px),transparent 100%)}
table[data-sticky-first] tr>:first-child{position:sticky;left:0;z-index:1;background:var(--panel)}table[data-sticky-first] thead th{z-index:2}table[data-sticky-first] thead tr>:first-child{z-index:3;background:var(--panel2)}
@media(max-width:700px){[data-overflow][data-hint]::before{content:attr(data-hint);display:block;position:sticky;left:0;width:max-content;max-width:calc(100vw - 48px);padding:4px 10px;font-size:12px;color:var(--muted)}table[data-sticky-first] tr>:first-child{max-width:42vw}}

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 · low
The hint's presence depends on the current faded edge rather than whether the table overflows. For a sticky-first table, shell.js removes data-overflow at the rightmost scroll position (the left fade is deliberately suppressed). This removes the in-flow hint and shifts the table and following content upward; scrolling back inserts it again. Keep the hint's space/presence tied to horizontal overflow independently of the edge-mask attribute so swiping to either end does not change the layout.

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

Rebased onto main (#401) and squashed into a72a91d. b985e04 adds the remaining fixes:

  • Swipe hint (round-3 low): the hint now depends on data-scrollable, which is set whenever the table overflows. Reaching either edge no longer adds or removes it, so the layout stays put.
  • Merged Improve track-specific report readability (Browser Use, Replay, Extract, Web Fetch, WCXB, Lexbench) #401's Extract header work into the shell. The localized eyebrow stays in .page-head. The theme control is now a real toggle on every track: aria-pressed reflects dark mode, aria-label is "Dark theme"/"深色主题", and check_shell requires both.
  • Replay compaction checks now wait for header.shell-top.

Full suite: 21688 passed. Every table number in every baseline page matches main.

@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 · b985e04

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

Comment thread src/harness/reporting/presentation.py Outdated
Comment on lines +78 to +80
for string in soup.find_all(string=True):
if string.find_parent(_VERBATIM) is None and (match := _ESCAPED_MARKUP.search(str(string))):
raise ValueError(f'Escaped markup shown as text: {match.group(0)!r}')

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
Restrict these text checks to report-authored UI, or explicitly exempt evidence containers. Browser Use renders public task intent in <p> and reviewed reasons in a <div> using _e(...), so legitimately quoted <span> or <a> markup in those values is correctly escaped but now fails the presentation release gate. The same scope problem affects check_labels: preserved English task text containing 3 pages on a Chinese page is rejected as an untranslated label. Add evidence exemptions and regression tests so valid source content does not prevent report validation.

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

Fixed the round-4 finding in ef69ee2. The escaped-markup rule in check_shell now reads only report-authored chrome (shared header, h1–h3, th, summary, button, label, caption, legend, dt), so escaped markup inside quoted task intent and reviewed reasons passes. check_labels skips verbatim elements (pre, code, blockquote, q), [data-verbatim], and text whose lang differs from the page. Regression tests cover both.

@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 · ef69ee2

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

Comment thread src/harness/reporting/presentation.py Outdated
Comment on lines +71 to +72
if not (button.get_text(strip=True) or button.get('aria-label', '').strip()
or button.get('title', '').strip() or button.get('aria-labelledby')):

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
A nonempty aria-labelledby is not necessarily an accessible name. For example, <button aria-labelledby="missing"></button> passes this gate even when no matching element exists; referencing an empty element also passes. Resolve the whitespace-separated ID references and require a nonempty naming source rather than accepting the attribute alone. Add negative controls for missing and empty targets.

if language.startswith('zh'):
rules.append((_ENGLISH_COUNT, 'Untranslated English count in a Chinese page'))
page_language = language.split('-')[0]
for string in soup.find_all(string=True):

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
BeautifulSoup includes Comment nodes in find_all(string=True), so check_labels('<html lang="en"><body><!-- 1 tasks --><p>1 task</p></body></html>') raises despite the rendered labels being valid. Since this check gates baseline pages, non-rendered comments can cause false failures. Skip comment/declaration nodes before applying the reader-label rules and add a regression test.

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

Fixed both round-5 findings in 01c562a. A button named by aria-labelledby now counts as named only when a referenced element exists and has text, with negative controls for a missing and an empty target. check_labels now skips comments and other non-rendered nodes, with a regression test. The Python (1/3) failure on the previous head was tests/test_local_task_replacement.py, which this PR does not touch; it passes three times locally and in the full local suite (21690 passed).

@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 · 01c562a

No findings in this incremental review.

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

Rebased onto #400. Its inventories, charts and detail navigation now sit under the shared header, and a detail page's way back is rendered above the heading through a new before_heading slot in shell.page. Full suite: 21709 passed. Every table number in every baseline page matches main.

@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 · 74fe280

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

Comment thread src/harness/reporting/presentation.py Outdated
"configurations", "browsers", "rankings", "family rankings", "task families", "characters",
"attempts", "records", "rounds", "errors", "providers", "outputs")
_SINGULAR_PLURAL = re.compile(r"(?<![\d.,/])\b1 (" + "|".join(COUNTED_NOUNS) + r")\b")
_ENGLISH_COUNT = re.compile(r"(?<![\d.,])\b\d[\d,]* (" + "|".join(COUNTED_NOUNS) + r")\b")

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 Chinese-page check only recognizes plural English nouns. For example, <html lang="zh-CN"><p>1 task</p></html> passes check_labels: _ENGLISH_COUNT cannot match task, and the singular/plural check correctly does not reject it either. This leaves untranslated single-item labels undetected by the new baseline validation, including the singular forms produced by the plural formatter. Include both singular and plural forms in _ENGLISH_COUNT (keeping _SINGULAR_PLURAL plural-only), and add Chinese-page tests for 1 task, 1 call, and 1 result alongside the existing verbatim/language exemptions.

body+=section(t('method_resources', 'Method resources'),'<p class="actions">'+link('../adoption/index.html#'+model['pricing_anchor'],t('pricing_billing', 'Pricing & billing →'))+link('../adoption/index.html#interface-'+name,t('interfaces_examples', 'Interfaces & examples →'))+'</p>')
return body+section(t('execution_records', '{count} execution records', count=len(records)),inventory(controls+table(headers,[attempt_row(r,cases[r['case_id']],diagnose=True, ctx=ctx) for r in records],'filtered-table')),'all-results')
JS=asset_text('report.js').replace('/*mermaid-script-attributes*/',mermaid_script_attributes('script'))+explorer.INVENTORY_SCRIPT
JS=shell.SCRIPT+asset_text('report.js').replace('/*mermaid-script-attributes*/',mermaid_script_attributes('script'))+explorer.INVENTORY_SCRIPT

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 extension-package path still copies assets/report.js directly into the package (report_package.py:1093), bypassing this concatenation. That asset no longer contains theme initialization, and report-loader.js only injects the parsed body, so the new inline shell.HEAD_SCRIPT never executes there either. Consequently, shared-header pages in extension packages have inert theme controls and no table overflow/sticky initialization. Include shell.SCRIPT in the extension package's executable script too, and update its byte-equality validation accordingly.

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

Fixed both new findings in bf8b4d1. Web Fetch extension packages now ship shell.SCRIPT ahead of the report controls (_extension_controls()), and the byte check compares against the same bytes. The extension keeps its baseline style.css on purpose, because that file is bound by byte equality. On Chinese pages, check_labels now rejects singular English counts too (1 task, 1 call, 1 result), with tests. Full suite: 21714 passed.

@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 · bf8b4d1

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

Comment thread src/harness/web_fetch/report.py Outdated
parts=[t('quotes_and_authors_of_failed_checks_match', 'Quotes and authors of {count} failed checks match the reference', count=len(comparisons))]
if compact:parts.append(t('records_have_complete_tag_text_but_no', '{compact} records have complete tag text but no readable separator between tags', compact=compact))
if contaminated:parts.append(t('records_have_tag_fields_mixed_with_extra', '{contaminated} records have tag fields mixed with extra text or missing text', contaminated=contaminated))
if compact:parts.append(t('records_have_complete_tag_text_but_no', '{compact} {compact|record|records} have complete tag text but no readable separator between tags', compact=compact))

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 · low
The singular noun now leaves a plural verb: when compact == 1, this renders “1 record have complete tag text”. The adjacent contaminated-record message has the same issue, as do stable_failure_summary() (“Only 1 record are”) and the excluded-results banner (“1 result are excluded”). Make the verb count-aware too, e.g. {compact|has|have} and {complete|is|are}, and add count-one assertions; the current label checker only checks noun forms, so it does not catch these outputs.

Suggestion:

Suggested change
if compact:parts.append(t('records_have_complete_tag_text_but_no', '{compact} {compact|record|records} have complete tag text but no readable separator between tags', compact=compact))
if compact:parts.append(t('records_have_complete_tag_text_but_no', '{compact} {compact|record|records} {compact|has|have} complete tag text but no readable separator between tags', compact=compact))

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

Fixed in 56a5752. Every pluralized sentence whose verb followed the noun now uses a count-aware verb ({n|is|are}, {n|has|have}, {n|was|were}): 16 strings across Web Fetch, WebMainBench, Search, Browser Use, Replay and Extract.

…stem across tracks

The reporting shell owns the header (brand, six inline pages plus More,
language and a dark-theme toggle), light/dark tokens, a theme bootstrap that
follows the stored choice or the system preference, a scroll cue with a pinned
first column for wide tables, an empty state, plural forms in the catalog API
and one display precision per unit. Highlights need two available values.
Every track renders under it; check_shell and check_labels enforce the rules.
@lanyue-llk lanyue-llk changed the title Reports: one shared header, theme, table cue, label and unit system across tracks feat(reporting): share one header, theme, table cue, label and unit system Nov 25, 2026

@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 · cf7d86f

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

Comment thread src/harness/web_fetch/report_i18n.py Outdated
f'{links}<a href="{chinese}" hreflang="zh-CN">中文</a>'
'<button class="theme-toggle" onclick="theme()">Toggle theme</button></nav></header>')
links = [(html.escape(_relative(english, PurePosixPath("en") / path), quote=True), label) for path, label in NAV]
current = html.escape(_relative(english, english), quote=True)

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 · low
On nested English section pages, this produces index.html, but the corresponding navigation entry is e.g. ../datasets/index.html. shell.header() compares these strings directly, so no section is marked aria-current="page", and active sections under More also lose their current marker. Derive current using the same route representation as links (or normalize both before comparison).

for name in ('index.html', 'style.css'):
shutil.copyfile(baseline/name, destination/name)
(destination/'report.js').write_bytes((Path(__file__).parent/'assets/report.js').read_bytes())
(destination/'report.js').write_bytes(_extension_controls())

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
This breaks extensions of pre-migration publications. The baseline is only required to have manifest schema 3, and its stylesheet and retained page markup are reused unchanged. Those pages still invoke theme() via their legacy buttons, but _extension_controls() supplies neither that function nor a listener for those buttons, so clicking them now raises a ReferenceError. Newly generated shell headers also lack their styles when the copied baseline stylesheet predates this migration. Preserve compatibility for legacy baseline pages and supply the shared styles, or explicitly migrate/validate the baseline presentation before installing these controls. Add an extension test using a pre-shell baseline; the current synthetic baseline does not exercise this contract.

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

Fixed both findings in 8be5599, with a test.

  • English Web Fetch header: current is now taken from the matching NAV entry in the links' own relative form, so nested sections such as Dataset, including those under More, get aria-current.
  • Extension packages of pre-shell baselines: _extension_controls() adds the shell styles (as a <style data-shell-css> prepended before the baseline stylesheet) and a legacy theme() that updates the shared theme state, so older pages' buttons keep working and new shell headers are styled. The baseline style.css byte binding is unchanged.

@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 · 8be5599

No findings in this incremental review.

@lanyue-llk
lanyue-llk merged commit 1501c30 into main Nov 25, 2026
11 checks passed
@lanyue-llk
lanyue-llk deleted the report/shell branch November 25, 2026 13:29
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