ai-agentmanager 1.22.0 → 1.24.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,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.24.0 (2026-11-06)
4
+
5
+ - **Your action on each Jira issue: assign, skip, done or remove.** A picker on the left of every issue in the Jira tab. Your choice is kept by the daemon, so a restart or an update doesn't ask again, and you can change it any time (a removed issue is under Removed, to bring back). Assign starts an agent for an issue not started yet. The assistant doesn't propose or start agents for issues you skipped, marked done or removed. Also `agentmgr issues set <assign|skip|done|remove|clear> <keys...>`.
6
+ - **Every open Jira issue assigned to you is listed**, epics too, until it's closed or integrated, with or without an agent. Needs your Jira site, email and API token in Settings → Jira.
7
+ - **A synopsis under each issue**: what it's about in a sentence or two, from its Jira description (or the agent's design doc).
8
+ - **A clearer standup voice.** The standup used a different voice for each agent, picked from every voice installed, and on a Mac that includes the old robotic ones. Now it uses only the clearest on-device voices (Premium, Enhanced and Siri voices first), names are read as words, and you can pick one voice under the player; it's used for everything read aloud. Online voices (Chrome's Google ones) are offered but never picked for you, since they send the text to Google.
9
+
10
+ ## 1.23.1 (2026-11-06)
11
+
12
+ - **Diagrams that fail to draw no longer litter the page.** Mermaid's "Syntax error" picture was left at the bottom of the page when an agent's diagram didn't parse. Now the diagram's own spot says it couldn't be drawn and shows its source. A diagram whose node labels have unquoted parentheses or braces (`A[GetView(s)]`, which agents often write) is drawn again with those labels quoted, so most of them now draw.
13
+ - **The page reloads itself after an update.** While restarting, the old daemon keeps serving the old version until its agents are closed, so a reload during that time (even Shift+Reload) still showed the old one. Now any open page, including one on a phone over remote access, reloads by itself as soon as the new version is up.
14
+
15
+ ## 1.23.0 (2026-11-06)
16
+
17
+ - **Reviews.** Reviewer agents for other people's pull requests. **Reviews** (or `g`) lists PRs where your review is requested; tick them, or paste any PR link. A reviewer works read-only on the PR's head: a verdict (approve, approve with nits, blocked), the approval blockers with file, line, why and what would resolve them, critical questions for the author, risks, test gaps and nits. Tick what to send and **Post as pending review** (a draft review under your name that you submit on GitHub), or **Copy**. When the author pushes, the reviewer re-checks its blockers. **🔊 Explain** reads it aloud. The assistant's GitHub reviews source starts reviewers, or only lists them when you pick. `agentmgr review <PR>`, `agentmgr reviews` (`show`, `post`, `dismiss`).
18
+
3
19
  ## 1.22.0 (2026-11-06)
4
20
 
5
21
  - **Value.** A **Value** button (or `v`) shows what the delivered work is worth, by day, week, month and quarter: engineering hours saved (valued at your loaded hourly rate), other savings, potential revenue and strategic weight, against the AI cost and your own time (leverage, value per AI dollar). Each delivered item (its pull request merged, or done without one) gets an estimate from one short model call, with reasons; correct any figure and yours win, marked ✎ in reports. Weekly, monthly and quarterly reports (daily if you like) go to Slack and, if you choose, a Google Doc, and are saved in `~/.agentmanager/value` with `value.csv`. `agentmgr value` (`edit`, `estimate`, `report`, `set`).
package/README.md CHANGED
@@ -963,6 +963,28 @@ agentmgr designs --waiting # only the ones waiting for your review
963
963
  agentmgr designs --markdown # a list to paste
