create-pmos 0.427.0 → 0.429.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 (147) 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-programs-test.js +16 -2
  7. package/workspace/briefing-premium-board-test.js +27 -22
  8. package/workspace/briefing-premium-insights-test.js +81 -60
  9. package/workspace/briefing-premium-metrics-test.js +5 -3
  10. package/workspace/briefing-premium-sources-test.js +5 -5
  11. package/workspace/briefing-premium-test.js +7 -5
  12. package/workspace/changelog.json +24 -0
  13. package/workspace/ev-everywhere-test.js +2 -2
  14. package/workspace/guide/briefing-premium.md +4 -2
  15. package/workspace/guide/home.md +34 -7
  16. package/workspace/guide/index.md +1 -0
  17. package/workspace/guide/metric-drafts.md +48 -0
  18. package/workspace/guide/programs.md +1 -0
  19. package/workspace/home-other-product-test.js +12 -2
  20. package/workspace/intel-report-ui-test.js +189 -0
  21. package/workspace/lib/board-metrics-premium.js +1 -1
  22. package/workspace/lib/headless.js +15 -2
  23. package/workspace/lib/insights-premium.js +5 -1
  24. package/workspace/lib/insights-records.js +14 -5
  25. package/workspace/lib/intel-report.js +419 -0
  26. package/workspace/lib/metric-draft-runs.js +193 -0
  27. package/workspace/lib/metric-drafts.js +231 -0
  28. package/workspace/lib/metrics-cli.js +104 -0
  29. package/workspace/lib/pmos-verbs.js +3 -0
  30. package/workspace/lib/report-setups.js +29 -13
  31. package/workspace/lib/route-modules.js +1 -0
  32. package/workspace/lib/routes-insights-premium.js +2 -2
  33. package/workspace/lib/routes-insights-records.js +13 -5
  34. package/workspace/lib/routes-meeting-material.js +22 -1
  35. package/workspace/lib/routes-metric-drafts.js +141 -0
  36. package/workspace/lib/routes-phone-day.js +13 -2
  37. package/workspace/lib/routes-report-setups.js +92 -3
  38. package/workspace/lib/routes-viewer.js +5 -2
  39. package/workspace/lib/settings-store.js +14 -0
  40. package/workspace/metric-drafts-ui-test.js +209 -0
  41. package/workspace/milestone-pins-test.js +13 -0
  42. package/workspace/milestone-suggest-test.js +10 -4
  43. package/workspace/package-lock.json +2 -2
  44. package/workspace/package.json +1 -1
  45. package/workspace/premium-board-actions-test.js +40 -13
  46. package/workspace/premium-phone-card-test.js +8 -5
  47. package/workspace/premium-rec-tab-test.js +8 -0
  48. package/workspace/premium-vw-item-test.js +7 -3
  49. package/workspace/premium-vw-jira-test.js +2 -1
  50. package/workspace/program-charter-test.js +1 -1
  51. package/workspace/program-leave-test.js +2 -2
  52. package/workspace/program-order-test.js +3 -2
  53. package/workspace/program-panel-test.js +2 -1
  54. package/workspace/public/pm/bd-acts.js +23 -29
  55. package/workspace/public/pm/bd-ini-panel.js +90 -32
  56. package/workspace/public/pm/bd-pin-card.css +4 -4
  57. package/workspace/public/pm/bd-pin-card.js +4 -1
  58. package/workspace/public/pm/bd-prog-panel.js +9 -4
  59. package/workspace/public/pm/bd-span.js +22 -12
  60. package/workspace/public/pm/cozy-aud.css +1 -1
  61. package/workspace/public/pm/cozy-board.css +256 -256
  62. package/workspace/public/pm/cozy-ev.css +45 -45
  63. package/workspace/public/pm/cozy-evmodel.js +1 -1
  64. package/workspace/public/pm/cozy-home-rows.css +23 -23
  65. package/workspace/public/pm/cozy-home.css +207 -207
  66. package/workspace/public/pm/cozy-insights.css +207 -108
  67. package/workspace/public/pm/cozy-live-pill.css +5 -5
  68. package/workspace/public/pm/cozy-mtg-present.css +23 -23
  69. package/workspace/public/pm/cozy-nav.js +1 -1
  70. package/workspace/public/pm/cozy-news.js +2 -2
  71. package/workspace/public/pm/cozy-panel.css +29 -29
  72. package/workspace/public/pm/cozy-pick.css +5 -5
  73. package/workspace/public/pm/cozy-rec-now.css +20 -20
  74. package/workspace/public/pm/cozy-rec-present.css +11 -11
  75. package/workspace/public/pm/cozy-rec-tab.css +13 -13
  76. package/workspace/public/pm/cozy-rec-tab.js +12 -3
  77. package/workspace/public/pm/cozy-settings.js +1 -1
  78. package/workspace/public/pm/cozy-steps.css +9 -9
  79. package/workspace/public/pm/cozy-today.css +107 -71
  80. package/workspace/public/pm/cozy-viewer.css +7 -7
  81. package/workspace/public/pm/cozy-viewer.js +157 -23
  82. package/workspace/public/pm/cozy-vw-mtg.css +81 -81
  83. package/workspace/public/pm/cozy-vw-rp.css +53 -53
  84. package/workspace/public/pm/cozy-vw-shell.css +34 -21
  85. package/workspace/public/pm/cozy-vw.css +117 -117
  86. package/workspace/public/pm/cozy-xv.css +11 -11
  87. package/workspace/public/pm/cozy.css +18 -15
  88. package/workspace/public/pm/hi-pop.css +82 -0
  89. package/workspace/public/pm/hi-pop.js +65 -0
  90. package/workspace/public/pm/home-app.js +83 -28
  91. package/workspace/public/pm/home-day.js +131 -26
  92. package/workspace/public/pm/home-ini.css +38 -108
  93. package/workspace/public/pm/home-ini.js +50 -68
  94. package/workspace/public/pm/home-line.css +7 -7
  95. package/workspace/public/pm/home-list.js +41 -4
  96. package/workspace/public/pm/home-phone-card.js +18 -15
  97. package/workspace/public/pm/home-today.js +18 -7
  98. package/workspace/public/pm/ini-more.js +67 -0
  99. package/workspace/public/pm/ini-view-model.js +3 -2
  100. package/workspace/public/pm/ini-view.css +104 -102
  101. package/workspace/public/pm/ini-view.js +16 -8
  102. package/workspace/public/pm/loose-props.css +13 -13
  103. package/workspace/public/pm/metric-drafts.css +82 -0
  104. package/workspace/public/pm/metric-drafts.js +165 -0
  105. package/workspace/public/pm/ms-suggest.css +8 -8
  106. package/workspace/public/pm/order-model.js +85 -0
  107. package/workspace/public/pm/ov-view.css +12 -12
  108. package/workspace/public/pm/premium-board.js +57 -11
  109. package/workspace/public/pm/premium-chart-tab.js +6 -6
  110. package/workspace/public/pm/premium-insights.js +306 -105
  111. package/workspace/public/pm/premium-report-intel.css +56 -0
  112. package/workspace/public/pm/premium-report-intel.js +232 -0
  113. package/workspace/public/pm/premium-shell.js +2 -2
  114. package/workspace/public/pm/premium-vw-file.js +2 -2
  115. package/workspace/public/pm/premium-vw-item.js +3 -1
  116. package/workspace/public/pm/premium-vw-jira.js +2 -0
  117. package/workspace/public/pm/premium.css +127 -128
  118. package/workspace/public/pm/prog-order.css +6 -6
  119. package/workspace/public/pm/prog-order.js +15 -2
  120. package/workspace/public/pm/program-charter.css +23 -23
  121. package/workspace/public/pm/rp-parts.js +2 -2
  122. package/workspace/public/pm/sort-order.css +17 -0
  123. package/workspace/public/pm/sort-order.js +108 -0
  124. package/workspace/public/pm/split-merge.css +15 -15
  125. package/workspace/public/pm/task-card.css +21 -21
  126. package/workspace/public/pm/tk-tasks.css +37 -37
  127. package/workspace/public/pm/tk-view.css +6 -6
  128. package/workspace/public/pm/tk-view.js +3 -2
  129. package/workspace/public/pm/wf-page.css +28 -28
  130. package/workspace/public/pm/wf-page.js +1 -1
  131. package/workspace/public/premium-board.html +1 -0
  132. package/workspace/public/premium-intelligence.html +82 -0
  133. package/workspace/server.js +38 -3
  134. package/workspace/skills/metric-draft.skill +47 -0
  135. package/workspace/sort-order-test.js +201 -0
  136. package/workspace/stage-card-test.js +1 -0
  137. package/workspace/task-card-test.js +1 -1
  138. package/workspace/test-lists/intel-report-ui.json +5 -0
  139. package/workspace/test-lists/intel-report.json +9 -0
  140. package/workspace/test-lists/metric-drafts-ui.json +5 -0
  141. package/workspace/test-lists/metric-drafts.json +9 -0
  142. package/workspace/test-lists/sort-order.json +6 -0
  143. package/workspace/test-lists/viewer-trail.json +5 -0
  144. package/workspace/test-run.js +3 -0
  145. package/workspace/tk-tasks-test.js +5 -3
  146. package/workspace/viewer-trail-test.js +145 -0
  147. package/workspace/public/premium-insights.html +0 -81
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-pmos",
3
- "version": "0.427.0",
3
+ "version": "0.429.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,30 @@
32
32
  "audit"
