create-pmos 0.424.0 → 0.426.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 (110) 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/state/discoveries.md +1 -1
  6. package/workspace/board-deliveries-test.js +153 -0
  7. package/workspace/board-programs-test.js +60 -36
  8. package/workspace/board-shot.js +4 -3
  9. package/workspace/briefing-premium-board-test.js +9 -6
  10. package/workspace/briefing-premium-insights-test.js +31 -15
  11. package/workspace/briefing-premium-products-test.js +46 -43
  12. package/workspace/calm-timeline-test.js +190 -0
  13. package/workspace/changelog.json +24 -0
  14. package/workspace/ev-everywhere-test.js +3 -1
  15. package/workspace/guide/briefing-premium.md +3 -2
  16. package/workspace/guide/claude-proposes.md +16 -1
  17. package/workspace/guide/home.md +2 -2
  18. package/workspace/guide/index.md +1 -0
  19. package/workspace/guide/notes.md +39 -1
  20. package/workspace/guide/present-in-a-meeting.md +57 -0
  21. package/workspace/guide/programs.md +4 -3
  22. package/workspace/lib/board-premium.js +3 -1
  23. package/workspace/lib/briefing-premium-products.js +18 -4
  24. package/workspace/lib/chat-file-locate.js +40 -2
  25. package/workspace/lib/engine/boards.js +8 -2
  26. package/workspace/lib/idle-close.js +60 -0
  27. package/workspace/lib/loose-proposals.js +302 -0
  28. package/workspace/lib/meeting-focus.js +64 -14
  29. package/workspace/lib/my-work-premium.js +1 -1
  30. package/workspace/lib/proposal-runs.js +77 -2
  31. package/workspace/lib/propose-cli.js +42 -1
  32. package/workspace/lib/route-modules.js +1 -0
  33. package/workspace/lib/routes-boards.js +16 -4
  34. package/workspace/lib/routes-brief-page.js +9 -1
  35. package/workspace/lib/routes-briefing-premium.js +19 -0
  36. package/workspace/lib/routes-loose.js +210 -0
  37. package/workspace/lib/routes-meeting-focus.js +28 -6
  38. package/workspace/lib/routes-pm-items.js +27 -17
  39. package/workspace/lib/settings-store.js +2 -1
  40. package/workspace/lib/task-cli.js +18 -11
  41. package/workspace/milestone-pins-test.js +170 -0
  42. package/workspace/package-lock.json +2 -2
  43. package/workspace/package.json +1 -1
  44. package/workspace/premium-board-actions-test.js +2 -1
  45. package/workspace/premium-briefing-depth-test.js +2 -2
  46. package/workspace/premium-chat-term-test.js +13 -2
  47. package/workspace/premium-core-doc-issue-test.js +1 -1
  48. package/workspace/premium-rec-now-test.js +153 -0
  49. package/workspace/premium-rec-tab-test.js +167 -0
  50. package/workspace/product-lane-test.js +30 -17
  51. package/workspace/public/pm/bd-acts.js +6 -3
  52. package/workspace/public/pm/bd-deliveries.js +218 -0
  53. package/workspace/public/pm/bd-pin-card.css +16 -0
  54. package/workspace/public/pm/bd-pin-card.js +80 -0
  55. package/workspace/public/pm/bd-pins.js +33 -0
  56. package/workspace/public/pm/bd-pop.js +2 -0
  57. package/workspace/public/pm/bd-prog.js +5 -4
  58. package/workspace/public/pm/bd-span.js +140 -102
  59. package/workspace/public/pm/cozy-aud.css +9 -0
  60. package/workspace/public/pm/cozy-aud.js +80 -0
  61. package/workspace/public/pm/cozy-board.css +73 -11
  62. package/workspace/public/pm/cozy-home.css +16 -1
  63. package/workspace/public/pm/cozy-live-pill.js +3 -0
  64. package/workspace/public/pm/cozy-pick.css +41 -0
  65. package/workspace/public/pm/cozy-pick.js +134 -0
  66. package/workspace/public/pm/cozy-rec-bridge.js +32 -0
  67. package/workspace/public/pm/cozy-rec-now.css +104 -0
  68. package/workspace/public/pm/cozy-rec-now.js +330 -0
  69. package/workspace/public/pm/cozy-rec-present.css +69 -0
  70. package/workspace/public/pm/cozy-rec-present.js +467 -0
  71. package/workspace/public/pm/cozy-rec-tab.css +90 -0
  72. package/workspace/public/pm/cozy-rec-tab.js +219 -0
  73. package/workspace/public/pm/cozy-settings.js +8 -2
  74. package/workspace/public/pm/cozy-today.css +4 -0
  75. package/workspace/public/pm/home-app.js +51 -22
  76. package/workspace/public/pm/home-data.js +5 -3
  77. package/workspace/public/pm/home-list.js +63 -15
  78. package/workspace/public/pm/home-more.js +2 -31
  79. package/workspace/public/pm/home-today.js +19 -9
  80. package/workspace/public/pm/ini-tasks.js +4 -1
  81. package/workspace/public/pm/live-model.js +1 -1
  82. package/workspace/public/pm/loose-props.css +54 -0
  83. package/workspace/public/pm/loose-props.js +262 -0
  84. package/workspace/public/pm/premium-board.js +65 -30
  85. package/workspace/public/pm/premium-insights.js +42 -24
  86. package/workspace/public/pm/premium-meeting.js +17 -4
  87. package/workspace/public/pm/premium-mtg-present.js +4 -3
  88. package/workspace/public/pm/premium-report-read.js +2 -0
  89. package/workspace/public/pm/premium-vw-mtg.js +15 -7
  90. package/workspace/public/pm/rec-state.js +13 -5
  91. package/workspace/public/pm/rec-tab-core.js +92 -0
  92. package/workspace/public/pm/term-view.js +81 -10
  93. package/workspace/public/pm/view-notes.js +9 -0
  94. package/workspace/public/premium-aud.html +22 -0
  95. package/workspace/public/premium-board.html +2 -0
  96. package/workspace/public/premium-insights.html +2 -1
  97. package/workspace/public/premium-rec.html +30 -0
  98. package/workspace/public/premium.html +1 -0
  99. package/workspace/rec-present-test.js +229 -0
  100. package/workspace/server.js +116 -7
  101. package/workspace/skills/loose-propose.skill +39 -0
  102. package/workspace/task-milestones-test.js +15 -6
  103. package/workspace/test-lists/board-deliveries.json +13 -0
  104. package/workspace/test-lists/calm-timeline.json +5 -0
  105. package/workspace/test-lists/loose-props.json +9 -0
  106. package/workspace/test-lists/milestone-pins.json +6 -0
  107. package/workspace/test-lists/rec-now.json +6 -0
  108. package/workspace/test-lists/rec-present.json +13 -0
  109. package/workspace/test-lists/recording-tab.json +13 -0
  110. package/workspace/timeline-holds-test.js +44 -42
@@ -62,7 +62,7 @@ const BMR = { ok: true, state: 'ready', model: { tiles: [
62
62
  await T.waitForServer(BASE);
63
63
  browser = await chromium.launch({ executablePath: exe });
64
64
 
65
- const open = async ({ w = 1440, h = 900, theme = 'light', model = mk(), answers = null, bm = BMR, q = '' } = {}) => {
65
+ const open = async ({ w = 1440, h = 900, theme = 'light', model = mk(), answers = null, bm = BMR, q = '', pick = null } = {}) => {
66
66
  const ctx = await browser.newContext({ viewport: { width: w, height: h } });
67
67
  const page = await ctx.newPage();
68
68
  let current = model, calls = 0; const errors = [], posts = [];
@@ -70,9 +70,16 @@ const BMR = { ok: true, state: 'ready', model: { tiles: [
70
70
  page.on('request', (rq) => { if (rq.method() !== 'GET') posts.push(rq.method() + ' ' + new URL(rq.url()).pathname); });
71
71
  await page.route('**/api/insights-premium*', (r) => { calls++; if (answers) { const a = answers(calls); return r.fulfill({ status: a.status, contentType: 'application/json', body: JSON.stringify(a.body) }); } return r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, state: 'ready', model: current, as_of: 1 }) }); });
72
72
  await page.route('**/api/board-metrics-premium*', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify(bm) }));
73
+ // the one product pick Home and Board share (batch 12 item 5): every product the model's switcher names, the ticked ones from pick
74
+ const reg = (model.board.switcher && model.board.switcher.length ? model.board.switcher : [model.board]).map((b) => ({ ws: b.ws, name: b.name }));
75
+ const pk = { on: pick || [model.board.ws], posts: [] };
76
+ await page.route('**/api/briefing-premium/products', (r) => {
77
+ if (r.request().method() === 'POST') { pk.on = JSON.parse(r.request().postData() || '{}').on; pk.posts.push(pk.on); }
78
+ r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, all: false, chosen: true, products: reg.map((x, i) => ({ ...x, home: false, primary: !i, initials: null, on: pk.on.includes(x.ws) })) }) });
79
+ });
73
80
  await page.goto(BASE + '/premium-insights.html?theme=' + theme + q);
