clavarium 0.2.22-next.2 → 0.2.22

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.22-next.2",
3
+ "version": "0.2.22",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "clavarium",
9
- "version": "0.2.22-next.2",
9
+ "version": "0.2.22",
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.13.2",
15
+ "clavarium-parley": "0.13.3",
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.13.2",
704
- "resolved": "https://registry.npmjs.org/clavarium-parley/-/clavarium-parley-0.13.2.tgz",
705
- "integrity": "sha512-S1U62cNUjTGity2ISPhZl0mtUfTdR57l0on1ydrS00ey/U9PVoyCB943exUx6ahGHQ1JAl/tD412YVmITYy21A==",
703
+ "version": "0.13.3",
704
+ "resolved": "https://registry.npmjs.org/clavarium-parley/-/clavarium-parley-0.13.3.tgz",
705
+ "integrity": "sha512-9YPg2Ae21TUtxMcfWvIebohe87+1BIXRg8xS+gxobt408l1WhDSUnxPbfEOJp6Ch9NhC0439lwlAh5gHonSgOQ==",
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.22-next.2",
3
+ "version": "0.2.22",
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.13.2",
48
+ "clavarium-parley": "0.13.3",
49
49
  "mermaid": "11.17.2",
50
50
  "node-pty": "^1.1.0",
51
51
  "pdfjs-dist": "6.4.299",
package/web/app.js CHANGED
@@ -330,11 +330,12 @@
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;
333
+ let listFolded = false; let foldingTimer;
334
334
  try { listFolded = localStorage.getItem('clavarium-list') === 'folded'; } catch { /* a private window */ }
335
335
  $('fold').addEventListener('click', () => {
336
336
  listFolded = !listFolded;
337
337
  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);
338
339
  applyFold(listFolded);
339
340
  fit.fit(); focusTerminal();
340
341
  });
@@ -2941,30 +2942,41 @@
2941
2942
  return box;
2942
2943
  }
2943
2944
  /* TO SEND: every repository of a conversation on one screen. What its
2944
- agent committed, ticked when there is something to send; the checks run
2945
- by themselves; one review of them all; one button sends them one after
2946
- the other, each by the same route as its own review (the same commit,
2945
+ agent committed, read branch by branch and said as it goes; filtered
2946
+ (by default, the branches the remote has and that can be brought up to
2947
+ date) and ticked; the checks of what is ticked on a click; one review
2948
+ of them all; one button sends them one after the other, each by the same route as its own review (the same commit,
2947
2949
  the same target, the same guards). One refused does not hold the
2948
2950
  others back: each says what became of it. */
2949
2951
  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' };
2950
2952
  /* How many other branches of a repository are looked at; those moved within this long are ticked at first. */
2951
2953
  const BRANCHES_MORE = 7;
2952
2954
  const MOVED_LATELY_MS = 24 * 3600_000;