33
33
  ],
34
34
  "pmosChanges": [
35
+ {
36
+ "v": "0.429.0",
37
+ "at": "2026-10-27T18:29:21.690Z",
38
+ "f": 2,
39
+ "prs": [
40
+ {
41
+ "n": 1072,
42
+ "t": "Feedback batch 15",
43
+ "s": "Feedback batch 15"
44
+ }
45
+ ]
46
+ },
47
+ {
48
+ "v": "0.428.0",
49
+ "at": "2026-10-27T09:47:36.220Z",
50
+ "f": 2,
51
+ "prs": [
52
+ {
53
+ "n": 1071,
54
+ "t": "Feedback batch 14",
55
+ "s": "Feedback batch 14"
56
+ }
57
+ ]
58
+ },
35
59
  {
36
60
  "v": "0.427.0",
37
61
  "at": "2026-10-27T04:17:38.420Z",
@@ -247,30 +271,6 @@
247
271
  "s": "A new program shows on the Board and Home at once"
248
272
  }
249
273
  ]
250
- },
251
- {
252
- "v": "0.409.0",
253
- "at": "2026-10-25T03:28:25.142Z",
254
- "f": 2,
255
- "prs": [
256
- {
257
- "n": 1038,
258
- "t": "Program milestones in the charter, and a workflow per initiative (D99)",
259
- "s": "Program milestones in the charter, and a workflow per initiative"
260
- }
261
- ]
262
- },
263
- {
264
- "v": "0.408.0",
265
- "at": "2026-10-25T02:55:03.294Z",
266
- "f": 2,
267
- "prs": [
268
- {
269
- "n": 1039,
270
- "t": "Read another product's initiative from its own board; its heading no longer moves Home",
271
- "s": "Read another product's initiative from its own board; its heading no longer moves Home"
272
- }
273
- ]
274
274
  }
