create-pmos 0.401.0 → 0.402.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 (51) hide show
  1. package/package.json +13 -18
  2. package/payload/KIT-VERSION +2 -2
  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/payload/state/log.md +1 -1
  7. package/workspace/board-programs-test.js +226 -0
  8. package/workspace/board-shot.js +54 -0
  9. package/workspace/briefing-premium-board-test.js +22 -15
  10. package/workspace/briefing-premium-calendar-test.js +6 -3
  11. package/workspace/briefing-premium-sources-test.js +15 -10
  12. package/workspace/briefing-premium-test.js +38 -16
  13. package/workspace/changelog.json +12 -0
  14. package/workspace/fixtures/board-premium-facts.js +20 -3
  15. package/workspace/fixtures/briefing-premium-facts.js +18 -2
  16. package/workspace/fixtures/program-ascent.js +101 -0
  17. package/workspace/guide/home.md +11 -7
  18. package/workspace/guide/index.md +1 -0
  19. package/workspace/guide/programs.md +37 -0
  20. package/workspace/lib/briefing-premium-products.js +4 -4
  21. package/workspace/lib/briefing-premium.js +2 -2
  22. package/workspace/lib/programs.js +129 -0
  23. package/workspace/lib/route-modules.js +1 -0
  24. package/workspace/lib/routes-briefing-premium.js +1 -1
  25. package/workspace/lib/routes-programs.js +122 -0
  26. package/workspace/package-lock.json +2 -2
  27. package/workspace/package.json +1 -1
  28. package/workspace/premium-board-actions-test.js +1 -1
  29. package/workspace/premium-vw-cal-test.js +6 -3
  30. package/workspace/program-panel-test.js +143 -0
  31. package/workspace/public/pm/bd-acts.js +23 -14
  32. package/workspace/public/pm/bd-asks.js +89 -23
  33. package/workspace/public/pm/bd-prog-panel.js +451 -0
  34. package/workspace/public/pm/bd-prog.js +191 -0
  35. package/workspace/public/pm/bd-span.js +98 -15
  36. package/workspace/public/pm/bd-views.js +93 -29
  37. package/workspace/public/pm/cozy-board.css +226 -9
  38. package/workspace/public/pm/cozy-home.css +26 -0
  39. package/workspace/public/pm/cozy-panel.css +178 -0
  40. package/workspace/public/pm/cozy-today.css +189 -0
  41. package/workspace/public/pm/home-app.js +75 -19
  42. package/workspace/public/pm/home-chat.js +8 -4
  43. package/workspace/public/pm/home-data.js +1 -1
  44. package/workspace/public/pm/home-list.js +98 -17
  45. package/workspace/public/pm/home-today.js +137 -59
  46. package/workspace/public/pm/premium-board.js +225 -57
  47. package/workspace/public/pm/program-model.js +192 -0
  48. package/workspace/public/premium-board.html +4 -1
  49. package/workspace/test-lists/board-programs.json +9 -0
  50. package/workspace/test-lists/program-hierarchy.json +11 -0
  51. package/workspace/test-lists/program-panel.json +9 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-pmos",
3
- "version": "0.401.0",
3
+ "version": "0.402.0",
4
4
  "description": "Scaffold the PMOS portable kit — run the PMOS product-management workflow (initiative → lane-fit spec → contract → build → three gates, with work-type lanes for features, research, maintenance, incidents, and content) entirely inside your own repo, with all state as git-versioned files. Includes `workflow-sweep`, which audits the state every board derives from and separates real defects from work you simply have not done. `create-pmos workspace` also installs + launches the local Terminal Workspace GUI. No database, no network, no telemetry.",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -32,6 +32,18 @@
32
32
  "audit"
33
33
  ],
34
34
  "pmosChanges": [
35
+ {
36
+ "v": "0.402.0",
37
+ "at": "2026-10-24T03:05:59.743Z",
38
+ "f": 2,
39
+ "prs": [
40
+ {
41
+ "n": 1031,
42
+ "t": "Build the Ready for development page (Home A+C, Programs, 60% panel)",
43
+ "s": "Build the Ready for development page (Home A+C, Programs, 60% panel)"
44
+ }
45
+ ]
46
+ },
35
47
  {
36
48
  "v": "0.401.0",
37
49
  "at": "2026-10-23T23:36:01.429Z",
@@ -279,23 +291,6 @@
279
291
  "s": "Share a viewer file as a password link that needs no Cloudflare login"
280
292
  }
281
293
  ]
282
- },
283
- {
284
- "v": "0.382.0",
285
- "at": "2026-10-21T12:58:18.296Z",
286
- "f": 2,
287
- "prs": [
288
- {
289
- "n": 991,
290
- "t": "A chat in every premium popup",
291
- "s": "A chat in every premium popup"
292
- },
293
- {
294
- "n": 992,
295
- "t": "Download a file from the viewer (premium-viewer-share slice 1)",
296
- "s": "Download a file from the viewer (premium-viewer-share slice 1)"
297
- }
298
- ]
299
294
  }
300
295
  ]
301
296
  }
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@ae21ca8c
2
- assembled: 2026-10-23
1
+ kernel-source: pmos@76a70406
2
+ assembled: 2026-10-24
3
3
  mode: vendor
@@ -2,7 +2,7 @@
2
2
  type: Reference
3
3
  title: "Eval calibration log"
4
4
  description: "Append-only record of every PM override of an evaluator verdict."