2955
+ /* 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. */
2956
+ const kindOfRow = (out) => (out?.state !== 'ahead' ? 'none' : out.targetExists === false ? 'new' : 'update');
2957
+ const TS_FILTERS = [['update', 'To update'], ['new', 'New branches'], ['all', 'All']];
2958
+ /* Three steps: every branch read (said as it goes, nothing checked yet); filtered and ticked; the checks of what is
2959
+ ticked, on a click; then Send. */
2953
2960
  async function sendDetail(holder, names) {
2954
- const list = el('div', 'ts-rows'); list.append(el('p', 'hint busy', 'Looking at every repository...'));
2961
+ const progress = el('p', 'status-line ts-progress'); progress.setAttribute('role', 'status');
2962
+ const filters = el('div', 'levels ts-filters'); filters.setAttribute('role', 'group'); filters.setAttribute('aria-label', 'Show');
2963
+ const list = el('div', 'ts-rows');
2955
2964
  const bar = el('div', 'as-acts ts-bar');
2956
2965
  const together = el('button', '', 'Review together'); together.type = 'button'; together.dataset.act = 'send-review';
2957
- const go = el('button', 'primary', 'Send'); go.type = 'button'; go.dataset.act = 'send-all';
2966
+ const go = el('button', 'primary', 'Check'); go.type = 'button'; go.dataset.act = 'send-all';
2958
2967
  const why = el('span', 'hint ts-why');
2959
2968
  bar.append(together, go, why);
2960
2969
  const said = el('p', 'ts-said'); said.hidden = true; said.setAttribute('role', 'status');
2961
2970
  const review = el('div', 'ts-review'); review.hidden = true;
2962
- holder.append(el('p', 'hint', 'What its agent committed, every branch. Ticked: what it moved lately.'), list, bar, said, review);
2963
- const rows = names.map((name) => ({ name, out: null, keep: null, branch: '', target: '', picked: false, check: null, sent: null }));
2964
- let sending = false;
2971
+ holder.append(progress, filters, list, bar, said, review);
2972
+ const rows = [];
2973
+ let filter = 'update';
2974
+ let sending = false; let checking = false;
2965
2975
  let sure = '';
2966
- const picked = () => rows.filter((r) => r.picked && r.out?.state === 'ahead');
2967
- /* One row looked at again: its branch and target as chosen; its checks run when it has something to send. */
2976
+ let planned = names.length; let read = 0; let reading = true;
2977
+ const shownRow = (r) => filter === 'all' || kindOfRow(r.out) === filter;
2978
+ const picked = () => rows.filter((r) => r.picked && r.out?.state === 'ahead' && shownRow(r));
2979
+ const label = (r) => (rows.filter((x) => x.name === r.name).length > 1 ? `${r.name} (${r.branch})` : r.name);
2968
2980
  async function look(r) {
2969
2981
  const query = new URLSearchParams();
2970
2982
  if (r.branch) query.set('branch', r.branch);
@@ -2972,13 +2984,9 @@
2972
2984
  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)]);
2973
2985
  r.out = out; r.keep = keep; r.branch = out.branch ?? r.branch; r.target = out.target ?? r.target; r.check = null;
2974
2986
  if (out.state !== 'ahead') r.picked = false;
2975
- paint();
2976
- /* Checked when it is to go: ticked (another branch ticked later is checked then). */
2977
- if (out.state === 'ahead' && r.picked) void checkRow(r, out.head, out.target);
2978
2987
  }
