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
2 changes: 2 additions & 0 deletions app/static/builder/command-builder.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 24 additions & 24 deletions app/static/builder/command-builder.js

Large diffs are not rendered by default.

14 changes: 10 additions & 4 deletions app/static/catalogue/catalogue.css
Original file line number Diff line number Diff line change
Expand Up @@ -372,17 +372,23 @@ a.std-need { font-size: .78rem; color: var(--text-dim); text-decoration: underli

/* Check details sit in their own card below the kit definition. */
.kit-checks h2 { font-size: 16px; }
.kit-check { padding: 14px 0; border-top: 1px solid var(--border); }
.kit-check-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
:is(.kit-check, .kit-shared-source) { padding: 14px 0; border-top: 1px solid var(--border); }
.kit-check-heading { display: grid; grid-template-columns: 16px minmax(0, 1fr) 10ch 8ch; align-items: center; gap: 8px; }
.kit-check-name { margin: 0; font-size: 15px; text-transform: none; letter-spacing: normal; }
.kit-check-heading code { color: var(--muted); font-size: 12px; }
.kit-check p { margin: 6px 0 0; overflow-wrap: anywhere; }

.kit-check-heading { cursor: pointer; list-style: none; }
.kit-check-heading::-webkit-details-marker { display: none; }
.kit-check-heading::before { content: '›'; display: inline-block; transition: transform .15s; }
.kit-check[open] > .kit-check-heading::before, .kit-shared-source[open] > .kit-check-heading::before { transform: rotate(90deg); }
.kit-check-source { margin-top: 16px; min-width: 0; }
.kit-shared-source { margin-top: 0; }

.kit-check-heading .std-tag { justify-self: start; }
@media (max-width: 560px) {
.kit-check-heading { grid-template-columns: 16px minmax(0, 1fr) max-content; }
.kit-check-name { grid-column: 2 / -1; }
.kit-check-heading code { grid-column: 2; }
}
.kit-check-source h3, .kit-check-source h4 { margin: 12px 0 6px; font-size: 13px; text-transform: none; letter-spacing: normal; }
.kit-check-source small { font-weight: normal; color: var(--text-dim); }
.kit-check-source pre { max-height: 420px; overflow: auto; padding: 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
Expand Down
1 change: 1 addition & 0 deletions app/static/compare/columns.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ window.NulliusCompare = {
entry(node, r) {
const span = (cls, text) => { const s = document.createElement('span'); s.setAttribute('class', cls); s.textContent = text; return s; };
const line = span('run-line', [r.agent, r.model].filter(Boolean).join(' · '));
line.insertAdjacentHTML('afterbegin', '<svg class="ic run-check" aria-hidden="true"><use href="#i-check"/></svg>');
if (r.check) line.appendChild(span('chip-control', 'check'));
if (r.shards > 1) line.appendChild(span('run-shards', `${r.shards} shards`));
node.textContent = '';
Expand Down
7 changes: 4 additions & 3 deletions app/static/compare/comparison.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
.run-list [role="option"]:not([aria-disabled="true"]):hover, .run-list [aria-selected="true"] { background: var(--surface-2); }
.run-list [aria-selected="true"] { box-shadow: inset 2px 0 0 var(--accent); }
.run-list [aria-disabled="true"] { opacity: .45; cursor: default; } /* another column's run */
.run-list [aria-checked="true"] .run-line::before { content: "✓ "; color: var(--accent); } /* this column's run */
.run-check { display: none; }
.run-list [aria-checked="true"] .run-check { display: inline-block; color: var(--accent); } /* this column's run */
.run-sep { border-top: 1px solid var(--border-soft); margin: .25rem 0; }
.run-sep.labelled { padding: .4rem .5rem .1rem; color: var(--text-faint); font-size: .7rem; letter-spacing: .07em; text-transform: uppercase; }
/* a summary cell's difference from the baseline, in the row's unit */
Expand Down Expand Up @@ -147,8 +148,8 @@
.fig-head .menu legend { float: none; } /* a group of links: its name above them */
.fig-head .icon-btn { flex: none; margin: calc((var(--tool-h) - 26px) / 2) 0 0 auto; } /* centred on the first row */
.ic-letter { display: inline-grid; place-items: center; font: 600 .8rem/1 var(--sans); } /* a letter in an icon's place */
.fig-head .tools-menu a::before { content: ""; flex: 0 0 1em; text-align: center; color: var(--accent); } /* every item keeps the check's slot, so the names align */
.fig-head .tools-menu a[aria-current="true"]::before { content: "✓"; } /* the card's style or metric */
.fig-head .tools-menu a .ic { flex: none; color: var(--accent); } /* every item keeps the check's slot, so the names align */
.fig-head .tools-menu a:not([aria-current="true"]) .ic { visibility: hidden; } /* the card's style or metric */
.fig-note { margin: 0; font-size: .84rem; color: var(--text-dim); }
/* the flag filters: one list of flagged tasks set aside in every column */
.compare-flags{display:flex;flex-wrap:wrap;gap:.65rem;align-items:center;margin:.6rem 0}
Expand Down
6 changes: 3 additions & 3 deletions app/static/onboarding.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
${sections.map((s, i) => {
const subs = s.subs, done = sectionDone(s), next = subs.find(x => !isDone(x)), open = s === cur || location.pathname === new URL(s.url, location).pathname;
return `<div class="onb-cat${done ? ' done' : ''}${s === cur ? ' now' : ''}">
<button type="button" data-onb-cat="${s.id}"><span class="onb-ring">${done ? '✓' : i + 1}</span><span><span class="onb-name">${esc(s.name)}</span><span class="onb-where">${esc(s.where)} →</span></span><span class="onb-cnt">${subs.filter(isDone).length}/${subs.length}</span></button>
${open ? `<ul class="onb-subs">${subs.map(x => `<li class="${isDone(x) ? 'done' : ''}${x === next ? ' next' : ''}"><button type="button" data-onb-sub="${s.id}:${x.id}"><span class="onb-tick" aria-hidden="true">${isDone(x) ? '✓' : ''}</span><span>${esc(x.text)}${x.optional ? ' <span class="onb-opt">optional</span>' : ''}</span></button></li>`).join('')}</ul>` : ''}
<button type="button" data-onb-cat="${s.id}"><span class="onb-ring">${done ? '<svg class="ic" aria-hidden="true"><use href="#i-check"/></svg>' : i + 1}</span><span><span class="onb-name">${esc(s.name)}</span><span class="onb-where">${esc(s.where)} <svg class="ic" aria-hidden="true"><use href="#i-chevron-right"/></svg></span></span><span class="onb-cnt">${subs.filter(isDone).length}/${subs.length}</span></button>
${open ? `<ul class="onb-subs">${subs.map(x => `<li class="${isDone(x) ? 'done' : ''}${x === next ? ' next' : ''}"><button type="button" data-onb-sub="${s.id}:${x.id}"><span class="onb-tick" aria-hidden="true">${isDone(x) ? '<svg class="ic" aria-hidden="true"><use href="#i-check"/></svg>' : ''}</span><span>${esc(x.text)}${x.optional ? ' <span class="onb-opt">optional</span>' : ''}</span></button></li>`).join('')}</ul>` : ''}
</div>`;
}).join('')}
<button class="onb-restart" type="button" data-onb="tour">Replay the tour</button>`;
Expand Down Expand Up @@ -91,7 +91,7 @@
const d = document.createElement('dialog');
d.className = 'onb-dialog';
d.setAttribute('aria-labelledby', 'onb-w-h');
d.innerHTML = `<div class="onb-mark" aria-hidden="true">∅</div>
d.innerHTML = `<div class="onb-mark" aria-hidden="true"><svg class="ic ic-lg" aria-hidden="true"><use href="#i-empty"/></svg></div>
<h2 id="onb-w-h">Welcome to Nullius. Want a guided start?</h2>
<p>A one-minute look at the main pages, then a checklist that takes you to a first result:</p>
<ul><li>Set up a key and where runs happen</li><li>A free check run: oracle and nop call no model</li><li>Read the result, then compare an agent's run</li></ul>
Expand Down
4 changes: 2 additions & 2 deletions app/static/runs/live-board.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@
<td><span class="lb-took">${t.total_sec != null ? `<b>${clock(t.total_sec)}</b> in all` : '—'}</span></td>
${has.steps ? stepsCell(t, false) : ''}${has.calls ? callsCell(t) : ''}
${has.tokens ? `<td class="num${tok == null ? ' na' : ''}">${count(tok)}</td>` : ''}
${has.line ? `<td><span class="lb-line${line ? '' : ' na'}" title="${esc(line || '')}">${line ? redacted(line) : '—'}</span></td>` : ''}<td class="lb-go">${href ? `<a class="lb-open-row" href="${esc(href)}">Open →</a>` : ''}</td></tr>`;
${has.line ? `<td><span class="lb-line${line ? '' : ' na'}" title="${esc(line || '')}">${line ? redacted(line) : '—'}</span></td>` : ''}<td class="lb-go">${href ? `<a class="lb-open-row" href="${esc(href)}">Open <svg class="ic" aria-hidden="true"><use href="#i-chevron-right"/></svg></a>` : ''}</td></tr>`;
}).join('');
const said = [busy ? (opts.showAll ? `All ${running.length} in flight` : `${rows.length} of ${running.length} in flight`) + ', nearest their limit first' : '',
waits ? (opts.showAll ? `all ${queued.length} queued` : `the first ${queuedRows.length} of ${queued.length} queued`) : '',
Expand Down Expand Up @@ -295,7 +295,7 @@
${facts.length ? `<dl class="lb-facts">${facts.map(([k, v, f]) => `<div><dt>${k}</dt><dd>${f(v)}</dd></div>`).join('')}</dl>` : ''}
<div class="lb-evl"><span>events.jsonl, latest</span><span>${events.length} in the tail</span></div>
<div class="lb-ev">${events.length ? events.map(e => `<div><span>${hms(e.ts)}</span><span class="e">${esc(e.event)}</span><span title="${esc(e.phase || e.outcome || e.activity || e.line || '')}">${redacted(e.phase || e.outcome || e.activity || e.line || '')}</span></div>`).join('') : '<div><span>—</span></div>'}</div>
${href ? `<a class="lb-open-trial" href="${esc(href)}">Open the trial →</a>` : ''}`;
${href ? `<a class="lb-open-trial" href="${esc(href)}">Open the trial <svg class="ic" aria-hidden="true"><use href="#i-chevron-right"/></svg></a>` : ''}`;
}

function render(snapshot, opts) {
Expand Down
9 changes: 5 additions & 4 deletions app/static/settings/hosts.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
}
svg.setAttribute('aria-label', said); svg.querySelector('title').textContent = said;
};
const failed = (out, message) => { out.textContent = ' ' + message; out.insertAdjacentHTML('afterbegin', '<svg class="ic" aria-hidden="true"><use href="#i-alert-circle"/></svg>'); };
let running = 0; // tests under way: Test all waits for every one
const testAll = () => document.querySelector('#hosts [data-test-all]');
const test = async row => {
Expand All @@ -48,7 +49,7 @@
const r = await nulliusFetch(list().dataset.test, {method: 'POST', headers: {'X-CSRF-Token': csrf()}, body: new URLSearchParams({entry: row.dataset.machine})});
const j = await r.json();
const ok = j.ok; // reached; what runs there is in its Info
out.textContent = ok ? '' : '✕ ' + (j.error || 'HTTP ' + r.status);
out.textContent = ''; if (!ok) failed(out, j.error || 'HTTP ' + r.status);
settle(row, ok ? 'st-runs' : 'st-blocked', ok ? 'Reached' : 'Not reached');
if (j.info) row.querySelector('[data-panel="info"]').innerHTML = j.info;
Object.entries(j.cells || {}).forEach(([cell, text]) => { row.querySelector(`[data-cell="${cell}"]`).textContent = text; });
Expand All @@ -61,7 +62,7 @@
if (!note) { note = document.createElement('p'); note.className = 'st-note st-warn'; value.append(note); }
note.textContent = warn[i.dataset.key];
});
} catch (err) { out.textContent = '✕ ' + err; settle(row, 'st-blocked', 'Not reached'); }
} catch (err) { failed(out, err); settle(row, 'st-blocked', 'Not reached'); }
finally { running -= 1; if (testAll()) testAll().disabled = running > 0; if (button) button.disabled = false; }
};
// what the edit panel names now, as an entry: an alias, or [Name=]user@address[:port][:key]
Expand All @@ -78,14 +79,14 @@
try {
const r = await nulliusFetch(document.getElementById('settings-form').action, {method: 'POST', headers: {Accept: 'application/json'}, body});
const j = await r.json();
if (!j.ok) { said.textContent = '✕ ' + (j.message || 'HTTP ' + r.status); return; }
if (!j.ok) { failed(said, (j.message || 'HTTP ' + r.status)); return; }
delete opened[row.dataset.machine];
list().replaceWith(new DOMParser().parseFromString(j.html, 'text/html').getElementById('HOSTS'));
window.nulliusSettings.rebase();
reopen();
document.dispatchEvent(new CustomEvent('nullius-hosts-replaced'));
window.nulliusNotify(j.message, {key: 'settings'});
} catch (err) { said.textContent = '✕ ' + err; }
} catch (err) { failed(said, err); }
};
document.addEventListener('click', event => {
const t = event.target;
Expand Down
2 changes: 1 addition & 1 deletion app/static/settings/modal.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ body:has(.settings-modal[open]) { overflow: hidden; }
.settings-embedded .shell, :root[data-rail] .settings-embedded .shell { display: block; height: 100%; min-height: 0; }
.settings-embedded main { height: 100dvh; min-height: 0; padding: 24px; box-sizing: border-box; }
.settings-embedded .st-page { height: 100%; min-height: 0; }
.settings-embedded :is(.page-head, .st-ready) { display: none; }
.settings-embedded .page-head { display: none; }
.settings-embedded .st-layout { flex: 1; min-height: 0; flex-wrap: nowrap; gap: 24px; align-items: stretch; }
.settings-embedded .st-index { flex: 0 0 190px; position: static; min-height: 0; overflow-y: auto; border: 0; background: transparent; padding: 0; }
.settings-embedded .st-main { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; padding: 0 8px 16px 4px; }
Expand Down
6 changes: 0 additions & 6 deletions app/static/settings/settings.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@
.st-page { width: 100%; max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.st-page .sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.st-page > .page-head { margin-bottom: calc(var(--head-gap) - 22px); } /* the column's gap is part of the head's */
.st-ready { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding: 12px 16px; border: 1px solid var(--border-soft); border-radius: 12px; background: var(--surface); }
.st-ready-t { font-weight: 500; }
.st-ready-i { font-size: 13px; color: var(--nav-text); text-decoration: none; }
.st-ready-i:hover { color: var(--text); text-decoration: none; }
.st-ready-i.on { color: var(--text); }
.st-ready-i.on > span:first-child { color: var(--ok); }

.st-layout { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; container-type: inline-size; }
.st-index { flex: 1 1 200px; max-width: 240px; position: sticky; top: 16px; display: flex; flex-direction: column; gap: 2px; padding: 6px; border: 1px solid var(--border-soft); border-radius: 12px; background: var(--surface); }
Expand Down
13 changes: 4 additions & 9 deletions app/static/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -431,12 +431,7 @@ button.seg:hover { filter: brightness(1.25); }

.grid.sortable thead th { cursor: pointer; user-select: none; white-space: nowrap; }
.grid.sortable thead th:hover { color: var(--text); }
/* an arrow on the sorted column only, in a size independent of the small uppercase header text */
.grid.sortable thead th[data-sorted]::after {
margin-left: .4rem; font-size: 1.05rem; line-height: 0; vertical-align: -.1em; color: var(--accent); font-weight: 500;
}
.grid.sortable thead th[data-sorted="asc"]::after { content: "↑"; }
.grid.sortable thead th[data-sorted="desc"]::after { content: "↓"; }
.grid.sortable .sort-mark { margin-left: .4rem; color: var(--accent); }
.grid.sortable thead th:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--accent-soft); }
/* a header without data-type (a checkbox, a state, the actions) does not sort */
.grid.sortable thead th:not([data-type]) { cursor: default; }
Expand Down Expand Up @@ -796,8 +791,7 @@ button.seg:hover { filter: brightness(1.25); }
border: none; background: none; cursor: pointer; padding: 0;
color: var(--text-faint); font-size: .7rem; line-height: 1;
}
.wf-chev::before { content: "▼"; display: inline-block; transition: transform .12s ease; }
.wf-row.collapsed .wf-chev::before { transform: rotate(-90deg); }
:root .wf-chev.disclosure-chevron::before { margin: 0; }
.wf-dot { width: 8px; height: 8px; border-radius: 2px; background: var(--c); flex: none; }
.wf-label {
border: none; background: none; padding: 0; cursor: pointer;
Expand Down Expand Up @@ -1508,7 +1502,7 @@ a.chip { text-decoration: none; }
@media (prefers-reduced-motion: no-preference) {
.shell { transition: grid-template-columns .16s ease; }
}
.ic { width: var(--ic-sm); height: var(--ic-sm); flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ic { vertical-align: middle; width: var(--ic-sm); height: var(--ic-sm); flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
/* A symbol drawn per size shows its 16-grid drawing unless the icon is sized --ic-lg or --ic-xl: each such rule picks its drawing. */
.ic-lg { width: var(--ic-lg); height: var(--ic-lg); --ic-d16: none; --ic-d24: inline; --ic-d32: none; }
.ic-xl { width: var(--ic-xl); height: var(--ic-xl); --ic-d16: none; --ic-d24: none; --ic-d32: inline; }
Expand Down Expand Up @@ -1777,6 +1771,7 @@ pre.instruction { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 32
.std-ctl b { font-weight: 500; }
.std-ctl em { font-style: normal; }
.std-checkchip { border-color: var(--border-soft); color: var(--text-dim); }
.std-proof { display: inline-flex; align-items: center; gap: 4px; }
.std-proof { font: 11px/1.6 var(--sans); overflow: hidden; text-overflow: ellipsis; }
.std-proof-ok { color: var(--ok); }
.std-proof-part { color: var(--patch_failed_tests); }
Expand Down
2 changes: 2 additions & 0 deletions app/static/tables.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ window.NulliusTable = {
after();
};
const mark = () => heads.forEach((th, idx) => {
th.querySelector('.sort-mark')?.remove();
if (idx === col) th.insertAdjacentHTML('beforeend', dir > 0 ? '<svg class="ic sort-mark" aria-hidden="true"><use href="#i-sort-asc"/></svg>' : '<svg class="ic sort-mark" aria-hidden="true"><use href="#i-sort-desc"/></svg>');
th.toggleAttribute('data-sorted', idx === col);
th.toggleAttribute('aria-sort', idx === col);
if (idx === col) { th.dataset.sorted = dir > 0 ? 'asc' : 'desc'; th.setAttribute('aria-sort', dir > 0 ? 'ascending' : 'descending'); }
Expand Down
Loading