Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
4092c3c
refactor(web): build a card toolkit beside the table toolkit
harenome Nov 17, 2026
69e4f3b
feat(catalogue): put the catalogue pages on the card toolkit
harenome Nov 17, 2026
e225887
feat(web): announce how many cards show once changes pause
harenome Nov 17, 2026
53be06b
fix(catalogue): wrap a long stat label within its column
harenome Nov 17, 2026
ded9510
feat(web): filter a table or cards by pills and dropdowns too
harenome Nov 17, 2026
1e69b35
feat(catalogue): filter benchmarks by category pills, kits by family …
harenome Nov 17, 2026
0507872
fix(web): drop a dropdown's heading, which repeats its button
harenome Nov 17, 2026
abefb72
feat(web): mark filter dropdowns with a chevron, and let a filter car…
harenome Nov 17, 2026
22ad65e
fix(catalogue): round the outlined tags as the filled ones
harenome Nov 17, 2026
1a22584
docs: name the card toolkit in the AGENTS map
harenome Nov 17, 2026
9167348
refactor(web): build an agent's mark URL in one place
harenome Nov 17, 2026
0fa077c
refactor(catalogue): drop the sort type from fields only cards show
harenome Nov 17, 2026
3beeefd
fix(catalogue): wrap a stat label between words, never inside one
harenome Nov 17, 2026
3f5cf65
test: check the card stats and text in the UI sweep's clipped-text list
harenome Nov 17, 2026
6428498
fix(catalogue): filter cards by a value, not by the label it shows
harenome Nov 17, 2026
46ad775
fix(web): mark a narrowed filter button, so a count of 0 reads as nar…
harenome Nov 17, 2026
ddbb157
fix(web): read out the cards shown only after a change, counted in th…
harenome Nov 17, 2026
f4d43cf
fix(catalogue): open a card from a click anywhere on it
harenome Nov 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .claude/skills/ui-sweep/scripts/sweep.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
from playwright.sync_api import sync_playwright