964
964
  ```
965
965
 
966
+ ### Reviews: other people's pull requests
967
+
968
+ When you're a reviewer on someone else's pull request, a reviewer agent does the first careful pass for you. **Reviews** in the top bar (or `g`) lists pull requests where GitHub has your review requested; tick some and **Review with agents**, or paste any PR link and **Review**. The project is the one whose repository the PR is in.
969
+
970
+ A reviewer is read-only. It checks out the PR's head, reads the description, discussion and diff and as much of the surrounding code as it needs, and may run the tests; it never commits, pushes, approves or comments. It writes:
971
+
972
+ - **A verdict:** approve, approve with nits, or **blocked**, with the reason. Any open blocker means blocked.
973
+ - **Approval blockers:** each with its file and line, why it fails (correctness, security, data loss, a breaking change, missing tests for risky logic, not doing what the PR says), and what would resolve it. Style is never a blocker.
974
+ - **Critical questions for the author:** what the code and description don't answer, such as intent, edge cases, rollout and rollback.
975
+ - **Risks, test gaps and nits**, kept apart from the blockers.
976
+
977
+ Open a review to read it, ask the reviewer about it in its session, or hear it with **🔊 Explain**. Tick what to send (open blockers and questions are ticked to start with) and **Post as pending review**: it becomes a draft review on GitHub under your name, with each item on its line, that only you see until you submit it there. A line outside the diff goes in the review's text instead. **Copy** gives the ticked items as Markdown. When the author pushes, the review is marked **New commits** and the reviewer re-checks each blocker, marking the fixed ones resolved.
978
+
979
+ With **GitHub reviews** on in **Assistant**, it starts reviewers for new requests by itself, unless **Let me pick** is on; then they wait in **Reviews** for you to tick.
980
+
981
+ ```bash
982
+ agentmgr review https://github.com/acme/api/pull/42 # start a reviewer (--project, --notes)
983
+ agentmgr reviews # the list, with verdicts
984
+ agentmgr reviews show <agent> # blockers, questions, risks
985
+ agentmgr reviews post <agent> b1 q2 # a pending review with those items
986
+ ```
987
+
966
988
  ## Triggers
967
989
 
968
990
  Start agents from where the work lives, with no session watching and no tokens spent on it. **Assistant → Triggers…**, or `agentmgr triggers`:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-agentmanager",
3
- "version": "1.22.0",
3
+ "version": "1.24.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
@@ -28,6 +28,8 @@ import { initStandup } from '/standup.js';
28
28
  import { initIssues } from '/issues.js';
29
29
  import { reviewSpeech } from '/prvoice.js';
30
30
  import { initDesigns } from '/designs.js';
31
+ import { initReviews } from '/reviews.js';
32
+ import { drawDiagram } from '/diagram.js';
31
33
  import { initValue } from '/value.js';
32
34
  import { initCodeMap } from '/codemap.js';
33
35
  import { initKeys } from '/keys.js';
@@ -56,8 +58,9 @@ const watchOnLoad = hashId === 'watch';
56
58
  const standupOnLoad = hashId === 'standup';
57
59
  const mapOnLoad = hashId === 'map';
58
60
  const valueOnLoad = hashId === 'value';
61
+ const reviewsOnLoad = hashId === 'reviews';
59
62
  let watchShown = false;
60
- let selectedId = (watchOnLoad || standupOnLoad || mapOnLoad || valueOnLoad ? null : hashId) || null;
63
+ let selectedId = (watchOnLoad || standupOnLoad || mapOnLoad || valueOnLoad || reviewsOnLoad ? null : hashId) || null;
61
64
  let openTermOnLoad = hashView === 'term' || hashView === 'code' || isShell(hashView) || isBrowser(hashView);
62
65
  let filterText = '';
63
66
  // "Only agents created in the last N days": remembered in this browser.
@@ -229,6 +232,9 @@ const designsUi = initDesigns({
229
232
  openDoc: (id) => (showTab('agents'), select(id), openDoc(id, 'designdoc')),
230
233
  });
231
234
  $('#designs-btn').onclick = () => designsUi.open();
235
+ // Reviews: other people's pull requests, reviewed by agents for you.
236
+ const reviewsUi = initReviews({ api, $, esc, ago, toast: (m, ms) => toast(m, ms), openAgent: (id) => (showTab('agents'), select(id)) });
237
+ $('#reviews-btn').onclick = () => reviewsUi.open();
232
238
  // Value: what the delivered work is worth, for you and for management.
233
239
  const valueUi = initValue({ api, $, esc, toast: (m, ms) => toast(m, ms), openAgent: (id) => (showTab('agents'), select(id)) });
234
240
  $('#value-btn').onclick = () => valueUi.open();
@@ -275,6 +281,7 @@ function shortcut(act) {
275
281
  if (act === 'map') return $('#map-btn').click();
276
282
  if (act === 'issues') return issuesUi.open();
277
283
  if (act === 'designs') return designsUi.open();
284
+ if (act === 'reviews') return reviewsUi.open();
278
285
  if (act === 'value') return valueUi.open();
279
286
  if (act.startsWith('tab:')) return showTab(act.slice(4));
280
287
  return false;
@@ -331,7 +338,8 @@ const isDark = () => {
331
338
  };
332
339
  // SVG text labels rather than HTML ones: a diagram then exports to PNG (the browser won't turn
333
340
  // HTML-in-SVG into an image).
334
- const mermaidConfig = () => ({ startOnLoad: false, securityLevel: 'strict', theme: isDark() ? 'dark' : 'default', htmlLabels: false, flowchart: { htmlLabels: false } });
341
+ // suppressErrorRendering: a diagram that fails shows our message, not Mermaid's error picture.
342
+ const mermaidConfig = () => ({ startOnLoad: false, suppressErrorRendering: true, securityLevel: 'strict', theme: isDark() ? 'dark' : 'default', htmlLabels: false, flowchart: { htmlLabels: false } });
335
343
  // Diagrams are drawn in the theme's colors: redraw them when it changes.
336
344
  window.addEventListener('agentmgr-theme', () => {
337
345
  diagrams.clear();
@@ -366,7 +374,7 @@ async function renderDiagrams(root) {
366
374
  mermaidLib = (await import('/vendor/mermaid/mermaid.esm.min.mjs')).default;
367
375
  mermaidLib.initialize(mermaidConfig());
368
376
  }
369
- const { svg } = await mermaidLib.render(`mmd-${diagrams.size}-${Date.now()}`, src);
377
+ const { svg } = await drawDiagram(mermaidLib, `mmd-${diagrams.size}-${Date.now()}`, src);
370
378
  diagrams.set(src, { svg });
371
379
  } catch (err) {
372
380
  diagrams.set(src, { error: String(err?.message || err).split('\n')[0] });
@@ -729,6 +737,7 @@ bindListen((id) => {
729
737
  else if (what === 'score') parts = a?.docs?.scorecard?.data ? scorecardSpeech(a.docs.scorecard) : null;
730
738
  else if (what === 'sidewalk') parts = sidePane?.listenParts();
731
739
  else if (what === 'prvoice') parts = reviewSpeech(a, issuesUi.about(agentId));
740
+ else if (what === 'reviewer') parts = reviewsUi.speech(agentId);
732
741
  if (!parts?.length || !play(id, parts)) toast('Nothing to read aloud here (or this browser has no speech)');
733
742
  });
734
743
 
@@ -4013,6 +4022,17 @@ async function loadAbout() {
4013
4022
  return aboutInfo;
4014
4023
  }
4015
4024
  loadAbout().catch(() => {});
4025
+
4026
+ // After an update the old daemon keeps answering (with the old version and old pages) while it
4027
+ // closes its agents, so a reload then still shows the old one. Whenever the event stream
4028
+ // connects again, a daemon running a different version means this page is stale: reload it.
4029
+ async function reloadIfUpdated() {
4030
+ if (!aboutInfo) return;
4031
+ const was = aboutInfo.version;
4032
+ try {
4033
+ if ((await loadAbout()).version !== was) location.reload();
4034
+ } catch {}
4035
+ }
4016
4036
  function renderAbout(a) {
4017
4037
  const link = (url, text = url.replace(/^https:\/\//, '')) => `<a href="${esc(url)}" target="_blank" rel="noopener">${esc(text)}</a>`;
4018
4038
  const when = (iso) => new Date(iso).toLocaleString();
@@ -4140,6 +4160,11 @@ function handleEvent(msg) {
4140
4160
  watchShown = true;
4141
4161
  mapUi.show(true);
4142
4162
  }
4163
+ if (reviewsOnLoad && !watchShown) {
4164
+ watchShown = true;
4165
+ history.replaceState(null, '', '#');
4166
+ reviewsUi.open();
4167
+ }
4143
4168
  if (valueOnLoad && !watchShown) {
4144
4169
  watchShown = true;
4145
4170
  history.replaceState(null, '', '#');
@@ -4162,6 +4187,7 @@ function handleEvent(msg) {
4162
4187
  if (msg.agent.builds) builtUi.sessionChanged(msg.agent);
4163
4188
  issuesUi.changed();
4164
4189
  designsUi.changed();
4190
+ if (msg.agent.reviewing) reviewsUi.changed();
4165
4191
  // The detail, terminal and document views show one agent; another agent's update leaves them be.
4166
4192
  return invalidate([
4167
4193
  'list', 'backlog', 'land', 'inbox', 'race', 'team',
@@ -4212,6 +4238,7 @@ function connectEvents() {
4212
4238
  onOpen: () => {
4213
4239
  $('#conn').textContent = REMOTE ? 'connected (remote)' : 'daemon connected';
4214
4240
  $('#conn').className = 'conn ok';
4241
+ reloadIfUpdated();
4215
4242
  },
4216
4243
  onMessage: handleEvent,
4217
4244
  onClose: async () => {
@@ -0,0 +1,38 @@
1
+ // Drawing a Mermaid diagram an agent wrote. Agents often put parentheses or braces in a node's
2
+ // label without quotes (MV[GetMaintenanceView(s)]), which Mermaid reads as a shape and refuses:
3
+ // when a diagram fails, it's drawn again once with those labels quoted. A failed render never
4
+ // leaves Mermaid's error picture in the page.
5
+
6
+ // A node's label in [ ], unquoted, with ( ) { } inside that aren't one of Mermaid's [( )] shapes.
7
+ const LABEL = /(\b[\w-]+)\[(?!["(/\\[])([^\[\]"\n]*[(){}][^\[\]"\n]*)\]/g;
8
+
9
+ /** The source with such labels quoted ("" inside a label becomes #quot;). Unchanged when none. */
10
+ export function quoteLabels(src) {
11
+ return String(src ?? '').replace(LABEL, (_, id, label) => `${id}["${label.replace(/"/g, '#quot;')}"]`);
12
+ }
13
+
14
+ /** Mermaid's own leftovers from a failed render: its temporary containers and the error picture. */
15
+ function sweep(id) {
16
+ for (const sel of [`#${id}`, `#d${id}`, `#i${id}`]) {
17
+ try {
18
+ document.querySelector(sel)?.remove();
19
+ } catch {}
20
+ }
21
+ }
22
+
23
+ /** Render `src` with the Mermaid library `lib`: { svg }, or throws the first error. */
24
+ export async function drawDiagram(lib, id, src) {
25
+ try {
26
+ return await lib.render(id, src);
27
+ } catch (err) {
28
+ sweep(id);
29
+ const fixed = quoteLabels(src);
30
+ if (fixed === src) throw err;
31
+ try {
32
+ return await lib.render(`${id}-q`, fixed);
33
+ } catch {
34
+ sweep(`${id}-q`);
35
+ throw err;
36
+ }
37
+ }
38
+ }
package/public/index.html CHANGED
@@ -34,6 +34,7 @@
34
34
  <button id="standup-btn" title="Today's standup: each agent's news read aloud, and what they need from you">Standup <span id="standup-dot" class="assistant-dot" hidden></span></button>
