Repository navigation
Shared report charts, failure-first inventories and detail navigation across tracks - #400
Conversation
There was a problem hiding this comment.
This review found 13 issue(s), including 13 blocking issue(s).
| + "</div>" | ||
| + "".join(dialogs) |
There was a problem hiding this comment.
The diagnosis dialogs remain outside the inventory wrapper, so following the failed row's “Open diagnosis” → evidence link never records an inventory trail. INVENTORY_SCRIPT records it only for clicks inside the wrapper on the row's first link. On this main failure-investigation path, the new detail navigation therefore has no previous/next links and its back link loses the active filters (or uses a stale trail). Record the row's trail when opening its diagnosis dialog, or explicitly wire the dialog's detail links to the same trail-recording logic.
| ? T.analysisIntro | ||
| : population(); | ||
| let filters = `<div class="filters"><label>${T.search}<input id="query" type="search" placeholder="${esc(T.search)}"></label><label>${T.stratum}<select id="stratum"><option value="">${T.all}</option>${M.strata.map((s) => `<option value="${s}">${esc(T.strata[s] || s)}</option>`).join("")}</select></label><label>${T.relation}<select id="relation"><option value="">${T.all}</option><option value="failure" ${kind === "results" ? "selected" : ""}>${esc(T.filterFail)}</option>${["bothPass", "gain", "bothFail", "loss", "mixed"].map((s) => `<option value="${s}">${esc(T[s])}</option>`).join("")}</select></label></div><div class="subtle" id="count"></div>`; | ||
| let filters = `<div class="filters"><label>${T.search}<input id="query" type="search" placeholder="${esc(T.search)}"></label><label>${T.stratum}<select id="stratum"><option value="">${T.all}</option>${M.strata.map((s) => `<option value="${s}">${esc(T.strata[s] || s)}</option>`).join("")}</select></label><label>${T.relation}<select id="relation"><option value="">${T.all}</option><option value="failure" ${kind === "results" ? "selected" : ""}>${esc(T.filterFail)}</option>${["bothPass", "gain", "bothFail", "loss", "mixed"].map((s) => `<option value="${s}">${esc(T[s])}</option>`).join("")}</select></label></div><p class="inventory-notice" id="inventory-fallback" role="status" hidden>${esc(message("no_failures_showing_all"))}</p><div class="subtle" id="count"></div>`; |
There was a problem hiding this comment.
message() reads T.messages[key] and throws when the key is missing, but the new no_failures_showing_all entry is at the locale root in both languages. This unconditional call therefore throws whenever an inventory is rendered, including dataset and analysis views—not just the all-passing fallback. Read T.no_failures_showing_all here, or move both entries into their locale's messages object.
| for holder, mark in marks: | ||
| value = holder.get("data-chart-value", "") | ||
| drawn = _style_percent(mark, "width" if figure["data-chart"] == "ranked-bar" else "left") | ||
| expected = 0.0 if value == "" else round(100 * float(value), 1) |
There was a problem hiding this comment.
The renderer computes positions/text from the original float but stores data-chart-value rounded to six decimals, so this second rounding can reject valid generated charts. For example, Bar("A", 0.0025001) renders width:0.3% and text 0.3%, but stores 0.002500; the checker computes round(0.25, 1) == 0.2 and raises. Continuous quality_f1 scores feed these bars, and check_presentation now invokes this check on reports. Preserve round-trip precision in both bar and dumbbell data attributes, or use one consistently rounded value for rendering and validation; cover boundary values in tests.
| const rowsOf=root=>{const r=[...root.querySelectorAll('[data-inventory-row]')];return r.length?r:[...root.querySelectorAll('tbody tr')]}; | ||
| const linkOf=row=>row.querySelector('a[data-inventory-detail]')||row.querySelector('a[href]'); | ||
| function paginate(root,extra){const size=+root.dataset.inventoryPageSize||100,more=root.querySelector('[data-inventory-more]');root._limit=extra?root._limit+size:size;let shown=0,left=0;rowsOf(root).forEach(r=>{if(r.hidden){r.style.removeProperty('display');return}if(shown<root._limit){shown++;r.style.removeProperty('display')}else{left++;r.style.display='none'}});if(more){more.hidden=!left;more.dataset.remaining=left;more.setAttribute('aria-label',more.textContent.trim()+' ('+left+')')}return shown} | ||
| function save(root,controls){const url=new URL(location.href);[...url.searchParams.keys()].filter(k=>k.startsWith('f.')).forEach(k=>url.searchParams.delete(k));controls.forEach((c,i)=>{const v=c.type==='checkbox'?(c.checked?'1':'0'):c.value;if(v)url.searchParams.set('f.'+key(c,i),v)});history.replaceState(history.state,'',url)} |
There was a problem hiding this comment.
Persist empty filter values too. Web Fetch and Browser Use use value="" for “All” but render a failure default. Selecting All, opening a detail, and following Back therefore reloads the failure default because the URL omits that selection. With another saved filter, restored=true also prevents the empty-view fallback. Set the parameter even for an empty string (restoration already distinguishes "" from null), and add a back-navigation regression test for All with both passing and failing rows.
| root.querySelector('[data-inventory-more]')?.addEventListener('click',()=>paginate(root,true)); | ||
| const shown=paginate(root,false),result=root.querySelector(root.dataset.inventoryResult||'[data-inventory-result-control]'),fallback=root.dataset.inventoryFallback||''; | ||
| if(!restored&&!shown&&rowsOf(root).length&&result&&result.value!==fallback){result.value=fallback;fire(result);paginate(root,false);const notice=root.querySelector('[data-inventory-notice]');if(notice)notice.hidden=false} | ||
| root.addEventListener('click',e=>{const a=e.target.closest('a[href]'),row=a&&a.closest('[data-inventory-row],tbody tr');if(!row||!root.contains(row)||a!==linkOf(row))return;const items=rowsOf(root).filter(r=>!r.hidden).map(linkOf).filter(Boolean).map(x=>x.href);try{sessionStorage.setItem(TRAIL,JSON.stringify({back:location.href,items:[...new Set(items)]}))}catch(_){}})} |
There was a problem hiding this comment.
The element-identity check skips other links to the same detail page. WebArena rows have a marked participant link and a separate “Evidence page” link to the same URL; Web Extract similarly has a case-ID link and a marked evidence link. Opening these unmarked links does not record the trail, so previous/next and the filtered Back link are missing (or use a stale trail). Accept links whose resolved href matches the row's canonical detail link, rather than requiring the exact same anchor element.
| search = cid + " " + truth[cid]["url"] + " " + error | ||
| inventory.append( | ||
| f'<tr data-case="{cid}" data-status="{"pass" if ok else "fail"}" data-method="{r["method"]}" data-stage="{r["failure_stage"]}" data-outcome="{"correct" if correct and ok else "wrong"}" data-search="{esc(search, quote=True)}" {data_fields}><td>{esc(names.get(r["method"], r["method"]))}</td><td><a href="{url}"><code>{cid[:12]}</code></a></td><td>{status}</td>{field_cells}<td>{r.get("http_status") or "—"}</td><td data-sort="{r.get("elapsed_seconds", "")}">{elapsed}</td><td><button data-call-log-open="diagnosis" data-src="{evidence}"{evidence_key}{label_attr}>{lab[9]}</button> · <a href="{url}">' | ||
| f'<tr data-case="{cid}" data-status="{"pass" if ok else "fail"}" data-method="{r["method"]}" data-stage="{r["failure_stage"]}" data-outcome="{"correct" if correct and ok else "wrong"}" data-search="{esc(search, quote=True)}" {data_fields}><td>{esc(names.get(r["method"], r["method"]))}</td><td><a href="{url}"><code>{cid[:12]}</code></a></td><td>{status}</td>{field_cells}<td>{r.get("http_status") or "—"}</td><td data-sort="{r.get("elapsed_seconds", "")}">{elapsed}</td><td><button data-call-log-open="diagnosis" data-src="{evidence}"{evidence_key}{label_attr}>{lab[9]}</button> · <a data-inventory-detail href="{url}">' |
There was a problem hiding this comment.
Adding data-inventory-detail only to the “Full result” link makes the case-ID link bypass navigation tracking: the shared click handler records the trail only when the clicked anchor equals linkOf(row), which now selects the marked link. Opening the same detail via its case ID therefore leaves previous/next hidden (or uses a stale trail), and Back loses the current filters. Allow both links to record the row's canonical detail trail; merely marking both is insufficient because linkOf returns only the first match.
| passed=sum(succeeded(r,cases[r['case_id']], ctx=ctx) for r in rs) | ||
| called=[r for r in rs if r.get('report_invocation_status') != 'adapter_rejected'] | ||
| bars.append(charts.Bar.rate(label,passed,n,f'providers/{name}.html')) | ||
| pairs.append(charts.Pair(label,sum(bool(r['ok']) for r in called)/len(called) if called else None,passed/n if n else None,f'providers/{name}.html')) |
There was a problem hiding this comment.
The two rates can use different populations, so their gap does not necessarily represent returned responses that failed task requirements. comparison_population removes evaluation exclusions, but retains undecidable results (rule_review_status == 'unresolved', nullable acceptance checks, or file results without a boolean verdict). These count in called but not in n. For example, one measured passing call and one unsuccessful undecidable call produce 50% request success versus 100% task pass. Use the same decidable, invoked population for both endpoints if the gap is intended to measure task failures after a successful request; otherwise explicitly describe the differing denominators and remove that interpretation.
| const criteria=c=>{const x=c.criteria;return '<div class="compare-criteria" data-task-criteria><strong>'+esc(L.criteria)+'</strong>'+(c.quality_excluded?'<p data-quality-excluded>'+esc(L.quarantined)+'</p>':'')+(x.answer!=null?'<p>'+esc(L.referenceAnswer)+': <b>'+esc(x.answer)+'</b></p>':'')+(x.urls.length?'<p>'+esc(L.referenceUrls)+'</p>'+x.urls.map(u=>'<a href="'+esc(u)+'" target="_blank" rel="noopener noreferrer">'+esc(u)+'</a>').join(''):'')+(x.official_sources&&Object.keys(x.official_sources).length?'<details><summary>'+esc(L.sourceRules)+'</summary><p>'+[...(x.official_sources.domains||[]),...(x.official_sources.url_prefixes||[])].map(esc).join('<br>')+'</p>'+x.official_sources.sources.map(u=>'<a href="'+esc(u)+'" target="_blank" rel="noopener noreferrer">'+esc(u)+'</a>').join('')+'</details>':'')+(x.domains.length?'<p>'+esc(L.requestedSites)+': '+x.domains.map(esc).join(', ')+'</p>':'')+((x.paper_ids.length||x.repositories.length||Object.keys(x.aliases).length)?'<details><summary>'+esc(L.equivalents)+'</summary><pre>'+esc(JSON.stringify({aliases:x.aliases,papers:x.paper_ids,repositories:x.repositories},null,2))+'</pre></details>':'')+(!x.urls.length&&x.answer==null&&!x.domains.length?'<p>'+esc(L.unannotated)+'</p>':'')+'</div>'}; | ||
| function matching(){let q=$('[data-output-query]').value.toLowerCase(),benchmark=$('[data-output-benchmark]').value,check=$('[data-output-check]').value;return data.cases.filter(c=>(benchmark==='all'||(benchmark==='excluded'?c.quality_excluded:c.benchmark===benchmark&&!c.quality_excluded))&&(check==='all'||c.check_types.includes(check))&&(!focusedId||c.id===focusedId)&&(!q||c.query.toLowerCase().includes(q)||c.id.toLowerCase().includes(q)))} | ||
| function render(){root.querySelectorAll('[data-compare-method]').forEach(x=>x.disabled=x.value===$('[data-compare-baseline]').value);let cases=matching(),metric=$('[data-compare-metric]').value,base=$('[data-compare-baseline]').value,others=selected(),counts={},matches=[];for(let c of cases){let r=relation(c.outputs[base]?.[metric],others.map(m=>c.outputs[m]?.[metric]));counts[r]=(counts[r]||0)+1;if($('[data-compare-relation]').value==='all'||r===$('[data-compare-relation]').value)matches.push(c)} | ||
| function render(){root.querySelectorAll('[data-compare-method]').forEach(x=>x.disabled=x.value===$('[data-compare-baseline]').value);let cases=matching(),metric=$('[data-compare-metric]').value,base=$('[data-compare-baseline]').value,others=selected(),counts={},matches=[];for(let c of cases){let r=relation(c.outputs[base]?.[metric],others.map(m=>c.outputs[m]?.[metric]));counts[r]=(counts[r]||0)+1;const chosen=$('[data-compare-relation]').value;if(chosen==='all'||r===chosen||chosen==='any_miss'&&r!=='all_pass'&&r!=='unknown')matches.push(c)} |
There was a problem hiding this comment.
The new any_miss filter hides known failures whenever another selected method has no verdict: relation(false, [null]) returns unknown, which this condition excludes. This is supported by comparison_data, which emits null outputs for missing rows and null primary verdicts for methods outside the relevance cohort. It also excludes all cases when only the baseline remains selected, even if it fails. Compute any_miss directly from the selected verdicts using .some(v => v === false), independently of the relation classification.
| function matching(){let q=$('[data-output-query]').value.toLowerCase(),benchmark=$('[data-output-benchmark]').value,check=$('[data-output-check]').value;return data.cases.filter(c=>(benchmark==='all'||(benchmark==='excluded'?c.quality_excluded:c.benchmark===benchmark&&!c.quality_excluded))&&(check==='all'||c.check_types.includes(check))&&(!focusedId||c.id===focusedId)&&(!q||c.query.toLowerCase().includes(q)||c.id.toLowerCase().includes(q)))} | ||
| function render(){root.querySelectorAll('[data-compare-method]').forEach(x=>x.disabled=x.value===$('[data-compare-baseline]').value);let cases=matching(),metric=$('[data-compare-metric]').value,base=$('[data-compare-baseline]').value,others=selected(),counts={},matches=[];for(let c of cases){let r=relation(c.outputs[base]?.[metric],others.map(m=>c.outputs[m]?.[metric]));counts[r]=(counts[r]||0)+1;if($('[data-compare-relation]').value==='all'||r===$('[data-compare-relation]').value)matches.push(c)} | ||
| function render(){root.querySelectorAll('[data-compare-method]').forEach(x=>x.disabled=x.value===$('[data-compare-baseline]').value);let cases=matching(),metric=$('[data-compare-metric]').value,base=$('[data-compare-baseline]').value,others=selected(),counts={},matches=[];for(let c of cases){let r=relation(c.outputs[base]?.[metric],others.map(m=>c.outputs[m]?.[metric]));counts[r]=(counts[r]||0)+1;const chosen=$('[data-compare-relation]').value;if(chosen==='all'||r===chosen||chosen==='any_miss'&&r!=='all_pass'&&r!=='unknown')matches.push(c)} | ||
| if(!fallbackChecked){fallbackChecked=true;if(!matches.length&&cases.length&&$('[data-compare-relation]').value==='any_miss'){$('[data-compare-relation]').value='all';$('[data-relation-fallback]').hidden=false;return render()}} |
There was a problem hiding this comment.
The fallback notice can make a false all-hit claim. An entirely unscored selection also reaches this branch, and once shown the notice remains visible after changing methods, metrics, or filters to a selection containing failures; no other code resets its visibility. Use a neutral 'No matching misses; showing all relations' message unless every selected verdict is confirmed true, and hide or recompute the notice when the selection changes.
| hit = s["metrics"][hit_key] | ||
| hits = None if hit["mean"] is None else round(hit["mean"] * hit["n"]) | ||
| bars.append(charts.Bar(esc(m["label"]), hit["mean"], f"{hits}/{hit['n']}" if hits is not None else "")) | ||
| pairs.append(charts.Pair(esc(m["label"]), s["nonempty"] / s["n"] if s["n"] else None, hit["mean"])) |
There was a problem hiding this comment.
The two rates can have different query populations. aggregate() counts all rows in n/nonempty, but excludes null anchor-hit metrics from hit['mean']; the scorer emits null for queries without reference anchors. For a mixed overview, the gap therefore does not measure queries returning results without the known page as the caption claims, and the hit rate can even exceed the nonempty rate. Compute both rates over the same anchor-annotated rows (and describe that scope), or present these as separate metrics without interpreting their difference.
|
All 13 review findings are fixed in b8307ef:
The browser test now covers late filtering, the diagnosis-path trail and the All round trip. Full suite: 21674 passed. Lint is clean. Baselines were refreshed. |
There was a problem hiding this comment.
This review found 1 issue(s), including 1 blocking issue(s).
| if value and f"{expected:.1f}%" not in row.select_one(".chart-value").get_text(): | ||
| raise ValueError("Chart value text differs from its mark") |
There was a problem hiding this comment.
The dumbbell check does not associate displayed percentages with their series. For a pair (0.9, 0.75), changing the text to First 75.0% → Second 90.0% still passes because both expected percentages occur somewhere in the row. Removing all [data-chart-mark] elements also passes because the validation loop becomes empty. This lets misleading or missing drawings through check_presentation. Keep independent per-series values on the row and identifiable per-series text elements, then validate each series' text and required mark (allowing absent marks only for unavailable values). Add negative controls for swapped percentages and deleted marks.
|
Second round, fixed in d77a064:
The earlier findings are carried over on unchanged lines and were already fixed in b8307ef (see the previous comment). Full suite: 21676 passed. Lint is clean. |
There was a problem hiding this comment.
This review found 1 issue(s), including 1 blocking issue(s).
| if(typeof addEventListener==='function')addEventListener('hashchange',detail); | ||
| function start(){document.querySelectorAll('[data-inventory]').forEach(init);detail()} | ||
| // Run after the track's own scripts, which are deferred or wait for DOMContentLoaded. | ||
| if(document.readyState==='complete'||typeof addEventListener!=='function')setTimeout(start);else addEventListener('load',()=>setTimeout(start)); |
There was a problem hiding this comment.
Initialize the shared inventory/navigation on report-ready as well as initial load. Web Fetch's packaged report loader replaces document.body asynchronously on each route and dispatches report-ready (assets/report-loader.js:142–144); its existing track script listens to that event, but this script runs start() only once. Consequently newly loaded inventories never get pagination, fallback, filter persistence or trail recording, and detail navigation is not initialized after the replacement. Register a post-render initialization hook (after the track filters), and ensure detail matching works with the loader's hash-based routes.
|
Fixed the report-ready finding (explorer.py:243) in c167d35:
New browser test |
There was a problem hiding this comment.
This review found 2 issue(s), including 2 blocking issue(s).
| // visible order, so every path to that row's detail page gets previous/next and back. | ||
| root.addEventListener('click',e=>{const row=e.target.closest('[data-inventory-row],tbody tr');if(row&&root.contains(row))record(root)})} | ||
| function dialogFor(){const d=document.querySelector('[data-inventory-dialog]');if(!d||d._ready)return d;d._ready=true;d.querySelector('[data-dialog-close]')?.addEventListener('click',()=>d.close());d.addEventListener('close',()=>d._opener?.focus());return d} | ||
| document.addEventListener('click',e=>{const b=e.target.closest('[data-inventory-diagnosis]'),d=b&&dialogFor();if(!d)return;const t=b.nextElementSibling;if(!t||!t.matches('template[data-diagnosis-content]'))return;d._opener=b;d.querySelector('[data-dialog-body]').replaceChildren(t.content.cloneNode(true));d.showModal()}); |
There was a problem hiding this comment.
Diagnosis links break in packaged Web Fetch reports. diagnosis() supplies relative attempt URLs, but the package loader's fixLinks(page.body, ...) only visits DOM descendants, not template.content. Cloning the template here therefore exposes unconverted links such as ../attempts/…html; these navigate outside the package instead of opening its #page=… route (including the run-log link). Ensure template links are resolved against the source report page and converted by the package link rewriter before displaying the dialog.
| if result is None: | ||
| raise ValueError("Inventory lacks its result control") | ||
| selected = result.select_one("option[selected]") or result.select_one("option") | ||
| if selected is None or selected.get("value") in ("", root.get("data-inventory-fallback")): |
There was a problem hiding this comment.
This does not enforce the failure-first contract: a selected value="pass" (or any other nonempty, non-fallback value) passes validation. For example, check_inventory(inventory_fixture(selected="pass")) succeeds with the existing test fixture, so the release gate misses a pass-only default. Validate against an explicitly declared failure value or supported failure values, and add a pass-default negative test.
|
Fixed both findings in dbb8783:
Full suite: 21678 passed. Lint is clean. Baselines were refreshed. |
There was a problem hiding this comment.
✅ Re-review complete · dbb8783
No findings in this incremental review.
dbb8783 to
29eeb04
Compare
There was a problem hiding this comment.
This review found 7 issue(s), including 7 blocking issue(s).
| if (route() !== "dataset" && relation?.value === "failure" && M.cases.length && | ||
| M.cases.every((c) => pairStatus(c) === "bothPass")) { |
There was a problem hiding this comment.
The fallback checks all cases rather than the initial filtered inventory. wireInventory() first restores stratum from the hash, so opening a stratum whose tasks all pass still shows an empty failure inventory if any other stratum contains a failure. Check for failures within the active initial filters, then clear only the relation filter when that view has no failures (and adjust the notice to describe the filtered scope).
| const rowsOf=root=>{const r=[...root.querySelectorAll('[data-inventory-row]')];return r.length?r:[...root.querySelectorAll('tbody tr')]}; | ||
| const linkOf=row=>row.querySelector('a[data-inventory-detail]')||row.querySelector('a[href]'); | ||
| function paginate(root,extra){const size=+root.dataset.inventoryPageSize||100,more=root.querySelector('[data-inventory-more]');root._limit=extra?root._limit+size:size;let shown=0,left=0;rowsOf(root).forEach(r=>{if(r.hidden){r.style.removeProperty('display');return}if(shown<root._limit){shown++;r.style.removeProperty('display')}else{left++;r.style.display='none'}});if(more){more.hidden=!left;more.dataset.remaining=left;more.setAttribute('aria-label',more.textContent.trim()+' ('+left+')')}return shown} | ||
| function save(root,controls){const url=new URL(location.href);[...url.searchParams.keys()].filter(k=>k.startsWith('f.')).forEach(k=>url.searchParams.delete(k));controls.forEach((c,i)=>url.searchParams.set('f.'+key(c,i),c.type==='checkbox'?(c.checked?'1':'0'):c.value));history.replaceState(history.state,'',url)} |
There was a problem hiding this comment.
Multi-select filters lose selections on the detail/back round trip. Web Extract's participating inventory contains select[multiple][data-comparison-methods], but c.value serializes only its first selected option, and assigning c.value in init deselects the others. Consequently, returning to the inventory changes the compared methods and matching results. Serialize all selected options for multiple selects and restore their selected states before dispatching filter events; add a regression with at least two selected competitors.
| function refresh(root,extra){paginate(root,extra);settle(root)} | ||
| function record(root){const items=rowsOf(root).filter(r=>!r.hidden).map(linkOf).filter(Boolean).map(x=>x.href);try{sessionStorage.setItem(TRAIL,JSON.stringify({back:location.href,items:[...new Set(items)]}))}catch(_){}} | ||
| function init(root){if(root._inventory)return;root._inventory=true;const controls=[...root.querySelectorAll('select,input:not([type=button])')].filter(c=>!c.closest('dialog')),params=new URL(location.href).searchParams;controls.forEach((c,i)=>{const v=params.get('f.'+key(c,i));if(v===null)return;if(c.type==='checkbox')c.checked=v==='1';else c.value=v;root._settled=true;fire(c)}); | ||
| let queued=false;const observer=new MutationObserver(()=>{if(queued)return;queued=true;requestAnimationFrame(()=>{queued=false;refresh(root,false)})});rowsOf(root).forEach(r=>observer.observe(r,{attributes:true,attributeFilter:['hidden']})); |
There was a problem hiding this comment.
Repaginate when inventory rows are reordered, not just when hidden changes. Web Extract's inventory is data-sortable; its header handlers reorder existing rows without changing hidden. After the shared pager hides everything beyond the first 100, sorting therefore keeps displaying the original 100 rows rather than the first 100 in the newly requested order (e.g. the largest latencies can remain hidden after sorting descending). Observe child-list changes on the row container or provide a refresh hook called by sorting, and test sorting with more than one page of matching rows.
| ) | ||
| grid_head = f'<div class="record-grid-head" aria-hidden="true"><span>{t("replay.column.task", "Task")}</span><span>{t("public.correctness.browser", "Browser")}</span><span>{t("public.suite.programmatic_acceptance", "Programmatic acceptance")}</span><span>{t("public.execution.tool_call", "Tool call")}</span><span>{t("replay.filter.error_category", "Error category")}</span><span>{t("public.metric.duration", "Trajectory execution duration")}</span></div>' | ||
| return f"""{filter_anchors}<section class="card" id="failure-review"><div class="section-heading"><h2>{t("public.results.failure_analysis", "Failure analysis")}</h2><a href="#execution-results">{t("public.review.view_records", "View execution records")}</a></div><p>{t("public.review.body", "Groups <strong>{count}</strong> failed results by direct evidence in error logs, BrowserTool traces and evaluator output.", count=final_failures)}</p>{review_table}<p class="muted">{t("public.review.note", "This is not a second scoring. Categories only summarize direct failure mechanisms; Element not visible, HAR not matched and the like do not automatically mean a browser-internal root cause.")}</p></section><section class="card" id="execution-results"><h2>{t("replay.detail.execution_records", "Execution records")}</h2><p>{t("public.review.records_body", "{count} task × browser results. Failed results show by default; open a task to see the actions, answers, verdicts, error stack and BrowserTool trace of the adopted result.", count=logical_executions)}</p>{filters}<div id="execution-list" class="record-grid" role="region" aria-label="{t("public.review.records_label", "Per-task execution records")}" tabindex="0">{grid_head}{_execution_details(manifest, summary, detail_pages)}</div><p id="execution-empty" class="empty-state" role="status" hidden></p>{script}</section>""" | ||
| return f"""{filter_anchors}<section class="card" id="failure-review"><div class="section-heading"><h2>{t("public.results.failure_analysis", "Failure analysis")}</h2><a href="#execution-results">{t("public.review.view_records", "View execution records")}</a></div><p>{t("public.review.body", "Groups <strong>{count}</strong> failed results by direct evidence in error logs, BrowserTool traces and evaluator output.", count=final_failures)}</p>{review_table}<p class="muted">{t("public.review.note", "This is not a second scoring. Categories only summarize direct failure mechanisms; Element not visible, HAR not matched and the like do not automatically mean a browser-internal root cause.")}</p></section><section class="card" id="execution-results"{explorer.inventory_attributes(result_control="#f-status")}><h2>{t("replay.detail.execution_records", "Execution records")}</h2><p>{t("public.review.records_body", "{count} task × browser results. Failed results show by default; open a task to see the actions, answers, verdicts, error stack and BrowserTool trace of the adopted result.", count=logical_executions)}</p>{filters}<div id="execution-list" class="record-grid" role="region" aria-label="{t("public.review.records_label", "Per-task execution records")}" tabindex="0">{grid_head}{_execution_details(manifest, summary, detail_pages)}</div><p id="execution-empty" class="empty-state" role="status" hidden></p>{explorer.inventory_notice(t("inventory.no_failures", "No result failed; showing all results."), t("inventory.show_more", "Show more"))}{script}</section>""" |
There was a problem hiding this comment.
The shared inventory saves filters only on input/change events, but this page's existing “Show all” and “Reset to errors” handlers assign control values and call apply() without dispatching either event. After changing a filter (which creates f.* URL parameters), clicking either button and opening a detail records the old URL despite displaying the new row set. Back then restores the old filters rather than the inventory the reader left. Update those button handlers to notify the shared filter persistence after changing the controls, and cover this path with a navigation test.
| detail_nav = ( | ||
| f'<a href="{REPORT_STEM}-analysis.html#{_e(back_anchor)}">← {t("curated.back_to_analysis", "Back to per-task analysis")}</a>' | ||
| f'<a href="{REPORT_STEM}.html">{t("curated.shell.detail_title", "{engines} evaluation", engines=" / ".join(engine_label(engine) for engine in engines))}</a><span class="muted">{t("replay.run", "Run {run_id}", run_id=run_id)}</span>' | ||
| explorer.detail_navigation(f"{REPORT_STEM}-analysis.html#{back_anchor}", back=t("curated.back_to_analysis", "Back to per-task analysis"), |
There was a problem hiding this comment.
The new back navigation does not preserve filters changed through the existing “show all” and “reset” buttons. In curated-execution-filter.js, f-all and f-reset assign control values and call apply() without emitting input/change; the shared inventory script only saves filters on those events. For example, select an engine, click show all, open another engine's result, then follow Back: the recorded URL still contains the old engine filter and restores the wrong inventory. Wire these button actions into the shared filter-state update (after all control values are set) so the recorded back URL matches the displayed rows.
| bodies["index"] = home_chart + bodies["index"] | ||
| bodies["results"] += ( | ||
| result_controls(methods, rows, names, lang) | ||
| "<div" + explorer.inventory_attributes(result_control='select[data-result-filter="status"]', fallback="all") + ">" |
There was a problem hiding this comment.
For reports with more than two methods, this wrapper breaks filter restoration on returning from a detail page. The shared script saves all controls and restores each by dispatching change, including the comparison controls rendered by result_controls. Their existing handler in assets/report.js unconditionally resets status to all and method to an empty value. Because those controls are restored last, they overwrite the reader's restored failure/method filters even when comparison is off. Restore the controls atomically before filtering, or prevent comparison restore events from resetting the ordinary filters.
| ) | ||
| listing = ( | ||
| origin_filter(profile, zh) | ||
| "<div" + explorer.inventory_attributes(result_control="select[data-filter]", fallback="all") + ">" |
There was a problem hiding this comment.
The shared pagination does not cooperate with this inventory's existing column sorting. With more than 100 matching rows, it hides later rows using inline display:none; the sort handler in assets/report.js only reorders the rows, while the shared observer watches only hidden attribute changes. Sorting by latency therefore keeps showing the original 100-row subset rather than the first 100 rows in the new order (the slowest results can remain hidden even when sorting descending). Repaginate after sorting, or observe row-order changes, and add a browser test with more than 100 matching results.
…elect and button filters survive navigation, restore without track resets; Lexbench fallback within active filters
|
Fixed all 7 findings from the review of 29eeb04 in 542ac67, with one shared change in
Real-browser tests: |
There was a problem hiding this comment.
This review found 1 issue(s), including 1 blocking issue(s).
| // marks rows with its own attribute, so the two never overwrite each other. | ||
| const filtered=r=>r.hidden||r.style.display==='none'; | ||
| // mode: 'reset' to the first page after a filter change, 'more' for the next page, 'keep' after a re-sort. | ||
| function paginate(root,mode){const size=+root.dataset.inventoryPageSize||100,more=root.querySelector('[data-inventory-more]');root._limit=mode==='more'?root._limit+size:mode==='keep'&&root._limit?root._limit:size;let shown=0,left=0;rowsOf(root).forEach(r=>{const paged=!filtered(r)&&shown>=root._limit;if(!filtered(r)&&!paged)shown++;if(paged)left++;r.toggleAttribute('data-inventory-paged',paged)});if(more){more.hidden=!left;more.dataset.remaining=left}return shown} |
There was a problem hiding this comment.
When no more rows remain, every refresh assigns more.hidden = true, even if the attribute is already present. Setting that reflected attribute produces another mutation, and the observer watching hidden schedules another refresh on the next animation frame. This creates a perpetual full-inventory scan for small inventories and after reaching the final page. Only update more.hidden when its value changes (or exclude pager mutations from the observer). Add a browser regression asserting that mutations stop once rendering and final-page pagination settle.
There was a problem hiding this comment.
✅ Re-review complete · dd70805
No findings in this incremental review.
Purpose
Reader review findings A6, A7, A8, A10 and A13 (issue #397): give every track's home page a readable chart, one drill-down path from inventory to evidence, scrollers that shrink to their content, and detail pages that keep the reader's place.
flowchart LR subgraph reporting["harness/reporting (shared)"] C["charts.py<br/>ranked_bars · dumbbell · check_charts"] E["explorer.py<br/>inventory_attributes · inventory_notice<br/>diagnosis_button/dialog · detail_navigation<br/>INVENTORY_SCRIPT · check_inventory"] P["presentation.check_presentation<br/>(runs check_charts + check_inventory)"] end C --> H["Home pages<br/>Web Fetch · WCXB · Web Search · Web Extract<br/>Browser Use · Replay (WebArena, curated, public)"] E --> I["Result inventories<br/>failures first → fallback to all with notice<br/>pages of 100 · filters in URL · diagnosis dialog"] I -->|"row link records visible order"| D["Detail pages<br/>back (filters kept) · previous · next<br/>exact error in the verdict"] P --> R["Track release checks"]What changed
Shared layer
reporting/charts.py: HTML/CSS ranked bar (rate with n/N) and two-rate dumbbell. Text keeps the page font size; at ≤640 px the label wraps above its bar instead of shrinking (B11). Every mark carries its raw value;check_chartsrejects a mark, value text or order that disagrees with the numbers.reporting/explorer.pygains the shared inventory path. A track keeps its filter controls and script and marks the inventory withinventory_attributes. The shared script then:?f.<control>=…);detail_navigationrenders back (to the recorded filtered URL), previous and next within that order (A10).diagnosis_buttonanddiagnosis_dialoggive one keyboard-closable dialog whose content is an inert per-row template.check_inventoryenforces the failure default, notice, pager and dialog.check_presentationnow runs both checks, so every track's existing release gate covers them.Tracks
max-height.max-height.max-height..record-gridis capped at 70vh.Kept as the review marked good: reference-versus-output evidence, same-task cards and stage strip, attempt locator, keyboard-correct dialogs, fail-default inventories and Codex back navigation (now shared).
Baselines
Every track's snapshot was refreshed with
WEBSTONE_UPDATE_BASELINES=1because the page bytes,report.jsand the style hashes changed. Outside file hashes, the only text changes are in the Web Fetch analysis and provider inventories:h2entry comes from the dialog template; its text sits inside a<template>, so the snapshot records it as empty.No score, count, rate, latency or row was added or removed. The scorer identity is unchanged (
lexbench-webfetch versionreportsscoring_source_sha2560fe89317…169e before and after).Architecture allowlists are unchanged: no instance literal was added to shared code.
Verification
uv run --frozen --all-extras python -m pytest -n 8 --dist worksteal -q tests: 21673 passed, 78 skipped, 2 xfailed. This includes the baselines, the architecture tests and the new tests below.make lint-check: clean.New tests and negative controls:
tests/test_report_charts.pycovers chart rendering and rejects a wrong bar width, wrong value text, wrong rank order, a wrong dumbbell position, missing text and a missing required chart.tests/test_report_explorer.pycovers the inventory contract and rejects an "all" default, a missing notice or pager, and diagnosis buttons without the dialog.tests/test_report_browser_interactions.py::test_shared_inventory_falls_back_pages_keeps_filters_and_walks_detailsdrives a real browser through:Release checks:
check_presentation, which every track's check already calls, now runscheck_chartsandcheck_inventory. The Replay check now requires amax-heightinventory and rejects a fixedheight.Visual check: every fixture report was built and the key routes were captured with Playwright. Routes covered:
No horizontal page overflow and no new console errors (the 404 on Web Extract's English results page also occurs on main). Chart text stays at body size at 390 px. Inventories shrink to their rows: the 620 px Replay box and the 410 px Search relation box are gone.
Not done here
data-report-enand a post-render pass inside the Chinese DOM. The language switch is shell-owned (Reports: one shell, navigation, theme, table and label system across tracks #396).render_level_summary) and Lexbench's client-rendered home have no chart yet.Part of #397 (the remaining items are listed under "Not done here").