SHOWN = ", ".join(["#nullius-builder .nb-tile strong", "#nullius-builder h2", "#nullius-builder h3",
"#nullius-builder .nb-tile-line", "#nullius-builder .nb-subtab", ".bench-card strong",
".bench-card p", ".std-card p"])
"#nullius-builder .nb-tile-line", "#nullius-builder .nb-subtab", ".bench-card dt",
".bench-card dd", ".bench-card-domain:not(.std-clamp)", ".std-card p"])
CUT = """() => [...document.querySelectorAll('""" + SHOWN + """')]
.filter(e => e.offsetParent && (e.scrollWidth > e.clientWidth + 1 || e.scrollHeight > e.clientHeight + 1))
.map(e => e.textContent.trim().slice(0, 80))"""
Expand Down
1 change: 1 addition & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ and its resources. The source layout stays under `app/`.
names (`runs/`, `traces/`, `builder/`, …; `base.html`, `style.css` and the fonts at the top), including the command
builder's JavaScript, which owns the generated recipes. `app/templates/_tables.html` and
`app/static/tables.js` are the table toolkit: one column list builds a table's headers, cells and controls.
`app/templates/_cards.html` lays the same field list out as cards, one slot per field.
- `app/tests/`, `app/ui_tests/` — the backend suite and the route suite.
Beside the backend tests sit scripts run by hand:
`app/tests/field_contract.py`, which refreshes the `field_contract.json` the
Expand Down
2 changes: 1 addition & 1 deletion app/nullius/onboarding.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
]},
{"id": "bench", "name": "Pick a benchmark", "page": "benchmarks_page", "where": "Benchmarks", "subs": [
{"id": "browse", "text": "Browse the catalogue", "visit": r"^/benchmarks/?$",
"target": [[".bench-filters, #bench-find", "Filter by category, runner or origin"]]},
"target": [["#benchmarks-tools", "Search or filter by category, runner or origin"]]},
{"id": "open", "text": "Open a benchmark's page", "visit": r"^/benchmarks/(?!new)[^/]+$",
"target": [[".bench-card", "Open a benchmark"]]},
]},
Expand Down
48 changes: 23 additions & 25 deletions app/static/catalogue/catalogue.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,8 @@
.bench-index-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.bench-index-head h1 { margin: 0; font-size: 30px; font-weight: 500; letter-spacing: -.01em; }
.bench-count { margin: 6px 0 0; color: var(--text-dim); font-size: 14px; }
.bench-find { display: flex; flex-direction: column; gap: 6px; flex: 0 1 280px; font-size: 12px; color: var(--text-dim); }
.bench-find input { width: 100%; }
.bench-find input { font: inherit; font-size: 14px; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; min-height: 44px; box-sizing: border-box; }
.bench-find input:focus { outline: none; border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
/* the category chips, then the origin chips after a rule, on one line while they fit */
.bench-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0 0 30px; }
.bench-filters .bench-cats + .bench-cats { padding-left: 16px; border-left: 1px solid var(--border); }
@media (max-width: 640px) { .bench-filters .bench-cats + .bench-cats { padding-left: 0; border-left: 0; } }
.bench-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.bench-cat { font: inherit; font-size: 13px; cursor: pointer; color: var(--text-dim); background: transparent; border: 1px solid var(--border); border-radius: 999px; padding: 8px 16px; min-height: 40px; }
.bench-cat:hover { border-color: var(--accent); color: var(--text); }
.bench-cat.on { background: var(--accent); border-color: var(--accent); color: var(--btn-fg); font-weight: 500; }
.bench-cat:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* the cards' controls row, under the title */
.bench-index > .table-controls { margin: 0 0 24px; }
.bench-shelf { margin: 0 0 34px; }
.bench-shelf[hidden], .bench-card[hidden] { display: none; }
.bench-shelf h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 13px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--text); }
Expand All @@ -27,9 +16,18 @@
.bench-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1180px) { .bench-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .bench-grid { grid-template-columns: minmax(0, 1fr); } }
.bench-card { display: flex; flex-direction: column; gap: 14px; padding: 20px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border-soft); color: var(--text); transition: border-color .13s ease; }
.bench-card:hover { border-color: var(--accent); text-decoration: none; }
.bench-card:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-soft), 0 0 0 1px var(--accent); }
/* a card (templates/_cards.html): its title's link stretched over it, so the whole card opens it; a checkbox, a
button or a value with a tooltip sits above that link */
.bench-card { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 20px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border-soft); color: var(--text); transition: border-color .13s ease; }
.bench-card:hover { border-color: var(--accent); }
.card-link, .card-link:hover { color: inherit; text-decoration: none; }
.card-link::after { content: ""; position: absolute; inset: -1px; border-radius: 12px; }
.card-link:focus-visible { outline: none; }
.card-link:focus-visible::after { box-shadow: 0 0 0 3px var(--accent-soft), 0 0 0 1px var(--accent); }
.bench-card :is(input, button, .btn, [title]) { position: relative; z-index: 1; }
.bench-card [title]:not(input, button, .btn) { cursor: pointer; } /* raised for its tooltip, it still opens the card */
.bench-card-top .bench-harness { margin-left: auto; }
.bench-card-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.bench-shelf.st-community .bench-card { background: transparent; border-style: dashed; border-color: var(--border); }
.bench-shelf.st-community .bench-card:hover { border-color: var(--accent); }
.bench-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
Expand All @@ -40,11 +38,12 @@
.bench-head h1 { display: flex; align-items: center; gap: 14px; }
.bench-head h1 .bench-mark { width: 32px; height: 32px; }
.bench-card-domain { margin-top: -6px; font-size: 14px; line-height: 1.5; color: var(--text-dim); }
.bench-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border-soft); }
/* up to three stats in columns of one width, each its label then its value */
.bench-stats { display: grid; grid-template-columns: repeat(3, minmax(min-content, 1fr)); gap: 8px; margin: auto 0 0; padding-top: 14px; border-top: 1px solid var(--border-soft); }
.bench-stats > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bench-stats b { font-size: 18px; font-weight: 500; font-variant-numeric: tabular-nums; }
.bench-stats b.word { font-size: 14px; font-weight: 500; line-height: 1.35; padding-top: 3px; }
.bench-stats span { font-size: 12px; color: var(--text-faint); }
.bench-stats dd { margin: 0; font-size: 18px; font-weight: 500; font-variant-numeric: tabular-nums; }
.bench-stats dd.word { font-size: 14px; line-height: 1.35; padding-top: 3px; }
.bench-stats dt { font-size: 12px; color: var(--text-faint); } /* a long label wraps between words; its longest word sizes its column */
.bench-card-blocker { font-size: 13px; line-height: 1.5; color: var(--text-dim); }
.bench-none { color: var(--text-dim); font-size: 14px; }

