create-pmos 0.397.0 → 0.399.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 (195) hide show
  1. package/package.json +25 -25
  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/briefing-premium-adddoc-test.js +105 -52
  8. package/workspace/briefing-premium-board-test.js +284 -128
  9. package/workspace/briefing-premium-calendar-2-test.js +135 -198
  10. package/workspace/briefing-premium-calendar-3-test.js +143 -418
  11. package/workspace/briefing-premium-calendar-test.js +85 -196
  12. package/workspace/briefing-premium-doc-edit-test.js +99 -83
  13. package/workspace/briefing-premium-initiative-test.js +175 -290
  14. package/workspace/briefing-premium-insights-test.js +414 -219
  15. package/workspace/briefing-premium-metrics-test.js +55 -97
  16. package/workspace/briefing-premium-products-test.js +44 -28
  17. package/workspace/briefing-premium-sources-test.js +70 -49
  18. package/workspace/briefing-premium-test.js +155 -648
  19. package/workspace/briefing-premium-work-test.js +88 -283
  20. package/workspace/changelog.json +24 -0
  21. package/workspace/ev-everywhere-test.js +210 -0
  22. package/workspace/fixtures/board-premium-trail.js +32 -0
  23. package/workspace/fixtures/premium-viewer-fixtures.js +187 -0
  24. package/workspace/guide/briefing-premium.md +3 -1
  25. package/workspace/guide/home.md +68 -0
  26. package/workspace/guide/index.md +1 -0
  27. package/workspace/lib/agent-roles.js +71 -0
  28. package/workspace/lib/board-grill.js +63 -0
  29. package/workspace/lib/board-premium.js +121 -24
  30. package/workspace/lib/board-trail.js +223 -0
  31. package/workspace/lib/home-work-item.js +58 -0
  32. package/workspace/lib/initiative-layout.js +77 -0
  33. package/workspace/lib/insights-goals.js +196 -0
  34. package/workspace/lib/insights-premium.js +64 -15
  35. package/workspace/lib/insights-records.js +115 -0
  36. package/workspace/lib/jira-tickets.js +1 -1
  37. package/workspace/lib/meeting-points.js +52 -0
  38. package/workspace/lib/news-for-you.js +88 -0
  39. package/workspace/lib/notes-series.js +29 -6
  40. package/workspace/lib/report-confirm.js +48 -0
  41. package/workspace/lib/route-modules.js +12 -0
  42. package/workspace/lib/routes-board-docs.js +46 -0
  43. package/workspace/lib/routes-board-grill.js +90 -0
  44. package/workspace/lib/routes-board-trail.js +33 -0
  45. package/workspace/lib/routes-home-desk.js +176 -0
  46. package/workspace/lib/routes-home-review.js +108 -0
  47. package/workspace/lib/routes-initiative-layout.js +57 -0
  48. package/workspace/lib/routes-insights-premium.js +16 -4
  49. package/workspace/lib/routes-insights-records.js +133 -0
  50. package/workspace/lib/routes-meeting-points.js +37 -0
  51. package/workspace/lib/routes-news.js +57 -0
  52. package/workspace/lib/routes-notes.js +3 -1
  53. package/workspace/lib/routes-report-confirm.js +31 -0
  54. package/workspace/lib/routes-search.js +38 -0
  55. package/workspace/lib/routes-viewer.js +108 -0
  56. package/workspace/lib/search-index.js +176 -0
  57. package/workspace/lib/transcript-steps.js +123 -0
  58. package/workspace/lib/viewer-meeting.js +205 -0
  59. package/workspace/lib/viewer-report.js +89 -0
  60. package/workspace/package-lock.json +2 -2
  61. package/workspace/package.json +1 -1
  62. package/workspace/premium-board-actions-test.js +128 -82
  63. package/workspace/premium-briefing-depth-test.js +104 -90
  64. package/workspace/premium-chat-attach-test.js +54 -63
  65. package/workspace/premium-chat-chart-tab-test.js +37 -37
  66. package/workspace/premium-chat-context-test.js +19 -18
  67. package/workspace/premium-chat-goal-view-test.js +23 -23
  68. package/workspace/premium-chat-notes-test.js +26 -31
  69. package/workspace/premium-chat-report-tab-test.js +46 -28
  70. package/workspace/premium-chat-term-test.js +16 -16
  71. package/workspace/premium-chat-viewer-test.js +60 -59
  72. package/workspace/premium-core-doc-issue-test.js +52 -43
  73. package/workspace/premium-html-viewer-test.js +14 -17
  74. package/workspace/premium-phone-card-test.js +10 -3
  75. package/workspace/premium-phone-room-test.js +41 -35
  76. package/workspace/premium-report-read-test.js +152 -197
  77. package/workspace/premium-viewer-download-test.js +19 -22
  78. package/workspace/premium-viewer-flicker-test.js +11 -16
  79. package/workspace/premium-viewer-share-test.js +6 -9
  80. package/workspace/premium-viewer-test.js +41 -60
  81. package/workspace/premium-vw-backlog-test.js +53 -33
  82. package/workspace/premium-vw-cal-test.js +97 -128
  83. package/workspace/premium-vw-copy-test.js +17 -33
  84. package/workspace/premium-vw-doc-test.js +17 -10
  85. package/workspace/premium-vw-item-test.js +50 -49
  86. package/workspace/premium-vw-jira-test.js +53 -27
  87. package/workspace/premium-vw-meet-test.js +115 -187
  88. package/workspace/premium-vw-notes-test.js +88 -109
  89. package/workspace/premium-vw-rec-test.js +71 -194
  90. package/workspace/premium-vw-slides-test.js +46 -50
  91. package/workspace/premium-welcome-test.js +3 -2
  92. package/workspace/premium-work-depth-test.js +61 -53
  93. package/workspace/public/pm/bd-acts.js +383 -0
  94. package/workspace/public/pm/bd-asks.js +261 -0
  95. package/workspace/public/pm/bd-pop.js +59 -0
  96. package/workspace/public/pm/bd-span.js +222 -82
  97. package/workspace/public/pm/bd-stages.js +25 -11
  98. package/workspace/public/pm/bd-views.js +169 -0
  99. package/workspace/public/pm/c3-doc-sheet.js +1 -1
  100. package/workspace/public/pm/c3-md.js +3 -395
  101. package/workspace/public/pm/c3-phone-detail.js +1 -1
  102. package/workspace/public/pm/c3-phone-model.js +3 -68
  103. package/workspace/public/pm/chat-term.js +3 -3
  104. package/workspace/public/pm/cozy-board.css +798 -230
  105. package/workspace/public/pm/cozy-ev.css +228 -0
  106. package/workspace/public/pm/cozy-evmodel.js +106 -0
  107. package/workspace/public/pm/cozy-evui.js +47 -0
  108. package/workspace/public/pm/cozy-home.css +570 -142
  109. package/workspace/public/pm/cozy-home.js +5 -3
  110. package/workspace/public/pm/cozy-insights.css +437 -170
  111. package/workspace/public/pm/cozy-md.js +396 -0
  112. package/workspace/public/pm/cozy-nav.js +104 -29
  113. package/workspace/public/pm/cozy-news.js +140 -0
  114. package/workspace/public/pm/cozy-placeholder.js +26 -0
  115. package/workspace/public/pm/cozy-search.js +203 -0
  116. package/workspace/public/pm/cozy-settings.js +198 -0
  117. package/workspace/public/pm/cozy-sources.js +89 -0
  118. package/workspace/public/pm/cozy-today.css +217 -0
  119. package/workspace/public/pm/cozy-viewer.css +3 -3
  120. package/workspace/public/pm/cozy-viewer.js +145 -0
  121. package/workspace/public/pm/cozy-vw-mtg.css +350 -0
  122. package/workspace/public/pm/cozy-vw-rp.css +152 -0
  123. package/workspace/public/pm/cozy-vw.css +485 -0
  124. package/workspace/public/pm/cozy.css +83 -1
  125. package/workspace/public/pm/home-adddoc.js +48 -0
  126. package/workspace/public/pm/home-app.js +1179 -0
  127. package/workspace/public/pm/home-around.js +413 -0
  128. package/workspace/public/pm/home-chat.js +512 -0
  129. package/workspace/public/pm/home-data.js +312 -0
  130. package/workspace/public/pm/home-dictate.js +54 -0
  131. package/workspace/public/pm/home-draft.js +68 -0
  132. package/workspace/public/pm/home-ini-model.js +190 -0
  133. package/workspace/public/pm/home-ini.css +171 -0
  134. package/workspace/public/pm/home-ini.js +456 -0
  135. package/workspace/public/pm/home-list.js +276 -0
  136. package/workspace/public/pm/home-more.js +132 -0
  137. package/workspace/public/pm/home-phone-card.js +109 -0
  138. package/workspace/public/pm/home-review.js +104 -0
  139. package/workspace/public/pm/home-task.js +67 -0
  140. package/workspace/public/pm/home-today.js +144 -0
  141. package/workspace/public/pm/home-work.js +547 -0
  142. package/workspace/public/pm/phone-moment.js +69 -0
  143. package/workspace/public/pm/pm-work-view.js +1 -1
  144. package/workspace/public/pm/premium-attach.js +4 -0
  145. package/workspace/public/pm/premium-board.js +548 -395
  146. package/workspace/public/pm/premium-chart-tab.js +109 -62
  147. package/workspace/public/pm/premium-deck.js +3 -3
  148. package/workspace/public/pm/premium-first.js +23 -21
  149. package/workspace/public/pm/premium-insights.js +1102 -581
  150. package/workspace/public/pm/premium-meeting.js +61 -549
  151. package/workspace/public/pm/premium-mtg-present.js +138 -0
  152. package/workspace/public/pm/premium-mtg-replay.js +142 -0
  153. package/workspace/public/pm/premium-notes.js +1 -1
  154. package/workspace/public/pm/premium-report-frame.css +20 -0
  155. package/workspace/public/pm/premium-report-read.js +669 -476
  156. package/workspace/public/pm/premium-report-tab.js +116 -67
  157. package/workspace/public/pm/premium-shell.js +76 -123
  158. package/workspace/public/pm/premium-viewer.js +22 -1
  159. package/workspace/public/pm/premium-vw-cal.js +277 -48
  160. package/workspace/public/pm/premium-vw-doc.css +6 -0
  161. package/workspace/public/pm/premium-vw-doc.js +40 -2
  162. package/workspace/public/pm/premium-vw-file.js +2 -2
  163. package/workspace/public/pm/premium-vw-meet.js +6 -83
  164. package/workspace/public/pm/premium-vw-mtg.js +958 -0
  165. package/workspace/public/pm/premium-vw-notes.js +116 -68
  166. package/workspace/public/pm/premium-vw-open.js +35 -0
  167. package/workspace/public/pm/premium-vw-page.js +16 -0
  168. package/workspace/public/pm/premium-vw-rec.js +11 -218
  169. package/workspace/public/pm/premium-vw-slides.css +5 -0
  170. package/workspace/public/pm/premium-vw-slides.js +44 -8
  171. package/workspace/public/pm/rp-parts.js +269 -0
  172. package/workspace/public/pm/term-view.js +22 -0
  173. package/workspace/public/premium-board.html +29 -70
  174. package/workspace/public/premium-initiative.html +8 -48
  175. package/workspace/public/premium-insights.html +26 -64
  176. package/workspace/public/premium-viewer.html +20 -0
  177. package/workspace/public/premium.html +18 -107
  178. package/workspace/r/m1.png +0 -0
  179. package/workspace/r/m2.png +0 -0
  180. package/workspace/r/m3.png +0 -0
  181. package/workspace/r/nl.png +0 -0
  182. package/workspace/server.js +18 -3
  183. package/workspace/test-files.json +1 -0
  184. package/workspace/test-lists/home-libs.json +9 -0
  185. package/workspace/test-lists/initiative-layout.json +9 -0
  186. package/workspace/test-lists/premium-report-read.json +1 -1
  187. package/workspace/test-lists/premium-uncovered-meetings.json +9 -0
  188. package/workspace/test-lists/premium-uncovered-reports.json +9 -0
  189. package/workspace/test-lists/premium-vw-agreed.json +9 -0
  190. package/workspace/test-lists/premium-vw-notes.json +1 -1
  191. package/workspace/test-lists/uf-everywhere.json +15 -0
  192. package/workspace/test-lists/uf-home.json +9 -0
  193. package/workspace/test-lists/uncovered-board.json +9 -0
  194. package/workspace/public/pm/premium-work.js +0 -729
  195. package/workspace/public/pm/premium.js +0 -1146
