Repository navigation
feat(site): publish Browser Use track and four benchmark definitions - #40
xianghuisun-svg wants to merge 7 commits into
Conversation
There was a problem hiding this comment.
This review found 5 issue(s), including 5 blocking issue(s).
| webfetch: "https://yours.lexmount.cn/artifact-site/s/sBygxmqjB5wc", | ||
| websearch: "https://yours.lexmount.cn/artifact-site/s/-FtUMQm-NmQa", | ||
| webextract: "https://yours.lexmount.cn/artifact-site/s/-eNSiFI3n7XX", | ||
| "browser-use": "https://yours.lexmount.cn/artifact-site/s/m7XSPPvew0gv", |
There was a problem hiding this comment.
This adds a business-specific report URL literal despite the checklist's prohibition on hardcoded business URLs. Read the Browser Use report's primary-language destination from reports/metadata.json instead, retaining the assertion that all benchmarks in the track share that destination. This avoids another independently maintained copy of the share URL.
| return quality && resource ? { quality, resource } : null; | ||
| } | ||
|
|
||
| function PairChart({ benchmark, providers, hidden, quality, resource, descriptionId, methodName, t }: { |
| ? Math.max(0, Math.min(90, Math.floor((minScore - 3) / 5) * 5)) | ||
| : 0; | ||
| const spanY = Math.max(1, maxY - minY); | ||
| const stepY = spanY <= 20 ? 5 : spanY <= 40 ? 10 : Math.ceil(spanY / 4); |
| const score = provider.scores[quality.id]; | ||
| if (typeof score !== "number") return null; |
There was a problem hiding this comment.
A provider with a missing quality score is omitted entirely from the chart, even if its cost is disclosed. Unlike the existing radar, it has no focusable series exposing its available measurements; selecting only this provider also leaves an empty plot without an empty-state message. Preserve an accessible representation for missing-quality providers without inventing a score, and extend the pair-chart test to cover missing primary measurements.
| const providers = sortProviders(benchmark.providers, primary.id, primary.direction) | ||
| .map(provider => ({ provider, values: axes.map(axis => axis.value(provider)) })); | ||
| const sortedProviders = sortProviders(benchmark.providers, primary.id, primary.direction); | ||
| const pair = availableAxes.length === 2 ? twoAxisComparison(benchmark) : null; |
There was a problem hiding this comment.
When every provider has an undisclosed cost, radarAxes removes the cost axis, leaving only one available axis. This condition then disables PairChart and displays “Select at least three metrics” instead of plotting the quality scores on the undisclosed rail. Select the two-metric view from the benchmark's eligible metric definitions, allow its resource metric to have no numeric values, and add an all-costs-null test.
There was a problem hiding this comment.
This review found 1 issue(s), including 1 blocking issue(s).
| stagger = Math.abs(y - lastY) < 16 ? nextStagger(stagger) : 0; | ||
| missingOffsets.set(provider.id, stagger * 18); |
There was a problem hiding this comment.
The undisclosed-cost offsets repeat after three nearby scores. For four methods with the same success rate and null cost, the offsets are 0, +18, -18, 0, so the fourth marker completely covers the first and its pointer-hover title. This undermines preserving each undisclosed method in the chart. Allocate collision-free positions (or use an explicit grouped marker that exposes all members) and add a regression fixture with at least four tied, undisclosed-cost methods.
There was a problem hiding this comment.
This review found 2 issue(s), including 2 blocking issue(s).
| assert.equal((en.match(/is-undisclosed/g) ?? []).length, 1); | ||
| assert.doesNotMatch(en, /NaN|Infinity|at least three/); |
There was a problem hiding this comment.
The disclosed-cost case never checks the plotted points: series counts and finite markup still pass if both disclosed methods are placed at the same x coordinate or cost ordering is reversed. Please inspect each disclosed provider's circle and assert that the $0.10 point is left of the $5.81 point, the higher-success point is above the lower-success point, and both remain inside the disclosed plot area. Include a zero-cost case to exercise the linear scaling branch; the current two distinct costs exercise only logarithmic scaling.
| tabIndex={0} aria-label={label}> | ||
| <title>{label}</title> | ||
| <circle className={dotClass} cx={cx} cy={cy} r="5.5" /> | ||
| {disclosed && <text x={textRight ? cx + 10 : cx - 10} y={cy + 4} textAnchor={textRight ? "start" : "end"} className="comparison-value"> |
There was a problem hiding this comment.
Disclosed methods with equal or nearby scores and costs receive overlapping markers and value labels. For example, two methods at 90%/$1 and 90.1%/$1 will have nearly coincident labels, and identical coordinates leave only the last method pointer-accessible. The existing hover/focus CSS only highlights radar polygons, so it does not resolve this in PairChart. Add collision-aware label placement or show labels on hover/focus with a way to inspect coincident methods, and cover clustered disclosed points in a test.
There was a problem hiding this comment.
This review found 2 issue(s), including 2 blocking issue(s).
| const labelRects = clusteredSeries.map(item => { | ||
| const w = 90; |
There was a problem hiding this comment.
Assert that each clustered series has a label and finite label coordinates before constructing these rectangles. parseSeries returns lx/ly as null when the text element is missing; arithmetic here converts them to zero, creating a rectangle near the origin that does not overlap the remaining labels. Removing one clustered label can therefore pass the non-overlap regression test. Explicit presence checks (or Number.isFinite checks on all parsed coordinates) would catch that regression.
| if (start + span > bounds.right) start = bounds.right - span; | ||
| cluster.forEach((item, index) => { | ||
| placedPoints.set(item.id, { | ||
| cx: Number((start + index * step).toFixed(2)), |
There was a problem hiding this comment.
Cluster separation changes the measured resource coordinate, not just the annotation position. For example, the three providers with cost 1.0 in the new clustered test are drawn at different x positions even though all should align with the same cost tick. Because clustering uses only visible providers, hiding one also moves the remaining providers despite unchanged costs and axis limits. Keep disclosed markers at their actual xPos(cost) coordinates and resolve collisions through labels/leader lines or an explicit overlapping-point interaction; horizontal spreading is appropriate only on the undisclosed rail, where x has no numeric meaning. Add assertions for equal-cost alignment and coordinate stability when toggling visibility.
… overlaps with labels and leaders
There was a problem hiding this comment.
This review found 3 issue(s), including 3 blocking issue(s).
| const toggleA = [...host.querySelectorAll(".radar-legend label")].find(label => label.textContent === "Tied A").querySelector("input"); | ||
| await React.act(async () => toggleA.click()); |
There was a problem hiding this comment.
This visibility check hides a duplicate point, so the cost domain and minimum quality remain unchanged even if scales are incorrectly recomputed from visible providers. Add a case that hides a unique cost/quality extreme and verifies the remaining coordinates are unchanged; also consider hiding the sole zero-cost provider to catch an unintended linear-to-log switch. The current implementation uses all providers for its scales, but this fixture does not protect that behavior against regression.
| "#ac4e67", "#507d35", "#674bc1", "#4d7373", "#aa4944", "#4e5c70"]; | ||
|
|
||
| function twoAxisComparison(benchmark: Benchmark): { quality: Metric; resource: Metric } | null { | ||
| if (benchmark.categories.length > 0 || benchmark.metrics.length !== 2) return null; |
There was a problem hiding this comment.
This checks definition counts rather than usable chart axes. radarAxes filters out metrics with no reported values and categories without usable results, so a quality/cost benchmark with an additional undisclosed metric can have exactly two available axes yet fail this guard and render “Select at least three metrics” with no way to select a third. Route using the available quality/resource axes as specified, while retaining the explicit handling for all-undisclosed cost. Add a regression fixture with an extra unreported metric.
| if (!foundClear) { | ||
| for (const candidate of candidates) { | ||
| const box = labelBox(candidate.lx, candidate.ly, candidate.anchor, width); | ||
| if (!occupiedLabels.some(existing => boxesOverlap(box, existing))) { |
There was a problem hiding this comment.
The fallback can still emit overlapping labels: when every candidate overlaps, chosen remains the first candidate and is rendered anyway. For example, eight providers with quality 100 and the same disclosed cost exhaust the distinct placements near the top of the plot, causing labels to be drawn on top of one another. This fallback also drops bounds and marker checks. Keep those constraints when searching additional positions, or omit an unplaceable inline label and retain its accessible tooltip rather than knowingly rendering an overlap. Extend the clustered-label test beyond three providers.
… expand stability tests
There was a problem hiding this comment.
This review found 4 issue(s), including 4 blocking issue(s).
| const { twoAxisComparison } = require("../web/components/insights.tsx"); | ||
| const isPair = Boolean(twoAxisComparison(definition, radarAxes(definition))); |
There was a problem hiding this comment.
The expected chart mode is calculated with the same twoAxisComparison helper that controls the UI. If that helper incorrectly classifies a ≥3-axis benchmark as a pair, this test will also expect no selector and skip all radar-control assertions, masking the regression. Add independent expectations (for example, explicit two- and three-reported-metric fixtures, plus the existing optional-unreported-metric case) and assert that the three-metric fixture retains its radar and selector without using this helper to choose the assertions.
| if (availableResource && availableAxes.length === 2 && availableIds.has(quality.id)) { | ||
| return { quality, resource: availableResource }; | ||
| } | ||
| if (availableAxes.length <= 1 && !availableAxes.some(axis => axis.id.startsWith("category:"))) { |
There was a problem hiding this comment.
The fallback does not validate that the primary metric is a supported quality metric. For example, an ascending error-rate primary plus one disclosed latency metric has only one radar axis, so this branch selects PairChart despite radarAxes deliberately excluding that primary. Signed scores can then plot below the chart, and lower-is-better values contradict the quality caption. Require the primary to satisfy the qualityMetrics eligibility rules before selecting either pair-chart branch (or explicitly support its range and direction).
| return { quality, resource: availableResource }; | ||
| } | ||
| if (availableAxes.length <= 1 && !availableAxes.some(axis => axis.id.startsWith("category:"))) { | ||
| const definedResources = benchmark.metrics.filter(metric => metric.id !== quality.id && RESOURCE_UNITS.includes(metric.unit)); |
There was a problem hiding this comment.
This fallback reintroduces USD metrics that radarAxes explicitly excludes (pricePerThousand and metrics with highlightBest === false). For a benchmark with one quality axis and one such price metric, it selects PairChart and plots the excluded price as a measured resource. Apply the same resource-eligibility rules as radarAxes before counting fallback candidates, while still allowing eligible metrics whose values are all undisclosed.
| <figcaption> | ||
| {t("Quality and category axes show a share of the maximum. Lower latency, memory and measured cost plot farther out when reported.")} | ||
| {t(pair | ||
| ? "Higher quality plots higher; lower cost plots farther left. Methods without disclosed cost appear on the right." |
There was a problem hiding this comment.
Pair selection accepts milliseconds, seconds, and MiB as well as USD, but this caption always calls the horizontal metric 'cost' and missing values 'undisclosed cost'. A quality-versus-latency or memory chart therefore gives incorrect explanatory text. Use resource-neutral wording or interpolate the selected resource label, updating the translations accordingly.
There was a problem hiding this comment.
✅ Re-review complete · feecb01
No findings in this incremental review.
Changes
benchmarks/catalog.json, with four benchmark definitions:bu-bench-v1(BU Bench v1)online-mind2web(Online-Mind2Web)webvoyager(WebVoyager)osworld(OSWorld, 75 browser & file-handling tasks)https://yours.lexmount.cn/artifact-site/s/m7XSPPvew0gv), registering the report metadata inreports/metadata.json.PairChartview inweb/components/insights.tsxfor quality-vs-cost benchmarks (availableAxes.length === 2), preserving undisclosed cost methods on a dedicated right-hand rail while leaving all existing ≥3-axis radar charts unchanged.browser-usetrack inweb/components/dashboard.tsx, add track icon (MousePointerClick), track theme ([data-track="browser-use"]), participant badge colors, and complete English/Chinese copy.AGENTS.md,README.md) to support both the pre-result state (this PR) and the follow-up result submission PR.Verification
node scripts/check-result-change.mjs $(git rev-parse origin/main) $(git rev-parse HEAD)→{"reports":0}npm test→ 135/135 passednpm run build→ succeeded (Prepared 24 result versions with 12 benchmark views,Secured 6 inline scripts in the static export)Pre-validated stacked follow-up results PR locally (
check-result-change.mjs→{"reports":4},npm test→ 135/135 passed,npm run build→28 result versions with 16 benchmark views, plus EN/ZH visual inspection)Website copy reviewed in English and Chinese using the repository’s
humanizerandhumanizer-chineseskills.