create-pmos 0.420.0 → 0.422.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.
Files changed (88) hide show
  1. package/package.json +25 -25
  2. package/payload/KIT-VERSION +1 -1
  3. package/payload/planning/evals/eval-calibration.md +1 -1
  4. package/payload/planning/okrs/health-budgets.md +1 -1
  5. package/payload/scripts/anchor-resolve.js +93 -15
  6. package/payload/state/discoveries.md +1 -1
  7. package/workspace/board-programs-test.js +59 -3
  8. package/workspace/briefing-premium-board-test.js +1 -1
  9. package/workspace/changelog.json +24 -0
  10. package/workspace/fixtures/report-api/draft.json +2 -1
  11. package/workspace/guide/briefing-premium.md +2 -1
  12. package/workspace/guide/home.md +6 -2
  13. package/workspace/guide/programs.md +4 -3
  14. package/workspace/home-other-product-test.js +55 -0
  15. package/workspace/lib/board-premium.js +18 -4
  16. package/workspace/lib/briefing-premium-agent.js +8 -0
  17. package/workspace/lib/doc-live-root.js +37 -0
  18. package/workspace/lib/engine/anchor-resolve.js +93 -15
  19. package/workspace/lib/engine/boards.js +7 -2
  20. package/workspace/lib/engine/intake.js +1 -1
  21. package/workspace/lib/first-input.js +13 -6
  22. package/workspace/lib/hold-spans.js +24 -10
  23. package/workspace/lib/kg.js +1 -1
  24. package/workspace/lib/report-draft.js +3 -0
  25. package/workspace/lib/route-modules.js +1 -0
  26. package/workspace/lib/routes-board-premium.js +6 -0
  27. package/workspace/lib/routes-boards.js +48 -9
  28. package/workspace/lib/routes-doc-sheet.js +29 -1
  29. package/workspace/lib/routes-programs.js +44 -5
  30. package/workspace/lib/routes-task-plans.js +333 -0
  31. package/workspace/lib/task-cli.js +16 -9
  32. package/workspace/lib/task-items.js +1 -1
  33. package/workspace/lib/task-plans.js +232 -0
  34. package/workspace/lib/transcript-read.js +29 -1
  35. package/workspace/lib/vendor/scripts/anchor-resolve.js +93 -15
  36. package/workspace/lib/vendor/scripts/intake.js +1 -1
  37. package/workspace/package-lock.json +2 -2
  38. package/workspace/package.json +1 -1
  39. package/workspace/premium-viewer-test.js +1 -1
  40. package/workspace/premium-vw-doc-test.js +26 -3
  41. package/workspace/program-leave-test.js +203 -0
  42. package/workspace/public/pm/bd-acts.js +5 -2
  43. package/workspace/public/pm/bd-ini-panel.js +20 -7
  44. package/workspace/public/pm/bd-prog-panel.js +22 -7
  45. package/workspace/public/pm/bd-span.js +177 -24
  46. package/workspace/public/pm/cozy-board.css +80 -0
  47. package/workspace/public/pm/cozy-home.css +3 -0
  48. package/workspace/public/pm/cozy-live-pill.js +1 -1
  49. package/workspace/public/pm/cozy-nav.js +1 -1
  50. package/workspace/public/pm/cozy-steps.js +1 -1
  51. package/workspace/public/pm/cozy-xv.js +1 -1
  52. package/workspace/public/pm/doc-follow.js +36 -0
  53. package/workspace/public/pm/home-app.js +38 -7
  54. package/workspace/public/pm/home-ask.js +7 -0
  55. package/workspace/public/pm/home-ini.js +13 -4
  56. package/workspace/public/pm/home-line.js +1 -1
  57. package/workspace/public/pm/home-list.js +2 -2
  58. package/workspace/public/pm/home-today.js +3 -1
  59. package/workspace/public/pm/ini-tasks.js +81 -16
  60. package/workspace/public/pm/ini-versions.js +343 -0
  61. package/workspace/public/pm/ini-view-model.js +27 -41
  62. package/workspace/public/pm/ini-view.css +82 -0
  63. package/workspace/public/pm/ini-view.js +18 -11
  64. package/workspace/public/pm/premium-board.js +109 -18
  65. package/workspace/public/pm/premium-insights.js +1 -1
  66. package/workspace/public/pm/premium-mtg-present.js +2 -2
  67. package/workspace/public/pm/premium-report-read.js +21 -2
  68. package/workspace/public/pm/premium-report-tab.js +1 -1
  69. package/workspace/public/pm/premium-shell.js +29 -4
  70. package/workspace/public/pm/premium-viewer.js +3 -3
  71. package/workspace/public/pm/premium-vw-doc.js +46 -11
  72. package/workspace/public/pm/premium-vw-mtg.js +1 -1
  73. package/workspace/public/pm/premium-vw-open.js +1 -1
  74. package/workspace/public/pm/premium-vw-slides.js +1 -1
  75. package/workspace/public/pm/prog-move.js +69 -0
  76. package/workspace/public/pm/prog-order.js +1 -1
  77. package/workspace/public/pm/task-card.css +3 -0
  78. package/workspace/public/pm/task-card.js +10 -3
  79. package/workspace/public/pm/tk-send.js +1 -1
  80. package/workspace/server.js +26 -2
  81. package/workspace/task-milestones-test.js +176 -0
  82. package/workspace/task-plans-test.js +175 -0
  83. package/workspace/task-views-test.js +2 -2
  84. package/workspace/test-lists/program-leave.json +6 -0
  85. package/workspace/test-lists/task-milestones.json +6 -0
  86. package/workspace/test-lists/task-plans.json +6 -0
  87. package/workspace/test-lists/viewer-live-file.json +9 -0
  88. package/workspace/timeline-holds-test.js +70 -5