5
- generated: {by: process:create-pmos, at: "2026-10-23T23:35:59Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-24T03:05:56Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -2,7 +2,7 @@
2
2
  type: Reference
3
3
  title: "Health budgets"
4
4
  description: "Closed registry of health-budget anchors (D59), edited only by the PM."
5
- generated: {by: process:create-pmos, at: "2026-10-23T23:35:59Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-24T03:05:56Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -2,7 +2,7 @@
2
2
  type: Reference
3
3
  title: "Discoveries and friction log"
4
4
  description: "Append-only record of what runs discovered and where the process rubbed."
5
- generated: {by: process:create-pmos, at: "2026-10-23T23:35:59Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-24T03:05:56Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  Newest first, ISO dates.
4
4
 
5
- ## 2026-10-23
5
+ ## 2026-10-24
6
6
 
7
7
  - Adopted OKF v0.2 (D73).
@@ -0,0 +1,226 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+ /* board-programs-test.js — programs on the Board (initiative program-hierarchy, P4 P6 P8; canvas PgBoard, PgBoardProduct, PgKanban, PgTimeline,
4
+ * PgList). Serves the real page from the real server; GET /api/board-premium answers each product of Project Ascent (fixtures/board-premium-facts.js
5
+ * programFacts) by its ws, and GET /api/programs answers the program (fixtures/program-ascent.js). The page's clock is the fixture's (17 Oct 2026).
6
+ * G grouping: programs first, then the product; no "Not in a program"; By product with the layers icon; the choice is remembered
7
+ * F every group folds, and the fold is remembered across reloads
8
+ * O a program band, swimlane or timeline row opens the program with the bd:program event and nothing else; ?program= opens it once
9
+ * K Kanban: programs as swimlanes, then the product; any column folds to a strip with its count; empty ones start folded
10
+ * T timeline: the program row brackets its initiatives; close milestones merge into one counted diamond; one-line rows; a legend
11
+ * L List: Product and Program columns, sortable
12
+ * Z with no program on the board, no group head and no grouping control (zero is silence) · phone: no sideways scroll */
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: 'board-programs' });
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} board-programs assertions passed`);
30
+ process.exit(code !== undefined ? code : (bad ? 1 : 0));
31
+ };
32
+ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
33
+
34
+ (async () => {
35
+ const exe = findBrowser();
36
+ if (!exe) { console.log('✗ no Chrome/Chromium on this machine — the suite cannot run'); return finish(1); }
37
+ let chromium;
38
+ try { ({ chromium } = require('playwright-core')); } catch { console.log('✗ playwright-core is not installed'); return finish(1); }
39
+ srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT) }) });
40
+ await T.waitForServer(BASE);
41
+ browser = await chromium.launch({ executablePath: exe });
42
+
43
+ /** A Board page of one Ascent product. o: { w, h, view, grouping, programs, qs, store } — store: localStorage to set before the page loads. */
44
+ const open = async (o = {}) => {
45
+ const ctx = await browser.newContext({ viewport: { width: o.w || 1440, height: o.h || 900 } });
46
+ const page = await ctx.newPage();
47
+ const errors = [];
48
+ page.on('pageerror', (e) => errors.push(String((e && e.stack) || e)));
49
+ await page.clock.setFixedTime(new Date(F.NOW));
50
+ await page.route('**/api/board-premium*', (r) => { const q = new URL(r.request().url()).searchParams; r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, state: 'ready', model: BP.build(F.programFacts(q.get('ws') || 'idpf')), as_of: Date.now() }) }); });
51
+ await page.route('**/api/programs', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, programs: o.programs || F.programs() }) }));
52
+ await page.route('**/api/board-trail*', (r) => r.fulfill({ status: 500, contentType: 'application/json', body: JSON.stringify({ ok: false, error: 'not in this check' }) }));
53
+ 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 */ } }, [{ 'pmos.board.view': o.view || 'track', 'pmos.board.pview': o.view === 'time' ? 'track' : o.view || 'track', 'pmos.board.grouping': o.grouping || 'program', ...(o.store || {}) }]);
54
+ await page.addInitScript(() => { window.__prog = []; document.addEventListener('bd:program', (e) => window.__prog.push(e.detail && e.detail.id)); });
55
+ await page.goto(BASE + '/premium-board.html?ws=' + (o.ws || 'idpf') + '&board=' + (o.ws || 'idpf') + (o.qs || ''));
56
+ await page.waitForSelector('#ibBody [data-key]', { timeout: 15000 });
57
+ await page.waitForTimeout(700); // the programs and the other product's rows land after the board
58
+ return { ctx, page, errors };
59
+ };
60
+ const events = (p) => p.evaluate(() => window.__prog.slice());
61
+
62
+ /* G F O — the stage track (PgBoard) */
63
+ {
64
+ const { ctx, page: p, errors } = await open();
65
+ const tr = await p.evaluate(() => ({
66
+ first: (document.querySelector('#ibBody .bt-h + *') || {}).className || '',
67
+ band: (document.querySelector('#ibBody .bt-pg .bt-pgo') || {}).textContent || '',
68
+ spread: (document.querySelector('#ibBody .bt-pg .bd-spl') || {}).textContent || '',
69
+ next: (document.querySelector('#ibBody .bt-pg .bd-pm') || {}).textContent || '',
70
+ ready: [...document.querySelectorAll('#ibBody .bt-pg .bd-rdy i')].map((i) => (i.classList.contains('on') ? 1 : 0)).join(''),
71
+ kids: [...document.querySelectorAll('#ibBody .bt-kid .bt-nm b')].map((b) => b.textContent),
72
+ prods: [...document.querySelectorAll('#ibBody .bt-prd .bd-prdb span:not(.bd-ti):not(.bd-gd):not(.n)')].map((b) => b.textContent),
73
+ after: [...document.querySelectorAll('#ibBody .bt-gr .bt-nm b')].map((b) => b.textContent),
74
+ text: document.querySelector('#ibBody').textContent,
75
+ grp: document.querySelector('#bdGrpw').hidden,
76
+ }));
77
+ ok('G the program comes first: its band row is the first row under the head, with its title and the products it spans', /bt-pg/.test(tr.first) && /Project Ascent/.test(tr.band) && /2 products/.test(tr.band), JSON.stringify(tr));
78
+ ok('G the band says its initiatives and their stage spread, read from every product (2 here, 1 in Microsites)', tr.spread === '3 initiatives, Triage to Plan', tr.spread);
79
+ ok('G the next milestone shows with its date and its readiness, one diamond per initiative it waits on', /Pilot live/.test(tr.next) && /Nov 18/.test(tr.next) && tr.ready === '00', JSON.stringify(tr));
80
+ ok('G its initiatives on this board sit under it; the rest of the product follows under the product head', tr.kids.join() === 'Legacy IdP sunset,Descope feature parity' && tr.prods.join() === 'IDPF' && tr.after.length === 2 && !tr.after.some((t) => tr.kids.includes(t)), JSON.stringify(tr));
81
+ ok('G there is no "Not in a program" group, and Programs first draws no grouping chip (the choice lives in Filter)', !/Not in a program/.test(tr.text) && tr.grp);
82
+
83
+ await p.click('#ibBody .bt-pg [data-prog]');
84
+ ok('O pressing the band dispatches bd:program with the program id and opens no initiative panel', (await events(p)).join() === 'project-ascent' && await p.evaluate(() => document.querySelector('#peek').hidden), JSON.stringify(await events(p)));
85
+ await p.keyboard.press('Escape'); await p.waitForFunction(() => { const k = document.querySelector('#ppPeek'); return !k || k.hidden; });
86
+
87
+ await p.click('#ibBody .bt-pg [data-fold]');
88
+ const f1 = await p.evaluate(() => ({ kids: document.querySelectorAll('#ibBody .bt-kid').length, band: !!document.querySelector('#ibBody .bt-pg'), exp: document.querySelector('#ibBody .bt-pg [data-fold]').getAttribute('aria-expanded'), st: localStorage.getItem('pmos.board.fold') }));
89
+ ok('F the program group folds to its band row, and the fold is stored', f1.kids === 0 && f1.band && f1.exp === 'false' && /g:project-ascent/.test(f1.st), JSON.stringify(f1));
90
+ await p.click('#ibBody .bt-prd [data-fold]');
91
+ ok('F a product group folds to its head with its count', await p.evaluate(() => document.querySelectorAll('#ibBody .bt-gr').length === 0 && /2/.test(document.querySelector('#ibBody .bt-prd').textContent)));
92
+ await p.reload(); await p.waitForSelector('#ibBody [data-fold]'); await p.waitForTimeout(500);
93
+ ok('F both folds are remembered across a reload', await p.evaluate(() => document.querySelectorAll('#ibBody .bt-kid, #ibBody .bt-gr').length === 0 && !!document.querySelector('#ibBody .bt-pg')));
94
+ await p.click('#ibBody .bt-pg [data-fold]'); await p.click('#ibBody .bt-prd [data-fold]');
95
+ ok('F unfolding shows the rows again', await p.evaluate(() => document.querySelectorAll('#ibBody .bt-kid').length === 2 && document.querySelectorAll('#ibBody .bt-gr').length === 2));
96
+
97
+ // By product (PgBoardProduct): from the grouping control, no new filter row
98
+ await p.click('#bdFilter');
99
+ ok('G the Filter popover holds the Group choice because a program holds rows here', await p.evaluate(() => [...document.querySelectorAll('#bdPop [data-fgrp]')].map((b) => b.dataset.fgrp + (b.getAttribute('aria-checked') === 'true' ? '*' : '')).join() === 'program*,product'));
100
+ await p.click('#bdPop [data-fgrp="product"]'); await p.keyboard.press('Escape');
101
+ const bp = await p.evaluate(() => ({ band: !!document.querySelector('#ibBody .bt-pg'), icons: [...document.querySelectorAll('#ibBody .bt-nm .bd-pgi')].map((i) => i.getAttribute('aria-label')), prods: document.querySelectorAll('#ibBody .bt-prd').length, chip: (document.querySelector('#bdGroup') || {}).textContent || '', st: localStorage.getItem('pmos.board.grouping') }));
102
+ ok('G By product draws the product only; a program member carries the small layers icon named for its program; the choice is stored', !bp.band && bp.prods === 1 && bp.icons.length === 2 && bp.icons.every((x) => x === 'In Project Ascent') && /By product/.test(bp.chip) && bp.st === 'product', JSON.stringify(bp));
103
+ await p.click('#bdGroup'); await p.click('#bdGrpMenu [data-grping="program"]');
104
+ ok('G Programs first comes back from the same menu', await p.evaluate(() => !!document.querySelector('#ibBody .bt-pg') && localStorage.getItem('pmos.board.grouping') === 'program'));
105
+ ok('the page threw nothing', !errors.length, errors.join('\n'));
106
+ await ctx.close();
107
+ }
108
+
109
+ /* O ?program=<id> (Home links here) opens the program once */
110
+ {
111
+ const { ctx, page: p } = await open({ qs: '&program=project-ascent', store: { 'pmos.board.fold': '["g:project-ascent"]' } });
112
+ const e = await events(p);
113
+ ok('O ?program= dispatches bd:program once and unfolds the program', e.join() === 'project-ascent' && await p.evaluate(() => document.querySelectorAll('#ibBody .bt-kid').length === 2), JSON.stringify(e));
114
+ await ctx.close();
115
+ }
116
+
117
+ /* K Kanban (PgKanban) */
118
+ {
119
+ const { ctx, page: p, errors } = await open({ view: 'stages' });
120
+ const k = await p.evaluate(() => ({
121
+ lanes: [...document.querySelectorAll('#ibBody .bd-lh')].map((l) => l.className.replace('bd-lh ', '') + ':' + [...(l.querySelector('.bd-lho') || { children: [] }).children].filter((c) => !/bd-p?ti/.test(c.className)).map((c) => c.textContent).join('')),
122
+ ms: (document.querySelector('#ibBody .bd-lh.pg .bd-pm2') || {}).textContent || '',
123
+ heads: [...document.querySelectorAll('#ibBody .bd-kh')].map((h) => h.dataset.colfold),
124
+ strips: [...document.querySelectorAll('#ibBody .bd-kstrip')].map((h) => h.dataset.colfold + ':' + h.querySelector('b').textContent),
125
+ cards: [...document.querySelectorAll('#ibBody .bd-kc .bd-bc .t')].map((b) => b.textContent),
126
+ cols: getComputedStyle(document.querySelector('#ibBody .bd-kb')).gridTemplateColumns.split(' ').length,
127
+ }));
128
+ ok('K programs are swimlanes, then the product: a lane head for Project Ascent, then one for IDPF', k.lanes.join('|') === 'pg:Project Ascent|pd:IDPF', JSON.stringify(k.lanes));
129
+ ok('K the program lane shows its next milestones merged into one counted diamond with their dates', /Pilot live \+2/.test(k.ms) && /Nov 18–21/.test(k.ms), k.ms);
130
+ ok('K the columns with cards are open; empty ones, and Monitor and Evaluate with nothing for you, are strips with their count', k.heads.join() === 'triage,discover' && k.strips.join() === 'plan:0,prioritize:0,build:0,deliver:0,monitor:1,evaluate:20' && k.cols === 8, JSON.stringify(k));
131
+ ok('K each card sits in its lane: the program\'s two, then the product\'s one', k.cards.join() === 'Legacy IdP sunset,Descope feature parity,Usage-based billing', JSON.stringify(k.cards));
132
+ await p.click('#ibBody .bd-kstrip[data-colfold="plan"]');
133
+ await p.click('#ibBody .bd-kh[data-colfold="triage"]');
134
+ const k2 = await p.evaluate(() => ({ plan: !!document.querySelector('#ibBody .bd-kh[data-colfold="plan"]'), triage: (document.querySelector('#ibBody .bd-kstrip[data-colfold="triage"] b') || {}).textContent, st: JSON.parse(localStorage.getItem('pmos.board.cols') || '{}') }));
135
+ ok('K any column folds to a strip with its count and opens again; the choice is stored', k2.plan && k2.triage === '2' && k2.st.plan === 'open' && k2.st.triage === 'fold', JSON.stringify(k2));
136
+ await p.reload(); await p.waitForSelector('#ibBody .bd-kb');
137
+ ok('K a folded column stays folded across a reload', await p.evaluate(() => !!document.querySelector('#ibBody .bd-kstrip[data-colfold="triage"]') && !!document.querySelector('#ibBody .bd-kh[data-colfold="plan"]')));
138
+ await p.click('#ibBody .bd-lh.pd [data-fold]');
139
+ ok('K a product lane folds to its head', await p.evaluate(() => [...document.querySelectorAll('#ibBody .bd-kc .bd-bc .t')].every((b) => b.textContent !== 'Usage-based billing') && !!document.querySelector('#ibBody .bd-lh.pd')));
140
+ await p.click('#ibBody .bd-lh.pg [data-prog]');
141
+ ok('O pressing the program swimlane dispatches bd:program and nothing else', (await events(p)).join() === 'project-ascent' && await p.evaluate(() => document.querySelector('#peek').hidden));
142
+ ok('the Kanban threw nothing', !errors.length, errors.join('\n'));
143
+ await ctx.close();
144
+ }
145
+
146
+ /* T timeline (PgTimeline) */
147
+ {
148
+ const { ctx, page: p, errors } = await open({ view: 'time', store: { 'pmos.board.span': 'quarter' } });
149
+ const t = await p.evaluate(() => ({
150
+ first: (document.querySelector('#ibBody .tg-body > .tg-r') || {}).className || '',
151
+ title: (document.querySelector('#ibBody .tg-pg .tg-pgo') || {}).textContent || '',
152
+ span: !!document.querySelector('#ibBody .tg-pg .tg-span'),
153
+ clu: [...document.querySelectorAll('#ibBody .tg-pg .tg-clu')].map((c) => c.textContent + '|' + c.getAttribute('aria-label')),
154
+ lab: [...document.querySelectorAll('#ibBody .tg-pg .tg-pdl')].map((l) => l.textContent),
155
+ kids: [...document.querySelectorAll('#ibBody .tg-kid .tg-n b')].map((b) => b.textContent),
156
+ oneLine: [...document.querySelectorAll('#ibBody .tg-n.ini2')].every((b) => !b.querySelector('small') && !!b.querySelector('.cz-dot')),
157
+ lgd: (document.querySelector('#bdChipset .tg-lgd') || {}).textContent || '',
158
+ }));
159
+ ok('T the program row comes first, with its title and products and a thin span over its initiatives\' dates', /tg-pg/.test(t.first) && /Project Ascent/.test(t.title) && /2 products/.test(t.title) && t.span, JSON.stringify(t));
160
+ ok('T three milestones within a week merge into one counted diamond labelled "Pilot live +2 · Nov 18–21"', t.clu.length === 1 && /^3\|3 program milestones from Nov 18 to 21: Pilot live, Pilot users invited, Support ready/.test(t.clu[0]) && t.lab.join() === 'Pilot live +2 · Nov 18–21', JSON.stringify(t));
161
+ ok('T the program\'s initiatives sit under it as one-line rows: a status dot and the name', t.kids.join() === 'Legacy IdP sunset,Descope feature parity' && t.oneLine, JSON.stringify(t));
162
+ ok('T a legend in the chip row names done, planned, the program milestone, Deliver or Evaluate and today', /Done in Jira/.test(t.lgd) && /Planned/.test(t.lgd) && /Program milestone/.test(t.lgd) && /Deliver or Evaluate/.test(t.lgd) && /Today/.test(t.lgd), t.lgd);
163
+ await p.click('#ibBody .tg-pg .tg-pgo');
164
+ await p.keyboard.press('Escape'); await p.waitForFunction(() => { const k = document.querySelector('#ppPeek'); return !k || k.hidden; });
165
+ await p.click('#ibBody .tg-pg .tg-clu');
166
+ ok('O the program row and its counted diamond dispatch bd:program and nothing else', (await events(p)).join() === 'project-ascent,project-ascent' && await p.evaluate(() => document.querySelector('#peek').hidden));
167
+ ok('the timeline threw nothing', !errors.length, errors.join('\n'));
168
+ await ctx.close();
169
+ }
170
+
171
+ /* L List (PgList) */
172
+ {
173
+ const { ctx, page: p } = await open({ view: 'list' });
174
+ const head = await p.evaluate(() => [...document.querySelectorAll('#ibBody .bd-lt.h [role="columnheader"]')].map((h) => h.textContent).join('|'));
175
+ ok('L the List has Product and Program columns after the initiative', /^Initiative · sorted by need\|Product\|Program\|Kind\|/.test(head), head);
176
+ await p.click('#ibBody [data-sort="program"]');
177
+ const L = await p.evaluate(() => ({ sort: document.querySelector('#ibBody [data-sort="program"]').getAttribute('aria-sort'), rows: [...document.querySelectorAll('#ibBody .bd-lt[data-row]')].map((r) => r.querySelector('.bd-ltn b').textContent + ':' + r.querySelectorAll('.bd-pt')[1].textContent) }));
178
+ ok('L pressing Program sorts by program: the program\'s rows first, a row with no program leaves the cell empty', L.sort === 'ascending' && L.rows[0].endsWith(':Project Ascent') && L.rows[1].endsWith(':Project Ascent') && L.rows[2] === 'Usage-based billing:', JSON.stringify(L));
179
+ await p.click('#ibBody [data-sort="product"]');
180
+ ok('L Product sorts too', await p.evaluate(() => document.querySelector('#ibBody [data-sort="product"]').getAttribute('aria-sort') === 'ascending' && [...document.querySelectorAll('#ibBody .bd-lt[data-row] .bd-pt:first-of-type')].every((c) => /IDPF/.test(c.textContent))));
181
+ await ctx.close();
182
+ }
183
+
184
+ /* A All products (PgBoard, PgKanban, PgList): every product's board on one page; the program holds a sub-row per product */
185
+ {
186
+ const { ctx, page: p, errors } = await open({ qs: '', ws: 'idpf' });
187
+ await p.click('#crSw');
188
+ const items = await p.evaluate(() => [...document.querySelectorAll('#crMenu [data-sw]')].map((b) => b.textContent));
189
+ ok('A the product picker offers All products first, then each product', items[0] === 'All products' && items.length === 3, JSON.stringify(items));
190
+ await Promise.all([p.waitForNavigation(), p.click('#crMenu [data-sw="*|*"]')]);
191
+ await p.waitForSelector('#ibBody [data-key]'); await p.waitForTimeout(700);
192
+ const a = await p.evaluate(() => ({
193
+ url: location.search,
194
+ crumb: (document.querySelector('#crBoard') || {}).textContent || '',
195
+ band: (document.querySelector('#ibBody .bt-pg .bt-pgo') || {}).textContent || '',
196
+ subs: [...document.querySelectorAll('#ibBody .bt-psb')].map((x) => x.textContent.replace(/\s+/g, ' ').trim()),
197
+ kids: [...document.querySelectorAll('#ibBody .bt-kid .bt-nm b')].map((b) => b.textContent),
198
+ prods: [...document.querySelectorAll('#ibBody .bt-prd .bd-prdb span:not(.bd-ti):not(.bd-gd):not(.n)')].map((b) => b.textContent),
199
+ docs: getComputedStyle(document.querySelector('#tabDocs')).display === 'none', nw: document.querySelector('#newIni').hidden,
200
+ chips: [...document.querySelectorAll('#bdChipset .bd-chip')].map((c) => c.id).filter(Boolean),
201
+ }));
202
+ ok('A the picker goes to ?all=1 and the page says All products', a.url === '?all=1' && /All products/.test(a.crumb), JSON.stringify(a));
203
+ ok('A the program comes first and holds a sub-row per product with that product\'s initiatives', /Project Ascent/.test(a.band) && a.subs.length === 2 && /IDPF/.test(a.subs[0]) && a.kids.length === 3, JSON.stringify(a));
204
+ ok('A then one group per product with the rows no program holds', a.prods.length === 2 && a.prods[0] === 'IDPF', JSON.stringify(a));
205
+ ok('A documents, New initiative, Jira and asks work across products; only the sprint waits for a product to be picked', !a.docs && !a.nw && a.chips.includes('chJira') && a.chips.includes('chAsks') && !a.chips.includes('chSprint'), JSON.stringify(a));
206
+ const other = await p.evaluate(() => { const b = [...document.querySelectorAll('#ibBody .bt-kid .bt-nm')].pop(); return b ? b.dataset.key : null; });
207
+ ok('A each row keeps its own product in its key', /^[a-z-]+\//.test(other || ''), other);
208
+ await p.click('#ibTabs [data-v="list"]');
209
+ await p.waitForTimeout(300);
210
+ const L = await p.evaluate(() => [...document.querySelectorAll('#ibBody .bd-lt .bd-pt:first-of-type .bd-ell')].map((x) => x.textContent));
211
+ ok('A List: the Product column names each row\'s own product', new Set(L).size === 2, JSON.stringify(L));
212
+ ok('A the page threw nothing', !errors.length, errors.join('\n'));
213
+ await ctx.close();
214
+ }
215
+
216
+ /* Z zero is silence; the phone */
217
+ {
218
+ const { ctx, page: p } = await open({ programs: [] });
219
+ ok('Z with no program on the board: no group head, no band, and no grouping control', await p.evaluate(() => !document.querySelector('#ibBody .bt-pg, #ibBody .bt-prd') && document.querySelector('#bdGrpw').hidden));
220
+ await ctx.close();
221
+ const R = await open({ w: 390, h: 844 });
222
+ ok('Z on a phone the program is a head card with its next milestone, and nothing scrolls sideways', await R.page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1 && !!document.querySelector('#ibBody .bt-pg .bd-pm') && getComputedStyle(document.querySelector('#ibBody .bt-pg .bt-spread')).display === 'none'));
223
+ await R.ctx.close();
224
+ }
225
+ finish();
226
+ })();
@@ -0,0 +1,54 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+ /* board-shot.js — screenshots of the Board with Project Ascent (initiative program-hierarchy: PgBoard, PgBoardProduct, PgKanban, PgTimeline, PgList)
4
+ * at 1440x900 and 390x844 against the Board's program fixture (fixtures/board-premium-facts.js programFacts). Not a suite: a look at the page.
5
+ * OUT=<dir> names where the PNGs go (default: the state folder of this run). WS=microsites shoots the other product's board. */
6
+ const fs = require('fs');
7
+ const path = require('path');
8
+ const { spawn } = require('child_process');
9
+ const { findBrowser } = require('./lib/find-browser');
10
+ const T = require('./test-run').configure({ name: 'board-shot' });
11
+ const BP = require('./lib/board-premium.js');
12
+ const F = require('./fixtures/board-premium-facts.js');
13
+ const OUT = process.env.OUT || T.STATE_DIR;
14
+ const item = (o = {}) => ({ since: null, sinceFrom: null, days: null, skipped: [], parts: null, next: null, you: null, links: {}, drafted: [], gate: null, drift: [], deps: [], theme: null, tickets: {}, ...o });
15
+ const part = (name, done, you) => ({ name, done: !!done, you: !!you });
16
+ const TRAIL = { ok: true, at: '2026-10-17T09:12:00.000Z', usual: {}, themes: [], items: {
17
+ 'legacy-idp-sunset': item({ days: 6, parts: [part('problem', 1), part('business case'), part('who asked'), part('success measure')], next: 'business case' }),
18
+ 'descope-parity': item({ days: 12, parts: [part('problem', 1), part('scope', 1), part('risks', 1), part('your review', 0, 1), part('metrics'), part('rollout')], next: 'your review', you: { text: 'Your turn · review step', kind: 'you' } }),
19
+ 'usage-billing': item({ days: 21, parts: [part('problem', 1), part('business case'), part('who asked'), part('success measure')], next: 'business case' }),
20
+ 'eshop-inline-login': item({ days: 17 }),
21
+ 'microsite-signin': item({ days: 4, parts: [part('scope', 1), part('timeline', 1), part('work breakdown', 0, 1)], next: 'work breakdown', you: { text: 'Your turn · approve 2 epics', kind: 'you' } }),
22
+ 'psle-refresh': item({ days: 9 }),
23
+ } };
24
+ (async () => {
25
+ const { chromium } = require('playwright-core');
26
+ const srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT) }) });
27
+ await T.waitForServer(T.BASE);
28
+ const browser = await chromium.launch({ executablePath: findBrowser() });
29
+ const ws = process.env.WS || 'idpf';
30
+ const model = (w) => BP.build(F.programFacts(w));
31
+ const errs = [];
32
+ const shots = (process.env.SHOTS || 'track,product,stages,time,list').split(',');
33
+ for (const [w, h, name] of [[1440, 900, '1440'], [390, 844, '390']]) {
34
+ for (const s of shots) {
35
+ if (name === '390' && (s === 'time' || s === 'product')) continue;
36
+ const ctx = await browser.newContext({ viewport: { width: w, height: h }, colorScheme: process.env.DARK ? 'dark' : 'light' });
37
+ await ctx.route('**/api/board-premium*', (r) => { const q = new URL(r.request().url()).searchParams; r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, state: 'ready', model: model(q.get('ws') || ws), as_of: Date.now() }) }); });
38
+ await ctx.route('**/api/programs', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, programs: F.programs() }) }));
39
+ await ctx.route('**/api/board-trail*', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify(TRAIL) }));
40
+ const v = s === 'product' ? 'track' : s;
41
+ await ctx.addInitScript(([v, s, phone]) => { try { localStorage.setItem(phone ? 'pmos.board.pview' : 'pmos.board.view', v); localStorage.setItem('pmos.board.grouping', s === 'product' ? 'product' : 'program'); } catch {} }, [v, s, name === '390']);
42
+ const p = await ctx.newPage();
43
+ p.on('pageerror', (e) => errs.push(name + ' ' + s + ': ' + e.message));
44
+ p.on('console', (m) => { if (m.type() === 'error' && !/Failed to load resource/.test(m.text())) errs.push(name + ' ' + s + ' console: ' + m.text()); });
45
+ await p.goto(T.BASE + '/premium-board.html' + (process.env.ALL ? '?all=1' : '?ws=' + ws + '&board=' + ws + (process.env.Q || '')));
46
+ await p.waitForTimeout(2500);
47
+ fs.mkdirSync(OUT, { recursive: true });
48
+ await p.screenshot({ path: path.join(OUT, 'board-' + s + '-' + name + (process.env.DARK ? '-dark' : '') + '.png') });
49
+ await ctx.close();
50
+ }
51
+ }
52
+ console.log(errs.join('\n') || 'no page errors');
53
+ await browser.close(); srv.kill('SIGKILL'); T.killTmux(); process.exit(0);
54
+ })();
@@ -104,9 +104,11 @@ const mk = (o) => BP.build(F.facts(o));
104
104
  const tr = await p.evaluate(() => ({ heads: [...document.querySelectorAll('.bt-h .bt-cells > div')].map((d) => (d.classList.contains('msh') && d.querySelector('.cz-ms') ? '◆ ' : '') + d.textContent.replace(/\s+/g, ' ').trim()), rows: [...document.querySelectorAll('#ibBody .bt-l')].map((r) => ({ t: r.querySelector('.bt-nm b').textContent, cur: [...r.querySelectorAll('.bt-cells > div')].findIndex((c) => c.classList.contains('c')), out: r.querySelector('.bt-dl .t1 b').textContent, prog: r.querySelector('.bt-dl .t1 span').textContent, line: r.querySelector('.bt-dl .t3').textContent, st: r.querySelector('.cs').textContent, days: (r.querySelector('.sc.c small') || {}).textContent, dt: (r.querySelector('.sc.c') || {}).title })), pressed: document.querySelector('#ibTabs [aria-pressed="true"]').dataset.v, n: document.querySelector('.bt-nmh').textContent.replace(/\s+/g, ' ').trim(), lg: document.querySelector('.bt-oh .lg').textContent, tf: document.querySelector('.bt-tf').textContent }));
105
105
  ok('B1 the default view is the stage track with six stages and two milestones, each with the board\'s count (old names count for the new ones)', tr.pressed === 'track' && tr.heads.join('|') === 'Triage0|Discover1|Plan1|Prioritize0|Build2|◆ Deliver1|Monitor1|◆ Evaluate21', JSON.stringify(tr.heads));
106
106
  ok('B1 one row per initiative, sorted by stage, with its current step marked; the head counts the open initiatives', tr.rows.length === 7 && tr.rows.map((r) => r.cur).join() === '1,2,4,4,5,6,7' && tr.rows[0].t === 'Usage-based billing' && tr.n === 'Initiative 9', JSON.stringify(tr.rows.map((r) => r.t + ':' + r.cur)));
107
- ok('B1 the Output column names what finishes the step and the parts or progress a record holds; a part not on record is not counted', tr.rows[0].out === 'PRD complete' && tr.rows[0].prog === '— of 6 parts' && /Problem · users · evidence · scope · success metric · risks/.test(tr.rows[0].line) && tr.rows[1].out === 'Scope, timeline, work breakdown' && tr.rows[1].prog === '18%' && tr.rows[3].prog === 'No tickets yet' && tr.rows[6].out === 'Keep, iterate or stop', JSON.stringify(tr.rows.map((r) => r.out + ':' + r.prog)));
107
+ ok('B1 the Output column names what finishes the step and the parts or progress a record holds; a part not on record is not counted', tr.rows[0].out === 'PRD' && tr.rows[0].prog === '— of 6 parts' && /Problem · users · evidence · scope · success metric · risks/.test(tr.rows[0].line) && tr.rows[1].out === 'Scope, timeline, work breakdown' && tr.rows[1].prog === '18%' && tr.rows[3].prog === 'No tickets yet' && tr.rows[6].out === 'Keep, iterate or stop', JSON.stringify(tr.rows.map((r) => r.out + ':' + r.prog)));
108
108
  ok('B1 the status line says late in days over and at risk with no owner', tr.rows.some((r) => /^\d+ days over$/.test(r.st)) && tr.rows[0].st === 'At risk · no owner', JSON.stringify(tr.rows.map((r) => r.st)));
109
- ok('B1 days in a step are not on record, so the current step shows a dash and says so; nothing is invented', tr.rows.every((r) => r.days === '—' && /days in this step are not on record/.test(r.dt)), JSON.stringify(tr.rows.map((r) => r.days + ':' + r.dt)));
109
+ ok('B1 days in a step are not on record, so the current step shows a dash and says so; nothing is invented', tr.rows.every((r) => (r.days === '—' || /Deliver/.test(r.dt)) && /days in this step are not on record/.test(r.dt)), JSON.stringify(tr.rows.map((r) => r.days + ':' + r.dt)));
110
+ // PgBoard: a committed date (the planned end) shows under the Deliver milestone; at the milestone itself it replaces the days count
111
+ ok('B1 at the Deliver milestone the committed date replaces the days count', tr.rows.filter((r) => /Deliver/.test(r.dt)).every((r) => r.days === 'Oct 23'), JSON.stringify(tr.rows.map((r) => r.days + ':' + r.dt)));
110
112
  ok('B1 the legend reads Skipped, Done, Review, Doing, You and Blocked', tr.lg === 'SkippedDoneReviewDoingYouBlocked', tr.lg);
111
113
  ok('B1 Monitor and Evaluate fold after the first of each: "20 more in Monitor and Evaluate", sorted by stage', /^20 more in Monitor and Evaluate/.test(tr.tf) && /Sorted by stage$/.test(tr.tf), tr.tf);
112
114
  await p.click('#fold');
@@ -144,7 +146,7 @@ const mk = (o) => BP.build(F.facts(o));
144
146
  const pk = await until(() => q.evaluate(() => { const k = document.querySelector('#peek'); return k && !k.hidden ? { t: document.querySelector('#pkTitle').textContent, eye: k.querySelector('.pk-eye').textContent, st: k.querySelector('.pk-st').textContent.replace(/\s+/g, ' ').trim(), tks: [...k.querySelectorAll('.pk-jt[data-tk] .bd-pill')].map((e) => e.textContent).join(), jt: [...k.querySelectorAll('.pk-jt[data-tk]')].map((e) => e.textContent.replace(/\s+/g, ' ').trim()), rows: [...k.querySelectorAll('.pk-tks .gi')].map((e) => e.textContent.replace(/\s+/g, ' ').trim()), lad: k.querySelectorAll('.pk-lad span').length, cur: (k.querySelector('.pk-lad span.c') || {}).textContent, nb: k.querySelectorAll('.pk-nb').length, wt: k.querySelectorAll('.pk-wt').length, lk: [...k.querySelectorAll('.pk-lk .bd-chip')].map((e) => e.textContent.replace(/\s+/g, ' ').trim()), ask: k.querySelector('.pk-ask .ft').textContent.replace(/\s+/g, ' ').trim(), sel: !!document.querySelector('.bt-l.sel[data-row="board:sso-partners"]'), side: k.getBoundingClientRect().right === innerWidth || Math.round(k.getBoundingClientRect().right) >= innerWidth - 24, dlg: !!document.querySelector('#dlg.on'), record: !!k.querySelector('[data-pk="record"]') } : null; }));
145
147
  ok('B1 a row opens the initiative panel in the side panel, not the old dialog, and the row is marked', !!pk && pk.t === 'SSO for partners' && pk.side && !pk.dlg && !pk.record && pk.sel, JSON.stringify(pk));
146
148
  ok('B1 the panel says the KR and the owner, the status, the step and when it ships', !!pk && pk.eye === 'Feature · KR 1.1 · owner Lee' && pk.st === 'On track·Deliver·ships Nov 4 with v2.4', JSON.stringify(pk && [pk.eye, pk.st]));
147
- ok('B1 its ladder has the eight steps; In Jira lists its tickets (blocked first) with their status, and names release notes and your sign-off (BdPanel)', !!pk && pk.lad === 8 && pk.cur === 'Deliv' && pk.tks.split(',')[0] === 'SSO-12' && pk.tks.split(',').sort().join() === 'SSO-10,SSO-12,SSO-14,SSO-15' && pk.jt.some((x) => /^SSO-10Okta configDone/.test(x)) && pk.jt.some((x) => /^SSO-12SAML errorsBlocked/.test(x)) && pk.rows.some((x) => x === 'Release notesnot on record') && pk.rows.some((x) => x === 'Your sign-offafter the tickets'), JSON.stringify(pk && [pk.tks, pk.jt, pk.rows]));
149
+ ok('B1 its ladder has the eight steps; In Jira lists its tickets (blocked first) with their status, and names release notes and your sign-off (BdPanel)', !!pk && pk.lad === 8 && pk.cur === 'Deliver' && pk.tks.split(',')[0] === 'SSO-12' && pk.tks.split(',').sort().join() === 'SSO-10,SSO-12,SSO-14,SSO-15' && pk.jt.some((x) => /^SSO-10Okta configDone/.test(x)) && pk.jt.some((x) => /^SSO-12SAML errorsBlocked/.test(x)) && pk.rows.some((x) => x === 'Release notesnot on record') && pk.rows.some((x) => x === 'Your sign-offafter the tickets'), JSON.stringify(pk && [pk.tks, pk.jt, pk.rows]));
148
150
  // re-pointed for the Agreed design (AgBoardPanel has no empty variants): what PMOS has no record of draws no card and no chip, rather than an empty one
149
151
  ok('B1 what PMOS has no record of is not drawn: no next-action card, no PRD card, no Linked chip', !!pk && pk.nb === 0 && pk.wt === 0 && pk.lk.length === 0, JSON.stringify(pk && [pk.nb, pk.wt, pk.lk]));
150
152
  ok('B1 the ask box says the answer lands in Home and when Jira was read', !!pk && /^Answer lands in HomeJira \d+ days? ago$/.test(pk.ask), pk && pk.ask);
@@ -169,7 +171,7 @@ const mk = (o) => BP.build(F.facts(o));
169
171
  waits.push(await until(() => q.evaluate(([nm, re]) => { const k = document.querySelector('#bdPop'); if (!k || k.hidden) return null; return k.getAttribute('aria-label') === nm && !k.querySelector('.bd-wtag') && new RegExp(re).test(k.textContent) ? nm : null; }, [name, body.source])) || 'missing ' + name);
170
172
  await q.keyboard.press('Escape');
171
173
  }
172
- await q.click('#newIni');
174
+ await q.click('#newIni'); await q.click('#bdPop [data-newmenu="ini"]');
173
175
  waits.push(await until(() => q.evaluate(() => { const k = document.querySelector('#peek'); if (!k || k.hidden) return null; return (k.querySelector('#pkTitle') || {}).textContent === 'New initiative' && !k.querySelector('.bd-wtag') && !!k.querySelector('#nwDrop') && /Counts toward/.test(k.textContent) && !k.querySelector('select[name="lane"]') ? 'New initiative' : null; })) || 'missing New initiative');
174
176
  await q.keyboard.press('Escape');
175
177
  ok('B1 the new asks, the sprint and release, Find and Filter open their popovers, and New initiative its panel with material and no lane field', waits.join() === 'New asks,Sprints and releases,Find,Filter,New initiative', waits.join());
@@ -229,10 +231,14 @@ const mk = (o) => BP.build(F.facts(o));
229
231
  ok('B4 a List row opens the initiative panel', await until(() => p.evaluate(() => (document.querySelector('#pkTitle') || {}).textContent === 'Partner API rate limits')));
230
232
  await p.keyboard.press('Escape');
231
233
  await view(p, 'stages');
232
- const bs = await p.evaluate(() => ({ tag: !!document.querySelector('#ibBody .bd-wtag'), cols: [...document.querySelectorAll('#ibBody .bd-scol h3')].map((h) => h.textContent), strips: [...document.querySelectorAll('#ibBody .bd-strip')].map((h) => h.textContent), build: document.querySelector('#ibBody .bd-scol[data-step="4"]').querySelectorAll('.bd-bc').length, drag: document.querySelectorAll('#ibBody .bd-bc[draggable="true"]').length }));
233
- ok('B5 By stage is one column per step with the board\'s counts and the cards; Monitor folds to a strip when nothing in it needs you', !bs.tag && bs.cols.join('|') === 'Triage0|Discover1|Plan1|Prioritize0|Build2|Deliver1' && bs.strips.join() === 'Monitor · 1,Evaluate · 21' && bs.build === 2 && bs.drag === 5, JSON.stringify(bs));
234
- await p.click('#ibBody .bd-strip[data-strip="monitor"]');
235
- ok('B5 a strip opens its column', await p.evaluate(() => !!document.querySelector('#ibBody .bd-scol[data-step="6"]') && !document.querySelector('#ibBody .bd-strip[data-strip="monitor"]')));
234
+ const bs = await p.evaluate(() => ({ tag: !!document.querySelector('#ibBody .bd-wtag'), cols: [...document.querySelectorAll('#ibBody .bd-kh')].map((h) => h.textContent), strips: [...document.querySelectorAll('#ibBody .bd-kstrip')].map((h) => h.textContent), build: document.querySelectorAll('#ibBody .bd-kc[data-step="4"] .bd-bc').length, drag: document.querySelectorAll('#ibBody .bd-bc[draggable="true"]').length, lanes: document.querySelectorAll('#ibBody .bd-lh').length }));
235
+ // PgKanban: any column folds to a strip with its count; empty ones start folded, and Monitor and Evaluate while nothing in them needs you
236
+ ok('B5 By stage is one column per step with the board\'s counts and the cards; empty columns, and Monitor and Evaluate with nothing for you, start as strips', !bs.tag && bs.cols.join('|') === 'Discover1|Plan1|Build2|Deliver1' && bs.strips.join() === '0Triage,0Prioritize,1Monitor,21Evaluate' && bs.build === 2 && bs.drag === 5 && bs.lanes === 0, JSON.stringify(bs));
237
+ await p.click('#ibBody .bd-kstrip[data-colfold="monitor"]');
238
+ ok('B5 a strip opens its column', await p.evaluate(() => !!document.querySelector('#ibBody .bd-kh[data-colfold="monitor"]') && !document.querySelector('#ibBody .bd-kstrip[data-colfold="monitor"]') && document.querySelectorAll('#ibBody .bd-kc[data-step="6"] .bd-bc').length === 1));
239
+ await p.click('#ibBody .bd-kh[data-colfold="build"]');
240
+ ok('B5 any open column folds to a strip with its count, and the fold is remembered', await p.evaluate(() => !!document.querySelector('#ibBody .bd-kstrip[data-colfold="build"]') && JSON.parse(localStorage.getItem('pmos.board.cols')).build === 'fold'));
241
+ await p.click('#ibBody .bd-kstrip[data-colfold="build"]'); await p.click('#ibBody .bd-kh[data-colfold="monitor"]');
236
242
  await view(p, 'track');
237
243
  {
238
244
  const f = F.facts(); f.rows = Array.from({ length: 30 }, (_, i) => F.row('r' + i, 'Initiative ' + i)); f.counts.open = 60;
@@ -245,14 +251,15 @@ const mk = (o) => BP.build(F.facts(o));
245
251
  await view(p, 'time');
246
252
  const tl = await p.evaluate(() => ({ spans: [...document.querySelectorAll('#bdSpans button')].map((b) => b.textContent + (b.getAttribute('aria-pressed') === 'true' ? '*' : '')).join(), shown: !document.querySelector('#bdSpans').hidden, rows: [...document.querySelectorAll('#ibBody .tg-r .tg-n.ini2 b')].map((b) => b.textContent), bars: document.querySelectorAll('#ibBody .tg-bar').length, none: (document.querySelector('.tg-none') || {}).textContent || '', ask: (document.querySelector('#askDates') || {}).href || '', hid: (document.querySelector('.tg-hid') || {}).textContent || '', lgd: (document.querySelector('.tg-lgd') || {}).textContent || '', today: [...document.querySelectorAll('#ibBody .tg-axl, #ibBody .tg-ax *')].some((e) => e.textContent === 'Today') }));
247
253
  ok('B6 the timeline has six spans and starts on Quarter, one row per initiative with dates; the others are named, with an ask to propose dates', tl.shown && tl.spans === 'Sprint,Quarter*,Half,Year,2 yr,5 yr' && tl.rows.length === 3 && tl.bars === 3 && /^2 have no dates: Usage-based billing, Docs search/.test(tl.none) && /\/premium\.html\?ask=board%3Aw1&q=Propose/.test(tl.ask), JSON.stringify(tl));
248
- ok('B6 Monitor and Evaluate are hidden on the Quarter and the footer says how many; the legend and Today are drawn', tl.hid === 'Monitor and Evaluate hidden · 22' && /done in Jira/.test(tl.lgd) && /PMOS plan/.test(tl.lgd) && /Jira forecast/.test(tl.lgd) && tl.today, JSON.stringify(tl));
254
+ ok('B6 Monitor and Evaluate are hidden on the Quarter and the footer says how many; the legend (PgTimeline: done, planned, the Jira forecast, Deliver or Evaluate, today) and Today are drawn', tl.hid === 'Monitor and Evaluate hidden · 22' && /Done in Jira/.test(tl.lgd) && /Planned/.test(tl.lgd) && /Jira forecast/.test(tl.lgd) && /Deliver or Evaluate/.test(tl.lgd) && /Today/.test(tl.lgd) && tl.today, JSON.stringify(tl));
249
255
  await p.click('#ibBody [data-rules]');
250
256
  ok('B6 the timeline\'s first head opens "The longer the span, the higher the grouping", with the spans and the example themes', await until(() => p.evaluate(() => !document.querySelector('#popRules').hidden && /The longer the span, the higher the grouping/.test(document.querySelector('#popRules').textContent) && document.querySelectorAll('#popRules .bd-tbl4 .bd-tr').length === 5 && document.querySelectorAll('#popRules .bd-tbl3 .bd-tr').length === 5)));
251
257
  await p.keyboard.press('Escape');
252
258
  await p.click('#ibBody .tg-n[data-key="board:partner-rate-limits"]');
253
- const tp = await until(() => p.evaluate(() => { const k = document.querySelector('#peek'); return k && !k.hidden ? { eye: k.querySelector('.pk-eye').textContent, stp: k.querySelector('.pk-stp').textContent, seg: k.querySelectorAll('.pk-seg i').length, cur: [...k.querySelectorAll('.pk-seg i')].findIndex((i) => i.classList.contains('c')), dates: k.querySelector('.pk-kv').textContent, dep: k.querySelectorAll('.pk-dep, .pk-need').length, acts: [...k.querySelectorAll('.pk-acts .bd-ib')].map((b) => b.getAttribute('aria-label')).join(), wide: Math.round(k.getBoundingClientRect().width), ft: k.querySelector('.pk-ask .ft').textContent } : null; }));
254
- // re-pointed for AgBoardTimelinePanel: 420 px wide; no empty "nothing waits" or "no dependency" card; four actions (dates, move, hold, archive)
255
- ok('B6 an initiative on the timeline opens its own panel: the step as one of eight, the dates, no empty cards, the tickets and the actions', !!tp && tp.eye === 'feature · KR 1.1 · no Jira epic yet' && tp.stp === 'Plan · step 3 of 8' && tp.seg === 8 && tp.cur === 2 && /PMOS planSep 20 → Nov 30/.test(tp.dates) && tp.dep === 0 && tp.wide === 420 && tp.acts === 'Change the plan dates,Move to another stage,Put on hold,Archive' && tp.ft === 'The answer lands in Home, inside Partner API rate limits.', JSON.stringify(tp));
259
+ const tp = await until(() => p.evaluate(() => { const k = document.querySelector('#peek'); return k && !k.hidden ? { eye: k.querySelector('.pk-eye').textContent, stp: k.querySelector('.pk-stp').textContent, seg: k.querySelectorAll('.pk-seg i').length, cur: [...k.querySelectorAll('.pk-seg i')].findIndex((i) => i.classList.contains('c')), dates: k.querySelector('.pk-kv').textContent, dep: k.querySelectorAll('.pk-dep, .pk-need').length, acts: [...k.querySelectorAll('.pk-acts .bd-ib')].map((b) => b.getAttribute('aria-label')).join(), wide: Math.round(k.getBoundingClientRect().width), vw: innerWidth, ft: k.querySelector('.pk-ask .ft').textContent } : null; }));
260
+ // re-pointed for AgBoardTimelinePanel: no empty "nothing waits" or "no dependency" card; four actions (dates, move, hold, archive).
261
+ // Re-pointed for XnAgBoardPanel (program-hierarchy B1): every desktop side panel is 60 % of the window, so this one is too
262
+ ok('B6 an initiative on the timeline opens its own panel: the step as one of eight, the dates, no empty cards, the tickets and the actions', !!tp && tp.eye === 'feature · KR 1.1 · no Jira epic yet' && tp.stp === 'Plan · step 3 of 8' && tp.seg === 8 && tp.cur === 2 && /PMOS planSep 20 → Nov 30/.test(tp.dates) && tp.dep === 0 && Math.abs(tp.wide - Math.round(tp.vw * 0.6)) <= 1 && tp.acts === 'Change the plan dates,Move to another stage,Put on hold,Archive' && tp.ft === 'The answer lands in Home, inside Partner API rate limits.', JSON.stringify(tp));
256
263
  await p.click('#peek .pk-acts [aria-label="Move to another stage"]');
257
264
  ok('B6 its actions open the row menu (BdActions)', await until(() => p.evaluate(() => { const m = document.querySelector('#bdPop'); return !!m && !m.hidden && m.getAttribute('role') === 'menu' && /Move to Prioritize/.test(m.textContent) && /Hold/.test(m.textContent) && !m.querySelector('.bd-wtag'); })));
258
265
  await p.keyboard.press('Escape');
@@ -336,8 +343,8 @@ const mk = (o) => BP.build(F.facts(o));
336
343
  ok(`B13 at 390 px (${theme}) the chips lead with This sprint, then the Jira read time and the new asks, and end with the documents`, m.chips[0] === 'Sprint 24 only' && /^Jira \d+ days$/.test(m.chips[1]) && m.chips[2] === '1 new ask' && m.chips[m.chips.length - 1] === 'Docs 6', JSON.stringify(m.chips));
337
344
  const pl = await q.evaluate(() => ({ groups: [...document.querySelectorAll('#ibBody .bd-ghd')].map((g) => g.textContent.replace(/\s+/g, ' ').trim()), seg: [...document.querySelectorAll('#ibBody [data-pv]')].map((b) => b.textContent + (b.getAttribute('aria-pressed') === 'true' ? '*' : '')).join(), note: /Timeline needs a wider screen/.test(document.querySelector('#ibBody').textContent), small: [...document.querySelectorAll('#ibBody [data-pv], #ibBody .bd-lrow')].filter((b) => b.getBoundingClientRect().height < 44).length }));
338
345
  ok(`B13 at 390 px (${theme}) the phone opens on the List, grouped your turn first, with List, By stage and Track and no timeline (BdPhone)`, pl.groups.join('|') === 'At risk or late4|On track3' && pl.seg === 'List*,By stage,Track' && pl.note && pl.small === 0, JSON.stringify(pl));
339
- await q.click('#bdView'); const s2 = await q.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1 && document.querySelectorAll('#ibBody .bd-scols.ph .bd-scol').length === 8);
340
- ok(`B13 at 390 px (${theme}) the one view button switches to By stage, every step a column down the page, with no sideways scroll`, s2);
346
+ await q.click('#bdView'); const s2 = await q.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1 && document.querySelectorAll('#ibBody .bd-scols.ph .bd-scol').length + (((document.querySelector('#ibBody .bd-sempty') || {}).textContent || '').replace(/^Nothing on screen in /, '').match(/[A-Z][a-z]+/g) || []).length === 8);
347
+ ok(`B13 at 390 px (${theme}) the one view button switches to By stage, every step a column down the page (the empty steps named on one line), with no sideways scroll`, s2);
341
348
  await q.click('#bdView'); await q.locator('#ibBody .bt-l[data-row="board:sso-partners"] .bt-nm').click();
342
349
  const g = await until(() => q.evaluate(() => { const k = document.querySelector('#peek'); if (k.hidden) return null; const r = k.getBoundingClientRect(); return { l: Math.round(r.left), w: Math.round(r.width), b: Math.round(innerHeight - r.bottom), vw: innerWidth }; }));
343
350
  ok(`B13 at 390 px (${theme}) the initiative panel is a bottom sheet across the width`, !!g && g.l === 0 && g.w === g.vw && g.b === 0, JSON.stringify(g));
@@ -405,7 +412,7 @@ const mk = (o) => BP.build(F.facts(o));
405
412
  /* New initiative and the new asks */
406
413
  await q.keyboard.press('Escape');
407
414
  if (!(await until(() => q.evaluate(() => document.querySelector('#peek').hidden), 2000))) await q.keyboard.press('Escape');
408
- await q.click('#newIni'); await until(() => q.evaluate(() => !!document.querySelector('#peek select[name="anchor"]:not([disabled])')));
415
+ await q.click('#newIni'); await q.click('#bdPop [data-newmenu="ini"]'); await until(() => q.evaluate(() => !!document.querySelector('#peek select[name="anchor"]:not([disabled])')));
409
416
  await q.fill('#peek input[name="title"]', 'Per-key API usage'); await q.fill('#peek textarea[name="why"]', 'Partners ask which key used the quota.'); await q.selectOption('#peek select[name="anchor"]', 'q3-2026:o1:kr1'); await q.click('#peek form[data-form="new2"] [type="submit"]');
410
417
  ok('T New initiative records an ask and accepts it into the first stage, anchored, with the Why as its intent and a work lane', await until(() => { const i = R.posts.findIndex((x) => x.path === '/api/boards/asks/add' && x.body.line === 'Per-key API usage'); return i >= 0 && R.posts.slice(i).some((x) => x.path === '/api/boards/asks/accept' && x.body.ask === 'n1' && x.body.anchor === 'q3-2026:o1:kr1' && typeof x.body.lane === 'string' && x.body.lane.length > 0 && x.body.intent === 'Partners ask which key used the quota.'); }), JSON.stringify(R.posts.slice(-3)));
411
418
  await q.keyboard.press('Escape');
@@ -43,14 +43,15 @@ const json = (r, b, status = 200) => r.fulfill({ status, contentType: 'applicati
43
43
  const ALL = [];
44
44
  const open = async (url, o) => { const X = await F.open(browser, BASE, url, { noLive: true, ...o }); ALL.push(X); return X; };
45
45
 
46
- /* C1 the strip */
46
+ /* C1 the strip (on a Saturday or Sunday no day of the Mon–Fri strip is today, so none is pressed) */
47
+ const WEEKDAY = [1, 2, 3, 4, 5].includes(new Date().getDay());
47
48
  const A = await open('/premium-viewer.html?open=calendar');
48
49
  const p = A.page;
49
50
  ok('C1 the calendar opens in the Viewer card', await until(() => p.evaluate(() => !!document.querySelector('#czViewer [data-c="view"][data-k="day"]')), 15000));
50
51
  await tap(p, '[data-c="view"][data-k="day"]'); // premium-uncovered-features (meetings): the desk opens on the week; Day is the strip and the day's list
51
52
  await until(() => p.evaluate(() => document.querySelectorAll('#czViewer .vzc-dy').length === 5));
52
53
  const strip = await p.evaluate(() => [...document.querySelectorAll('#czViewer .vzc-dy')].map((d) => ({ dow: d.querySelector('span').textContent, on: d.getAttribute('aria-pressed'), h: Math.round(d.getBoundingClientRect().height) })));
53
- ok('C1 the strip has Monday to Friday and today is pressed', strip.map((d) => d.dow).join() === 'Mon,Tue,Wed,Thu,Fri' && strip.filter((d) => d.on === 'true').length === 1, JSON.stringify(strip));
54
+ ok('C1 the strip has Monday to Friday and today is pressed', strip.map((d) => d.dow).join() === 'Mon,Tue,Wed,Thu,Fri' && strip.filter((d) => d.on === 'true').length === (WEEKDAY ? 1 : 0), JSON.stringify(strip));
54
55
  ok('C1 each day button is at least 44 px', strip.every((d) => d.h >= 44), JSON.stringify(strip));
55
56
  ok('C1 the week is read once when the page opens, for today\'s week, and Day reads nothing more', weekReads(A.S) === 1 && A.S.gets.some((g) => g.includes('view=week')), JSON.stringify(A.S.gets.filter((g) => g.startsWith('/api/calendar-views'))));
56
57
 
@@ -61,7 +62,9 @@ const json = (r, b, status = 200) => r.fulfill({ status, contentType: 'applicati
61
62
  await p.evaluate(() => [...document.querySelectorAll('#czViewer .vzc-dy')].find((d) => d.getAttribute('aria-pressed') === 'false' && /: 1 meeting$/.test(d.getAttribute('aria-label'))).click());
62
63
  ok('C2 pressing a day lists that day only, with its count', await until(async () => { const t = await text(p); return /1:1 with Dita/.test(t) && !/Rail review/.test(t) && /\b1 meeting\b/.test(t); }), (await text(p)).slice(0, 400));
63
64
  ok('C2 another day of the same week is not read again', weekReads(A.S) === 1);
64
- await p.evaluate(() => [...document.querySelectorAll('#czViewer .vzc-dy')].find((d) => /today/.test(d.getAttribute('aria-label'))).click());
65
+ // back to the day the view opened on: today on a weekday; on a Saturday or Sunday the page opened again, since the strip has no button for today
66
+ if (WEEKDAY) await p.evaluate(() => [...document.querySelectorAll('#czViewer .vzc-dy')].find((d) => /today/.test(d.getAttribute('aria-label'))).click());
67
+ else { await p.reload(); await until(() => p.evaluate(() => !!document.querySelector('#czViewer [data-c="view"][data-k="day"]')), 15000); await tap(p, '[data-c="view"][data-k="day"]'); }
65
68
  ok('C2 pressing today brings Today back unchanged', await until(async () => (await text(p)) === today));
66
69
 
67
70
  /* C4 a meeting */