275
275
  ]
276
276
  }
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@681ba123
1
+ kernel-source: pmos@3c0f9339
2
2
  assembled: 2026-10-27
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-27T04:17:35Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-27T18:29:18Z"}
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-27T04:17:35Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-27T18:29:18Z"}
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-27T04:17:35Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-27T18:29:18Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -78,7 +78,7 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
78
78
  {
79
79
  const { ctx, page: p, errors } = await open();
80
80
  const tr = await p.evaluate(() => ({
81
- first: (document.querySelector('#ibBody .bt-h + *') || {}).className || '',
81
+ first: (document.querySelector('#ibBody .bt-h + [data-po-list="@top"] > .so-g > *:not(.so-grip)') || {}).className || '', // the groups are one list the grip arranges (batch 14 item 8)
82
82
  band: (document.querySelector('#ibBody .bt-pg .bt-pgo') || {}).textContent || '',
83
83
  spread: (document.querySelector('#ibBody .bt-pg .bd-spl') || {}).textContent || '',
84
84
  next: (document.querySelector('#ibBody .bt-pg .bd-pm') || {}).textContent || '',
@@ -234,6 +234,20 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
234
234
  return true;
235
235
  });
236
236
  ok('T By product: a program\'s undated initiative keeps its "No dates" row under its product, desktop and phone; one in no program is in the foot only (batch 11 item 19)', bnd === true, JSON.stringify(bnd));
237
+ // batch 14 item 2: a product whose initiatives are all undated (outside a program) kept no group, so it was missing from the Board
238
+ const pnd = await p.evaluate(async () => {
239
+ const S = await import('/pm/bd-span.js'), now = new Date(2026, 9, 26);
240
+ const a = { key: 'board:a', id: 'a', title: 'Dated one', start: '2026-10-01', end: '2026-11-20', track: { key: 'build' } };
241
+ const c = { key: 'board:c', id: 'c', title: 'Loose undated', start: null, end: null, track: { key: 'discover' } };
242
+ const m = { key: 'board:m', id: 'm', title: 'AI Forward Festival', start: null, end: null, track: { key: 'discover' } };
243
+ const groups = [{ kind: 'product', key: 'p:x', name: 'x', rows: [a, c] }, { kind: 'product', key: 'p:ms', name: 'pmos-microsites', rows: [m] }];
244
+ const T = S.timelineHtml([a, c, m], { jira: null }, 'quarter', { now, groups, prodHtml: (g) => `<div class="tg-r ph" data-prod="${g.key}"></div>` });
245
+ const d = document.createElement('div'); d.innerHTML = T.html;
246
+ const row = d.querySelector('[data-row="board:m"]');
247
+ return { heads: [...d.querySelectorAll('[data-prod]')].map((x) => x.dataset.prod).join(), nd: row ? (row.querySelector('.tg-nd') || {}).textContent : '', loose: !!d.querySelector('[data-row="board:c"]'), foot: ((d.querySelector('.tg-ft .tg-none span') || {}).textContent || '') };
248
+ });
249
+ ok('T a product with only undated initiatives keeps its head and its "No dates" rows; they leave the foot, which still names the rest (batch 14 item 2)',
250
+ pnd.heads === 'p:x,p:ms' && pnd.nd === 'No dates' && !pnd.loose && pnd.foot === 'Loose undated', JSON.stringify(pnd));
237
251
  ok('T a legend in the chip row names done, planned, Milestone (Deliver, Evaluate and milestone tasks, batch 11 item 3) and today; no program milestone key while a program draws none (batch 13 item 4)', /Done in Jira/.test(t.lgd) && /To do/.test(t.lgd) && !/Program milestone/.test(t.lgd) && /Milestone/.test(t.lgd) && /Today/.test(t.lgd), t.lgd);
238
252
  await p.click('#ibBody .tg-pg .tg-pgo');
239
253
  // the program opens in the floating Viewer (shell A), which sits over the right of the timeline; close it before the next press
@@ -423,7 +437,7 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
423
437
  await p.click('#ibBody .bt-nm >> text=Legacy IdP sunset');
424
438
  await p.waitForSelector('#czViewer:not([hidden])');
425
439
  const m = await menu();
426
- ok('P7 an initiative in no program: ⋯ offers Turn into a program, after the plan dates', m.indexOf('Turn into a program') === m.indexOf('Change the plan dates') + 1, JSON.stringify(m));
440
+ ok('P7 an initiative in no program: ⋯ offers Turn into a program, in the place group after split and merge (the one menu, batch 14 item 5)', m.indexOf('Turn into a program') > m.indexOf('Merge into›') && m.indexOf('Merge into›') > m.indexOf('Change the plan dates') && m.indexOf('Change the plan dates') >= 0, JSON.stringify(m));
427
441
  await p.click('.cz-vw-menu [role="menuitem"] >> text=Turn into a program');
428
442
  await p.waitForTimeout(400);
429
443
  const ev = await events(p);
@@ -118,7 +118,7 @@ const IVREAD = () => {
118
118
  ok('N2 no page header on desktop: the heading is for screen readers only and the toolbar starts at the top', place.h1 === '1x1' && place.top < 60 && place.name === 'Products: pmos' && place.sw, JSON.stringify(place));
119
119
  await p.click('#czFab');
120
120
  const menu = await p.evaluate(() => [...document.querySelectorAll('#czMenu a')].map((a) => a.textContent + (a.getAttribute('aria-current') ? '*' : '') + '>' + a.getAttribute('href')).join('|'));
121
- ok('N1 the menu opens Home, Board and Insights, and marks Board', menu === 'Home>/premium.html|Board*>/premium-board.html|Insights>/premium-insights.html', menu);
121
+ ok('N1 the menu opens Home, Board and Intelligence, and marks Board', menu === 'Home>/premium.html|Board*>/premium-board.html|Intelligence>/premium-intelligence.html', menu);
122
122
  await p.keyboard.press('Escape');
123
123
  // premium-agreed-design (shared foundation): the ⋯ menu leads nowhere in the console; its undesigned items open the Viewer on a placeholder.
124
124
  // re-pointed for the Agreed Board: the Board adds none of its old items to the menu (steps, sprint and release, metrics, cancelled and archived).
@@ -144,7 +144,7 @@ const IVREAD = () => {
144
144
  // PgBoard: a committed date (the planned end) shows under the Deliver milestone; at the milestone itself it replaces the days count
145
145
  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)));
146
146
  ok('B1 the Next column has no segment bar and no legend', tr.lg === false, String(tr.lg));
147
- 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);
147
+ ok('B1 Monitor and Evaluate fold after the first of each: "20 more in Monitor and Evaluate"; no "Sorted by stage" line (the sort button says it, batch 14 item 8)', /^20 more in Monitor and Evaluate$/.test(tr.tf.trim()), tr.tf);
148
148
  await p.click('#fold');
