create-pmos 0.537.0 → 0.538.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 (100) hide show
  1. package/package.json +68 -14
  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-columns-test.js +11 -10
  8. package/workspace/board-programs-test.js +21 -23
  9. package/workspace/board-publish-ui-test.js +19 -15
  10. package/workspace/board-shared-ui-test.js +15 -12
  11. package/workspace/briefing-premium-board-test.js +46 -31
  12. package/workspace/briefing-premium-insights-test.js +24 -31
  13. package/workspace/briefing-premium-metrics-test.js +2 -2
  14. package/workspace/calm-timeline-test.js +1 -1
  15. package/workspace/changelog.json +67 -0
  16. package/workspace/ev-everywhere-test.js +4 -5
  17. package/workspace/fixtures/board-premium-facts.js +1 -1
  18. package/workspace/fixtures/initiative-premium-facts.js +1 -1
  19. package/workspace/fixtures/insights-premium-facts.js +6 -6
  20. package/workspace/fixtures/program-ascent.js +1 -1
  21. package/workspace/guide/adler.md +2 -2
  22. package/workspace/guide/agent-capabilities.md +38 -6
  23. package/workspace/guide/board.md +13 -6
  24. package/workspace/guide/claude-proposes.md +1 -1
  25. package/workspace/guide/home.md +2 -2
  26. package/workspace/guide/index.md +3 -3
  27. package/workspace/guide/intelligence-okr-goals.md +18 -7
  28. package/workspace/guide/lifecycle.md +2 -2
  29. package/workspace/guide/programs.md +2 -2
  30. package/workspace/guide/reports-needs-you.md +5 -5
  31. package/workspace/guide/settings.md +14 -11
  32. package/workspace/guide/workflows.md +3 -3
  33. package/workspace/guide/your-impact.md +1 -1
  34. package/workspace/lib/agent-team.js +262 -0
  35. package/workspace/lib/ai-cli.js +36 -4
  36. package/workspace/lib/bg-queue.js +9 -4
  37. package/workspace/lib/board-premium.js +6 -3
  38. package/workspace/lib/goal-source.js +77 -0
  39. package/workspace/lib/grill-runs.js +6 -3
  40. package/workspace/lib/headless.js +36 -4
  41. package/workspace/lib/idle-lab-engine.js +7 -6
  42. package/workspace/lib/initiative-premium.js +6 -3
  43. package/workspace/lib/insights-premium.js +1 -1
  44. package/workspace/lib/job-graph.js +191 -0
  45. package/workspace/lib/okr-goals.js +3 -0
  46. package/workspace/lib/orchestrator-keeprate.js +108 -7
  47. package/workspace/lib/pmos-verbs.js +3 -0
  48. package/workspace/lib/proposal-runs.js +8 -5
  49. package/workspace/lib/proposals.js +32 -2
  50. package/workspace/lib/report-slots.js +14 -10
  51. package/workspace/lib/routes-boards.js +2 -2
  52. package/workspace/lib/routes-insights-premium.js +11 -4
  53. package/workspace/lib/routes-premium-dashboards.js +20 -6
  54. package/workspace/lib/routes-proposals.js +10 -5
  55. package/workspace/lib/routes-your-move.js +6 -7
  56. package/workspace/lib/status-proof.js +45 -0
  57. package/workspace/lib/status-signal.js +4 -2
  58. package/workspace/lib/task-links.js +3 -1
  59. package/workspace/lib/team-cli.js +164 -0
  60. package/workspace/lib/team-runs.js +244 -0
  61. package/workspace/lib/verify-runs.js +112 -0
  62. package/workspace/okr-goals-ui-test.js +10 -13
  63. package/workspace/package-lock.json +2 -2
  64. package/workspace/package.json +1 -1
  65. package/workspace/premium-vw-backlog-test.js +2 -2
  66. package/workspace/premium-vw-jira-test.js +1 -1
  67. package/workspace/public/pm/bd-acts.js +14 -34
  68. package/workspace/public/pm/bd-ini-panel.js +38 -27
  69. package/workspace/public/pm/bd-publish.js +1 -1
  70. package/workspace/public/pm/bd-span.js +2 -1
  71. package/workspace/public/pm/bd-views.js +7 -5
  72. package/workspace/public/pm/c3-ini-ui.js +9 -7
  73. package/workspace/public/pm/cozy-board.css +17 -6
  74. package/workspace/public/pm/cozy-insights.css +18 -0
  75. package/workspace/public/pm/cozy-nav.js +2 -2
  76. package/workspace/public/pm/cozy-search.js +29 -7
  77. package/workspace/public/pm/cozy-settings.js +39 -20
  78. package/workspace/public/pm/home-data.js +3 -1
  79. package/workspace/public/pm/home-ini-model.js +15 -1
  80. package/workspace/public/pm/home-ini.js +9 -3
  81. package/workspace/public/pm/ini-tail.js +61 -0
  82. package/workspace/public/pm/ini-view-model.js +10 -7
  83. package/workspace/public/pm/premium-board.js +66 -99
  84. package/workspace/public/pm/premium-insights.js +95 -112
  85. package/workspace/public/pm/premium-report-intel.js +3 -2
  86. package/workspace/public/pm/readonly.js +4 -3
  87. package/workspace/public/pm/stage-chip.js +2 -1
  88. package/workspace/public/pm/status-proof.js +43 -0
  89. package/workspace/public/premium-board.html +10 -28
  90. package/workspace/public/premium-intelligence.html +7 -9
  91. package/workspace/server.js +35 -1
  92. package/workspace/sort-order-test.js +10 -8
  93. package/workspace/test-files.json +4 -2
  94. package/workspace/test-lists/agent-team.json +9 -0
  95. package/workspace/test-lists/job-graph.json +11 -0
  96. package/workspace/test-lists/status-proof.json +5 -0
  97. package/workspace/workflows-setup-test.js +3 -2
  98. package/workspace/public/premium-chat.html +0 -14
  99. package/workspace/public/premium-initiative.html +0 -15
  100. package/workspace/public/premium-work.html +0 -14
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-pmos",
3
- "version": "0.537.0",
3
+ "version": "0.538.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,73 @@
32
32
  "audit"
33
33
  ],
34
34
  "pmosChanges": [
35
+ {
36
+ "v": "0.538.0",
37
+ "at": "2026-11-08T03:45:27.128Z",
38
+ "f": 4,
39
+ "prs": [
40
+ {
41
+ "n": 1254,
42
+ "t": "Declared background job graph, a keep rate for every ✦ job, and jobs that learn from ✕ (OS evaluation T1)",
43
+ "s": "Declared background job graph, a keep rate for every ✦ job, and jobs that learn from ✕ (OS evaluation T1)",
44
+ "k": "new"
45
+ },
46
+ {
47
+ "n": 1257,
48
+ "t": "One goal source — OKR key results are the goals, KR metric records their readings (OS evaluation T2)",
49
+ "s": "One goal source — OKR key results are the goals, KR metric records their readings (OS evaluation T2)",
50
+ "k": "new"
51
+ },
52
+ {
53
+ "n": 1256,
54
+ "t": "No status renders without a read behind it (OS evaluation T3)",
55
+ "s": "No status renders without a read behind it (OS evaluation T3)",
56
+ "k": "new"
57
+ },
58
+ {
59
+ "n": 1260,
60
+ "t": "The Board and Home open the same initiative view (UI grill U1, part 1)",
61
+ "s": "The Board and Home open the same initiative view (UI grill U1, part 1)",
62
+ "k": "new"
63
+ },
64
+ {
65
+ "n": 1258,
66
+ "t": "Role agents under the chief of staff (backend)",
67
+ "s": "Role agents under the chief of staff (backend)",
68
+ "k": "new"
69
+ },
70
+ {
71
+ "n": 1262,
72
+ "t": "Intelligence shows only key results with a reading, one report starter (UI grill U3)",
73
+ "s": "Intelligence shows only key results with a reading, one report starter (UI grill U3)",
74
+ "k": "new"
75
+ },
76
+ {
77
+ "n": 1259,
78
+ "t": "Settings from nine sections to five, old redirect pages folded (UI grill U4)",
79
+ "s": "Settings from nine sections to five, old redirect pages folded (UI grill U4)",
80
+ "k": "new"
81
+ },
82
+ {
83
+ "n": 1263,
84
+ "t": "Opening an initiative never moves its stage",
85
+ "s": "Opening an initiative never moves its stage",
86
+ "k": "fix"
87
+ },
88
+ {
89
+ "n": 1255,
90
+ "t": "Loop telemetry, corrections from evidence, builder model, Work-Item lines, verifier after merge",
91
+ "s": "Loop telemetry, corrections from evidence, builder model, Work-Item lines, verifier after merge",
92
+ "k": "new"
93
+ },
94
+ {
95
+ "n": 1264,
96
+ "t": "Board toolbar of seven, one search (UI grill U2)",
97
+ "s": "Board toolbar of seven, one search (UI grill U2)",
98
+ "k": "new"
99
+ }
100
+ ]
101
+ },
35
102
  {
36
103
  "v": "0.537.0",
37
104
  "at": "2026-11-05T23:09:31.438Z",
@@ -392,19 +459,6 @@
392
459
  "k": "fix"
393
460
  }
394
461
  ]