@@ -1,7 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  'use strict';
3
3
  /* premium-board-actions-test.js — the board presses of the premium Board and initiative pages (initiative premium-board-actions; planning/prd/premium-board-actions-prd.md A1 to A12).
4
- * A real server on a scratch `team` repository (planning/initiatives, pmos/state), never the PMOS checkout. The real pages press the real routes:
4
+ * A real server on a scratch `team` repository (planning/initiatives, pmos/state), never the PMOS checkout. The real pages press the real routes.
5
+ * Re-pointed for the uncovered-features designs (premium-uncovered-features: BdAsks, BdNew, BdGrill, BdActions): popovers and side panels, each
6
+ * press done at once with Undo, and the first questions of a new initiative (lib/routes-board-grill.js).
5
7
  * T triage (accept, decline) · N New initiative · M move and Undo · L hold, resume, cancel, reopen, archive, restore · I the initiative page's bar
6
8
  * S the PMOS-self board (a model answer, since only the embedded checkout is self) · P the POST allow-list and the refusals · F floors */
7
9
  const fs = require('fs');
@@ -44,7 +46,8 @@ const lines = (name) => {
44
46
  };
45
47
  /** A press on a choice chip inside the dialog's pane, as a click event on the element (Playwright's pointer check races the dialog's spring). */
