create-pmos 0.627.0 → 0.629.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-pmos",
3
- "version": "0.627.0",
3
+ "version": "0.629.0",
4
4
  "description": "Scaffold the PMOS portable kit — run the PMOS product-management workflow (initiative → lane-fit spec → contract → build → three gates, with work-type lanes for features, research, maintenance, incidents, and content) entirely inside your own repo, with all state as git-versioned files. Includes `workflow-sweep`, which audits the state every board derives from and separates real defects from work you simply have not done. `create-pmos workspace` also installs + launches the local Terminal Workspace GUI. No database, no network, no telemetry.",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -33,6 +33,32 @@
33
33
  "audit"
34
34
  ],
35
35
  "pmosChanges": [
36
+ {
37
+ "v": "0.629.0",
38
+ "at": "2026-11-19T07:37:18.343Z",
39
+ "f": 4,
40
+ "prs": [
41
+ {
42
+ "n": 1410,
43
+ "t": "Jira read goes where the tickets are, and the sprint read no longer sticks on an old sprint",
44
+ "s": "Jira read goes where the tickets are, and the sprint read no longer sticks on an old sprint",
45
+ "k": "fix"
46
+ }
47
+ ]
48
+ },
49
+ {
50
+ "v": "0.628.0",
51
+ "at": "2026-11-19T06:53:24.081Z",
52
+ "f": 4,
53
+ "prs": [
54
+ {
55
+ "n": 1409,
56
+ "t": "The work popup fills its width; done tasks muted, not struck through",
57
+ "s": "The work popup fills its width; done tasks muted, not struck through",
58
+ "k": "fix"
59
+ }
60
+ ]
61
+ },
36
62
  {
37
63
  "v": "0.627.0",
38
64
  "at": "2026-11-19T06:18:29.854Z",
@@ -428,32 +454,6 @@
428
454
  "k": "new"
429
455
  }
430
456
  ]
431
- },
432
- {
433
- "v": "0.607.0",
434
- "at": "2026-11-18T11:53:35.818Z",
435
- "f": 4,
436
- "prs": [
437
- {
438
- "n": 1351,
439
- "t": "Prototype Design shows only the design, with the run's notes as annotations beside it",
440
- "s": "Prototype Design shows only the design, with the run's notes as annotations beside it",
441
- "k": "fix"
442
- }
443
- ]
444
- },
445
- {
446
- "v": "0.606.0",
447
- "at": "2026-11-18T11:41:06.548Z",
448
- "f": 4,
449
- "prs": [
450
- {
451
- "n": 1348,
452
- "t": "Readable flow and who does what panels, copy panel width, tweaks in the inspector",
453
- "s": "Readable flow and who does what panels, copy panel width, tweaks in the inspector",
454
- "k": "fix"
455
- }
456
- ]
457
457
  }
458
458
  ]
459
459
  }
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@d535fad0
1
+ kernel-source: pmos@5151f7c8
2
2
  assembled: 2026-11-19
3
3
  mode: vendor
@@ -2,7 +2,7 @@
2
2
  type: Reference
3
3
  title: "Eval calibration log"
4
4
  description: "Append-only record of every PM override of an evaluator verdict."