2979
- /* Several branches of one repository: named with it. */
2980
- const label = (r) => (rows.filter((x) => x.name === r.name).length > 1 ? `${r.name} (${r.branch})` : r.name);
2981
- async function checkRow(r, head, target) {
2988
+ async function checkRow(r) {
2989
+ const { head, target } = r.out;
2982
2990
  r.check = { status: 'running' }; paint();
2983
2991
  let result;
2984
2992
  try { result = await post(`${API}/git/${r.name}/check`, { head, target }); }
@@ -2987,58 +2995,76 @@
2987
2995
  r.check = result; paint();
2988
2996
  }
2989
2997
  const stopped = (r) => Boolean(r.keep?.settings?.requireForSend) && r.check?.status !== 'passed';
2998
+ function paintProgress() {
2999
+ const count = (k) => rows.filter((r) => kindOfRow(r.out) === k).length;
3000
+ if (reading) { progress.dataset.tone = 'warn'; progress.textContent = `Reading the branches: ${read} of ${planned}...`; }
3001
+ else { progress.dataset.tone = count('update') + count('new') ? 'ok' : ''; progress.textContent = count('update') + count('new') ? `${count('update')} to update · ${count('new')} new · all read` : 'Nothing to send · all read'; }
3002
+ filters.replaceChildren(...TS_FILTERS.map(([key, word]) => {
3003
+ const n = key === 'all' ? rows.length : count(key);
3004
+ const b = el('button', '', `${word} ${n}`); b.type = 'button'; b.dataset.filter = key; b.setAttribute('aria-pressed', String(filter === key));
3005
+ b.addEventListener('click', () => { filter = key; sure = ''; paint(); if (!review.hidden) paintReview(); });
3006
+ return b;
3007
+ }));
3008
+ }
2990
3009
  function paintButtons() {
2991
3010
  const p = picked();
3011
+ const unchecked = p.filter((r) => !r.check);
3012
+ const running = p.filter((r) => r.check?.status === 'running');
3013
+ const held = p.filter((r) => r.check && r.check.status !== 'running' && stopped(r));
3014
+ const failed = p.filter((r) => r.check?.status === 'failed' || r.check?.status === 'unavailable');
3015
+ const word = p.length > 1 ? `the ${p.length}` : 'it';
2992
3016
  const targets = [...new Set(p.map((r) => r.target))];
2993
3017
  const where = targets.length === 1 ? ` to ${targets[0]}` : '';
2994
3018
  together.disabled = p.length === 0;
2995
3019
  together.textContent = p.length > 1 ? `Review the ${p.length} together` : 'Review';
2996
- const running = p.filter((r) => r.check?.status === 'running');
2997
- const held = p.filter((r) => r.check?.status !== 'running' && stopped(r));
2998
- const failed = p.filter((r) => r.check?.status === 'failed');
2999
- const word = p.length > 1 ? `the ${p.length}` : 'it';
3000
- go.disabled = sending || p.length === 0 || running.length > 0 || held.length > 0;
3001
- why.textContent = p.length === 0 ? 'Nothing ticked.' : running.length ? 'Waits for the checks.' : held.length ? `Its owner asked for passing checks: ${held.map(label).join(', ')}.` : failed.length ? `Checks failed in ${failed.map(label).join(', ')}.` : '';
3020
+ go.disabled = sending || checking || p.length === 0 || running.length > 0 || (!unchecked.length && held.length > 0);
3021
+ why.textContent = p.length === 0 ? 'Nothing ticked.' : running.length ? 'Checking...' : unchecked.length ? '' : held.length ? `Passing checks are required: ${held.map(label).join(', ')}.` : failed.length ? `Checks did not pass: ${failed.map(label).join(', ')}.` : '';
3002
3022
  if (sending) { go.textContent = 'Sending...'; return; }
3023
+ /* First the checks of what is ticked; then Send. */
3024
+ if (unchecked.length || running.length) { go.dataset.step = 'check'; go.textContent = `Check ${word}`; return; }
3025
+ go.dataset.step = 'send';
3003
3026
  const all = p.some((r) => r.out?.guards?.confirm);
3004
3027
  go.textContent = sure === 'yes' ? (all ? `Not all of it could be shown here: send ${word}${where} anyway` : `Yes, send ${word}${where}: this cannot be undone`) : sure === 'all' ? `Yes, send ${word}${where}: this cannot be undone` : `Send ${word}${where}${failed.length ? ' anyway' : ''}`;
3005
3028
  }
3006
3029
  function paint() {
3030
+ paintProgress();
3007
3031
  list.replaceChildren();
3008
3032
  for (const r of rows) {
3033
+ if (!shownRow(r)) continue;
3009
3034
  const row = el('div', 'ts-row'); row.dataset.repo = r.name; if (r.branch) row.dataset.branch = r.branch;
3010
3035
  const out = r.out;
3011
3036
  const ahead = out?.state === 'ahead';
3012
3037
  row.classList.toggle('off', !ahead);
3013
- const tick = el('input'); tick.type = 'checkbox'; tick.checked = r.picked; tick.disabled = !ahead || sending; tick.setAttribute('aria-label', `Send ${r.name}`);
3014
- tick.addEventListener('change', () => { r.picked = tick.checked; sure = ''; if (r.picked && !r.check && r.out?.state === 'ahead') void checkRow(r, r.out.head, r.out.target); paintButtons(); if (!review.hidden) paintReview(); });
3038
+ const tick = el('input'); tick.type = 'checkbox'; tick.checked = r.picked; tick.disabled = !ahead || sending || checking; tick.setAttribute('aria-label', `Send ${label(r)}`);
3039
+ tick.addEventListener('change', () => { r.picked = tick.checked; sure = ''; paint(); if (!review.hidden) paintReview(); });
3015
3040
  const who = el('div', 'ts-who'); who.append(el('b', '', r.name), el('small', 'hint', out?.remote ? hostOf(out.remote) : out ? 'no remote' : ''));
3016
3041
  const way = el('div', 'ts-way');
3017
3042
  if (out?.branch) {
3018
3043
  way.append(el('code', 'ts-branch', out.branch));
3019
3044
  if (['ahead', 'up-to-date', 'diverged'].includes(out.state) && out.target) {
3020
3045
  way.append(el('span', 'ts-arrow', '→'));
3021
- const to = el('select'); to.setAttribute('aria-label', `Where ${r.name} goes`); to.disabled = sending;
3046
+ const to = el('select'); to.setAttribute('aria-label', `Where ${label(r)} goes`); to.disabled = sending || checking;
3022
3047
  const names2 = [...(out.branches ?? [])]; if (!names2.includes(out.target)) names2.unshift(out.target);
3023
3048
  for (const b of names2) { const o = el('option', '', b === out.target && !out.targetExists ? `${b} (new branch)` : b); o.value = b; to.append(o); }
3024
3049
  to.value = out.target;
3025
- to.addEventListener('change', () => { r.target = to.value; sure = ''; void look(r); });
3050
+ to.addEventListener('change', async () => { r.target = to.value; sure = ''; await look(r); paint(); });
3026
3051
  way.append(to);
3027
3052
  }
3028
3053
  }
3029
3054
  const size = el('div', 'ts-size');
3030
- if (!out) size.append(el('span', 'hint busy', 'Looking...'));
3055
+ if (!out) size.append(el('span', 'hint busy', 'Reading...'));
3031
3056
  else if (ahead) {
3032
3057
  const files = diffFiles(out.diff);
3033
- size.append(el('span', '', out.count === null || out.count === undefined ? 'some commits' : `${out.count} commit${out.count === 1 ? '' : 's'}`), el('br'),
3034
- el('span', 'plus', `+${files.reduce((n, f) => n + f.added, 0)}`), ' ', el('span', 'minus', `−${files.reduce((n, f) => n + f.removed, 0)}`));
3058
+ /* A branch the remote does not have: "new", not a count against a branch that is not there. */
3059
+ const what = out.targetExists === false ? 'new branch' : out.count === null || out.count === undefined ? 'some commits' : `${out.count} commit${out.count === 1 ? '' : 's'}`;
3060
+ size.append(el('span', '', what), el('br'), el('span', 'plus', `+${files.reduce((n, f) => n + f.added, 0)}`), ' ', el('span', 'minus', `−${files.reduce((n, f) => n + f.removed, 0)}`));
3035
3061
  } else size.append(el('span', 'hint', out.state === 'up-to-date' ? 'nothing' : '-'));
3036
3062
  const state = el('div', 'ts-state');
3037
- if (r.sent) state.append(el('b', r.sent.ok ? 'ok' : 'bad', r.sent.ok ? r.sent.text : '\u2717 Not sent'));
3063
+ if (r.sent) state.append(el('b', r.sent.ok ? 'ok' : 'bad', r.sent.ok ? r.sent.text : '✗ Not sent'));
3038
3064
  else if (!out) state.append('');
3039
3065
  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));
3040
- else if (!r.check && !r.picked) state.append(el('span', 'hint', 'checked once ticked'));
3041
- else if (!r.check || r.check.status === 'running') state.append(el('span', 'warn', 'Checks running...'));
3066
+ else if (!r.check) state.append(el('span', 'hint', r.picked ? 'to check' : ''));
3067
+ else if (r.check.status === 'running') state.append(el('span', 'warn', 'Checking...'));
3042
3068
  else {
3043
3069
  const [word, tone] = CHECK_WORDS[r.check.status] ?? [String(r.check.status), ''];
3044
3070
  state.append(el('b', tone || 'quiet', r.check.status === 'passed' ? '✓ Checks passed' : r.check.status === 'failed' ? '✗ Checks failed' : word));
@@ -3047,7 +3073,8 @@
3047
3073
  if (r.sent && !r.sent.ok) row.append(el('p', 'ts-note bad', r.sent.text));
3048
3074
  list.append(row);
3049
3075
  }
3050
- if (rows.length === 0) list.append(el('p', 'hint', 'No repository is given to it.'));
3076
+ if (!reading && rows.length === 0) list.append(el('p', 'hint', 'No repository is given to it.'));
3077
+ else if (!reading && !rows.some(shownRow)) list.append(el('p', 'hint', filter === 'update' ? 'No branch of the remote to update.' : 'None.'));
3051
3078
  paintButtons();
3052
3079
  }