46
48
  const tap = (pg, sel) => pg.$eval(sel, (b) => b.click());
47
- const ALLOWED = /^\/api\/(?:boards\/(?:asks\/(?:add|accept|decline)|move|archive)|lifecycle|briefing-premium\/note)$/;
49
+ // the Board's first questions (board-grill: start, file, answer, later) write only triage-answers.jsonl and the material folder; intake/draft only drafts
50
+ const ALLOWED = /^\/api\/(?:boards\/(?:asks\/(?:add|accept|decline)|move|archive)|lifecycle|briefing-premium\/note|board-grill\/(?:start|file|answer|later)|intake\/draft|initiative-layout)$/; // initiative-layout: the card's Moves on by itself switch (premium-uncovered-features)
48
51
 
49
52
  (async () => {
50
53
  const exe = findBrowser();
@@ -74,104 +77,145 @@ const ALLOWED = /^\/api\/(?:boards\/(?:asks\/(?:add|accept|decline)|move|archive
74
77
  };
75
78
  const P = await open('/premium-board.html');
76
79
  const p = P.page;
80
+ // re-pointed for the uncovered-features designs (premium-uncovered-features): the asks, the row menu, Find and Filter are popovers (#bdPop,
81
+ // BdAsks, BdActions); New initiative and Cancelled and archived are side panels; the toast is #bdToast with its Undo; the old dialog never opens.
77
82
  const listed = (id) => p.evaluate((x) => [...document.querySelectorAll('#ibBody .ini2')].some((b) => b.dataset.key === 'board:' + x), id);
78
- const toastIs = (re) => until(() => p.evaluate((s) => { const t = document.querySelector('#toast'); return t.classList.contains('on') && new RegExp(s).test(t.textContent) ? t.textContent : null; }, re.source));
79
- const dlgOn = async () => { const v = await until(() => p.evaluate(() => document.querySelector('#dlg').classList.contains('on'))); await sleep(800); return v; };
80
- const dlgOff = () => until(() => p.evaluate(() => !document.querySelector('#dlg').classList.contains('on')));
81
- ok('A2 the New asks card lists both asks with Accept and Decline', await until(() => p.evaluate(() => document.querySelectorAll('#cAsks .baa').length === 2 && document.querySelectorAll('#cAsks [data-ask^="acc:"]').length === 2)), await p.evaluate(() => (document.querySelector('#asksHost') || {}).textContent));
82
- ok('A2 an ask shows its source, not an invented name', await p.evaluate(() => /Email from Rina/.test(document.querySelector('#cAsks').textContent) && !/demo/i.test(document.querySelector('#cAsks').textContent)));
83
+ const toastIs = (re) => until(() => p.evaluate((s) => { const t = document.querySelector('#bdToast'); return t && !t.hidden && new RegExp(s).test(t.textContent) ? t.textContent : null; }, re.source));
84
+ const peekOn = (title) => until(() => p.evaluate((t) => { const k = document.querySelector('#peek'); return k && !k.hidden && (document.querySelector('#pkTitle') || {}).textContent === t && !k.querySelector('.bd-wtag'); }, title));
85
+ const popOn = (re) => until(() => p.evaluate((s) => { const k = document.querySelector('#bdPop'); return k && !k.hidden && new RegExp(s).test(k.textContent) ? k.textContent : null; }, re.source));
86
+ const noDlg = () => p.evaluate(() => !document.querySelector('#dlg.on'));
87
+ const acts = async (id) => { await until(() => listed(id), 30000); await p.click(`#ibBody .ini2[data-key="board:${id}"]`); await until(() => p.evaluate(() => !!document.querySelector('#peek [data-pk="acts"]'))); await p.click('#peek [data-pk="acts"]'); return until(() => p.evaluate(() => { const m = document.querySelector('#bdPop'); return !!m && !m.hidden && m.getAttribute('role') === 'menu'; })); };
88
+ const closeAll = async () => { for (let i = 0; i < 3; i++) { if (await p.evaluate(() => document.querySelector('#peek').hidden && (!document.querySelector('#bdPop') || document.querySelector('#bdPop').hidden))) return; await p.keyboard.press('Escape'); await sleep(100); } };
89
+ await until(() => p.evaluate(() => document.querySelectorAll('#ibBody .ini2').length > 0), 30000);
90
+ await p.click('#chAsks');
91
+ ok('A2 the New asks popover lists both asks with Accept and Decline (BdAsks)', await until(() => p.evaluate(() => document.querySelectorAll('#bdPop .bd-acard[data-ask]').length === 2 && document.querySelectorAll('#bdPop [data-askact="accept"]').length === 2 && document.querySelectorAll('#bdPop [data-askact="decline"]').length === 2)), await p.evaluate(() => (document.querySelector('#bdPop') || {}).textContent));
92
+ ok('A2 an ask shows its source and the product with the reason, not an invented name, and no "Waiting for design" tag', await p.evaluate(() => { const t = document.querySelector('#bdPop').textContent; return /Email from Rina/.test(t) && /Why: came in through Email from Rina/.test(t) && !/demo/i.test(t) && !document.querySelector('#bdPop .bd-wtag'); }));
83
93
 
84
94
  /* T triage */
85
- if (await p.evaluate(() => document.querySelector('#popAsks').hidden)) await p.click('#chAsks'); // the Agreed design keeps the asks behind the New asks chip (premium-agreed-design)
86
- await p.click(`#cAsks [data-ask="acc:${a1.body.ask.id}"]`); await dlgOn();
87
- const anc = await until(() => p.evaluate(() => { const s = document.querySelector('#paNA'); return s && s.tagName === 'SELECT' && !s.disabled ? [...s.options].map((o) => o.value) : null; }));
88
- ok('T1 Accept opens the form with the anchors the board declares', !!anc && anc.includes('health:tech'), JSON.stringify(anc));
89
- await p.fill('#paNT', ''); await p.click('#paNGo');
90
- ok('T2 an empty title is refused on the page, before any press', await p.evaluate(() => /Give it a title/.test(document.querySelector('#paNM').textContent)) && !P.posts.some((x) => x.path === '/api/boards/asks/accept'));
91
- await p.fill('#paNT', 'Daily CSV of failed payouts'); await p.selectOption('#paNA', 'health:tech'); await p.click('#paNGo');
95
+ await p.click(`#bdPop [data-askact="accept"][data-id="${a1.body.ask.id}"]`); await peekOn('Accept ask');
96
+ const anc = await until(() => p.evaluate(() => { const s = document.querySelector('#peek select[name="anchor"]'); return s && !s.disabled ? [...s.options].map((o) => o.value) : null; }));
97
+ ok('T1 Accept of an ask with no goal opens New initiative with the anchors the board declares, and no lane field', !!anc && anc.includes('health:tech') && await p.evaluate(() => !document.querySelector('#peek [name="lane"]')), JSON.stringify(anc));
98
+ await p.fill('#peek input[name="title"]', ''); await p.click('#peek form[data-form="new2"] [type="submit"]');
99
+ ok('T2 an empty name is refused on the page, before any press', await p.evaluate(() => /Give it a name/.test(document.querySelector('#formM').textContent)) && !P.posts.some((x) => x.path === '/api/boards/asks/accept'));
100
+ await p.fill('#peek input[name="title"]', 'Daily CSV of failed payouts'); await p.selectOption('#peek select[name="anchor"]', 'health:tech');
101
+ await p.click('#peek [data-newact="link"]'); await p.fill('#nwLink input', 'https://slack.example.com/archives/finance'); await p.click('#peek [data-newact="addlink"]');
102
+ ok('T2 a pasted link shows as material', await p.evaluate(() => /slack\.example\.com/.test(document.querySelector('#nwMat').textContent)));
103
+ await p.click('#peek form[data-form="new2"] [type="submit"]');
92
104
  ok('T3 Accept records the accept line and a new initiative, and says so', !!(await toastIs(/accepted in/)) && lines('boards.jsonl').some((l) => l.kind === 'ask-accept' && l.ask === a1.body.ask.id), JSON.stringify(lines('boards.jsonl').map((l) => l.kind)));
93
- await dlgOff();
94
- ok('T4 the accepted ask leaves the card', await until(() => p.evaluate((id) => !document.querySelector(`#cAsks [data-ask="acc:${id}"]`) && document.querySelectorAll('#cAsks .baa').length === 1, a1.body.ask.id)));
95
- if (await p.evaluate(() => document.querySelector('#popAsks').hidden)) await p.click('#chAsks'); // the Agreed design keeps the asks behind the New asks chip (premium-agreed-design)
96
- await p.click(`#cAsks [data-ask="dec:${a2.body.ask.id}"]`); await dlgOn();
97
- ok('T5 Decline waits for a reason', await p.evaluate(() => document.querySelector('#paDGo').disabled));
98
- await p.fill('#paDW', 'Not tied to a goal this quarter'); await p.click('#paDGo');
99
- ok('T6 Decline records the reason in the board ledger', !!(await toastIs(/Ask declined/)) && lines('boards.jsonl').some((l) => l.kind === 'ask-decline' && l.why === 'Not tied to a goal this quarter'));
100
- ok('T7 the card says nothing is left to triage', await until(() => p.evaluate(() => /Nothing new to triage/.test(document.querySelector('#cAsks').textContent))));
105
+ const g0 = await until(() => lines('triage-answers.jsonl').find((l) => l.kind === 'start'));
106
+ ok('T3 the Why and the link start its first questions (BdGrill): one start line, and the questions open in the same panel', !!g0 && /Finance wants a CSV/.test(g0.why) && g0.links.length === 1 && !!(await until(() => p.evaluate(() => !!document.querySelector('#peek .bd-qc.on') && /questions? before the BRD/.test(document.querySelector('#peek').textContent)))), JSON.stringify(g0));
107
+ await p.click('#peek .bd-qc.on [data-qchip]'); await p.click('#peek [data-grill="next"]');
108
+ ok('T3 an answer is kept per question', await until(() => lines('triage-answers.jsonl').some((l) => l.kind === 'answer' && l.answer)));
109
+ await p.click('#peek [data-grill="later"]');
110
+ ok('T3 Later keeps the open questions as the next step', await until(() => lines('triage-answers.jsonl').some((l) => l.kind === 'later')) && !!(await toastIs(/Kept as the next step/)));
111
+ await until(() => p.evaluate(() => document.querySelector('#chAsks') && /\b1\b/.test(document.querySelector('#chAsks').textContent)), 30000);
112
+ await p.click('#chAsks');
113
+ ok('T4 the accepted ask leaves the popover', await until(() => p.evaluate((id) => !document.querySelector(`#bdPop [data-askact="accept"][data-id="${id}"]`) && document.querySelectorAll('#bdPop .bd-acard[data-ask]').length === 1, a1.body.ask.id)));
114
+ await p.click(`#bdPop [data-askact="decline"][data-id="${a2.body.ask.id}"]`);
115
+ ok('T5 Decline asks why not, with the chips', !!(await popOn(/Why not.*Out of scope.*Already planned.*Not now.*Other/)) && !P.posts.some((x) => x.path === '/api/boards/asks/decline'));
116
+ await p.click('#bdPop [data-whynot="Not now"]'); await p.fill('#bdPop input[name="why"]', 'Not tied to a goal this quarter'); await p.click('#bdPop [data-askact="decline-go"]');
117
+ ok('T6 Decline records the reason in the board ledger', !!(await toastIs(/Ask declined/)) && lines('boards.jsonl').some((l) => l.kind === 'ask-decline' && l.why === 'Not now: Not tied to a goal this quarter'), JSON.stringify(lines('boards.jsonl').filter((l) => l.kind === 'ask-decline')));
118
+ await until(() => p.evaluate(() => /^No new asks|0 new asks/.test((document.querySelector('#chAsks') || {}).textContent.trim())), 30000);
119
+ await p.click('#chAsks');
120
+ ok('T7 the popover says nothing is left to triage', !!(await popOn(/No new ask waits for triage/)));
121
+ await closeAll();
101
122
 
102
123
  /* N New initiative */
103
124
  ok('N1 New initiative is offered on a team board', await p.evaluate(() => !document.querySelector('#newIni').hidden));
104
- await p.click('#newIni'); await dlgOn();
105
- await until(() => p.evaluate(() => { const s = document.querySelector('#paNA'); return s && !s.disabled; }));
106
- await p.fill('#paNT', 'Partner usage per key'); await p.click('#paNGo');
107
- ok('N2 an unanchored create is refused on the page', await p.evaluate(() => /Choose an anchor/.test(document.querySelector('#paNM').textContent)));
108
- await p.selectOption('#paNA', 'health:tech'); await p.click('#paNGo');
125
+ await p.click('#newIni'); await peekOn('New initiative');
126
+ await until(() => p.evaluate(() => { const s = document.querySelector('#peek select[name="anchor"]'); return s && !s.disabled; }));
127
+ await p.fill('#peek input[name="title"]', 'Partner usage per key'); await p.click('#peek form[data-form="new2"] [type="submit"]');
128
+ ok('N2 an unanchored create is refused on the page', await p.evaluate(() => /Choose what it counts toward/.test(document.querySelector('#formM').textContent)));
129
+ await p.selectOption('#peek select[name="anchor"]', 'health:tech'); await p.click('#peek form[data-form="new2"] [type="submit"]');
109
130
  const made = await toastIs(/created in/);
110
131
  const recs = fs.readdirSync(path.join(team, 'planning', 'initiatives'));
111
132
  ok('N3 Create writes an ask, its accept and a new initiative record, as the console does', !!made && recs.some((f) => /partner-usage/.test(f)) && lines('boards.jsonl').some((l) => l.kind === 'ask' && l.line === 'Partner usage per key'), made + ' / ' + recs.join());
133
+ await until(() => p.evaluate(() => !!document.querySelector('#peek .bd-qc')));
134
+ await closeAll();
112
135
 
113
- /* M move and Undo, from the row's menu */
114
- await dlgOff();
115
- await until(() => listed('pa-one'));
116
- const menuBtn = '#ibBody .inim[data-im="board:pa-one"]';
117
- await p.click(menuBtn);
118
- const items = await until(() => p.evaluate(() => { const m = document.querySelector('.bam2'); return m ? [...m.querySelectorAll('[role="menuitem"] b')].map((b) => b.textContent) : null; }));
119
- ok('M1 the row menu offers the next stage, hold, cancel and archive', !!items && /^Move to /.test(items[0]) && items.includes('Put on hold') && items.includes('Cancel') && items.includes('Archive'), JSON.stringify(items));
120
- ok('M2 the menu takes the focus and the arrow keys move it; Escape closes it and gives the focus back', await (async () => {
121
- const f0 = await p.evaluate(() => document.activeElement.closest('.bam2') !== null);
122
- await p.keyboard.press('ArrowDown'); const f1 = await p.evaluate(() => [...document.querySelectorAll('.bam2 [role="menuitem"]')].indexOf(document.activeElement));
123
- await p.keyboard.press('Escape'); const gone = await p.evaluate(() => !document.querySelector('.bam2') && document.activeElement.matches('.inim'));
124
- return f0 && f1 === 1 && gone;
125
- })());
136
+ /* M move and Undo, from the panel's ⋯ (BdActions) */
137
+ ok('M1 the row menu offers the next stage with how much is ready, hold, cancel and archive', await acts('pa-one') && await p.evaluate(() => { const L = [...document.querySelectorAll('#bdPop [data-rowact] span:first-of-type')].map((b) => b.textContent); return /^Move to /.test(L[0]) && L.includes('Hold') && L.includes('Cancel') && L.includes('Archive'); }), await p.evaluate(() => document.querySelector('#bdPop').textContent));
138
+ await p.keyboard.press('Escape');
139
+ ok('M2 Escape closes the menu and gives the focus back to the ⋯ button', await until(() => p.evaluate(() => document.querySelector('#bdPop').hidden && document.activeElement.dataset.pk === 'acts')));
140
+ await p.keyboard.press('Escape');
141
+ ok('M2 a second Escape closes the panel and gives the focus back to the row', await until(() => p.evaluate(() => document.querySelector('#peek').hidden && !!document.activeElement.closest('#ibBody'))));
126
142
  const from = ready.model.initiatives.list.rows.find((r) => r.id === 'pa-one').acts.stage;
127
- await p.click(menuBtn); await p.click('.bam2 [data-pk^="mv:"]');
143
+ await acts('pa-one'); await p.click('#bdPop [data-rowact^="mv:"]');
128
144
  const mv = await toastIs(/^Moved to/);
129
145
  ok('M3 Move records one move line and says what it recorded', !!mv && lines('boards.jsonl').filter((l) => l.kind === 'move' && l.id === 'pa-one').length === 1, mv);
130
- await p.click('#paUndo');
146
+ await p.click('#bdToast .bd-undo');
131
147
  ok('M4 Undo writes the move back', !!(await toastIs(new RegExp('Back in ' + from))) && lines('boards.jsonl').filter((l) => l.kind === 'move' && l.id === 'pa-one').pop().to === from);
148
+ await closeAll();
132
149
 
133
- /* L hold, resume, cancel, reopen, archive, restore */
134
- await until(() => listed('pa-one'));
135
- await p.click(menuBtn);
136
- await p.click('.bam2 [data-pk="hold"]'); await dlgOn();
137
- await p.fill('#paHR', 'Waiting for the Q1 budget'); await tap(p, '#paHB [data-v="two"]'); await p.click('#paHGo');
150
+ /* L hold, resume, cancel, reopen, archive, restore: each at once, with Undo */
151
+ await acts('pa-one'); await p.click('#bdPop [data-rowact="hold"]');
138
152
  const hl = await until(() => lines('lifecycle.jsonl').find((l) => l.initiative_id === 'pa-one' && l.state === 'on-hold'));
139
- ok('L1 Put on hold records one on-hold line with the reason and a check-back day', !!hl && hl.reason === 'Waiting for the Q1 budget' && /^\d{4}-\d{2}-\d{2}$/.test(hl.back || ''), JSON.stringify(hl) + ' ' + await p.evaluate(() => (document.querySelector('#paHM') || {}).textContent));
140
- ok('L2 the row then says On hold and its menu offers Resume', await until(async () => { const t = await p.evaluate(() => { const b = document.querySelector('#ibBody .ini2[data-key="board:pa-one"]'); return b ? b.textContent : ''; }); return /On hold/.test(t); }, 30000));
141
- await p.click(menuBtn);
142
- ok('L2 Resume is offered and the moves are not', await until(() => p.evaluate(() => { const m = document.querySelector('.bam2'); return m && !!m.querySelector('[data-pk="resume"]') && !m.querySelector('[data-pk^="mv:"]'); })));
143
- await p.click('.bam2 [data-pk="resume"]');
153
+ ok('L1 Hold records one on-hold line at once, with a check-back day 30 days on, and Undo', !!hl && /^\d{4}-\d{2}-\d{2}$/.test(hl.back || '') && Math.round((Date.parse(hl.back) - Date.now()) / 86400000) >= 29 && !!(await toastIs(/On hold · .* check back/)), JSON.stringify(hl));
154
+ await closeAll();
155
+ ok('L2 the row then says On hold', await until(async () => { const t = await p.evaluate(() => { const b = document.querySelector('#ibBody .ini2[data-key="board:pa-one"]'); return b ? b.textContent : ''; }); return /On hold/.test(t); }, 30000));
156
+ await acts('pa-one');
157
+ ok('L2 Resume is offered and the moves are not', await p.evaluate(() => !!document.querySelector('#bdPop [data-rowact="resume"]') && !document.querySelector('#bdPop [data-rowact^="mv:"]')));
158
+ await p.click('#bdPop [data-rowact="resume"]');
144
159
  ok('L3 Resume records an active line', await until(() => { const L = lines('lifecycle.jsonl').filter((l) => l.initiative_id === 'pa-one'); return L.length && L[L.length - 1].state === 'active'; }));
160
+ await closeAll();
145
161
  await until(() => p.evaluate(() => { const b = document.querySelector('#ibBody .ini2[data-key="board:pa-one"]'); return b && !/On hold/.test(b.textContent); }), 30000);
146
- await p.click(menuBtn); await p.click('.bam2 [data-pk="cancel"]'); await dlgOn();
147
- ok('L4 Cancel waits for a reason', await p.evaluate(() => document.querySelector('#paCGo').disabled));
148
- await tap(p, '#paCW [data-v="worth"]'); await p.click('#paCGo');
149
- ok('L4 Cancel records a cancelled line with the reason', await until(() => lines('lifecycle.jsonl').some((l) => l.initiative_id === 'pa-one' && l.state === 'cancelled' && l.reason === 'Not worth it now')));
150
- ok('L5 the row leaves the list and the fold counts it', await until(() => p.evaluate(() => !document.querySelector('#ibBody .inil .ini2[data-key="board:pa-one"]') && /1 cancelled/.test((document.querySelector('#goneT') || {}).textContent || '')), 30000));
151
- await p.click('#goneT'); await p.click('#ibBody .inim[data-im="board:pa-one"]');
152
- ok('L6 a cancelled row offers Reopen only', await until(() => p.evaluate(() => { const m = document.querySelector('.bam2'); return m && [...m.querySelectorAll('[data-pk]')].map((b) => b.dataset.pk).join() === 'reopen'; })));
153
- await p.click('.bam2 [data-pk="reopen"]');
162
+ await acts('pa-one'); await p.click('#bdPop [data-rowact="cancel"]');
163
+ ok('L4 Cancel asks why, with the same chips as Decline, and records nothing yet', !!(await popOn(/Why cancel .*Out of scope.*Already planned.*Not now.*Other/)) && !lines('lifecycle.jsonl').some((l) => l.initiative_id === 'pa-one' && l.state === 'cancelled'));
164
+ await p.click('#bdPop [data-why="Not now"]'); await p.click('#bdPop [data-rowact="cancel-go"]');
165
+ ok('L4 Cancel records a cancelled line with the reason', await until(() => lines('lifecycle.jsonl').some((l) => l.initiative_id === 'pa-one' && l.state === 'cancelled' && l.reason === 'Not now')));
166
+ ok('L5 the row leaves the track and the ⋯ menu\'s Cancelled and archived item counts it', await until(() => p.evaluate(() => !document.querySelector('#ibBody .bt-l[data-row="board:pa-one"]') && /1 cancelled/.test((document.querySelector('#bdGone') || {}).textContent || '')), 30000));
167
+ await closeAll();
168
+ await p.click('#moreBtn'); await p.click('#bdGone'); await peekOn('Cancelled and archived');
169
+ ok('L6 a cancelled initiative offers Reopen only', await p.evaluate(() => [...document.querySelectorAll('#peek .bd-gr [data-rowact]')].map((b) => b.dataset.rowact).join() === 'reopen'));
170
+ await p.click('#peek .bd-gr [data-rowact="reopen"]');
154
171
  ok('L6 Reopen records an active line', await until(() => { const L = lines('lifecycle.jsonl').filter((l) => l.initiative_id === 'pa-one'); return L[L.length - 1].state === 'active'; }));
172
+ await closeAll();
155
173
  await until(() => listed('pa-one'), 30000);
156
- await p.click(menuBtn); await p.click('.bam2 [data-pk="archive"]'); await dlgOn();
157
- await tap(p, '#paAW [data-v="dup"]'); await p.fill('#paAN', 'Same as the CSV export'); await p.click('#paAGo');
158
- ok('L7 Archive records one archive line with the reason', await until(() => lines('boards.jsonl').some((l) => l.kind === 'ini-archive' && l.id === 'pa-one' && l.archived === true && l.reason === 'Duplicate: Same as the CSV export')));
159
- ok('L8 the fold counts it as archived', await until(() => p.evaluate(() => /1 archived/.test((document.querySelector('#goneT') || {}).textContent || '')), 30000));
160
- await p.click('#paUndo');
174
+ await acts('pa-one'); await p.click('#bdPop [data-rowact="archive"]');
175
+ ok('L7 Archive records one archive line at once, with no reason asked', await until(() => lines('boards.jsonl').some((l) => l.kind === 'ini-archive' && l.id === 'pa-one' && l.archived === true)));
176
+ ok('L8 the ⋯ menu\'s item counts it as archived', await until(() => p.evaluate(() => /1 archived/.test((document.querySelector('#bdGone') || {}).textContent || '')), 30000));
177
+ await p.click('#bdToast .bd-undo');
161
178
  ok('L9 Undo restores it with a restore line', await until(() => lines('boards.jsonl').some((l) => l.kind === 'ini-archive' && l.id === 'pa-one' && l.archived === false)));
179
+ ok('L10 none of the presses opened the old dialog', await noDlg());
162
180
 
163
- /* I the initiative page's bar */
181
+ /* I the Board's expand link: the initiative is a layout inside Home (premium-agreed-design). Its stage moves and lifecycle presses are in the Overview's
182
+ Stage view; the card moves a stage with Move and Back (premium-uncovered-features, canvas InStage) */
164
183
  const I = await open('/premium-initiative.html?id=pa-one&ws=' + encodeURIComponent(B.ws) + '&board=' + encodeURIComponent(B.id));
165
184
  const ip = I.page;
166
- const bar = await until(() => ip.evaluate(() => { const b = document.querySelector('#iBar'); return b && b.querySelector('[data-pk^="mv:"]') ? [...b.querySelectorAll('button')].map((x) => x.textContent.trim()) : null; }), 60000);
167
- ok('I1 the bar offers the next stage and More', !!bar && bar.some((t) => /^Move to /.test(t)) && bar.includes('More'), JSON.stringify(bar));
185
+ const landed = await until(() => ip.evaluate(() => { const q = new URLSearchParams(location.search); return location.pathname === '/premium.html' && q.get('ini') === 'pa-one' && !!q.get('ws') && !!q.get('board') && !!document.querySelector('.hm-card [data-hm-ov]'); }), 60000);
186
+ ok('I0 the expand link lands on Home with the initiative selected, ws and board kept', !!landed, await ip.evaluate(() => location.href));
187
+ await ip.click('.hm-card [data-hm-ov]');
188
+ await until(() => ip.evaluate(() => !!document.querySelector('#czViewer [data-hi-view="stage"]')), 60000);
189
+ await ip.click('#czViewer [data-hi-view="stage"]');
190
+ const bar = await until(() => ip.evaluate(() => { const v = document.querySelector('#czViewer:not([hidden])'); if (!v || !v.querySelector('[data-ov-move]')) return null; const cur = v.querySelector('[data-ov-move][aria-pressed="true"]'); return { moves: [...v.querySelectorAll('[data-ov-move]')].map((x) => x.dataset.ovMove), cur: cur ? cur.dataset.ovMove : '', life: [...v.querySelectorAll('[data-ov-life]')].map((x) => x.dataset.ovLife) }; }), 60000);
191
+ ok('I1 the Overview offers the stages, the current one pressed, and the lifecycle presses', !!bar && bar.moves.length > 1 && !!bar.cur && bar.moves.indexOf(bar.cur) < bar.moves.length - 1 && bar.life.join() === 'on-hold,cancelled', JSON.stringify(bar) + ' ' + (await ip.evaluate(() => (document.querySelector('#czViewer .cz-vw-body') || {}).innerText || 'no Viewer')).slice(0, 400));
168
192
  const n0 = lines('boards.jsonl').filter((l) => l.kind === 'move').length;
169
- await ip.click('#iBar [data-pk^="mv:"]');
170
- ok('I2 a press on the bar records one move line', await until(() => lines('boards.jsonl').filter((l) => l.kind === 'move').length === n0 + 1));
171
- await ip.click('#iBar [data-im="bar"]');
172
- ok('I3 More lists the lifecycle presses and no move', await until(() => ip.evaluate(() => { const m = document.querySelector('.bam2'); return m && [...m.querySelectorAll('[data-pk]')].map((b) => b.dataset.pk).join() === 'hold,cancel,archive'; })));
193
+ const next = bar ? bar.moves[bar.moves.indexOf(bar.cur) + 1] : '';
194
+ await ip.click(`#czViewer [data-ov-move="${next}"]`);
195
+ ok('I2 a stage press records one move line', await until(() => { const L = lines('boards.jsonl').filter((l) => l.kind === 'move'); return L.length === n0 + 1 && L[L.length - 1].id === 'pa-one' && L[L.length - 1].to === next; }), JSON.stringify(lines('boards.jsonl').filter((l) => l.kind === 'move').slice(-1)));
196
+ ok('I2 the Overview then shows the new stage pressed', await until(() => ip.evaluate((n) => !!document.querySelector(`#czViewer [data-ov-move="${n}"][aria-pressed="true"]`), next)));
197
+ const lif0 = lines('lifecycle.jsonl').length;
198
+ await ip.click('#czViewer [data-ov-life="on-hold"]');
199
+ ok('I3 a lifecycle press asks its reason inline, records nothing yet and opens no browser dialog', await until(() => ip.evaluate(() => !!document.querySelector('#czViewer #ovWhy'))) && lines('lifecycle.jsonl').length === lif0 && !(await ip.evaluate(() => { const d = document.querySelector('#dlg'); return !!(d && d.classList.contains('on')); })));
200
+ await ip.click('#czViewer [data-ov-life-no]');
201
+ ok('I3 Not now takes the question back', await until(() => ip.evaluate(() => !document.querySelector('#czViewer #ovWhy') && !!document.querySelector('#czViewer [data-ov-life="on-hold"]'))));
173
202
  await ip.keyboard.press('Escape');
174
- await ip.click('#paUndo').catch(() => {});
203
+ // the card: Back always asks for a reason, and the move line carries it (InStage)
204
+ const back = await until(() => ip.evaluate(() => !!document.querySelector('.hm-card [data-hi-back]')), 30000);
205
+ ok('I4 the card has Move to the next stage and Back', back && await ip.evaluate(() => /^Move to /.test((document.querySelector('.hm-card [data-hi-move]') || {}).textContent || '')));
206
+ if (back) {
207
+ const m0 = lines('boards.jsonl').filter((l) => l.kind === 'move').length;
208
+ await ip.click('.hm-card [data-hi-back]');
209
+ const asked = await until(() => ip.evaluate(() => { const d = document.querySelector('.hi-pop[role="dialog"]'); return d ? { go: d.querySelector('[data-hi-go]').disabled, chips: d.querySelectorAll('[data-hi-why]').length } : null; }));
210
+ ok('I4 Back asks why first: Move back waits for a reason and records nothing yet', !!asked && asked.go === true && asked.chips === 4 && lines('boards.jsonl').filter((l) => l.kind === 'move').length === m0, JSON.stringify(asked));
211
+ await ip.click('.hi-pop [data-hi-why="New research"]'); await ip.fill('.hi-pop #hiWhy', 'Interviews changed the scope');
212
+ await ip.click('.hi-pop [data-hi-go]');
213
+ ok('I4 Move back records one move line with the reason as its why', await until(() => { const L = lines('boards.jsonl').filter((l) => l.kind === 'move'); const x = L[L.length - 1]; return L.length === m0 + 1 && x.id === 'pa-one' && x.to === bar.cur && x.why === 'Back: New research. Interviews changed the scope'; }), JSON.stringify(lines('boards.jsonl').filter((l) => l.kind === 'move').slice(-1)));
214
+ ok('I4 the Undo toast shows after the move', await until(() => ip.evaluate(() => { const t = document.querySelector('#hiToast'); return !!t && !t.hidden && /moved to/.test(t.textContent) && !!t.querySelector('[data-hi-undo]'); })));
215
+ await until(() => ip.evaluate(() => !!document.querySelector('.hm-card [data-hi-auto]')), 30000);
216
+ await ip.click('.hm-card [data-hi-auto]');
217
+ ok('I5 the Moves on by itself switch is a file-mode record of the initiative', await until(() => lines('initiative-layout.jsonl').some((l) => l.kind === 'auto' && l.initiative === 'pa-one' && l.on === false)) && await until(() => ip.evaluate(() => (document.querySelector('.hm-card [data-hi-auto]') || {}).getAttribute && document.querySelector('.hm-card [data-hi-auto]').getAttribute('aria-checked') === 'false')));
218
+ }
175
219
 
176
220
  /* S the PMOS-self board: the model says self, the page offers no move and no New initiative */
177
221
  {
@@ -180,16 +224,18 @@ const ALLOWED = /^\/api\/(?:boards\/(?:asks\/(?:add|accept|decline)|move|archive
180
224
  await S.page.route('**/api/board-premium*', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, state: 'ready', model: m, as_of: Date.now() }) }));
181
225
  await S.page.reload();
182
226
  await until(() => S.page.evaluate(() => document.querySelectorAll('#ibBody .ini2').length > 0));
183
- ok('S1 the PMOS-self board names the router in its asks card and hides New initiative', await S.page.evaluate(() => /pmos-router/.test(document.querySelector('#cAsks').textContent) && document.querySelector('#newIni').hidden));
184
- await S.page.click('#ibBody .inim');
185
- ok('S2 its row menu has no move', await until(() => S.page.evaluate(() => { const x = document.querySelector('.bam2'); return x && !x.querySelector('[data-pk^="mv:"]') && !!x.querySelector('[data-pk="hold"]'); })));
227
+ await S.page.click('#chAsks');
228
+ ok('S1 the PMOS-self board names the router in its asks popover and hides New initiative', await until(() => S.page.evaluate(() => /pmos-router/.test((document.querySelector('#bdPop') || {}).textContent || '') && document.querySelector('#newIni').hidden)));
229
+ await S.page.keyboard.press('Escape');
230
+ await S.page.click('#ibBody .ini2'); await until(() => S.page.evaluate(() => !!document.querySelector('#peek [data-pk="acts"]'))); await S.page.click('#peek [data-pk="acts"]');
231
+ ok('S2 its actions have no move', await until(() => S.page.evaluate(() => { const x = document.querySelector('#bdPop'); return x && !x.hidden && !x.querySelector('[data-rowact^="mv:"]') && !!x.querySelector('[data-rowact="hold"]'); })));
186
232
  await S.ctx.close();
187
233
  }
188
234
 
189
235
  /* P the POST allow-list and the refusals */
190
236
  const all = P.posts.concat(I.posts);
191
237
  const other = all.filter((x) => !ALLOWED.test(x.path) && x.path !== '/api/briefing-premium/seen'); // an opened popup's record (popup context slice 11, R1) is not a press
192
- ok('P1 the pages post only to the asks, move, lifecycle and archive routes', all.length > 10 && !other.length, JSON.stringify(other));
238
+ ok('P1 the pages post only to the asks, move, lifecycle, archive and initiative-layout routes', all.length > 10 && !other.length, JSON.stringify(other));
193
239
  const noNonce = await post('/api/boards/move', { id: 'fx-bare', to: ready.model.board.stages[1] }, { 'Content-Type': 'application/json', Origin: BASE });
194
240
  const lifeNo = await post('/api/lifecycle', { initiative_id: 'fx-bare', state: 'on-hold' }, { 'Content-Type': 'application/json', Origin: BASE });
195
241
  ok('P2 a press without the launch nonce is refused', noNonce.status === 403 && lifeNo.status === 403, JSON.stringify([noNonce.status, lifeNo.status]));
@@ -198,12 +244,12 @@ const ALLOWED = /^\/api\/(?:boards\/(?:asks\/(?:add|accept|decline)|move|archive
198
244
  /* F floors */
199
245
  {
200
246
  const S = await open('/premium-board.html', { w: 390, h: 844 });
201
- await until(() => S.page.evaluate(() => document.querySelectorAll('#ibBody .inim').length > 0), 30000);
202
- const f = await S.page.evaluate(() => ({ wide: document.documentElement.scrollWidth > innerWidth + 1, small: [...document.querySelectorAll('#ibBody .inim, #cAsks button, #newIni')].filter((b) => b.offsetParent && (b.getBoundingClientRect().width < 44 || b.getBoundingClientRect().height < 44)).map((b) => b.className + ':' + Math.round(b.getBoundingClientRect().width) + 'x' + Math.round(b.getBoundingClientRect().height)) }));
247
+ await until(() => S.page.evaluate(() => document.querySelectorAll('#ibBody .ini2').length > 0), 30000);
248
+ const f = await S.page.evaluate(() => ({ wide: document.documentElement.scrollWidth > innerWidth + 1, small: [...document.querySelectorAll('#ibBody .ini2, #chAsks, #newIni')].filter((b) => b.offsetParent && (b.getBoundingClientRect().width < 44 || b.getBoundingClientRect().height < 44)).map((b) => b.className + ':' + Math.round(b.getBoundingClientRect().width) + 'x' + Math.round(b.getBoundingClientRect().height)) }));
203
249
  ok('F1 at 390 px there is no sideways scroll and every new control is at least 44 px', !f.wide && !f.small.length, JSON.stringify(f));
204
- await S.page.click('#ibBody .inim');
205
- const mi = await until(() => S.page.evaluate(() => { const L = [...document.querySelectorAll('.bam2 [role="menuitem"]')]; return L.length ? L.every((b) => b.getBoundingClientRect().height >= 44) && document.documentElement.scrollWidth <= innerWidth + 1 : null; }));
206
- ok('F2 the menu items are 44 px tall and the open menu adds no sideways scroll', !!mi);
250
+ await S.page.click('#ibBody .ini2'); await until(() => S.page.evaluate(() => !!document.querySelector('#peek [data-pk="acts"]'))); await S.page.click('#peek [data-pk="acts"]');
251
+ const mi = await until(() => S.page.evaluate(() => { const L = [...document.querySelectorAll('#bdPop.sheet:not([hidden]) .bd-mi')]; return L.length ? L.every((b) => b.getBoundingClientRect().height >= 44) && document.documentElement.scrollWidth <= innerWidth + 1 : null; }));
252
+ ok('F2 the action rows are 44 px tall and the open sheet adds no sideways scroll', !!mi);
207
253
  await S.ctx.close();
208
254
  }
209
255
  await P.ctx.close(); await I.ctx.close();