35
35
  <button id="issues-btn" title="Jira: every issue an agent works on, with its Jira status, pull request and agent, the ones waiting for your review first">Jira <span id="issues-count" class="badge ready"></span></button>
36
36
  <button id="designs-btn" title="Designs: every agent's design doc with its summary and links, the ones waiting for your review first">Designs <span id="designs-count" class="badge ready"></span></button>
37
+ <button id="reviews-btn" title="Reviews: pull requests you review. Reviewer agents ask the critical questions and find what blocks approval; you post what you pick">Reviews <span id="reviews-count" class="badge ready"></span></button>
37
38
  <button id="value-btn" title="Value: what the delivered work is worth, by day, week, month and quarter, against the AI cost and your time; reports for management">Value</button>
38
39
  <button id="map-btn" title="The codebase map: where each agent is changing and reading code, and who is about to collide">Map</button>
39
40
  <button id="watch-btn" title="Running agents' sessions side by side, live: follow them all without clicking from one to the next">Watch</button>
@@ -385,6 +386,9 @@
385
386
  <dialog id="designs-dialog" class="issues-dialog" aria-label="Design docs">
386
387
  <div id="designs-body"></div>
387
388
  </dialog>
389
+ <dialog id="reviews-dialog" class="issues-dialog" aria-label="Reviews">
390
+ <div id="reviews-body"></div>
391
+ </dialog>
388
392
  <dialog id="value-dialog" class="issues-dialog value-dialog" aria-label="Value">