@@ -0,0 +1,175 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+ /* task-plans-test.js — planned versus actual on the real pages (feedback batch 11 item 8; canvas In development, row "Planned vs actual":
4
+ * PvaAC1Live, PvaAC2Menu, PvaAC3Draft, PvaAC4Board, PvaAC5Phone). Serves the real Board page from the real server; GET /api/board-premium
5
+ * answers fixtures/board-premium-facts.js with tasks, decorated by lib/task-plans.js from a saved plan and drafts. The page's clock is the
6
+ * fixture's (17 Oct 2026). The writes are answered here: nothing reaches a ledger.
7
+ * B Board timeline: the plan's thin line under the bar, the slip after the end date, a draft-only initiative dashed with its drafts named,
8
+ * the legend's To do, Plan and Draft
9
+ * V the initiative's Tasks timeline: the chip "Live" with the count of drafts, the end slip chip, a plan line only where the dates differ,
10
+ * ⊕ after a task added after the plan, a dropped task keeps only its line
11
+ * M the chip's menu right under it: Show (Live, drafts, New draft from Live), Compare with (plans, Nothing, Save Live as a plan)
12
+ * D a draft: the chip names it in blue, its bars are dashed, the seal "Make … live" shows; its summary, then ✓ posts Make live
13
+ * P a phone: the menu opens as a bottom sheet
14
+ * SHOTS=<dir> writes the screenshots there. */
15
+ const path = require('path');
16
+ const fs = require('fs');
17
+ const { spawn } = require('child_process');
18
+ const { findBrowser } = require('./lib/find-browser');
19
+ const T = require('./test-run').configure({ name: 'task-plans-ui' });
20
+ const BP = require('./lib/board-premium.js');
21
+ const F = require('./fixtures/board-premium-facts.js');
22
+ const TP = require('./lib/task-plans.js');
23
+
24
+ const BASE = T.BASE;
25
+ const SHOTS = process.env.SHOTS || '';
26
+ const results = [];
27
+ const ok = (name, cond, extra = '') => { results.push({ name, cond: !!cond }); console.log(`${cond ? '✓' : '✗'} ${name}${!cond && extra !== '' ? ' — ' + extra : ''}`); };
28
+ let srv = null; let browser = null;
29
+ const finish = async (code) => {
30
+ if (browser) await browser.close().catch(() => {});
31
+ if (srv) { try { srv.kill('SIGKILL'); } catch { /* gone */ } }
32
+ T.killTmux();
33
+ const bad = results.filter((x) => !x.cond).length;
34
+ console.log(`\n${results.length - bad}/${results.length} task-plans-ui assertions passed`);
35
+ process.exit(code !== undefined ? code : (bad ? 1 : 0));
36
+ };
37
+ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
38
+
39
+ /* the board: Partner API rate limits runs late against its plan; Usage-based billing has drafts only */
40
+ const task = (ini, uid, title, start, end, status = 'To do', o = {}) => ({ src: 'pmos', kind: 'Task', ini, uid, title, status, owner: 'Lee', start, end, ...o });
41
+ const ITEMS = [
42
+ task('partner-rate-limits', 'task-a', 'Draft the limits spec', '2026-10-05', '2026-10-20', 'In progress'),
43
+ task('partner-rate-limits', 'task-b', 'Ship the limits API', '2026-10-21', '2026-11-30'),
44
+ task('partner-rate-limits', 'task-c', 'Load test at 3x peak', '2026-11-10', '2026-11-20'),
45
+ task('partner-rate-limits', 'task-d', 'Offline docs', '2026-11-01', '2026-11-10', "Won't do"),
46
+ task('partner-rate-limits', 'task-e', 'Partner FAQ', '2026-11-02', '2026-11-06'),
47
+ ];
48
+ const plan = { at: '2026-10-02T10:00:00Z', kind: 'plan', plan: 'plan-1', board: 'w1', initiative: 'partner-rate-limits', name: 'Proposal A · Oct 2', source: 'draft',
49
+ tasks: [{ uid: 'task-a', title: 'Draft the limits spec', start: '2026-10-05', due: '2026-10-16' }, { uid: 'task-b', title: 'Ship the limits API', start: '2026-10-21', due: '2026-11-16' },
50
+ { uid: 'task-d', title: 'Offline docs', start: '2026-11-01', due: '2026-11-10' }, { uid: 'task-e', title: 'Partner FAQ', start: '2026-11-02', due: '2026-11-06' }] };
51
+ const copy = ITEMS.filter((x) => x.status !== "Won't do").map((x, i) => ({ ...TP.taskOfLive(x), k: 'c' + i }));
52
+ const LINES = [plan,
53
+ { at: '2026-10-15T09:00:00Z', kind: 'draft-new', draft: 'draft-c1', board: 'w1', initiative: 'partner-rate-limits', name: 'Change 1 · faster pilot', from: 'live', tasks: copy },
54
+ { at: '2026-10-15T09:01:00Z', kind: 'draft-task', draft: 'draft-c1', k: 'c1', set: { due: '2026-11-23' } },
55
+ { at: '2026-10-10T09:00:00Z', kind: 'draft-new', draft: 'draft-p', board: 'w1', initiative: 'usage-billing', name: 'Proposal A', auto: true, from: 'empty', tasks: [] },
56
+ { at: '2026-10-10T09:01:00Z', kind: 'draft-task', draft: 'draft-p', k: 'p1', add: { title: 'Interview 5 billing leads', start: '2026-10-26', due: '2026-11-06', status: 'To do' } },
57
+ { at: '2026-10-10T09:02:00Z', kind: 'draft-task', draft: 'draft-p', k: 'p2', add: { title: 'Metering service', start: '2026-11-09', due: '2027-01-29', status: 'To do' } },
58
+ { at: '2026-10-11T09:00:00Z', kind: 'draft-new', draft: 'draft-q', board: 'w1', initiative: 'usage-billing', name: 'Proposal B · lean', auto: false, from: 'draft-p', tasks: [{ k: 'q1', src: null, title: 'Metering, lean', start: '2026-11-02', due: '2026-12-18', status: 'To do' }] },
59
+ ];
60
+ function model() {
61
+ const m = BP.build(F.facts({ items: ITEMS.map((x) => ({ ...x })) }));
62
+ TP.decorate(m.rows, TP.fold(LINES));
63
+ for (const r of m.rows) if (r.id === 'partner-rate-limits') { r.start = '2026-10-05'; r.end = '2026-11-30'; }
64
+ return m;
65
+ }
66
+
67
+ (async () => {
68
+ const exe = findBrowser();
69
+ if (!exe) { console.log('✗ no Chrome/Chromium on this machine — the suite cannot run'); return finish(1); }
70
+ let chromium;
71
+ try { ({ chromium } = require('playwright-core')); } catch { console.log('✗ playwright-core is not installed'); return finish(1); }
72
+ srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT) }) });
73
+ await T.waitForServer(BASE);
74
+ browser = await chromium.launch({ executablePath: exe });
75
+ const shot = async (page, name, sel) => { if (!SHOTS) return; fs.mkdirSync(SHOTS, { recursive: true }); const p = path.join(SHOTS, name + '.png'); if (sel) await page.locator(sel).first().screenshot({ path: p }); else await page.screenshot({ path: p }); };
76
+
77
+ const open = async (o = {}) => {
78
+ const ctx = await browser.newContext({ viewport: { width: o.w || 1440, height: o.h || 900 } });
79
+ const page = await ctx.newPage();
80
+ const errors = [], posts = [];
81
+ page.on('pageerror', (e) => errors.push(String((e && e.stack) || e)));
82
+ await page.clock.setFixedTime(new Date(F.NOW));
83
+ await page.route('**/api/board-premium*', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, state: 'ready', model: model(), as_of: Date.now() }) }));
84
+ await page.route('**/api/board-trail*', (r) => r.fulfill({ status: 500, contentType: 'application/json', body: JSON.stringify({ ok: false, error: 'not in this check' }) }));
85
+ await page.route('**/api/task-plans/preview*', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, summary: { added: 0, moved: 1, changed: 1, dropped: 0, conflicts: [], milestones: [], planName: 'Change 1 · faster pilot · Oct 17', notChosen: [] } }) }));
86
+ await page.route('**/api/task-plans/live', (r) => { posts.push({ url: r.request().url(), body: r.request().postDataJSON() }); r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, plan: 'plan-2', name: 'Change 1 · faster pilot', summary: {}, versions: null }) }); });
87
+ await page.addInitScript(([s]) => { try { if (!sessionStorage.getItem('set')) { sessionStorage.setItem('set', '1'); for (const [k, v] of Object.entries(s)) localStorage.setItem(k, v); } } catch { /* none */ } },
88
+ [{ 'pmos.board.view': 'time', 'pmos.board.span': o.span || 'half', 'pmos.tasks.view': 'timeline', 'pmos.tasks.zoom': 'month', ...(o.store || {}) }]);
89
+ await page.goto(BASE + '/premium-board.html?ws=w1&board=w1');
90
+ await page.waitForSelector('#ibBody [data-key]', { timeout: 15000 });
91
+ await page.waitForTimeout(500);
92
+ return { ctx, page, errors, posts };
93
+ };
94
+
95
+ // ── B: the Board timeline
96
+ {
97
+ const { ctx, page, errors, posts } = await open();
98
+ const B = await page.evaluate(() => {
99
+ const row = (k) => document.querySelector(`.tg-r[data-row="${k}"]`);
100
+ const pr = row('board:partner-rate-limits'), ub = row('board:usage-billing');
101
+ const lg = document.querySelector('.tg-lgd');
102
+ return { line: !!(pr && pr.querySelector('.tg-pl')), slip: pr ? (pr.querySelector('.tg-slip') || {}).textContent || '' : '', lineTip: pr && pr.querySelector('.tg-pl') ? pr.querySelector('.tg-pl').getAttribute('title') : '',
103
+ draft: !!(ub && ub.querySelector('.tg-bar.tg-dr')), draftTip: ub && ub.querySelector('.tg-dr') ? ub.querySelector('.tg-dr').getAttribute('title') : '',
104
+ others: [...document.querySelectorAll('.tg-r[data-row]')].filter((r) => r !== pr && r.querySelector('.tg-pl')).length, legend: lg ? lg.textContent : '' };
105
+ });
106
+ ok('B1 the plan\'s thin line sits under the bar of the initiative that has a saved plan, named on hover', B.line && /Plan · Proposal A/.test(B.lineTip), JSON.stringify(B));
107
+ ok('B2 the slip after the end date: +14d (late)', B.slip === '+14d', JSON.stringify(B));
108
+ ok('B3 an initiative with drafts only draws its newest draft dashed, and its title names both drafts', B.draft && /Proposal B · lean/.test(B.draftTip) && /Newest: Proposal B · lean|Newest: Proposal A/.test(B.draftTip), JSON.stringify(B));
109
+ ok('B4 no plan line where no plan is saved (zero is silence)', B.others === 0, JSON.stringify(B));
110
+ ok('B5 the legend: "Planned" is "To do"; Plan and Draft show while they are drawn', /To do/.test(B.legend) && !/Planned/.test(B.legend) && /Plan/.test(B.legend) && /Draft/.test(B.legend), B.legend);
111
+ await shot(page, 'PvaBuild1Board');
112
+
113
+ // ── V: the initiative's Tasks timeline
114
+ await page.locator('.tg-n[data-key="board:partner-rate-limits"]').first().click();
115
+ await page.waitForSelector('#czViewer .iv-th', { timeout: 8000 });
116
+ await page.waitForTimeout(300);
117
+ const V = await page.evaluate(() => {
118
+ const v = document.querySelector('#czViewer');
119
+ const chip = v.querySelector('[data-vs-chip]'), rows = [...v.querySelectorAll('.ivt-r.k')];
120
+ const by = (t) => rows.find((r) => r.querySelector('.iv-tt') && r.querySelector('.iv-tt').textContent === t);
121
+ const has = (t, s) => { const r = by(t); return !!(r && r.querySelector(s)); };
122
+ return { chip: chip ? chip.textContent.trim() : '', chipDr: chip ? chip.classList.contains('dr') : null, slip: (v.querySelector('.vs-slip') || {}).textContent || '',
123
+ lineA: has('Draft the limits spec', '.ivt-pl'), lineFaq: has('Partner FAQ', '.ivt-pl'), addC: has('Load test at 3x peak', '.vs-add'), slipB: (by('Ship the limits API') && (by('Ship the limits API').querySelector('.ivt-sl') || {}).textContent) || '',
124
+ legend: (v.querySelector('.ivt-lg') || {}).textContent || '', seal: !!v.querySelector('[data-vs-live]') };
125
+ });
126
+ ok('V1 the chip says Live with 1 draft, grey; the header sums the end slip (+14d)', /^Live\s*1/.test(V.chip) && V.chipDr === false && V.slip === '+14d', JSON.stringify(V));
127
+ ok('V2 a plan line where the dates differ, none where they match', V.lineA && !V.lineFaq, JSON.stringify(V));
128
+ ok('V3 ⊕ after a task added after the plan; the slip after a late date', V.addC && /\+14d/.test(V.slipB), JSON.stringify(V));
129
+ ok('V4 the legend names the plan; no seal on Live', /Plan · Proposal A/.test(V.legend) && !V.seal, JSON.stringify(V));
130
+ await shot(page, 'PvaBuild2Live', '#czViewer');
131
+
132
+ // ── M: the chip's menu
133
+ await page.locator('#czViewer [data-vs-chip]').click();
134
+ await page.waitForSelector('.vs-pop .vs-m', { timeout: 4000 });
135
+ const M = await page.evaluate(() => { const m = document.querySelector('.vs-pop .vs-m'); return { text: m.textContent, show: [...m.querySelectorAll('[data-vs-show]')].length, cmp: [...m.querySelectorAll('[data-vs-cmp]')].length, save: !!m.querySelector('[data-vs-save]'), nw: !!m.querySelector('[data-vs-new]'), checked: [...m.querySelectorAll('[aria-checked="true"]')].map((b) => b.textContent.trim()) }; });
136
+ ok('M1 the menu: Show (Live, the draft), New draft from Live; Compare with (the plan, the draft, Nothing), Save Live as a plan', M.show === 2 && M.cmp === 3 && M.save && M.nw && /Show/.test(M.text) && /Compare with/.test(M.text), JSON.stringify(M));
137
+ ok('M2 Live and the plan are the ones picked', M.checked.length === 2 && /^Live/.test(M.checked[0]) && /Proposal A/.test(M.checked[1]), JSON.stringify(M.checked));
138
+ await shot(page, 'PvaBuild3Menu');
139
+
140
+ // ── D: a draft
141
+ await page.locator('.vs-pop [data-vs-show="draft-c1"]').click();
142
+ await page.waitForTimeout(300);
143
+ const D = await page.evaluate(() => { const v = document.querySelector('#czViewer'), chip = v.querySelector('[data-vs-chip]'); return { chip: chip.textContent.trim(), dr: chip.classList.contains('dr'), dashed: v.querySelectorAll('.ivt-b.dr').length, seal: !!v.querySelector('[data-vs-live]'), count: (v.querySelector('.iv-th .n') || {}).textContent || '' }; });
144
+ ok('D1 the chip names the draft in blue; every bar is dashed; the seal shows', /Change 1/.test(D.chip) && D.dr && D.dashed >= 3 && D.seal, JSON.stringify(D));
145
+ const wide = await page.evaluate(() => { const b = document.querySelector('#czViewer .cz-vw-body'), h = document.querySelector('#czViewer .iv-th'); return { body: b.scrollWidth - b.clientWidth, head: h.scrollWidth - Math.round(h.getBoundingClientRect().width) }; });
146
+ ok('D5 a long draft name wraps the head; the Viewer never scrolls sideways', wide.body <= 0 && wide.head <= 1, JSON.stringify(wide));
147
+ ok('D2 the count says how many tasks the draft holds, without its name again (the chip says it)', /^4 tasks$/.test(D.count.trim()), D.count);
148
+ await page.locator('#czViewer [data-vs-live]').click();
149
+ await page.waitForSelector('.vs-pop .vs-cf', { timeout: 4000 });
150
+ const cf = await page.locator('.vs-pop .vs-cf').textContent();
151
+ ok('D3 Make live shows what changes right under the seal: 1 date moved, the plan it saves', /1 date moved/.test(cf) && /Saved as the plan/.test(cf), cf);
152
+ await shot(page, 'PvaBuild4Draft');
153
+ await page.locator('.vs-pop [data-vs-cf="yes"]').click();
154
+ await page.waitForTimeout(400);
155
+ ok('D4 ✓ posts Make live for that draft', posts.length === 1 && posts[0].body.draft === 'draft-c1', JSON.stringify(posts));
156
+ ok('B6 no page error', errors.length === 0, errors.join(' | '));
157
+ await ctx.close();
158
+ }
159
+
160
+ // ── P: a phone, the chip's menu as a bottom sheet
161
+ {
162
+ const { ctx, page, errors } = await open({ w: 390, h: 844 });
163
+ const n = page.locator('[data-key="board:partner-rate-limits"]').first();
164
+ await n.click();
165
+ await page.waitForSelector('#czViewer [data-vs-chip]', { timeout: 8000 });
166
+ await page.locator('#czViewer [data-vs-chip]').click();
167
+ await page.waitForSelector('.vs-pop.sheet', { timeout: 4000 });
168
+ const P = await page.evaluate(() => { const r = document.querySelector('.vs-pop.sheet').getBoundingClientRect(); return { bottom: Math.round(r.bottom), w: Math.round(r.width), scroll: document.documentElement.scrollWidth }; });
169
+ ok('P1 on a phone the menu is a bottom sheet the width of the screen; no sideways scroll', P.bottom === 844 && P.w === 390 && P.scroll <= 390, JSON.stringify(P));
170
+ ok('P2 no page error', errors.length === 0, errors.join(' | '));
171
+ await shot(page, 'PvaBuild5Phone');
172
+ await ctx.close();
173
+ }
174
+ finish();
175
+ })().catch((e) => { console.error(e); finish(1); });
@@ -141,7 +141,7 @@ const model = () => { const M = BP.build(F.facts()); const r = M.rows.find((x) =
141
141
  ghost: !!T.querySelector('.ivt-g[data-iv-date="task-d"]'), zoom: document.querySelector('#czViewer [data-iv-zoom]').textContent, seen: today.left > nw.right && today.left < sc.getBoundingClientRect().right,
142
142
  lg: document.querySelector('#czViewer .ivt-lg').textContent, arch: /Old spike notes/.test(T.textContent) };
143
143
  });