395
- },
396
- {
397
- "v": "0.518.0",
398
- "at": "2026-11-04T00:33:13.219Z",
399
- "f": 4,
400
- "prs": [
401
- {
402
- "n": 1211,
403
- "t": "Claude repairs a source that is behind by itself; the banner shows only when you must act",
404
- "s": "Claude repairs a source that is behind by itself; the banner shows only when you must act",
405
- "k": "new"
406
- }
407
- ]
408
462
  }
409
463
  ]
410
464
  }
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@7278da51
2
- assembled: 2026-11-05
1
+ kernel-source: pmos@be5f6fe3
2
+ assembled: 2026-11-08
3
3
  mode: vendor
@@ -2,7 +2,7 @@
2
2
  type: Reference
3
3
  title: "Eval calibration log"
4
4
  description: "Append-only record of every PM override of an evaluator verdict."
5
- generated: {by: process:create-pmos, at: "2026-11-05T23:09:27Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-08T03:45:24Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -2,7 +2,7 @@
2
2
  type: Reference
3
3
  title: "Health budgets"
4
4
  description: "Closed registry of health-budget anchors (D59), edited only by the PM."
5
- generated: {by: process:create-pmos, at: "2026-11-05T23:09:27Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-08T03:45:24Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -2,7 +2,7 @@
2
2
  type: Reference
3
3
  title: "Discoveries and friction log"
4
4
  description: "Append-only record of what runs discovered and where the process rubbed."
5
- generated: {by: process:create-pmos, at: "2026-11-05T23:09:27Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-08T03:45:24Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  Newest first, ISO dates.
4
4
 
5
- ## 2026-11-05
5
+ ## 2026-11-08
6
6
 
7
7
  - Adopted OKF v0.2 (D73).
@@ -31,7 +31,7 @@ const finish = async (code) => {
31
31
  };
32
32
  process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
33
33
 
34
- const row = (id, title, o) => ({ id, title, lane: 'feature', stage: 'Build', cat: 'Do', owner: 'Wawan', anchor: 'q4-2026:o3:kr1', horizon: 'now', status: 'on track', start: null, end: null, progress: 30, warnings: [], rank: 0, health: 'on', updated: '2026-10-15T08:00:00.000Z', reading: 'build', stageSource: 'derived', dupOf: null, ...o });
34
+ const row = (id, title, o) => ({ id, title, lane: 'feature', stage: 'Build', cat: 'Do', owner: 'Wawan', anchor: 'q4-2026:o3:kr1', horizon: 'now', status: 'on track', signal: { source: 'Jira', readAt: '2026-10-15T08:00:00.000Z' }, start: null, end: null, progress: 30, warnings: [], rank: 0, health: 'on', updated: '2026-10-15T08:00:00.000Z', reading: 'build', stageSource: 'derived', dupOf: null, ...o });
35
35
  const EXTRA = [
36
36
  row('email-otp', 'Email OTP (passwordless login for every member)', { start: '2026-07-01', end: '2027-06-10', status: 'on hold', holds: [{ from: '2026-08-25', to: null, back: '2027-03-01', reason: 'Waits on the SMS vendor contract' }], stopped: { state: 'on-hold', reason: 'Waits on the SMS vendor contract', at: '2026-08-25T09:00:00.000Z', back: '2027-03-01' } }),
37
37
  row('lightbox', 'Lightbox UI Adjustments', { start: '2026-08-10', end: '2026-10-12', status: 'late', progress: 80 }),
@@ -117,22 +117,23 @@ const ITEMS = [
117
117
  await p.click('#ibBody [data-tsort="status"]'); await p.waitForTimeout(200);
118
118
  ok('S a second press goes back to time order', (await rowsIn(p)).join() === before.join(), JSON.stringify([before, await rowsIn(p)]));
119
119
  // P: the Columns menu
120
- ok('P the Columns button shows on the timeline', await p.evaluate(() => !document.querySelector('#bdColsw').hidden));
121
- await p.click('#bdCols'); await p.waitForTimeout(150);
122
- const menu = await p.evaluate(() => { const m = document.querySelector('#bdColsMenu'); return { open: !m.hidden, boxes: m.querySelectorAll('input[type=checkbox]').length, off: m.querySelectorAll('input:disabled:checked').length, on: [...m.querySelectorAll('input[data-tcol]:checked')].map((x) => x.dataset.tcol), focus: document.activeElement && document.activeElement.dataset.tcol }; });
123
- ok('P the menu has a check box per column, Initiative always on, the defaults checked', menu.open && menu.boxes === 10 && menu.off === 1 && menu.on.join() === 'stage,status,start,ms' && menu.focus === 'stage', JSON.stringify(menu));
120
+ // UI grill U2: the Columns are a part of the View chip's menu on the timeline
121
+ ok('P the View chip holds the Columns on the timeline', await p.evaluate(() => !!document.querySelector('#bdViewMenu #bdColsMenu')));
122
+ await p.click('#bdView'); await p.waitForTimeout(150);
123
+ const menu = await p.evaluate(() => { const m = document.querySelector('#bdColsMenu'); return { open: !document.querySelector('#bdViewMenu').hidden, boxes: m.querySelectorAll('input[type=checkbox]').length, off: m.querySelectorAll('input:disabled:checked').length, on: [...m.querySelectorAll('input[data-tcol]:checked')].map((x) => x.dataset.tcol), focus: document.activeElement && document.activeElement.dataset.tcol }; });
124
+ ok('P the menu has a check box per column, Initiative always on, the defaults checked', menu.open && menu.boxes === 10 && menu.off === 1 && menu.on.join() === 'stage,status,start,ms', JSON.stringify(menu));
124
125
  await shot(p, 'cols-menu');
125
126
  await p.click('#bdColsMenu [data-tcol="owner"]'); await p.waitForTimeout(200);
126
127
  await p.click('#bdColsMenu [data-tcol="ms"]'); await p.waitForTimeout(200);
127
128
  const after = await heads(p), lb2 = await rowOf(p, 'board:lightbox');
128
129
  ok('P Owner on and Next milestone off: the columns follow, and the bar end names its milestone again', after.join() === 'Initiative,Stage,Status,Start,Owner' && /Wawan$/.test(lb2.cells[3]) && lb2.labels.length === 1 && /Lightbox UI live/.test(lb2.labels[0]), JSON.stringify([after, lb2]));
129
- ok('P the menu stays open while you choose', await p.evaluate(() => !document.querySelector('#bdColsMenu').hidden));
130
+ ok('P the menu stays open while you choose', await p.evaluate(() => !document.querySelector('#bdViewMenu').hidden && !!document.querySelector('#bdViewMenu #bdColsMenu')));
130
131
  await p.keyboard.press('Escape'); await p.waitForTimeout(150);
131
- ok('P Escape closes the menu and gives the focus back to the button', await p.evaluate(() => document.querySelector('#bdColsMenu').hidden && document.activeElement && document.activeElement.id === 'bdCols'));
132
+ ok('P Escape closes the menu and gives the focus back to the View chip', await p.evaluate(() => document.querySelector('#bdViewMenu').hidden && document.activeElement && document.activeElement.id === 'bdView'));
132
133
  await p.reload(); await p.waitForSelector('#ibBody [data-row]'); await p.waitForTimeout(400);
133
134
  ok('P the choice is remembered after a reload', (await heads(p)).join() === 'Initiative,Stage,Status,Start,Owner', JSON.stringify(await heads(p)));
134
- await p.click('#ibTabs [data-v="track"]'); await p.waitForTimeout(200);
135
- ok('P the Columns button is the timeline\'s only', await p.evaluate(() => document.querySelector('#bdColsw').hidden));
135
+ await p.evaluate(() => document.querySelector('#bdViewMenu [data-pv="track"]').click()); await p.waitForTimeout(200);
136
+ ok('P the Columns are the timeline\'s only', await p.evaluate(() => !document.querySelector('#bdColsMenu')));
136
137
  ok('no page error', errors.length === 0, errors.join(' | '));
137
138
  await ctx.close();
138
139
  }
@@ -159,7 +160,7 @@ const ITEMS = [
159
160
  }
160
161
  {
161
162
  const { ctx, page: p, errors } = await open({ w: 390, h: 844, phone: true });
162
- const ph = await p.evaluate(() => ({ heads: document.querySelectorAll('#ibBody .tg-chd, #ibBody .tg-c').length, btn: document.querySelector('#bdColsw').hidden, bars: [...document.querySelectorAll('#ibBody .tg-bar')].map((b) => Math.round(b.getBoundingClientRect().height)), scroll: document.documentElement.scrollWidth <= innerWidth + 1 }));
163
+ const ph = await p.evaluate(() => ({ heads: document.querySelectorAll('#ibBody .tg-chd, #ibBody .tg-c').length, btn: !document.querySelector('#bdColsMenu'), bars: [...document.querySelectorAll('#ibBody .tg-bar')].map((b) => Math.round(b.getBoundingClientRect().height)), scroll: document.documentElement.scrollWidth <= innerWidth + 1 }));
163
164
  ok('N the phone has no columns and no Columns button; its bars are 20 px; no sideways page scroll', ph.heads === 0 && ph.btn && ph.bars.length && ph.bars.every((x) => x === 20) && ph.scroll, JSON.stringify(ph));
164
165
  ok('N no page error on the phone', errors.length === 0, errors.join(' | '));
165
166
  await ctx.close();
@@ -87,13 +87,13 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
87
87
  prods: [...document.querySelectorAll('#ibBody .bt-prd .bd-prdb span:not(.bd-ti):not(.bd-gd):not(.n)')].map((b) => b.textContent),
88
88
  after: [...document.querySelectorAll('#ibBody .bt-gr .bt-nm b')].map((b) => b.textContent),
89
89
  text: document.querySelector('#ibBody').textContent,
90
- grp: !document.querySelector('#bdGrpw').hidden && !!document.querySelector('#bdGroup') && !document.querySelector('#bdGroup').classList.contains('on'),
90
+ grp: !document.querySelector('#bdGrpw'),
91
91
  }));
92
92
  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));