74
81
  const up = await until(() => page.evaluate(() => document.querySelectorAll('#goalTbl .ins-row').length > 0 || /could not be read/.test(document.querySelector('#brief').textContent) || !!document.querySelector('#goalTbl .ins-empty')), 20000);
75
- return { ctx, page, errors, posts, up, calls: () => calls, setModel: (m) => { current = m; } };
82
+ return { ctx, page, errors, posts, up, pk, calls: () => calls, setModel: (m) => { current = m; } };
76
83
  };
77
84
  /* the Viewer card (pm/cozy-viewer.js): its title, and the feature its "Waiting for design" card names */
78
85
  const vw = (pg) => pg.evaluate(() => { const v = document.querySelector('#czViewer'); if (!v || v.hidden) return null; const ph = v.querySelector('[data-cz-placeholder]'); return { title: (v.querySelector('.cz-vw-title') || {}).textContent || '', wait: ph ? ph.dataset.czPlaceholder : null, text: v.querySelector('.cz-vw-body').textContent }; });
@@ -86,8 +93,8 @@ const BMR = { ok: true, state: 'ready', model: { tiles: [
86
93
  const txt = (s, pg = p) => pg.evaluate((q) => (document.querySelector(q) || {}).textContent || '', s);
87
94
 
88
95
  /* N: the place menu, no page header, nothing old */
89
- const nav = await p.evaluate(() => ({ fabs: document.querySelectorAll('#czFab').length, label: document.querySelector('#czFab').getAttribute('aria-label'), rail: document.querySelector('nav.rail') ? getComputedStyle(document.querySelector('nav.rail')).display : 'gone', name: document.querySelector('#prodName').textContent, boards: document.querySelectorAll('#prodMenu [data-board]').length }));
90
- ok('N1 one floating place menu replaces the rail (gone from the page), it says you are in Insights, and the product picker names the board', nav.fabs === 1 && nav.label === 'Open the menu. You are in Insights' && nav.rail === 'gone' && nav.name === 'pmos' && nav.boards === 1, JSON.stringify(nav));
96
+ const nav = await p.evaluate(() => ({ fabs: document.querySelectorAll('#czFab').length, label: document.querySelector('#czFab').getAttribute('aria-label'), rail: document.querySelector('nav.rail') ? getComputedStyle(document.querySelector('nav.rail')).display : 'gone', name: document.querySelector('#prodPick').getAttribute('aria-label'), boards: document.querySelectorAll('#prodPick .ppk-t').length }));
97
+ ok('N1 one floating place menu replaces the rail (gone from the page), it says you are in Insights, and the product picker names the board', nav.fabs === 1 && nav.label === 'Open the menu. You are in Insights' && nav.rail === 'gone' && nav.name === 'Products: pmos' && nav.boards === 1, JSON.stringify(nav));
91
98
  { await p.click('#czFab'); const mn = await p.evaluate(() => ({ open: !document.querySelector('#czMenu').hidden, links: [...document.querySelectorAll('#czMenu a')].map((a) => a.textContent + '=' + a.getAttribute('href')), cur: (document.querySelector('#czMenu [aria-current="page"]') || {}).textContent })); await p.keyboard.press('Escape');
92
99
  ok('N1 the menu opens Home, Board and Insights, marks Insights, and Escape closes it', mn.open && mn.links.join() === 'Home=/premium.html,Board=/premium-board.html,Insights=/premium-insights.html' && mn.cur === 'Insights' && await p.evaluate(() => document.querySelector('#czMenu').hidden), JSON.stringify(mn)); }
93
100
  { const hd = await p.evaluate(() => { const b = document.querySelector('#insBar').getBoundingClientRect(), m = document.querySelector('main.ins').getBoundingClientRect(); return { bar: Math.round(b.top), main: Math.round(m.top), tabs: [...document.querySelectorAll('.ins-tabs [role="tab"]')].map((t) => t.textContent.replace(/\s+\d+$/, '').trim() + ':' + t.getAttribute('aria-selected')).join(), h1: [...document.querySelectorAll('h1')].filter((h) => h.getBoundingClientRect().height > 2).length }; });
@@ -134,8 +141,8 @@ const BMR = { ok: true, state: 'ready', model: { tiles: [
134
141
  await vwClose(p);
135
142
  await p.click('#viewChip'); const vm = await p.evaluate(() => ({ head: document.querySelector('#viewMenu .ins-mh').textContent, items: [...document.querySelectorAll('#viewMenu [data-view]')].map((b) => b.dataset.view + ((b.querySelector('.k') || {}).textContent ? ':' + b.querySelector('.k').textContent : '')).join(), nd: !!document.querySelector('#viewMenu [data-newdash]') })); await p.keyboard.press('Escape');
136
143
  ok('B1 the Dashboard menu lists every view with the default one marked, then Delivery trends, then New dashboard (IsMenus)', vm.head === 'Dashboard' && vm.items === 'all:default,pd-1,p:Growth,p:Reliability,trends' && vm.nd, JSON.stringify(vm));
137
- await p.click('#prodPick'); const pr = await p.evaluate(() => ({ head: document.querySelector('#prodMenu .ins-mh').textContent, items: [...document.querySelectorAll('#prodMenu [data-board]')].map((b) => b.textContent).join(), pf: !!document.querySelector('#prodMenu [data-portfolio]') })); await p.keyboard.press('Escape');
138
- ok('B1 the product picker says Product; with one product there is no Portfolio to roll up', pr.head === 'Product' && pr.items === 'pmos' && !pr.pf, JSON.stringify(pr));
144
+ await p.click('#prodPick'); const pr = await p.evaluate(() => ({ chip: document.querySelector('#prodPick').getAttribute('aria-label'), items: [...document.querySelectorAll('#ppMenu [data-pp] b')].map((b) => b.textContent).join(), all: !!document.querySelector('#ppMenu [data-pp="*"]'), add: !!document.querySelector('#ppMenu [data-pp-add]') })); await p.keyboard.press('Escape');
145
+ ok('B1 the product chip is the one picker Home and Board share; with one product it lists that one and Add a product, no All', pr.chip === 'Products: pmos' && pr.items === 'pmos' && !pr.all && pr.add, JSON.stringify(pr));
139
146
  }
140
147
 
141
148
  /* G1 the Goals table */
@@ -486,6 +493,8 @@ const BMR = { ok: true, state: 'ready', model: { tiles: [
486
493
  ok('E6 the real model keeps the gap: the 1 Aug to 1 Oct step is wider than 1 Jul to 1 Aug', !!m && m.charts[0].pts[2].fx - m.charts[0].pts[1].fx > 1.9 * (m.charts[0].pts[1].fx - m.charts[0].pts[0].fx));
487
494
  const ctx = await browser.newContext({ viewport: { width: 1280, height: 900 } }), pg = await ctx.newPage(), errs = [];
488
495
  pg.on('pageerror', (e) => errs.push(String(e)));
496
+ const H0 = await T.pressHeaders(base2), self = ((await (await fetch(base2 + '/api/briefing-premium/products')).json()).products || []).find((x) => x.primary);
497
+ await fetch(base2 + '/api/briefing-premium/products', { method: 'POST', headers: H0, body: JSON.stringify({ on: [self && self.ws] }) }); // the pick: this repository only
489
498
  await pg.goto(base2 + '/premium-insights.html');
490
499
  ok('E7 the real page draws that goal with the record\'s numbers and its line, a small count as blocks, and no script error', await until(() => pg.evaluate(() => { const r = document.querySelector('#goalTbl [data-goal="krm-a"]'); return !!r && r.querySelector('.val b').textContent === '30%' && !!r.querySelector('svg.ins-spark') && document.querySelectorAll('#goalTbl [data-goal="krm-b"] .ins-blocks i.on').length === 1 && document.querySelectorAll('#goalTbl [data-goal="krm-b"] .ins-blocks i').length === 2; }), 20000) && errs.length === 0, errs.join(' | '));
491
500
  const H = await T.pressHeaders(base2);
@@ -526,22 +535,29 @@ const BMR = { ok: true, state: 'ready', model: { tiles: [
526
535
  await ctx.close();
527
536
  }
528
537
 
529
- /* M: Portfolio (IsMenus): with two products the picker counts each one's goals and rolls them up, grouped by product */
538
+ /* M: Portfolio (IsMenus): with two products ticked (the one pick, batch 12 item 5) their goals roll up, grouped by product */
530
539
  {
531
540
  const two = [{ ws: 'w1', id: 'w1', name: 'pmos', goals: 5 }, { ws: 'w2', id: 'w2', name: 'Billing', goals: 1 }];
532
541
  const other = IP.build(F.facts({ board: { ws: 'w2', id: 'w2', name: 'Billing' }, boards: two, outcomes: F.facts().outcomes.slice(0, 1).map((o) => Object.assign({}, o, { id: 'krm-inv', name: 'Invoices paid on time' })), initiatives: [], saved: [] }));
533
- const R = await open({ model: mk({ boards: two }) }), q = R.page, asked = [];
542
+ const asked = [];
543
+ const R = await open({ model: mk({ boards: two }), pick: ['w1', 'w2'] }), q = R.page;
534
544
  await q.route('**/api/insights-premium?ws=w2*', (r) => { asked.push(r.request().url()); r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, state: 'ready', model: other }) }); });
535
- await q.click('#prodPick'); const pm = await q.evaluate(() => ({ items: [...document.querySelectorAll('#prodMenu [data-board]')].map((b) => b.textContent).join(), pf: (document.querySelector('#prodMenu [data-portfolio]') || {}).textContent, note: (document.querySelector('#prodMenu .ins-mnote') || {}).textContent }));
536
- ok('M1 the product picker counts each product\'s goals, then Portfolio rolls them up', pm.items === 'pmos5 goals,Billing1 goal' && pm.pf === 'Portfolio · all products' && /rolls goals up across products/.test(pm.note), JSON.stringify(pm));
537
- await q.click('#prodMenu [data-portfolio]');
538
- const pf = await until(async () => { const x = await q.evaluate(() => ({ name: document.querySelector('#prodName').textContent, groups: [...document.querySelectorAll('#goalTbl .ins-grp')].map((g) => g.querySelector('[role="cell"]').textContent), rows: document.querySelectorAll('#goalTbl [data-goal]').length, brief: document.querySelector('#brief').textContent, budgets: document.querySelectorAll('#goalTbl [data-budget]').length })); return x.groups.includes('Billing') ? x : null; }, 6000);
539
- ok('M1 Portfolio reads the other product once and groups every goal by product; budgets stay with their product', !!pf && pf.name === 'Portfolio' && pf.groups.slice(0, 2).join() === 'pmos,Billing' && pf.rows === 6 && /^Portfolio: 6 goals across 2 products/.test(pf.brief) && pf.budgets === 0 && asked.length === 1, JSON.stringify(pf));
545
+ await q.reload(); // the route above answers the second product from the first read on
546
+ const pf = await until(async () => { const x = await q.evaluate(() => ({ chip: (document.querySelector('#prodPick') || { getAttribute: () => '' }).getAttribute('aria-label'), all: (document.querySelector('#prodPick .ppk-all') || {}).textContent, groups: [...document.querySelectorAll('#goalTbl .ins-grp')].map((g) => g.querySelector('[role="cell"]').textContent), rows: document.querySelectorAll('#goalTbl [data-goal]').length, brief: document.querySelector('#brief').textContent, budgets: document.querySelectorAll('#goalTbl [data-budget]').length })); return x.groups.includes('Billing') ? x : null; }, 8000);
547
+ ok('M1 two products ticked (the chip says All): Portfolio reads the other product once and groups every goal by product; budgets stay with their product', !!pf && pf.chip === 'Products: all 2' && pf.all === 'All' && pf.groups.slice(0, 2).join() === 'pmos,Billing' && pf.rows === 6 && /^Portfolio: 6 goals across 2 products/.test(pf.brief) && pf.budgets === 0 && asked.length === 1, JSON.stringify(pf));
548
+ await q.click('#prodPick'); const pm = await q.evaluate(() => [...document.querySelectorAll('#ppMenu [data-pp]')].map((b) => b.querySelector('b').textContent + ':' + ((b.querySelector('em') || {}).textContent || '') + ':' + b.getAttribute('aria-checked')).join());
549
+ ok('M1 the list counts each product\'s goals and ticks both', pm === 'All products::true,pmos:5 goals:true,Billing:1 goal:true', pm);
550
+ await q.keyboard.press('Escape');
540
551
  await q.click('#goalTbl [data-goal="w2~krm-inv"] .nm'); const gv = await until(() => vw(q));
541
552
  ok('M1 a goal of another product opens its detail, named with its product and not on this product\'s dashboards', gv && /Invoices paid on time$/.test(gv.title) && /Billing/.test(gv.text) && !(await q.evaluate(() => document.querySelector('#czViewer [data-gx="dash"], #czViewer [data-gx="chart"]'))), JSON.stringify(gv));
542
553
  await vwClose(q);
543
- await q.click('#prodPick'); await q.click('#prodMenu [data-board="w1"]'); await sleep(150);
544
- ok('M1 picking the open product again leaves Portfolio', (await txt('#prodName', q)) === 'pmos' && (await q.evaluate(() => document.querySelectorAll('#goalTbl [data-goal]').length)) === 5);
554
+ await q.click('#tabOutcomes'); await sleep(100);
555
+ ok('M1 several ticked: Outcomes says it shows the first product only', /Shows pmos only/.test(await q.evaluate(() => (document.querySelector('#outTbl .ins-onenote') || {}).textContent || '')));
556
+ await q.click('#tabGoals');
557
+ await q.click('#prodPick'); await q.click('#ppMenu [data-pp="w2"]');
558
+ await Promise.all([q.waitForNavigation(), q.keyboard.press('Escape')]);
559
+ await until(() => q.evaluate(() => document.querySelectorAll('#goalTbl [data-goal]').length === 5), 8000);
560
+ ok('M1 unticking the other product saves the pick and leaves Portfolio', JSON.stringify(R.pk.posts) === '[["w1"]]' && (await q.evaluate(() => document.querySelector('#prodPick').getAttribute('aria-label'))) === 'Products: pmos' && (await q.evaluate(() => document.querySelectorAll('#goalTbl .ins-grp').length === 0 || ![...document.querySelectorAll('#goalTbl .ins-grp')].some((g) => /Billing/.test(g.textContent)))), JSON.stringify(R.pk.posts));
545
561
  await R.ctx.close();
546
562
  }
547
563
  /* P: the phone (IsPhone): the goal detail full screen with Readings, Moved by and Dashboards; a report setup as a sheet */
@@ -3,14 +3,15 @@
3
3
  /* briefing-premium-products-test.js — the premium Briefing across products (initiative briefing-premium-products; planning/prd/briefing-premium-products-prd.md P1 to P13).
4
4
  * The real server with two product repositories registered beside the home one (the PMOS checkout the server runs from). Both products hold a
5
5
  * kill condition KC9 that has passed its date, so each has a "decide" row with the SAME id: the page must keep them apart.
6
- * P1 by default the home workspace is not read, and the header says so
7
- * P2 the picker lists every workspace, the home one included, and says how many are on
8
- * P3 a tick is saved through /api/settings and survives a reload; Back to the default returns to P1
6
+ * P1 by default the home workspace is not read
7
+ * P2 the product chip on Home (the one picker Home, Board and Insights share, batch 12 item 5) lists every workspace, the home one included
8
+ * P3 the ticks are saved when the list closes and survive a reload; All saves every one ('*'); the default ticks save the default (null)
9
9
  * P4 an unticked product's rows leave the list
10
10
  * P6 each row carries its product
11
11
  * P9 deciding a row writes into the owning product's journal and no other
12
12
  * P10 a message about a merged row starts a Claude Code session in that product
13
- * P13 floors: the picker and its menu are 44 px high, reachable by keyboard, no sideways scroll at 390 px, both themes
13
+ * P12 ?ws= is a one-off view of that product: the chip shows it, and the saved pick stays
14
+ * P13 floors: the chip and its rows are 44 px high, reachable by keyboard, no sideways scroll at 390 px, both themes
14
15
  * Every wait polls the page; no fixed sleep stands in for a state. */
15
16
  const fs = require('fs');
16
17
  const os = require('os');
@@ -21,9 +22,8 @@ const T = require('./test-run').configure({ name: 'briefing-premium-products' })
21
22
 
22
23
  const BASE = T.BASE;
23
24
  const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
24
- /* premium-agreed-design: Home has no header line and no picker chip. The product picker is Home's minimal Products card in the Viewer
25
- * (home-more.js openProducts, "Waiting for design"), opened from the place menu's More; it holds the header's line (#hxSnap), the count
26
- * (#hxCount), one switch per workspace and Back to the default. The rows are Home's Needs-you rows; a row's product leads its hint. */
25
+ /* The product picker is the chip by Good morning (#hmPick, pm/cozy-pick.js; canvas XhpA1Desk): every workspace with a tick box, All products,
26
+ * Add a product; the ticks apply when the list (#ppMenu) closes. More > Products is gone. The rows are Home's Needs-you rows. */
27
27
  const until = async (fn, ms = 15000, step = 150) => { const t0 = Date.now(); for (;;) { let v = null; try { v = await fn(); } catch { v = null; } if (v) return v; if (Date.now() - t0 > ms) return v; await sleep(step); } };
28
28
  const results = [];
29
29
  const ok = (name, cond, extra = '') => { results.push({ name, cond: !!cond }); console.log(`${cond ? '✓' : '✗'} ${name}${!cond && extra !== '' ? ' — ' + String(extra).slice(0, 300) : ''}`); };
@@ -86,15 +86,11 @@ const product = (name, cond) => {
86
86
  await page.waitForSelector('#hmList .hm-pg', { state: 'attached', timeout: 30000 }); // a group of the one list (premium-uncovered-features)
87
87
  return { ctx, page, errors };
88
88
  };
89
- // the picker: the place menu's More, then Products; the card opens in the Viewer and reads the products
90
- const pick = async (page) => {
91
- if (!(await page.isVisible('#czViewer #hxCount'))) {
92
- await page.click('#czFab'); await page.click('[data-cz-more]');
93
- await page.click('#hmMenu [role="menuitem"]:has-text("Products")');
94
- await page.waitForSelector('#czViewer #hxCount', { state: 'visible', timeout: 10000 });
95
- }
96
- };
97
- const pickText = (page) => page.textContent('#czViewer #hxCount');
89
+ // the picker: the chip by Good morning opens the list; ticks reads its tick boxes, close presses Escape (the pick applies then)
90
+ const pick = async (page) => { if (!(await page.$('#ppMenu'))) { await page.waitForSelector('#hmPick', { timeout: 20000 }); await page.click('#hmPick'); await page.waitForSelector('#ppMenu', { timeout: 10000 }); } };
91
+ const ticks = (page) => page.$$eval('#ppMenu [data-pp]', (els) => els.map((e) => e.dataset.pp + ':' + e.getAttribute('aria-checked')));
92
+ const tick = (page, ws) => page.click(`#ppMenu [data-pp="${ws}"]`);
93
+ const setting = async () => (await json('GET', '/api/settings')).body.settings.find((x) => x.key === 'ws.briefing.include');
98
94
  // premium-uncovered-features (canvas HmProducts): another product is a closed group of the one list ("IDPF · 1 your turn"); open it to see its rows
99
95
  const openGroups = (page) => page.evaluate(() => { document.querySelectorAll('#hmList [data-hm-pg][aria-expanded="false"]').forEach((b) => b.click()); });
100
96
  const rowsOf = async (page) => { await openGroups(page).catch(() => {}); return rowsOf0(page).then(async (a) => a.concat(await pillRows(page))); };
@@ -118,33 +114,39 @@ const product = (name, cond) => {
118
114
  const rows = await rowsOf(page);
119
115
  ok('P6 each row sits in its product\'s group', rows.length === 2 && rows.map((r) => r.tag).sort().join() === 'IDPF,microsites', JSON.stringify(rows));
120
116
  await pick(page);
121
- const snap = await until(async () => { const t = await page.textContent('#czViewer #hxSnap').catch(() => ''); return t || null; }, 10000) || '';
122
- ok('P1 the Products card names what is read and what is not', /IDPF and microsites/.test(snap) && /not included/.test(snap) && /\b[Pp][Mm][Oo][Ss]\b|pmos/i.test(snap), snap);
123
- ok('P1 the Products card is marked Waiting for design', /Waiting for design/.test(await page.textContent('#czViewer')));
124
- ok('P2 the picker says how many of the workspaces are on', (await pickText(page)).replace(/\s+/g, '') === 'Products2of3', await pickText(page));
125
- const items = await page.$$eval('#czViewer .hx-sw[data-ws]', (els) => els.map((e) => ({ name: e.getAttribute('aria-label'), on: e.getAttribute('aria-checked'), h: Math.round(e.closest('.hx-row').getBoundingClientRect().height) })));
126
- ok('P2 the card lists every workspace, the home one included, switched off', items.length === 3 && items.filter((i) => i.on === 'true').length === 2 && items.some((i) => i.on === 'false' && /home/.test(i.name)), JSON.stringify(items));
127
- ok('P13 each workspace\'s line is at least 42 px high', items.every((i) => i.h >= 42), JSON.stringify(items.map((i) => i.h)));
128
- // untick microsites: its row leaves, the setting is saved
129
- await page.click(`#czViewer .hx-sw[data-ws="${wB.id}"]`);
117
+ const t0 = await ticks(page);
118
+ ok('P2 the chip lists every workspace, the home one included: All products, then each with its tick, then Add a product', t0.length === 4 && t0[0].startsWith('*:') && t0.includes(wA.id + ':true') && t0.includes(wB.id + ':true') && t0.some((x) => x.startsWith(home.id + ':')) && !!(await page.$('#ppMenu [data-pp-add]')), JSON.stringify(t0));
119
+ const hs = await page.$$eval('#ppMenu button', (els) => els.map((e) => Math.round(e.getBoundingClientRect().height)));
120
+ ok('P13 each row of the list is at least 44 px high', hs.every((h) => h >= 44), JSON.stringify(hs));
121
+ // untick the home workspace (it shows as Home's own board) and microsites: the list stays open, the pick applies when it closes
122
+ if (t0.includes(home.id + ':true')) await tick(page, home.id);
123
+ await tick(page, wB.id);
124
+ ok('P2 a press ticks or unticks and the list stays open', !!(await page.$('#ppMenu')) && (await ticks(page)).includes(wB.id + ':false'));
125
+ await page.keyboard.press('Escape');
130
126
  ok('P4 an unticked product\'s row leaves the list', await until(async () => { const r = await rowsOf(page); return r.length === 1 && r[0].tag === 'IDPF'; }, 20000));
131
- const saved = (await json('GET', '/api/settings')).body.settings.find((s) => s.key === 'ws.briefing.include');
127
+ const saved = await setting();
132
128
  ok('P3 the choice is saved as a list of workspace ids', saved && JSON.stringify(saved.value) === JSON.stringify([wA.id]), JSON.stringify(saved));
133
- ok('P2 the count in the picker follows', !!(await until(async () => (await pickText(page)).replace(/\s+/g, '') === 'Products1of3', 10000)), await pickText(page));
134
- await page.focus(`#czViewer .hx-sw[data-ws="${wA.id}"]`); await page.keyboard.press('Enter');
135
- ok('P13 keyboard: Enter on a switch flips it', !!(await until(async () => (await page.getAttribute(`#czViewer .hx-sw[data-ws="${wA.id}"]`, 'aria-checked')) === 'false', 10000)));
136
- await page.focus(`#czViewer .hx-sw[data-ws="${wA.id}"]`).catch(() => {}); await page.keyboard.press('Enter');
137
- await until(async () => (await page.getAttribute(`#czViewer .hx-sw[data-ws="${wA.id}"]`, 'aria-checked')) === 'true', 10000);
129
+ ok('P2 the chip shows the ticked product\'s tile, its name in words', /IDPF$/.test(await page.getAttribute('#hmPick', 'aria-label')) && (await page.$$('#hmPick .ppk-t')).length === 1, await page.getAttribute('#hmPick', 'aria-label'));
130
+ // the keyboard: Enter opens the list, the arrows move, Enter ticks, Escape applies
131
+ await page.focus('#hmPick'); await page.keyboard.press('Enter'); await page.waitForSelector('#ppMenu');
132
+ ok('P13 keyboard: Enter on the chip opens the list on its first row', await page.evaluate(() => document.activeElement && document.activeElement.dataset.pp === '*'));
133
+ await page.focus(`#ppMenu [data-pp="${wB.id}"]`); await page.keyboard.press('Enter');
134
+ ok('P13 keyboard: Enter on a row ticks it', (await ticks(page)).includes(wB.id + ':true'));
135
+ await page.keyboard.press('ArrowDown');
136
+ ok('P13 keyboard: the arrows move in the list', await page.evaluate(() => !!document.activeElement && !!document.activeElement.closest('#ppMenu')));
138
137
  await page.keyboard.press('Escape');
139
- ok('P13 keyboard: Escape closes the card', !!(await until(() => page.evaluate(() => !window.czViewer.isOpen()), 3000)));
138
+ ok('P13 keyboard: Escape closes the list and applies the ticks', !(await page.$('#ppMenu')) && !!(await until(async () => (await rowsOf(page)).length === 2, 20000)));
139
+ ok('P3 the default ticks save the default: the saved choice is gone', (await until(async () => ((await setting()) || {}).changed === false, 10000)), JSON.stringify(await setting()));
140
+ await pick(page); if ((await ticks(page)).includes(home.id + ':true')) await tick(page, home.id); await tick(page, wB.id); await page.keyboard.press('Escape');
141
+ await until(async () => JSON.stringify(((await setting()) || {}).value) === JSON.stringify([wA.id]), 10000);
140
142
  ok('P3 the choice survives a reload', await (async () => { await page.reload({ waitUntil: 'domcontentloaded' }); return until(async () => { const r = await rowsOf(page); return r.length === 1 && r[0].tag === 'IDPF' ? 1 : 0; }, 20000); })());
141
- // tick the home workspace
142
- await pick(page); await page.click(`#czViewer .hx-sw[data-ws="${home.id}"]`);
143
- ok('P3 switching the home workspace on reads it', await until(async () => (await page.getAttribute(`#czViewer .hx-sw[data-ws="${home.id}"]`, 'aria-checked')) === 'true' && new RegExp(home.name + ' and IDPF|IDPF and ' + home.name, 'i').test(await page.textContent('#czViewer #hxSnap')), 20000), await page.textContent('#czViewer #hxSnap').catch(() => ''));
144
- // back to the default
145
- await page.click('#czViewer [data-reset]');
146
- ok('P3 Back to the default reads every product but the home one again', await until(async () => (await rowsOf(page)).length === 2 && (await pickText(page)).replace(/\s+/g, '') === 'Products2of3', 20000), await pickText(page));
147
- ok('P3 and the saved choice is gone', (await json('GET', '/api/settings')).body.settings.find((s) => s.key === 'ws.briefing.include').changed === false);
143
+ // All products: every workspace, the home one included, is read; saved as '*' so a workspace added later joins
144
+ await pick(page); await tick(page, '*'); await page.keyboard.press('Escape');
145
+ ok('P3 All products saves every workspace (*) and the home one is read', !!(await until(async () => { const st = await setting(); const m = await json('GET', '/api/briefing-premium'); return st && JSON.stringify(st.value) === '["*"]' && m.body && m.body.model && m.body.model.products.available.every((a) => a.on); }, 20000)), JSON.stringify(await setting()));
146
+ ok('P3 with every one ticked the chip says All', /^All/.test(await page.textContent('#hmPick')) && /all 3$/.test(await page.getAttribute('#hmPick', 'aria-label')), await page.getAttribute('#hmPick', 'aria-label'));
147
+ // back to the default: tick exactly the two products
148
+ await pick(page); await tick(page, home.id); await page.keyboard.press('Escape');
149
+ ok('P3 ticking the default again reads every product but the home one, and the saved choice is gone', await until(async () => (await rowsOf(page)).length === 2 && ((await setting()) || {}).changed === false, 20000), JSON.stringify(await setting()));
148
150
  ok('no page error', errors.length === 0, errors.join(' | '));
149
151
  await ctx.close();
150
152
  }
@@ -186,16 +188,17 @@ const product = (name, cond) => {
186
188
  const { ctx, page } = await open({ w, h: 800, theme: th });
187
189
  await until(async () => (await rowsOf(page)).length >= 1, 20000);
188
190
  await pick(page);
189
- const o = await page.evaluate(() => ({ sw: document.documentElement.scrollWidth, cw: document.documentElement.clientWidth, menu: (() => { const r = document.querySelector('#czViewer').getBoundingClientRect(); return { l: Math.round(r.left), r: Math.round(r.right) }; })() }));
190
- ok(`P13 at ${w} px, ${th}: no sideways scroll with the Products card open, and the card stays on screen`, o.sw <= o.cw && o.menu.l >= 0 && o.menu.r <= o.cw, JSON.stringify(o));
191
+ const o = await page.evaluate(() => ({ sw: document.documentElement.scrollWidth, cw: document.documentElement.clientWidth, chip: Math.round(document.querySelector('#hmPick').getBoundingClientRect().height), sheet: document.querySelector('#ppMenu').classList.contains('sheet'), menu: (() => { const r = document.querySelector('#ppMenu').getBoundingClientRect(); return { l: Math.round(r.left), r: Math.round(r.right) }; })() }));
192
+ ok(`P13 at ${w} px, ${th}: no sideways scroll with the list open, the list stays on screen (a sheet on a phone), and the chip is 44 px`, o.sw <= o.cw && o.menu.l >= 0 && o.menu.r <= o.cw && o.sheet === (w < 760) && (w >= 760 || o.chip >= 44), JSON.stringify(o));
191
193
  await ctx.close();
192
194
  }
193
195
 
194
196
  {
195
197
  // the narrowed view (P12): the one-workspace page, with a way back
198
+ const before = JSON.stringify(((await setting()) || {}).value);
196
199
  const { ctx, page } = await open({ q: '?ws=' + encodeURIComponent(wB.id) });
197
- await pick(page);
198
- ok('P12 ?ws= shows that one workspace and a link back to the picked products', await until(async () => (await page.$('#czViewer #pickAll')) !== null, 20000) && (await page.getAttribute('#czViewer #pickAll', 'href')) === '/premium.html');
200
+ await page.waitForSelector('#hmPick', { timeout: 20000 });
201
+ ok('P12 ?ws= shows that one workspace on the chip and leaves the saved pick alone', /microsites$/.test(await page.getAttribute('#hmPick', 'aria-label')) && JSON.stringify(((await setting()) || {}).value) === before, await page.getAttribute('#hmPick', 'aria-label'));
199
202
  await ctx.close();
200
203
  }
201
204
  return finish();
@@ -0,0 +1,190 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+ /* calm-timeline-test.js — the calmer Board timeline (feedback batch 13 item 4, A; canvas XcalmA1Desk, A4Dark, A3Phone, A2Folded, A5Milestones).
4
+ * Serves the real page from the real server; GET /api/board-premium answers Project Ascent's IDPF board (fixtures/program-ascent.js) with rows
5
+ * added for each case: a hold, a late row, an at-risk row, an initiative with several milestone tasks. The page's clock is the fixture's (17 Oct 2026).
6
+ * L one label per bar end: what lands, then when; the year only when it is not this year; amber at risk, orange late; no date under a ◇
7
+ * K the mark set: no dotted hold, ⏸, hatched band, blue ◆ or amber tint; a hold is the gap's hairline and opens the hold card
8
+ * P only the pinned milestones show (by default the last); Filter's All shows every one, None none; a ◇ press lists the milestones
9
+ * G group rows draw nothing while open; folded, the roll-up line, the counted ◇s, the end date and the off-track dots
10
+ * Q a dot only off track; no "Running"; no goal dots on an open product head
11
+ * N names wrap to two lines and are never cut · B one tint, quarter lines only · M the phone keeps the labels and the quiet dots
12
+ * SHOTS_4=<dir>: the timeline at 1440 and 390, light and dark, folded, into <dir>. */
13
+ const path = require('path');
14
+ const { spawn } = require('child_process');
15
+ const { findBrowser } = require('./lib/find-browser');
16
+ const T = require('./test-run').configure({ name: 'calm-timeline' });
17
+ const BP = require('./lib/board-premium.js');
18
+ const F = require('./fixtures/board-premium-facts.js');
19
+
20
+ const BASE = T.BASE;
21
+ const results = [];
22
+ const ok = (name, cond, extra = '') => { results.push({ name, cond: !!cond }); console.log(`${cond ? '✓' : '✗'} ${name}${!cond && extra !== '' ? ' — ' + extra : ''}`); };
23
+ let srv = null; let browser = null;
24
+ const finish = async (code) => {
25
+ if (browser) await browser.close().catch(() => {});
26
+ if (srv) { try { srv.kill('SIGKILL'); } catch { /* gone */ } }
27
+ T.killTmux();
28
+ const bad = results.filter((x) => !x.cond).length;
29
+ console.log(`\n${results.length - bad}/${results.length} calm-timeline assertions passed`);
30
+ process.exit(code !== undefined ? code : (bad ? 1 : 0));
31
+ };
32
+ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
33
+
34
+ const row = (id, title, o) => ({ id, title, lane: 'feature', stage: 'Build', cat: 'Do', owner: 'Wawan', anchor: 'q4-2026:o3:kr1', horizon: 'now', status: 'on track', start: null, end: null, progress: 30, warnings: [], rank: 0, health: 'on', updated: '2026-10-15T08:00:00.000Z', reading: 'build', stageSource: 'derived', dupOf: null, ...o });
35
+ const EXTRA = [
36
+ row('email-otp', 'Email OTP (passwordless login for every member)', { start: '2026-07-01', end: '2027-06-10', status: 'on hold', holds: [{ from: '2026-08-25', to: null, back: '2027-03-01', reason: 'Waits on the SMS vendor contract' }], stopped: { state: 'on-hold', reason: 'Waits on the SMS vendor contract', at: '2026-08-25T09:00:00.000Z', back: '2027-03-01' } }),
37
+ row('lightbox', 'Lightbox UI Adjustments', { start: '2026-08-10', end: '2026-10-12', status: 'late', progress: 80 }),
38
+ row('magw', 'MAGW migration to auth-service', { start: '2026-09-01', end: '2026-11-02', status: 'at risk', progress: 60 }),
39
+ row('migration', 'Migration — move from Okta to Descope', { start: '2026-10-15', end: '2027-09-05', progress: 15 }),
40
+ ];
41
+ const it = (ini, uid, title, o) => ({ uid, key: '', kind: 'Task', src: 'pmos', title, status: 'To do', owner: 'Wawan', ini, start: null, end: null, ref: uid, board: 'idpf', milestone: true, ...o });
42
+ const ITEMS = [
43
+ it('migration', 'm-it1', 'Iteration 1 live', { end: '2027-01-20' }),
44
+ it('migration', 'm-it2', 'Iteration 2 live', { end: '2027-03-25' }),
45
+ it('migration', 'm-rel', 'Release: all users on Descope', { end: '2027-06-01' }),
46
+ it('migration', 'm-okta', 'Okta decommissioned', { end: '2027-09-05', section: 'evaluate' }),
47
+ it('lightbox', 'l-live', 'Lightbox UI live', { end: '2026-10-12', section: 'evaluate' }),
48
+ ];
49
+
50
+ (async () => {
51
+ const exe = findBrowser();
52
+ if (!exe) { console.log('✗ no Chrome/Chromium on this machine — the suite cannot run'); return finish(1); }
53
+ let chromium;
54
+ try { ({ chromium } = require('playwright-core')); } catch { console.log('✗ playwright-core is not installed'); return finish(1); }
55
+ srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT) }) });
56
+ await T.waitForServer(BASE);
57
+ browser = await chromium.launch({ executablePath: exe });
58
+
59
+ /** The Board on the timeline. o: { w, h, span, dark, mode, fold, phone } */
60
+ const open = async (o = {}) => {
61
+ const ctx = await browser.newContext({ viewport: { width: o.w || 1440, height: o.h || 1000 }, colorScheme: o.dark ? 'dark' : 'light', hasTouch: !!o.phone, isMobile: !!o.phone });
62
+ const page = await ctx.newPage();
63
+ const errors = [];
64
+ page.on('pageerror', (e) => errors.push(String((e && e.stack) || e)));
65
+ await page.clock.setFixedTime(new Date(F.NOW));
66
+ const base = F.programFacts('idpf'), rows = base.rows.concat(EXTRA.map((r) => ({ ...r })));
67
+ await page.route('**/api/board-premium*', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, state: 'ready', model: BP.build({ ...base, rows, total: rows.length, items: ITEMS.map((x) => ({ ...x })) }), as_of: Date.now() }) }));
68
+ await page.route('**/api/programs', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, programs: F.programs() }) }));
69
+ await page.route('**/api/board-trail*', (r) => r.fulfill({ status: 500, contentType: 'application/json', body: JSON.stringify({ ok: false, error: 'not in this check' }) }));
70
+ const ls = { 'pmos.board.view': 'time', 'pmos.board.pview': 'time', 'pmos.board.span': o.span || 'year', 'pmos.board.msMode': o.mode || 'pinned' };
71
+ if (o.fold) ls['pmos.board.fold'] = JSON.stringify(o.fold);
72
+ 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 */ } }, [ls]);
73
+ await page.goto(BASE + '/premium-board.html?ws=idpf&board=idpf');
74
+ await page.waitForSelector(o.fold ? '#ibBody .tg-r' : '#ibBody [data-row]', { timeout: 15000 });
75
+ await page.waitForTimeout(500);
76
+ return { ctx, page, errors };
77
+ };
78
+ const shots = process.env.SHOTS_4;
79
+ const shot = async (p, name) => { if (shots) { await p.waitForTimeout(1200); await p.screenshot({ path: path.join(shots, name + '.png') }); } };
80
+ /** One row's marks, read in the page. */
81
+ const rowOf = (p, key) => p.evaluate((k) => {
82
+ const r = document.querySelector(`#ibBody [data-row="${k}"]`); if (!r) return null;
83
+ return {
84
+ labels: [...r.querySelectorAll('.tg-endl')].map((x) => x.textContent.replace(/\s+/g, ' ').trim()),
85
+ tone: [...r.querySelectorAll('.tg-endl > b')].map((x) => x.className),
86
+ tm: [...r.querySelectorAll('.tg-tm')].map((x) => x.getAttribute('title')), end: (r.querySelector('.tg-end') || {}).className || '',
87
+ holds: [...r.querySelectorAll('.tg-ng.ho')].map((x) => x.getAttribute('aria-label')),
88
+ dot: (r.querySelector('.cz-dot') || {}).className || '',
89
+ };
90
+ }, key);
91
+
92
+ // ── L, K, Q, N, B: the open timeline at Year ──
93
+ {
94
+ const { ctx, page: p, errors } = await open();
95
+ await shot(p, 'calm-1440');
96
+ const mig = await rowOf(p, 'board:migration'), lb = await rowOf(p, 'board:lightbox'), mg = await rowOf(p, 'board:magw'), otp = await rowOf(p, 'board:email-otp'), dp = await rowOf(p, 'board:descope-parity');
97
+ ok('L the end label says what lands, then when, with the year when it is not this year', mig && mig.labels.length === 1 && mig.labels[0] === 'Okta decommissioned Sep 5 ’27', JSON.stringify(mig));
98
+ ok('L with no end milestone the label names the stage the end stands for, and this year carries no year', dp && dp.labels.length === 1 && dp.labels[0] === 'Deliver Nov 12', JSON.stringify(dp));
99
+ ok('L late: the date is orange and the ◇ orange; at risk: the date is amber', lb && lb.tone.join() === 'late' && /late/.test(lb.end) && lb.labels[0] === 'Lightbox UI live Oct 12' && mg && mg.tone.join() === 'risk', JSON.stringify([lb, mg]));
100
+ const gone = await p.evaluate(() => ['.tg-tml', '.tg-pz', '.tg-gap', '.tg-hl', '.tg-out', '.tg-msd', '.tg-dm', '.tg-bar.t-risk', '.tg-bar.t-you', '.tg-end.ms', '.tg-over', '.tg-lab'].filter((s) => document.querySelector('#ibBody ' + s)));
101
+ ok('K no dotted hold, ⏸, return date, hatched band, blue ◆, amber tint or second date anywhere', gone.length === 0, gone.join(' '));
102
+ ok('K a hold is the hairline of a gap, and its words are its label', otp && otp.holds.length === 1 && /^On hold, Aug 25 to Mar 1, 2027, waits on the SMS vendor contract/.test(otp.holds[0]), JSON.stringify(otp));
103
+ await p.click('#ibBody [data-row="board:email-otp"] .tg-ng.ho');
104
+ await p.waitForTimeout(250);
105
+ const card = await p.evaluate(() => { const c = document.querySelector('#bdPop'); return c && !c.hidden ? { resume: !!c.querySelector('[data-holdgo="resume"]'), date: !!c.querySelector('[data-holdgo="date"]'), text: c.textContent } : null; });
106
+ ok('K pressing the hold opens the hold card: resume and change the date', card && card.resume && card.date && /On hold/.test(card.text), JSON.stringify(card));
107
+ await p.keyboard.press('Escape');
108
+ ok('P by default only the last milestone shows: the end ◇, and no ◇ in the middle', mig && mig.tm.length === 0 && /tg-end/.test(mig.end), JSON.stringify(mig));
109
+ await p.click('#ibBody [data-row="board:migration"] .tg-end');
110
+ await p.waitForTimeout(250);
111
+ const list = await p.evaluate(() => [...document.querySelectorAll('.bd-pc-r .bd-pc-n')].map((x) => x.textContent));
112
+ ok('P pressing a ◇ opens the pin card with every milestone of the initiative', list.length === 4 && /Iteration 1 live/.test(list[0]), JSON.stringify(list));
113
+ await p.keyboard.press('Escape');
114
+ const q = await p.evaluate(() => ({
115
+ dots: [...document.querySelectorAll('#ibBody .tg-n.ini2')].map((b) => b.closest('[data-row]').dataset.row + ':' + ((b.querySelector('.cz-dot') || {}).className || '')),
116
+ small: [...document.querySelectorAll('#ibBody .tg-pgo small')].length, goal: document.querySelectorAll('#ibBody .tg-lane .bd-gd').length,
117
+ progTrack: [...document.querySelectorAll('#ibBody .tg-pg > .tg-p')].map((x) => x.querySelectorAll('.tg-span, .tg-pdm, .tg-clu, .tg-tm, .tg-tmc, .tg-endl, .tg-pdl').length),
118
+ laneTrack: [...document.querySelectorAll('#ibBody .tg-lane > .tg-p')].map((x) => x.querySelectorAll('.tg-span, .tg-tm, .tg-tmc, .tg-endl').length),
119
+ }));
120
+ const dotOf = (k) => (q.dots.find((x) => x.startsWith('board:' + k + ':')) || '').split(':').slice(2).join(':');
121
+ ok('Q a dot only off track: none on track, orange late, amber at risk, grey on hold', dotOf('descope-parity') === '' && dotOf('migration') === '' && /late/.test(dotOf('lightbox')) && /risk/.test(dotOf('magw')) && /\bq\b/.test(dotOf('email-otp')), JSON.stringify(q.dots));
122
+ ok('Q no "Running" or product count under a program, no goal dots on an open product head', q.small === 0 && q.goal === 0, JSON.stringify(q));
123
+ ok('G an open program or product draws nothing on its track', q.progTrack.length > 0 && q.progTrack.every((n) => n === 0) && q.laneTrack.every((n) => n === 0), JSON.stringify(q));
124
+ const nm = await p.evaluate(() => [...document.querySelectorAll('#ibBody .tg-n.ini2 b, #ibBody .tg-pgo .tt b')].map((b) => ({ t: b.textContent, cut: b.scrollHeight > b.clientHeight + 1, lines: Math.round(b.clientHeight / parseFloat(getComputedStyle(b).lineHeight)), w: b.closest('.tg-n') ? b.closest('.tg-n').getBoundingClientRect().width : 0 })));
125
+ const otpName = nm.find((x) => /^Email OTP/.test(x.t));
126
+ ok('N the name column is 250 px and a long name wraps to two lines, not cut', nm.length && nm.every((x) => !x.cut) && otpName && otpName.lines === 2 && Math.round(nm[0].w) === 250, JSON.stringify(nm.slice(0, 4)));
127
+ const bg = await p.evaluate(() => {
128
+ const r = document.querySelector('#ibBody [data-row="board:migration"]'), sc = document.querySelector('#ibBody .tg-s');
129
+ const lines = [...r.querySelectorAll('.tg-gl')].map((g) => parseFloat(g.style.left));
130
+ const from = new Date(+sc.dataset.from), to = new Date(+sc.dataset.to), want = [];
131
+ for (let d = new Date(from.getFullYear(), from.getMonth() - (from.getMonth() % 3) + 3, 1); d < to; d = new Date(d.getFullYear(), d.getMonth() + 3, 1)) want.push(((d - from) / (to - from)) * 100);
132
+ const lane = document.querySelector('#ibBody .tg-lane'), pg = document.querySelector('#ibBody .tg-pg');
133
+ return { lines, want, lane: lane ? getComputedStyle(lane).backgroundColor : '', card: getComputedStyle(document.querySelector('#ibBody .tg-r[data-row]')).backgroundColor, pg: pg ? getComputedStyle(pg).backgroundColor : '' };
134
+ });
135
+ ok('B quarter lines only at Year', bg.lines.length === bg.want.length && bg.lines.every((x, i) => Math.abs(x - bg.want[i]) < 0.05), JSON.stringify(bg));
136
+ ok('B one tint: the program row; product rows are plain', bg.pg && bg.pg !== 'rgba(0, 0, 0, 0)' && bg.pg !== bg.lane, JSON.stringify(bg));
137
+ const lg = await p.evaluate(() => (document.querySelector('.tg-lgd') || {}).textContent || '');
138
+ ok('K the legend names one hairline key and no program milestone', /Gap or hold|On hold|No activity/.test(lg) && !/Program milestone/.test(lg), lg);
139
+ ok('no page error', errors.length === 0, errors.join(' | '));
140
+ await ctx.close();
141
+ }
142
+
143
+ // ── P: Filter's All and None ──
144
+ {
145
+ const { ctx, page: p } = await open({ mode: 'all' });
146
+ const mig = await rowOf(p, 'board:migration');
147
+ ok('P Filter All: every milestone shows (three in the middle, the end ◇)', mig && mig.tm.length === 3, JSON.stringify(mig));
148
+ await ctx.close();
149
+ const n = await open({ mode: 'none' });
150
+ const m2 = await rowOf(n.page, 'board:migration');
151
+ ok('P Filter None: no ◇ in the middle; the end keeps its ◇ and label', m2 && m2.tm.length === 0 && m2.labels.length === 1, JSON.stringify(m2));
152
+ await n.ctx.close();
153
+ }
154
+
155
+ // ── G: folded groups ──
156
+ {
157
+ const { ctx, page: p } = await open({ fold: ['p:IDPF', 'g:ascent'] });
158
+ const keys = await p.evaluate(() => [...document.querySelectorAll('#ibBody [data-fold]')].map((b) => b.dataset.fold));
159
+ await ctx.close();
160
+ const { ctx: c2, page: q } = await open({ fold: keys });
161
+ await shot(q, 'calm-folded-1440');
162
+ const g = await q.evaluate(() => ({
163
+ prog: [...document.querySelectorAll('#ibBody .tg-pg.closed > .tg-p')].map((x) => ({ span: x.querySelectorAll('.tg-span').length, dm: x.querySelectorAll('.tg-tm, .tg-tmc').length, end: (x.querySelector('.tg-endl') || {}).textContent || '' })),
164
+ lane: [...document.querySelectorAll('#ibBody .tg-lane.closed')].map((x) => ({ span: x.querySelectorAll('.tg-p .tg-span').length, end: (x.querySelector('.tg-p .tg-endl') || {}).textContent || '', dots: x.querySelectorAll('.tg-offd .cz-dot').length })),
165
+ }));
166
+ ok('G folded, a program shows the roll-up line, its ◇s and its end date', g.prog.length > 0 && g.prog.every((x) => x.span > 0 && x.dm > 0 && /’\d\d$/.test(x.end)), JSON.stringify(g));
167
+ ok('G folded, a product shows the roll-up, its end date and one dot per initiative off track', g.lane.length > 0 && g.lane.some((x) => x.span > 0 && x.end && x.dots === 3), JSON.stringify(g));
168
+ await c2.close();
169
+ }
170
+
171
+ // ── M: the phone ──
172
+ {
173
+ const { ctx, page: p, errors } = await open({ w: 390, h: 844, phone: true });
174
+ await shot(p, 'calm-390');
175
+ const m = await p.evaluate(() => ({
176
+ labels: [...document.querySelectorAll('#ibBody .tgq-r[data-row] .tg-endl')].length,
177
+ dots: [...document.querySelectorAll('#ibBody .tgq-r[data-row] .tgq-n')].map((b) => (b.querySelector('.cz-dot') || {}).className || ''),
178
+ scroll: document.documentElement.scrollWidth <= innerWidth + 1,
179
+ }));
180
+ ok('M the phone keeps the end labels, a dot only off track, and no sideways page scroll', m.labels >= 5 && m.dots.filter(Boolean).length === 3 && m.scroll, JSON.stringify(m));
181
+ ok('M no page error on the phone', errors.length === 0, errors.join(' | '));
182
+ await ctx.close();
183
+ }
184
+
185
+ if (shots) {
186
+ const d = await open({ dark: true }); await shot(d.page, 'calm-1440-dark'); await d.ctx.close();
187
+ const pd = await open({ w: 390, h: 844, phone: true, dark: true }); await shot(pd.page, 'calm-390-dark'); await pd.ctx.close();
188
+ }
189
+ finish();
190
+ })();
@@ -1,4 +1,28 @@
1
1
  [
2
+ {
3
+ "v": "0.426.0",
4
+ "at": "2026-10-27T04:01:13.323Z",
5
+ "f": 2,
6
+ "prs": [
7
+ {
8
+ "n": 1068,
9
+ "t": "Thirteenth testing feedback batch",
10
+ "s": "Thirteenth testing feedback batch"
11
+ }
12
+ ]
13
+ },
14
+ {
15
+ "v": "0.425.0",
16
+ "at": "2026-10-27T01:04:19.475Z",
17
+ "f": 2,
18
+ "prs": [
19
+ {
20
+ "n": 1066,
21
+ "t": "Recording tab and one product picker (batch 12, items 1 and 5)",
22
+ "s": "Recording tab and one product picker (batch 12, items 1 and 5)"
23
+ }
24
+ ]
25
+ },
2
26
  {
3
27
  "v": "0.424.0",
4
28
  "at": "2026-10-27T00:38:50.632Z",
@@ -117,7 +117,9 @@ const put = (root, rel, text) => { fs.mkdirSync(path.dirname(path.join(root, rel
117
117
  await menu(pg); await pg.click('#czMenu [data-cz-news]');
118
118
  const nw = await until(() => pg.evaluate(() => { const v = document.querySelector('#czViewer:not([hidden]) .ev-news'); return v && !v.querySelector('.ev-skelrow') ? { t: v.textContent, rest: [...v.querySelectorAll('[data-ev-rest]')].map((b) => b.dataset.evRest), kind: document.querySelector('#czViewer .cz-vw-kind').textContent } : null; }), 20000);
119
119
  ok('N1 New for you opens in the Viewer, says what is new or that nothing is, and names where the rest of Around you went', !!nw && /New since this morning/.test(nw.t) && /(Nothing new since you last looked|Mentions|Given to you|Finished while you were away)/.test(nw.t) && nw.rest.join() === 'pulse,rep,prop,scan', JSON.stringify(nw).slice(0, 400));
120
- ok('N1 opening it posted nothing', posts.length === 0, JSON.stringify(posts));
120
+ // Home's own background sync of its loose rows (batch 13 item 7) is not a post the Viewer makes.
121
+ const own = posts.filter((u) => u !== '/api/loose-props/rows');
122
+ ok('N1 opening it posted nothing', own.length === 0, JSON.stringify(posts));
121
123
  await snap(pg, 'news-1440-light');
122
124
  await pg.click('#czViewer [data-ev-rest="pulse"]');
123
125
  ok('N2 a Where the rest went row opens its view, with Back to New for you', !!(await until(() => pg.evaluate(() => /Back to New for you/.test((document.querySelector('#czViewer [data-bda="back"]') || {}).textContent || '')))));
@@ -56,7 +56,8 @@ You work across products, and a conversation in email, the calendar or Confluenc
56
56
  - **Each row says which product it belongs to**, in a small tag before its line. Two products can hold an initiative or a kill condition of the same name. They stay separate rows, and a press is written into the journal of the product the row names.
57
57
  - **The order** is the same across products: blocked work first, then decisions only you can make, then what has waited longest. A failed-review row is made for each product, so a count is never added across products.
58
58
  - **The header** names what is read and what is not, for example "IDPF and microsites · pmos not included". A product that is still being read or could not be read is named there too, and the others still show.
59
- - **`/premium.html?ws=<id>`** shows that one workspace as the Briefing did before, whether or not it is ticked, with a button back to the ticked products.
59
+ - **`/premium.html?ws=<id>`** shows that one workspace, whether or not it is ticked. It does not change the pick. A change in the product picker saves the pick and opens Home without `?ws=`.
60
+ - **The product picker** on Home, the Board and Insights writes the same setting. **All** saves `["*"]`, so a product added later is read too.
60
61
  - **Mail, Jira and Confluence** come from today's morning brief, which a scheduled skill in an agent session writes to the state folder (the server reaches none of those services). See "Mail, Jira and Confluence" below.
61
62
 
62
63
  ## Mail, Jira and Confluence
@@ -357,7 +358,7 @@ Not drawn, because PMOS holds no record for them: the mockup's demo tasks, its J
357
358
 
358
359
  ## Insights
359
360
 
360
- Insights is the fifth place on the rail, at `/premium-insights.html`. It reads the KR metric records of the board's workspace, your saved dashboards, and the report files and report setups the console's Reports tab lists. It writes only when you press a button: a dashboard goes to the workspace's state folder (`premium-dashboards.jsonl`), and a report press goes to the report ledger through the console's own report routes. An agent session cannot make either write.
361
+ Insights is the fifth place on the rail, at `/premium-insights.html`. Its product picker is the chip that Home and the Board use, with the same saved pick. With one product ticked, Insights shows that product. With several, it opens the **Portfolio** of the ticked products, grouped by product. Outcomes and the Library read one product at a time, so they show the first ticked product and say so. It reads the KR metric records of the board's workspace, your saved dashboards, and the report files and report setups the console's Reports tab lists. It writes only when you press a button: a dashboard goes to the workspace's state folder (`premium-dashboards.jsonl`), and a report press goes to the report ledger through the console's own report routes. An agent session cannot make either write.
361
362
 
362
363
  - **Charts.** One chart for each KR metric that holds at least two readings. The line runs through the readings at their dates, so a month with no reading is a gap and not a zero. The dashed line is the metric's target. The chip is the record's own line status: on its line, behind it, or well behind it. Pressing a chart, or its Details link, opens the metric's record in the dialog with the read-only agent beside it.
363
364
  - **The insight.** The page opens with one finding across the board's measures, in a large line, with the reason and its numbers under it, up to two more findings, **Ask PMOS why** (opens the measure's dialog on the Conversation tab) and **See the chart**. A measure that is short of its target, with a target date after its last reading, gets a projection: a straight line through its last four readings (all, when fewer), carried to the target date. When the line lands short, the finding says the measure will miss its target on that date at this pace, where it lands, how far short, and when it would get there. When the line lands on or past the target, it says the measure is on course. The page says how the projection is made, and no forecast line is drawn on a chart. With no KR metric, or none with two readings, the page says there is no insight yet and why.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  type: Guide
3
3
  title: "Claude proposes: the one ✦ on each initiative"
4
- description: "What Claude finds when you add an initiative that already lives elsewhere, the new dates, done and tidy names it proposes for late tasks, how you keep or drop them in the Viewer, Undo, and the pmos propose commands."
4
+ description: "What Claude finds when you add an initiative that already lives elsewhere, the new dates, done and tidy names it proposes for late tasks, the clean-up of the work that is not in an initiative, how you keep or drop them in the Viewer, Undo, and the pmos propose commands."
5
5
  timestamp: 2026-10-26
6
6
  ---
7
7
 
@@ -33,5 +33,20 @@ Claude's background run files proposals with these commands. The server pins the
33
33
  - `pmos propose done --json <file|->`: a task that looks done, with the evidence.
34
34
  - `pmos propose name --json <file|->`: tidy names.
35
35
  - `pmos propose status`: what is open, kept and dropped.
36
+ - `pmos propose loose <link|merge|finish|start> --json <file|->`: the clean-up of the work that is not in an initiative. Only the clean-up run can file these, and that run files nothing else. `pmos propose loose status` shows what is open and kept.
36
37
 
37
38
  Every proposal carries its source. Nothing is sent.
39
+
40
+ ## The clean-up of loose work
41
+
42
+ Home's "Not in an initiative" group has its own blue ✦ with the number of rows Claude can place. Claude looks once each morning, and at once when the group passes 10 rows. With nothing to place, the ✦ is not shown.
43
+
44
+ Press the ✦ to open "Claude proposes" in the Viewer. The groups come in this order:
45
+
46
+ - **Link.** Rows that belong to an open initiative: chats, your own tasks and meetings. A repeating meeting links its series, so every occurrence follows. A row that waits on you or is late keeps its blue dot under the initiative. Each row has a tile with the initiative's letters. Press the tile to move that row to another initiative, or to start a new initiative from it.
47
+ - **Tidy.** A chat with the same name as your own task joins it, and your task stays. A chat whose last message closed the work is finished, with that message quoted. A chat with no message for 14 days, that waits on nothing, is put away. A put-away chat leaves Home and comes back when you write in it. Search keeps it. A session that is idle for 30 minutes and safe to close is closed: its work is committed and pushed, it has no open goal step, and nothing waits on you. Closing keeps the transcript.
48
+ - **Start an initiative.** When 3 or more rows are about one new thing, Claude proposes a new initiative from them, with its anchor.
49
+
50
+ In the pill menu on an initiative's row, a session that is idle and safe to close is light blue. Its line starts with ✦ and says why, and its ✓ closes it. An idle session that is not safe has no ✦ and no ✓. Its line says what holds it, such as "3 files not committed".
51
+
52
+ ✓ in the header keeps everything shown. Each proposal has its own ✓ and ✕, and ⌄ shows its rows. ✕ on a row leaves it out of that group for good, with Undo on the row. One toast says what was placed, with Undo. History lists each approval with its own Undo. An initiative that was started stays when you undo: close it on the Board.