389
393
  <div id="value-body"></div>
390
394
  </dialog>
package/public/issues.js CHANGED
@@ -1,7 +1,8 @@
1
1
  // Jira: every issue an agent works on in one table, the ones waiting for your review first: the
2
2
  // issue and its Jira status, where the work stands, its plan, design doc and pull request, and a
3
3
  // link to the agent. Issues proposed for agents (when you pick) come first, with a box to tick:
4
- // agents start only for the ticked ones.
4
+ // agents start only for the ticked ones. Each issue has your action on its left (assign, skip, done,
5
+ // remove), kept by the daemon across restarts and updates, and changeable any time.
5
6
 
6
7
  import { listenHtml } from './speak.js';
7
8
 
@@ -11,7 +12,15 @@ const FILTERS = [
11
12
  ['you', 'Waiting for you'],
12
13
  ['agent', 'Agents on it'],
13
14
  ['done', 'Done'],
15
+ ['skipped', 'Skipped'],
14
16
  ['all', 'All'],
17
+ ['removed', 'Removed'],
18
+ ];
19
+ const ACTIONS = [
20
+ ['assign', 'Assign', 'An agent works on it (assigning one not started yet starts its agent)'],
21
+ ['skip', 'Skip', 'Not now: under Skipped, and not proposed or started again'],
22
+ ['done', 'Done', 'Handled (by you or elsewhere): under Done'],
23
+ ['remove', 'Remove', 'Off the list (under Removed, to bring back)'],
15
24
  ];