93
93
  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);
94
94
  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));
95
95
  ok('G its initiatives on this board sit under it, A to Z while the program has no order (option A); the rest of the product follows under the product head', tr.kids.join() === 'Descope feature parity,Legacy IdP sunset' && tr.prods.join() === 'IDPF' && tr.after.length === 2 && !tr.after.some((t) => tr.kids.includes(t)), JSON.stringify(tr));
96
- ok('G there is no "Not in a program" group, and a desktop has its own Group button, plain while Programs first is on (batch 28 item 3, BhA)', !/Not in a program/.test(tr.text) && tr.grp);
96
+ ok('G there is no "Not in a program" group, and no Group button of its own: Group is in the tune button (UI grill U2)', !/Not in a program/.test(tr.text) && tr.grp);
97
97
 
98
98
  await p.click('#ibBody .bt-pg [data-prog]');
99
99
  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(() => !/Initiative/.test(((window.czViewer && window.czViewer.current()) || {}).kind || '')), JSON.stringify(await events(p)));
@@ -112,17 +112,15 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
112
112
  await p.click('#ibBody .bt-pg [data-fold]'); await p.click('#ibBody .bt-prd [data-fold]');
113
113
  ok('F unfolding shows the rows again', await p.evaluate(() => document.querySelectorAll('#ibBody .bt-kid').length === 2 && document.querySelectorAll('#ibBody .bt-gr').length === 2));
114
114
 
115
- // By product (PgBoardProduct): from the Group button, no new filter row; a desktop's Filter does not say it again (say it once)
115
+ // By product (PgBoardProduct): Group is a part of the tune button since UI grill U2 (no Group button of its own)
116
116
  await p.click('#bdFilter');
117
- ok('G a desktop\'s Filter holds no Group choice: the Group button has it', await p.evaluate(() => !!document.querySelector('#bdPop') && !document.querySelector('#bdPop [data-fgrp]')));
118
- await p.keyboard.press('Escape');
119
- await p.click('#bdGroup');
120
- ok('G the Group menu holds the two choices because a program holds rows here', await p.evaluate(() => [...document.querySelectorAll('#bdGrpMenu [data-grping]')].map((b) => b.dataset.grping + (b.getAttribute('aria-checked') === 'true' ? '*' : '')).join() === 'program*,product'));
121
- await p.click('#bdGrpMenu [data-grping="product"]');
122
- 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') || {}).getAttribute('aria-label') || '', on: document.querySelector('#bdGroup').classList.contains('on'), st: localStorage.getItem('pmos.board.grouping') }));
123
- ok('G By product draws the product only; a program member carries the small layers icon named for its program; the Group button turns blue; 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.on && bp.st === 'product', JSON.stringify(bp));
124
- await p.click('#bdGroup'); await p.click('#bdGrpMenu [data-grping="program"]');
125
- ok('G Programs first comes back from the same menu', await p.evaluate(() => !!document.querySelector('#ibBody .bt-pg') && localStorage.getItem('pmos.board.grouping') === 'program'));
117
+ ok('G the tune button holds the two Group choices 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'));
118
+ await p.click('#bdPop [data-fgrp="product"]'); await p.keyboard.press('Escape'); await p.waitForTimeout(150);
119
+ 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, st: localStorage.getItem('pmos.board.grouping') }));
120
+ 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') && bp.st === 'product', JSON.stringify(bp));
121
+ await p.click('#bdFilter'); await p.click('#bdPop [data-fgrp="program"]'); await p.keyboard.press('Escape');
122
+ await p.waitForTimeout(250);
123
+ ok('G Programs first comes back from the same place', await p.evaluate(() => !!document.querySelector('#ibBody .bt-pg') && localStorage.getItem('pmos.board.grouping') === 'program'));
126
124
  ok('the page threw nothing', !errors.length, errors.join('\n'));
127
125
  await ctx.close();
128
126
  }
@@ -142,13 +140,13 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
142
140
  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('')),