Expand Down Expand Up @@ -137,11 +136,10 @@
.settings-page .settings-test.bad { color: var(--bad); }

/* Add a Harbor benchmark: two steps, the dataset read from Harbor, then the entry. */
/* Find and Add side by side at the right of the title, the button the height of the box */
/* Add at the right of the title */
.bench-head-tools { display: flex; align-items: flex-end; gap: 12px; flex: 0 1 auto; }
.bench-head-tools .bench-find { flex: 0 1 300px; min-width: 180px; }
.bench-head-tools .btn { min-height: 44px; white-space: nowrap; flex: none; }
@media (max-width: 640px) { .bench-head-tools { flex-wrap: wrap; width: 100%; } .bench-head-tools .bench-find { flex: 1 1 100%; } }
@media (max-width: 640px) { .bench-head-tools { flex-wrap: wrap; width: 100%; } }
.bench-new { max-width: 860px; }
.nb-step { background: var(--surface); border: 1px solid var(--border-soft); border-radius: 12px; padding: 20px; margin: 0 0 18px; }
.nb-step h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font-size: 16px; font-weight: 500; }
Expand Down Expand Up @@ -227,7 +225,7 @@
.std-head h2 { margin: 0 0 6px; font-size: 20px; }
.std-mark { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font: 500 18px/1 var(--mono); flex: none; }
.std-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.std-tag { padding: 2px 9px; border: 1px solid var(--border); border-radius: 999px; font: 11px/1.5 var(--mono); color: var(--text-dim); }
.std-tag { padding: 2px 9px; border: 1px solid var(--border); border-radius: 5px; font: 11px/1.5 var(--mono); color: var(--text-dim); }
.std-versions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 14px; }
.std-versions > span { font-size: 12px; color: var(--text-dim); margin-right: 4px; }
.std-versions a { display: flex; flex-direction: column; padding: 6px 12px; border: 1px solid var(--border); border-radius: 8px; color: inherit; text-decoration: none; }
Expand Down Expand Up @@ -325,7 +323,7 @@ dialog.std-how::backdrop { background: rgba(0, 0, 0, .45); }
.std-add-hint { font-size: 12.5px; }
@media (max-width: 640px) { dialog.std-how { padding: 18px 16px; } .std-add-fields { grid-template-columns: 1fr; } .std-add-fields :is(input, textarea) { font-size: 16px; } }
/* What runs a benchmark, as bubbles - on its card, its page and the Add dialog - named as the filter chips name them. */
.run-tag { display: inline-flex; align-items: center; font-size: .72rem; font-weight: 500; letter-spacing: .03em; padding: .12rem .55rem; border-radius: 999px; border: 1px solid var(--border); color: var(--text-dim); white-space: nowrap; }
.run-tag { display: inline-flex; align-items: center; font-size: .72rem; font-weight: 500; letter-spacing: .03em; padding: .12rem .55rem; border-radius: 5px; border: 1px solid var(--border); color: var(--text-dim); white-space: nowrap; }
.run-tag.rt-harbor { color: var(--text); border-color: var(--text-dim); }
.run-tag.rt-standard { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.run-tags { display: flex; flex-wrap: wrap; gap: 6px; }
Expand Down
36 changes: 4 additions & 32 deletions app/static/catalogue/catalogue.js
Original file line number Diff line number Diff line change
@@ -1,41 +1,13 @@
(() => {
const hash = () => { try { return decodeURIComponent(location.hash.slice(1)); } catch { return ''; } };

// Hash links (/benchmarks#key, /benchmarks#dataset) open the benchmark's page; category or origin chips and the
// Find box keep the cards that match, and a shelf left empty folds away.
const cards = [...document.querySelectorAll('.bench-card')];
// Hash links (/benchmarks#key, /benchmarks#dataset, /kits#key) open the card's own page; the search and filters
// are the card toolkit's (static/tables.js).
const cards = [...document.querySelectorAll('.bench-card[data-keys]')];
if (cards.length) {
const key = hash();
const owner = key && cards.find(c => c.dataset.keys.split(' ').includes(key));
if (owner) {
location.replace(owner.href + (key === owner.dataset.keys.split(' ')[0] ? '' : '#' + encodeURIComponent(key)));
return;
}
const find = document.getElementById('bench-find');
const chips = [...document.querySelectorAll('[data-filter] .bench-cat')];
const none = document.getElementById('bench-none');
// one value per filter group (category, origin); '' keeps every card
const picked = {};
const apply = () => {
const words = (find?.value || '').toLowerCase().split(/\s+/).filter(Boolean);
cards.forEach(c => {
// Only runners are a space-separated list; categories may contain spaces.
c.hidden = !(Object.entries(picked).every(([f, v]) => !v || (f === 'runs' ? (c.dataset[f] || '').split(' ').includes(v) : c.dataset[f] === v)) && words.every(w => c.dataset.find.includes(w)));
});
document.querySelectorAll('[data-shelf]').forEach(shelf => {
const shown = shelf.querySelectorAll('.bench-card:not([hidden])').length;
shelf.hidden = !shown;
shelf.querySelector('.shelf-n').textContent = shown;
});
chips.forEach(chip => {
const on = chip.dataset.value === (picked[chip.closest('[data-filter]').dataset.filter] || '');
chip.classList.toggle('on', on);
chip.setAttribute('aria-pressed', String(on));
});
if (none) none.hidden = cards.some(c => !c.hidden);
};
chips.forEach(chip => chip.addEventListener('click', () => { picked[chip.closest('[data-filter]').dataset.filter] = chip.dataset.value; apply(); }));
find?.addEventListener('input', apply);
if (owner) location.replace(owner.querySelector('.card-link').href + (key === owner.dataset.keys.split(' ')[0] ? '' : '#' + encodeURIComponent(key)));
return;
}

Expand Down
11 changes: 11 additions & 0 deletions app/static/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,17 @@ button.seg:hover { filter: brightness(1.25); }
/* a column's alignment (its `align`), header and cells */
.grid .align-right { text-align: right; }
.grid .align-center { text-align: center; }
/* a row of filter pills (the controls macro's `pills`), under the search and the buttons */
.filter-pills { display: flex; flex-wrap: wrap; flex: 1 0 100%; gap: 8px; }
.filter-pill { font: inherit; font-size: 13px; cursor: pointer; color: var(--text-dim); background: transparent; border: 1px solid var(--border); border-radius: 999px; padding: 8px 16px; min-height: 40px; }
.filter-pill:hover { border-color: var(--accent); color: var(--text); }
.filter-pill[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--btn-fg); font-weight: 500; }
.filter-pill:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.filter-pills > .ic { align-self: center; color: var(--text-dim); }
.dd-chev { margin-right: -.2rem; }
[data-dropdown][aria-expanded="true"] .dd-chev { transform: rotate(180deg); }
@media (prefers-reduced-motion: no-preference) { .dd-chev { transition: transform .24s ease; } }
.btn.ghost.narrowed { border-color: var(--accent); color: var(--text); } /* a filter button whose column shows not every value */
.tools-count { margin-left: .4rem; padding: 0 .4em; border-radius: 99px; background: var(--accent-soft); color: var(--text); font-size: .72rem; font-variant-numeric: tabular-nums; }
.chip.clear { border-style: dashed; }

Expand Down
Loading
Loading