3053
3080
  /* ONE REVIEW of them all: the files of each under its name, then each one's changes, commits and checks. */
@@ -3062,7 +3089,7 @@
3062
3089
  const removed = all.reduce((n, x) => n + x.files.reduce((m, f) => m + f.removed, 0), 0);
3063
3090
  const commits = p.reduce((n, r) => n + (r.out.count ?? r.out.commits.length), 0);
3064
3091
  const head = el('div', 'ts-review-head');
3065
- head.append(el('h3', '', `${p.length} repositor${p.length === 1 ? 'y' : 'ies'}`), el('p', 'as-line', `${commits} commit${commits === 1 ? '' : 's'} · ${nFiles} file${nFiles === 1 ? '' : 's'} · `));
3092
+ head.append(el('h3', '', `${p.length} branch${p.length === 1 ? '' : 'es'}`), el('p', 'as-line', `${commits} commit${commits === 1 ? '' : 's'} · ${nFiles} file${nFiles === 1 ? '' : 's'} · `));
3066
3093
  head.lastChild.append(el('span', 'plus', `+${added}`), ' ', el('span', 'minus', `−${removed}`));
3067
3094
  const tabs = el('div', 'rv-tabs ts-tabs'); tabs.setAttribute('role', 'tablist');
3068
3095
  const passed = p.filter((r) => r.check?.status === 'passed').length;