143
141
  ms: (document.querySelector('#ibBody .bd-lh.pg .bd-pm2') || {}).textContent || '',
144
142
  heads: [...document.querySelectorAll('#ibBody .bd-kh')].map((h) => h.dataset.colfold),
145
- strips: [...document.querySelectorAll('#ibBody .bd-kstrip')].map((h) => h.dataset.colfold + ':' + h.querySelector('b').textContent),
143
+ strips: [...document.querySelectorAll('#ibBody .bd-kstrip')].map((h) => h.dataset.colfold + ':' + ((h.querySelector('b') || {}).textContent || '')),
146
144
  cards: [...document.querySelectorAll('#ibBody .bd-kc .bd-bc .t')].map((b) => b.textContent),
147
145
  cols: getComputedStyle(document.querySelector('#ibBody .bd-kb')).gridTemplateColumns.split(' ').length,
148
146
  }));
149
147
  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));
150
148
  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);
151
- 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));
149
+ ok('K the columns with cards are open; empty ones (no 0: UI grill U2), and Monitor and Evaluate with nothing for you, are strips with their count', k.heads.join() === 'triage,discover' && k.strips.join() === 'plan:,prioritize:,build:,deliver:,monitor:1,evaluate:20' && k.cols === 8, JSON.stringify(k));
152
150
  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));
153
151
  await p.click('#ibBody .bd-kstrip[data-colfold="plan"]');
154
152
  await p.click('#ibBody .bd-kh[data-colfold="triage"]');
@@ -305,7 +303,7 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
305
303
  // from a place in the middle of the range (at the far end the next span's track can be shorter and stops short)
306
304
  await p.evaluate(() => { const sc = document.querySelector('#ibBody .tg-sc'); sc.scrollLeft = (sc.scrollWidth - sc.clientWidth) / 2; }); await p.waitForTimeout(200);
307
305
  const mid = (await geo()).mid;
308
- await p.click('#bdSpansBtn'); await p.click('#bdSpans [data-sp="half"]'); await p.waitForTimeout(250);
306
+ await p.click('#bdView'); await p.click('#bdViewMenu [data-spick="half"]'); await p.keyboard.press('Escape'); await p.waitForTimeout(250);
309
307
  g = await geo();
310
308
  ok('S switching span keeps the date in the middle in the middle', g.span === 'half' && Math.abs(g.mid - mid) < 3 * DAY, JSON.stringify({ mid: new Date(mid), now: new Date(g.mid) }));
311
309
  // the Monitor and Evaluate rows (batch 8 item 2) widen the range, so the middle can hold today: scroll back to the end, away from today
@@ -313,14 +311,14 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
313
311
  await p.click('#ibBody .tg-tback'); await p.waitForTimeout(800);
314
312
  g = await geo();
315
313
  ok('S the Today button scrolls back to today, a quarter of the way in, and hides', Math.abs(g.at - 0.25) < 0.03 && !g.back.length, JSON.stringify(g));
316
- await p.click('#bdSpansBtn'); await p.click('#bdSpans [data-sp="y2"]'); await p.waitForTimeout(250);
314
+ await p.click('#bdView'); await p.click('#bdViewMenu [data-spick="y2"]'); await p.keyboard.press('Escape'); await p.waitForTimeout(250);
317
315
  g = await geo();
318
316
  ok('S with today in view, a span switch keeps today in its place', g.span === 'y2' && (g.l === 0 || Math.abs(g.at - 0.25) < 0.03), JSON.stringify(g));
319
317
  const lab2 = await p.evaluate(() => [...document.querySelectorAll('#ibBody .tg-endl, #ibBody .tg-pdl')].map((e) => e.textContent));
320
318
  ok('S 2 yr labels say what lands, then when, with the year only when it is not this year (batch 13 item 4)', lab2.length > 0 && lab2.every((x) => /^[A-Z].* [A-Z][a-z]{2} \d{1,2}( ’\d\d)?$/.test(x)) && lab2.some((x) => / ’27$/.test(x)), JSON.stringify(lab2));
321
- await p.click('#bdSpansBtn'); await p.click('#bdSpans [data-sp="sprint"]'); await p.waitForTimeout(200);
319
+ await p.click('#bdView'); await p.click('#bdViewMenu [data-spick="sprint"]'); await p.keyboard.press('Escape'); await p.waitForTimeout(200);
322
320
  await p.evaluate(() => { const sc = document.querySelector('#ibBody .tg-sc'); if (sc) sc.scrollLeft = 0; });
323
- await p.click('#bdSpansBtn'); await p.click('#bdSpans [data-sp="quarter"]'); await p.waitForTimeout(250);
321
+ await p.click('#bdView'); await p.click('#bdViewMenu [data-spick="quarter"]'); await p.keyboard.press('Escape'); await p.waitForTimeout(250);
324
322
  g = await geo();
325
323
  ok('S Sprint does not scroll, and going from Sprint to Quarter opens at today', !(await p.evaluate(() => !!document.querySelector('.sp .tg-sc'))) && Math.abs(g.at - 0.25) < 0.03, JSON.stringify(g));
326
324
  // a drag on empty track scrolls; a press on a bar still opens the initiative
@@ -331,7 +329,7 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
331
329
  ok('S a drag on empty track scrolls the timeline', Math.abs(g.l - l1 - 200) < 12, JSON.stringify({ l1, l: g.l }));
332
330
  // Find scrolls an off-screen bar into view and tints its row (TsCEdges 4)
333
331
  await p.evaluate(() => { document.querySelector('#ibBody .tg-sc').scrollLeft = 0; }); await p.waitForTimeout(150);
334
- await p.click('#bdFind'); await p.fill('#bdQ', 'Legacy'); await p.keyboard.press('Enter'); await p.waitForTimeout(700);
332
+ await p.click('#bdFind'); await p.waitForSelector('#evSearch:not([hidden])'); await p.fill('#evQ', 'Legacy'); await p.waitForTimeout(400); await p.keyboard.press('Enter'); await p.waitForTimeout(700);
335
333
  const f = await p.evaluate(() => { const row = [...document.querySelectorAll('#ibBody .tg-r[data-row]')].find((r) => /Legacy IdP sunset/.test(r.textContent)); const sc = document.querySelector('#ibBody .tg-sc'), b = row.querySelector('.tg-bar').getBoundingClientRect(), s = sc.getBoundingClientRect(); return { tint: row.classList.contains('tint'), inView: b.right > s.left + 250 && b.left < s.right }; });
336
334
  ok('S Find scrolls the bar into view and tints its row for a moment', f.tint && f.inView, JSON.stringify(f));
337
335
  ok('S the scroll threw nothing', !errors.length, errors.join('\n'));
@@ -341,7 +339,7 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
341
339
  // the phone (TsCPhone, TsCPhoneSpan; batch 28 item 3, BhA): the timeline is a view; the spans sit in the view button's menu
342
340
  const { ctx, page: p, errors } = await open({ view: 'time', w: 390, h: 844, store: { 'pmos.board.pview': 'time', 'pmos.board.span': 'quarter' } });
343
341
  await p.click('#bdView');