144
- ok('V4 Timeline keeps the List\'s stage groups', tl.groups.join('|') === 'Triage|Discover|Later: Plan, Prioritize, Build, Deliver, Monitor, Evaluate', JSON.stringify(tl.groups));
144
+ ok('V4 Timeline keeps the List\'s stage groups, one per stage (batch 11 item 5)', tl.groups.join('|') === 'Triage|Discover|Plan|Prioritize|Build|Deliver|Monitor|Evaluate', JSON.stringify(tl.groups));
145
145
  ok('V4 bars by start and due: in progress light blue, late amber; a due day only is a circle; no dates is a dashed date press', /ivt-b/.test(tl.a) && / pr/.test(tl.a) && /ivt-d/.test(tl.b) && /ivt-b lt/.test(tl.c) && tl.ghost, JSON.stringify(tl));
146
146
  ok('V4 Weeks is the first zoom; it opens on today, the Today line in view; the legend sits under it', tl.zoom === 'Weeks' && tl.seen && /To do.*In progress.*Late.*Due only.*Jira, read only/.test(tl.lg), JSON.stringify(tl));
147
147
  ok('V4 an archived task shows nowhere in Timeline', !tl.arch);
@@ -184,7 +184,7 @@ const model = () => { const M = BP.build(F.facts()); const r = M.rows.find((x) =
184
184
  await shot(p, 'kanban-1440');
185
185
  await p.click('#czViewer [data-iv-kstage]');
186
186
  const st = await until(() => p.evaluate(() => { const q = document.querySelector('.tkc.ivq .ivq-m'); return q ? [...q.querySelectorAll('[data-ivq-i]')].map((b) => b.textContent.replace(/\s+/g, ' ').trim()) : null; }));
187
- ok('V6 the stage picker: current stage first, All stages, then the rest, each with its count', st && st.join('|') === 'Discover1 late · 4 open|All stages5 open|Triage|Later stages1 to do', JSON.stringify(st));
187
+ ok('V6 the stage picker: current stage first, All stages, then the rest, each with its count', st && st.join('|') === 'Discover1 late · 4 open|All stages5 open|Triage|Plan1 open|Prioritize|Build|Deliver|Monitor|Evaluate', JSON.stringify(st));
188
188
  await p.evaluate(() => { const b = [...document.querySelectorAll('.tkc.ivq [data-ivq-i]')].find((x) => /All stages/.test(x.textContent)); if (b) b.click(); });
189
189
  const all = await until(() => p.evaluate(() => (document.querySelector('#czViewer [data-iv-kstage]') || {}).textContent === 'All stages' ? document.querySelectorAll('#czViewer .ivk-d').length : null));
190
190
  ok('V6 All stages shows every task but the archived one (Won\'t do stays in its folded strip)', all === 6, String(all));
@@ -0,0 +1,6 @@
1
+ {
2
+ "_comment": "feedback batch 11 item 2 (option A): move an initiative out of its program, or to another, from its ⋯ on the Board panel, the Home page and the phone sheet; the leave takes it off the charter's milestones and Undo puts them back (canvas LpA1More, LpA2Other, LpA3Done, LpA4Phone, LpA5PhoneDone).",
3
+ "modules": ["program-leave.test.js"],
4
+ "panels": ["program-leave-test.js"],
5
+ "seconds": { "program-leave.test.js": 2, "program-leave-test.js": 45 }
6
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "_comment": "Feedback batch 11 item 3, several milestones per initiative: a ◇ flag on any task, one ◇ per milestone on the Board timeline and the Viewer Tasks timeline. The modules suite reads the task-milestone lines; the panels suite drives the Board and the Viewer in a browser.",
3
+ "modules": ["task-milestones.test.js"],
4
+ "panels": ["task-milestones-test.js"],
5
+ "seconds": { "task-milestones.test.js": 6, "task-milestones-test.js": 40 }
6
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "_comment": "Feedback batch 11 item 8, planned versus actual: drafts of an initiative's tasks, saved plans, Make live and its Undo (lib/task-plans.js, lib/routes-task-plans.js). The modules suite folds pure and then serves a scratch server; the panels suite drives the Board and the Viewer in a browser.",
3
+ "modules": ["task-plans.test.js"],
4
+ "panels": ["task-plans-test.js"],
5
+ "seconds": { "task-plans.test.js": 6, "task-plans-test.js": 40 }
6
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "_comment": "feedback batch 11 item 1: the Viewer follows chat's edits to the open file, from the initiative's worktree, with no commit (pure + a real git worktree).",
3
+ "modules": [
4
+ "doc-live-file.test.js"
5
+ ],
6
+ "seconds": {
7
+ "doc-live-file.test.js": 1
8
+ }
9
+ }
@@ -10,6 +10,9 @@
10
10
  * H hard cases: no return date (dotted to today, the rest faded, the date field open), passed (late colour), two holds, return after Deliver
11
11
  * E the edge tab ahead names the return date · N a hold narrower than 8 px closes up (5 yr) · G the program line is dotted where all members wait
12
12
  * M the phone keeps the ⏸ only
13
+ * X no activity (batch 11 item 13; XgapA1Board, XgapAHard, XgapA3Phone, XgapAGrill): a plain gap is a hairline with its words, split at today; a hold
14
+ * wins for its dates; » for a skipped stage between two dated ones (on the gap, or at the joint), none at the ends; a narrow » goes to the bar's
15
+ * title; a future gap's press offers + New task with its dates; the legend keys only while drawn; the phone sheet lists the gap and the skip
13
16
  * SHOTS_8=<dir>: the timeline at 1440 and 390, light and dark, and the ⏸ menu, into <dir>. */
14
17
  const path = require('path');
15
18
  const { spawn } = require('child_process');
@@ -36,7 +39,8 @@ const held = (from, back, reason) => ({ status: 'on hold', stopped: { state: 'on
36
39
  const ROWS = [
37
40
  F.row('email-otp', 'Email OTP (passwordless login)', { stage: 'Build', start: '2026-07-01', end: '2027-06-15', progress: 30, holds: [{ from: '2026-10-12', to: null, back: '2027-03-01', reason: 'Waits on the SMS vendor contract' }], ...held('2026-10-12', '2027-03-01', 'Waits on the SMS vendor contract') }),
38
41
  F.row('passkey', 'Passkey sign-in', { owner: 'Lee', start: '2026-08-15', end: '2027-02-10', progress: 45 }),
39
- F.row('recovery-codes', 'Recovery codes', { owner: 'Dara', start: '2026-09-01', end: '2027-03-20', progress: 40, gaps: [{ from: '2026-10-20', to: '2027-01-10' }] }),
42
+ F.row('recovery-codes', 'Recovery codes', { owner: 'Dara', start: '2026-09-01', end: '2027-03-20', progress: 40, gaps: [{ from: '2026-10-20', to: '2027-01-10', before: 'discover', after: 'build' }],
43
+ warnings: ['Skipped Plan'], stageSpans: [{ stage: 'discover', start: '2026-09-01', due: '2026-10-20' }, { stage: 'build', start: '2027-01-10', due: '2027-03-20' }] }),
40
44
  F.row('no-return', 'On hold, no return date', { start: '2026-06-01', end: '2027-04-01', progress: 20, holds: [{ from: '2026-09-01', to: null, back: null, reason: '' }], ...held('2026-09-01', null) }),
41
45
  F.row('passed', 'Return date passed', { start: '2026-05-01', end: '2027-02-01', progress: 30, holds: [{ from: '2026-08-10', to: null, back: '2026-10-05', reason: 'Waits on budget' }], ...held('2026-08-10', '2026-10-05', 'Waits on budget') }),
42
46
  F.row('two-holds', 'Resumed, two holds', { start: '2026-03-01', end: '2027-03-01', progress: 40, holds: [{ from: '2026-04-01', to: '2026-05-01', back: null, reason: '' }, { from: '2026-06-10', to: '2026-07-01', back: null, reason: '' }] }),
@@ -83,6 +87,7 @@ const ROWS = [
83
87
  hl: [...r.querySelectorAll('.tg-hl')].map((x) => x.className + '|' + x.textContent),
84
88
  end: (r.querySelector('.tg-end') || {}).className || '', lab: [...r.querySelectorAll('.tg-lab')].map((x) => x.textContent),
85
89
  tabs: [...r.querySelectorAll('.tg-edge')].map((b) => b.dataset.edge + ':' + b.textContent.trim()),
90
+ ng: [...r.querySelectorAll('.tg-ng')].map((b) => ({ tag: b.tagName, label: b.getAttribute('aria-label') || '', sk: !!b.querySelector('.tg-sk') })),
86
91
  };
87
92
  }, title);
88
93
 
@@ -95,11 +100,13 @@ const ROWS = [
95
100
  ok('A the gap runs from the hold to the return date, where the bar starts again under the return date', otp && Math.abs(otp.gaps[0].l - (otp.bars[0].l + otp.bars[0].w)) < 0.2 && Math.abs(otp.bars[1].l - (otp.gaps[0].l + otp.gaps[0].w)) < 0.2 && otp.hl.join() === 'tg-hl|Mar 1', JSON.stringify(otp));
96
101
  ok('A the done part fills the pieces in order and skips the gap: the first piece fills before the second starts', otp && otp.bars[0].done > 0 && (otp.bars[0].done === 100 || otp.bars[1].done === 0), JSON.stringify(otp && otp.bars));
97
102
  const rc = await rowOf(p, 'Recovery codes');
98
- ok('A a plain gap of 4 weeks or more in the dated work just breaks the bar: no dotted line, no ⏸, no label', rc && rc.bars.length === 2 && !rc.gaps.length && !rc.pz.length && !rc.hl.length, JSON.stringify(rc));
103
+ ok('A a plain gap in the dated work breaks the bar with a hairline, not a hold\'s dotted line: no ⏸, no label (batch 11 item 13)', rc && rc.bars.length === 2 && !rc.gaps.length && !rc.pz.length && !rc.hl.length
104
+ && rc.ng.length === 1 && rc.ng[0].tag === 'BUTTON' && rc.ng[0].label === 'Nothing planned, Oct 21 to Jan 9 · 12 wk. Plan skipped' && rc.ng[0].sk, JSON.stringify(rc));
99
105
  const pk = await rowOf(p, 'Passkey sign-in');
100
106
  ok('A a row with no hold and no gap keeps one whole bar', pk && pk.bars.length === 1 && !/x[lr]/.test(pk.bars[0].cls), JSON.stringify(pk));
101
107
  const lg = await p.evaluate(() => (document.querySelector('#bdChipset .tg-lgd') || {}).textContent || '');
102
- ok('L the legend names "On hold" while a hold is drawn', /Planned\s*On hold/.test(lg), lg);
108
+ ok('L the legend names "On hold" while a hold is drawn', /To do\s*On hold/.test(lg), lg);
109
+ ok('X the legend names "No activity" and "Skipped" while they are drawn', /On hold\s*No activity\s*Skipped\s*Jira forecast/.test(lg), lg);
103
110
 
104
111
  const nr = await rowOf(p, 'On hold, no return date');
105
112
  ok('H no return date: dotted to today, "no return date" at today, the rest of the plan faded', nr && nr.gaps.length === 1 && nr.hl.join() === 'tg-hl|no return date' && nr.bars.length === 2 && /fd/.test(nr.bars[1].cls) && !/fd/.test(nr.bars[0].cls)
@@ -141,7 +148,7 @@ const ROWS = [
141
148
  {
142
149
  const { ctx, page: p } = await open({ rows: ROWS.filter((r) => !r.holds) });
143
150
  const lg = await p.evaluate(() => (document.querySelector('#bdChipset .tg-lgd') || {}).textContent || '');
144
- ok('L with no hold drawn, no "On hold" in the legend (zero is silence)', /Planned/.test(lg) && !/On hold/.test(lg), lg);
151
+ ok('L with no hold drawn, no "On hold" in the legend (zero is silence)', /To do/.test(lg) && !/On hold/.test(lg), lg);
145
152
  await ctx.close();
146
153
  }
147
154
 
@@ -164,13 +171,65 @@ const ROWS = [
164
171
  const groups2 = [{ ...groups[0], products: [{ name: 'IDPF', rows: [a, b] }], rows: [a, b] }];
165
172
  d.innerHTML = S.timelineHtml([a, b], { jira: null }, 'year', { now, groups: groups2, trackPx: 1100 }).html;
166
173
  const solid = [...d.querySelectorAll('.tg-pg .tg-span')].map((x) => x.className);
167
- return { five, quarter, spans, solid };
174
+ // batch 10 item 3 (Email OTP): a hold with no return date, then no dated work until the Build tasks in March. The rest of the bar
175
+ // starts where those tasks start, not today.
176
+ const e = { key: 'board:e', id: 'e', title: 'Email OTP', start: '2026-06-25', end: '2027-06-09', holds: [{ from: '2026-09-15', to: null, back: null, reason: '' }], gaps: [{ from: '2026-09-10', to: '2027-03-18' }], track: { key: 'build' } };
177
+ d.innerHTML = S.timelineHtml([e], { jira: null }, 'year', { now, trackPx: 1100 }).html;
178
+ const eb = [...d.querySelectorAll('.tg-bar')].map((x) => parseFloat(x.style.left)), eg = d.querySelectorAll('.tg-gap').length;
179
+ d.innerHTML = S.timelineHtml([{ ...e, gaps: [] }], { jira: null }, 'year', { now, trackPx: 1100 }).html;
180
+ const nb = [...d.querySelectorAll('.tg-bar')].map((x) => parseFloat(x.style.left));
181
+ return { five, quarter, spans, solid, eb, eg, nb };
168
182
  });
183
+ ok('N2 a hold with no return date, then a plain gap: the rest of the bar starts at the next dated work, later than today', r.eb.length === 2 && r.eg === 1 && r.nb.length === 2 && r.eb[1] > r.nb[1] + 5, JSON.stringify({ eb: r.eb, nb: r.nb, eg: r.eg }));
169
184
  ok('N on 5 yr a nine-day past hold is narrower than 8 px and closes up: one whole bar; on Quarter it is a gap', r.five.bars === 1 && r.five.gaps === 0 && r.quarter.gaps === 1 && r.quarter.bars === 2, JSON.stringify(r));
170
185
  ok('G the program line is dotted where every member is on hold, solid where one still works', r.spans.join('|') === 'tg-span|tg-span ho|tg-span' && r.solid.every((x) => x === 'tg-span'), JSON.stringify(r));
171
186
  await ctx.close();
172
187
  }
173
188
 
189
+ /* X no activity, through the engine (batch 11 item 13): words split at today, a hold wins, » placement, ends not drawn, a narrow » to the title */
190
+ {
191
+ const { ctx, page: p, errors } = await open();
192
+ const r = await p.evaluate(async () => {
193
+ const S = await import('/pm/bd-span.js'), now = new Date(2026, 9, 17), d = document.createElement('div');
194
+ const draw = (row, sp = 'year', o = {}) => { d.innerHTML = S.timelineHtml([{ key: 'board:x', id: 'x', title: 'X', track: { key: 'build', k: 4 }, ...row }], { jira: null }, sp, { now, trackPx: 1100, ...o }).html;
195
+ return { ng: [...d.querySelectorAll('.tg-ng')].map((b) => ({ tag: b.tagName, label: b.getAttribute('aria-label') || '', sk: !!b.querySelector('.tg-sk'), ahead: b.dataset.ahead === '1' })),
196
+ sk: [...d.querySelectorAll('.tg-sk.on')].map((x) => x.getAttribute('aria-label') || ''), bars: [...d.querySelectorAll('.tg-bar')].map((b) => b.getAttribute('title')), gaps: d.querySelectorAll('.tg-gap').length }; };
197
+ const base = { start: '2026-07-20', end: '2027-02-26' };
198
+ const across = draw({ ...base, gaps: [{ from: '2026-10-01', to: '2026-11-29' }] });
199
+ const past = draw({ ...base, gaps: [{ from: '2026-09-19', to: '2026-10-17' }] });
200
+ const held = draw({ ...base, gaps: [{ from: '2026-09-01', to: '2026-12-01' }], holds: [{ from: '2026-09-01', to: '2026-12-01', back: null, reason: '' }] });
201
+ // Recovery codes (XgapA1Board): Discover, then no activity, then Build; Plan skipped with its reason; Prioritize was done in the gap too
202
+ const SKP = { track: { key: 'build', k: 4, skipped: [2, 3], skipWhy: [{ stage: 'plan', why: 'The security review fixed the scope' }, { stage: 'prioritize', why: '' }] },
203
+ stageSpans: [{ stage: 'discover', start: '2026-07-20', due: '2026-09-18' }, { stage: 'build', start: '2026-10-19', due: '2027-02-26' }] };
204
+ const onGap = draw({ ...base, ...SKP, gaps: [{ from: '2026-09-18', to: '2026-10-19', before: 'discover', after: 'build' }] });
205
+ const joint = draw({ ...base, ...SKP, stageSpans: [{ stage: 'discover', start: '2026-07-20', due: '2026-10-19' }, { stage: 'build', start: '2026-10-19', due: '2027-02-26' }], gaps: [] });
206
+ const ends = draw({ ...base, track: { key: 'build', k: 4, skipped: [0], skipWhy: [] }, stageSpans: [{ stage: 'discover', start: '2026-07-20', due: '2026-09-18' }, { stage: 'build', start: '2026-10-19', due: '2027-02-26' }], gaps: [] });
207
+ const narrow = draw({ ...base, ...SKP, gaps: [{ from: '2026-09-18', to: '2026-10-19', before: 'discover', after: 'build' }] }, 'y5');
208
+ const keys = S.gapKeys([{ ...base, ...SKP, gaps: [{ from: '2026-09-18', to: '2026-10-19' }] }]), none = S.gapKeys([{ ...base }]);
209
+ const lg = S.legendHtml(false, false, keys);
210
+ return { across, past, held, onGap, joint, ends, narrow, keys, none, lg };
211
+ });
212
+ ok('X a gap across today says both: no activity up to yesterday, nothing planned from today', r.across.ng.length === 1 && r.across.ng[0].label === 'No activity, Oct 2 to Oct 16 · 2 wk. Nothing planned, Oct 17 to Nov 28 · 6 wk' && r.across.ng[0].ahead, JSON.stringify(r.across));
213
+ ok('X a past gap says "No activity" and offers no New task', r.past.ng[0].label === 'No activity, Sep 20 to Oct 16 · 4 wk' && !r.past.ng[0].ahead, JSON.stringify(r.past));
214
+ ok('X a hold over the same days wins: its dotted line, no hairline', r.held.gaps === 1 && r.held.ng.length === 0, JSON.stringify(r.held));
215
+ ok('X a skipped stage between two dated ones is one » on the gap; its words name each skip with its reason', r.onGap.ng.length === 1 && r.onGap.ng[0].sk && !r.onGap.sk.length
216
+ && r.onGap.ng[0].label === 'No activity, Sep 19 to Oct 16 · 4 wk. Nothing planned, Oct 17 to Oct 18 · 2 days. Plan skipped: the security review fixed the scope. Prioritize skipped', JSON.stringify(r.onGap));
217
+ ok('X no gap between the two stages: the » sits on the bar at the joint', r.joint.ng.length === 0 && r.joint.sk.length === 1 && /^Plan skipped: the security review fixed the scope\. Prioritize skipped$/.test(r.joint.sk[0]), JSON.stringify(r.joint));
218
+ ok('X a skip before the first dated stage is not drawn', r.ends.ng.length === 0 && r.ends.sk.length === 0, JSON.stringify(r.ends));
219
+ ok('X on 5 yr the gap is under 24 px: no », its words go to the bar\'s title', r.narrow.ng.every((g) => !g.sk) && r.narrow.bars.some((t) => /Plan skipped: the security review fixed the scope/.test(t)), JSON.stringify(r.narrow));
220
+ ok('X the legend keys No activity and Skipped only while one is drawn', r.keys.gap && r.keys.skip && !r.none.gap && !r.none.skip && /No activity/.test(r.lg) && /Skipped/.test(r.lg), JSON.stringify([r.keys, r.none]));
221
+ // the press: a future gap's card with its words and + New task with its dates
222
+ await p.click('#ibBody [data-row="board:recovery-codes"] .tg-ng');
223
+ const card = await p.evaluate(() => { const c = document.querySelector('.tg-gpc'); return c ? { words: [...c.querySelectorAll('p')].map((x) => x.textContent), add: (c.querySelector('.gp-add') || {}).getAttribute && c.querySelector('.gp-add').getAttribute('aria-label') } : null; });
224
+ ok('X a future gap opens a card with its words and + New task with the gap\'s dates', card && card.words.join('|') === 'Nothing planned, Oct 21 to Jan 9 · 12 wk|Plan skipped' && card.add === 'New task, Oct 21 to Jan 9', JSON.stringify(card));
225
+ await shot(p, 'timeline-gap-card-1440');
226
+ await p.click('.tg-gpc .gp-add'); await p.waitForTimeout(400);
227
+ const add = await p.evaluate(() => { const f = document.querySelector('#ivAddTask'); return f ? f.placeholder : null; });
228
+ ok('X + opens the initiative with New task ready, the gap\'s dates named', add === 'A task for Recovery codes, Oct 21 to Jan 9', String(add));
229
+ ok('X the gap press threw nothing', !errors.length, errors.join('\n'));
230
+ await ctx.close();
231
+ }
232
+
174
233
  /* M the phone: ⏸ only, no dates beside it */
175
234
  {
176
235
  const { ctx, page: p, errors } = await open({ w: 390, h: 844 });
@@ -181,6 +240,12 @@ const ROWS = [
181
240
  const sh = await p.evaluate(() => { const h = document.querySelector('#bdPop'); return { sheet: h.classList.contains('sheet'), h4: (h.querySelector('h4') || {}).textContent }; });
182
241
  ok('M on a phone the ⏸ press opens the same menu as a sheet', sh.sheet && sh.h4 === 'On hold · 4½ months', JSON.stringify(sh));
183
242
  await shot(p, 'timeline-holds-menu-390');
243
+ const ng = await p.evaluate(() => [...document.querySelectorAll('#ibBody .tg-ng')].map((x) => x.tagName));
244
+ ok('X the phone draws the hairline with no words and no press', ng.length >= 1 && ng.every((t) => t === 'SPAN'), JSON.stringify(ng));
245
+ await p.keyboard.press('Escape'); await p.waitForTimeout(200);
246
+ await p.click('#ibBody .tgq-r[data-row="board:recovery-codes"] > .tg-p', { position: { x: 200, y: 10 } });
247
+ const sh2 = await p.evaluate(() => { const s = document.querySelector('.tg-msp.sh'); return s ? [...s.querySelectorAll('.o')].map((x) => x.textContent.trim()) : null; });
248
+ ok('X tapping the row on a phone opens its sheet, which lists the gap', sh2 && sh2.some((t) => /^Nothing planned · 12 wk/.test(t)), JSON.stringify(sh2));
184
249
  ok('the phone timeline threw nothing', !errors.length, errors.join('\n'));
185
250
  await ctx.close();
186
251
  }