clavarium 0.2.23-next.1 → 0.2.23

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.1",
3
+ "version": "0.2.23",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "clavarium",
9
- "version": "0.2.23-next.1",
9
+ "version": "0.2.23",
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.14.0",
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.14.0",
704
+ "resolved": "https://registry.npmjs.org/clavarium-parley/-/clavarium-parley-0.14.0.tgz",
705
+ "integrity": "sha512-65HNDsz+hO4yeReWAt40uPrI5sFLBOEZxq1s2t151r9djeQCqGOsSgYeN5pVQFOvlTAHfY62ynayShvg0l1kWQ==",
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.1",
3
+ "version": "0.2.23",
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.14.0",
49
49
  "mermaid": "11.17.2",
50
50
  "node-pty": "^1.1.0",
51
51
  "pdfjs-dist": "6.4.299",
@@ -201,7 +201,8 @@ export class Conversations {
201
201
 
202
202
  /* `resumes`: the tool can take up its last session when it starts (`resume` in config/tools.json). */
203
203
  /* `rights`: it can be started with every right in its machine (`rights` in config/tools.json). */
204
- tools() { return this.#tools.map(({ id, label, memoryMb, resume, rights }) => ({ id, label, memoryMb, resumes: Boolean(resume), rights: Boolean(rights) })); }
204
+ /* `ai`: an agent that reads instructions (`instructions`), not a bare terminal. */
205
+ tools() { return this.#tools.map(({ id, label, memoryMb, resume, rights, instructions }) => ({ id, label, memoryMb, resumes: Boolean(resume), rights: Boolean(rights), ai: Boolean(instructions) })); }
205
206
 
206
207
  /* The sign-in rules of a conversation's tool, or undefined. */
207
208
  signinRules(name) { return this.#tools.find((t) => t.id === this.#store.get(name)?.tool)?.signin; }
package/web/app.js CHANGED
@@ -1339,50 +1339,131 @@
1339
1339
  if (home) pollTimer = setTimeout(refresh, conversations.some(holds) ? 1500 : conversations.some((c) => c.phase === 'building' || c.phase === 'moving' || c.phase === 'restarting') ? 2500 : 10000);
1340
1340
  }
1341
1341
 
1342
- /* ---------- creating ---------- */
1342
+ /* ---------- A NEW CONVERSATION: a page of its own, as Settings ----------
1343
+ "+ New" opens it beside the list (the whole screen on a phone), with an
1344
+ address of its own (?open=new); Back, Escape, Cancel and its "<" link
1345
+ close it. From the map's "+" it is a step over the map, and goes back
1346
+ to it. Its tools are the server's (GET /api/tools). */
1343
1347
  let chosenTool = '';
1344
- async function openCreate() {
1345
- const tools = await (await fetch(`${API}/tools`)).json();
1346
- const box = $('create-tools');
1347
- box.replaceChildren();
1348
- chosenTool = tools[0]?.id ?? '';
1349
- for (const t of tools) {
1350
- const b = document.createElement('button');
1351
- b.type = 'button'; b.textContent = t.label; b.setAttribute('role', 'radio');
1352
- b.setAttribute('aria-checked', t.id === chosenTool ? 'true' : 'false');
1348
+ let newTools = [];
1349
+ const ID_SHAPE = /^[a-z]([a-z0-9-]{0,30}[a-z0-9])?$/;
1350
+ const NEW_FIELDS = ['name', 'group', 'id', 'memory'];
1351
+ function newError(field, text) {
1352
+ const at = field && NEW_FIELDS.includes(field) ? field : '';
1353
+ for (const f of NEW_FIELDS) {
1354
+ const said = $(`newconv-${f}-error`); const box = $(`newconv-${f}`);
1355
+ const mine = f === at && Boolean(text);
1356
+ said.textContent = mine ? text : ''; said.hidden = !mine;
1357
+ if (mine) box.setAttribute('aria-invalid', 'true'); else box.removeAttribute('aria-invalid');
1358
+ }
1359
+ const status = $('newconv-status');
1360
+ const general = !at && Boolean(text);
1361
+ status.textContent = general ? text : 'Ready in a few minutes';
1362
+ status.classList.toggle('error', general);
1363
+ if (at === 'id' || at === 'memory') $('newconv-more').open = true;
1364
+ if (at) $(`newconv-${at}`).focus();
1365
+ }
1366
+ /* Which field a refusal of the server is about (names.mjs, conversations.mjs, capacity.mjs). */
1367
+ function fieldOf(message) {
1368
+ if (/folder name/i.test(message)) return 'group';
1369
+ if (/already has this name|^A name is 1 to 32/.test(message)) return 'id';
1370
+ if (/memory/i.test(message)) return 'memory';
1371
+ if (/^(Give a name|A name )/.test(message)) return 'name';
1372
+ return '';
1373
+ }
1374
+ /* Memory: from what the chosen tool needs up to what a machine may have (MEMORY_CHOICES). */
1375
+ function paintNewMemory() {
1376
+ const tool = newTools.find((t) => t.id === chosenTool);
1377
+ const least = tool?.memoryMb ?? 512;
1378
+ const select = $('newconv-memory');
1379
+ const was = Number(select.value) || least;
1380
+ const mems = [...new Set([least, ...MEMORY_CHOICES.filter((m) => m > least)])];
1381
+ select.replaceChildren(...mems.map((m) => { const o = document.createElement('option'); o.value = String(m); o.textContent = sizeWords(m); return o; }));
1382
+ select.value = String(mems.includes(was) ? was : least);
1383
+ $('newconv-memory-least').textContent = tool ? `${tool.label} needs ${sizeWords(least)} at least` : '';
1384
+ }
1385
+ function paintNewTools() {
1386
+ const box = $('newconv-tools');
1387
+ if (!newTools.some((t) => t.id === chosenTool)) chosenTool = newTools[0]?.id ?? '';
1388
+ box.replaceChildren(...newTools.map((t) => {
1389
+ const b = el('button'); b.type = 'button'; b.setAttribute('role', 'radio'); b.dataset.tool = t.id;
1390
+ b.setAttribute('aria-checked', String(t.id === chosenTool));
1391
+ b.append(el('b', '', t.label), el('small', '', t.ai ? 'AI agent' : 'A terminal, no AI'));
1353
1392
  b.addEventListener('click', () => {
1354
1393
  chosenTool = t.id;
1355
- for (const other of box.children) other.setAttribute('aria-checked', other === b ? 'true' : 'false');
1394
+ for (const other of box.children) other.setAttribute('aria-checked', String(other === b));
1395
+ paintNewMemory();
1356
1396
  });
1357
- box.append(b);
1397
+ return b;
1398
+ }));
1399
+ paintNewMemory();
1400
+ }
1401
+ for (const b of $('newconv-work').querySelectorAll('[data-work]')) {
1402
+ b.addEventListener('click', () => { for (const other of $('newconv-work').querySelectorAll('[data-work]')) other.setAttribute('aria-checked', String(other === b)); });
1403
+ }
1404
+ const newOnDisk = () => $('newconv-work').querySelector('[data-work="disk"]').getAttribute('aria-checked') === 'true';
1405
+ async function openNew({ push = true } = {}) {
1406
+ if (DEVICE) return;
1407
+ newError('', '');
1408
+ if (place !== 'new') {
1409
+ /* From the map: a step over it, and back to it. Otherwise a place of its own. */
1410
+ if (place === 'access' && push) {
1411
+ showPlace('new');
1412
+ nav.push('create', ({ quiet }) => {
1413
+ if (quiet || place !== 'new') return;
1414
+ showPlace('access'); paintTabs(); remember();
1415
+ void (mapMode === 'flows' ? links?.openFlows() : links?.open({ pin: accessFor ? `conversation:${accessFor}` : null }));
1416
+ }, { address: placeAddress() });
1417
+ $('newconv-close').textContent = '‹ Access';
1418
+ } else {
1419
+ enterPlace('new', push);
1420
+ $('newconv-close').textContent = '‹ Conversations';
1421
+ }
1358
1422
  }
1359
- $('create-error').hidden = true;
1360
- $('create').hidden = false;
1361
- focusField($('create-name'));
1423
+ $('newconv').scrollTop = 0;
1424
+ focusField($('newconv-name'));
1425
+ try { const r = await fetch(`${API}/tools`); if (r.ok) newTools = await r.json(); } catch { /* kept as it was */ }
1426
+ paintNewTools();
1362
1427
  }
1363
- $('hidden-toggle').addEventListener('click', () => { showHidden = !showHidden; paint(); });
1364
- $('new').addEventListener('click', () => { void openCreate(); });
1365
- $('create-cancel').addEventListener('click', () => { if (!nav.close('create')) $('create').hidden = true; });
1366
- /* From the map's "+" of Conversations: the same form as the list's "+ New", a step over the map (on a phone, the list is shown for it). */
1367
- function createFromMap() {
1368
- void openCreate();
1369
- if (narrow()) view('list');
1370
- if (nav.last(['create']) < 0) nav.push('create', ({ quiet }) => { $('create').hidden = true; if (!quiet && place !== 'conversations') view('room'); });
1428
+ /* Closed as any page is: the step on top (the place, or the step over the map). */
1429
+ function closeNew() {
1430
+ if (place !== 'new') return;
1431
+ if (!nav.close('create')) leavePlace();
1371
1432
  }
1433
+ $('hidden-toggle').addEventListener('click', () => { showHidden = !showHidden; paint(); });
1434
+ $('new').addEventListener('click', () => { void openNew(); });
1435
+ $('newconv-cancel').addEventListener('click', closeNew);
1436
+ $('newconv-close').addEventListener('click', closeNew);
1437
+ /* From the map's "+" of Conversations: the same page. */
1438
+ function createFromMap() { void openNew(); }
1372
1439
  /* The identifier drawn from the name, as the server draws it (names.mjs), shown before it is made; the server decides. */
1373
- const identifierOf = (title) => String(title).normalize('NFKD').replace(/[\u0300-\u036f]/g, '').toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^[^a-z]+/, '').replace(/-+$/, '').slice(0, 32).replace(/-+$/, '') || 'conversation';
1374
- $('create-name').addEventListener('input', () => { $('create-id').placeholder = identifierOf($('create-name').value.trim()); });
1375
- $('create').addEventListener('submit', async (event) => {
1440
+ const identifierOf = (title) => String(title).normalize('NFKD').replace(/[̀-ͯ]/g, '').toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^[^a-z]+/, '').replace(/-+$/, '').slice(0, 32).replace(/-+$/, '') || 'conversation';
1441
+ $('newconv-name').addEventListener('input', () => { $('newconv-id').placeholder = identifierOf($('newconv-name').value.trim()); });
1442
+ for (const f of NEW_FIELDS) $(`newconv-${f}`).addEventListener(f === 'memory' ? 'change' : 'input', () => { if (!$(`newconv-${f}-error`).hidden) newError('', ''); });
1443
+ let creating = false;
1444
+ $('newconv').addEventListener('submit', async (event) => {
1376
1445
  event.preventDefault();
1377
- const title = $('create-name').value.trim();
1378
- const id = $('create-id').value.trim();
1446
+ if (creating) return;
1447
+ const title = $('newconv-name').value.trim();
1448
+ const id = $('newconv-id').value.trim();
1449
+ const group = $('newconv-group').value.trim();
1450
+ if (!title) { newError('name', 'Give a name.'); return; }
1451
+ if (id && !ID_SHAPE.test(id)) { newError('id', 'Lower-case letters, digits, hyphens'); return; }
1452
+ const least = newTools.find((t) => t.id === chosenTool)?.memoryMb;
1453
+ const memoryMb = Number($('newconv-memory').value);
1454
+ newError('', '');
1455
+ creating = true; $('newconv-create').disabled = true;
1379
1456
  try {
1380
- const group = $('create-group').value.trim();
1381
- const made = await post(`${API}/conversations`, { title, ...(id ? { name: id } : {}), ...(group ? { group } : {}), tool: chosenTool, workOnDisk: $('create-disk').checked });
1382
- $('create').hidden = true; $('create-name').value = ''; $('create-id').value = ''; $('create-group').value = ''; $('create-disk').checked = false;
1457
+ const made = await post(`${API}/conversations`, { title, ...(id ? { name: id } : {}), ...(group ? { group } : {}), tool: chosenTool, workOnDisk: newOnDisk(), ...(memoryMb && memoryMb !== least ? { memoryMb } : {}) });
1458
+ $('newconv-name').value = ''; $('newconv-id').value = ''; $('newconv-id').placeholder = 'website-redesign'; $('newconv-group').value = '';
1459
+ $('newconv-work').querySelector('[data-work="kept"]').click(); $('newconv-more').open = false;
1383
1460
  await refresh();
1461
+ /* The new one is selected: the page gives way to it, with no step of it left behind. */
1384
1462
  select(made.name);
1385
- } catch (error) { $('create-error').textContent = error.message; $('create-error').hidden = false; }
1463
+ } catch (error) {
1464
+ const field = fieldOf(error.message);
1465
+ newError(field, field === 'id' && /already has this name/.test(error.message) ? 'Already used by another conversation' : error.message);
1466
+ } finally { creating = false; $('newconv-create').disabled = false; }
1386
1467
  });
1387
1468
 
1388
1469
  /* ---------- shortcuts ---------- */
@@ -2963,11 +3044,11 @@
2963
3044
  const meter = el('div', 'ts-meter'); const meterFill = el('i'); meter.append(meterFill); meter.setAttribute('aria-hidden', 'true');
2964
3045
  const filters = el('div', 'levels ts-filters'); filters.setAttribute('role', 'group'); filters.setAttribute('aria-label', 'Show');
2965
3046
  const list = el('div', 'ts-rows');
2966
- const bar = el('div', 'as-acts ts-bar');
3047
+ const bar = el('div', 'action-row ts-bar');
2967
3048
  const together = el('button', '', 'Review together'); together.type = 'button'; together.dataset.act = 'send-review';
2968
3049
  const go = el('button', 'primary', 'Check'); go.type = 'button'; go.dataset.act = 'send-all';
2969
- const why = el('span', 'hint ts-why');
2970
- bar.append(together, go, why);
3050
+ const why = el('span', 'hint ts-why'); why.setAttribute('role', 'status');
3051
+ bar.append(why, together, go);
2971
3052
  const said = el('p', 'ts-said'); said.hidden = true; said.setAttribute('role', 'status');
2972
3053
  const review = el('div', 'ts-review'); review.hidden = true;
2973
3054
  holder.append(progress, meter, filters, list, bar, said, review);
@@ -3212,7 +3293,7 @@
3212
3293
  sending = false; paint();
3213
3294
  const ok = p.filter((r) => r.sent?.ok).length;
3214
3295
  said.textContent = ok === p.length ? `Sent: ${ok === 1 ? 'it went' : `all ${ok} went`}.` : `${ok} of ${p.length} sent; the others say why.`;
3215
- said.className = `ts-said ${ok === p.length ? 'ok' : 'bad'}`; said.hidden = false;
3296
+ said.className = `status-line ts-said ${ok === p.length ? 'ok' : 'bad'}`; said.dataset.tone = ok === p.length ? 'ok' : 'bad'; said.hidden = false;
3216
3297
  if (reviewStep) nav.drop(reviewStep);
3217
3298
  /* What is left to send, read again; what became of each stays said. */
3218
3299
  const kept = new Map(rows.map((r) => [r, r.sent]));
@@ -3404,12 +3485,13 @@
3404
3485
  /* State, in a line. */
3405
3486
  if (chosen.kind === 'mailbox') detail.append(el('p', chosen.box?.failure ? 'error' : 'hint', boxSub(chosen.box)));
3406
3487
  if (chosen.kind === 'secret') {
3407
- detail.append(el('p', 'hint', 'Its value is never shown again. A change takes effect the next time the tool starts.'));
3408
3488
  /* Renamed: its value and the conversations it is handed to go with it. */
3409
- const form = el('form', 'row secret-rename'); form.autocomplete = 'off';
3489
+ const form = el('form', 'set-row secret-rename'); form.autocomplete = 'off';
3410
3490
  const name = el('input'); name.id = 'secret-rename-name'; name.value = chosen.name; name.maxLength = 40; name.pattern = '[A-Z][A-Z0-9_]*'; name.spellcheck = false; name.autocapitalize = 'characters'; name.setAttribute('aria-label', 'New name');
3411
3491
  const go = el('button', '', 'Rename'); go.type = 'submit';
3412
- form.append(name, go);
3492
+ const what = el('div', 'set-what'); what.append(el('span', '', 'Name'), el('small', '', 'Value never shown · applies at next start'));
3493
+ const control = el('div', 'set-control'); control.append(name, go);
3494
+ form.append(what, control);
3413
3495
  form.addEventListener('submit', async (event) => {
3414
3496
  event.preventDefault();
3415
3497
  $('assets-error').hidden = true;
@@ -3417,7 +3499,8 @@
3417
3499
  catch (error) { $('assets-error').textContent = error.message; $('assets-error').hidden = false; }
3418
3500
  await paintAssets();
3419
3501
  });
3420
- detail.append(form);
3502
+ const box = el('div', 'set-rows as-block'); box.append(form);
3503
+ detail.append(box);
3421
3504
  }
3422
3505
  /* Used by: each conversation that has it, what it may do; "+" offers the others. */
3423
3506
  const options = chosen.kind === 'secret' ? [['off', 'Off'], ['use', 'Use']] : chosen.kind === 'mailbox' ? [['none', 'Off'], ['read', 'Read']] : [['none', 'Off'], ['read', 'Read'], ['write', 'Write']];
@@ -3465,13 +3548,18 @@
3465
3548
  const inUse = chosen.kind !== 'secret' && using.length > 0;
3466
3549
  if (inUse) { remove.disabled = true; why.textContent = ` used by ${using.length} conversation${using.length > 1 ? 's' : ''}: set ${using.length > 1 ? 'them' : 'it'} to Off first`; }
3467
3550
  remove.addEventListener('click', () => {
3468
- const sure = el('button', 'danger', chosen.kind === 'secret' ? `Yes, delete ${chosen.name}` : `Yes, remove ${chosen.name} (its files are kept aside on the server)`); sure.type = 'button';
3551
+ const sure = el('button', 'danger', chosen.kind === 'secret' ? `Yes, delete ${chosen.name}` : `Yes, remove ${chosen.name}`); sure.type = 'button';
3552
+ const keep = el('button', '', 'Keep'); keep.type = 'button';
3553
+ keep.addEventListener('click', () => { void paintAssets(); });
3554
+ const ask = el('div', 'callout bad confirm'); ask.setAttribute('role', 'alertdialog');
3555
+ ask.append(el('span', '', chosen.kind === 'secret' ? 'Its value is lost for good.' : 'Its files are kept aside on the server.'), keep, sure);
3469
3556
  sure.addEventListener('click', async () => {
3470
3557
  try { await post(chosen.kind === 'secret' ? `${API}/secrets/${chosen.name}/remove` : `${API}/resources/${chosen.name}/remove`); assetOpen = ''; }
3471
3558
  catch (error) { $('assets-error').textContent = error.message; $('assets-error').hidden = false; }
3472
3559
  await paintAssets();
3473
3560
  });
3474
- remove.replaceWith(sure);
3561
+ remove.replaceWith(ask); why.remove();
3562
+ sure.focus();
3475
3563
  });
3476
3564
  /* Given to a device: from here too (the map shows who has it). */
3477
3565
  const share = el('button', 'as-link', 'Share with a device...'); share.type = 'button';
@@ -3505,8 +3593,8 @@
3505
3593
  const pick = $('gitview-sshkey'); pick.replaceChildren();
3506
3594
  for (const [value, text] of [['', '(none)'], ...gitKeys.map((k) => [k.name, k.name])]) { const o = document.createElement('option'); o.value = value; o.textContent = text; pick.append(o); }
3507
3595
  pick.value = settings.sshKey ?? '';
3508
- $('gitview-key-state').textContent = settings.hasKey ? 'A key is kept for this repository.'
3509
- : settings.sshKey ? `Over ssh, the SSH key ${settings.sshKey} is used.` : 'No key is kept for sending: what the repository was cloned with is used, for the same server only; a remote that asks for more will refuse.';
3596
+ $('gitview-key-state').textContent = settings.hasKey ? 'Push key: kept here'
3597
+ : settings.sshKey ? `Push key: SSH key ${settings.sshKey}` : 'Push key: none · the clone\'s access, same server only';
3510
3598
  }
3511
3599
  $('assets-search').addEventListener('input', () => { assetsQuery = $('assets-search').value.trim(); void paintAssets(); });
3512
3600
  $('assets-close').addEventListener('click', () => leavePlace());
@@ -3683,10 +3771,14 @@
3683
3771
  place = which;
3684
3772
  app.dataset.place = which;
3685
3773
  app.dataset.current = current ? 'yes' : '';
3686
- for (const b of $('nav').querySelectorAll('button[data-place]')) { if (b.dataset.place === which) b.setAttribute('aria-current', 'page'); else b.removeAttribute('aria-current'); }
3774
+ /* A new conversation is made among the conversations: "+ New" stays marked while its page is open. */
3775
+ const marked = which === 'new' ? 'conversations' : which;
3776
+ for (const b of $('nav').querySelectorAll('button[data-place]')) { if (b.dataset.place === marked) b.setAttribute('aria-current', 'page'); else b.removeAttribute('aria-current'); }
3777
+ $('new').setAttribute('aria-pressed', String(which === 'new'));
3687
3778
  $('access').hidden = which !== 'access';
3688
3779
  $('settings').hidden = which !== 'settings';
3689
3780
  $('assets').hidden = which !== 'assets';
3781
+ $('newconv').hidden = which !== 'new';
3690
3782
  if (which !== 'access') composing = false;
3691
3783
  /* What the conversation had open (its tab) waits under the place, as it was. */
3692
3784
  if (which !== 'conversations') { for (const id of ['files', 'copy']) $(id).hidden = true; view('room'); }
@@ -3785,6 +3877,7 @@
3785
3877
  const wanted = q.get('c') ?? '';
3786
3878
  if (home && wanted !== current && conversations.some((c) => c.name === wanted)) select(wanted);
3787
3879
  const open = q.get('open') ?? '';
3880
+ if (open === 'new') { await openNew({ push: false }); return; }
3788
3881
  if (open === 'settings') {
3789
3882
  await openSettings({ push: false });
3790
3883
  /* A link to one chapter of Settings (?open=settings&at=resources): that one opened, and shown. */
@@ -4859,7 +4952,7 @@
4859
4952
  $('gitview-alert').checked = s.alert; $('gitview-tellmoves').checked = s.tellMoves !== false;
4860
4953
  /* Which conversations send by themselves: set in each one's Access panel. */
4861
4954
  const senders = Object.entries(keep.auto ?? {});
4862
- $('gitview-auto-where').textContent = `Automatic sending is set for each conversation, under its access to this repository (Write), in the conversation's Access panel. ${senders.length ? `Now: ${senders.map(([c, list]) => `${c} (${list.join(', ')})`).join('; ')}.` : 'Now: none.'}`;
4955
+ $('gitview-auto-where').textContent = `Automatic sending: set for each conversation, in its Access (Write). ${senders.length ? `Now: ${senders.map(([c, list]) => `${c} (${list.join(', ')})`).join('; ')}.` : 'Now: none.'}`;
4863
4956
  $('gitview-origin').hidden = !keep.origin;
4864
4957
  if (keep.origin) {
4865
4958
  $('gitview-origin-where').textContent = `Its origin, kept up to date by this server, is at ${keep.origin.path} in the agent's machine, read-only, next to the repository. The tool brings it in itself, with no key, by running there:`;
@@ -5668,6 +5761,7 @@
5668
5761
  }
5669
5762
  function confirmDelete() {
5670
5763
  acts.replaceChildren();
5764
+ acts.classList.add('confirm');
5671
5765
  const p = document.createElement('p'); p.className = 'sure';
5672
5766
  p.textContent = entry.folder ? `Delete the folder "${entry.name}" and everything in it? This cannot be undone.` : `Delete "${entry.name}"? This cannot be undone.`;
5673
5767
  const yes = button(entry.folder ? 'Delete the folder' : 'Delete', async () => {
@@ -6357,7 +6451,7 @@
6357
6451
  drop.addEventListener('click', () => { editing.saved = editing.area.value; then(); });
6358
6452
  const stay = document.createElement('button'); stay.type = 'button'; stay.textContent = 'Keep editing';
6359
6453
  stay.addEventListener('click', () => { box.hidden = true; editing.area.focus(); });
6360
- const row = document.createElement('div'); row.className = 'row'; row.append(save, drop, stay);
6454
+ const row = document.createElement('div'); row.className = 'action-row'; row.append(stay, drop, save);
6361
6455
  box.append(p, row); box.hidden = false;
6362
6456
  save.focus();
6363
6457
  }
@@ -6383,7 +6477,7 @@
6383
6477
  area.className = 'editor'; area.value = read.text; area.spellcheck = false;
6384
6478
  area.setAttribute('autocapitalize', 'off'); area.setAttribute('autocomplete', 'off'); area.setAttribute('wrap', 'off');
6385
6479
  area.setAttribute('aria-label', `Text of ${name}`);
6386
- const ask = document.createElement('div'); ask.className = 'edit-ask files-card'; ask.hidden = true; ask.setAttribute('role', 'alertdialog');
6480
+ const ask = document.createElement('div'); ask.className = 'edit-ask files-card callout confirm'; ask.hidden = true; ask.setAttribute('role', 'alertdialog');
6387
6481
  const bar = document.createElement('div'); bar.className = 'row edit-bar';
6388
6482
  const save = document.createElement('button'); save.type = 'button'; save.className = 'primary'; save.textContent = 'Save'; save.id = 'edit-save';
6389
6483
  const cancel = document.createElement('button'); cancel.type = 'button'; cancel.textContent = 'Cancel'; cancel.id = 'edit-cancel';
@@ -6469,7 +6563,7 @@
6469
6563
  over.addEventListener('click', () => { void saveEdit('any'); });
6470
6564
  const copy = document.createElement('button'); copy.type = 'button'; copy.className = 'primary'; copy.textContent = 'Save mine as a copy';
6471
6565
  copy.addEventListener('click', () => { void saveEdit('copy'); });
6472
- const row = document.createElement('div'); row.className = 'row'; row.append(copy, over, reload);
6566
+ const row = document.createElement('div'); row.className = 'action-row'; row.append(reload, over, copy);
6473
6567
  box.append(p, look, row); box.hidden = false;
6474
6568
  copy.focus();
6475
6569
  e.tell('not saved: changed meanwhile');
@@ -6848,7 +6942,8 @@
6848
6942
  const keep = document.createElement('button'); keep.type = 'button'; keep.textContent = 'Keep';
6849
6943
  keep.addEventListener('click', () => { void repaintDevices(); });
6850
6944
  sure.addEventListener('click', async () => { await run().catch(() => {}); await repaintDevices(); void refresh(); });
6851
- button.replaceWith(sure, keep);
6945
+ const ask = document.createElement('span'); ask.className = 'callout bad confirm'; ask.setAttribute('role', 'alertdialog'); ask.append(keep, sure);
6946
+ button.replaceWith(ask); sure.focus();
6852
6947
  }
6853
6948
  function grantRow(device, g) {
6854
6949
  const [type, name] = g.asset.split(':');
@@ -6917,7 +7012,7 @@
6917
7012
  if (only && device.grants.length > mine.length) { const rest = document.createElement('p'); rest.className = 'hint'; rest.textContent = `It also has: ${device.grants.filter((g) => g.asset !== only).map((g) => { const [type, what] = g.asset.split(':'); return `${what} (${KIND_WORD[type] ?? type})`; }).join(', ')}.`; given.append(rest); }
6918
7013
  const more = document.createElement('button'); more.type = 'button'; more.textContent = '+ Give more';
6919
7014
  more.addEventListener('click', () => { void openCompose([], device.id); });
6920
- const acts = document.createElement('div'); acts.className = 'row device-acts'; acts.append(more, rename, revoke);
7015
+ const acts = document.createElement('div'); acts.className = 'action-row device-acts'; acts.append(more, rename, revoke);
6921
7016
  const body = document.createElement('div'); body.className = 'card-body'; body.hidden = shut; body.append(given, acts);
6922
7017
  card.append(head, body);
6923
7018
  return card;
@@ -6990,7 +7085,8 @@
6990
7085
  const keep = document.createElement('button'); keep.type = 'button'; keep.textContent = 'Keep';
6991
7086
  keep.addEventListener('click', () => { void paintShareHere(); });
6992
7087
  sure.addEventListener('click', async () => { await post(`${API}/devices/${device.id}/take`, { asset }).catch(() => {}); await paintShareHere(); void refresh(); });
6993
- take.replaceWith(sure, keep);
7088
+ const ask = document.createElement('span'); ask.className = 'callout bad confirm'; ask.setAttribute('role', 'alertdialog'); ask.append(keep, sure);
7089
+ take.replaceWith(ask); sure.focus();
6994
7090
  });
6995
7091
  row.append(label, right, take); box.append(row);
6996
7092
  }
package/web/index.html CHANGED
@@ -16,25 +16,6 @@
16
16
  <div class="top"><b id="list-title" title="Conversations">Clavarium</b><span class="top-acts"><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="primary">+ New</button></span></div>
17
17
  <!-- SEARCH, discreet: opened by the magnifier, "/" or Ctrl+K; filters as it is typed. -->
18
18
  <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>
19
- <form id="create" hidden autocomplete="off">
20
- <label for="create-name">Name</label>
21
- <input id="create-name" name="name" required maxlength="60" placeholder="Website redesign" spellcheck="false">
22
- <details class="advanced"><summary>Advanced options</summary>
23
- <label for="create-id">Identifier</label>
24
- <input id="create-id" maxlength="32" pattern="[a-z]([a-z0-9\-]{0,30}[a-z0-9])?" title="Lower-case letters, digits and hyphens; starts with a letter, does not end with a hyphen" placeholder="website-redesign" spellcheck="false" autocapitalize="none">
25
- <p class="hint">Used for its machine, its folders, its address and what is given to it. Drawn from the name when empty; it cannot be changed later. The name can.</p>
26
- </details>
27
- <label for="create-group">Group <span class="hint">(optional)</span></label>
28
- <input id="create-group" maxlength="40" list="group-names" placeholder="None" spellcheck="false" autocomplete="off">
29
- <datalist id="group-names"></datalist>
30
- <span class="legend">What runs in it</span>
31
- <div id="create-tools" class="choices" role="radiogroup" aria-label="What runs in it"></div>
32
- <label class="check"><input type="checkbox" id="create-disk"> Work on the machine's own disk</label>
33
- <p class="hint">Unticked, what the tool makes is kept here: you see it in Files, and it outlives the machine. Tick it for a code project that installs packages: a folder kept here refuses the links they make, and is slower. Those files are then not shown here and go with the machine. It can be changed later.</p>
34
- <p id="create-error" class="error" role="alert" hidden></p>
35
- <div class="row"><button type="submit" class="primary">Create</button><button type="button" id="create-cancel">Cancel</button>
36
- <span class="hint">a new machine takes a few minutes</span></div>
37
- </form>
38
19
  <!-- Needs you and Recent: copies of rows of the list below, by when they were last used (app.js, paint). -->
39
20
  <div id="recent"></div>
40
21
  <div id="items"></div>
@@ -473,7 +454,7 @@
473
454
  </form>
474
455
  </div>
475
456
  <div id="git-box" class="as-form" data-kind="git"><h3>New repository</h3>
476
- <p class="hint">A folder that starts as a repository: empty, or cloned from a remote -- public, or private over SSH or HTTPS. It is attached and shared like a folder, to read or to write. What opens a private remote is kept on this server, sealed, and used here only (to clone, to look, to send): the tool's machine never receives it.</p>
457
+ <div class="hint">Empty, or cloned from a remote. <details class="more"><summary>Private remotes</summary><span>Public, or private over SSH or HTTPS. It is attached and shared like a folder, to read or to write. What opens a private remote is kept on this server, sealed, and used here only (to clone, to look, to send): the tool's machine never receives it.</span></details></div>
477
458
  <form id="git-new" autocomplete="off">
478
459
  <label for="git-name">Name</label>
479
460
  <input id="git-name" maxlength="32" pattern="[a-z]([a-z0-9-]{0,30}[a-z0-9])?" placeholder="website" spellcheck="false" autocapitalize="off" required>
@@ -518,7 +499,7 @@
518
499
  <p id="git-keys-empty" class="hint">No key yet: "New key" in Add a repository makes one.</p>
519
500
  </div>
520
501
  <div id="mailbox-box" class="as-form" data-kind="mailbox"><h3>New mailbox</h3>
521
- <p class="hint">Its recent messages become files in a folder, kept up to date, that a conversation can read and never write. The mailbox itself is never changed. Mail is written by strangers: attach it only where the tool may read what anyone can send you.</p>
502
+ <div class="hint">Recent messages as files, read only. <details class="more"><summary>Before attaching it</summary><span>Kept up to date in a folder a conversation can read and never write. The mailbox itself is never changed. Mail is written by strangers: attach it only where the tool may read what anyone can send you.</span></details></div>
522
503
  <form id="mailbox-new" autocomplete="off">
523
504
  <label for="mailbox-name">Folder name</label>
524
505
  <input id="mailbox-name" maxlength="32" pattern="[a-z]([a-z0-9-]{0,30}[a-z0-9])?" placeholder="inbox" spellcheck="false" autocapitalize="off" required>
@@ -545,16 +526,12 @@
545
526
  </div>
546
527
  <details id="gitview-remote-box">
547
528
  <summary>Where the commits are sent</summary>
548
- <form id="gitview-remote" autocomplete="off">
549
- <label for="gitview-url">Address (https or ssh)</label>
550
- <input id="gitview-url" inputmode="url" spellcheck="false" autocapitalize="off" placeholder="https://example.com/project.git" required>
551
- <label for="gitview-sshkey">SSH key made here (for an ssh address)</label>
552
- <select id="gitview-sshkey"></select>
553
- <label for="gitview-user">For an https address: user name of the token (optional)</label>
554
- <input id="gitview-user" spellcheck="false" autocapitalize="off" autocomplete="off" placeholder="x-access-token">
555
- <label for="gitview-key">Key or token that may push (kept sealed here; leave empty to keep the one there is)</label>
556
- <div class="row"><input id="gitview-key" type="password" autocomplete="new-password"><button type="submit" class="primary">Save</button></div>
557
- <p id="gitview-key-state" class="hint"></p>
529
+ <form id="gitview-remote" class="set-rows" autocomplete="off">
530
+ <div class="set-row"><div class="set-what"><label for="gitview-url">Address</label><small>https or ssh</small></div><div class="set-control"><input id="gitview-url" inputmode="url" spellcheck="false" autocapitalize="off" placeholder="https://example.com/project.git" required></div></div>
531
+ <div class="set-row"><div class="set-what"><label for="gitview-sshkey">SSH key</label><small>Made here, for an ssh address</small></div><div class="set-control"><select id="gitview-sshkey"></select></div></div>
532
+ <div class="set-row"><div class="set-what"><label for="gitview-user">Token user</label><small>For https, optional</small></div><div class="set-control"><input id="gitview-user" spellcheck="false" autocapitalize="off" autocomplete="off" placeholder="x-access-token"></div></div>
533
+ <div class="set-row"><div class="set-what"><label for="gitview-key">Push key or token</label><small>Kept sealed · empty keeps the current one</small></div><div class="set-control"><input id="gitview-key" type="password" autocomplete="new-password"></div></div>
534
+ <div class="action-row"><span id="gitview-key-state" class="hint" role="status"></span><button type="submit" class="primary">Save</button></div>
558
535
  </form>
559
536
  </details>
560
537
  </div>
@@ -864,6 +841,36 @@
864
841
  </section>
865
842
  </div>
866
843
  </div>
844
+ <!-- A NEW CONVERSATION: a page of its own, as Settings, opened by "+ New" (app.js, openNew). -->
845
+ <form id="newconv" class="sheet" hidden novalidate autocomplete="off" aria-labelledby="newconv-title">
846
+ <div class="panel-top"><b id="newconv-title">New conversation</b><button type="button" id="newconv-close" class="as-link place-back">&lsaquo; Conversations</button></div>
847
+ <div class="nc-body">
848
+ <div class="nc-card">
849
+ <div class="set-row"><div class="set-what"><label for="newconv-name">Name</label><small>Shown in the list. Can be changed</small><span id="newconv-name-error" class="err" role="alert" hidden></span></div><div class="set-control"><input id="newconv-name" name="name" required maxlength="60" placeholder="Website redesign" spellcheck="false"></div></div>
850
+ <div class="set-row"><div class="set-what"><label for="newconv-group">Folder</label><small>Optional. Groups it in the list</small><span id="newconv-group-error" class="err" role="alert" hidden></span></div><div class="set-control"><input id="newconv-group" maxlength="40" list="group-names" placeholder="None" spellcheck="false" autocomplete="off"><datalist id="group-names"></datalist></div></div>
851
+ </div>
852
+ <div class="nc-card">
853
+ <span class="sub-head">Tool</span>
854
+ <div id="newconv-tools" class="pick" role="radiogroup" aria-label="Tool"></div>
855
+ </div>
856
+ <div class="nc-card">
857
+ <span class="sub-head">Its files</span>
858
+ <div id="newconv-work" class="pick two" role="radiogroup" aria-label="Its files">
859
+ <button type="button" role="radio" data-work="kept" aria-checked="true"><b>Kept here</b><small>Seen in Files. Outlives the machine</small></button>
860
+ <button type="button" role="radio" data-work="disk" aria-checked="false"><b>On the machine's disk</b><small>Faster for code. Gone with the machine</small></button>
861
+ </div>
862
+ <details class="more"><summary>Which one?</summary>A code project that installs packages: its disk. Can be changed later.</details>
863
+ </div>
864
+ <details class="chapter" id="newconv-more">
865
+ <summary><span class="chapter-title">More</span><span class="chapter-about">Identifier, memory.</span></summary>
866
+ <div class="chapter-body">
867
+ <div class="set-row"><div class="set-what"><label for="newconv-id">Identifier</label><small>Its machine and address. Never changes</small><span id="newconv-id-error" class="err" role="alert" hidden></span></div><div class="set-control"><input id="newconv-id" maxlength="32" pattern="[a-z]([a-z0-9\-]{0,30}[a-z0-9])?" placeholder="website-redesign" spellcheck="false" autocapitalize="none"></div></div>
868
+ <div class="set-row"><div class="set-what"><label for="newconv-memory">Memory</label><small id="newconv-memory-least"></small><span id="newconv-memory-error" class="err" role="alert" hidden></span></div><div class="set-control"><select id="newconv-memory"></select></div></div>
869
+ </div>
870
+ </details>
871
+ </div>
872
+ <div class="action-row"><span id="newconv-status" class="hint" role="status">Ready in a few minutes</span><button type="button" id="newconv-cancel">Cancel</button><button type="submit" id="newconv-create" class="primary">Create</button></div>
873
+ </form>
867
874
  <div id="copy" class="sheet" hidden>
868
875
  <div class="panel-top"><b>Copy from the screen</b><button type="button" id="copy-close" aria-label="Close" title="Close">&times;</button></div>
869
876
  <p class="hint">The terminal draws its text itself, so it cannot be selected by touch. Here is the same text as ordinary text: select what you need, or copy it all.</p>
@@ -902,9 +909,9 @@
902
909
  <div class="bar" role="progressbar" aria-labelledby="files-progress-text" aria-valuemin="0" aria-valuemax="100" id="files-progress-bar"><span></span></div>
903
910
  <small id="files-progress-bytes" class="hint"></small>
904
911
  </div>
905
- <div id="files-ask" class="files-card" role="alertdialog" aria-labelledby="files-ask-text" hidden>
912
+ <div id="files-ask" class="files-card callout confirm" role="alertdialog" aria-labelledby="files-ask-text" hidden>
906
913
  <b id="files-ask-text"></b>
907
- <div class="row"><button type="button" id="files-ask-keep" class="primary">Keep both</button><button type="button" id="files-ask-replace">Replace</button><button type="button" id="files-ask-skip">Skip</button></div>
914
+ <div class="action-row"><button type="button" id="files-ask-skip">Skip</button><button type="button" id="files-ask-replace">Replace</button><button type="button" id="files-ask-keep" class="primary">Keep both</button></div>
908
915
  <label class="check" id="files-ask-all-line"><input type="checkbox" id="files-ask-all"> <span id="files-ask-all-text">Do the same for the others</span></label>
909
916
  </div>
910
917
  <form id="files-name" class="files-card" autocomplete="off" hidden>
@@ -960,20 +967,17 @@
960
967
  </div>
961
968
  <details id="gitview-keep-box">
962
969
  <summary>Checks, origin, automatic sending</summary>
963
- <form id="gitview-keep" autocomplete="off">
964
- <label class="check"><input type="checkbox" id="gitview-runhook"> Run the project's pre-push hook, if it has one</label>
965
- <label for="gitview-checkcommand">Check command, run in the repository in the agent's machine (optional)</label>
966
- <input id="gitview-checkcommand" spellcheck="false" autocapitalize="off" maxlength="500" placeholder="npm test">
967
- <label for="gitview-checkseconds">Time limit of the checks, in seconds</label>
968
- <input id="gitview-checkseconds" type="number" min="10" max="3600" step="1" inputmode="numeric">
969
- <label class="check"><input type="checkbox" id="gitview-require"> Send only after the checks passed</label>
970
- <label for="gitview-refreshminutes">Refresh the origin every (minutes; 0: only with "Refresh now")</label>
971
- <input id="gitview-refreshminutes" type="number" min="0" max="1440" step="1" inputmode="numeric">
972
- <p class="hint">Refreshing and automatic sending happen only while a running machine has this repository attached; "Refresh now" works any time.</p>
973
- <p class="hint" id="gitview-auto-where">Automatic sending is set for each conversation, under its access to this repository (Write), in the conversation's Access panel.</p>
974
- <label class="check"><input type="checkbox" id="gitview-alert"> Tell my phone about automatic sendings</label>
975
- <label class="check"><input type="checkbox" id="gitview-tellmoves"> Tell the agent when a branch it follows moved (its origin/* is fetched for it either way)</label>
976
- <div class="row"><button type="submit" class="primary">Save</button><span class="hint" id="gitview-keep-said" role="status"></span></div>
970
+ <form id="gitview-keep" class="set-rows" autocomplete="off">
971
+ <div class="set-row"><div class="set-what"><label for="gitview-runhook">Pre-push hook</label><small>The project's own, if it has one</small></div><div class="set-control"><input type="checkbox" id="gitview-runhook"></div></div>
972
+ <div class="set-row"><div class="set-what"><label for="gitview-checkcommand">Check command</label><small>Run in the agent's machine, optional</small></div><div class="set-control"><input id="gitview-checkcommand" spellcheck="false" autocapitalize="off" maxlength="500" placeholder="npm test"></div></div>
973
+ <div class="set-row"><div class="set-what"><label for="gitview-checkseconds">Time limit</label><small>Of the checks, in seconds</small></div><div class="set-control"><input id="gitview-checkseconds" type="number" min="10" max="3600" step="1" inputmode="numeric"></div></div>
974
+ <div class="set-row"><div class="set-what"><label for="gitview-require">Checks required</label><small>Send only after they passed</small></div><div class="set-control"><input type="checkbox" id="gitview-require"></div></div>
975
+ <div class="set-row"><div class="set-what"><label for="gitview-refreshminutes">Origin refresh</label><small>Every N minutes · 0: by hand only</small></div><div class="set-control"><input id="gitview-refreshminutes" type="number" min="0" max="1440" step="1" inputmode="numeric"></div></div>
976
+ <div class="set-row"><div class="set-what"><label for="gitview-alert">Phone alerts</label><small>On automatic sendings</small></div><div class="set-control"><input type="checkbox" id="gitview-alert"></div></div>
977
+ <div class="set-row"><div class="set-what"><label for="gitview-tellmoves">Branch moves</label><small>Told to the agent · origin/* is fetched anyway</small></div><div class="set-control"><input type="checkbox" id="gitview-tellmoves"></div></div>
978
+ <p class="hint">Refresh and automatic sending: only while a running machine has it attached. "Refresh now": any time.</p>
979
+ <p class="hint" id="gitview-auto-where">Automatic sending: set for each conversation, in its Access (Write).</p>
980
+ <div class="action-row"><span class="hint" id="gitview-keep-said" role="status"></span><button type="submit" class="primary">Save</button></div>
977
981
  </form>
978
982
  <b>What was sent by itself, and what went wrong</b>
979
983
  <p id="gitview-log-empty" class="hint">Nothing yet.</p>
package/web/style.css CHANGED
@@ -47,9 +47,6 @@ button:focus-visible, input:focus-visible { outline: 2px solid var(--brass); out
47
47
  @keyframes unfold { from { opacity: 0; transform: translateY(-6px); } }
48
48
  @keyframes pulse { 50% { opacity: .25; } }
49
49
  @media (prefers-reduced-motion: reduce) { .item > .state-dot, .unfolding { animation: none !important; } }
50
- #create { display: flex; flex-direction: column; gap: 6px; padding: 10px; background: var(--bar); border: 1px solid var(--line); border-radius: 8px; }
51
- #create label, #create .legend { font-size: .75rem; color: var(--ink2); }
52
- #create input { font: .875rem var(--sans); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 7px; padding: 7px 9px; min-width: 0; }
53
50
  .choices { display: flex; flex-wrap: wrap; gap: 6px; }
54
51
  .choices button[aria-checked="true"] { border-color: var(--brass); background: rgba(210, 169, 78, .16); }
55
52
  .row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
@@ -258,8 +255,7 @@ footer button.careful { border-style: dashed; color: var(--ink2); }
258
255
  #gitview .commit { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 6px 0; border-top: 1px solid var(--line); }
259
256
  #gitview .commit code { color: var(--ink2); }
260
257
  #gitview .commit small { color: var(--ink2); }
261
- #gitview-remote, #gitview-keep { display: grid; gap: 6px; margin-top: 8px; }
262
- #gitview-keep input:not([type=checkbox]), #gitview-keep textarea, #gitview-target, #gitview-newbranch { min-width: 0; min-height: 40px; font: .875rem var(--sans); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 7px; padding: 7px 9px; }
258
+ #gitview-target, #gitview-newbranch { min-width: 0; min-height: 40px; font: .875rem var(--sans); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 7px; padding: 7px 9px; }
263
259
  #gitview-target { max-width: 100%; }
264
260
  #gitview-origin code { overflow-wrap: anywhere; font: .75rem/1.45 ui-monospace, Menlo, Consolas, monospace; }
265
261
  #gitview-checks-state.passed { color: var(--ok); }
@@ -437,7 +433,6 @@ textarea.public-key { flex: 1 1 260px; min-width: 0; font: .75rem ui-monospace,
437
433
  .git-key { flex-direction: column; align-items: stretch; }
438
434
  .git-key .row { flex-wrap: wrap; }
439
435
  #git-new input[type="radio"] { min-height: 0; padding: 0; margin: 0; }
440
- #git-new select, #gitview-sshkey { 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; }
441
436
 
442
437
  #settings-advanced > div { display: grid; gap: 6px; }
443
438
  #git-hosts .folder code { overflow-wrap: anywhere; font: .75rem/1.45 ui-monospace, Menlo, Consolas, monospace; }
@@ -682,7 +677,7 @@ svg.lk-links path.temp { stroke: var(--k-pick); stroke-dasharray: 4 4; }
682
677
  .lk-add { width: 100%; margin-top: 12px; border: 1.5px dashed var(--line); background: none; border-radius: 12px; padding: 12px; }
683
678
  /* Flows. */
684
679
  .lk-files { gap: 8px; }
685
- .lk-tpick select { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 7px; padding: 5px 8px; max-width: 100%; }
680
+ .lk-tpick select { max-width: 100%; }
686
681
  .lk-tscroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
687
682
  .lk-tboard { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(118px, 150px); gap: 0 34px; padding: 16px 18px 20px; width: max-content; min-width: 100%; justify-content: center; }
688
683
  .lk-tcol { display: flex; flex-direction: column; justify-content: center; gap: 12px; position: relative; z-index: 2; }
@@ -859,12 +854,8 @@ svg.lk-links path.temp { stroke: var(--k-pick); stroke-dasharray: 4 4; }
859
854
  #app:is([data-place="access"], [data-place="assets"], [data-place="settings"]) #room > :is(#keys, #shortcuts) { visibility: hidden; }
860
855
  #app[data-current=""]:is([data-place="access"], [data-place="assets"], [data-place="settings"]) #room > header { display: none; }
861
856
 
862
- /* The form that makes a conversation keeps its height, and the conversations
863
- under it keep theirs: on a phone the whole column scrolls (seen: rows
864
- squashed under the open form). */
865
- #create { flex: 0 0 auto; }
857
+ /* The rows of the list keep their height: on a phone the whole column scrolls. */
866
858
  .item { flex-shrink: 0; }
867
- #list:has(> #create:not([hidden])) #items { flex: 0 0 auto; overflow: visible; }
868
859
 
869
860
  /* ---------- Files: list or icons, changes by hand, uploads, the editor ---------- */
870
861
  #files { --t: var(--ink2); }
@@ -1067,8 +1058,6 @@ button.inline:hover { color: var(--brass); }
1067
1058
  #hidden-toggle[hidden] { display: none; }
1068
1059
  #hidden-toggle .needs-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--brass); vertical-align: middle; }
1069
1060
  .item[data-hidden="true"] { opacity: .7; }
1070
- #create .advanced { margin: .25rem 0; }
1071
- #create .advanced summary { cursor: pointer; color: var(--ink2); font-size: .8rem; }
1072
1061
 
1073
1062
  /* ---------- THE BAR (G): « · state dot + name · [Chat | Terminal | Assets N] · settings ---------- */
1074
1063
  html:not([data-door="device"]) #room > header { flex-wrap: nowrap; }
@@ -1431,7 +1420,7 @@ button.inline.more-recent { text-decoration: none; }
1431
1420
  .ts-who { display: flex; flex-direction: column; min-width: 0; }
1432
1421
  .ts-who b { overflow-wrap: anywhere; }
1433
1422
  .ts-way { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
1434
- .ts-way select { max-width: 100%; font: .875rem var(--sans); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 7px; padding: 5px 8px; }
1423
+ .ts-way select { max-width: 100%; }
1435
1424
  .ts-bar button:disabled { opacity: .5; cursor: default; }
1436
1425
  .ts-state .quiet { color: var(--ink2); font-weight: 400; }
1437
1426
  .ts-branch { font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--brass); overflow-wrap: anywhere; }
@@ -1465,18 +1454,23 @@ button.inline.more-recent { text-decoration: none; }
1465
1454
  /* ---------- SETTINGS, AND A CONVERSATION'S SETTINGS: one look ----------
1466
1455
  Every field the same; a setting is a row (its name and one short line on
1467
1456
  the left, its control on the right; one under the other on a phone); a
1468
- state is a line with a dot; what asks for an action is a callout. */
1469
- :is(#settings, #panel) :is(input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]), select, textarea) {
1457
+ state is a line with a dot; what asks for an action is a callout. The
1458
+ other sheets where something is set (an asset, Access and a device, To
1459
+ send and the review) take the same fields, at a lower weight: what is
1460
+ their own (a branch pill, the editor) stays theirs. */
1461
+ :is(#settings, #panel) :is(input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]), select, textarea),
1462
+ :where(#assets, #cassets, #access, #gitview) :is(input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]), select, textarea:not(.editor)) {
1470
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%;
1471
1464
  }
1472
- :is(#settings, #panel) select { 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; }
1473
- :is(#settings, #panel) :is(input, select, textarea):focus-visible { outline: 2px solid var(--brass); outline-offset: 1px; }
1474
- @media (pointer: coarse) { :is(#settings, #panel) :is(input:not([type=checkbox]):not([type=radio]), select) { min-height: 44px; } }
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; }
1466
+ :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
+ @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; } }
1475
1468
  #settings select.pill { font: .875rem var(--sans); font-weight: 400; }
1476
1469
  :is(#settings, #panel) .chapter-body { gap: 0; padding: 0; background: var(--bar); }
1477
1470
  :is(#settings, #panel) .chapter-body > * { margin: 0; padding: 12px 16px; }
1478
- :is(#settings, #panel) .chapter-body > * + * { border-top: 1px solid var(--line); }
1479
- :is(#settings, #panel) .chapter-body > [hidden] + *, :is(#settings, #panel) .chapter-body > .hint + .hint { border-top: 0; }
1471
+ /* One line between two pieces in sight: a piece hidden (or empty) neither draws one nor takes one away. */
1472
+ :is(#settings, #panel) .chapter-body > :where(:not([hidden], :empty)) ~ :where(:not([hidden], :empty)) { border-top: 1px solid var(--line); }
1473
+ :is(#settings, #panel) .chapter-body > .hint + .hint { border-top: 0; }
1480
1474
  :is(#settings, #panel) .chapter-body > .hint, :is(#settings, #panel) .chapter-body > .error { padding-top: 8px; padding-bottom: 8px; }
1481
1475
  .set-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; align-items: center; }
1482
1476
  .set-row > .set-what { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
@@ -1501,6 +1495,9 @@ details.more > summary { list-style: none; cursor: pointer; display: inline-flex
1501
1495
  details.more > summary::-webkit-details-marker { display: none; }
1502
1496
  details.more > summary::before { content: "i"; display: inline-grid; place-items: center; width: 16px; height: 16px; border: 1px solid var(--ink2); border-radius: 50%; font: italic 700 .6875rem Georgia, serif; }
1503
1497
  details.more[open] > summary { margin-bottom: 4px; }
1498
+ /* The same "i" in a sheet whose other folds are buttons. */
1499
+ :is(#assets, #gitview, #panel) details.more > summary { padding: 0; border: 0; background: none; font-weight: 400; min-height: 0; display: inline-flex; align-self: auto; }
1500
+ :is(#assets, #gitview, #panel) details.more > summary::before { content: "i"; }
1504
1501
  /* The categories: beside them on a wide screen, headings one under the other otherwise. */
1505
1502
  .settings-nav { display: none; }
1506
1503
  .settings-groups { display: flex; flex-direction: column; gap: 12px; }
@@ -1517,8 +1514,7 @@ details.more[open] > summary { margin-bottom: 4px; }
1517
1514
  /* A form of several settings: each its row, one line between them. */
1518
1515
  :is(#settings, #panel) .chapter-body > .set-rows { display: flex; flex-direction: column; padding: 0; }
1519
1516
  .set-rows > * { margin: 0; padding: 12px 16px; }
1520
- .set-rows > * + * { border-top: 1px solid var(--line); }
1521
- .set-rows > [hidden] + * { border-top: 0; }
1517
+ .set-rows > :where(:not([hidden])) ~ :where(:not([hidden])) { border-top: 1px solid var(--line); }
1522
1518
  /* One thing of a list (a shortcut, an administrator, a key): its name and a line; its actions on the right. */
1523
1519
  .list-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 10px 16px; }
1524
1520
  .list-item + .list-item { border-top: 1px solid var(--line); }
@@ -1530,7 +1526,7 @@ details.more[open] > summary { margin-bottom: 4px; }
1530
1526
  .mono-cut { font-family: ui-monospace, Menlo, Consolas, monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
1531
1527
  #settings #export-note { max-width: none; text-align: left; margin: 0; order: 0; flex: none; }
1532
1528
  /* Several settings in one block: one line between them too. */
1533
- :is(#settings, #panel) .chapter-body > * > :is(.set-row, form.set-row) ~ :is(.set-row, form.set-row):not([hidden]) { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
1529
+ :is(#settings, #panel) .chapter-body > * > :is(.set-row, form.set-row):not([hidden]) ~ :is(.set-row, form.set-row):not([hidden]) { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
1534
1530
  /* Nothing in it yet (a list, a line said later): no empty band. */
1535
1531
  :is(#settings, #panel) .chapter-body > :empty { display: none; }
1536
1532
  /* A sub-heading inside a chapter: small capitals, no line of its own. */
@@ -1565,3 +1561,119 @@ details.more[open] > summary { margin-bottom: 4px; }
1565
1561
  .ts-why-box { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; }
1566
1562
  .ts-why-box p { margin: 0; }
1567
1563
  .ts-filters { margin-top: 10px; }
1564
+
1565
+ /* ---------- THE OTHER SHEETS, IN THE SAME LOOK ----------
1566
+ An asset, a device, To send, the review's settings: a card of rows (the
1567
+ set-rows of a chapter, standing alone), its heads in small capitals, its
1568
+ buttons at the end; a question before what cannot be taken back is a callout. */
1569
+ .set-card, .as-users, .as-settings, .as-detail .set-rows, #gitview-keep, .ts-rows, .device.card .card-body { border: 1px solid var(--line); border-radius: 10px; background: var(--bar); }
1570
+ .as-detail .set-rows, #gitview-keep { display: flex; flex-direction: column; gap: 0; margin: 0; }
1571
+ .as-detail .set-rows > .action-row, #gitview-keep > .action-row { padding: 10px 16px; }
1572
+ .as-detail .set-rows > .hint, #gitview-keep > .hint { padding-top: 8px; padding-bottom: 8px; font-size: .8125rem; }
1573
+ #gitview-keep > .hint + .hint { border-top: 0; padding-top: 0; }
1574
+ .set-row > .set-control > input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--brass); }
1575
+ /* A chapter of a sheet: a head in small capitals, its action on the right. */
1576
+ .as-chapter { margin-top: 10px; min-height: 30px; }
1577
+ .as-chapter h3 { font-size: .6875rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink2); }
1578
+ /* Who has it: one row each, a line between them. */
1579
+ .as-users { gap: 0; }
1580
+ .as-users > *, .device.card .given > * { border-top: 1px solid var(--line); }
1581
+ .as-users > .given-row, .device.card .given > .given-row, .thing > .given-row { padding: 10px 16px; border-top: 1px solid var(--line); }
1582
+ .as-users > :first-child, .device.card .given > :first-child { border-top: 0; }
1583
+ .as-users > .hint, .device.card .given > .hint { margin: 0; padding: 10px 16px; }
1584
+ .as-picker { border-style: dashed; background: transparent; }
1585
+ /* Its settings: the name on the left, the value on the right, as a set-row. */
1586
+ .as-settings { padding: 0 16px; }
1587
+ .as-settings dt, .as-settings dd { padding: 12px 0; }
1588
+ .as-settings dt { color: var(--ink); font-size: .875rem; font-weight: 600; }
1589
+ .as-settings dd { color: var(--ink2); font-weight: 400; font-size: .875rem; }
1590
+ .as-card, .as-lastchecks, .as-graph { background: var(--bar); border-radius: 10px; }
1591
+ .secret-rename > .set-control > input { width: 14rem; }
1592
+ .as-foot { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
1593
+ .as-foot > br { display: none; }
1594
+ #gitview-remote-box { margin: 0; }
1595
+ #gitview-remote { display: flex; flex-direction: column; gap: 0; padding: 0; margin: 0; }
1596
+ #gitview-key-state { font-size: .75rem; }
1597
+ /* A device: its head, then what it has as rows, then its buttons. */
1598
+ .device.card { background: transparent; border: 0; }
1599
+ .device.card .device-head { padding: 10px 2px 8px; min-height: 0; }
1600
+ .device.card .card-body { padding: 0; gap: 0; }
1601
+ .device.card .given { display: block; }
1602
+ .device.card .given > .parts-off { margin: 0; padding: 8px 16px; }
1603
+ .device.card .device-acts { padding: 10px 16px; border-top: 1px solid var(--line); justify-content: flex-start; }
1604
+ .thing { border: 1px solid var(--line); border-radius: 10px; background: var(--bar); padding: 0; margin-top: 8px; }
1605
+ .thing > summary { padding: 0 16px; }
1606
+ /* To send: one card, a row for each branch; the result, a state line. */
1607
+ .ts-rows { gap: 0; margin-top: 12px; }
1608
+ .ts-rows:empty { display: none; }
1609
+ .ts-row { border: 0; border-radius: 0; background: transparent; padding: 12px 16px; }
1610
+ .ts-row + .ts-row { border-top: 1px solid var(--line); }
1611
+ .ts-rows > p { margin: 0; padding: 12px 16px; }
1612
+ .ts-bar { margin-top: 12px; }
1613
+ .ts-bar > .ts-why { margin-right: auto; }
1614
+ .ts-bar > .ts-why:empty { display: none; }
1615
+ .ts-said { font-weight: 600; }
1616
+ .ts-review-head h3 { font-size: .6875rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink2); }
1617
+ .ts-review-head .as-line { margin-top: 4px; color: var(--ink); }
1618
+ /* The review's settings, folded under its checks. */
1619
+ #gitview-keep-box > summary { font-weight: 600; }
1620
+ #gitview-keep-box > b { display: block; margin: 14px 0 4px; font-size: .6875rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink2); }
1621
+ /* A question before what cannot be taken back: a callout, its line, then its buttons, the main one last. */
1622
+ .callout.confirm { display: flex; flex-direction: row; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; font-size: .875rem; }
1623
+ .callout.confirm > label { flex: 1 1 100%; }
1624
+ .callout.confirm > :is(span, b, p):first-child { flex: 1 1 12rem; margin: 0; font-weight: 600; color: var(--ink); }
1625
+ .callout.confirm > .action-row { flex: 1 1 100%; }
1626
+ span.callout.confirm { display: inline-flex; justify-content: flex-end; padding: 4px; margin-left: auto; }
1627
+ .files-card.callout { border: 0; border-left: 3px solid var(--warn); border-radius: 4px; }
1628
+ #files-ask.callout { border-color: var(--warn); }
1629
+ .entry .acts.confirm { margin: 0 0 10px 44px; padding: 8px 12px; border-left: 3px solid var(--danger); border-radius: 4px; background: color-mix(in srgb, var(--danger) 8%, var(--bar)); justify-content: flex-end; }
1630
+ .entry .acts.confirm .sure { font-size: .875rem; }
1631
+ @media (max-width: 700px) { .entry .acts.confirm { margin-left: 0; } }
1632
+
1633
+ /* ---------- A NEW CONVERSATION: a page of its own, as Settings ----------
1634
+ The pieces of "one look" (set-row, sub-head, more, chapter, action-row);
1635
+ a choice of a few is a card each; Create stays in sight at the bottom. */
1636
+ #newconv { gap: 12px; padding: 14px 20px 0; }
1637
+ #newconv > .panel-top b { font-size: 1.125rem; }
1638
+ #newconv > .nc-body { display: flex; flex-direction: column; gap: 12px; max-width: 720px; width: 100%; }
1639
+ #newconv :is(input:not([type=checkbox]):not([type=radio]), select) { 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%; box-sizing: border-box; }
1640
+ #newconv select { 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; }
1641
+ #newconv :is(input, select):focus-visible { outline: 2px solid var(--brass); outline-offset: 1px; }
1642
+ @media (pointer: coarse) { #newconv :is(input:not([type=checkbox]):not([type=radio]), select) { min-height: 44px; } }
1643
+ #newconv .set-control > :is(input, select)[aria-invalid=true]:not([type=checkbox]):not([type=radio]) { border-color: var(--danger); }
1644
+ #newconv .set-row > .set-control > :is(input, select) { width: 18rem; }
1645
+ #newconv .set-what > .err { font-size: .75rem; color: var(--danger); }
1646
+ /* A card of rows, as an open chapter without its fold. */
1647
+ .nc-card, #newconv details.chapter { flex-shrink: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--bar); }
1648
+ .nc-card > *, #newconv details.chapter > .chapter-body > * { margin: 0; padding: 12px 16px; }
1649
+ .nc-card > * + *, #newconv details.chapter > .chapter-body > * + * { border-top: 1px solid var(--line); }
1650
+ .nc-card > .sub-head { display: block; padding-bottom: 0; }
1651
+ .nc-card > .sub-head + * { border-top: 0; }
1652
+ #newconv details.chapter > .chapter-body { gap: 0; padding: 0; background: var(--bar); border-radius: 0 0 10px 10px; }
1653
+ /* A choice of a few, each a card: its name and one short line. */
1654
+ .pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
1655
+ .pick.two { grid-template-columns: 1fr 1fr; }
1656
+ .pick > button { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 56px; padding: 10px 24px 10px 12px; text-align: left; font-weight: 400; background: var(--panel); }
1657
+ .pick > button b { font-size: .875rem; color: var(--ink); }
1658
+ .pick > button small { font-size: .75rem; color: var(--ink2); }
1659
+ .pick > button[aria-checked=true] { border-color: var(--brass); box-shadow: 0 0 0 1px var(--brass); background: color-mix(in srgb, var(--brass) 10%, var(--panel)); }
1660
+ .pick > button[aria-checked=true]::after { content: ""; position: absolute; right: 10px; top: 12px; width: 10px; height: 10px; border-radius: 50%; background: var(--brass); }
1661
+ /* The buttons stay in sight at the end of the page. */
1662
+ #newconv > .action-row { position: sticky; bottom: 0; z-index: 1; flex-wrap: nowrap; max-width: 720px; width: 100%; box-sizing: border-box; margin-top: auto; padding: 12px 0 calc(14px + env(safe-area-inset-bottom, 0px)); background: var(--panel); border-top: 1px solid var(--line); }
1663
+ #newconv > .action-row > .hint { font-size: .8125rem; min-width: 0; }
1664
+ #newconv > .action-row > .hint.error { color: var(--danger); }
1665
+ #newconv > .action-row > button { flex: none; min-height: 40px; padding: 8px 16px; }
1666
+ #new[aria-pressed=true] { box-shadow: 0 0 0 2px var(--panel), 0 0 0 3px var(--brass); }
1667
+ /* Over a conversation on a wide screen, as Settings: its keys keep their room but cannot be touched; with none, no bar. */
1668
+ #app[data-place="new"] #room > :is(#keys, #shortcuts) { visibility: hidden; }
1669
+ #app[data-current=""][data-place="new"] #room > header { display: none; }
1670
+ @media (max-width: 700px) {
1671
+ /* A phone: the whole screen, the menu bar and the conversation's bar put away. */
1672
+ #app[data-place="new"] #nav { display: none; }
1673
+ #app[data-place="new"] #room > :is(header, #health-strip, #signin-strip, #voice-line, #shortcuts, #keys) { display: none !important; }
1674
+ #newconv { padding: 12px 16px 0; }
1675
+ #newconv .set-row > .set-control > :is(input, select) { width: 100%; }
1676
+ .pick { grid-template-columns: 1fr 1fr; }
1677
+ .pick.two { grid-template-columns: 1fr; }
1678
+ #newconv > .action-row > .hint { font-size: .75rem; }
1679
+ }