344
- const ph = await p.evaluate(() => ({ spans: !document.querySelector('#bdSpans').hidden, pick: (document.querySelector('#bdViewMenu [data-spick][aria-checked="true"]') || {}).textContent || '', rows: [...document.querySelectorAll('#ibBody .tgq-r .tgq-n b')].map((b) => b.textContent), names: document.querySelectorAll('#ibBody .tgq-r[data-row] .tgq-n').length }));
342
+ const ph = await p.evaluate(() => ({ spans: !!document.querySelector('#bdSpans'), pick: (document.querySelector('#bdViewMenu [data-spick][aria-checked="true"]') || {}).textContent || '', rows: [...document.querySelectorAll('#ibBody .tgq-r .tgq-n b')].map((b) => b.textContent), names: document.querySelectorAll('#ibBody .tgq-r[data-row] .tgq-n').length }));
345
343
  ok('S phone: the spans in the view button, no span row; each row carries its name above its bar, Monitor and Evaluate rows too (batch 8 item 2), and the undated one as a "No dates" row (batch 26 item 8)', !ph.spans && ph.pick === 'Quarter' && ph.names === 4 && ph.rows.includes('Usage-based billing') && ph.rows.includes('Legacy IdP sunset') && ph.rows.includes('Inline login for eShop checkout'), JSON.stringify(ph));
346
344
  await p.click('#bdViewMenu [data-spick="year"]'); await p.waitForTimeout(200);
347
345
  ok('S phone: a span chip changes the span', await p.evaluate(() => document.querySelector('#ibBody .tg-s').dataset.span === 'year' && document.querySelector('#bdViewMenu [data-spick="year"]').getAttribute('aria-checked') === 'true' && localStorage.getItem('pmos.board.span') === 'year'));
@@ -385,7 +383,7 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
385
383
  kids: [...document.querySelectorAll('#ibBody .bt-kid .bt-nm b')].map((b) => b.textContent),
386
384
  prods: [...document.querySelectorAll('#ibBody .bt-prd .bd-prdb span:not(.bd-ti):not(.bd-gd):not(.n)')].map((b) => b.textContent),
387
385
  docs: !!document.querySelector('#tabDocs'), asks: !!document.querySelector('#chAsks'), nw: document.querySelector('#newIni').hidden,
388
- chips: [...document.querySelectorAll('#bdChipset [id], #bdJiraw [id]')].map((c) => c.id).filter(Boolean),
386
+ chips: [...document.querySelectorAll('#bdChipset [id]')].map((c) => c.id).filter(Boolean),
389
387
  }));
390
388
  ok('A All products is saved, the address stays plain and the chip says All', a.url === '' && /^All/.test(a.crumb) && a.label === 'Products: all 2' && JSON.stringify(pk.posts) === '[["idpf","microsites"]]', JSON.stringify({ a, posts: pk.posts }));
391
389
  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));
@@ -393,7 +391,7 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
393
391
  ok('A New initiative and Jira work across products (the Board has no Documents tab, batch 24 item 7); only the sprint waits for a product to be picked', !a.docs && !a.nw && a.chips.includes('chJira') && !a.chips.includes('chSprint'), JSON.stringify(a));
394
392
  const other = await p.evaluate(() => { const b = [...document.querySelectorAll('#ibBody .bt-kid .bt-nm')].pop(); return b ? b.dataset.key : null; });
395
393
  ok('A each row keeps its own product in its key', /^[a-z-]+\//.test(other || ''), other);
396
- await p.click('#ibTabs [data-v="list"]');
394
+ await p.evaluate(() => document.querySelector('#bdViewMenu [data-pv="list"]').click());
397
395
  await p.waitForTimeout(300);
398
396
  const L = await p.evaluate(() => [...document.querySelectorAll('#ibBody .bd-lt .bd-pt:first-of-type .bd-ell')].map((x) => x.textContent));
399
397
  ok('A List: the Product column names each row\'s own product', new Set(L).size === 2, JSON.stringify(L));
@@ -447,7 +445,7 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
447
445
  /* Z zero is silence; the phone */
448
446
  {
449
447
  const { ctx, page: p } = await open({ programs: [] });
450
- 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));
448
+ 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')));
451
449
  await ctx.close();
452
450
  const R = await open({ w: 390, h: 844 });
453
451
  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'));