16
25
  const CHECKS = { passed: ['✓', 'Checks pass'], failed: ['✗', 'Checks failing'], running: ['●', 'Checks running'] };
17
26
 
@@ -32,11 +41,11 @@ export function initIssues({ api, $, esc, ago, openAgent, openDoc, toast }) {
32
41
 
33
42
  let loadedAt = 0;
34
43
 
35
- async function load({ quiet = false } = {}) {
44
+ async function load({ quiet = false, fresh = false } = {}) {
36
45
  if (loading) return;
37
46
  loading = true;
38
47
  try {
39
- data = await api('GET', '/issues');
48
+ data = await api('GET', `/issues${fresh ? '?fresh=1' : ''}`);
40
49
  loadedAt = Date.now();
41
50
  } catch (e) {
42
51
  if (!quiet) toast?.(e.message, 5000);
@@ -58,18 +67,30 @@ export function initIssues({ api, $, esc, ago, openAgent, openDoc, toast }) {
58
67
  }
59
68
  }
60
69
 
70
+ /** Your action on the issue, left of it: kept across restarts; change it any time. */
71
+ function actionCell(r) {
72
+ const none = r.agent ? '' : `<option value="" ${r.action ? '' : 'selected'}>—</option>`;
73
+ const opts = ACTIONS.map(([v, label, title]) => `<option value="${v}" title="${esc(title)}" ${r.action === v ? 'selected' : ''}>${label}</option>`).join('');
74
+ return `<td class="issue-action"><select data-issue-action="${esc(r.key)}" class="act-${esc(r.action ?? 'none')}" aria-label="Your action on ${esc(r.key)}" title="Your action: kept across restarts and updates">${none}${opts}</select></td>`;
75
+ }
76
+
77
+ function aboutIssue(r) {
78
+ return `${r.title ? `<div class="issue-title">${esc(r.title)}</div>` : ''}${r.synopsis ? `<div class="issue-synopsis" title="${esc(r.synopsis)}">${esc(r.synopsis)}</div>` : ''}`;
79
+ }
80
+
61
81
  function row(r, boxes) {
62
82
  const box = !boxes ? '' : r.group === 'new' ? `<td class="pick"><input type="checkbox" data-issue-pick="${esc(r.key)}" ${ticked.has(r.key) ? 'checked' : ''} aria-label="Start an agent for ${esc(r.key)}" /></td>` : '<td></td>';
63
- const issue = r.url ? `<a href="${esc(r.url)}" target="_blank" rel="noopener" class="issue-key">${esc(r.key)}</a>` : `<span class="issue-key">${esc(r.key)}</span>`;
83
+ const type = r.type && !/^(story|task|bug|sub-?task)$/i.test(r.type) ? ` <span class="issue-type" title="Jira issue type">${esc(r.type)}</span>` : '';
84
+ const issue = (r.url ? `<a href="${esc(r.url)}" target="_blank" rel="noopener" class="issue-key">${esc(r.key)}</a>` : `<span class="issue-key">${esc(r.key)}</span>`) + type;
64
85
  const status = r.jira?.status ? `<span class="jira-status ${esc(r.jira.category ?? '')}">${esc(r.jira.status)}</span>` : '<span class="hint">—</span>';
65
86
  const check = r.pr?.checks && CHECKS[r.pr.checks] ? ` <span class="checks ${esc(r.pr.checks)}" title="${CHECKS[r.pr.checks][1]}">${CHECKS[r.pr.checks][0]}</span>` : '';
66
87
  const pr = r.pr?.url
67
88
  ? `<a href="${esc(r.pr.url)}" target="_blank" rel="noopener" title="${esc(r.pr.title ?? '')}">#${esc(r.pr.number ?? '?')}</a>${check}${r.aiReview ? `<div class="hint" title="AI review">AI: ${esc(r.aiReview)}</div>` : ''}<div>${listenHtml(`prvoice:${r.agent.id}`, { title: 'Explain the review aloud: the PR, its checks, the AI review, the riskiest changes and what is left', label: 'Explain' })}</div>`
68
89
  : '<span class="hint">—</span>';
69
90
  if (!r.agent) {
70
- const by = r.proposal?.by === 'assistant' ? 'proposed by the assistant' : 'proposed';
71
- return `<tr class="stage-proposed ${ticked.has(r.key) ? 'ticked' : ''}">${box}
72
- <td>${issue}${r.title ? `<div class="issue-title">${esc(r.title)}</div>` : ''}</td>
91
+ const by = !r.proposal ? 'assigned to you' : r.proposal.by === 'assistant' ? 'proposed by the assistant' : r.proposal.by === 'jira' ? 'assigned to you' : 'proposed';
92
+ return `<tr class="stage-proposed ${ticked.has(r.key) ? 'ticked' : ''} ${r.action ? `action-${esc(r.action)}` : ''}">${box}${actionCell(r)}
93
+ <td>${issue}${aboutIssue(r)}</td>
73
94
  <td>${status}</td>
74
95
  <td class="issue-note">${esc(r.note)}</td>
75
96
  <td class="hint">—</td>
@@ -91,8 +112,8 @@ export function initIssues({ api, $, esc, ago, openAgent, openDoc, toast }) {
91
112
  const design = d
92
113
  ? [d.written ? read('designdoc', 'Read', 'Read the design doc here') : '<span class="hint">not yet</span>', d.page && ext('Page', d.page, 'The design page the agent published'), d.google && ext('Doc', d.google, 'Google Doc')].filter(Boolean).join(' · ')
93
114
  : '<span class="hint">—</span>';
94
- return `<tr class="stage-${esc(r.stage)}">${box}
95
- <td>${issue}${r.title ? `<div class="issue-title">${esc(r.title)}</div>` : ''}</td>
115
+ return `<tr class="stage-${esc(r.stage)} action-${esc(r.action)}">${box}${actionCell(r)}
116
+ <td>${issue}${aboutIssue(r)}</td>
96
117
  <td>${status}</td>
97
118
  <td class="issue-note">${esc(r.note)}</td>
98
119
  <td class="nowrap">${plan}</td>
@@ -109,8 +130,9 @@ export function initIssues({ api, $, esc, ago, openAgent, openDoc, toast }) {
109
130
  body.innerHTML = '<p class="hint">Loading…</p>';
110
131
  return;
111
132
  }
112
- const count = (g) => (g === 'all' ? data.rows.length : data.rows.filter((r) => r.group === g).length);
113
- const rows = filter === 'all' ? data.rows : data.rows.filter((r) => r.group === filter);
133
+ const inGroup = (r, g) => (g === 'all' ? r.group !== 'removed' : r.group === g);
134
+ const count = (g) => data.rows.filter((r) => inGroup(r, g)).length;
135
+ const rows = data.rows.filter((r) => inGroup(r, filter));
114
136
  // Ticks only for issues still on the list.
115
137
  const fresh = new Set(data.rows.filter((r) => r.group === 'new').map((r) => r.key));
116
138
  for (const k of ticked) if (!fresh.has(k)) ticked.delete(k);
@@ -123,8 +145,12 @@ export function initIssues({ api, $, esc, ago, openAgent, openDoc, toast }) {
123
145
  : filter === 'you'
124
146
  ? 'Nothing is waiting for your review.'
125
147
  : filter === 'new'
126
- ? 'No issues waiting to be started. With "Let me pick" on in Assistant, new Jira and Linear issues assigned to you come here instead of getting agents right away (or: agentmgr issues propose).'
127
- : 'None here.';
148
+ ? 'No issues waiting to be started. Open Jira issues assigned to you show here once your Jira site, email and API token are in Settings → Jira. With "Let me pick" on in Assistant, new Jira and Linear issues assigned to you come here instead of getting agents right away (or: agentmgr issues propose).'
149
+ : filter === 'skipped'
150
+ ? 'Nothing skipped. Issues you set to Skip wait here, and the assistant leaves them alone.'
151
+ : filter === 'removed'
152
+ ? 'Nothing removed. Set an issue back to another action here to bring it back.'
153
+ : 'None here.';
128
154
  body.innerHTML = `
129
155
  <div class="issues-head">
130
156
  <h2>Jira</h2>
@@ -137,20 +163,38 @@ export function initIssues({ api, $, esc, ago, openAgent, openDoc, toast }) {
137
163
  ${boxes
138
164
  ? `<div class="issues-pickbar">
139
165
  <button class="primary small" data-issues="start" ${n && !starting ? '' : 'disabled'} title="Start an agent for each ticked issue">${starting ? 'Starting…' : `Start ${n || ''} agent${n === 1 ? '' : 's'}`.replace(' ', ' ')}</button>
140
- <button class="small" data-issues="dismiss" ${n && !starting ? '' : 'disabled'} title="Take the ticked issues off the list; they won't be proposed again">Dismiss</button>
166
+ <button class="small" data-issues="skip" ${n && !starting ? '' : 'disabled'} title="Not now: under Skipped, and not proposed again">Skip</button>
167
+ <button class="small" data-issues="dismiss" ${n && !starting ? '' : 'disabled'} title="Take the ticked issues off the list (under Removed, to bring back); they won't be proposed again">Remove</button>
141
168
  <span class="hint">Tick the issues to start agents for; the rest stay here.</span>
142
169
  </div>`
143
170
  : ''}
144
171
  ${rows.length
145
172
  ? `<div class="issues-scroll"><table class="issues">
146
- <thead><tr>${boxes ? `<th class="pick"><input type="checkbox" data-issue-pick-all ${allTicked ? 'checked' : ''} aria-label="Tick all" title="Tick all" /></th>` : ''}<th>Issue</th><th>Jira status</th><th>Where it stands</th><th>Plan</th><th>Design</th><th>Pull request</th><th>Agent</th><th class="col-active">Active</th></tr></thead>
173
+ <thead><tr>${boxes ? `<th class="pick"><input type="checkbox" data-issue-pick-all ${allTicked ? 'checked' : ''} aria-label="Tick all" title="Tick all" /></th>` : ''}<th class="issue-action" title="Your action, kept across restarts and updates">Action</th><th>Issue</th><th>Jira status</th><th>Where it stands</th><th>Plan</th><th>Design</th><th>Pull request</th><th>Agent</th><th class="col-active">Active</th></tr></thead>
147
174
  <tbody>${rows.map((r) => row(r, boxes)).join('')}</tbody>
148
175
  </table></div>`
149
176
  : `<p class="hint issues-empty">${esc(empty)}</p>`}
150
- ${data.jira.signedIn || !data.rows.length ? '' : '<p class="hint">Jira status shows for public issues only until you add your Jira site, email and API token in Settings → Jira.</p>'}`;
177
+ ${data.jira.signedIn || !data.rows.length ? '' : '<p class="hint">Jira status shows for public issues only, and the issues assigned to you aren\'t listed, until you add your Jira site, email and API token in Settings → Jira.</p>'}`;
178
+ }
179
+
180
+ /** Set your action on issues; assign starts the agents of ones not started yet. */
181
+ async function setAction(keys, action) {
182
+ try {
183
+ const r = await api('POST', '/issues/action', { keys, action: action || null });
184
+ for (const k of r.set) ticked.delete(k);
185
+ const bad = r.failed.map((x) => `${x.key}: ${x.reason}`).join('; ');
186
+ const label = ACTIONS.find(([v]) => v === action)?.[1] ?? 'Cleared';
187
+ const what = r.started.length ? `Started ${r.started.map((x) => `${x.key} (${x.agent.name})`).join(', ')}` : r.set.length ? `${r.set.join(', ')}: ${label}` : 'Nothing changed';
188
+ toast?.(`${what}${bad ? `. Not changed: ${bad}` : ''}`, bad ? 8000 : 3000);
189
+ } catch (err) {
190
+ toast?.(err.message, 6000);
191
+ }
192
+ load();
151
193
  }
152
194
 
153
195
  body.addEventListener('change', (e) => {
196
+ const act = e.target.dataset.issueAction;
197
+ if (act) return setAction([act], e.target.value);
154
198
  const one = e.target.dataset.issuePick;
155
199
  if (one) {
156
200
  if (e.target.checked) ticked.add(one);
@@ -169,7 +213,8 @@ export function initIssues({ api, $, esc, ago, openAgent, openDoc, toast }) {
169
213
  starting = true;
170
214
  render();
171
215
  try {
172
- const r = await api('POST', '/issues/start', { keys });
216
+ // Assign: starts agents for proposals and for issues assigned to you in Jira alike.
217
+ const r = await api('POST', '/issues/action', { keys, action: 'assign' });
173
218
  for (const x of r.started) ticked.delete(x.key);
174
219
  const bad = r.failed.map((x) => `${x.key}: ${x.reason}`).join('; ');
175
220
  toast?.(`${r.started.length ? `Started ${r.started.length} agent${r.started.length === 1 ? '' : 's'}: ${r.started.map((x) => x.key).join(', ')}` : 'No agents started'}${bad ? `. Not started: ${bad}` : ''}`, bad ? 8000 : 4000);
@@ -202,18 +247,10 @@ export function initIssues({ api, $, esc, ago, openAgent, openDoc, toast }) {
202
247
  }
203
248
  const b = e.target.closest('[data-issues]')?.dataset.issues;
204
249
  if (b === 'close') return dialog.close();
205
- if (b === 'refresh') return load();
250
+ if (b === 'refresh') return load({ fresh: true });
206
251
  if (b === 'start') return startTicked();
207
- if (b === 'dismiss') {
208
- try {
209
- const r = await api('POST', '/issues/dismiss', { keys: [...ticked] });
210
- ticked.clear();
211
- toast?.(`${r.dismissed} dismissed`);
212
- } catch (err) {
213
- toast?.(err.message, 6000);
214
- }
215
- return load();
216
- }
252
+ if (b === 'dismiss') return setAction([...ticked], 'remove');
253
+ if (b === 'skip') return setAction([...ticked], 'skip');
217
254
  if (b === 'copy') {
218
255
  try {
219
256
  const { markdown } = await api('GET', `/issues?group=${encodeURIComponent(filter)}&format=markdown`);
package/public/keys.js CHANGED
@@ -20,6 +20,7 @@ export const SHORTCUTS = [
20
20
  [['m'], 'Map: where agents are in the code', 'map'],
21
21
  [['i'], 'Jira: issues waiting for your review', 'issues'],
22
22
  [['d'], 'Designs: agents\' design docs', 'designs'],
23
+ [['g'], 'Reviews: pull requests you review', 'reviews'],
23
24
  [['v'], 'Value: what the work is worth', 'value'],
24
25
  [['1'], 'Agents tab', 'tab:agents'],
25
26
  [['2'], 'Inbox: what needs you', 'tab:inbox'],
@@ -39,11 +40,11 @@ export const SHORTCUTS = [
39
40
  // A single key, as an event names it, to its action.
40
41
  export const SINGLE = {
41
42
  j: 'next', k: 'prev', Enter: 'terminal', t: 'terminal',
42
- r: 'changes', s: 'start', X: 'stop', e: 'edit', n: 'new', a: 'ask', '/': 'filter', w: 'watch', p: 'standup', m: 'map', i: 'issues', d: 'designs', v: 'value', '?': 'help',
43
+ r: 'changes', s: 'start', X: 'stop', e: 'edit', n: 'new', a: 'ask', '/': 'filter', w: 'watch', p: 'standup', m: 'map', i: 'issues', d: 'designs', g: 'reviews', v: 'value', '?': 'help',
43
44
  1: 'tab:agents', 2: 'tab:inbox', 3: 'tab:backlog', 4: 'tab:land', 5: 'tab:built',
44
45
  };
45
46
  // While Watch is open: only what makes sense there.
46
- const ON_WATCH = new Set(['new', 'ask', 'watch', 'standup', 'map', 'issues', 'designs', 'value', 'help']);
47
+ const ON_WATCH = new Set(['new', 'ask', 'watch', 'standup', 'map', 'issues', 'designs', 'reviews', 'value', 'help']);
47
48
 
48
49
  /** Typing somewhere: a field, an editor or a terminal (xterm types through a textarea). */
49
50
  const typing = (el) => Boolean(el?.closest?.('input, textarea, select, [contenteditable=""], [contenteditable="true"], .xterm, .cm-editor'));