clavarium 0.2.428-next.1 → 0.2.429-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "clavarium",
3
- "version": "0.2.428-next.1",
3
+ "version": "0.2.429-next.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "clavarium",
9
- "version": "0.2.428-next.1",
9
+ "version": "0.2.429-next.1",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@xterm/addon-fit": "^0.11.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clavarium",
3
- "version": "0.2.428-next.1",
3
+ "version": "0.2.429-next.1",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "description": "A conversation is a VM with a terminal in it. Everything else is a folder.",
package/server/api.mjs CHANGED
@@ -126,6 +126,7 @@
126
126
  * POST /api/wifi/handover: the network handed over to NetworkManager (back as it was if it does not work)
127
127
  * GET /api/meshcentral: the remote screen (MeshCentral); POST /api/meshcentral/enable (turned on, in the background) /disable
128
128
  * GET /api/events?kind=&conversation=&q=&before=&limit= what happened, newest first
129
+ * GET /api/jobs what it is doing: { running, done } (jobs.mjs), its updates of the day among the done
129
130
  * GET /api/history?of=server|<name>&span=1h|24h|7d the curves of memory, CPU and disk (and the reserve, for the server)
130
131
  * GET /api/history/all?span=1h|24h|7d Settings, Usage: the server and every machine (asleep too) on one time axis,
131
132
  * in GB and cores: {t, capacity, server, itself, machines: [{name, alloc, asleep, ...}]}