@@ -50,40 +50,44 @@ const ok = (name, cond, extra = '') => { n++; if (!cond) bad++; console.log(`${c
50
50
  return { ctx, p, reqs, errs };
51
51
  };
52
52
  const pop = (p) => p.locator('.bppop');
53
+ // Publish a read-only copy is a row of the Board's ⋯ since UI grill U2; its popover opens under ⋯
54
+ const pubOpen = async (p) => { await p.click('#moreBtn'); await p.click('#bdPublish'); };
55
+ const isOff = (p) => p.evaluate(() => { const b = document.querySelector('#bdPublish'); return !b || b.hidden; });
53
56
 
54
57
  console.log('A the button');
55
58
  W.links = []; W.host = 'boards.test';
56
59
  let s = await open(1440, 900, '/premium-board.html?ws=idpf&board=idpf');
57
- ok('A1 the Publish button is drawn on a single board, with a label that says what it does', await s.p.locator('#bdPublish').isVisible() && /Publish a read-only copy/.test(await s.p.locator('#bdPublish').getAttribute('aria-label')));
60
+ await s.p.click('#moreBtn');
61
+ ok('A1 Publish a read-only copy is a row of ⋯ on a single board, with a label that says what it does', await s.p.locator('#bdPublish').isVisible() && /Publish a read-only copy/.test(await s.p.locator('#bdPublish').getAttribute('aria-label')));
58
62
  ok('A2 with no open links there is no count (zero is silence)', await s.p.locator('#bdPublish .bpn').isHidden());
59
63
  await s.ctx.close();
60
64
  W.links = LINKS; s = await open(1440, 900, '/premium-board.html?ws=idpf&board=idpf'); await s.p.waitForTimeout(600);
61
65
  ok('A3 with open links the button shows how many, and the label says so', (await s.p.locator('#bdPublish .bpn').textContent()) === '2' && /2 open links/.test(await s.p.locator('#bdPublish').getAttribute('aria-label')), await s.p.locator('#bdPublish').getAttribute('aria-label'));
62
66
  await s.ctx.close();
63
67
  s = await open(1440, 900, '/premium-board.html?ws=idpf&board=idpf&all=1');
64
- ok('A4 the All products page does not draw it', await s.p.locator('#bdPublish').isHidden());
68
+ ok('A4 the All products page does not draw it', await isOff(s.p));
65
69
  await s.ctx.close();
66
70
  {
67
71
  const pack = Pack.buildPack({ ws: 'idpf', board: 'idpf', selection: [{ kind: 'product', id: 'idpf' }], meta: { by: 'W', at: 'x', ends: 'y', viewer: 'test' }, answers: { [BOARD]: { ok: true, state: 'ready', model, as_of: 1 }, '/api/programs': { ok: true, programs: F.programs() } } });
68
72
  const ctx = await browser.newContext({ viewport: { width: 1440, height: 900 } }); const reqs = []; ctx.on('request', (r) => reqs.push(new URL(r.url()).pathname));
69
73
  await ctx.route((u) => new URL(u).pathname === '/__pack/p.json', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify(pack) }));
70
74
  const p = await ctx.newPage(); await p.goto(T.BASE + '/premium-board.html?ws=idpf&board=idpf&pack=/__pack/p.json'); await p.waitForSelector('.tg-n.ini2', { timeout: 15000 }).catch(() => {}); await p.waitForTimeout(600);
71
- ok('A5 the read-only Board does not draw it and asks nothing of /api/board-publish', (await p.locator('#bdPublish').isHidden()) && !reqs.some((u) => /board-publish/.test(u)), reqs.filter((u) => /board-publish/.test(u)).join(','));
75
+ ok('A5 the read-only Board does not draw it and asks nothing of /api/board-publish', (await isOff(p)) && !reqs.some((u) => /board-publish/.test(u)), reqs.filter((u) => /board-publish/.test(u)).join(','));
72
76
  await ctx.close();
73
77
  }
74
78
 
75
79
  {
76
80
  W.links = []; W.host = 'boards.test';
77
81
  const s6 = await open(1440, 900, '/premium-board.html?ws=idpf&board=idpf');
78
- await s6.p.locator('#bdPublish').click(); await s6.p.waitForSelector('.bppop', { timeout: 5000 }).catch(() => {}); await s6.p.waitForTimeout(300);
79
- const g = await s6.p.evaluate(() => { const m = document.querySelector('.bppop').getBoundingClientRect(), b = document.querySelector('#bdPublish').getBoundingClientRect(); return { top: m.top, bottom: m.bottom, right: m.right, left: m.left, btnBottom: b.bottom, h: innerHeight, w: innerWidth }; });
80
- ok('A6 the popover opens under the button and inside the viewport, not below the fold', g.top >= g.btnBottom && g.top < g.btnBottom + 40 && g.bottom <= g.h && g.left >= 0 && g.right <= g.w, JSON.stringify(g));
82
+ await pubOpen(s6.p); await s6.p.waitForSelector('.bppop', { timeout: 5000 }).catch(() => {}); await s6.p.waitForTimeout(300);
83
+ const g = await s6.p.evaluate(() => { const m = document.querySelector('.bppop').getBoundingClientRect(), b = document.querySelector('#moreBtn').getBoundingClientRect(); return { top: m.top, bottom: m.bottom, right: m.right, left: m.left, btnBottom: b.bottom, h: innerHeight, w: innerWidth }; });
84
+ ok('A6 the popover opens under ⋯ and inside the viewport, not below the fold', g.top >= g.btnBottom && g.top < g.btnBottom + 40 && g.bottom <= g.h && g.left >= 0 && g.right <= g.w, JSON.stringify(g));
81
85
  await s6.ctx.close();
82
86
  }
83
87
 
84
88
  console.log('B no host');
85
89
  W.links = []; W.host = null; W.settings = []; W.settingsAnswer = null;
86
- s = await open(1440, 900, '/premium-board.html?ws=idpf&board=idpf'); await s.p.click('#bdPublish'); await s.p.waitForSelector('#bpHost');
90
+ s = await open(1440, 900, '/premium-board.html?ws=idpf&board=idpf'); await pubOpen(s.p); await s.p.waitForSelector('#bpHost');
87
91
  ok('B1 with no host the popover says what is needed and asks for the address in place, with no Publish button', /Add the board host/.test(await pop(s.p).textContent()) && await s.p.locator('#bpHost').isVisible() && (await pop(s.p).locator('[data-bp="make"]').count()) === 0);
88
92
  W.settingsAnswer = { ok: false, error: 'Use an https address with no path, such as https://boards.example.com.' };
89
93
  await s.p.fill('#bpHost', 'http://example.com'); await s.p.click('[data-bp="savehost"]'); await s.p.waitForSelector('.bperr');
@@ -97,7 +101,7 @@ const ok = (name, cond, extra = '') => { n++; if (!cond) bad++; console.log(`${c
97
101
 
98
102
  console.log('C the form');
99
103
  W.links = []; W.host = 'boards.test'; W.posts = [];
100
- s = await open(1440, 900, '/premium-board.html?ws=idpf&board=idpf'); await s.p.click('#bdPublish'); await s.p.waitForSelector('[data-bp="make"]');
104
+ s = await open(1440, 900, '/premium-board.html?ws=idpf&board=idpf'); await pubOpen(s.p); await s.p.waitForSelector('[data-bp="make"]');
101
105
  ok('C1 the board\'s product is picked, its programs are offered, and the note names the host and what leaves', (await s.p.locator('[data-bp-sel="product:idpf"]').getAttribute('aria-pressed')) === 'true' && (await s.p.locator('[data-bp-sel="program:project-ascent"]').getAttribute('aria-pressed')) === 'false' && /boards\.test/.test(await s.p.locator('.bphost').textContent()) && /titles, stages, dates, owners and task names/.test(await s.p.locator('.bphost').getAttribute('title')));
102
106
  ok('C2 the password is on with a generated one, and Ends is 7 days', (await s.p.locator('[data-bp="pw"]').getAttribute('aria-checked')) === 'true' && (await s.p.inputValue('#bpPass')) === 'harbor-lime-47' && (await s.p.locator('[data-bp-days="7"]').getAttribute('aria-pressed')) === 'true');
103
107
  await s.p.click('[data-bp-sel="product:idpf"]');
@@ -119,14 +123,14 @@ const ok = (name, cond, extra = '') => { n++; if (!cond) bad++; console.log(`${c
119
123
  await s.ctx.grantPermissions(['clipboard-read', 'clipboard-write']).catch(() => {});
120
124
  await s.p.click('[data-bp="copy"]'); await s.p.waitForTimeout(300);
121
125
  ok('D3 Copy says it copied (or says how to copy by hand)', /Copied|Select the text/.test(await s.p.locator('[data-bp="copy"]').getAttribute('aria-label')));
122
- await s.p.keyboard.press('Escape'); await s.p.click('#bdPublish'); await s.p.waitForSelector('[data-bp="make"]');
126
+ await s.p.keyboard.press('Escape'); await pubOpen(s.p); await s.p.waitForSelector('[data-bp="make"]');
123
127
  ok('D4 opening it again starts a new form with a generated password', (await s.p.locator('#bpPass').count()) === 1);
124
128
  await s.p.click('[data-bp="pw"]'); await s.p.click('[data-bp="make"]'); await s.p.waitForSelector('[data-bp="copy"]');
125
129
  ok('D5 with the password off the request carries none, and the page shows only the link', W.posts[W.posts.length - 1].body.password === '' && (await s.p.locator('[data-bp="copy"]').getAttribute('aria-label')) === 'Copy link' && (await pop(s.p).locator('.bplnk .bpline').count()) === 1);
126
130
  await s.ctx.close();
127
131
 
128
132
  console.log('E problems');
129
- W.links = []; s = await open(1440, 900, '/premium-board.html?ws=idpf&board=idpf'); await s.p.click('#bdPublish'); await s.p.waitForSelector('[data-bp="make"]');
133
+ W.links = []; s = await open(1440, 900, '/premium-board.html?ws=idpf&board=idpf'); await pubOpen(s.p); await s.p.waitForSelector('[data-bp="make"]');
130
134
  W.publish = { status: 422, body: { ok: false, error: 'This board holds what looks like a secret (aws-access-key). Remove it, then publish again.', secrets: ['aws-access-key'] } };
131
135
  await s.p.fill('#bpTeam', 'Product'); await s.p.click('[data-bp="make"]'); await s.p.waitForSelector('.bperr');
132
136
  ok('E1 a refusal shows the plain sentence and the form stays filled', /aws-access-key/.test(await s.p.locator('.bperr').textContent()) && (await s.p.inputValue('#bpTeam')) === 'Product' && await s.p.locator('[data-bp-sel="product:idpf"]').isVisible());
@@ -137,10 +141,10 @@ const ok = (name, cond, extra = '') => { n++; if (!cond) bad++; console.log(`${c
137
141
 
138
142
  console.log('F open links');
139
143
  W.links = LINKS.map((l) => Object.assign({}, l)); W.posts = [];
140
- s = await open(1440, 900, '/premium-board.html?ws=idpf&board=idpf'); await s.p.click('#bdPublish'); await s.p.waitForSelector('[data-bp="shared"]');
144
+ s = await open(1440, 900, '/premium-board.html?ws=idpf&board=idpf'); await pubOpen(s.p); await s.p.waitForSelector('[data-bp="shared"]');
141
145
  ok('F1 the open links are not listed here: one row says how many', (await pop(s.p).locator('[data-bp-re], [data-bp-off]').count()) === 0 && /2 open links/.test(await s.p.locator('[data-bp="shared"]').textContent()));
142
146
  await s.p.click('[data-bp="shared"]'); await s.p.waitForTimeout(400);
143
- ok('F2 the row closes the popover and opens the Shared tab, where the links are managed', (await pop(s.p).count()) === 0 && (await s.p.locator('#tabShared').getAttribute('aria-pressed')) === 'true');
147
+ ok('F2 the row closes the popover and opens the Shared tab, where the links are managed', (await pop(s.p).count()) === 0 && (await s.p.locator('#cShared').isVisible()));
144
148
  await s.ctx.close();
145
149
 
146
150
  console.log('G a phone');
@@ -154,10 +158,10 @@ const ok = (name, cond, extra = '') => { n++; if (!cond) bad++; console.log(`${c
154
158
  await s.ctx.close();
155
159
 
156
160
  console.log('H closing');
157
- W.links = []; s = await open(1440, 900, '/premium-board.html?ws=idpf&board=idpf'); await s.p.click('#bdPublish'); await s.p.waitForSelector('[data-bp="make"]');
161
+ W.links = []; s = await open(1440, 900, '/premium-board.html?ws=idpf&board=idpf'); await pubOpen(s.p); await s.p.waitForSelector('[data-bp="make"]');
158
162
  await s.p.keyboard.press('Escape'); await s.p.waitForTimeout(200);
159
- ok('H1 Escape closes it and puts the focus back on the button', (await pop(s.p).count()) === 0 && (await s.p.evaluate(() => document.activeElement && document.activeElement.id)) === 'bdPublish');
160
- await s.p.click('#bdPublish'); await s.p.waitForSelector('[data-bp="make"]'); await s.p.mouse.click(5, 400); await s.p.waitForTimeout(200);
163
+ ok('H1 Escape closes it and puts the focus back on ⋯', (await pop(s.p).count()) === 0 && (await s.p.evaluate(() => document.activeElement && document.activeElement.id)) === 'moreBtn');
164
+ await pubOpen(s.p); await s.p.waitForSelector('[data-bp="make"]'); await s.p.mouse.click(5, 400); await s.p.waitForTimeout(200);
161
165
  ok('H2 a press outside closes it', (await pop(s.p).count()) === 0);
162
166
  ok('H3 no page error in any section', s.errs.length === 0, s.errs.join(' | '));
163
167
  await s.ctx.close();
@@ -52,32 +52,35 @@ const iso = (ms) => new Date(Date.now() + ms).toISOString();
52
52
  const errs = []; const p = await ctx.newPage(); p.on('pageerror', (e) => errs.push(e.message));
53
53
  const reqs = []; ctx.on('request', (r) => reqs.push(new URL(r.url()).pathname));
54
54
  await p.addInitScript(() => { try { localStorage.setItem('pmos.board.view', 'list'); localStorage.setItem('pmos.board.grouping', 'program'); } catch (e) { /* none */ } });
55
- await p.goto(T.BASE + url); await p.waitForSelector('#tabShared', { timeout: 15000 }).catch(() => {}); await p.waitForTimeout(700);
55
+ await p.goto(T.BASE + url); await p.waitForSelector('#bdView', { timeout: 15000 }).catch(() => {}); await p.waitForTimeout(700);
56
56
  return { ctx, p, errs, reqs };
57
57
  };
58
58
  const reset = (o = {}) => { Object.assign(W, { yours: [], teams: [], names: [], posts: [], reads: 0, joinAnswer: null }, o); };
59
59
 
60
+ // Shared with me is the View chip's last item since UI grill U2; its number sits beside its words
61
+ const shared = async (p) => { await p.click('#bdView'); await p.click('#bdViewMenu [data-vshared]'); };
62
+ const shN = (p) => p.evaluate(() => { document.querySelector('#bdView').click(); const k = document.querySelector('#bdViewMenu [data-vshared] .k'); const t = k ? k.textContent : ''; document.querySelector('#bdView').click(); return t; });
60
63
  console.log('A the tab and its number');
61
64
  reset();
62
65
  let s = await open(1440, 900, '/premium-board.html?ws=idpf&board=idpf');
63
- ok('A1 Shared is one button in the Board\'s row (batch 28 item 3), and has no number when there is nothing', await s.p.locator('#tabShared').isVisible() && /^Shared\s*$/.test((await s.p.locator('#tabShared').textContent()).trim()));
64
- ok('A2 opening the tab with nothing joined asks nothing of any host beyond the read, and shows one sentence and the invite field', await (async () => { await s.p.click('#tabShared'); await s.p.waitForSelector('#shInvite'); return /Boards your teams share show up here/.test(await s.p.locator('#cShared').textContent()) && (await s.p.locator('#cShared .bdsh-card').count()) === 0; })());
65
- ok('A3 the initiatives are hidden while it is open, and pressing Shared again brings them back', await s.p.locator('#cIni').isHidden() && (await s.p.locator('#tabShared').getAttribute('aria-pressed')) === 'true' && (await (async () => { await s.p.click('#tabShared'); return (await s.p.locator('#cShared').isHidden()) && (await s.p.locator('#cIni').isVisible()); })()));
66
+ ok('A1 Shared with me is the View chip\'s last item (UI grill U2), and has no number when there is nothing', (await s.p.evaluate(() => !!document.querySelector('#bdViewMenu [data-vshared]'))) && (await shN(s.p)) === '');
67
+ ok('A2 opening the tab with nothing joined asks nothing of any host beyond the read, and shows one sentence and the invite field', await (async () => { await shared(s.p); await s.p.waitForSelector('#shInvite'); return /Boards your teams share show up here/.test(await s.p.locator('#cShared').textContent()) && (await s.p.locator('#cShared .bdsh-card').count()) === 0; })());
68
+ ok('A3 the initiatives are hidden while it is open, and pressing Shared with me again brings them back', await s.p.locator('#cIni').isHidden() && (await (async () => { await shared(s.p); return (await s.p.locator('#cShared').isHidden()) && (await s.p.locator('#cIni').isVisible()); })()));
66
69
  await s.ctx.close();
67
70
  reset({ yours: MINE, names: ['Product'] }); s = await open(1440, 900, '/premium-board.html?ws=idpf&board=idpf');
68
- ok('A4 at load the number is your own open links, from this computer only (no host was asked)', (await s.p.locator('#nShared').textContent()) === '2' && W.reads === 0, await s.p.locator('#nShared').textContent());
71
+ ok('A4 at load the number is your own open links, from this computer only (no host was asked)', (await shN(s.p)) === '2' && W.reads === 0, await shN(s.p));
69
72
  await s.ctx.close();
70
73
  {
71
74
  const pack = Pack.buildPack({ ws: 'idpf', board: 'idpf', selection: [{ kind: 'product', id: 'idpf' }], meta: { by: 'W', at: 'x', ends: 'y', viewer: 'test' }, answers: { [BOARD]: { ok: true, state: 'ready', model, as_of: 1 }, '/api/programs': { ok: true, programs: F.programs() } } });
72
75
  const ctx = await browser.newContext({ viewport: { width: 1440, height: 900 } }); const reqs = []; ctx.on('request', (r) => reqs.push(new URL(r.url()).pathname));
73
76
  await ctx.route((u) => new URL(u).pathname === '/__pack/p.json', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify(pack) }));
74
77
  const p = await ctx.newPage(); await p.goto(T.BASE + '/premium-board.html?ws=idpf&board=idpf&pack=/__pack/p.json'); await p.waitForSelector('.tg-n.ini2', { timeout: 15000 }).catch(() => {}); await p.waitForTimeout(600);
75
- ok('A5 the read-only Board does not draw the tab and asks nothing of /api/board-publish', (await p.locator('#tabShared').isHidden()) && !reqs.some((u) => /board-publish/.test(u)));
78
+ ok('A5 the read-only Board does not draw Shared with me and asks nothing of /api/board-publish', (await p.evaluate(() => !document.querySelector('#bdViewMenu [data-vshared]'))) && !reqs.some((u) => /board-publish/.test(u)));
76
79
  await ctx.close();
77
80
  }
78
81
 
79
82
  console.log('B join');
80
- reset(); s = await open(1440, 900, '/premium-board.html?ws=idpf&board=idpf'); await s.p.click('#tabShared'); await s.p.waitForSelector('#shInvite');
83
+ reset(); s = await open(1440, 900, '/premium-board.html?ws=idpf&board=idpf'); await shared(s.p); await s.p.waitForSelector('#shInvite');
81
84
  W.joinAnswer = { status: 400, body: { ok: false, error: 'This is not an invite link. It looks like https://boards.example.com/join#Team.password.' } };
82
85
  await s.p.fill('#shInvite', 'hello'); await s.p.click('[data-sh="join"]'); await s.p.waitForSelector('[role="alert"]');
83
86
  ok('B1 a refused invite shows the sentence under the field and keeps what was pasted', /not an invite link/.test(await s.p.locator('#cShared [role="alert"]').textContent()) && (await s.p.inputValue('#shInvite')) === 'hello' && W.posts[0].body.invite === 'hello');
@@ -87,11 +90,11 @@ const iso = (ms) => new Date(Date.now() + ms).toISOString();
87
90
  const last = W.posts[W.posts.length - 1].body;
88
91
  ok('B2 the typed way sends the host, team and password, and a lockout is shown with its minutes', last.host === 'https://boards.pm-os.app' && last.team === 'Product' && last.password === 'harbor-lime-47');
89
92
  W.joinAnswer = null; await s.p.click('[data-sh="paste"]'); await s.p.fill('#shInvite', 'https://boards.test/join#Product.harbor-lime-47'); await s.p.click('[data-sh="join"]'); await s.p.waitForSelector('.bdsh-list');
90
- ok('B3 a join that works reads the team and shows its list; the tab gets its number', (await s.p.locator('#nShared').textContent()) === '3' && /Joined Product/.test(await s.p.locator('#bdToast').textContent()), await s.p.locator('#nShared').textContent());
93
+ ok('B3 a join that works reads the team and shows its list; the tab gets its number', (await shN(s.p)) === '3' && /Joined Product/.test(await s.p.locator('#bdToast').textContent()), await shN(s.p));
91
94
  await s.ctx.close();
92
95
 
93
96
  console.log('C the list');
94
- reset({ yours: MINE, names: ['Product'], teams: [JSON.parse(JSON.stringify(TEAM_OK))] }); s = await open(1440, 900, '/premium-board.html?ws=idpf&board=idpf'); await s.p.click('#tabShared'); await s.p.waitForSelector('.bdsh-list');
97
+ reset({ yours: MINE, names: ['Product'], teams: [JSON.parse(JSON.stringify(TEAM_OK))] }); s = await open(1440, 900, '/premium-board.html?ws=idpf&board=idpf'); await shared(s.p); await s.p.waitForSelector('.bdsh-list');
95
98
  const chips = await s.p.locator('#cShared .bdsh-top .bd-chip').allTextContents();
96
99
  ok('C1 the chips are All, Yours and one per team; counts leave out an ended copy, and your own link published to a team is one copy, not two', JSON.stringify(chips.map((x) => x.trim())) === JSON.stringify(['All 4', 'Yours 2', 'Product 4']), JSON.stringify(chips));
97
100
  const names = await s.p.locator('#cShared .bdsh-list .bdsh-nm').allTextContents();
@@ -122,7 +125,7 @@ const iso = (ms) => new Date(Date.now() + ms).toISOString();
122
125
 
123
126
  console.log('D a team that cannot be read');
124
127
  const BAD = { team: 'Growth', host: 'boards.test', ok: false, kind: 'password', error: 'The team password no longer works. Ask for a new invite link.' };
125
- reset({ yours: [], names: ['Product', 'Growth'], teams: [JSON.parse(JSON.stringify(TEAM_OK)), BAD] }); s = await open(1440, 900, '/premium-board.html?ws=idpf&board=idpf'); await s.p.click('#tabShared'); await s.p.waitForSelector('.bdsh-ban');
128
+ reset({ yours: [], names: ['Product', 'Growth'], teams: [JSON.parse(JSON.stringify(TEAM_OK)), BAD] }); s = await open(1440, 900, '/premium-board.html?ws=idpf&board=idpf'); await shared(s.p); await s.p.waitForSelector('.bdsh-ban');
126
129
  ok('D1 the failing team shows one line that says why, with the key to paste a new invite; no old rows, and the other team still draws', /Growth cannot be read\. The team password no longer works/.test(await s.p.locator('.bdsh-ban').textContent()) && (await s.p.locator('#cShared .bdsh-list .bdsh-nm').count()) === 3 && (await s.p.locator('.bdsh-ban [data-sh="repaste"]').getAttribute('aria-label')) === 'Paste a new invite link');
127
130
  ok('D2 its chip has no count', (await s.p.locator('[data-sh-sel="Growth"]').textContent()).trim() === 'Growth');
128
131
  await s.p.click('.bdsh-ban .bdsh-ib'); await s.p.waitForSelector('#shInvite');
@@ -133,7 +136,7 @@ const iso = (ms) => new Date(Date.now() + ms).toISOString();
133
136
  await s.ctx.close();
134
137
 
135
138
  console.log('E leave');
136
- reset({ yours: [], names: ['Product'], teams: [JSON.parse(JSON.stringify(TEAM_OK))] }); s = await open(1440, 900, '/premium-board.html?ws=idpf&board=idpf'); await s.p.click('#tabShared'); await s.p.waitForSelector('.bdsh-list'); await s.p.click('[data-sh-sel="Product"]');
139
+ reset({ yours: [], names: ['Product'], teams: [JSON.parse(JSON.stringify(TEAM_OK))] }); s = await open(1440, 900, '/premium-board.html?ws=idpf&board=idpf'); await shared(s.p); await s.p.waitForSelector('.bdsh-list'); await s.p.click('[data-sh-sel="Product"]');
137
140
  ok('E1 a team\'s chip adds Paste a new invite link and Leave team', (await s.p.locator('.bdsh-tl .bdsh-ib').evaluateAll((els) => els.map((e) => e.getAttribute('aria-label')))).join('|') === 'Paste a new invite link|Leave team');
138
141
  await s.p.click('[data-sh-leave="Product"]');
139
142
  ok('E2 the first press asks once, says what leaving does, and sends nothing', (await s.p.locator('[data-sh-leave]').getAttribute('aria-label')) === 'Sure, leave Product' && /only forgets the team's password on this computer/.test(await s.p.locator('#cShared').textContent()) && !W.posts.some((x) => x.p.endsWith('/leave')));
@@ -144,7 +147,7 @@ const iso = (ms) => new Date(Date.now() + ms).toISOString();
144
147
  console.log('F reads');
145
148
  reset({ yours: [], names: ['Product'], teams: [JSON.parse(JSON.stringify(TEAM_OK))] }); s = await open(1440, 900, '/premium-board.html?ws=idpf&board=idpf');
146
149
  ok('F1 nothing is read from a host at load', W.reads === 0);
147
- await s.p.click('#tabShared'); await s.p.waitForSelector('.bdsh-list'); const first = W.reads; await s.p.waitForTimeout(1500);
150
+ await shared(s.p); await s.p.waitForSelector('.bdsh-list'); const first = W.reads; await s.p.waitForTimeout(1500);
148
151
  ok('F2 opening the tab reads once and nothing polls', first === 1 && W.reads === 1, W.reads);
149
152
  await s.p.locator('#cShared .bdsh-read [data-sh="refresh"]').click(); await s.p.waitForTimeout(500);
150
153
  ok('F3 Refresh reads again', W.reads === 2, W.reads);