Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 3 additions & 1 deletion .claude/rules/ui.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ also supports `--only KEY` for a focused benchmark check.
`app/static/disclosures.js`; navigation groups use the same animation. Respect
reduced motion and keyboard activation. Filter menus and popovers are separate.
- **One icon, one meaning.** A new kind of thing gets its own icon, never a
neighbour's.
neighbour's. Icons are symbols of `app/templates/_icons.svg`, drawn on its
24 grid without their own stroke or fill, and used with
`<use href="#i-name">`. A page draws no icon of its own.

- Catalogue Add actions share one dialog with the entry type preselected from the page. Keep generated prompts short and refer to import skills instead of duplicating their instructions.
1 change: 1 addition & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ and its resources.
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/templates/_icons.svg` is the icon sprite, checked by `app/tests/test_icons.py`.
- `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
7 changes: 3 additions & 4 deletions app/static/builder/command-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -378,10 +378,9 @@
// Harbor's own mark where Harbor fetches the tasks; a plain icon where no one's mark belongs. Square tiles, so
// a mark is never read as a second radio button.
const HARBOR_MARK = '<svg class="nb-radio-mark" aria-hidden="true"><use href="/static/brand/marks.svg#harbor"/></svg>';
const iconTile = d => `<span class="nb-radio-mark nb-radio-icon" aria-hidden="true"><svg viewBox="0 0 24 24"><path d="${d}"/></svg></span>`;
const iconTile = name => `<span class="nb-radio-mark nb-radio-icon" aria-hidden="true"><svg><use href="#i-${name}"/></svg></span>`;
const SOURCE_MARK = { hub: HARBOR_MARK, registry: HARBOR_MARK,
local: iconTile('M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'),
generate: iconTile('M15 4V2M15 16v-2M8 9h2M20 9h2M17.8 11.8 19 13M15 9h.01M17.8 6.2 19 5M3 21l9-9M12.2 6.2 11 5') };
local: iconTile('folder'), generate: iconTile('wand') };
const SOURCE_HINT = { hub: 'Harbor fetches the tasks when the run starts.', registry: 'Harbor fetches the tasks when the run starts.',
local: 'Task folders already on disk. A run on a host is sent them.', generate: "Built first with the benchmark's own generator, into a folder you name." };
const segmented = (name, label, segments) => `<div class="nb-seg" role="radiogroup" aria-label="${esc(label)}" data-seg="${name}"><span class="nb-seg-thumb" aria-hidden="true"></span>${segments}</div>`;
Expand Down Expand Up @@ -626,7 +625,7 @@
+ (t.meta || t.foot ? `<span class="nb-tile-foot">${t.meta ? `<span>${esc(t.meta)}</span>` : ''}${t.foot || ''}</span>` : '') + '</button>';
// a machine to run on: this one or a host, its connection state filled in by Test connection
const icon = name => `<svg class="ic" aria-hidden="true"><use href="#i-${name}"/></svg>`;
const machineTile = (attr, v, t, sub, on) => tile({attr, key: v, on, mark: icon(v === 'local' ? 'machine' : 'network'), title: t, tip: sub,
const machineTile = (attr, v, t, sub, on) => tile({attr, key: v, on, mark: v === 'local' ? icon('machine') : icon('network'), title: t, tip: sub,
foot: v !== 'local' ? `<span class="nb-state nb-hoststate" data-host-state="${esc(v)}"></span>` : ''});
// The grids drawn by the server and run by the card toolkit (tables.js): the Benchmark step's (/new-run/benchmarks,
// one choice) and the standard's Agent step's for its benchmark (/new-run/agents, from the Agents page's entries).
Expand Down
2 changes: 1 addition & 1 deletion app/static/builder/recipes.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
const r = dialog.getBoundingClientRect();
if (e.target === dialog && (e.clientX < r.left || e.clientX > r.right || e.clientY < r.top || e.clientY > r.bottom)) dialog.close();
});
const head = (t, x) => `<div class="std-how-head"><h2 id="rcp-dialog-h">${esc(t)}</h2>${x ? '<button type="button" class="std-how-x" data-close aria-label="Close"><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M3.5 3.5l9 9M12.5 3.5l-9 9"/></svg></button>' : ''}</div>`;
const head = (t, x) => `<div class="std-how-head"><h2 id="rcp-dialog-h">${esc(t)}</h2>${x ? '<button type="button" class="std-how-x" data-close aria-label="Close"><svg class="ic" aria-hidden="true"><use href="#i-x"/></svg></button>' : ''}</div>`;
function details(item) {
const d = info[item.id], shown = STEPS.map(k => C.STEP[k]);
const warn = d.problems.length ? `<ul class="rcp-problems">${d.problems.map(([s, m]) => `<li><svg class="ic" aria-hidden="true"><use href="#i-alert"/></svg><span><b>${esc(C.STEPS[s])}</b> ${esc(m)}</span></li>`).join('')}</ul>` : '';
Expand Down
1 change: 0 additions & 1 deletion app/static/catalogue/catalogue.css
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,6 @@ dialog.std-how::backdrop { background: rgba(0, 0, 0, .45); }
.std-how-x { flex: none; width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 1px solid var(--border); border-radius: 8px; background: transparent; color: var(--text-dim); cursor: pointer; }
.std-how-x:hover { color: var(--text); border-color: var(--text-dim); }
.std-how-x:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.std-how-x svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
/* The Add a benchmark dialog, by hand: the three routes, each its bubble, what it is and where to start. */
.std-routes { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.std-routes li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: start; padding: 14px; border: 1px solid var(--border-soft); border-radius: 10px; }
Expand Down
2 changes: 1 addition & 1 deletion app/static/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -1068,7 +1068,7 @@ tr.control-row td { color: var(--text-dim); }
.attempt-tab:hover { color: var(--text); border-color: var(--text-faint); }
.attempt-tab[aria-current] { color: var(--text); background: var(--accent-soft); border-color: var(--accent); font-weight: 600; }
.attempt-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.attempt-retried { width: 12px; height: 12px; margin-left: -.15rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.attempt-retried { width: 12px; height: 12px; margin-left: -.15rem; flex: none; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
/* an attempt's tries, when its runner kept the ones before its last: tabs of
their own under the attempt's, underlined, the last the one that counts */
.try-tabs { display: flex; flex-wrap: wrap; gap: 0 1.2rem; width: fit-content; max-width: 100%; margin-top: .6rem; padding-right: .4rem; border-bottom: 1px solid var(--border); }
Expand Down
77 changes: 77 additions & 0 deletions app/templates/_icons.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading