clavarium 0.2.23-next.2 → 0.2.24-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,18 +1,18 @@
1
1
  {
2
2
  "name": "clavarium",
3
- "version": "0.2.23-next.2",
3
+ "version": "0.2.24-next.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "clavarium",
9
- "version": "0.2.23-next.2",
9
+ "version": "0.2.24-next.1",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@xterm/addon-fit": "^0.11.0",
13
13
  "@xterm/xterm": "^6.0.0",
14
14
  "clavarium-docket": "0.1.0",
15
- "clavarium-parley": "0.14.0-next.1",
15
+ "clavarium-parley": "0.15.0-next.1",
16
16
  "mermaid": "11.17.2",
17
17
  "node-pty": "^1.1.0",
18
18
  "pdfjs-dist": "6.4.299",
@@ -700,9 +700,9 @@
700
700
  }
701
701
  },
702
702
  "node_modules/clavarium-parley": {
703
- "version": "0.14.0-next.1",
704
- "resolved": "https://registry.npmjs.org/clavarium-parley/-/clavarium-parley-0.14.0-next.1.tgz",
705
- "integrity": "sha512-hPscRjPaoh9Jjucjt0C48DSiOOEwVj2ZUBBs0iGL7rIZlqC/GuxwFq6KvlSqWVyVFuyOwRsO7OdpGcuYVsWjZQ==",
703
+ "version": "0.15.0-next.1",
704
+ "resolved": "https://registry.npmjs.org/clavarium-parley/-/clavarium-parley-0.15.0-next.1.tgz",
705
+ "integrity": "sha512-TfnvihIN93QrKbDEFP1RXKZXWZZ4fhsrSkHr9aM5r+WVv24+OuHPl2L4y7aLL5YPfzS89wlW9owMc4S0eUB47w==",
706
706
  "license": "MIT",
707
707
  "bin": {
708
708
  "parley": "bin/parley.mjs",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clavarium",
3
- "version": "0.2.23-next.2",
3
+ "version": "0.2.24-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.",
@@ -45,7 +45,7 @@
45
45
  "@xterm/addon-fit": "^0.11.0",
46
46
  "@xterm/xterm": "^6.0.0",
47
47
  "clavarium-docket": "0.1.0",
48
- "clavarium-parley": "0.14.0-next.1",
48
+ "clavarium-parley": "0.15.0-next.1",
49
49
  "mermaid": "11.17.2",
50
50
  "node-pty": "^1.1.0",
51
51
  "pdfjs-dist": "6.4.299",
@@ -142,11 +142,13 @@ export class GitChecks {
142
142
  if (!hook && !command) return { ...base, status: 'none', output: 'No check is set: no pre-push hook asked for, no check command.' };
143
143
  const machine = wanted === undefined ? await this.machineFor(repository) : (await this.runs(wanted, repository) ? wanted : undefined);
144
144
  if (!machine) return { ...base, status: 'unavailable', output: 'No machine that has this repository attached is running: the checks could not run. Open a conversation it is attached to, then look again.' };
145
+ const began = Date.now();
145
146
  const line = `refs/heads/${branch} ${head} refs/heads/${target} ${remoteTip ?? ZERO}`;
146
147
  const r = await this.#vms.exec(machine, ['timeout', '-k', '10', String(seconds), 'sh', '-c', SCRIPT, 'clavarium-check', `/resources/${repository}`, head, line, String(remote ?? ''), command, hook ? 'yes' : 'no'],
147
148
  { timeoutMs: (seconds + 60) * 1000 }).catch((error) => ({ code: -1, stdout: '', stderr: String(error?.message ?? error) }));
148
149
  const output = printable(`${r.stdout ?? ''}${r.stderr ?? ''}`).trim();
149
- const said = (status, why) => ({ ...base, machine, status, output: why ? `${why}${output ? `\n${output}` : ''}` : output });
150
+ /* `ms`: how long they ran, so that the next run can say about how long it takes. */
151
+ const said = (status, why) => ({ ...base, machine, status, ms: Date.now() - began, output: why ? `${why}${output ? `\n${output}` : ''}` : output });
150
152
  if (r.code === 0) return said('passed');
151
153
  if (r.code === NOTHING) return said('none', 'Nothing was checked: this repository has no pre-push hook, and no check command is set.');
152
154
  if (r.code === TIMED_OUT || r.code === 137) return said('failed', `Stopped after ${seconds} seconds, the time limit.`);
@@ -270,6 +270,7 @@ export class GitKeeper {
270
270
  /* The newest checks of the repository, whatever their target. */
271
271
  checks: [...(this.#results.get(r.name)?.values() ?? [])].sort((x, y) => String(y.at ?? '').localeCompare(String(x.at ?? '')))[0] ?? null,
272
272
  last: this.lastChecks(r.name),
273
+ running: this.runningChecks(r.name),
273
274
  read: record.lastRead ?? null,
274
275
  blocked: Object.keys(record.blocked ?? {}),
275
276
  log: record.log ?? [],
@@ -497,7 +498,7 @@ export class GitKeeper {
497
498
  const key = `${name}\n${seen.head}\n${seen.target ?? ''}`;
498
499
  let entry = this.#inFlight.get(key);
499
500
  if (!entry || (entry.done && !join)) {
500
- const made = { done: false };
501
+ const made = { done: false, since: this.#now().toISOString(), head: seen.head, target: seen.target ?? '' };
501
502
  made.run = this.#check(name, seen).finally(() => { made.done = true; setTimeout(() => { if (this.#inFlight.get(key) === made) this.#inFlight.delete(key); }, CHECK_KEEP_MS).unref?.(); });
502
503
  this.#inFlight.set(key, made);
503
504
  entry = made;
@@ -526,11 +527,15 @@ export class GitKeeper {
526
527
  #keepLast(name, result) {
527
528
  if (!this.#last) return;
528
529
  const target = typeof result.target === 'string' ? result.target : '';
529
- const kept = { status: result.status, head: result.head ?? null, branch: result.branch ?? null, target: target || null, at: result.at, machine: result.machine ?? null, output: String(result.output ?? '').slice(-LAST_OUTPUT_MAX) };
530
+ const kept = { status: result.status, head: result.head ?? null, branch: result.branch ?? null, target: target || null, at: result.at, machine: result.machine ?? null, ...(Number.isFinite(result.ms) ? { ms: result.ms } : {}), output: String(result.output ?? '').slice(-LAST_OUTPUT_MAX) };
530
531
  const before = Object.entries(this.#last.get(name)?.targets ?? {}).filter(([t]) => t !== target);
531
532
  const targets = Object.fromEntries([...before, [target, kept]].sort((a, b) => String(b[1].at).localeCompare(String(a[1].at))).slice(0, LAST_TARGETS));
532
533
  try { this.#last.put({ name, targets }); } catch { /* kept in memory still: a full disk does not stop the checks */ }
533
534
  }
535
+ /* The checks running now for this repository: [{ head, target, since }] (a page that comes back follows them). */
536
+ runningChecks(name) {
537
+ return [...this.#inFlight.entries()].filter(([key, e]) => key.startsWith(`${name}\n`) && !e.done).map(([, e]) => ({ head: e.head, target: e.target, since: e.since }));
538
+ }
534
539
  /* [{ status, head, branch, target, at, machine, output, outdated }], the newest first. */
535
540
  lastChecks(name) {
536
541
  const targets = this.#last?.get(name)?.targets ?? {};
package/server/health.mjs CHANGED
@@ -23,6 +23,10 @@
23
23
  /* The command run inside the machine. Its arguments are the paths that
24
24
  should be mounted; they are passed as arguments, never parsed by the
25
25
  shell. It prints one fact per line; the server reads only these lines. */
26
+ import { SHARING_STEP } from './vm.mjs';
27
+
28
+ /* How long installing the shared-folder helper in a machine may take (it comes from the snap store). */
29
+ export const SHARING_MS = 180_000;
26
30
  export const PROBE = [
27
31
  'awk \'/^MemTotal:/{t=$2} /^MemAvailable:/{a=$2} END{print "memory", t+0, a+0}\' /proc/meminfo',
28
32
  'awk \'$1=="oom_kill"{n=$2} END{print "oom", n+0}\' /proc/vmstat',
@@ -188,8 +192,16 @@ export class Health {
188
192
  /* Looked at again just before acting: never on a machine that went to sleep meanwhile. */
189
193
  const still = loose();
190
194
  if (still.length > 0 && this.#conversations.get(name)?.phase === 'ready' && (await this.#vms.state(name).catch(() => undefined)) === 'Running') {
195
+ /* A machine whose shared-folder helper went missing (the VM manager says to install
196
+ multipass-sshfs in it): installed once, as at its start, then the folder tried again. */
197
+ let helped = false;
191
198
  for (const path of still) {
192
- const why = await this.#resources.repair(name, path).catch((error) => error.message);
199
+ let why = await this.#resources.repair(name, path).catch((error) => error.message);
200
+ if (why && /multipass-sshfs/.test(why) && !helped) {
201
+ helped = true;
202
+ const put = await this.#vms.exec(name, [...SHARING_STEP], { timeoutMs: SHARING_MS }).catch(() => ({ code: -1 }));
203
+ if (put.code === 0) why = await this.#resources.repair(name, path).catch((error) => error.message);
204
+ }
193
205
  if (why) failed.push({ path, why });
194
206
  }
195
207
  facts = (await this.#probe(name, paths)) ?? facts;
package/web/app.js CHANGED
@@ -330,14 +330,25 @@
330
330
  $('fold').setAttribute('aria-pressed', String(folded));
331
331
  $('fold').setAttribute('aria-label', folded ? 'Show the list of conversations' : 'Hide the list of conversations');
332
332
  };
333
- let listFolded = false; let foldingTimer;
333
+ let listFolded = false;
334
334
  try { listFolded = localStorage.getItem('clavarium-list') === 'folded'; } catch { /* a private window */ }
335
- $('fold').addEventListener('click', () => {
335
+ /* THE LIST SLIDES, THE PAGE IS LAID OUT ONCE. Animating the grid's columns laid the whole page out (and
336
+ redrew the terminal) at every frame: it stuttered. The list and the menu slide instead -- a transform,
337
+ which costs nothing -- and the columns change once: after it slid out, or before it slides in. */
338
+ const sliders = () => ['list', 'nav'].map((id) => $(id)).filter(Boolean);
339
+ const slide = (out) => Promise.all(sliders().map((e) => e.animate(
340
+ [{ transform: 'none', opacity: 1 }, { transform: 'translateX(-100%)', opacity: 0 }],
341
+ { duration: 200, easing: 'ease', direction: out ? 'normal' : 'reverse' }).finished.catch(() => {})));
342
+ const still = () => window.matchMedia?.('(prefers-reduced-motion: reduce)').matches || window.innerWidth <= 700;
343
+ $('fold').addEventListener('click', async () => {
336
344
  listFolded = !listFolded;
337
345
  try { localStorage.setItem('clavarium-list', listFolded ? 'folded' : 'open'); } catch { /* as above */ }
338
- app.dataset.folding = 'true'; clearTimeout(foldingTimer); foldingTimer = setTimeout(() => { delete app.dataset.folding; fit.fit(); }, 300);
339
- applyFold(listFolded);
346
+ const folded = listFolded;
347
+ if (!still() && folded) await slide(true);
348
+ if (listFolded !== folded) return;
349
+ applyFold(folded);
340
350
  fit.fit(); focusTerminal();
351
+ if (!still() && !folded) await slide(false);
341
352
  });
342
353
 
343
354
  /* ---------- light or dark ---------- */
@@ -357,16 +368,20 @@
357
368
  for (const view of document.querySelectorAll('.md-view')) view.dataset.theme = light ? 'light' : 'dark';
358
369
  terminal.options.theme = light ? LIGHT : DARK;
359
370
  document.querySelector('meta[name=theme-color]')?.setAttribute('content', light ? LIGHT.background : DARK.background);
360
- $('theme').textContent = light ? 'Dark' : 'Light';
371
+ /* What is chosen, said by the choice pressed: never a button that names the other one. */
372
+ for (const b of $('theme').children) b.setAttribute('aria-pressed', String(b.dataset.theme === themeChoice));
361
373
  };
362
- let lightScreen = false;
363
- try { lightScreen = localStorage.getItem('clavarium-theme') === 'light'; } catch { /* a private window: the choice lasts as long as the page */ }
364
- applyTheme(lightScreen);
365
- $('theme').addEventListener('click', () => {
366
- lightScreen = !lightScreen;
367
- try { localStorage.setItem('clavarium-theme', lightScreen ? 'light' : 'dark'); } catch { /* as above */ }
368
- applyTheme(lightScreen);
369
- focusTerminal();
374
+ /* light, dark, or system (as the device says, and as it changes). */
375
+ const systemLight = window.matchMedia?.('(prefers-color-scheme: light)');
376
+ let themeChoice = 'dark';
377
+ try { const kept = localStorage.getItem('clavarium-theme'); if (['light', 'dark', 'system'].includes(kept)) themeChoice = kept; } catch { /* a private window: the choice lasts as long as the page */ }
378
+ const themeNow = () => (themeChoice === 'system' ? Boolean(systemLight?.matches) : themeChoice === 'light');
379
+ applyTheme(themeNow());
380
+ systemLight?.addEventListener?.('change', () => { if (themeChoice === 'system') applyTheme(themeNow()); });
381
+ for (const b of $('theme').children) b.addEventListener('click', () => {
382
+ themeChoice = b.dataset.theme;
383
+ try { localStorage.setItem('clavarium-theme', themeChoice); } catch { /* as above */ }
384
+ applyTheme(themeNow());
370
385
  });
371
386
  const fit = new FitAddon.FitAddon();
372
387
  terminal.loadAddon(fit);
@@ -1869,19 +1884,33 @@
1869
1884
  for (const b of $('network').children) b.setAttribute('aria-pressed', String((b.dataset.online === 'true') !== offline));
1870
1885
  await paintSignIn();
1871
1886
  }
1872
- /* ---------- chapters (a conversation's settings, and Settings): folded or not, kept on this device ---------- */
1873
- /* All folded at first, as a project's settings: what the person opens is kept. */
1887
+ /* ---------- chapters (a conversation's settings, and Settings): folded or not ---------- */
1888
+ /* All folded when the app is opened: what the person opens stays open while this tab lives (a reload
1889
+ included), never from one day to the next -- a page that opens half-unfolded says nothing. What asks
1890
+ for them is said on the folded chapter instead (markAttention). */
1874
1891
  const OPEN_AT_FIRST = {};
1875
1892
  let chapters = {};
1876
- try { chapters = JSON.parse(localStorage.getItem('clavarium-chapters') ?? '{}') ?? {}; } catch { /* a private window */ }
1893
+ try { chapters = JSON.parse(sessionStorage.getItem('clavarium-chapters') ?? '{}') ?? {}; } catch { /* a private window */ }
1894
+ try { localStorage.removeItem('clavarium-chapters'); } catch { /* as above */ }
1877
1895
  for (const chapter of document.querySelectorAll('details.chapter')) {
1878
1896
  const key = chapter.dataset.chapter;
1879
1897
  chapter.open = chapters[key] ?? OPEN_AT_FIRST[key] ?? false;
1880
1898
  chapter.addEventListener('toggle', () => {
1881
1899
  chapters[key] = chapter.open;
1882
- try { localStorage.setItem('clavarium-chapters', JSON.stringify(chapters)); } catch { /* as above */ }
1900
+ try { sessionStorage.setItem('clavarium-chapters', JSON.stringify(chapters)); } catch { /* as above */ }
1883
1901
  });
1884
1902
  }
1903
+ /* A chapter that holds something asking for the person -- a callout, or a state said as a warning or a
1904
+ fault -- wears a dot on its title, folded or not: one look at Settings says where to go. */
1905
+ const asksForYou = (el2) => [...el2.querySelectorAll('.callout, .status-line[data-tone="warn"], .status-line[data-tone="bad"]')]
1906
+ .some((x) => !x.closest('[hidden]') && x.textContent.trim());
1907
+ let marking;
1908
+ const markAttention = () => { clearTimeout(marking); marking = setTimeout(() => {
1909
+ for (const chapter of document.querySelectorAll('details.chapter')) chapter.toggleAttribute('data-attention', asksForYou(chapter));
1910
+ /* And on its category, in the side list of Settings. */
1911
+ for (const b of document.querySelectorAll('#settings-nav button[data-group]')) b.toggleAttribute('data-attention', Boolean(document.querySelector(`#settings-group-${b.dataset.group} details.chapter[data-attention]`)));
1912
+ }, 150); };
1913
+ new MutationObserver(markAttention).observe(document.body, { subtree: true, childList: true, attributes: true, attributeFilter: ['hidden', 'data-tone', 'class'] });
1885
1914
  /* Reached by a link (or a button that leads to it): opened, and said for a moment. */
1886
1915
  let reachedTimer;
1887
1916
  const openChapter = (key, { show = true } = {}) => {
@@ -2391,6 +2420,8 @@
2391
2420
  ...(noTerminal() ? {} : { terminal: () => seeTerminal() }),
2392
2421
  /* What the tool writes is rendered (Parley builds it element by element), and named by its tool. */
2393
2422
  /* Named as its owner chose, else by the neutral word of the dictionary; its tool, small, in the detailed view. */
2423
+ /* What is being written is kept per conversation: another one looked at, it is there again. */
2424
+ draft: name,
2394
2425
  markdown: true, agentName: conversations.find((x) => x.name === name)?.chatName ?? '', agentTool: conversations.find((x) => x.name === name)?.toolLabel ?? '',
2395
2426
  /* Its pictures, from the shared folders only, by the same route as the thumbnails of Files (type proved by the bytes, never SVG). */
2396
2427
  picture: (file) => { if (!file.open) return null; const at = file.open.indexOf(':'); return `${API}/files/thumb?${new URLSearchParams({ c: name, r: file.open.slice(0, at), p: file.open.slice(at + 1) })}`; },
@@ -2613,7 +2644,7 @@
2613
2644
  wordsSettings = await fetch(`${API}/talk/settings`).then((r) => (r.ok ? r.json() : null)).catch(() => null);
2614
2645
  if (!wordsSettings) return;
2615
2646
  const select = $('words-lang');
2616
- select.replaceChildren(...[['device', `The language of each device (here: ${languageName(deviceLang())})`], ...wordsSettings.languages.map((l) => [l, languageName(l)])].map(([value, label]) => { const o = document.createElement('option'); o.value = value; o.textContent = label; return o; }));
2647
+ select.replaceChildren(...[['device', `Each device's (${languageName(deviceLang())})`], ...wordsSettings.languages.map((l) => [l, languageName(l)])].map(([value, label]) => { const o = document.createElement('option'); o.value = value; o.textContent = label; return o; }));
2617
2648
  select.value = wordsSettings.lang;
2618
2649
  if (document.activeElement !== $('words-own')) $('words-own').value = Object.keys(wordsSettings.own).length ? JSON.stringify(wordsSettings.own, null, 2) : '';
2619
2650
  }
@@ -3031,9 +3062,8 @@
3031
3062
  the same target, the same guards). One refused does not hold the
3032
3063
  others back: each says what became of it. */
3033
3064
  const STATE_SAID = { 'up-to-date': 'up to date', diverged: 'behind: its agent must pull first', 'no-remote': 'no remote', unreachable: 'remote not answering', empty: 'empty' };
3034
- /* How many other branches of a repository are looked at; those moved within this long are ticked at first. */
3065
+ /* How many other branches of a repository are looked at. */
3035
3066
  const BRANCHES_MORE = 7;
3036
- const MOVED_LATELY_MS = 24 * 3600_000;
3037
3067
  /* What a row is, for the filter: a branch the remote has and that is ahead of it, a branch it does not have, nothing to send. */
3038
3068
  const kindOfRow = (out) => (out?.state !== 'ahead' ? 'none' : out.targetExists === false ? 'new' : 'update');
3039
3069
  const TS_FILTERS = [['update', 'To update'], ['new', 'New branches'], ['all', 'All']];
@@ -3066,21 +3096,33 @@
3066
3096
  if (r.target) query.set('target', r.target);
3067
3097
  const [out, keep] = await Promise.all([fetch(`${API}/git/${r.name}/outgoing${query.size ? `?${query}` : ''}`).then(async (x) => { const j = await x.json().catch(() => ({})); return x.ok ? j : { state: 'error', message: j.error || 'It could not be read.' }; }).catch(() => ({ state: 'error', message: 'It could not be read.' })), r.keep ? r.keep : getJson(`/git/${r.name}/keep`, null)]);
3068
3098
  r.out = out; r.keep = keep; r.branch = out.branch ?? r.branch; r.target = out.target ?? r.target; r.check = null;
3099
+ /* What the server knows of this very commit and target: a check still running is followed again; the last
3100
+ one that ran is shown with its age (left and come back, even the next day: nothing run again for nothing). */
3101
+ if (out.state === 'ahead' && out.head) {
3102
+ const going = (keep?.running ?? []).find((x) => x.head === out.head && x.target === out.target);
3103
+ const ran = (keep?.last ?? []).find((x) => x.head === out.head && x.target === out.target && x.status !== 'unavailable');
3104
+ if (going) setTimeout(() => { void checkRow(r, { since: Date.parse(going.since) || Date.now(), resume: true }); }, 0);
3105
+ else if (ran) r.check = { ...ran, earlier: true };
3106
+ }
3069
3107
  if (out.state !== 'ahead') r.picked = false;
3070
3108
  }
3071
3109
  /* The server keeps the run: a request hears "running" after a while, and asks again until it ends. */
3072
- async function checkRow(r) {
3110
+ async function checkRow(r, { since = Date.now(), resume = false } = {}) {
3073
3111
  const { head, target } = r.out;
3074
- r.check = { status: 'running' }; r.open = false; paint();
3112
+ r.check = { status: 'running', since }; r.open = false; paint();
3113
+ /* While it runs, its line moves every second: how long so far, and about how long the last one took. */
3114
+ const ticking = setInterval(() => { if (r.check?.status === 'running') paint(); }, 1000);
3075
3115
  let result;
3076
3116
  for (let first = true; ; first = false) {
3077
- try { result = await post(`${API}/git/${r.name}/check`, { head, target, ...(first ? {} : { join: true }) }); }
3117
+ try { result = await post(`${API}/git/${r.name}/check`, { head, target, ...(first && !resume ? {} : { join: true }) }); }
3078
3118
  catch (error) { result = { status: 'unavailable', output: `The page could not reach the server: ${error.message}` }; }
3079
3119
  if (result?.status !== 'running' || r.out?.head !== head || r.out?.target !== target) break;
3080
3120
  }
3121
+ clearInterval(ticking);
3081
3122
  if (r.out?.head !== head || r.out?.target !== target) return;
3082
3123
  r.check = result; paint();
3083
3124
  }
3125
+ const checkedAgo = (at) => { const m = Math.max(0, Math.round((Date.now() - Date.parse(at)) / 60000)); return m < 1 ? 'just now' : m < 60 ? `${m} min ago` : m < 1440 ? `${Math.round(m / 60)} h ago` : `${Math.round(m / 1440)} d ago`; };
3084
3126
  /* What its agent is told when checks did not pass: where, and the end of what they said. */
3085
3127
  const forAgent = (r) => `The checks of ${r.name} (${r.out.branch} → ${r.out.target}) did not pass before sending. Please fix it, commit, and tell me.\n\n\`\`\`\n${String(r.check?.output ?? '').slice(-3000)}\n\`\`\``;
3086
3128
  const stopped = (r) => Boolean(r.keep?.settings?.requireForSend) && r.check?.status !== 'passed';
@@ -3132,7 +3174,7 @@
3132
3174
  const who = el('div', 'ts-who'); who.append(el('b', '', r.name), el('small', 'hint', out?.remote ? hostOf(out.remote) : out ? 'no remote' : ''));
3133
3175
  const way = el('div', 'ts-way');
3134
3176
  if (out?.branch) {
3135
- way.append(el('code', 'ts-branch', out.branch));
3177
+ const code = el('code', 'ts-branch', out.branch); code.title = out.branch; way.append(code);
3136
3178
  if (['ahead', 'up-to-date', 'diverged'].includes(out.state) && out.target) {
3137
3179
  way.append(el('span', 'ts-arrow', '→'));
3138
3180
  const to = el('select'); to.setAttribute('aria-label', `Where ${label(r)} goes`); to.disabled = sending || checking;
@@ -3156,10 +3198,23 @@
3156
3198
  else if (!out) state.append('');
3157
3199
  else if (!ahead) state.append(el('span', out.state === 'diverged' || out.state === 'unreachable' || out.state === 'error' ? 'bad' : 'hint', STATE_SAID[out.state] ?? out.message ?? out.state));
3158
3200
  else if (!r.check) state.append(el('span', 'hint', r.picked ? 'to check' : ''));
3159
- else if (r.check.status === 'running') state.append(el('span', 'warn', 'Checking...'));
3201
+ else if (r.check.status === 'running') {
3202
+ const took = (r.keep?.last ?? []).find((x) => x.target === r.out.target && Number.isFinite(x.ms))?.ms ?? (r.keep?.last ?? []).find((x) => Number.isFinite(x.ms))?.ms;
3203
+ const so = Date.now() - (r.check.since ?? Date.now());
3204
+ const clock = (ms) => { const s = Math.round(ms / 1000); return `${Math.floor(s / 60)}:${String(s % 60).padStart(2, '0')}`; };
3205
+ const box = el('span', 'ts-running');
3206
+ box.append(el('span', 'warn', `Checking ${clock(so)}`), el('small', 'hint', took ? `last time ${clock(took)}` : 'may take minutes'));
3207
+ const bar = el('span', 'ts-meter ts-meter-row'); const fill = el('i'); bar.append(fill);
3208
+ /* Measured against the last run: never full until it ends; without one, a slow sweep. */
3209
+ fill.style.width = took ? `${Math.min(95, Math.round((so / took) * 100))}%` : '';
3210
+ if (!took) bar.classList.add('ts-sweep');
3211
+ box.append(bar);
3212
+ state.append(box);
3213
+ }
3160
3214
  else {
3161
3215
  const [word, tone] = CHECK_WORDS[r.check.status] ?? [String(r.check.status), ''];
3162
- const text = r.check.status === 'passed' ? '✓ Checks passed' : r.check.status === 'failed' ? '✗ Checks failed' : word;
3216
+ const age = r.check.earlier && r.check.at ? ` · ${checkedAgo(r.check.at)}` : '';
3217
+ const text = `${r.check.status === 'passed' ? '✓ Checks passed' : r.check.status === 'failed' ? '✗ Checks failed' : word}${age}`;
3163
3218
  /* What did not pass says why, one tap away: the reason, what they printed, and what to do. */
3164
3219
  if (r.check.status === 'failed' || r.check.status === 'unavailable') {
3165
3220
  const open = el('button', `ts-why-open ${tone}`, `${text} ${r.open ? '▴' : '▾'}`); open.type = 'button'; open.setAttribute('aria-expanded', String(Boolean(r.open)));
@@ -3222,7 +3277,14 @@
3222
3277
  if (tab === 'changes') {
3223
3278
  const tree = el('div', 'rv-tree ts-tree'); const diffs = el('div', 'rv-diff ts-diffs');
3224
3279
  for (const { r, files } of all) {
3225
- tree.append(el('small', 'ts-tree-repo', label(r)));
3280
+ /* Each repository its own group: a header that says which, where to, how much; its files under it, folding with it. */
3281
+ const group = el('section', 'ts-tree-group');
3282
+ const head = el('button', 'ts-tree-repo'); head.type = 'button'; head.setAttribute('aria-expanded', 'true');
3283
+ head.append(el('b', '', label(r)), el('code', '', `${r.out.branch} → ${r.out.target}`),
3284
+ el('small', 'hint', `${files.length} file${files.length === 1 ? '' : 's'}`), el('small', 'plus', `+${files.reduce((n, f) => n + f.added, 0)}`), el('small', 'minus', `−${files.reduce((n, f) => n + f.removed, 0)}`));
3285
+ const list2 = el('div', 'ts-tree-files');
3286
+ head.addEventListener('click', () => { const open = list2.hidden; list2.hidden = !open; head.setAttribute('aria-expanded', String(open)); });
3287
+ group.append(head, list2); tree.append(group);
3226
3288
  const box = el('div', 'ts-diff'); box.dataset.repo = r.name;
3227
3289
  box.append(el('h4', '', `${r.name}: ${r.out.branch} → ${r.out.target}`));
3228
3290
  const inner = el('div'); box.append(inner);
@@ -3230,7 +3292,7 @@
3230
3292
  const b = el('button'); b.type = 'button'; b.dataset.how = f.how;
3231
3293
  b.append(el('span', 'rv-path', f.path), el('small', 'plus', `+${f.added}`), el('small', 'minus', `−${f.removed}`));
3232
3294
  b.addEventListener('click', () => { inner.querySelectorAll('.d2h-file-wrapper')[i]?.scrollIntoView({ block: 'start' }); });
3233
- tree.append(b);
3295
+ list2.append(b);
3234
3296
  });
3235
3297
  const Ui = window.Diff2HtmlUI;
3236
3298
  if (!r.out.diff) inner.append(el('p', 'hint', 'No change to show.'));
@@ -3303,7 +3365,6 @@
3303
3365
  });
3304
3366
  paint();
3305
3367
  /* Each repository's branch that moved last, then up to BRANCHES_MORE others of its agent: each row shown as soon as it is read. */
3306
- const lately = (r) => r.movedAt && Date.now() - Date.parse(r.movedAt) < MOVED_LATELY_MS;
3307
3368
  await Promise.all(names.map(async (name) => {
3308
3369
  const first = { name, out: null, keep: null, branch: '', target: '', picked: false, check: null, sent: null };
3309
3370
  rows.push(first);
@@ -3315,7 +3376,8 @@
3315
3376
  await Promise.all(others.map(async (b) => {
3316
3377
  const r = { name, out: null, keep: first.keep, branch: b.name, target: '', picked: false, check: null, sent: null, movedAt: b.movedAt };
3317
3378
  await look(r);
3318
- if (r.out?.state === 'ahead') { r.picked = kindOfRow(r.out) === 'update' && lately(r); rows.splice(rows.findLastIndex((x) => x.name === name) + 1, 0, r); }
3379
+ /* Ticked by one rule for every row: a branch of the remote to update is ticked; a new one is not. */
3380
+ if (r.out?.state === 'ahead') { r.picked = kindOfRow(r.out) === 'update'; rows.splice(rows.findLastIndex((x) => x.name === name) + 1, 0, r); }
3319
3381
  paint();
3320
3382
  }));
3321
3383
  reposDone++; paint();
@@ -4602,7 +4664,17 @@
4602
4664
  for (const e of got) {
4603
4665
  const li = el('li', 'event'); li.dataset.kind = e.kind;
4604
4666
  const when = el('time', 'event-when', new Date(e.at).toLocaleString([], { day: 'numeric', month: 'short', hour: '2-digit', minute: '2-digit' })); when.dateTime = e.at;
4605
- li.append(when, el('span', 'event-kind', EVENT_WORDS[e.kind] ?? e.kind), el('span', 'event-text', e.text));
4667
+ /* Which conversation, in a column of its own (and out of the text, where older lines put it first): one click opens it. */
4668
+ const conv = el('span', 'event-conv');
4669
+ let text = e.text;
4670
+ if (e.conversation) {
4671
+ if (text.startsWith(`${e.conversation}: `)) text = text.slice(e.conversation.length + 2);
4672
+ const open = el('button', 'as-link', e.conversation); open.type = 'button'; open.title = `Open ${e.conversation}`;
4673
+ open.disabled = !conversations.some((c) => c.name === e.conversation);
4674
+ open.addEventListener('click', () => { leavePlace(); select(e.conversation); });
4675
+ conv.append(open);
4676
+ }
4677
+ li.append(when, el('span', 'event-kind', EVENT_WORDS[e.kind] ?? e.kind), conv, el('span', 'event-text', text));
4606
4678
  if (e.who && !e.text.includes(e.who)) li.append(el('span', 'event-who', e.who));
4607
4679
  list.append(li);
4608
4680
  }
@@ -4615,7 +4687,7 @@
4615
4687
  $('events-q').addEventListener('input', () => { clearTimeout(eventsTyping); eventsTyping = setTimeout(() => { void paintEvents(); }, 250); });
4616
4688
  $('events-more').addEventListener('click', () => { void paintEvents({ more: true }); });
4617
4689
  $('events-copy').addEventListener('click', async () => {
4618
- const text = eventsShown.map((e) => `${e.at}\t${e.kind}\t${e.text}${e.who ? `\t${e.who}` : ''}`).join('\n');
4690
+ const text = eventsShown.map((e) => `${e.at}\t${e.kind}\t${e.conversation ?? ''}\t${e.text}${e.who ? `\t${e.who}` : ''}`).join('\n');
4619
4691
  try { await navigator.clipboard.writeText(text); $('events-said').textContent = `Copied: ${eventsShown.length} lines.`; } catch { $('events-said').textContent = 'The clipboard is not available here.'; }
4620
4692
  });
4621
4693
  /* WHAT THE SERVER'S PROGRAMS SAID: one source over a span, to read, copy whole or keep as a file. */
package/web/index.html CHANGED
@@ -552,7 +552,7 @@
552
552
  <details class="chapter" id="settings-ch-screen" data-chapter="s-screen">
553
553
  <summary><span class="chapter-title">Screen</span><span class="chapter-about">Theme, text size, the app.</span></summary>
554
554
  <div class="chapter-body">
555
- <div class="set-row"><div class="set-what"><span>Theme</span><small>This device only</small></div><div class="set-control"><button type="button" id="theme" aria-label="Light or dark screen">Light</button></div></div>
555
+ <div class="set-row"><div class="set-what"><span>Theme</span><small>This device only</small></div><div class="set-control"><div class="levels" id="theme" role="group" aria-label="Theme"><button type="button" data-theme="light">Light</button><button type="button" data-theme="dark">Dark</button><button type="button" data-theme="system">System</button></div></div></div>
556
556
  <div class="set-row"><div class="set-what"><span>Text size</span><small>Also: a pinch, or Ctrl + and Ctrl -</small></div><div class="set-control"><span class="text-size" id="settings-text" role="group" aria-label="Text size"><button type="button" data-text="smaller" aria-label="Smaller text">A&minus;</button><button type="button" data-text="normal" aria-label="Normal text size" class="text-now">100%</button><button type="button" data-text="larger" aria-label="Larger text">A+</button></span></div></div>
557
557
  <div class="set-row" id="install-row" hidden><div class="set-what"><span>App</span><small>Installed on this device's home screen</small></div><div class="set-control"><button type="button" id="install" class="primary" hidden>Install the app</button></div></div>
558
558
  <form id="install-name-form" class="set-row" autocomplete="off" hidden><div class="set-what"><label for="install-name">Name on this device</label></div><div class="set-control"><input id="install-name" maxlength="30" spellcheck="false"><button type="submit" class="primary">Install</button><button type="button" id="install-name-cancel">Cancel</button></div></form>
package/web/style.css CHANGED
@@ -112,11 +112,7 @@ footer button.wide { flex: 1 0 auto; background: var(--brass); border-color: var
112
112
  @media (min-width: 701px) {
113
113
  #app[data-list="folded"] { grid-template-columns: 0px minmax(0, 1fr); }
114
114
  #app :is(#list, #nav) { min-width: 0; overflow-x: hidden; }
115
- #app[data-list="folded"] :is(#list, #nav) { visibility: hidden; transition: visibility 0s .22s; }
116
- }
117
- /* Only folding slides: a width set by hand (dragged, by the keys) follows at once. */
118
- @media (min-width: 701px) and (prefers-reduced-motion: no-preference) {
119
- #app[data-folding] { transition: grid-template-columns .22s ease; }
115
+ #app[data-list="folded"] :is(#list, #nav) { visibility: hidden; }
120
116
  }
121
117
  @media (max-width: 700px) { #fold { display: none; } }
122
118
  #fold { font-size: 1rem; line-height: 1; padding: 4px 9px; }
@@ -336,7 +332,7 @@ footer button.careful { border-style: dashed; color: var(--ink2); }
336
332
  .thread-levels { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; }
337
333
  .thread-levels label { min-width: 0; }
338
334
  .thread-levels small { display: block; color: var(--ink2); font-size: .8125rem; }
339
- .thread-levels select { min-height: 40px; min-width: 10rem; font: .875rem var(--sans); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 7px; padding: 7px 9px; }
335
+ .thread-levels select { min-height: 40px; min-width: 10rem; font: .875rem var(--sans); color: var(--ink); background-color: var(--bg); border: 1px solid var(--line); border-radius: 7px; padding: 7px 9px; }
340
336
  @media (max-width: 420px) { .thread-levels { grid-template-columns: minmax(0, 1fr); } .thread-levels select { justify-self: start; margin-bottom: 6px; } }
341
337
 
342
338
  /* What is done to the conversation itself sits at the foot of its own sheet. */
@@ -462,7 +458,7 @@ details.chapter.reached { outline: 2px solid var(--brass); outline-offset: 2px;
462
458
  .facts dd { margin: 0; overflow-wrap: anywhere; }
463
459
  #machine-size { display: flex; flex-direction: column; gap: 6px; max-width: 30rem; }
464
460
  #machine-size label { font-size: .8125rem; color: var(--ink2); }
465
- #machine-size select { width: 100%; min-height: 40px; font: .875rem var(--sans); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 7px; padding: 6px 8px; }
461
+ #machine-size select { width: 100%; min-height: 40px; font: .875rem var(--sans); color: var(--ink); background-color: var(--bg); border: 1px solid var(--line); border-radius: 7px; padding: 6px 8px; }
466
462
  .health-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
467
463
  .health-lines li { padding-left: 1.3em; position: relative; }
468
464
  .health-lines li::before { content: ""; position: absolute; left: .2em; top: .45em; width: .55em; height: .55em; border-radius: 50%; background: var(--ok); }
@@ -534,7 +530,7 @@ footer button[data-keys="backspace"] { display: none; }
534
530
  /* Ready-made answers: when the tool asks, or when asked for. */
535
531
  #room:not([data-asking]):has(#keys[data-more="false"]) #shortcuts { display: none; }
536
532
  }
537
- #words-lang { min-height: 40px; min-width: 12rem; max-width: 100%; font: .875rem var(--sans); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 7px; padding: 6px 8px; }
533
+ #words-lang { min-height: 40px; min-width: 12rem; max-width: 100%; font: .875rem var(--sans); color: var(--ink); background-color: var(--bg); border: 1px solid var(--line); border-radius: 7px; padding: 6px 8px; }
538
534
  #words-own { width: 100%; font: .8125rem ui-monospace, Menlo, Consolas, monospace; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 7px; padding: 8px; }
539
535
  #words-all { white-space: pre-wrap; max-height: 16rem; overflow: auto; }
540
536
 
@@ -707,7 +703,7 @@ svg.lk-links path.temp { stroke: var(--k-pick); stroke-dasharray: 4 4; }
707
703
  .lk-preview h3 { margin: 0; font-size: 1rem; overflow-wrap: anywhere; }
708
704
  .lk-preview h3 small { display: block; font-weight: 400; color: var(--ink2); font-size: .75rem; }
709
705
  .lk-preview h4 { margin: 8px 0 0; font-size: .6875rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink2); }
710
- .lk-preview select, .lk-preview input:not([type]) { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 7px; padding: 4px 8px; }
706
+ .lk-preview select, .lk-preview input:not([type]) { font: inherit; color: var(--ink); background-color: var(--bg); border: 1px solid var(--line); border-radius: 7px; padding: 4px 8px; }
711
707
  .lk-said { margin: 0; font-weight: 600; }
712
708
  .lk-plan { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
713
709
  .lk-plan li { padding: 6px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
@@ -885,7 +881,7 @@ svg.lk-links path.temp { stroke: var(--k-pick); stroke-dasharray: 4 4; }
885
881
  .entry .more:hover, .entry .more[aria-expanded="true"] { border-color: var(--line); background: var(--button, #222c38); color: var(--ink); }
886
882
  .entry .acts { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 4px 0 10px 44px; }
887
883
  .entry .acts label { font-size: .75rem; color: var(--ink2); flex-basis: 100%; }
888
- .entry .acts select { font: .875rem var(--sans); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 7px; padding: 7px 9px; min-height: 36px; max-width: 100%; }
884
+ .entry .acts select { font: .875rem var(--sans); color: var(--ink); background-color: var(--bg); border: 1px solid var(--line); border-radius: 7px; padding: 7px 9px; min-height: 36px; max-width: 100%; }
889
885
  .entry .acts .sure { margin: 0; flex-basis: 100%; color: var(--ink); font-weight: 600; }
890
886
  .entry .acts .hint { flex-basis: 100%; }
891
887
  .entry.dragging { opacity: .45; }
@@ -1028,7 +1024,7 @@ button.inline:hover { color: var(--brass); }
1028
1024
  #updates-state { color: var(--ink2); font-size: .8125rem; flex: 1 1 10rem; min-width: 0; overflow-wrap: anywhere; }
1029
1025
  .updates-news { margin: 0; font-size: .8125rem; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--warn); background: var(--bar); overflow-wrap: anywhere; }
1030
1026
  .updates-grid { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px 14px; max-width: 30rem; }
1031
- .updates-grid select, .updates-window input { min-height: 40px; font: .875rem var(--sans); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 7px; padding: 6px 8px; max-width: 100%; }
1027
+ .updates-grid select, .updates-window input { min-height: 40px; font: .875rem var(--sans); color: var(--ink); background-color: var(--bg); border: 1px solid var(--line); border-radius: 7px; padding: 6px 8px; max-width: 100%; }
1032
1028
  .updates-window { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; color: var(--ink2); font-size: .8125rem; }
1033
1029
  #updates-back { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
1034
1030
  #updates-back .hint { margin: 0; }
@@ -1368,14 +1364,16 @@ select.pill { appearance: auto; }
1368
1364
  .events-pick { flex-wrap: wrap; gap: 8px 12px; align-items: center; }
1369
1365
  .events-pick input[type=search] { flex: 1 1 10rem; min-width: 0; }
1370
1366
  .events-list { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-direction: column; gap: 2px; font-size: .875rem; }
1371
- .event { display: grid; grid-template-columns: 7.5rem 6.5rem 1fr; gap: 2px 10px; padding: 4px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
1367
+ .event { display: grid; grid-template-columns: 7.5rem 6.5rem minmax(0, 8rem) 1fr; gap: 2px 10px; padding: 4px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
1372
1368
  .event-when { color: var(--ink2); font-variant-numeric: tabular-nums; white-space: nowrap; }
1373
1369
  .event-kind { color: var(--ink2); font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; }
1374
1370
  .event-text { min-width: 0; overflow-wrap: anywhere; }
1375
- .event-who { grid-column: 3; color: var(--ink2); font-size: .75rem; }
1376
- @media (max-width: 600px) { .event { grid-template-columns: 1fr auto; } .event-text, .event-who { grid-column: 1 / -1; } }
1371
+ .event-who { grid-column: 4; color: var(--ink2); font-size: .75rem; }
1372
+ .event-conv { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
1373
+ .event-conv button { font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
1374
+ @media (max-width: 600px) { .event { grid-template-columns: 1fr auto auto; } .event-text, .event-who { grid-column: 1 / -1; } }
1377
1375
  /* The choices of Logs and What happened: as wide as their words, in the colours of the page. */
1378
- .events-pick select, .logs-pick select { width: auto; max-width: 100%; background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; }
1376
+ .events-pick select, .logs-pick select { width: auto; max-width: 100%; background-color: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; }
1379
1377
  /* Needs you and Recent: a heading that folds its rows, with how many it holds. */
1380
1378
  .list-fold { display: flex; align-items: center; gap: 6px; width: 100%; background: none; border: 0; padding: 2px; cursor: pointer; text-align: left; font: inherit; font-size: .78rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink2); }
1381
1379
  .list-fold:hover { color: var(--ink); }
@@ -1414,13 +1412,17 @@ button.inline.more-recent { text-decoration: none; }
1414
1412
  /* TO SEND: every repository of a conversation, one row each, then one review of those ticked. */
1415
1413
  .ts-entry .as-ic { color: var(--brass); }
1416
1414
  .ts-rows { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
1417
- .ts-row { display: grid; grid-template-columns: 24px minmax(0, 1.1fr) minmax(0, 1.7fr) minmax(0, .8fr) minmax(0, 1.1fr); gap: 10px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
1415
+ .ts-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) minmax(0, 1.6fr) max-content minmax(0, 1fr); gap: 10px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
1418
1416
  .ts-row.off { opacity: .6; }
1419
1417
  .ts-row input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--brass); }
1420
1418
  .ts-who { display: flex; flex-direction: column; min-width: 0; }
1421
1419
  .ts-who b { overflow-wrap: anywhere; }
1422
- .ts-way { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
1423
- .ts-way select { max-width: 100%; }
1420
+ .ts-way { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; min-width: 0; }
1421
+ /* The way on one line: the branch, the arrow, where it goes -- the names cut short, never the line broken. */
1422
+ .ts-way select { flex: 1 1 auto; width: auto; min-width: 0; max-width: 16rem; }
1423
+ .ts-way .ts-branch { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; overflow-wrap: normal; }
1424
+ .ts-way .ts-arrow { flex: none; }
1425
+ .ts-size { white-space: nowrap; }
1424
1426
  .ts-bar button:disabled { opacity: .5; cursor: default; }
1425
1427
  .ts-state .quiet { color: var(--ink2); font-weight: 400; }
1426
1428
  .ts-branch { font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--brass); overflow-wrap: anywhere; }
@@ -1460,9 +1462,9 @@ button.inline.more-recent { text-decoration: none; }
1460
1462
  their own (a branch pill, the editor) stays theirs. */
1461
1463
  :is(#settings, #panel) :is(input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]), select, textarea),
1462
1464
  :where(#assets, #cassets, #access, #gitview) :is(input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]), select, textarea:not(.editor)) {
1463
- font: .875rem var(--sans); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 7px; padding: 8px 10px; min-height: 40px; max-width: 100%;
1465
+ font: .875rem var(--sans); color: var(--ink); background-color: var(--bg); border: 1px solid var(--line); border-radius: 7px; padding: 8px 10px; min-height: 40px; max-width: 100%;
1464
1466
  }
1465
- :is(#settings, #panel) select, :where(#assets, #cassets, #access, #gitview) select:not(.pill) { appearance: none; padding-right: 30px; background-image: linear-gradient(45deg, transparent 50%, var(--ink2) 50%), linear-gradient(135deg, var(--ink2) 50%, transparent 50%); background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
1467
+ :is(#settings, #panel) select, :where(#assets, #cassets, #access, #gitview) select:not(.pill) { appearance: none; padding-right: 30px; text-overflow: ellipsis; max-width: 100%; background-image: linear-gradient(45deg, transparent 50%, var(--ink2) 50%), linear-gradient(135deg, var(--ink2) 50%, transparent 50%); background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
1466
1468
  :is(#settings, #panel) :is(input, select, textarea):focus-visible, :where(#assets, #cassets, #access, #gitview) :is(input, select, textarea):focus-visible { outline: 2px solid var(--brass); outline-offset: 1px; }
1467
1469
  @media (pointer: coarse) { :is(#settings, #panel) :is(input:not([type=checkbox]):not([type=radio]), select), :where(#assets, #cassets, #access, #gitview) :is(input:not([type=checkbox]):not([type=radio]), select:not(.pill)) { min-height: 44px; } }
1468
1470
  #settings select.pill { font: .875rem var(--sans); font-weight: 400; }
@@ -1556,6 +1558,12 @@ details.more[open] > summary { margin-bottom: 4px; }
1556
1558
  .ts-row.ts-new { animation: ts-arrive .35s ease-out; }
1557
1559
  @keyframes ts-arrive { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
1558
1560
  @media (prefers-reduced-motion: reduce) { .ts-row.ts-new, .ts-progress[data-busy]::before { animation: none; } }
1561
+ .ts-running { display: flex; flex-direction: column; gap: 3px; }
1562
+ .ts-running .warn::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 6px; border: 2px solid var(--warn); border-right-color: transparent; border-radius: 50%; animation: ts-turn .8s linear infinite; vertical-align: -1px; }
1563
+ .ts-meter-row { display: block; margin: 2px 0 0; max-width: 9rem; }
1564
+ .ts-meter-row.ts-sweep i { width: 30%; animation: ts-sweep 1.6s ease-in-out infinite; }
1565
+ @keyframes ts-sweep { from { transform: translateX(-100%); } to { transform: translateX(340%); } }
1566
+ @media (prefers-reduced-motion: reduce) { .ts-running .warn::before, .ts-meter-row.ts-sweep i { animation: none; } }
1559
1567
  .ts-why-open { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; cursor: pointer; text-align: inherit; }
1560
1568
  .ts-why-open.bad { color: var(--danger); } .ts-why-open.warn { color: var(--warn); }
1561
1569
  .ts-why-box { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; }
@@ -1677,3 +1685,16 @@ span.callout.confirm { display: inline-flex; justify-content: flex-end; padding:
1677
1685
  .pick.two { grid-template-columns: 1fr; }
1678
1686
  #newconv > .action-row > .hint { font-size: .75rem; }
1679
1687
  }
1688
+
1689
+ /* The review of several repositories: each one a group, its header a bar of its own, its files under it. */
1690
+ .ts-tree-group { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-bottom: 8px; }
1691
+ .ts-tree-group .ts-tree-repo { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; width: 100%; text-align: left; padding: 8px 10px; border: 0; border-bottom: 1px solid var(--line); background: var(--bar); color: var(--ink); font: inherit; cursor: pointer; text-transform: none; letter-spacing: 0; }
1692
+ .ts-tree-group .ts-tree-repo::before { content: "▾"; color: var(--ink2); }
1693
+ .ts-tree-group .ts-tree-repo[aria-expanded="false"]::before { content: "▸"; }
1694
+ .ts-tree-group .ts-tree-repo b { font-size: .9375rem; }
1695
+ .ts-tree-group .ts-tree-repo code { color: var(--brass); font-size: .8125rem; }
1696
+ .ts-tree-group .ts-tree-repo .plus { color: var(--ok); } .ts-tree-group .ts-tree-repo .minus { color: var(--danger); }
1697
+ .ts-tree-files { padding: 4px 4px 4px 12px; }
1698
+
1699
+ /* Something asks for the person in this chapter (a callout, a warning): a dot on its title, and on its category. */
1700
+ details.chapter[data-attention] > summary .chapter-title::after, #settings-nav button[data-attention]::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 8px; border-radius: 50%; background: var(--warn); vertical-align: middle; }