149
149
  ok('B1 the fold opens and says how many are not loaded, and closes again', await p.evaluate(() => document.querySelector('#fold').getAttribute('aria-expanded') === 'true' && /Fold Monitor and Evaluate · 20 more are not loaded/.test(document.querySelector('#fold').textContent)));
150
150
  await p.click('#fold');
@@ -199,7 +199,7 @@ const IVREAD = () => {
199
199
  ok('B1 a Deliver row whose release has a date says when it ships', c.st === 'Ships Nov 4', c.st);
200
200
  // a metric chip opens its trend (BdPanel); its "Show only" filters
201
201
  await q.click('#bdChipset [data-f="blocked"]');
202
- ok('B1 a metric chip opens its trend, with Show only and See in Insights', await until(() => q.evaluate(() => { const p = document.querySelector('#bdPop'); return !!p && !p.hidden && /Blocked · 1 now/.test(p.textContent) && !!p.querySelector('[data-trshow="blocked"]') && /See in Insights/.test(p.textContent); })));
202
+ ok('B1 a metric chip opens its trend, with Show only and See in Intelligence', await until(() => q.evaluate(() => { const p = document.querySelector('#bdPop'); return !!p && !p.hidden && /Blocked · 1 now/.test(p.textContent) && !!p.querySelector('[data-trshow="blocked"]') && /See in Intelligence/.test(p.textContent); })));
203
203
  await q.click('#bdPop [data-trshow="blocked"]');
204
204
  ok('B1 a chip filters the rows to what it counts', await q.evaluate(() => [...document.querySelectorAll('#ibBody .bt-l')].map((r) => r.dataset.row).join() === 'board:sso-partners'));
205
205
  await q.click('#bdChipset [data-f="blocked"]');
@@ -334,11 +334,12 @@ const IVREAD = () => {
334
334
  const tp = await until(() => p.evaluate(IVREAD).then((x) => (x && x.kind === 'Initiative' ? x : null)));
335
335
  ok('B6 an initiative on the timeline opens in the Viewer: the stage card names Plan over the eight steps, the dates line draws the plan dates, no empty rows', !!tp && tp.t === 'Partner API rate limits' && tp.stage === 'Plan' && tp.bars.split('|').length === 8 && tp.bars.split('|').indexOf('now') === 2 && tp.right === '18% done · typed in by hand' && /^Sep 20(, 2026)? ?Nov 30(, 2026)? · \d+ days left$/.test(tp.dates || '') && !/Jira:/.test(tp.dates) && !tp.folds.includes('Dates and trend'), JSON.stringify(tp && [tp.stage, tp.bars, tp.right, tp.dates, tp.folds]));
336
336
  await p.click('#czViewer [data-cz-vw="more"]'); await sleep(80);
337
- const tm = await p.evaluate(() => [...document.querySelectorAll('.cz-vw-menu [role="menuitem"]')].map((b) => b.textContent.trim()));
338
- ok('B6 ⋯ holds the timeline panel\'s actions first (move, hold, cancel or archive; the plan dates), then Open in full, link and copy', tm[0] === 'Move, hold, cancel or archive' && tm[1] === 'Change the plan dates' && tm.includes('Open in full') && tm.includes('Copy link') && tm.includes('Copy as text'), JSON.stringify(tm));
337
+ const tm = await p.evaluate(() => [...document.querySelectorAll('.cz-vw-menu [role="menuitem"]')].map((b) => b.querySelector('span').textContent.trim()));
338
+ /* re-pointed (batch 14 item 5): ⋯ is the ONE initiative menu (pm/ini-more.js), Home's order; no "Move, hold, cancel or archive", no "Open in full" */
339
+ ok('B6 ⋯ is the one initiative menu: change it first (workflow, stage, plan dates), then look at it (link, copy), then stop it, red and last', tm[0] === 'Change workflow' && tm.includes('Move back a stage') && tm.includes('Move to a stage') && tm.indexOf('Change the plan dates') < tm.indexOf('Copy link') && tm.includes('The record') && tm.includes('Copy as text') && !tm.includes('Open on the Board') && !tm.includes('Open in full') && !tm.includes('Move, hold, cancel or archive') && tm[tm.length - 1] === 'Cancel the initiative', JSON.stringify(tm));
339
340
  await p.click('#czViewer [data-cz-vw="more"]'); await sleep(80);
340
- await vwMore(p, 'Move, hold, cancel or archive');
341
- 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'); })));
341
+ await vwMore(p, 'Move to a stage');
342
+ ok('B6 Move to a stage lists the other stages, by the row menu\'s own presses (BdActions)', await until(() => p.evaluate(() => { const m = document.querySelector('#bdPop'); return !!m && !m.hidden && m.getAttribute('role') === 'menu' && !!m.querySelector('[data-rowact="mv:3"]') && /Prioritize/.test(m.textContent) && !/^Plan$/m.test([...m.querySelectorAll('.bd-mi')].map((b) => b.textContent).join('\n')); })));
342
343
  await p.keyboard.press('Escape');
343
344
  ok('B6 Escape closes the menu first and leaves the Viewer open', await p.evaluate(() => document.querySelector('#bdPop').hidden) && await vwOn(p, 'Initiative'));
344
345
  await p.keyboard.press('Escape'); await vwShut(p);
@@ -375,17 +376,22 @@ const IVREAD = () => {
375
376
  ok('0 no page error', A.errors.length === 0, A.errors.join(' | '));
376
377
  await A.ctx.close();
377
378
 
378
- /* B14 the panel's expand opens the initiative page; there is no Page/Popup switch. Re-pointed (viewer-shell-a): "Open in full" under ⋯ opens it in a new tab */
379
+ /* B14 there is no Page/Popup switch. Re-pointed (batch 14 item 5): "Open in full" left ⋯ (the header's Open wide says it once); Copy link holds the initiative page's address */
379
380
  {
380
381
  const D = await open();
381
382
  await D.ctx.route('**/premium-initiative.html*', (r) => r.fulfill({ contentType: 'text/html', body: '<title>x</title>' }));
382
383
  ok('B14 there is no Page/Popup switch', await D.page.evaluate(() => !document.querySelector('#modeSeg') && !document.querySelector('#modeRow:not([hidden])')));
383
384
  await D.page.locator('#ibBody .bt-l[data-row="board:self-serve-v2"] .bt-nm').click(); await until(() => vwOn(D.page, 'Initiative'));
384
385
  ok('B14 a click on an initiative opens it in the Viewer and stays on the Board', new URL(D.page.url()).pathname === '/premium-board.html');
385
- const [pop] = await Promise.all([D.ctx.waitForEvent('page'), vwMore(D.page, 'Open in full')]);
386
- await pop.waitForLoadState().catch(() => {});
387
- const u = new URL(pop.url());
388
- ok('B14 Open in full opens the initiative page with the initiative, the workspace and the board', u.pathname === '/premium-initiative.html' && u.searchParams.get('id') === 'self-serve-v2' && u.searchParams.get('ws') === 'w1' && u.searchParams.get('board') === 'w1', D.page.url());
386
+ await D.ctx.grantPermissions(['clipboard-read', 'clipboard-write']).catch(() => {});
387
+ const noFull = await vwMore(D.page, 'Open in full');
388
+ if (noFull) await D.page.keyboard.press('Escape');
389
+ if (!noFull) await D.page.keyboard.press('Escape');
390
+ ok('B14 ⋯ has no Open in full, and the header keeps Open wide', !noFull && await D.page.evaluate(() => !!document.querySelector('#czViewer [data-cz-vw="wide"]')));
391
+ await vwMore(D.page, 'Copy link');
392
+ const cl = await until(() => D.page.evaluate(() => navigator.clipboard.readText().catch(() => '')));
393
+ const u = new URL(cl || 'http://x/none');
394
+ ok('B14 Copy link holds the initiative page with the initiative, the workspace and the board', u.pathname === '/premium-initiative.html' && u.searchParams.get('id') === 'self-serve-v2' && u.searchParams.get('ws') === 'w1' && u.searchParams.get('board') === 'w1', cl);
389
395
  ok('0 no page error on expand', D.errors.length === 0, D.errors.join(' | '));
390
396
  await D.ctx.close();
391
397
  }
@@ -424,11 +430,11 @@ const IVREAD = () => {
424
430
  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);
425
431
  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);
426
432
  await q.click('#bdView'); await q.locator('#ibBody .bt-l[data-row="board:sso-partners"] .bt-nm').click();
427
- /* re-pointed (viewer-shell-a, XvABoard): on a phone the Viewer covers the screen; ⋯ holds Move, hold, cancel or archive, which opens the row menu as a sheet */
433
+ /* re-pointed (viewer-shell-a, XvABoard; batch 14 item 5): on a phone the Viewer covers the screen; ⋯ Move to a stage opens the stages as a sheet */
428
434
  const g = await until(() => q.evaluate(() => { const v = document.querySelector('#czViewer'); if (!v || v.hidden) return null; const r = v.getBoundingClientRect(); return { l: Math.round(r.left), w: Math.round(r.width), h: Math.round(r.height), vw: innerWidth, vh: innerHeight }; }));
429
435
  ok(`B13 at 390 px (${theme}) the initiative covers the screen`, !!g && g.l === 0 && g.w === g.vw && g.h === g.vh, JSON.stringify(g));
430
- await vwMore(q, 'Move, hold, cancel or archive');
431
- ok(`B13 at 390 px (${theme}) Move, hold, cancel or archive opens the row menu as a sheet across the width, with 44 px rows, and no dialog`, await until(() => q.evaluate(() => { const m = document.querySelector('#bdPop'); if (!m || m.hidden) return false; const r = m.getBoundingClientRect(); return m.classList.contains('sheet') && Math.round(r.left) === 0 && Math.round(r.width) === innerWidth && m.querySelectorAll('.bd-mi').length >= 3 && [...m.querySelectorAll('.bd-mi')].every((b) => b.getBoundingClientRect().height >= 44) && !document.querySelector('#dlg.on'); })));
436
+ await vwMore(q, 'Move to a stage');
437
+ ok(`B13 at 390 px (${theme}) Move to a stage opens the stages as a sheet across the width, with 44 px rows, and no dialog`, await until(() => q.evaluate(() => { const m = document.querySelector('#bdPop'); if (!m || m.hidden) return false; const r = m.getBoundingClientRect(); return m.classList.contains('sheet') && Math.round(r.left) === 0 && Math.round(r.width) === innerWidth && m.querySelectorAll('.bd-mi').length >= 3 && [...m.querySelectorAll('.bd-mi')].every((b) => b.getBoundingClientRect().height >= 44) && !document.querySelector('#dlg.on'); })));
432
438
  await q.keyboard.press('Escape');
433
439
  ok(`0 no page error at 390 px (${theme})`, R.errors.length === 0, R.errors.join(' | '));
434
440
  await R.ctx.close();
@@ -476,24 +482,23 @@ const IVREAD = () => {
476
482
  await spanTo(q, 'quarter');
477
483
  ok('T the Quarter names a release sign-off in its bar\'s hover (no blue ◆, batch 13 item 4) and a dependency on the bar', await q.evaluate(() => [...document.querySelectorAll('#ibBody .tg-bar')].some((b) => /v2\.4 sign-off/.test(b.getAttribute('title') || '')) && !document.querySelector('#ibBody .tg-msd') && /after SSO for partners/.test(document.querySelector('#ibBody').textContent)));
478
484
  await view(q, 'track');
479
- /* the row actions write through the console's routes, each with Undo; re-pointed (viewer-shell-a): the initiative's ⋯ opens them */
485
+ /* the row actions write through the console's routes, each with Undo; re-pointed (batch 14 item 5): they are items of the initiative's ⋯ */
480
486
  await q.click('#bdChipset [data-f="sprint"]');
481
487
  const n3 = R.posts.length;
482
- await q.click('.bt-l[data-row="board:partner-rate-limits"] .bt-nm'); await until(() => vwOn(q, 'Initiative')); await vwMore(q, 'Move, hold, cancel or archive');
483
- await q.click('#bdPop [data-rowact="hold"]');
488
+ await q.click('.bt-l[data-row="board:partner-rate-limits"] .bt-nm'); await until(() => vwOn(q, 'Initiative')); await vwMore(q, 'Put on hold');
484
489
  ok('T Put on hold writes one on-hold lifecycle line, with the check-back day', await until(() => R.posts.some((x) => x.path === '/api/lifecycle' && x.body.initiative_id === 'partner-rate-limits' && x.body.state === 'on-hold' && /^\d{4}-\d{2}-\d{2}$/.test(x.body.back || ''))), JSON.stringify(R.posts));
485
490
  await until(() => q.evaluate(() => !!document.querySelector('#bdToast .bd-undo')));
486
491
  await q.click('#bdToast .bd-undo');
487
492
  ok('T Undo writes the state it had before through the same route', await until(() => R.posts.slice(n3).some((x) => x.path === '/api/lifecycle' && x.body.state === 'active' && x.body.reason === 'undo')), JSON.stringify(R.posts.slice(n3)));
488
- await q.click('.bt-l[data-row="board:partner-rate-limits"] .bt-nm'); await until(() => vwOn(q, 'Initiative')); await vwMore(q, 'Move, hold, cancel or archive');
489
- ok('T the row menu says how much of the step is ready next to Move', await until(() => q.evaluate(() => /Move to Prioritize1 of 4 ready/.test((document.querySelector('#bdPop [data-rowact="mv:3"]') || {}).textContent || ''))), await q.evaluate(() => (document.querySelector('#bdPop') || {}).textContent));
493
+ await q.click('.bt-l[data-row="board:partner-rate-limits"] .bt-nm'); await until(() => vwOn(q, 'Initiative')); await vwMore(q, 'Move to a stage');
494
+ ok('T Move to a stage says how much of the step is ready next to the next stage', await until(() => q.evaluate(() => /^Prioritize1 of 4 ready$/.test((document.querySelector('#bdPop [data-rowact="mv:3"]') || {}).textContent || ''))), await q.evaluate(() => (document.querySelector('#bdPop') || {}).textContent));
490
495
  await q.click('#bdPop [data-rowact="mv:3"]');
491
496
  ok('T Move to the next stage writes a move line in the board ledger', await until(() => R.posts.some((x) => x.path === '/api/boards/move' && x.body.id === 'partner-rate-limits' && x.body.to === 'Prioritize' && x.body.board === 'w1')), JSON.stringify(R.posts.slice(-2)));
492
- await q.click('.bt-l[data-row="board:partner-rate-limits"] .bt-nm'); await until(() => vwOn(q, 'Initiative')); await vwMore(q, 'Move, hold, cancel or archive'); await q.click('#bdPop [data-rowact="cancel"]');
497
+ await q.click('.bt-l[data-row="board:partner-rate-limits"] .bt-nm'); await until(() => vwOn(q, 'Initiative')); await vwMore(q, 'Cancel the initiative');
493
498
  ok('T Cancel asks why, with the same chips as Decline', await until(() => q.evaluate(() => /Why cancel Partner API rate limits\?/.test(document.querySelector('#bdPop').textContent) && [...document.querySelectorAll('#bdPop [data-why]')].map((b) => b.textContent).join() === 'Out of scope,Already planned,Not now,Other')));
494
499
  await q.click('#bdPop [data-why="Not now"]'); await q.click('#bdPop [data-rowact="cancel-go"]');
495
500
  ok('T Cancel writes a cancelled lifecycle line with the reason', await until(() => R.posts.some((x) => x.path === '/api/lifecycle' && x.body.state === 'cancelled' && x.body.reason === 'Not now')), JSON.stringify(R.posts.slice(-2)));
496
- await q.click('.bt-l[data-row="board:partner-rate-limits"] .bt-nm'); await until(() => vwOn(q, 'Initiative')); await vwMore(q, 'Move, hold, cancel or archive'); await q.click('#bdPop [data-rowact="archive"]');
501
+ await q.click('.bt-l[data-row="board:partner-rate-limits"] .bt-nm'); await until(() => vwOn(q, 'Initiative')); await vwMore(q, 'Archive');
497
502
  ok('T Archive needs no reason and writes an archive line, with Undo', await until(() => R.posts.some((x) => x.path === '/api/boards/archive' && x.body.archived === true && x.body.id === 'partner-rate-limits')) && await until(() => q.evaluate(() => !!document.querySelector('#bdToast .bd-undo'))), JSON.stringify(R.posts.slice(-2)));
498
503
  /* New initiative and the new asks */
499
504
  await q.keyboard.press('Escape');