5
- generated: {by: process:create-pmos, at: "2026-11-19T06:18:25Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-19T07:37:15Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -2,7 +2,7 @@
2
2
  type: Reference
3
3
  title: "Health budgets"
4
4
  description: "Closed registry of health-budget anchors (D59), edited only by the PM."
5
- generated: {by: process:create-pmos, at: "2026-11-19T06:18:25Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-19T07:37:15Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -2,7 +2,7 @@
2
2
  type: Reference
3
3
  title: "Discoveries and friction log"
4
4
  description: "Append-only record of what runs discovered and where the process rubbed."
5
- generated: {by: process:create-pmos, at: "2026-11-19T06:18:25Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-19T07:37:15Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -1,4 +1,30 @@
1
1
  [
2
+ {
3
+ "v": "0.629.0",
4
+ "at": "2026-11-19T07:37:18.343Z",
5
+ "f": 4,
6
+ "prs": [
7
+ {
8
+ "n": 1410,
9
+ "t": "Jira read goes where the tickets are, and the sprint read no longer sticks on an old sprint",
10
+ "s": "Jira read goes where the tickets are, and the sprint read no longer sticks on an old sprint",
11
+ "k": "fix"
12
+ }
13
+ ]
14
+ },
15
+ {
16
+ "v": "0.628.0",
17
+ "at": "2026-11-19T06:53:24.081Z",
18
+ "f": 4,
19
+ "prs": [
20
+ {
21
+ "n": 1409,
22
+ "t": "The work popup fills its width; done tasks muted, not struck through",
23
+ "s": "The work popup fills its width; done tasks muted, not struck through",
24
+ "k": "fix"
25
+ }
26
+ ]
27
+ },
2
28
  {
3
29
  "v": "0.627.0",
4
30
  "at": "2026-11-19T06:18:29.854Z",
@@ -92,7 +92,7 @@ A phone keeps its own layout. A shared read-only Board has no popup.
92
92
 
93
93
  ### What the popup shows for an initiative
94
94
 
95
- The work side has three parts, top to bottom.
95
+ The work side has three parts, top to bottom. They use the full width of the popup: in a wide popup the timeline gets the extra width. A done task shows in grey text, never struck through.
96
96
 
97
97
  - **Overview.** Three short lines from the initiative's own records: **Problem**, **Goal** (with the goal it serves, by name) and **Done when**. A line with no record says **Not written yet.** and offers a draft with ✓ and ✕. Press a line to change it; it saves when you leave the field, with **Undo**. Then one line on where it stands, **PMOS suggests** (at most three, each with ✓ and ✕), and **Details ›** for the facts: Stage, Status, Start, Target end, Next milestone, Goal, Product, Program, Workflow and Open. A fact with no value is not shown. Goal, Product, Program and Next milestone are in the link colour and open their thing; the others are plain text. An initiative that is closed or done but has open tasks shows one suggestion: **Close them** or **Reopen**.
98
98
  - **Work breakdown.** Each stage is a row that folds and says how much is done, for example "3 of 9 done". Only the stage in progress opens by itself. In a long stage you see the late tasks, the tasks in progress and the next five, then **N more tasks**. Done tasks fold to one line, and the stages after the next one fold to one row. A task in no stage is not in the breakdown: it is in Work › Backlog, and one quiet line under the breakdown says how many, for example **2 tasks with no stage are in the Backlog ›**. A task with no date shows no date and is never late. The timeline is on the right, with **Today** on it. Drag the grip between the columns and the timeline to make the timeline wider or narrower; a double press puts it back. Choose its span (Quarter to Full) beside the tune icon, which shows or hides columns. The four-corners icon gives the breakdown the whole popup. Type in the last row of a stage to add a task; the **Task** choice beside it makes the next one a milestone.
@@ -342,11 +342,12 @@ const SPRINTS_FILE = '_sprints';
342
342
  const jqlName = (n) => `"${String(n).replace(/\\/g, '\\\\').replace(/"/g, '\\"')}"`;
343
343
  function sprintQuery(root) {
344
344
  const frozen = frozenNotes(root);
345
- const seen = new Map(); const kept = new Set();
345
+ const seen = new Map(); const kept = new Set(); const projectKeys = new Set();
346
346
  for (const q of linkedInitiatives(root).filter((x) => x.linked)) {
347
347
  const snap = readSnapshot(root, q.initiative);
348
348
  if (!snap) continue;
349
349
  for (const t of snap.tickets.values()) {
350
+ if (t && KEY_RE.test(String(t.key || ''))) projectKeys.add(String(t.key).split('-')[0].toUpperCase());
350
351
  const sp = t && t.sprint;
351
352
  if (!sp || !sp.name) continue;
352
353
  const k = sp.id || sp.name;
@@ -355,7 +356,14 @@ function sprintQuery(root) {
355
356
  }
356
357
  }
357
358
  const sprints = [...seen.values()].sort((a, b) => a.name.localeCompare(b.name, undefined, { numeric: true }));
358
- if (!sprints.length) return { ok: true, linked: false, sprints, kept: [...kept], query: null };
359
+ if (!sprints.length) {
360
+ // bug 2026-11-19: on a Jira site whose Sprint field is not the usual custom field, the initiatives' reads came back with no sprint,
361
+ // so this said "no Jira reading has a sprint yet", the run skipped the sprint read, and the sprint band kept a 28 Oct read. When the
362
+ // tickets carry no sprint, read the open sprints of their Jira projects instead.
363
+ const projects = [...projectKeys].sort();
364
+ if (projects.length && !kept.size) return { ok: true, linked: true, mode: 'open', projects, sprints, kept: [...kept], query: `project in (${projects.join(', ')}) AND sprint in openSprints() ORDER BY key` };
365
+ return { ok: true, linked: false, sprints, kept: [...kept], query: null };
366
+ }
359
367
  return { ok: true, linked: true, sprints, kept: [...kept], query: `sprint in (${sprints.map((s) => s.id || jqlName(s.name)).join(', ')}) ORDER BY key` };
360
368
  }
361
369
  /** Save a whole-sprint read. The read replaces the last one whole: an issue moved out of a sprint is gone from it. A closed
@@ -0,0 +1,57 @@
1
+ 'use strict';
2
+ /* jira-workspaces.js — the workspaces the Jira read goes to (bug 2026-11-19, "Jira tickets and sprints" failed every morning).
3
+ *
4
+ * list(workspaces, { home, linked, dirOf, now }) → [ws id] every workspace whose initiatives have a pushed Jira ticket or a linked
5
+ * epic, home first when it is one of them; one per Jira folder (a git
6
+ * worktree reads the main checkout's tickets, so it is left out)
7
+ * create({ workspaces, home, ttlMs }) → { list(), clear() } the same, kept for ttlMs (the refresh engine asks each minute)
8
+ *
9
+ * WHY. The Jira source had no pinned workspace, so the refresh engine ran it in the home workspace. On the PM's Mac that is the
10
+ * PMOS checkout, where no initiative has a Jira ticket: the read stopped at "no initiative has a ticket in Jira yet", saved
11
+ * nothing, and was logged as failed, while the workspace that holds the tickets was never read on schedule.
12
+ * lib/refresh-run.js (wsFor) sends the read to these workspaces instead. Reads only: no network, no write.
13
+ */
14
+ const path = require('path');
15
+
16
+ function defaults() {
17
+ const jiraStatus = require('./jira-status.js');
18
+ const jiraTickets = require('./jira-tickets.js');
19
+ return {
20
+ linked: (root) => jiraStatus.linkedInitiatives(root).some((x) => x.linked),
21
+ dirOf: (root) => path.resolve(jiraTickets.jiraDir(root)),
22
+ };
23
+ }
24
+
25
+ function list(workspaces, { home = null, linked, dirOf } = {}) {
26
+ const d = (!linked || !dirOf) ? defaults() : null;
27
+ const isLinked = linked || d.linked;
28
+ const folder = dirOf || d.dirOf;
29
+ const ws = [...(workspaces || [])].filter((w) => w && w.id && w.root);
30
+ ws.sort((a, b) => (a.id === home ? -1 : b.id === home ? 1 : 0));
31
+ const out = []; const seen = new Set();
32
+ for (const w of ws) {
33
+ let dir = null; let yes = false;
34
+ try { yes = !!isLinked(w.root); } catch { yes = false; } // a workspace whose records cannot be read has nothing to read
35
+ if (!yes) continue;
36
+ try { dir = folder(w.root); } catch { dir = w.root; }
37
+ if (seen.has(dir)) continue;
38
+ seen.add(dir); out.push(w.id);
39
+ }
40
+ return out;
41
+ }
42
+
43
+ function create({ workspaces, home = () => null, ttlMs = 5 * 60 * 1000, now = Date.now, linked, dirOf } = {}) {
44
+ let memo = null;
45
+ return {
46
+ list() {
47
+ const t = now();
48
+ if (memo && t - memo.at < ttlMs) return memo.ids.slice();
49
+ const ids = list(workspaces(), { home: home(), linked, dirOf });
50
+ memo = { at: t, ids };
51
+ return ids.slice();
52
+ },
53
+ clear() { memo = null; },
54
+ };
55
+ }
56
+
57
+ module.exports = { list, create };
@@ -22,6 +22,8 @@
22
22
  * freshRows(ws) → [freshness row], copyPaths(id, ws) → [path], tell({ source, label, error, ws }), sessionAlive(id) → bool,
23
23
  * sessionSignedOut?(id) → bool (its screen shows Claude's sign-in), stopSession?(id),
24
24
  * setDayCheckEvery(every), setRepoWatch(on), warn(what, e), leadsDue?(ws) → number of popup leads due,
25
+ * sourceWs?(id) → [ws id] | null the workspaces source `id` has something to read in (Jira: every workspace whose initiatives
26
+ * have a pushed ticket or a linked epic); null for a source that reads anywhere. See wsFor.
25
27
  * readDirs?(ws) → { runtime, jira } where the stored reads are, for their fingerprint (smart refresh step 1); by default the
26
28
  * state folder and the Jira folder copyPaths('jira') names }
27
29
  * startSkill takes a list of skills for a shared session (smart refresh step 2): one session that reads several due sources.
@@ -120,6 +122,20 @@ function create(host) {
120
122
  const readHeal = () => { try { const x = JSON.parse(fs.readFileSync(healFile(), 'utf8')); return x && typeof x === 'object' ? x : {}; } catch { return {}; } };
121
123
  function writeHeal(x) { try { fs.mkdirSync(dir, { recursive: true }); const tmp = `${healFile()}.${process.pid}.tmp`; fs.writeFileSync(tmp, JSON.stringify(x) + '\n'); fs.renameSync(tmp, healFile()); } catch (e) { warn('source repair state', e); } }
122
124
  const healing = (id) => { const h = readHeal()[id]; return !!h && h.state !== 'repaired'; };
125
+ /**
126
+ * The workspaces a run of source `id` goes to. `first` is the caller's own pick (pressed, pinned, pending, or home). A source the host
127
+ * names workspaces for (Jira) goes to `first` when `first` is one of them, and else to each of them; [] when none has anything to read.
128
+ * Bug 2026-11-19: the Jira source had no pinned workspace, so its daily read ran in the home workspace (the PMOS checkout), where no
129
+ * initiative has a Jira ticket. It failed every morning ("The shared refresh session did not save a new read of it", "No initiative
130
+ * has a Jira ticket or linked epic yet") while the workspace that holds the tickets was never read.
131
+ */
132
+ function wsFor(id, first) {
133
+ let list = null;
134
+ if (host.sourceWs) { try { const l = host.sourceWs(id); if (Array.isArray(l)) list = [...new Set(l.filter(Boolean))]; } catch (e) { warn('source workspaces', e); } }
135
+ if (!list) return first ? [first] : [];
136
+ return first && list.includes(first) ? [first] : list;
137
+ }
138
+ const NOTHING_TO_READ = 'No initiative in any workspace has a Jira ticket or a linked epic yet, so there is nothing to read.';
123
139
 
124
140
  /* ── the state of each source between minutes ── */
125
141
  const openOf = (st) => (st && st.open && typeof st.open === 'object' ? st.open : {});
@@ -378,7 +394,8 @@ function create(host) {
378
394
  const st = viewOf(cur[src.id]);
379
395
  const d = R.decide(src, st, { now: t, settings: set, rules, win: win(), busyDay, quiet: quiet(), runningCount: runningCount(cur), inputState: inputStateFn(set, cur, t), first });
380
396
  if (d.act === 'none') continue;
381
- const ws = (set.sources[src.id] && set.sources[src.id].ws) || (st.pending && st.pending.ws) || host.homeWs();
397
+ const wss = wsFor(src.id, (set.sources[src.id] && set.sources[src.id].ws) || (st.pending && st.pending.ws) || host.homeWs());
398
+ const ws = wss[0] || host.homeWs();
382
399
  if (d.act === 'skip') {
383
400
  cur[src.id] = R.marked(cur[src.id], d.svcs && Object.keys(d.svcs).length < R.TOOL_SVCS.length ? null : d.slot, d.svcs);
384
401
  R.writeState(dir, cur);
@@ -393,12 +410,19 @@ function create(host) {
393
410
  }
394
411
  continue;
395
412
  }
413
+ // A source with nothing to read in any workspace skips its slot with the reason: no session, and no failed run.
414
+ if (!wss.length) {
415
+ cur[src.id] = { ...R.marked(cur[src.id], d.slot, d.svcs), pending: null, waiting_since: null, waiting_for: [] };
416
+ R.writeState(dir, cur);
417
+ R.append(dir, { source: src.id, ws: null, ev: 'skip', trigger: d.trigger, note: NOTHING_TO_READ }, t);
418
+ continue;
419
+ }
396
420
  // harness-health: a scheduled run first refreshes its old inputs, then waits for them (the input wait above, at most 30 min).
397
421
  if (['schedule', 'catch-up'].includes(d.trigger) && !(cur[src.id] || {}).waiting_since) {
398
422
  const f = log();
399
423
  const lastDone = (id) => { const runs = f.runs(id, 20) || []; const l = runs.find((r) => r.result === 'done'); return l ? Date.parse(l.end_at || l.start_at) || 0 : 0; };
400
424
  const first = R.refreshFirst(src, { now: t, settings: set, inputState: inputStateFn(set, cur, t), lastDone });
401
- const begun = startMany(first.map((id) => R.BY_ID.get(id)), (id) => (set.sources[id] && set.sources[id].ws) || ws, { trigger: d.trigger, note: 'Refreshed first, before ' + src.label });
425
+ const begun = startMany(first.map((id) => R.BY_ID.get(id)), (id) => wsFor(id, (set.sources[id] && set.sources[id].ws) || ws), { trigger: d.trigger, note: 'Refreshed first, before ' + src.label });
402
426
  if (begun.length) {
403
427
  const nx = R.readState(dir);
404
428
  nx[src.id] = { ...(nx[src.id] || {}), waiting_since: t, waiting_for: begun, waiting_why: null };
@@ -406,7 +430,7 @@ function create(host) {
406
430
  continue;
407
431
  }
408
432
  }
409
- start(src, ws, { trigger: d.trigger, slot: d.slot, note: d.note, svcs: d.svcs });
433
+ for (const w of wss) start(src, w, { trigger: d.trigger, slot: d.slot, note: d.note, svcs: d.svcs });
410
434
  }
411
435
  // PMOS_SOURCE_HEAL=off stops the repairs (a suite about pressed and scheduled runs sets it, so no repair run races them)
412
436
  if (process.env.PMOS_SOURCE_HEAL !== 'off') { try { healTick(t, set); } catch (e) { warn('source repair', e); } }
@@ -423,7 +447,10 @@ function create(host) {
423
447
  const f = log();
424
448
  for (const src of R.SOURCES.filter((x) => x.run === 'skill' && x.fresh)) {
425
449
  const x = set.sources[src.id] || {}; const cur = R.readState(dir); const st = cur[src.id] || {};
426
- const ws = x.ws || host.homeWs();
450
+ const wss = wsFor(src.id, x.ws || host.homeWs());
451
+ // nothing to read anywhere: nothing to repair (a repair in a workspace with no Jira ticket can only fail again)
452
+ if (!wss.length) { delete heal[src.id]; continue; }
453
+ const ws = wss[0];
427
454
  const busy = running(st) || !!st.pending || !!st.waiting_since || (!!st.retry_at && st.retry_at > t);
428
455
  const canStart = runningCount(cur) < Number(set.rules.max || 3) && !R.inQuiet(t, quiet());
429
456
  const r = H.step({ now: t, row: rowOf(ws, src.fresh), on: !!x.on, manual: !!(x.s && x.s.kind === 'manual'), busy, last: f.lastRun(src.id), h: heal[src.id] || null, canStart });
@@ -453,7 +480,9 @@ function create(host) {
453
480
  const st = viewOf(cur[src.id]);
454
481
  if (st.running) continue; // a source with a run going starts alone (Your tools, for its other services)
455
482
  const d = R.decide(src, st, { now: t, settings: set, rules, win: win(), busyDay, quiet: quiet(), runningCount: runningCount(cur), inputState: inputStateFn(set, cur, t), first });
456
- if (d.act === 'start' && AUTO.has(d.trigger) && !d.pressed) due.push({ src, d, ws: (set.sources[src.id] && set.sources[src.id].ws) || host.homeWs() });
483
+ // a source that reads in several workspaces (or in none) starts in the tick below, one run per workspace
484
+ const wss = wsFor(src.id, (set.sources[src.id] && set.sources[src.id].ws) || host.homeWs());
485
+ if (d.act === 'start' && AUTO.has(d.trigger) && !d.pressed && wss.length === 1) due.push({ src, d, ws: wss[0] });
457
486
  }
458
487
  const byWs = new Map();
459
488
  for (const x of due) { const a = byWs.get(x.ws) || []; a.push(x); byWs.set(x.ws, a); }
@@ -463,18 +492,22 @@ function create(host) {
463
492
  }
464
493
  }
465
494
  /** Start `srcs` (sources) for a scheduled run: in one shared session when two or more share a workspace and the host can, else each
466
- * alone. `wsOf(id)` names each one's workspace. → [id] that started */
495
+ * alone. `wsOf(id)` names each one's workspaces (wsFor): a source with none is left out, one with several starts alone in each.
496
+ * → [id] that started */
467
497
  function startMany(srcs, wsOf, opts) {
468
498
  const list = srcs.filter(Boolean);
469
- if (list.length < 2) return list.filter((x) => start(x, wsOf(x.id), opts).ok).map((x) => x.id);
470
- const byWs = new Map();
471
- for (const x of list) { const w = wsOf(x.id); const a = byWs.get(w) || []; a.push(x); byWs.set(w, a); }
472
- const begun = [];
499
+ const byWs = new Map(); const begun = new Set();
500
+ for (const x of list) {
501
+ const ws0 = [].concat(wsOf(x.id) || []);
502
+ if (ws0.length > 1) { for (const w of ws0) if (start(x, w, opts).ok) begun.add(x.id); continue; }
503
+ if (!ws0.length) continue;
504
+ const a = byWs.get(ws0[0]) || []; a.push(x); byWs.set(ws0[0], a);
505
+ }
473
506
  for (const [w, a] of byWs) {
474
- if (a.length === 1) { if (start(a[0], w, opts).ok) begun.push(a[0].id); continue; }
475
- if (startTogether(a.map((src) => ({ src, ...opts })), w).ok) begun.push(...a.map((x) => x.id));
507
+ if (a.length === 1) { if (start(a[0], w, opts).ok) begun.add(a[0].id); continue; }
508
+ if (startTogether(a.map((src) => ({ src, ...opts })), w).ok) for (const x of a) begun.add(x.id);
476
509
  }
477
- return begun;
510
+ return [...begun];
478
511
  }
479
512
  /** One shared session for `items` ([{ src, trigger, slot, note }]) in workspace `ws`. A session that does not start is written as a
480
513
  * failed run of each source, the same as start() does for one. */
@@ -557,7 +590,10 @@ function create(host) {
557
590
  R.writeState(dir, state);
558
591
  return { ok: true, source: id, waiting: busy, inputs: startedInputs };
559
592
  }
560
- const r = start(src, ws || (set.sources[id] && set.sources[id].ws) || host.homeWs(), { trigger: 'pressed' });
593
+ const wss = wsFor(id, ws || (set.sources[id] && set.sources[id].ws) || host.homeWs());
594
+ if (!wss.length) return { ok: false, status: 409, error: NOTHING_TO_READ };
595
+ let r = null;
596
+ for (const w of wss) { const r1 = start(src, w, { trigger: 'pressed' }); if (!r || (!r.ok && r1.ok)) r = r1; }
561
597
  return r.ok ? { ok: true, source: id, started: 'session', session: r.session, inputs: startedInputs } : { ok: false, status: r.status || 500, error: r.error };
562
598
  }
563
599
  const job = host.jobs && host.jobs[id];
@@ -684,8 +720,11 @@ function create(host) {
684
720
  const started = []; const already = []; const failed = [];
685
721
  for (const id of reads) {
686
722
  if (running(R.readState(dir)[id])) { already.push(id); continue; }
687
- const r = start(R.BY_ID.get(id), (set.sources[id] && set.sources[id].ws) || ws || host.homeWs(), { trigger: 'pressed', note: 'Refresh all' });
688
- (r.ok ? started : failed).push(id);
723
+ const wss = wsFor(id, (set.sources[id] && set.sources[id].ws) || ws || host.homeWs());
724
+ if (!wss.length) continue; // nothing to read in any workspace: not a failure
725
+ let ok = false;
726
+ for (const w of wss) if (start(R.BY_ID.get(id), w, { trigger: 'pressed', note: 'Refresh all' }).ok) ok = true;
727
+ (ok ? started : failed).push(id);
689
728
  }
690
729
  for (const id of derivedNow) {
691
730
  const st = R.readState(dir);
@@ -61,20 +61,29 @@ function runsRead(ctx, now) {
61
61
  /** The Jira readings of a board: every snapshot of its linked initiatives, then the whole-sprint read (the newer one for sprints). */
62
62
  function readingsOf(w, jiraStatus) {
63
63
  const R = new Map(); let readAt = null; const sprintKeys = [];
64
- const add = (t) => { if (t && t.key) R.set(String(t.key).toUpperCase(), { ...(R.get(String(t.key).toUpperCase()) || {}), ...t }); };
64
+ const at = new Map(); // key -> when its reading was fetched: an older read never overwrites a newer one
65
+ const ms = (x) => Date.parse(x || '') || 0;
66
+ const add = (t, when) => {
67
+ if (!t || !t.key) return false;
68
+ const k = String(t.key).toUpperCase();
69
+ if (at.has(k) && at.get(k) > ms(when)) return false;
70
+ R.set(k, { ...(R.get(k) || {}), ...t }); at.set(k, ms(when)); return true;
71
+ };
65
72
  try {
66
73
  for (const q of jiraStatus.linkedInitiatives(w.root).filter((x) => x.linked)) {
67
74
  const s = jiraStatus.readSnapshot(w.root, q.initiative);
68
75
  if (!s) continue;
69
76
  if (s.fetchedAt && (!readAt || s.fetchedAt < readAt)) readAt = s.fetchedAt;
70
- for (const t of s.tickets.values()) add(t);
77
+ for (const t of s.tickets.values()) add(t, s.fetchedAt);
71
78
  }
72
79
  } catch { /* no reading yet */ }
73
80
  try {
74
81
  const whole = jiraStatus.readSprints(w.root);
75
82
  if (whole) {
83
+ // bug 2026-11-19: a whole-sprint read from 28 Oct overwrote the tickets read today, so the band still showed Sprint 116 as active.
84
+ // It now fills in only the tickets it read later than their initiative's snapshot (and the sprint's other tickets).
76
85
  if (whole.fetchedAt && (!readAt || whole.fetchedAt < readAt)) readAt = whole.fetchedAt;
77
- for (const t of whole.tickets.values()) { add(t); if (t.sprint && t.sprint.name && t.sprint.state !== 'closed') sprintKeys.push(String(t.key).toUpperCase()); }
86
+ for (const t of whole.tickets.values()) { if (add(t, whole.fetchedAt) && t.sprint && t.sprint.name && t.sprint.state !== 'closed') sprintKeys.push(String(t.key).toUpperCase()); }
78
87
  }
79
88
  } catch { /* no whole-sprint read */ }
80
89
  return { R, readAt, sprintKeys };
@@ -303,4 +312,4 @@ async function handle(req, res, url, ctx) {
303
312
  return send({ status: 200, body: { ok: true } });
304
313
  }
305
314
 
306
- module.exports = { prefixes: ['/api/backlog'], handle, listOf, specOf };
315
+ module.exports = { prefixes: ['/api/backlog'], handle, listOf, specOf, readingsOf };
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.627.0",
3
+ "version": "0.629.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pmos-workspace",
9
- "version": "0.627.0",
9
+ "version": "0.629.0",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@anthropic-ai/sdk": "^1.3.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.627.0",
3
+ "version": "0.629.0",
4
4
  "private": true,
5
5
  "description": "PMOS Terminal Workspace — local companion hosting real PTYs beside the library and gates (D62)",
6
6
  "license": "MIT",
@@ -86,7 +86,7 @@
86
86
  .c3 .ini-pager{justify-content:flex-end}
87
87
  .c3 .ini-chk{display:flex;gap:8px;align-items:flex-start;font-size:var(--fs-body);cursor:pointer;line-height:var(--lh-body);}
88
88
  .c3 .ini-chk input{margin-top:2px;flex:none}
89
- .c3 .ini-chk.done span{color:var(--muted-foreground);text-decoration:line-through}
89
+ .c3 .ini-chk.done span{color:var(--muted-foreground)}
90
90
  .c3 .ini-grow{flex:1 1 auto}
91
91
  .c3 .ini-field{display:grid;gap:6px}
92
92
  .c3 .ini-form{display:grid;gap:var(--sp-3)}
@@ -403,8 +403,6 @@
403
403
  }
404
404
  .pmc-row--done .pmc-row__title {
405
405
  color: var(--muted-foreground);
406
- text-decoration: line-through;
407
- text-decoration-thickness: 1px;
408
406
  }
409
407
  /* compact: one line for the title and one for the meta, cut with an ellipsis (a narrow list, such as the dock's) */
410
408
  .pmc-row--compact .pmc-title__text,
@@ -3246,7 +3244,6 @@
3246
3244
  }
3247
3245
  .fr-ed__check[data-done="yes"] .fr-ed__check-t {
3248
3246
  color: var(--muted-foreground);
3249
- text-decoration: line-through;
3250
3247
  }
3251
3248
  .fr-ed__end {
3252
3249
  margin-top: 8px;
@@ -3723,7 +3720,7 @@
3723
3720
  .td-day__todo { margin: 0; padding: 7px 10px; border-left: 3px solid var(--foreground); background: var(--muted); font-size: var(--fs-body); line-height: 1.45; color: var(--foreground); }
3724
3721
  .td-day__steps2 { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
3725
3722
  .td-day__step2 { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 8px; border: 1px solid var(--border); background: var(--background); }
3726
- .td-day__step2[data-done="true"] .td-day__steprow { text-decoration: line-through; color: var(--muted-foreground); }
3723
+ .td-day__step2[data-done="true"] .td-day__steprow { color: var(--muted-foreground); }
3727
3724
  .td-day__marks { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 8px; border-top: 1px solid var(--border); }
3728
3725
  .td-day__grow { flex: 1 1 0; }
3729
3726
  .td-day__mark { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 6px 10px; border: 1px solid var(--border); background: var(--muted); font-size: var(--fs-body); line-height: var(--lh-body); }
@@ -991,7 +991,7 @@
991
991
  .c3 .c3steps li .c3sg{color:var(--muted-foreground);padding-top:2px}
992
992
  .c3 .c3steps li.ok .c3sg{color:var(--success)}
993
993
  .c3 .c3steps li.warn .c3sg{color:var(--warning)}
994
- .c3 .c3stt.dn{text-decoration:line-through;color:var(--muted-foreground)}
994
+ .c3 .c3stt.dn{color:var(--muted-foreground)}
995
995
  .c3 .c3res{display:block;font-size:var(--fs-meta);margin-top:2px;line-height:var(--lh-meta);}
996
996
  .c3 .c3sd{grid-column:1/-1;border-left:2px solid var(--border);padding-left:var(--sp-3)}
997
997
  .c3 .c3jf{display:grid;gap:var(--sp-2)}
@@ -1491,7 +1491,7 @@
1491
1491
  .c3 .c3all{display:grid;gap:var(--sp-2);font-size:var(--fs-meta);line-height:var(--lh-meta);}
1492
1492
  .c3 .c3all>div{display:grid;grid-template-columns:64px minmax(0,1fr);gap:var(--sp-2);align-items:baseline}
1493
1493
  .c3 .c3all>div>span:last-child{display:grid;gap:2px}
1494
- .c3 .c3all .dn{text-decoration:line-through;color:var(--muted-foreground)}
1494
+ .c3 .c3all .dn{color:var(--muted-foreground)}
1495
1495
  .c3 .c3all>div.hd{grid-template-columns:1fr;font-size:var(--fs-meta);line-height:var(--lh-meta);}
1496
1496
  .c3 .c3jnew{list-style:none;padding:var(--sp-2) 0}
1497
1497
  /* the More menu hangs off the page root, fixed under its button: no ancestor can clip it or stack over it */
@@ -109,7 +109,7 @@ button.pp-ck:focus-visible { outline: 2px solid var(--cz-blue); outline-offset:
109
109
  .pp-nd .k { font-size: var(--fs-badge); font-weight: var(--fw-strong); color: var(--cz-ink3); flex: none; line-height: var(--lh-badge); }
110
110
  .pp-nd.l2 { padding-left: 36px; }
111
111
  .pp-nd.q .x { color: var(--cz-ink3); font-weight: var(--fw-strong); }
112
- .pp-nd.dn .x { color: var(--cz-ink3); text-decoration: line-through; }
112
+ .pp-nd.dn .x { color: var(--cz-ink3); }
113
113
  /* an initiative's or an epic's task: a row that opens in Home; "N more tasks" opens the Tasks tab */
114
114
  a.pp-nd.pp-tk { color: inherit; text-decoration: none; }
115
115
  a.pp-nd.pp-tk:hover .x, .pp-nd.pp-more:hover { color: var(--cz-blueink); }
@@ -1,6 +1,9 @@
1
1
  /* pm/cozy-pop-work.css — what the popup shows for work (slice 3 of the six-place navigation; boards 3, 20, 21, 22, 25, 26, 27). pm/cozy-pop-work.js draws
2
2
  * it. One container: the popup's white panel; each table sits in one card with a thin border; the Overview is one grey box. Tokens: cozy.css. */
3
3
  .pw { container-type: inline-size; display: flex; flex-direction: column; gap: 22px; padding: 4px 4px 32px; font-family: var(--cz-sans); font-size: var(--fs-body); line-height: var(--lh-body, 1.5); color: var(--cz-ink); }
4
+ /* the popup's work fills the popup (Wawan, 2026-11-19: "should occupy the space"): the wide Viewer's 300 px side column and 75ch cap are for
5
+ * a summary beside a page; the work has no summary there, so it takes the whole width. Long lines of prose keep a readable cap (.pw-ot) */
6
+ .cz-vw-w2 .cz-vw-body > .pw, .cz-vw-w2 .cz-vw-body > .pw ~ * { grid-column: 1 / -1; grid-row: auto; max-width: none; }
4
7
  .pw h3 { margin: 0; font-size: var(--fs-section); font-weight: var(--fw-strong); color: var(--cz-ink); }
5
8
  .pw h4 { margin: 8px 0 6px; font-size: var(--fs-row); font-weight: var(--fw-strong); }
6
9
  .pw .warn { color: var(--cz-late); }
@@ -64,8 +67,9 @@ button.pw-fv:hover { background: var(--cz-well); }
64
67
 
65
68
  /* the breakdown: rows on the left, the timeline on the right (boards 3, 20) */
66
69
  /* the timeline's width (round 3 point 1): the grip sets --pw-tlw; the item columns keep 220 px (the name), the timeline 240 px. Status and Date
67
- * give way first as the timeline grows (minmax(0, …)), so the name always shows */
68
- .pw-wbs { --pw-tl: clamp(240px, var(--pw-tlw, 36%), calc(100% - 220px)); position: relative; }
70
+ * give way first as the timeline grows (minmax(0, …)), so the name always shows. In a wide popup the timeline takes what is left after
71
+ * 640 px for the item, Status and Date, so the extra width goes to the bars */
72
+ .pw-wbs { --pw-tl: clamp(240px, var(--pw-tlw, max(36%, 100% - 640px)), calc(100% - 220px)); position: relative; }
69
73
  .pw-tr { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(0, 112px) minmax(0, 168px) var(--pw-tl); align-items: stretch; min-height: 40px; border-top: 1px solid var(--cz-hair); }
70
74
  .pw-wbs.nost .pw-tr { grid-template-columns: minmax(220px, 1fr) minmax(0, 168px) var(--pw-tl); }
71
75
  .pw-wbs.nodt .pw-tr { grid-template-columns: minmax(220px, 1fr) minmax(0, 112px) var(--pw-tl); }
@@ -98,7 +102,7 @@ body.pw-drag, body.pw-drag * { cursor: col-resize !important; user-select: none;
98
102
  .pw-kr .pw-it { padding-left: 38px !important; }
99
103
  .pw-bul { width: 5px; height: 5px; border-radius: 99px; background: var(--cz-ink); flex: none; }
100
104
  .pw-bul.ms { width: 7px; height: 7px; border-radius: 1px; transform: rotate(45deg); background: none; box-shadow: 0 0 0 1.5px var(--cz-ink) inset; }
101
- .pw-kr.done .pw-tt { color: var(--cz-ink3); text-decoration: line-through; }
105
+ .pw-kr.done .pw-tt { color: var(--cz-ink3); } /* done is told by the muted colour, never a strikethrough (Wawan, 2026-11-19) */
102
106
  .pw-tt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 0; background: none; font: inherit; color: var(--cz-ink); padding: 2px 0; text-align: left; cursor: text; }
103
107
  .pw-namei { flex: 1; min-width: 0; font: inherit; color: var(--cz-ink); border: 1px solid var(--cz-blue); border-radius: 8px; padding: 3px 8px; background: var(--cz-card); }
104
108
  .pw-ib.hov { opacity: 0; }
@@ -191,7 +195,7 @@ body.pw-drag, body.pw-drag * { cursor: col-resize !important; user-select: none;
191
195
  .pw-ols { display: flex; flex-direction: column; gap: 6px; }
192
196
  .pw-ol { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; align-items: baseline; }
193
197
  .pw-ok { font-size: var(--fs-meta); font-weight: var(--fw-strong); color: var(--cz-ink2); }
194
- .pw-ot { margin: 0; font-size: var(--fs-row); color: var(--cz-ink); }
198
+ .pw-ot { margin: 0; max-width: 110ch; font-size: var(--fs-row); color: var(--cz-ink); }
195
199
  .pw-otx { cursor: text; border-radius: 4px; }
196
200
  .pw-otx:hover { background: var(--cz-card); box-shadow: 0 0 0 3px var(--cz-card); }
197
201
  .pw-otx:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 2px; }
@@ -98,7 +98,7 @@ button.td-t:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 2
98
98
  .td-ib:hover { background: var(--cz-card); color: var(--cz-ink); }
99
99
  .td-ib:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 1px; }
100
100
  .td-ib:disabled { opacity: .45; cursor: default; }
101
- .td-r.done .td-t, .td-r.done .td-w, .td-r.done .td-k { color: var(--cz-ink3); font-weight: var(--fw-regular); text-decoration: line-through; text-decoration-color: var(--cz-hair); }
101
+ .td-r.done .td-t, .td-r.done .td-w, .td-r.done .td-k { color: var(--cz-ink3); font-weight: var(--fw-regular); }
102
102
  .td-r.done .td-b i { color: var(--cz-ink3); }
103
103
 
104
104
  /* a suggestion under its row: ✦ and one sentence, ✓ ✕ */
@@ -132,7 +132,7 @@ body.cz-home .hm-r.lr .hm-tile { width: 32px; height: 32px; }
132
132
  .hm-ck { flex: none; width: 32px; height: 32px; margin: 0 -10px 0 4px; display: grid; place-items: center; border: 0; background: none; padding: 0; cursor: pointer; border-radius: 10px; z-index: 1; }
133
133
  .hm-ck.wait { cursor: default; }
134
134
  .hm-ck.wait i { width: 7px; height: 7px; border-radius: 50%; background: var(--cz-c-c5c9d0); }
135
- .hm-r.lr.done .hm-rt b { color: var(--cz-ink3); text-decoration: line-through; }
135
+ .hm-r.lr.done .hm-rt b { color: var(--cz-ink3); }
136
136
  .hm-nest { margin: 0 0 4px 26px; padding-left: 8px; border-left: 2px solid var(--cz-hair); }
137
137
  .hm-r.lr.sel { background: var(--cz-card); box-shadow: 0 6px 18px -10px var(--cz-c-9da3ac); }
138
138
  @media (hover: hover) { body.cz-home .hm-r.lr:hover { background: var(--cz-well2); } body.cz-home .hm-r.lr.sel:hover { background: var(--cz-card); } .hm-tg:hover { background: var(--cz-well); } }
@@ -58,7 +58,7 @@
58
58
  .hi-trow.drag { opacity: .5; }
59
59
  .hi-tt { flex: 1; min-width: 0; border: 0; background: none; padding: 0; font: inherit; color: var(--cz-ink); text-align: left; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
60
60
  .hi-tt em { font-style: normal; color: var(--cz-ink3); font-size: var(--fs-meta); line-height: var(--lh-meta); }
61
- .hi-trow.done .hi-tt { text-decoration: line-through; color: var(--cz-ink3); }
61
+ .hi-trow.done .hi-tt { color: var(--cz-ink3); }
62
62
  .hi-pill { display: inline-flex; align-items: center; height: 20px; padding: 0 9px; border-radius: 999px; font: inherit; font-size: var(--fs-badge); font-weight: var(--fw-strong); background: var(--cz-well); color: var(--cz-ink2); white-space: nowrap; border: 0; flex: none; line-height: var(--lh-badge); }
63
63
  button.hi-pill { cursor: pointer; }
64
64
  .hi-pill.ok { background: var(--cz-okbg); color: var(--cz-ok); }
@@ -101,7 +101,7 @@
101
101
  .cf.editing .chk{cursor:pointer}
102
102
  .chk[aria-checked="true"]{background:var(--vw-lnk);border-color:var(--vw-lnk)}
103
103
  .chk[aria-checked="true"]::after{content:"";width:8px;height:4px;border:2px solid var(--card-solid);border-top:0;border-right:0;transform:rotate(-45deg) translate(1px,-1px)}
104
- .tasks li[data-done="true"]>span:last-child{text-decoration:line-through;color:var(--ink-3)}
104
+ .tasks li[data-done="true"]>span:last-child{color:var(--ink-3)}
105
105
  .xp{border:1px solid var(--hair);border-radius:6px;margin:0 0 14px}
106
106
  .xp summary{cursor:pointer;padding:7px 12px;font-weight:var(--fw-regular);list-style:none;display:flex;gap:8px;align-items:center}
107
107
  .xp summary::-webkit-details-marker{display:none}
@@ -30,7 +30,7 @@
30
30
  .ntd li{margin:2px 0}
31
31
  .ntd li.task{display:flex;align-items:baseline;gap:8px}
32
32
  .ntd li.task input{flex:none;width:16px;height:16px;margin:0;transform:translateY(2px);accent-color:var(--solid);cursor:pointer}
33
- .ntd li.task.done>span{text-decoration:line-through;color:var(--ink-3)}
33
+ .ntd li.task.done>span{color:var(--ink-3)}
34
34
  .ntd b,.ntd strong{font-weight:var(--fw-strong)}
35
35
  .ntd code{font:var(--fw-regular) var(--fs-meta)/var(--lh-meta) var(--mono);background:var(--well);padding:1px 4px;border-radius:6px}
36
36
  .ntd blockquote{margin:0 0 8px;padding-left:12px;border-left:3px solid var(--hair);color:var(--ink-2)}
@@ -204,7 +204,7 @@ a.round{color:inherit;text-decoration:none}
204
204
  @media (max-width:700px){#movesCap{display:block!important;order:9;flex:1 1 100%;margin:0 0 0 58px;text-align:left}
205
205
  .mprog{margin-top:8px}}
206
206
  .rr.done .rt,.rr.done .rs,.rr.done .sug{opacity:.45}
207
- .rr.done .rt{text-decoration:line-through}
207
+ .rr.done .rt{color:var(--ink-3)}
208
208
  /* premium-simple-ui #5: a "What you need to do" row is two lines, the title then "subject · next step", with a chevron. The pin sits beside the chevron. */
209
209
  .rr .rs{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:4px}
210
210
  .rr .rhd{padding-right:100px!important}
@@ -545,7 +545,7 @@ a.round{color:inherit;text-decoration:none}
545
545
  .wck:hover{transform:scale(1.08);color:var(--ink-3)}
546
546
  .wck[aria-pressed="true"]{background:var(--solid);color:var(--on-solid);box-shadow:none}
547
547
  .wck.dec{box-shadow:inset 0 0 0 1.8px var(--ember)}.wck.dec:hover{color:var(--ember-ink)}
548
- .wrow.done .wtit,.wrow.done .ws{opacity:.45}.wrow.done .wtit{text-decoration:line-through}
548
+ .wrow.done .wtit,.wrow.done .ws{opacity:.45}
549
549
  .acc{display:inline-flex;align-items:center;gap:7px;height:34px;padding:0 14px 0 11px;border-radius:999px;background:var(--solid);color:var(--on-solid);font-size:var(--fs-label);font-weight:var(--fw-strong);white-space:nowrap;transition:transform .35s var(--spring);line-height:var(--lh-label);}
550
550
  .acc:hover{transform:translateY(-1px)}.acc:active{transform:scale(.96)}.acc svg{width:15px;height:15px;stroke-width:2.6}
551
551
  .empty3{display:flex;align-items:center;gap:10px;padding:16px 0 8px;font-size:var(--fs-body);color:var(--ink-2);line-height:var(--lh-body);}.empty3 svg{color:var(--ok);stroke-width:2.6;width:18px;height:18px}
@@ -73,7 +73,7 @@
73
73
  .cz-vw-chk.s-wont .bx, .cz-vw-chk.s-arch .bx { border-color: var(--cz-hair); background: var(--cz-well); }
74
74
  .cz-vw-chk:not(:disabled):hover .bx { border-color: var(--cz-blue); }
75
75
  /* Done, Won't do and Archived: the title goes quiet (canvas XetX1Done) */
76
- #czViewer:has(.cz-vw-chk.s-done) .cz-vw-title, #czViewer:has(.cz-vw-chk.s-done) .cz-vw-rn { color: var(--cz-ink3); text-decoration: line-through; text-decoration-color: var(--cz-ink3); }
76
+ #czViewer:has(.cz-vw-chk.s-done) .cz-vw-title, #czViewer:has(.cz-vw-chk.s-done) .cz-vw-rn { color: var(--cz-ink3); }
77
77
 
78
78
  /* phone: the same card, full screen (canvas OvViewers "Phone") */
79
79
  @media (max-width: 760px) {
@@ -11,7 +11,7 @@
11
11
  .tkv-ac li::before { content: ""; position: absolute; left: 4px; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--cz-ink3); }
12
12
  .tkv-sub li { display: flex; align-items: center; gap: 8px; color: var(--cz-ink2); }
13
13
  .tkv-sub li.d { color: var(--cz-ink3); }
14
- .tkv-sub li.d span { text-decoration: line-through; }
14
+ .tkv-sub li.d span { color: var(--cz-ink3); }
15
15
  .tkv-ln li { display: flex; align-items: baseline; gap: 8px; }
16
16
  .tkv-ln em { font-style: normal; color: var(--cz-ink3); font-size: var(--fs-meta); min-width: 72px; line-height: var(--lh-meta); }
17
17
  .tkv-ln button { border: 0; background: transparent; padding: 0; font: inherit; color: var(--cz-blueink); cursor: pointer; text-align: left; }
@@ -3311,10 +3311,13 @@ function healthTick(now = Date.now()) {
3311
3311
  // data-refresh-settings: the refresh engine. It starts the skill sources that are due (calendar, Jira, work assigned to you, tracker,
3312
3312
  // the morning brief), writes the refresh log, and gates the job ticks below: a job that is off, or whose input is still running, waits.
3313
3313
  const REFRESH_BOOT = Date.now();
3314
+ const jiraWorkspaces = require('./lib/jira-workspaces.js').create({ workspaces: () => [...workspaces.values()], home: () => { const h = homeWorkspace(); return h ? h.id : null; } });
3314
3315
  refreshRun = refreshRunLib.create({
3315
3316
  stateDir: STATE,
3316
3317
  now: () => { const t = process.env.PMOS_REFRESH_NOW ? Date.parse(process.env.PMOS_REFRESH_NOW) : NaN; return Number.isFinite(t) ? t + (Date.now() - REFRESH_BOOT) : Date.now(); },
3317
3318
  homeWs: () => { const h = homeWorkspace(); return h ? h.id : null; },
3319
+ // bug 2026-11-19: the Jira read goes to the workspaces whose initiatives have Jira tickets or linked epics, not to home
3320
+ sourceWs: (id) => (id === 'jira' ? jiraWorkspaces.list() : null),
3318
3321
  proactive: () => proSettings(),
3319
3322
  schedules: { read: readSchedules, write: writeSchedules },
3320
3323
  startSkill: (wsId, skill, name, origin, opts) => startSkillSession(wsId, skill, name, origin, opts),
@@ -24,7 +24,7 @@ Rules that always hold:
24
24
  Procedure:
25
25
  0. Ask first, when the task names no initiative. Run `pmos refresh since jira`. If it says "read in full", go to step 1. If it says "ask first", note the number of minutes it prints. Run `pmos jira query` and `pmos jira query --sprints`, and run each search they print with ` AND updated >= -<minutes>m` added (put the search in brackets first), asking only for the key field and one result. If no search returns an issue, run `pmos refresh same jira`, finish with "Checked: no change in Jira in the last <minutes> minutes", and stop. If any search returns an issue, or a search fails, go to step 1 and read in full.
26
26
  1. If the task names one initiative ("This check: initiative …"), check that one only: run `pmos jira query <initiative>`. Otherwise run `pmos jira query`: each line is an initiative id, a tab and the Jira search (JQL) to run for it. An initiative PMOS pushed no ticket for, but which is linked to Jira epics, gets a search for those epics and the issues under them. If no initiative has a ticket or an epic in Jira, say so in one line and stop.
27
- 2. For each initiative, run its search with the Jira search tool and the fields in rule 3, at most 50 issues per page. The sprint is usually a custom field named "Sprint" (often `customfield_10020`); ask for it by name. Story points are also a custom field, named "Story Points" or "Story point estimate" (often `customfield_10016`); ask for it by name. Fetch every page.
27
+ 2. For each initiative, run its search with the Jira search tool and the fields in rule 3, at most 50 issues per page. The sprint is a custom field named "Sprint" whose id differs per site (often `customfield_10020`, on some sites `customfield_10004`). If the first page comes back with no Sprint field, ask once for every field of one issue (`*all`), find the field whose value is a list of sprints (each with a name and a state), and ask for that id from then on. Story points are also a custom field, named "Story Points" or "Story point estimate" (often `customfield_10016`); ask for it by name. Fetch every page.
28
28
  3. Save the result as JSON in the scratch folder, for example `<scratch>/jira-<initiative>.json`, as a list with one object per issue:
29
29
  `{"key", "summary", "status", "category", "type", "parent", "sprint", "subtasks", "points", "resolved", "flagged", "reason", "url"}`
30
30
  - `type`: the issue type's name, for example `Epic`, `Story`, `Task` or `Bug`.
@@ -201,8 +201,8 @@ async function pure() {
201
201
  ok('D2 Undo puts the old status back through the same route', await until(async () => (await view(p)).on === 'To do') && last(A, '/api/boards/tasks/state').body.state === 'To do');
202
202
  // the check box: the quick Done
203
203
  await p.click('#czViewer .cz-vw-chk');
204
- ok('D3 the check box marks it Done: the card follows, the late text is gone, the title goes quiet', await until(async () => { const x = await view(p); return x.on === 'Done' && /s-done/.test(x.chk.cls) && x.chk.label === 'Mark not done' && !/late/.test(x.late); })
205
- && await p.evaluate(() => getComputedStyle(document.querySelector('#czViewer .cz-vw-title')).textDecorationLine.includes('line-through')), JSON.stringify(await view(p)));
204
+ ok('D3 the check box marks it Done: the card follows, the late text is gone, the title goes quiet (muted, never struck through)', await until(async () => { const x = await view(p); return x.on === 'Done' && /s-done/.test(x.chk.cls) && x.chk.label === 'Mark not done' && !/late/.test(x.late); })
205
+ && await p.evaluate(() => { const c = getComputedStyle(document.querySelector('#czViewer .cz-vw-title')); return !c.textDecorationLine.includes('line-through') && c.color !== getComputedStyle(document.body).color; }), JSON.stringify(await view(p)));
206
206
  await shot(p, 'task-done-1440', '#czViewer');
207
207
  await p.click('#czViewer .cz-vw-chk');
208
208
  await until(async () => (await view(p)).on === 'To do');