@@ -3106,8 +3133,8 @@
3106
3133
  }
3107
3134
  } else {
3108
3135
  for (const r of p) {
3109
- const [word] = CHECK_WORDS[r.check?.status] ?? [r.check?.status === 'running' ? 'Running...' : 'Not run'];
3110
- body.append(el('h4', '', `${r.name}: ${word}`));
3136
+ const [word] = CHECK_WORDS[r.check?.status] ?? [r.check?.status === 'running' ? 'Running...' : 'Not run yet'];
3137
+ body.append(el('h4', '', `${label(r)}: ${word}`));
3111
3138
  if (r.check?.output) body.append(el('pre', 'ts-output', r.check.output));
3112
3139
  }
3113
3140
  }
@@ -3122,6 +3149,14 @@
3122
3149
  go.addEventListener('click', async () => {
3123
3150
  const p = picked();
3124
3151
  if (p.length === 0 || go.disabled) return;
3152
+ /* The checks first, of what is ticked only, one after the other: each takes the machine of its agent. */
3153
+ if (go.dataset.step === 'check') {
3154
+ checking = true; paint();
3155
+ for (const r of p.filter((x) => !x.check)) await checkRow(r);
3156
+ checking = false; paint();
3157
+ if (!review.hidden) paintReview();
3158
+ return;
3159
+ }
3125
3160
  /* Two clicks: what leaves cannot be called back. Three when a review could not show it all. */
3126
3161
  const all = p.some((r) => r.out?.guards?.confirm);
3127
3162
  if (!sure) { sure = 'yes'; paintButtons(); return; }
@@ -3142,23 +3177,32 @@
3142
3177
  said.className = `ts-said ${ok === p.length ? 'ok' : 'bad'}`; said.hidden = false;
3143
3178
  if (reviewStep) nav.drop(reviewStep);
3144
3179
  /* What is left to send, read again; what became of each stays said. */
3145
- const kept = new Map(rows.map((r) => [r.name, r.sent]));
3180
+ const kept = new Map(rows.map((r) => [r, r.sent]));
3146
3181
  await Promise.all(rows.map((r) => look(r)));
3147
- for (const r of rows) r.sent = kept.get(r.name);
3182
+ for (const r of rows) r.sent = kept.get(r);
3148
3183
  paint();
3149
3184
  });
3150
3185
  paint();
3151
- /* Each repository's branch that moved last, then every other branch of its agent that has something to send. */
3152
- await Promise.all(rows.map(async (r) => { await look(r); }));
3153
- const others = rows.flatMap((r) => (r.out?.agentBranches ?? []).filter((b) => b.name !== r.branch).slice(0, BRANCHES_MORE).map((b) => ({ name: r.name, out: null, keep: r.keep, branch: b.name, target: '', picked: false, check: null, sent: null, movedAt: b.movedAt })));
3154
- for (const r of rows) r.movedAt = (r.out?.agentBranches ?? []).find((b) => b.name === r.branch)?.movedAt ?? null;
3155
- await Promise.all(others.map(async (o) => { await look(o); }));
3156
- for (const o of others) if (o.out?.state === 'ahead') rows.splice(rows.findLastIndex((x) => x.name === o.name) + 1, 0, o);
3157
- /* Ticked at first: what its agent moved lately -- each repository's newest, and any other moved within a day. */
3186
+ /* 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. */
3158
3187
  const lately = (r) => r.movedAt && Date.now() - Date.parse(r.movedAt) < MOVED_LATELY_MS;
3159
- for (const r of rows) r.picked = r.out?.state === 'ahead' && (rows.find((x) => x.name === r.name) === r || lately(r));
3188
+ await Promise.all(names.map(async (name) => {
3189
+ const first = { name, out: null, keep: null, branch: '', target: '', picked: false, check: null, sent: null };
3190
+ rows.push(first);
3191
+ await look(first); read++;
3192
+ first.movedAt = (first.out?.agentBranches ?? []).find((b) => b.name === first.branch)?.movedAt ?? null;
3193
+ first.picked = kindOfRow(first.out) === 'update';
3194
+ const others = (first.out?.agentBranches ?? []).filter((b) => b.name !== first.branch).slice(0, BRANCHES_MORE);
3195
+ planned += others.length;
3196
+ paint();
3197
+ await Promise.all(others.map(async (b) => {
3198
+ const r = { name, out: null, keep: first.keep, branch: b.name, target: '', picked: false, check: null, sent: null, movedAt: b.movedAt };
3199
+ await look(r); read++;
3200
+ if (r.out?.state === 'ahead') { r.picked = kindOfRow(r.out) === 'update' && lately(r); rows.splice(rows.findLastIndex((x) => x.name === name) + 1, 0, r); }
3201
+ paint();
3202
+ }));
3203
+ }));
3204
+ reading = false;
3160
3205
  paint();
3161
- for (const r of rows) if (r.picked) void checkRow(r, r.out.head, r.out.target);
3162
3206
  }
3163
3207
  /* The files of a folder or a mailbox, in a conversation: the Files sheet, moved into the detail. */
3164
3208
  let filesHome = null;
package/web/style.css CHANGED
@@ -111,7 +111,16 @@ footer button.wide { flex: 1 0 auto; background: var(--brass); border-color: var
111
111
  }
112
112
  @media (min-width: 701px) { #back { display: none; } }
113
113
  /* The list folded away with one click, on a wide screen: the terminal takes the room. */
114
- @media (min-width: 701px) { #app[data-list="folded"] #list, #app[data-list="folded"] #nav { display: none; } #app[data-list="folded"] #room { grid-column: 1 / -1; } }
114
+ /* The list folded away (wide screens): it slides out, the room widening with it -- and back. */
115
+ @media (min-width: 701px) {
116
+ #app[data-list="folded"] { grid-template-columns: 0px minmax(0, 1fr); }
117
+ #app :is(#list, #nav) { min-width: 0; overflow-x: hidden; }
118
+ #app[data-list="folded"] :is(#list, #nav) { visibility: hidden; transition: visibility 0s .22s; }
119
+ }
120
+ /* Only folding slides: a width set by hand (dragged, by the keys) follows at once. */
121
+ @media (min-width: 701px) and (prefers-reduced-motion: no-preference) {
122
+ #app[data-folding] { transition: grid-template-columns .22s ease; }
123
+ }
115
124
  @media (max-width: 700px) { #fold { display: none; } }
116
125
  #fold { font-size: 1rem; line-height: 1; padding: 4px 9px; }
117
126
  .chips { display: flex; gap: 5px; min-width: 0; overflow: hidden; }
@@ -1519,3 +1528,5 @@ details.more[open] > summary { margin-bottom: 4px; }
1519
1528
  :is(#updates, #wifi) > .callout { margin: 8px 16px; padding: 8px 12px; border-top: 0; }
1520
1529
  :is(#updates, #wifi) > .set-rows { padding: 0; }
1521
1530
  :is(#updates, #wifi) > .hint { padding-top: 8px; padding-bottom: 8px; }
1531
+ .ts-progress { margin: 10px 0 0; font-size: .875rem; }
1532
+ .ts-filters { margin-top: 10px; }