@@ -406,6 +407,14 @@ export async function handleApi(request, response, conversations, headers, resou
406
407
  /* Who may sign in (operators.mjs): none in local mode. */
407
408
  const reactOf = /^\/api\/conversations\/([^/]+)\/health-react$/.exec(pathname);
408
409
  if (reactOf && reacting) return send(200, reacting.settings(decodeURIComponent(reactOf[1]))), true;
410
+ if (pathname === '/api/jobs' && conversations.jobs) {
411
+ const said = conversations.jobs.list(conversations.list?.() ?? []);
412
+ const day = Date.now() - 24 * 3600_000;
413
+ const updated = (updates?.about().history ?? []).filter((h) => h.at && Date.parse(h.at) >= day)
414
+ .map((h) => ({ what: `Clavarium ${h.action === 'rollback' ? 'back to' : 'updated to'} ${h.to ?? '?'}`, endedAt: h.at, result: h.result === 'done' ? 'done' : 'failed', ...(h.result === 'done' ? {} : { why: h.why ?? h.result ?? '' }) }));
415
+ const done = [...said.done, ...updated].sort((a, b) => String(b.endedAt).localeCompare(String(a.endedAt)));
416
+ return send(200, { running: said.running, done }), true;
417
+ }
409
418
  if (pathname === '/api/events' && events) {
410
419
  const ask = { kind: query.get('kind') ?? '', conversation: query.get('conversation') ?? '', q: query.get('q') ?? '', before: query.get('before') ?? '', limit: Math.min(1000, Number(query.get('limit')) || 200) };
411
420
  const said = events.list(ask);
@@ -948,9 +948,12 @@ export class Conversations {
948
948
  /* In its machine: the manifest written aside, then one archive -- the manifest first, then what is kept
949
949
  (a path it has not made yet left out), the cache left out. */
950
950
  /* (Its paths are plain -- letters, digits, . _ / - -- checked by tools.mjs: given as words.) */
951
- const script = 'set -e; m=$(mktemp -d); printf "%s" "$1" > "$m/clavarium-conversation.json"; '
951
+ const script = 'm=$(mktemp -d) || exit 2; printf "%s" "$1" > "$m/clavarium-conversation.json"; '
952
952
  + 'ex=""; for a in $2; do ex="$ex --exclude=./$a"; done; ks=""; for a in $3; do if [ -e "$HOME/$a" ]; then ks="$ks ./$a"; fi; done; '
953
- + 'tar -czf - -C "$m" clavarium-conversation.json -C "$HOME" $ex $ks; rm -rf "$m"';
953
+ + 'rc=0; tar -czf - --warning=no-file-changed -C "$m" clavarium-conversation.json -C "$HOME" $ex $ks || rc=$?; rm -rf "$m"; '
954
+ /* 1: a file changed while read (its tool writing its log as it is read, 14-11: a live Claude Code): the
955
+ archive is whole all the same -- what was there, read; only a real error (2) fails. */
956
+ + '[ "$rc" -le 1 ]';
954
957
  const argv = this.#vms.execArgv(name, ['sh', '-c', script, 'export', manifest, tool.state.skip.join(' '), tool.state.keep.join(' ')]);
955
958
  const child = spawn(argv[0], argv.slice(1), { stdio: ['ignore', 'pipe', 'pipe'] });
956
959
  /* What it said when it failed: kept short, for the message that says why (a copy, a move). */
@@ -0,0 +1,69 @@
1
+ /* WHAT CLAVARIUM IS DOING (the « under way » badge, 14-11): every conversation in a busy phase -- built, copied,
2
+ * moved, restarted -- is a job under way, its step said as it goes; when it leaves that phase the job ends, done
3
+ * or failed with why, and is kept a day. Nothing is asked of the machines: it is read off the conversations' own
4
+ * record as it changes (Store's onChange), so it adds no wait.
5
+ *
6
+ * seen(before, after) a conversation's record changed (before or after undefined: made or removed)
7
+ * list(now?) { running: [...], done: [...] } newest first, done within KEEP_MS
8
+ */
9
+ import { JsonFile } from './store.mjs';
10
+
11
+ export const BUSY = ['building', 'moving', 'restarting'];
12
+ const KEEP_MS = 24 * 3600_000;
13
+ const DONE_MAX = 50;
14
+
15
+ const titleOf = (c) => c?.title ?? c?.name ?? '?';
16
+
17
+ /* Its words: what it is, from the phase and the record (a copy names its original, a move its machine). */
18
+ export function jobWords(c) {
19
+ if (c.phase === 'moving') return `Moving ${titleOf(c)}${c.sharedMachine ? ` into « ${c.sharedMachine} »` : ''}`;
20
+ if (c.phase === 'restarting') return `Restarting ${titleOf(c)}`;
21
+ if (c.copyOf) return `Copy ${titleOf(c)}${c.sharedMachine ? ` in « ${c.sharedMachine} »` : ''}`;
22
+ return `Building ${titleOf(c)}${c.sharedMachine ? ` in « ${c.sharedMachine} »` : ''}`;
23
+ }
24
+
25
+ export class Jobs {
26
+ #open = new Map();
27
+ #file;
28
+ #done;
29
+ #now;
30
+
31
+ constructor({ path, now = () => Date.now() } = {}) {
32
+ this.#now = now;
33
+ this.#file = path ? new JsonFile(path, []) : undefined;
34
+ const kept = this.#file?.get();
35
+ this.#done = Array.isArray(kept) ? kept : [];
36
+ }
37
+
38
+ seen(before, after) {
39
+ const name = after?.name ?? before?.name;
40
+ if (!name) return;
41
+ const busy = after && BUSY.includes(after.phase);
42
+ if (busy && !this.#open.has(name)) this.#open.set(name, { conversation: name, what: jobWords(after), startedAt: new Date(this.#now()).toISOString() });
43
+ else if (busy) this.#open.get(name).what = jobWords(after);
44
+ if (busy || !this.#open.has(name)) return;
45
+ const job = this.#open.get(name);
46
+ this.#open.delete(name);
47
+ const ok = after?.phase === 'ready';
48
+ this.#end({ ...job, endedAt: new Date(this.#now()).toISOString(), result: after ? (ok ? 'done' : 'failed') : 'removed', ...(after && !ok && after.error ? { why: String(after.error).slice(0, 300) } : {}) });
49
+ }
50
+
51
+ #end(job) {
52
+ const since = this.#now() - KEEP_MS;
53
+ this.#done = [job, ...this.#done.filter((j) => Date.parse(j.endedAt) >= since)].slice(0, DONE_MAX);
54
+ this.#file?.set(this.#done);
55
+ }
56
+
57
+ /* `records`: the conversations as they are now, for their live step. */
58
+ list(records = []) {
59
+ const since = this.#now() - KEEP_MS;
60
+ /* Read off the records: one busy since before a restart of the server is under way too, and ends here. */
61
+ for (const c of records) if (BUSY.includes(c.phase) && !this.#open.has(c.name)) this.seen(undefined, c);
62
+ const byName = new Map(records.map((c) => [c.name, c]));
63
+ const running = [...this.#open.values()].map((j) => {
64
+ const c = byName.get(j.conversation);
65
+ return { ...j, ...(c ? { what: jobWords(c), step: c.step ?? '', progress: c.progress } : {}) };
66
+ });
67
+ return { running, done: this.#done.filter((j) => Date.parse(j.endedAt) >= since) };
68
+ }
69
+ }
package/server/main.mjs CHANGED
@@ -93,6 +93,7 @@ import { ApiKeys, handleExternal, handleApiKeys, statusOf } from './apikeys.mjs'
93
93
  import { RelayJoin, handleRelayJoin, RELAY_JOIN_PATH } from './relayjoin.mjs';
94
94
  import { WebSocketServer } from 'ws';
95
95
  import { copyWorkFolder } from './copywork.mjs';
96
+ import { Jobs } from './jobs.mjs';
96
97
 
97
98
  const ROOT = fileURLToPath(new URL('..', import.meta.url));
98
99
  const MAINTENANCE = 'deploy/maintenance.html';
@@ -312,12 +313,15 @@ export async function startHome({ port, host, dataDir, mntDir = dataDir, gitRese
312
313
  let repairTerminal = async () => { throw new Error('not ready'); };
313
314
  const asHost = runner(host);
314
315
  /* A conversation in a shared machine (#221) says which: the machine its VM operations reach. */
315
- const conversationStore = new Store(`${dataDir}/conversations.json`);
316
+ const jobs = new Jobs({ path: `${dataDir}/jobs.json` });
317
+ const conversationStore = new Store(`${dataDir}/conversations.json`, { onChange: (before, after) => jobs.seen(before, after) });
316
318
  const vms = new Vms(asHost, host, {
317
319
  machineOf: (name) => { const m = conversationStore.get(name)?.sharedMachine; return typeof m === 'string' && m ? m : undefined; },
318
320
  userOf: (name) => { const u = conversationStore.get(name)?.machineUser; return u && Number.isInteger(u.uid) && Number.isInteger(u.gid) ? u : undefined; },
319
321
  });
320
322
  const all = conversations ?? new Conversations({ store: conversationStore, layout: new JsonFile(`${dataDir}/layout.json`, {}), vms, tools, ...(stopDelayMs === undefined ? {} : { stopDelayMs }) });
323
+ /* What it is doing (jobs.mjs): read by GET /api/jobs. */
324
+ if (!all.jobs) all.jobs = jobs;
321
325
  /* Who may do what with what: ONE table, shared by everything below. */
322
326
  const grants = new Grants(new Store(`${dataDir}/grants.json`));
323
327
  /* Folder-style boxes the owner drops assets into, to tidy the views and hand a whole box at once (groups.mjs). */
package/server/store.mjs CHANGED
@@ -10,9 +10,12 @@ import { dirname } from 'node:path';
10
10
  export class Store {
11
11
  #path;
12
12
  #items;
13
+ /* Told of each change, its record before and after (undefined: made or removed): jobs.mjs reads it. */
14
+ onChange;
13
15
 
14
- constructor(path) {
16
+ constructor(path, { onChange } = {}) {
15
17
  this.#path = path;
18
+ this.onChange = onChange;
16
19
  mkdirSync(dirname(path), { recursive: true });
17
20
  try { this.#items = JSON.parse(readFileSync(path, 'utf8')); } catch { this.#items = []; }
18
21
  if (!Array.isArray(this.#items)) this.#items = [];
@@ -23,21 +26,32 @@ export class Store {
23
26
 
24
27
  put(conversation) {
25
28
  const i = this.#items.findIndex((x) => x.name === conversation.name);
29
+ const before = i >= 0 ? { ...this.#items[i] } : undefined;
26
30
  if (i >= 0) this.#items[i] = { ...conversation }; else this.#items.push({ ...conversation });
27
31
  this.#save();
32
+ this.#told(before, conversation);
28
33
  }
29
34
 
30
35
  patch(name, changes) {
31
36
  const c = this.#items.find((x) => x.name === name);
32
37
  if (!c) return undefined;
38
+ const before = { ...c };
33
39
  Object.assign(c, changes);
34
40
  this.#save();
41
+ this.#told(before, c);
35
42
  return { ...c };
36
43
  }
37
44
 
38
45
  remove(name) {
46
+ const before = this.get(name);
39
47
  this.#items = this.#items.filter((x) => x.name !== name);
40
48
  this.#save();
49
+ if (before) this.#told(before, undefined);
50
+ }
51
+
52
+ #told(before, after) {
53
+ if (!this.onChange) return;
54
+ try { this.onChange(before, after ? { ...after } : undefined); } catch { /* a listener never breaks a write */ }
41
55
  }
42
56
 
43
57
  #save() {
package/web/app.js CHANGED
@@ -1978,10 +1978,56 @@
1978
1978
  } catch { /* a server without VMs has no list: the page is one terminal */ }
1979
1979
  /* The panel is open: what the answerer did meanwhile is said there. */
1980
1980
  if (!DEVICE && panelShown) { void paintAnswerer(); paintWakeups(); paintMachine(conversations.find((x) => x.name === current)); }
1981
+ if (!DEVICE && home) void paintJobs();
1981
1982
  /* A start told step by step is asked about more often: its tool appears soon after its last step. */
1982
1983
  if (home) pollTimer = setTimeout(refresh, conversations.some(holds) || conversations.some((c) => c.machine) ? 1500 : conversations.some((c) => c.phase === 'building' || c.phase === 'moving' || c.phase === 'restarting') ? 2500 : 10000);
1983
1984
  }
1984
1985
 
1986
+ /* ---------- WHAT IT IS DOING (jobs.mjs, 14-11) ----------
1987
+ A badge by the list's title while something runs (« ● 2 under way »), or when one failed since the list
1988
+ was last opened (« ● 1 failed », red); nothing otherwise. Tapped: what runs, its step; then the day's ends,
1989
+ done or failed with why. A line opens its conversation. Read with the list, nothing asked of the machines. */
1990
+ let jobsNow = { running: [], done: [] };
1991
+ const JOBS_SEEN = 'clavarium.jobsSeen';
1992
+ const jobsSeen = () => { try { return localStorage.getItem(JOBS_SEEN) ?? ''; } catch { return ''; } };
1993
+ async function paintJobs() {
1994
+ try { const r = await fetch(`${API}/jobs`); if (!r.ok) return; jobsNow = await r.json(); } catch { return; }
1995
+ const failed = jobsNow.done.filter((j) => j.result === 'failed' && String(j.endedAt) > jobsSeen()).length;
1996
+ const badge = $('jobs-open');
1997
+ const n = jobsNow.running.length;
1998
+ badge.hidden = !n && !failed;
1999
+ badge.dataset.tone = !n && failed ? 'bad' : '';
2000
+ badge.textContent = n ? `${n} under way` : `${failed} failed`;
2001
+ badge.title = n ? jobsNow.running.map((j) => j.what).join(' · ') : 'Tap to see what failed';
2002
+ if (!$('jobs').hidden) paintJobsList();
2003
+ }
2004
+ function paintJobsList() {
2005
+ const line = (j, mark, result) => {
2006
+ const b = document.createElement('button'); b.type = 'button'; b.className = 'job'; b.dataset.result = result;
2007
+ const when = j.endedAt ? new Date(j.endedAt).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' }) : '';
2008
+ b.append(Object.assign(document.createElement('span'), { textContent: mark }), Object.assign(document.createElement('span'), { textContent: j.what }),
2009
+ Object.assign(document.createElement('small'), { textContent: result === 'running' ? (j.step || 'Starting') : [j.why, when].filter(Boolean).join(' · ') }));
2010
+ if (j.conversation && conversations.some((c) => c.name === j.conversation)) b.addEventListener('click', () => { closeJobs(); select(j.conversation, { step: true }); });
2011
+ else b.disabled = true;
2012
+ return b;
2013
+ };
2014
+ const head = (text) => Object.assign(document.createElement('h3'), { textContent: text });
2015
+ const parts = [];
2016
+ if (jobsNow.running.length) parts.push(head('Under way'), ...jobsNow.running.map((j) => line(j, '⟳', 'running')));
2017
+ if (jobsNow.done.length) parts.push(head('Today'), ...jobsNow.done.map((j) => line(j, j.result === 'done' ? '✓' : '✗', j.result === 'done' ? 'done' : 'failed')));
2018
+ if (!parts.length) parts.push(Object.assign(document.createElement('p'), { className: 'hint', textContent: 'Nothing under way.' }));
2019
+ $('jobs').replaceChildren(...parts);
2020
+ }
2021
+ function closeJobs() { $('jobs').hidden = true; $('jobs-open').setAttribute('aria-expanded', 'false'); }
2022
+ $('jobs-open').addEventListener('click', () => {
2023
+ if (!$('jobs').hidden) { closeJobs(); return; }
2024
+ paintJobsList(); $('jobs').hidden = false; $('jobs-open').setAttribute('aria-expanded', 'true');
2025
+ try { localStorage.setItem(JOBS_SEEN, new Date().toISOString()); } catch { /* kept for this visit only */ }
2026
+ if (!jobsNow.running.length) $('jobs-open').hidden = true;
2027
+ });
2028
+ document.addEventListener('click', (event) => { if (!$('jobs').hidden && !event.target.closest('#jobs, #jobs-open')) closeJobs(); });
2029
+ document.addEventListener('keydown', (event) => { if (event.key === 'Escape' && !$('jobs').hidden) closeJobs(); });
2030
+
1985
2031
  /* ---------- A NEW CONVERSATION: a page of its own, as Settings ----------
1986
2032
  "+ New" opens it beside the list (the whole screen on a phone), with an
1987
2033
  address of its own (?open=new); Back, Escape, Cancel and its "<" link
@@ -3387,8 +3433,12 @@
3387
3433
  box.hidden = !wanted;
3388
3434
  /* Where the tool talks through the app, the chat is the whole screen: one box to write in. */
3389
3435
  /* Its chat off, on this server's own page: said, with the button that turns it on (a device's page keeps the plain screen). */
3390
- const offer = !DEVICE && !wanted && !noTerminal();
3391
- $('simple-plain').hidden = wanted || offer;
3436
+ /* Not known yet -- the list not read, its chat not asked, or it is being built or moved: nothing said
3437
+ rather than a wrong screen (14-11: « chat is off », then « Its screen: connecting », then the chat). */
3438
+ const here = conversations.find((x) => x.name === current);
3439
+ const unknown = !DEVICE && (!here || here.phase !== 'ready' || talkOf !== current);
3440
+ const offer = !unknown && !DEVICE && !wanted && !noTerminal();
3441
+ $('simple-plain').hidden = wanted || offer || unknown;
3392
3442
  $('chat-turn').hidden = !offer;
3393
3443
  if (offer) {
3394
3444
  const possible = !(talkOf === current && talk.possible === false);
package/web/index.html CHANGED
@@ -14,7 +14,7 @@
14
14
  <link rel="stylesheet" href="/vendor/diff2html.css">
15
15
  <div id="app" data-place="conversations">
16
16
  <aside id="list" hidden>
17
- <div class="top"><b id="list-title" title="Conversations">Clavarium</b><span class="top-acts"><button type="button" id="list-pin" class="icon-btn" aria-pressed="false" aria-label="Keep the list open" title="Keep the list open: it no longer folds when a conversation is opened"><svg class="ic" viewBox="0 0 24 24" aria-hidden="true"><path d="M12 17v5"/><path d="M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z"/></svg></button><button type="button" id="install-top" class="icon-btn" hidden aria-label="Install as an app" title="Install as an app: its own icon, full screen, no browser bar"><svg class="ic" viewBox="0 0 24 24" aria-hidden="true"><path d="M12 3v12"/><path d="m7 10 5 5 5-5"/><path d="M5 21h14"/></svg></button><button type="button" id="search-open" class="icon-btn" aria-label="Search conversations" title="Search (/ or Ctrl+K)" aria-expanded="false" aria-controls="search"><svg class="ic" viewBox="0 0 24 24" aria-hidden="true"><circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/></svg></button><button type="button" id="new" class="icon-btn new-btn" aria-label="New conversation" title="New conversation"><svg class="ic" viewBox="0 0 24 24" aria-hidden="true"><path d="M12 5v14"/><path d="M5 12h14"/></svg></button></span></div>
17
+ <div class="top"><b id="list-title" title="Conversations">Clavarium</b><!-- WHAT IT IS DOING (jobs.mjs, 14-11): shown only while something runs, or failed unseen. --><button type="button" id="jobs-open" class="jobs-badge" hidden aria-expanded="false" aria-controls="jobs"></button><span class="top-acts"><button type="button" id="list-pin" class="icon-btn" aria-pressed="false" aria-label="Keep the list open" title="Keep the list open: it no longer folds when a conversation is opened"><svg class="ic" viewBox="0 0 24 24" aria-hidden="true"><path d="M12 17v5"/><path d="M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z"/></svg></button><button type="button" id="install-top" class="icon-btn" hidden aria-label="Install as an app" title="Install as an app: its own icon, full screen, no browser bar"><svg class="ic" viewBox="0 0 24 24" aria-hidden="true"><path d="M12 3v12"/><path d="m7 10 5 5 5-5"/><path d="M5 21h14"/></svg></button><button type="button" id="search-open" class="icon-btn" aria-label="Search conversations" title="Search (/ or Ctrl+K)" aria-expanded="false" aria-controls="search"><svg class="ic" viewBox="0 0 24 24" aria-hidden="true"><circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/></svg></button><button type="button" id="new" class="icon-btn new-btn" aria-label="New conversation" title="New conversation"><svg class="ic" viewBox="0 0 24 24" aria-hidden="true"><path d="M12 5v14"/><path d="M5 12h14"/></svg></button></span><div id="jobs" class="jobs-pop" role="dialog" aria-label="Under way" hidden></div></div>
18
18
  <!-- SEARCH, discreet: opened by the magnifier, "/" or Ctrl+K; filters as it is typed. -->
19
19
  <div id="search" role="search" hidden><input id="search-field" type="search" placeholder="Search" aria-label="Search conversations: name, folder, identifier, tool" autocomplete="off" spellcheck="false" maxlength="60" aria-controls="items"></div>
20
20
  <!-- Needs you and Recent: copies of rows of the list below, by when they were last used (app.js, paint). -->
package/web/style.css CHANGED
@@ -1425,6 +1425,18 @@ select.pill { appearance: auto; }
1425
1425
  /* ---------- the list: search, folders, moved by hand ---------- */
1426
1426
  #list .top-acts { display: flex; align-items: center; gap: 6px; }
1427
1427
  #list-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
1428
+ /* What it is doing (14-11): a small badge by the title, its list folded under it. */
1429
+ #list .top { position: relative; }
1430
+ .jobs-badge { display: inline-flex; align-items: center; gap: 6px; flex: none; margin-left: 8px; margin-right: auto; padding: 2px 10px; min-height: 0; border: 1px solid var(--brass); border-radius: 999px; background: transparent; color: var(--brass-ink); font-size: .75rem; font-weight: 600; white-space: nowrap; }
1431
+ .jobs-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
1432
+ .jobs-badge[data-tone="bad"] { border-color: var(--danger); color: var(--danger); }
1433
+ .jobs-pop { position: absolute; z-index: 30; top: 100%; left: 8px; right: 8px; margin-top: 4px; min-width: 260px; max-height: 60vh; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgb(0 0 0 / .35); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
1434
+ .jobs-pop h3 { margin: 2px 0 0; font-size: .8125rem; }
1435
+ .jobs-pop .job { display: grid; grid-template-columns: 16px 1fr; gap: 2px 8px; text-align: left; background: transparent; border: 0; padding: 4px 0; color: var(--ink); font: inherit; font-size: .8125rem; cursor: pointer; }
1436
+ .jobs-pop .job small { grid-column: 2; color: var(--ink2); overflow-wrap: anywhere; }
1437
+ .jobs-pop .job[data-result="done"] > span:first-child { color: var(--ok); }
1438
+ .jobs-pop .job[data-result="failed"] { color: var(--danger); }
1439
+ .jobs-pop .hint { margin: 0; }
1428
1440
  .icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; background: transparent; border-color: transparent; color: var(--ink2); }
1429
1441
  .icon-btn:hover, .icon-btn[aria-expanded="true"] { color: inherit; border-color: var(--line); }
1430
1442
  .icon-btn .ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }