ai-agentmanager 1.70.2 → 1.72.0

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.72.0 (2026-11-25)
4
+
5
+ - **Try the other path.** Agents write down the paths they weighed, the one they take first. Each other path now has **Try this path** (or `agentmgr try-path <agent> <n>`). It starts a second agent from the same commit the first one started from, told to take that path and not the first, and races the two. You get the race scoreboard (outcome, checks, size, cost, time), a test command run in both, and keep the one you pick. More paths join the same race. Only you can start one, not an agent.
6
+ - **Why is this line here?** In Review changes, each added line has a **?** that shows the moment in the agent's conversation that wrote it: what it had been asked, what it said just before, the commands it had just run, and how many times it wrote that line. It is read from the agent's own transcripts and its subagents', so a line no edit wrote is said to be not found rather than guessed. Also `agentmgr why <agent> <file>:<line>`. Claude Code agents for now.
7
+ - **Scope fence.** An agent changing code outside what it was asked and planned shows under **To fix** in Glance and in its Results: "Drifting: changes src/payments (2 files, 65 lines), not in its task". The areas of code it changed are set against its intent, spec, plan and brief; tests, docs and config never count, nor does a line or two. **Allow** an area (in scope from then on), or **Pull it back** (it is told to stay within the task and undo those changes unless they are needed). No model is asked, and a task that names no area is not judged. Also `agentmgr fence <agent>`.
8
+ - **Bug echo.** When you accept a lesson in a repository's standards (such as the one proposed from an incident), every agent at work in that repository with changes is checked for the same mistake: a model reads its diff against the lesson. One that repeats it shows under **To fix** with where, and you **Tell it** or say **Not the same**. A diff is not checked twice against the same lesson.
9
+ - **Night watch.** For work merged in the last 14 days, the agent's recorded proof commands are run again against the latest main, in a checkout of their own (the agent's folder is left alone, its installed dependencies lent). One that no longer gives the recorded result shows under **To fix**, with the commits since its merge that changed the same files. Off until you turn it on: **Night watch** at the foot of Glance (on or off, the hour, Run now, and what it found), or `agentmgr night-watch --on` (every night at 3) and `--run` to run it now. Commands that change things are never run.
10
+ - **Your calibration.** When you start an agent you can guess, privately: whether it finishes, how long it takes, and how much reading its work will need. Once the work settles, **Your calibration** (in Glance, or `agentmgr calibration`) sets your guesses against what happened, says which kind of work you misjudge most, and how the agents' own confidence held up on the same work. It stays on this computer. Also `agentmgr guess <agent>`.
11
+ - **A message typed into an agent is sent, not left in its input box.** The box under the terminal sent the text and then Enter as two keystrokes. On a phone, where keystrokes go one request at a time and are joined while one is on its way, the two could arrive together as one paste, and Claude Code took the Enter as a line break inside it. The daemon now types the text and presses Enter itself. The longer the text, the longer it waits before pressing Enter. If the text is still in the input box a few seconds later and the agent is not working, it presses Enter again, at most twice. The same goes for messages from the assistant and the app, where an Enter could also be taken by a suggestion list (a message ending in `@name` or `/path`).
12
+
13
+ ## 1.71.0 (2026-11-24)
14
+
15
+ - **At a glance.** A new **Glance** button in the top bar, and `agentmgr glance`, show every agent on one line, grouped by what it needs from you: needs you now (a prompt, a question it stopped at, a sign-in, an error, stuck), to fix (failing checks, changes requested, a merge conflict, blocked, the same files as another agent), to review (with its Read first level, or a pull request ready to merge), to answer (questions it asked without stopping), working, follow up, tidy up, and idle. Each line says why, from what the app already knows. The badge counts what needs you now and what is to fix, and a click opens the agent. `--all` lists the idle ones too, `-o` writes Markdown, and the command exits with 1 when something needs you.
16
+
3
17
  ## 1.70.2 (2026-11-24)
4
18
 
5
19
  - **Split screen: two views that take the lead at once end up at one size.** 1.70.1 stopped sending a view the size it had just set. When two views took the lead at the same moment, each then followed the other's size, and both stayed shrunk. Every view is sent the size the session took again, so they all end up at the last one. A view still ignores a size it sent itself a moment ago, which was the fix for 1.70.1's problem.
package/README.md CHANGED
@@ -1465,6 +1465,42 @@ Agents started this way are marked **⚡ GitHub** or **⚡ webhook**, Slack aler
1465
1465
  }
1466
1466
  ```
1467
1467
 
1468
+ ## Try the other path
1469
+
1470
+ Agents write down the paths they weighed before building, the one they take first (**Paths it weighed** in their Results). Each other path has **Try this path**, or `agentmgr try-path <agent> <n>`. It starts a second agent from the commit the first one started from, told to take that path, and races the two: the [race](#races) scoreboard, a test command run in both, and **Pick** to keep one. More paths join the same race. Only you start one, not an agent.
1471
+
1472
+ ## Why is this line here?
1473
+
1474
+ In **Review changes**, each added line has a **?**. It shows the moment in the agent's conversation that wrote the line: what it had been asked, what it said just before, the commands it had just run, and how many times it wrote that line. `agentmgr why <agent> src/cart.js:42` prints the same, with the edit. It is read from the agent's own transcripts (and its subagents'), so a line no edit wrote is reported as not found rather than guessed. Claude Code agents for now.
1475
+
1476
+ ## Scope fence
1477
+
1478
+ An agent asked to fix login that starts rewriting payments is not stuck; it is wandering. The areas of code it changes (a folder such as `src/payments`) are set against what it was asked and planned: its intent, spec, plan and brief. An area none of them names, changed in more than a line or two, shows in Glance and its Results as drifting. Tests, docs and config never count. **Allow** puts an area in scope; **Pull it back** tells it to stay within the task. `agentmgr fence <agent> [--allow <area> | --pull]`. No model is asked.
1479
+
1480
+ ## Bug echo
1481
+
1482
+ Accepting a lesson in a repository's standards gives it to every later agent there. Bug echo also checks the agents already at work: a model reads each one's diff against the lesson, and one that repeats the mistake shows in Glance with where, to **Tell it** or mark **Not the same**. Off with `"echo": { "enabled": false }` in config.json.
1483
+
1484
+ ## Night watch
1485
+
1486
+ Does merged work still hold? For work merged in the last 14 days, the agent's recorded proof commands are run again against the latest main, in a checkout of their own. One that no longer gives the recorded result shows in Glance, with the commits since its merge that changed the same files. Off until you turn it on: **Night watch** at the foot of Glance (on or off, the hour, **Run now**, and what it found), or `agentmgr night-watch --on` (every night at 3, `--hour` to change) and `--run` to run it now. Commands that change things are never run.
1487
+
1488
+ ## Your calibration
1489
+
1490
+ Under **Your guess** in New agent (or `agentmgr guess <agent> --finish yes --hours 2 --review look`), say whether it will finish, how long it will take, and how much reading its work will need. Once the work settles, **Your calibration** (at the foot of Glance, or `agentmgr calibration`) sets your guesses against what happened, names the kind of work you misjudge most, and shows how the agents' own confidence held up on the same work. Private to this computer.
1491
+
1492
+ ## At a glance: every agent, and what to act on
1493
+
1494
+ **Glance** in the top bar, or `agentmgr glance`, puts every agent on one line, grouped by what it needs from you:
1495
+
1496
+ - **Needs you now**: stopped at a prompt, stopped at a question, waiting for you to sign in, stopped with an error, or stuck.
1497
+ - **To fix**: its pull request has failing checks, requested changes or a merge conflict; it says it is blocked; or it changes the same files as another agent.
1498
+ - **To review**: finished work waiting for review, with its [Read first](#read-first-where-your-attention-goes) level, and pull requests ready to merge.
1499
+ - **To answer**: questions it asked without stopping, still unanswered (the Inbox).
1500
+ - **Working**, **Follow up** (quiet and not finished), **Tidy up** (done, but its session is still open) and **Idle**.
1501
+
1502
+ Each line says why, from what the app already knows; no model is asked. The badge on the button counts what needs you now and what is to fix. Click a line to open the agent. `agentmgr glance --all` lists the idle agents too, `-o glance.md` writes it as Markdown, and the command exits with 1 when something needs you now or is to fix.
1503
+
1468
1504
  ## Read first: where your attention goes
1469
1505
 
1470
1506
  You cannot read everything agents produce with the same care. **Read first** in the top bar, or `agentmgr read-first`, ranks finished work waiting for your review by how much it needs reading.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-agentmanager",
3
- "version": "1.70.2",
3
+ "version": "1.72.0",
4
4
  "description": "Run background coding agents (Claude Code, Codex) per intent, and keep track of them from a web UI, your phone or the CLI",
5
5
  "keywords": [
6
6
  "claude",
package/public/app.js CHANGED
@@ -62,6 +62,7 @@ import { autoNeedHtml, autonomyNeeds, autonomyRow, initAutonomy, needsPermission
62
62
  import { initProof, proofRows } from '/proof.js';
63
63
  import { initWeekly } from '/weekly.js';
64
64
  import { initReadFirst, readFirstRow } from '/readfirst.js';
65
+ import { initGlance } from '/glance.js';
65
66
  import { initUnderstand } from '/understand.js';
66
67
  import { kindHtml, optionsRows, parseKind, parsePaths, parseValue, pathsHtml, privateRow, valueHtml } from '/valuelens.js';
67
68
 
@@ -227,6 +228,7 @@ initWorklog({ api, esc, toast, $ });
227
228
  initWeekly({ api, esc, toast, $, md: (t) => md(t) });
228
229
  const understandUi = initUnderstand({ $, esc, api, toast: (m, ms) => toast(m, ms), openChanges: (id) => (showTab('agents'), select(id), reviewUi.open(id)), agentOf: (id) => agents.get(id) });
229
230
  const readFirstUi = initReadFirst({ $, esc, ago: (t) => ago(t), agents, openAgent: (id) => (showTab('agents'), select(id)), openChanges: (id) => (showTab('agents'), select(id), reviewUi.open(id)), projectOf: (a) => a.projectInfo?.name ?? null, api, toast: (m, ms) => toast(m, ms), understand: (id) => understandUi.open(id) });
231
+ const glanceUi = initGlance({ $, esc, ago: (t) => ago(t), agents, openAgent: (id) => (showTab('agents'), select(id)), readFirst: () => readFirstUi.open(), api });
230
232
  initSetup({ api, esc, $ });
231
233
  const updateUi = initUpdate({ api, esc, toast, $ });
232
234
  initMenu({ api, esc, toast, $ });
@@ -1123,8 +1125,10 @@ function resultsCard(a) {
1123
1125
  ${r.confidence ? `<p class="own-conf"><span class="tag conf-${esc(r.confidence.level)}" title="The agent's own confidence in what it built, as it wrote it in its brief. The review scorecard is the separate check.">Its own confidence: ${r.confidence.percent}%</span> ${esc(r.confidence.why)}</p>` : r.fromAgent && ['done', 'partial'].includes(r.outcome) ? '<p class="hint own-conf">The agent has not said how confident it is in this.</p>' : ''}
1124
1126
  ${r.blockers.length ? `<ul class="blockers">${r.blockers.map((x) => item(x, 'blocker')).join('')}</ul>` : ''}
1125
1127
  ${readFirstRow(a, esc)}
1128
+ ${fenceRow(a)}
1129
+ ${echoRow(a)}
1126
1130
  ${privateRow(a, esc)}
1127
- ${optionsRows(a, esc)}
1131
+ ${optionsRows(a, esc, pathTries(a))}
1128
1132
  ${proofRows(a, esc)}
1129
1133
  ${r.delivered.length ? `<ul class="delivered">${r.delivered.map((x) => item(x, 'delivered')).join('')}</ul>` : '<p class="hint">Nothing delivered yet.</p>'}
1130
1134
  ${r.notes ? `<div class="md">${md(r.notes)}</div>` : ''}
@@ -2444,6 +2448,39 @@ function raceBanner(a) {
2444
2448
  <span class="spacer"></span><button class="small primary" data-race-open="${a.raceId}">Compare</button></div>`;
2445
2449
  }
2446
2450
 
2451
+ /** In its Results: a lesson of the repository its changes look like they repeat (echo.js). */
2452
+ function echoRow(a) {
2453
+ const open = Object.entries(a.echoes ?? {}).filter(([, e]) => e.repeats && e.state === 'open');
2454
+ if (!open.length) return '';
2455
+ return `<div class="fence-row echo-row"><b>Repeats a past mistake?</b> <span class="hint">A lesson of this repository, learned from a change that went wrong; a model read its changes against it.</span>
2456
+ <ul>${open.map(([id, e]) => `<li><span>${esc(e.lesson)}</span>${e.where ? ` <code>${esc(e.where)}</code>` : ''}${e.why ? `<div class="hint">${esc(e.why)}</div>` : ''}
2457
+ <button class="small" data-act="echo-tell" data-lesson="${esc(id)}" title="Send it the lesson and where it looks repeated">Tell it</button> <button class="small ghost" data-act="echo-dismiss" data-lesson="${esc(id)}">Not the same</button></li>`).join('')}</ul></div>`;
2458
+ }
2459
+
2460
+ /** In its Results: changing code outside its task (fence.js), with Allow and Pull it back. */
2461
+ function fenceRow(a) {
2462
+ const drift = a.fence?.drift ?? [];
2463
+ if (!drift.length) return '';
2464
+ return `<div class="fence-row"><b>Outside its task</b> <span class="hint">It changes code that what it was asked and planned does not name.</span>
2465
+ <ul>${drift.map((d) => `<li><code>${esc(d.area)}</code> <span class="hint">${d.files.length} file${d.files.length === 1 ? '' : 's'}, ${d.lines} lines: ${esc(d.files.slice(0, 3).join(', '))}${d.files.length > 3 ? '…' : ''}</span> <button class="small" data-act="fence-allow" data-area="${esc(d.area)}" title="It belongs to the task: in scope from now on">Allow</button></li>`).join('')}</ul>
2466
+ <button class="small" data-act="fence-pull" title="Tell it to stay within the task and undo those changes unless they are needed">Pull it back</button></div>`;
2467
+ }
2468
+
2469
+ /**
2470
+ * Its other paths being tried ({ n: { id, name } }), for Try this path in its Results; null when
2471
+ * none can be tried here (no repository, in a race of another kind, or itself trying a path).
2472
+ */
2473
+ function pathTries(a) {
2474
+ const own = /^path-(\d+)$/.exec(a.variant?.label ?? '');
2475
+ if (a.kind !== 'task' || a.team || !(a.repo || a.workdir) || (a.raceId && !own) || (own && own[1] !== '1')) return null;
2476
+ const tries = {};
2477
+ for (const o of agents.values()) {
2478
+ const m = o.id !== a.id && a.raceId && o.raceId === a.raceId && /^path-(\d+)$/.exec(o.variant?.label ?? '');
2479
+ if (m) tries[m[1]] = { id: o.id, name: o.name };
2480
+ }
2481
+ return tries;
2482
+ }
2483
+
2447
2484
  function openRace(id) {
2448
2485
  openRaceId = id;
2449
2486
  raceDiff = null;
@@ -2808,6 +2845,7 @@ const VIEWS = {
2808
2845
  watch: () => watchUi?.render(),
2809
2846
  groups: () => groupsUi?.render(),
2810
2847
  standup: () => standupUi?.render(),
2848
+ glance: () => glanceUi?.render(),
2811
2849
  };
2812
2850
  const ALL_VIEWS = Object.keys(VIEWS);
2813
2851
 
@@ -4242,6 +4280,26 @@ $('#detail-body').addEventListener('click', async (e) => {
4242
4280
  });
4243
4281
  case 'readfirst-open':
4244
4282
  return readFirstUi.open(a.id);
4283
+ case 'try-path':
4284
+ return act(async () => {
4285
+ const race = await api('POST', `/agents/${a.id}/try-path`, { path: Number(btn.dataset.path) });
4286
+ toast(`${race.rows.at(-1)?.name ?? 'An agent'} takes path ${btn.dataset.path}: compare them in the race`);
4287
+ openRace(race.id);
4288
+ });
4289
+ case 'echo-tell':
4290
+ case 'echo-dismiss':
4291
+ return act(async () => {
4292
+ upsert(await api('POST', `/agents/${a.id}/echo`, { lesson: btn.dataset.lesson, act: btn.dataset.act === 'echo-tell' ? 'tell' : 'dismiss' }));
4293
+ toast(btn.dataset.act === 'echo-tell' ? 'Told: it checks and fixes it' : 'Marked as not the same');
4294
+ });
4295
+ case 'fence-allow':
4296
+ case 'fence-pull':
4297
+ return act(async () => {
4298
+ upsert(await api('POST', `/agents/${a.id}/fence`, btn.dataset.act === 'fence-allow' ? { allow: btn.dataset.area } : { pull: true }));
4299
+ toast(btn.dataset.act === 'fence-allow' ? `${btn.dataset.area} is in scope for it now` : 'Told to stay within its task');
4300
+ });
4301
+ case 'try-path-open':
4302
+ return select(btn.dataset.agent);
4245
4303
  case 'proof-open':
4246
4304
  return proofUi.open(a.id);
4247
4305
  case 'auto-open':
@@ -4663,6 +4721,7 @@ $('#new-form').addEventListener('submit', async (e) => {
4663
4721
  autonomy: f.get('autonomy') || undefined,
4664
4722
  designDoc: Boolean(f.get('designDoc')),
4665
4723
  start: Boolean(f.get('start')),
4724
+ guess: f.get('guessFinish') || f.get('guessHours') || f.get('guessReview') ? { finish: f.get('guessFinish') || undefined, hours: f.get('guessHours') || undefined, review: f.get('guessReview') || undefined } : undefined,
4666
4725
  ...containerChoice(e.target),
4667
4726
  });
4668
4727
  created.forEach((a) => agents.set(a.id, a));
@@ -4895,7 +4954,7 @@ function handleEvent(msg) {
4895
4954
  if (msg.agent.hunting) bugsUi.changed();
4896
4955
  // The detail, terminal and document views show one agent; another agent's update leaves them be.
4897
4956
  return invalidate([
4898
- 'list', 'backlog', 'land', 'inbox', 'race', 'team',
4957
+ 'list', 'backlog', 'land', 'inbox', 'race', 'team', 'glance',
4899
4958
  ...(watchUi.isOpen() ? ['watch'] : []),
4900
4959
  ...(groupsUi?.count() ? ['groups'] : []),
4901
4960
  ...(standupUi.isOpen() ? ['standup'] : []),
@@ -4993,11 +5052,16 @@ $('#compose').addEventListener('submit', (e) => {
4993
5052
  const box = $('#compose-text');
4994
5053
  const text = box.value;
4995
5054
  if (!text.trim()) return;
4996
- term.send({ t: 'i', d: text });
4997
- // Enter separately, so Claude reads the text as typed input and then submits it.
4998
- setTimeout(() => term.send({ t: 'i', d: '\r' }), 150);
5055
+ if (!term.agentId) return;
5056
+ // The daemon types it and presses Enter once the program has taken it in, and again if it is
5057
+ // still in the input box (manager.typeIn): sent from here as two keystrokes, the Enter could
5058
+ // arrive too early and a long message stayed unsent.
4999
5059
  box.value = '';
5000
5060
  box.style.height = '';
5061
+ api('POST', `/agents/${term.agentId}/term/send`, { text, kind: term.kind }).catch((err) => {
5062
+ box.value ||= text;
5063
+ toast(`Not sent: ${err.message}`, 6000);
5064
+ });
5001
5065
  });
5002
5066
  $('#compose-text').addEventListener('keydown', (e) => {
5003
5067
  if (e.key === 'Enter' && !e.shiftKey && !e.isComposing) {
@@ -0,0 +1,241 @@
1
+ // At a glance (top bar): every agent on one line, in groups by what it needs from you: act now,
2
+ // fix, review, answer, working, follow up, tidy up, and idle. Each line says why, from what the app
3
+ // already knows (prompts, questions, stuck findings, pull requests, the Read first ranking,
4
+ // follow-up reminders), so nothing here is a model's guess. The daemon uses the same functions
5
+ // for `agentmgr glance` and /glance.
6
+
7
+ export const GROUPS = {
8
+ act: { label: 'Needs you now', act: 'Answer it' },
9
+ fix: { label: 'To fix', act: 'Look at it' },
10
+ review: { label: 'To review', act: 'Review it' },
11
+ answer: { label: 'To answer', act: 'Answer' },
12
+ working: { label: 'Working', act: null },
13
+ follow: { label: 'Follow up', act: 'Follow up' },
14
+ tidy: { label: 'Tidy up', act: 'Close its session' },
15
+ quiet: { label: 'Idle', act: null },
16
+ };
17
+ const ORDER = Object.keys(GROUPS);
18
+ const LEVEL = { close: 'Read closely', look: 'Look', skim: 'Skim' };
19
+ const plural = (n, one, many = `${one}s`) => `${n} ${n === 1 ? one : many}`;
20
+ const clip = (s, n = 140) => {
21
+ const t = String(s ?? '').replace(/\s+/g, ' ').trim();
22
+ return t.length > n ? `${t.slice(0, n - 1)}…` : t;
23
+ };
24
+ const prNo = (p) => (p.number ? `#${p.number}` : `#${String(p.url ?? '').split('/').pop()}`);
25
+
26
+ /** Why an open pull request needs fixing, in words. */
27
+ function fixWhy(p) {
28
+ const why = [];
29
+ if (p.checks?.state === 'failed') why.push('checks failing');
30
+ if (p.review === 'CHANGES_REQUESTED') why.push('changes requested');
31
+ if (p.mergeable === 'CONFLICTING' || p.mergeState === 'DIRTY') why.push('merge conflict');
32
+ return why.join(', ') || 'needs fixes';
33
+ }
34
+
35
+ /**
36
+ * One agent's line: { group, why: [reasons, the first is the headline], since }. `a` is the
37
+ * agent's view (manager.view): runtime, prs, readFirst, followUp, stuck, questions and so on.
38
+ */
39
+ export function glanceOf(a) {
40
+ const rt = a.runtime ?? {};
41
+ const prs = (Array.isArray(a.prs) ? a.prs : Object.values(a.prs ?? {})).filter((p) => p.source !== 'mentioned');
42
+ const open = prs.filter((p) => p.state === 'OPEN');
43
+ const outcome = a.results?.outcome ?? a.brief?.results?.outcome ?? null;
44
+ const out = { act: [], fix: [], review: [], answer: [], working: [], follow: [], tidy: [] };
45
+
46
+ // Needs you now: it is waiting on you.
47
+ if (rt.attention) out.act.push(`Stopped at a ${String(rt.attention).toLowerCase()}`);
48
+ if (rt.waiting) out.act.push(rt.waiting.state === 'error' ? `Shows an error: ${clip(rt.waiting.summary)}` : `Asks: ${clip(rt.waiting.question || rt.waiting.summary)}`);
49
+ if (a.signIn) out.act.push('Waiting for you to sign in');
50
+ if (a.status === 'error') out.act.push(`Stopped with an error${a.error ? `: ${clip(a.error)}` : ''}`);
51
+ for (const s of a.stuck ?? []) out.act.push(`Looks stuck: ${clip(s.title, 100)}`);
52
+
53
+ // To fix: its work is held up.
54
+ for (const p of open.filter((p) => p.land === 'fix' || fixWhy(p) !== 'needs fixes')) out.fix.push(`Pull request ${prNo(p)}: ${fixWhy(p)}`);
55
+ if (outcome === 'blocked') out.fix.push(`Blocked${a.results?.blockers?.[0]?.text ? `: ${clip(a.results.blockers[0].text)}` : ''}`);
56
+ for (const c of a.conflicts ?? []) out.fix.push(`Changes the same files as ${c.agent?.name ?? 'another agent'}`);
57
+ // Merged, and its recorded checks no longer pass on the latest main (nightwatch.js).
58
+ if (a.nightWatch?.status === 'broken') out.fix.push(`No longer holds on main: ${clip(a.nightWatch.broken.join('; '), 100)}${a.nightWatch.suspects?.[0] ? ` (since ${clip(`${a.nightWatch.suspects[0].sha} ${a.nightWatch.suspects[0].subject}`, 80)})` : ''}`);
59
+ // Repeats a mistake a lesson of the repository was learned from (echo.js).
60
+ for (const e of Object.values(a.echoes ?? {}).filter((e) => e.repeats && e.state === 'open')) out.fix.push(`Repeats a past mistake: ${clip(e.lesson, 100)}${e.where ? ` (at ${e.where})` : ''}`);
61
+ // Changing code outside what it was asked and planned (fence.js).
62
+ for (const d of a.fence?.drift ?? []) out.fix.push(`Drifting: changes ${d.area} (${plural(d.files.length, 'file')}, ${plural(d.lines, 'line')}), not in its task`);
63
+
64
+ // To review: finished, or a pull request ready to merge.
65
+ if (a.readFirst) out.review.push(`${LEVEL[a.readFirst.level]}${a.readFirst.reasons?.[0] ? `: ${clip(a.readFirst.reasons[0].text, 120)}` : ''}`);
66
+ for (const p of open.filter((p) => p.land === 'ready')) out.review.push(`Pull request ${prNo(p)} is ready to merge`);
67
+
68
+ // To answer: questions it asked without stopping (the Inbox), still unanswered.
69
+ const asked = (a.questions ?? []).filter((q) => !q.answer);
70
+ if (asked.length) out.answer.push(`${plural(asked.length, 'question')} it asked without stopping: ${clip(asked[0].question, 100)}`);
71
+
72
+ // Working.
73
+ if (rt.planning) out.working.push('Planning');
74
+ else if (rt.busy) out.working.push('Working');
75
+ if (rt.limited) out.working.push(`Paused at a usage limit${rt.limited.resetAt ? ' until it resets' : ''}`);
76
+ if (a.status === 'preparing') out.working.push('Getting ready');
77
+
78
+ // Follow up, or tidy up (reminders.js).
79
+ if (a.followUp?.kind === 'followup') out.follow.push(a.followUp.title + (a.followUp.detail ? ` (${clip(a.followUp.detail, 100)})` : ''));
80
+ if (a.followUp?.kind === 'close') out.tidy.push(a.followUp.title);
81
+
82
+ const group = ORDER.find((g) => out[g]?.length) ?? 'quiet';
83
+ const why = group === 'quiet' ? [quietWhy(a, prs, outcome)] : [...out[group], ...ORDER.filter((g) => g !== group && g !== 'working').flatMap((g) => out[g] ?? [])];
84
+ return { group, why: [...new Set(why)], since: a.activeAt ?? a.createdAt ?? null };
85
+ }
86
+
87
+ function quietWhy(a, prs, outcome) {
88
+ const merged = prs.filter((p) => p.state === 'MERGED');
89
+ if (merged.length) return `Pull request ${prNo(merged[0])} merged`;
90
+ if (outcome === 'done') return 'Done';
91
+ if (outcome === 'partial') return 'Partly done';
92
+ if (a.runtime?.running) return 'Open, nothing happening';
93
+ return a.status === 'exited' ? 'Its session ended' : 'Stopped';
94
+ }
95
+
96
+ /**
97
+ * Every agent's line, grouped and in order: what needs you first, then by priority and the most
98
+ * recently active. Returns { items, counts, total }.
99
+ */
100
+ export function glance(agents) {
101
+ const items = [...agents]
102
+ .filter((a) => a && a.kind !== 'general')
103
+ .map((a) => ({ id: a.id, name: a.name, kind: a.kind, project: a.projectInfo?.name ?? null, title: clip(String(a.intent ?? '').split('\n')[0], 120), priority: a.priority ?? 2, running: Boolean(a.runtime?.running), ...glanceOf(a) }))
104
+ .sort((x, y) => ORDER.indexOf(x.group) - ORDER.indexOf(y.group) || x.priority - y.priority || String(y.since).localeCompare(String(x.since)));
105
+ const counts = Object.fromEntries(ORDER.map((g) => [g, items.filter((i) => i.group === g).length]));
106
+ return { items, counts, total: items.length };
107
+ }
108
+
109
+ /** One sentence for the whole fleet: "14 agents: 2 need you now, 1 to fix, …". */
110
+ export function glanceLine({ counts, total }) {
111
+ if (!total) return 'No agents yet.';
112
+ const parts = [
113
+ counts.act && `${counts.act} ${counts.act === 1 ? 'needs' : 'need'} you now`,
114
+ counts.fix && `${counts.fix} to fix`,
115
+ counts.review && `${counts.review} to review`,
116
+ counts.answer && `${counts.answer} with questions to answer`,
117
+ counts.working && `${counts.working} working`,
118
+ counts.follow && `${counts.follow} to follow up`,
119
+ counts.tidy && `${counts.tidy} to tidy up`,
120
+ counts.quiet && `${counts.quiet} idle`,
121
+ ].filter(Boolean);
122
+ return `${plural(total, 'agent')}: ${parts.join(', ')}.`;
123
+ }
124
+
125
+ export function glanceMarkdown(g, { all = false } = {}) {
126
+ const out = ['# At a glance', '', glanceLine(g), ''];
127
+ for (const key of ORDER) {
128
+ const list = g.items.filter((i) => i.group === key);
129
+ if (!list.length || (key === 'quiet' && !all)) continue;
130
+ out.push(`## ${GROUPS[key].label} (${list.length})`, '');
131
+ for (const i of list) out.push(`- **${i.name}**${i.project ? ` · ${i.project}` : ''}: ${i.why.join('; ')}`);
132
+ out.push('');
133
+ }
134
+ if (!all && g.counts.quiet) out.push(`${plural(g.counts.quiet, 'idle agent')} not listed.`);
135
+ return out.join('\n').trimEnd();
136
+ }
137
+
138
+ /** Your calibration (calibration.js), in the Glance dialog. */
139
+ export function calibrationHtml(c, esc) {
140
+ const word = { skim: 'skim', look: 'look', close: 'read closely', yes: 'yes', no: 'no' };
141
+ const cell = (g, a, unit = '') => (g == null ? '–' : `${esc(word[g] ?? `${g}${unit}`)} → ${a == null ? '?' : esc(word[a] ?? `${a}${unit}`)}`);
142
+ return `<p><button class="link" data-gl-back>‹ Back to the glance</button></p>
143
+ <h3>Your calibration</h3>
144
+ <ul class="cal-lines">${c.lines.map((l) => `<li>${esc(l)}</li>`).join('')}</ul>
145
+ ${c.rows.length ? `<table class="cal-table"><tr><th>Agent</th><th>Finishes</th><th>Hours</th><th>Reading</th></tr>${c.rows.map((r) => `<tr><td>${esc(r.name)}</td><td>${cell(r.guess.finish, r.actual.finish)}</td><td>${cell(r.guess.hours, r.actual.hours, 'h')}</td><td>${cell(r.guess.review, r.actual.review)}</td></tr>`).join('')}</table>` : ''}
146
+ <p class="hint">Your guesses stay on this computer. Guess when you start an agent: New agent, Your guess.</p>`;
147
+ }
148
+
149
+ /** Night watch (nightwatch.js), in the Glance dialog: on or off, its hour, Run now, and what it found. */
150
+ export function nightHtml(v, esc, ago) {
151
+ const st = { broken: 'No longer holds', holds: 'Holds', skipped: 'Not checked' };
152
+ const hours = Array.from({ length: 24 }, (_, h) => `<option value="${h}"${h === v.settings.hour ? ' selected' : ''}>${String(h).padStart(2, '0')}:00</option>`).join('');
153
+ return `<p><button class="link" data-gl-back>‹ Back to the glance</button></p>
154
+ <h3>Night watch</h3>
155
+ <p class="hint">Merged work of the last ${v.settings.days} days: the agent's recorded checks run again against the latest main, in a checkout of their own. Commands that change things are never run.</p>
156
+ <div class="row nw-controls">
157
+ <label class="check"><input type="checkbox" data-nw="enabled"${v.settings.enabled ? ' checked' : ''} /> Every night at</label>
158
+ <select data-nw="hour" aria-label="The hour it runs at">${hours}</select>
159
+ <button class="small" data-nw="run"${v.running ? ' disabled' : ''}>${v.running ? 'Running…' : 'Run now'}</button>
160
+ </div>
161
+ <p class="hint">${v.lastRunAt ? `Last run ${esc(ago(v.lastRunAt))}: ${v.broken} of ${v.runs.length} no longer hold on main.` : 'Not run yet.'}</p>
162
+ ${v.runs.length ? `<ul class="gl-list">${v.runs.map((r) => `<li class="gl-item ${r.status === 'broken' ? 'gl-fix' : r.status === 'holds' ? 'gl-working' : ''}"${r.agentId ? ` data-gl-agent="${esc(r.agentId)}" tabindex="0"` : ''}>
163
+ <div class="gl-head"><b>${st[r.status] ?? esc(r.status)}</b> <span class="hint">${r.number ? `#${r.number} ` : ''}${esc(r.title ?? r.url)}</span></div>
164
+ ${r.why ? `<div class="gl-why hint">${esc(r.why)}</div>` : ''}
165
+ ${(r.results ?? []).filter((x) => x.status === 'differs').map((x) => `<div class="gl-why">${esc(x.title)} <code>${esc(x.command)}</code> exit ${x.code}</div>`).join('')}
166
+ ${r.suspects?.length ? `<div class="gl-more hint">Changed the same files since: ${r.suspects.slice(0, 3).map((x) => esc(`${x.sha} ${x.subject}`)).join(' · ')}</div>` : ''}
167
+ </li>`).join('')}</ul>` : ''}`;
168
+ }
169
+
170
+ export function initGlance({ $, esc, ago, agents, openAgent, readFirst, api }) {
171
+ const dlg = $('#glance-dialog');
172
+ let showIdle = false;
173
+ let aside = null; // 'calibration' or 'night' showing instead of the glance: live updates leave it be
174
+
175
+ function render() {
176
+ const g = glance(agents.values());
177
+ const n = g.counts.act + g.counts.fix;
178
+ const badge = $('#glance-count');
179
+ badge.textContent = n || '';
180
+ badge.title = n ? `${g.counts.act} need you now, ${g.counts.fix} to fix` : '';
181
+ if (!dlg.open || aside) return;
182
+ const row = (i) => `<li class="gl-item gl-${i.group}" data-gl-agent="${esc(i.id)}" tabindex="0">
183
+ <div class="gl-head"><b>${esc(i.name)}</b> <span class="hint">${esc(i.project ?? '')}${i.since ? ` · ${ago(i.since)}` : ''}${i.running ? ' · open' : ''}</span></div>
184
+ <div class="gl-why">${esc(i.why[0])}</div>
185
+ ${i.why.length > 1 ? `<div class="gl-more hint">${esc(i.why.slice(1, 3).join(' · '))}${i.why.length > 3 ? ` · and ${i.why.length - 3} more` : ''}</div>` : ''}
186
+ ${i.title && i.title !== i.name ? `<div class="gl-title hint">${esc(i.title)}</div>` : ''}
187
+ </li>`;
188
+ const section = (key) => {
189
+ const list = g.items.filter((i) => i.group === key);
190
+ if (!list.length) return '';
191
+ if (key === 'quiet' && !showIdle) return `<p class="hint">${plural(list.length, 'idle agent')}. <button class="link" data-gl-idle>Show them</button></p>`;
192
+ return `<section class="gl-group"><h3>${GROUPS[key].label} <span class="badge">${list.length}</span>${key === 'review' ? ' <button class="link" data-gl-readfirst>Read first</button>' : ''}</h3><ul class="gl-list">${list.map(row).join('')}</ul></section>`;
193
+ };
194
+ $('#glance-body').innerHTML = `<p class="gl-line">${esc(glanceLine(g))}</p>${g.total ? ORDER.map(section).join('') : ''}${g.counts.act + g.counts.fix + g.counts.review + g.counts.answer + g.counts.follow + g.counts.tidy === 0 && g.total ? '<p class="hint">Nothing to act on.</p>' : ''}`;
195
+ }
196
+
197
+ function open() {
198
+ aside = null;
199
+ if (!dlg.open) dlg.showModal();
200
+ render();
201
+ }
202
+ $('#glance-btn').onclick = () => open();
203
+ dlg.addEventListener('click', async (e) => {
204
+ if (e.target.closest('[data-gl="close"]')) return dlg.close();
205
+ if (e.target.closest('[data-gl="calibration"]')) return show('calibration');
206
+ if (e.target.closest('[data-gl="night"]')) return show('night');
207
+ if (e.target.closest('[data-nw="run"]')) {
208
+ e.target.disabled = true;
209
+ e.target.textContent = 'Running…';
210
+ return show('night', () => api('POST', '/night-watch/run', {}));
211
+ }
212
+ if (e.target.closest('[data-gl-back]')) return ((aside = null), render());
213
+ if (e.target.closest('[data-gl-idle]')) return ((showIdle = true), render());
214
+ if (e.target.closest('[data-gl-readfirst]')) return (dlg.close(), readFirst());
215
+ const it = e.target.closest('[data-gl-agent]');
216
+ if (it) return (dlg.close(), openAgent(it.dataset.glAgent));
217
+ });
218
+ // Night watch settings: saved as they change.
219
+ dlg.addEventListener('change', (e) => {
220
+ const k = e.target.dataset?.nw;
221
+ if (k === 'enabled' || k === 'hour') show('night', () => api('PUT', '/night-watch', k === 'enabled' ? { enabled: e.target.checked } : { hour: Number(e.target.value) }));
222
+ });
223
+
224
+ /** Calibration or night watch in place of the glance; `first`: a change to make before showing it. */
225
+ async function show(what, first = null) {
226
+ aside = what;
227
+ if (!first) $('#glance-body').innerHTML = `<p class="hint">${what === 'night' ? 'Reading the night watch…' : 'Reading your guesses…'}</p>`;
228
+ try {
229
+ const v = (await first?.()) ?? (await api('GET', what === 'night' ? '/night-watch' : '/calibration'));
230
+ if (aside === what) $('#glance-body').innerHTML = what === 'night' ? nightHtml(v, esc, ago) : calibrationHtml(v, esc);
231
+ } catch (err) {
232
+ if (aside === what) $('#glance-body').innerHTML = `<p><button class="link" data-gl-back>‹ Back to the glance</button></p><p class="error">${esc(err.message)}</p>`;
233
+ }
234
+ }
235
+
236
+ dlg.addEventListener('keydown', (e) => {
237
+ const it = e.target.closest?.('[data-gl-agent]');
238
+ if (it && e.key === 'Enter') (dlg.close(), openAgent(it.dataset.glAgent));
239
+ });
240
+ return { open, render, isOpen: () => dlg.open };
241
+ }
package/public/index.html CHANGED
@@ -33,6 +33,7 @@
33
33
  <button id="go-btn" class="go-btn" title="Go to: find a view, an agent or a setting by name (Ctrl+K or ⌘K)" aria-label="Go to a view, an agent or a setting">⌕ Go to</button>
34
34
  <nav class="top-nav" id="top-nav" aria-label="Views">
35
35
  <button id="today-btn" title="Today: what needs you, from every list, most pressing first, and why (y)">Today <span id="today-count" class="badge ready"></span></button>
36
+ <button id="glance-btn" title="At a glance: every agent on one line, grouped by what it needs from you (act now, fix, review, working, follow up, tidy up, idle), and why">Glance <span id="glance-count" class="badge"></span></button>
36
37
  <button id="readfirst-btn" title="Read first: finished work waiting for your review, the pieces that need reading most first, and why">Read first <span id="readfirst-count" class="badge"></span></button>
37
38
  <button id="assistant-btn" title="An always-on session that finds new work and starts agents for it">Assistant <span id="assistant-dot" class="assistant-dot" hidden></span></button>
38
39
  <button id="spend-btn" title="Results across agents (merge rate, time to PR, cost per merged PR), what they cost, and spending limits">Results <span id="spend-today" class="spend-today"></span></button>
@@ -367,6 +368,20 @@
367
368
  </select>
368
369
  </label>
369
370
  </div>
371
+ <details class="guess-row">
372
+ <summary>Your guess <span class="hint">(private: set against what happens, in Your calibration)</span></summary>
373
+ <div class="row">
374
+ <label class="check">Finishes?
375
+ <select name="guessFinish"><option value="">–</option><option value="yes">Yes</option><option value="no">No</option></select>
376
+ </label>
377
+ <label class="check">Takes
378
+ <select name="guessHours"><option value="">–</option><option value="0.5">under an hour</option><option value="2">a few hours</option><option value="8">a day</option><option value="24">longer</option></select>
379
+ </label>
380
+ <label class="check">Reading it needs
381
+ <select name="guessReview"><option value="">–</option><option value="skim">skim</option><option value="look">look</option><option value="close">read closely</option></select>
382
+ </label>
383
+ </div>
384
+ </details>
370
385
  <div class="race-only" hidden>
371
386
  <label>
372
387
  Variants <span class="hint">one per line: <code>model</code>, <code>model | approach</code>, or <code>| approach</code>. At least two.</span>
@@ -460,6 +475,11 @@
460
475
  <div class="dialog-actions"><button type="button" class="small" data-us="make" title="Write new questions from its changes as they are now">New questions</button><button type="button" class="small" data-us="changes">Review changes</button><span class="spacer"></span><button type="button" class="small primary" data-us="close">Close</button></div>
461
476
  </dialog>
462
477
 
478
+ <dialog id="glance-dialog" class="update-dialog readfirst-dialog" aria-label="At a glance">
479
+ <h2>At a glance</h2>
480
+ <div id="glance-body"></div>
481
+ <div class="dialog-actions"><button type="button" class="small" data-gl="calibration" title="Your guesses when you started agents, against what happened">Your calibration</button><button type="button" class="small" data-gl="night" title="Does merged work still hold on the latest main? Its recorded checks, run again">Night watch</button><span class="spacer"></span><button type="button" class="small primary" data-gl="close">Close</button></div>
482
+ </dialog>
463
483
  <dialog id="readfirst-dialog" class="update-dialog readfirst-dialog" aria-label="Read first">
464
484
  <h2>Read first</h2>
465
485
  <div id="readfirst-body"></div>
package/public/review.js CHANGED
@@ -60,7 +60,7 @@ const BIG = 600; // files with more changed lines start collapsed
60
60
  export function initReview({ api, esc, toast, agents, $ }) {
61
61
  const dlg = $('#review-dialog');
62
62
  const body = $('#review-body');
63
- const st = { id: null, data: null, files: [], comments: [], collapsed: new Set(), editing: null, loading: false, step: null };
63
+ const st = { id: null, data: null, files: [], comments: [], collapsed: new Set(), editing: null, loading: false, step: null, why: null };
64
64
  const walk = () => walkthroughOf(agents.get(st.id), st.data?.diffHash);
65
65
 
66
66
  const key = (id) => `agentmgr.review.${id}`;
@@ -145,8 +145,9 @@ export function initReview({ api, esc, toast, agents, $ }) {
145
145
  const line = side === 'old' ? l.old : l.new;
146
146
  const k = lineKey(f.path, side, line);
147
147
  rows.push(`<tr class="rv-${l.t}" data-rv-line="${esc(k)}">
148
- <td class="rv-no">${l.old ?? ''}</td><td class="rv-no">${l.new ?? ''}<button type="button" class="rv-plus" title="Comment on this line">+</button></td>
148
+ <td class="rv-no">${l.old ?? ''}</td><td class="rv-no">${l.new ?? ''}<button type="button" class="rv-plus" title="Comment on this line">+</button>${l.t === 'add' && l.text.trim() ? '<button type="button" class="rv-why" title="Why is this line here? The moment in its conversation that wrote it">?</button>' : ''}</td>
149
149
  <td class="rv-code"><span class="rv-sign">${l.t === 'add' ? '+' : l.t === 'del' ? '−' : ' '}</span>${esc(l.text)}</td></tr>`);
150
+ if (st.why?.key === k) rows.push(`<tr class="rv-note rv-why-row"><td colspan="3">${whyHtml(st.why)}</td></tr>`);
150
151
  st.comments.forEach((c, i) => {
151
152
  if (c.file === f.path && c.side === side && c.line === line) {
152
153
  rows.push(`<tr class="rv-note"><td colspan="3">${st.editing?.index === i ? formHtml(c.text) : commentHtml(c, i)}</td></tr>`);
@@ -158,6 +159,23 @@ export function initReview({ api, esc, toast, agents, $ }) {
158
159
  return `<div class="rv-file" id="rv-${encodeURIComponent(f.path)}">${head}<table class="rv-table">${rows.join('')}</table></div>`;
159
160
  }
160
161
 
162
+ /** Why is this line here (blame.js): what it was asked, what it said, what it ran, and the edit. */
163
+ function whyHtml(w) {
164
+ const close = '<button type="button" class="link" data-rv-why-close>Close</button>';
165
+ if (w.loading) return '<p class="hint">Looking in its conversation…</p>';
166
+ if (w.error) return `<p class="error">${esc(w.error)}</p> ${close}`;
167
+ const b = w.data;
168
+ if (!b.found) return `<p class="hint">${esc(b.why)}</p> ${close}`;
169
+ const when = b.at ? new Date(b.at).toLocaleString() : '';
170
+ return `<div class="rv-why-body">
171
+ <p><b>Why is this line here?</b> <span class="hint">Written by ${esc(b.tool)}${when ? ` on ${esc(when)}` : ''}${b.times > 1 ? `, ${b.times} times in all` : ''}</span></p>
172
+ ${b.prompt ? `<p class="rv-why-label">What it was asked</p><blockquote>${esc(b.prompt)}</blockquote>` : ''}
173
+ ${b.said.length ? `<p class="rv-why-label">What it said just before</p>${b.said.map((x) => `<blockquote>${esc(x)}</blockquote>`).join('')}` : ''}
174
+ ${b.ran.length ? `<p class="rv-why-label">Commands it had just run</p><ul>${b.ran.map((c) => `<li><code>${esc(c)}</code></li>`).join('')}</ul>` : ''}
175
+ ${close}
176
+ </div>`;
177
+ }
178
+
161
179
  /** The review scorecard at the top: scores, verdict and where to look, or the button to score. */
162
180
  function scorePanel() {
163
181
  if (!st.data?.files.length) return '';
@@ -314,6 +332,26 @@ export function initReview({ api, esc, toast, agents, $ }) {
314
332
 
315
333
  body.addEventListener('click', async (e) => {
316
334
  const t = e.target;
335
+ if (t.closest('[data-rv-why-close]')) return keepInputs(), (st.why = null), render();
336
+ const why = t.closest('.rv-why');
337
+ if (why) {
338
+ const row = why.closest('[data-rv-line]');
339
+ const key = row.dataset.rvLine;
340
+ if (st.why?.key === key) return keepInputs(), (st.why = null), render();
341
+ const file = key.split('\t')[0];
342
+ const text = row.querySelector('.rv-code').textContent.slice(1);
343
+ keepInputs();
344
+ st.why = { key, loading: true };
345
+ render();
346
+ try {
347
+ const data = await api('GET', `/agents/${st.id}/why?${new URLSearchParams({ file, text })}`);
348
+ if (st.why?.key === key) st.why = { key, data };
349
+ } catch (err) {
350
+ if (st.why?.key === key) st.why = { key, error: err.message };
351
+ }
352
+ keepInputs();
353
+ return render();
354
+ }
317
355
  if (t.closest('[data-rv-reload]')) return keepInputs(), reload();
318
356
  const stepBtn = t.closest('[data-rv-step]');
319
357
  if (stepBtn) return step(Number(stepBtn.dataset.rvStep));
package/public/style.css CHANGED
@@ -390,6 +390,30 @@ body.term-max .term-agent, .term-wrap:fullscreen .term-agent { display: inline-b
390
390
  .kept-private-off { margin: 4px 0; }
391
391
  .readfirst-dialog { width: min(760px, calc(100vw - 24px)); }
392
392
  #readfirst-body { max-height: min(66vh, 680px); overflow: auto; }
393
+ #glance-body { max-height: min(70vh, 720px); overflow: auto; overflow-wrap: anywhere; }
394
+ .vl-try { margin-top: 4px; }
395
+ .fence-row { margin: 8px 0; padding: 6px 10px; border-left: 3px solid var(--yellow); background: var(--panel-2); border-radius: 4px; overflow-wrap: anywhere; }
396
+ .fence-row ul { margin: 4px 0; padding-left: 18px; }
397
+ .fence-row li { margin: 2px 0; }
398
+ .guess-row { margin: 6px 0; }
399
+ .nw-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
400
+ .guess-row summary { cursor: pointer; }
401
+ .cal-lines { padding-left: 18px; }
402
+ .cal-table { border-collapse: collapse; width: 100%; font-size: 13px; }
403
+ .cal-table th, .cal-table td { text-align: left; padding: 3px 6px; border-bottom: 1px solid var(--border); }
404
+ .gl-line { font-weight: 600; margin: 0 0 8px; }
405
+ .gl-group h3 { font-size: 14px; margin: 12px 0 4px; }
406
+ .gl-list { list-style: none; margin: 0; padding: 0; }
407
+ .gl-item { padding: 6px 8px; border-left: 3px solid var(--border); border-radius: 4px; cursor: pointer; }
408
+ .gl-item:hover, .gl-item:focus { background: var(--panel-2); outline: none; }
409
+ .gl-item + .gl-item { margin-top: 4px; }
410
+ .gl-act { border-left-color: var(--red); }
411
+ .gl-fix { border-left-color: var(--yellow); }
412
+ .gl-review { border-left-color: var(--accent); }
413
+ .gl-answer { border-left-color: var(--muted); }
414
+ .gl-working { border-left-color: var(--green); }
415
+ .gl-why { margin-top: 2px; }
416
+ .gl-more, .gl-title { font-size: 12px; }
393
417
  .rf-list { list-style: none; margin: 8px 0; padding: 0; }
394
418
  .rf-item { margin: 0 0 10px; padding: 10px 12px; border: 1px solid var(--border); border-left-width: 4px; border-radius: 8px; font-size: 13px; overflow-wrap: anywhere; }
395
419
  .rf-item.rf-close { border-left-color: var(--red); }
@@ -905,6 +929,14 @@ tr.rv-hunk td { color: var(--accent); background: color-mix(in srgb, var(--accen
905
929
  .rv-plus { display: none; position: absolute; left: 2px; top: 1px; padding: 0 5px; font-size: 11px; line-height: 16px; border-radius: 3px; background: var(--accent); color: var(--accent-text); border: 0; cursor: pointer; }
906
930
  tr[data-rv-line]:hover .rv-plus { display: inline-block; }
907
931
  @media (hover: none) { .rv-plus { display: inline-block; opacity: .6; } }
932
+ .rv-why { display: none; position: absolute; right: 2px; top: 1px; padding: 0 5px; font-size: 11px; line-height: 16px; border-radius: 3px; background: var(--panel-2); color: var(--text); border: 1px solid var(--border); cursor: pointer; }
933
+ tr[data-rv-line]:hover .rv-why { display: inline-block; }
934
+ @media (hover: none) { .rv-why { display: inline-block; opacity: .6; } }
935
+ .rv-why-body { padding: 6px 10px; font-family: inherit; white-space: normal; overflow-wrap: anywhere; }
936
+ .rv-why-body p { margin: 4px 0; }
937
+ .rv-why-label { font-size: 12px; color: var(--muted); margin-top: 8px !important; }
938
+ .rv-why-body blockquote { margin: 2px 0 6px; padding: 4px 8px; border-left: 3px solid var(--border); white-space: pre-wrap; max-height: 12em; overflow: auto; }
939
+ .rv-why-body ul { margin: 2px 0 6px; padding-left: 18px; }
908
940
  tr.rv-note td { padding: 6px 10px; background: var(--panel); font-family: inherit; }
909
941
  .rv-comment { display: flex; gap: 8px; align-items: flex-start; border-left: 3px solid var(--accent); padding: 4px 8px; background: var(--panel-2); border-radius: 4px; font: 13px/1.45 system-ui, sans-serif; }
910
942
  .rv-comment-text { white-space: pre-wrap; }