create-pmos 0.402.0 → 0.404.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/package.json +25 -30
  2. package/payload/AGENTS.md +2 -0
  3. package/payload/KIT-VERSION +1 -1
  4. package/payload/mods/pmos-cockpit/hooks/lib/session-facts.mjs +1 -1
  5. package/payload/planning/evals/eval-calibration.md +1 -1
  6. package/payload/planning/okrs/health-budgets.md +1 -1
  7. package/payload/state/discoveries.md +1 -1
  8. package/workspace/board-programs-test.js +32 -5
  9. package/workspace/briefing-premium-adddoc-test.js +28 -22
  10. package/workspace/briefing-premium-board-test.js +91 -73
  11. package/workspace/briefing-premium-calendar-2-test.js +23 -10
  12. package/workspace/briefing-premium-calendar-3-test.js +23 -19
  13. package/workspace/briefing-premium-calendar-test.js +19 -17
  14. package/workspace/briefing-premium-initiative-test.js +25 -12
  15. package/workspace/briefing-premium-insights-test.js +31 -18
  16. package/workspace/briefing-premium-metrics-test.js +8 -8
  17. package/workspace/briefing-premium-test.js +4 -3
  18. package/workspace/changelog.json +24 -0
  19. package/workspace/fixtures/premium-viewer-fixtures.js +24 -2
  20. package/workspace/guide/jira.md +38 -6
  21. package/workspace/guide/programs.md +2 -0
  22. package/workspace/home-rows-test.js +184 -0
  23. package/workspace/lib/briefing-premium-agent.js +3 -0
  24. package/workspace/lib/calendar-layers.js +8 -4
  25. package/workspace/lib/initiative-layout.js +4 -3
  26. package/workspace/lib/jira-cli.js +17 -12
  27. package/workspace/lib/jira-status.js +1 -1
  28. package/workspace/lib/jira-tickets.js +126 -24
  29. package/workspace/lib/meeting-files.js +58 -0
  30. package/workspace/lib/meeting-learn.js +139 -0
  31. package/workspace/lib/meeting-material.js +12 -5
  32. package/workspace/lib/notes.js +3 -0
  33. package/workspace/lib/program-chat.js +32 -0
  34. package/workspace/lib/routes-brief-page.js +8 -1
  35. package/workspace/lib/routes-calendar-views.js +24 -3
  36. package/workspace/lib/routes-meeting-material.js +38 -0
  37. package/workspace/lib/routes-meeting-points.js +23 -3
  38. package/workspace/package-lock.json +2 -2
  39. package/workspace/package.json +1 -1
  40. package/workspace/premium-board-actions-test.js +30 -24
  41. package/workspace/premium-chat-context-test.js +1 -1
  42. package/workspace/premium-chat-goal-view-test.js +1 -1
  43. package/workspace/premium-chat-viewer-test.js +1 -1
  44. package/workspace/premium-core-doc-issue-test.js +13 -7
  45. package/workspace/premium-discuss-landing-test.js +83 -0
  46. package/workspace/premium-link-suggest-test.js +103 -0
  47. package/workspace/premium-report-read-test.js +86 -82
  48. package/workspace/premium-vw-backlog-test.js +6 -5
  49. package/workspace/premium-vw-cal-test.js +46 -23
  50. package/workspace/premium-vw-item-test.js +8 -6
  51. package/workspace/premium-vw-jira-test.js +3 -2
  52. package/workspace/premium-vw-meet-test.js +122 -66
  53. package/workspace/premium-vw-notes-test.js +7 -6
  54. package/workspace/premium-vw-rec-test.js +14 -13
  55. package/workspace/premium-vw-slides-test.js +11 -5
  56. package/workspace/program-panel-test.js +64 -55
  57. package/workspace/public/pm/bd-acts.js +1 -1
  58. package/workspace/public/pm/bd-asks.js +22 -7
  59. package/workspace/public/pm/bd-ini-panel.js +232 -0
  60. package/workspace/public/pm/bd-pop.js +2 -2
  61. package/workspace/public/pm/bd-prog-panel.js +176 -191
  62. package/workspace/public/pm/cozy-board.css +5 -28
  63. package/workspace/public/pm/cozy-evui.js +4 -2
  64. package/workspace/public/pm/cozy-home-rows.css +54 -0
  65. package/workspace/public/pm/cozy-home.css +9 -0
  66. package/workspace/public/pm/cozy-insights.css +1 -2
  67. package/workspace/public/pm/cozy-mtg-present.css +160 -0
  68. package/workspace/public/pm/cozy-panel.css +11 -34
  69. package/workspace/public/pm/cozy-rec-pill.css +12 -0
  70. package/workspace/public/pm/cozy-rec-pill.js +46 -0
  71. package/workspace/public/pm/cozy-viewer.js +307 -43
  72. package/workspace/public/pm/cozy-vw-mtg.css +96 -94
  73. package/workspace/public/pm/cozy-vw-rp.css +40 -25
  74. package/workspace/public/pm/cozy-vw-shell.css +127 -0
  75. package/workspace/public/pm/cozy-xv.css +51 -0
  76. package/workspace/public/pm/cozy-xv.js +34 -0
  77. package/workspace/public/pm/goal-chat.js +1 -1
  78. package/workspace/public/pm/home-app.js +122 -58
  79. package/workspace/public/pm/home-chat.js +11 -2
  80. package/workspace/public/pm/home-day.js +64 -0
  81. package/workspace/public/pm/home-ini-model.js +1 -1
  82. package/workspace/public/pm/home-ini.js +197 -54
  83. package/workspace/public/pm/home-list.js +6 -14
  84. package/workspace/public/pm/home-mentions.js +187 -0
  85. package/workspace/public/pm/home-rec-row.js +67 -0
  86. package/workspace/public/pm/home-review.js +20 -10
  87. package/workspace/public/pm/home-task.js +19 -18
  88. package/workspace/public/pm/home-today.js +3 -3
  89. package/workspace/public/pm/premium-board.js +83 -235
  90. package/workspace/public/pm/premium-insights.js +118 -82
  91. package/workspace/public/pm/premium-mtg-present.js +408 -100
  92. package/workspace/public/pm/premium-mtg-replay.js +70 -10
  93. package/workspace/public/pm/premium-report-read.js +118 -63
  94. package/workspace/public/pm/premium-vw-cal.js +62 -34
  95. package/workspace/public/pm/premium-vw-mtg.js +348 -192
  96. package/workspace/public/pm/rec-state.js +63 -0
  97. package/workspace/public/pm/rp-parts.js +33 -8
  98. package/workspace/public/pm/tk-draft.js +107 -0
  99. package/workspace/public/pm/tk-model.js +134 -0
  100. package/workspace/public/pm/tk-send.js +124 -0
  101. package/workspace/public/pm/tk-tasks.css +120 -0
  102. package/workspace/public/premium-board.html +0 -1
  103. package/workspace/server.js +4 -2
  104. package/workspace/skills/jira-push.skill +3 -3
  105. package/workspace/test-lists/prd-to-jira.json +6 -0
  106. package/workspace/test-lists/program-chat.json +6 -0
  107. package/workspace/test-lists/viewer-home-rows.json +9 -0
  108. package/workspace/test-lists/viewer-meetings.json +9 -0
  109. package/workspace/test-lists/viewer-shell-a.json +15 -0
  110. package/workspace/tk-tasks-test.js +199 -0
@@ -77,6 +77,11 @@ const mk = (o) => BP.build(F.facts(o));
77
77
 
78
78
  const view = async (pg, v) => { await pg.evaluate((x) => document.querySelector(`#ibTabs [data-v="${x}"]`).click(), v); await sleep(150); };
79
79
  const spanTo = async (pg, s) => { await pg.click(`#bdSpans [data-sp="${s}"]`); await sleep(150); };
80
+ /* the Viewer's shell A (initiative viewer-shell-a, XvABoard): what it shows now, and a press in its ⋯ menu by label */
81
+ const vwOn = (pg, kind) => pg.evaluate((k) => { const v = document.querySelector('#czViewer'), c = window.czViewer && window.czViewer.current(); return !!v && !v.hidden && !!c && (!k || c.kind === k); }, kind || null);
82
+ const vwTitle = (pg) => pg.evaluate(() => { const v = document.querySelector('#czViewer'); return v && !v.hidden ? (v.querySelector('.cz-vw-title') || {}).textContent || '' : ''; });
83
+ const vwMore = async (pg, label) => { await pg.click('#czViewer [data-cz-vw="more"]'); await pg.waitForSelector('.cz-vw-menu [role="menuitem"]'); const i = await pg.evaluate((l) => [...document.querySelectorAll('.cz-vw-menu [role="menuitem"]')].findIndex((b) => b.textContent.trim() === l), label); if (i < 0) return false; await pg.locator('.cz-vw-menu [role="menuitem"]').nth(i).click(); return true; };
84
+ const vwShut = (pg) => until(() => pg.evaluate(() => { const v = document.querySelector('#czViewer'); return !v || v.hidden; }));
80
85
 
81
86
  /* B1 (premium-agreed-design N1 N2): the floating place menu, no page header, one toolbar */
82
87
  const place = await p.evaluate(() => { const f = document.querySelector('#czFab'), h1 = document.querySelector('main h1'), r = h1.getBoundingClientRect(), tb = document.querySelector('.bd-hd').getBoundingClientRect(); return { fab: f && f.getAttribute('aria-label'), w: Math.round(f.getBoundingClientRect().width), rail: document.querySelector('nav.rail') ? getComputedStyle(document.querySelector('nav.rail')).display : 'gone', h1: Math.round(r.width) + 'x' + Math.round(r.height), top: Math.round(tb.top), name: document.querySelector('#crBoard').textContent, sw: document.querySelector('#crSw').hidden, title: document.title }; });
@@ -126,8 +131,9 @@ const mk = (o) => BP.build(F.facts(o));
126
131
  const k = await q.evaluate(() => { const r = document.querySelector('.bt-l[data-row="board:usage-billing"]'); return { cls: r.querySelector('.bt-cells > div').className, n: r.querySelectorAll('.bt-cells > div.k').length }; });
127
132
  ok('B1 a step the row was moved past is a hollow "Skipped" ring', /\bk\b/.test(k.cls) && k.n === 1, JSON.stringify(k));
128
133
  await q.click('.bt-l[data-row="board:usage-billing"] .bt-nm');
129
- const sk = await until(() => q.evaluate(() => { const k2 = document.querySelector('#peek'); return k2 && !k2.hidden ? { skip: (k2.querySelector('.pk-skip') || {}).textContent, lad: (k2.querySelector('.pk-lad span') || {}).className } : null; }));
130
- ok('B1 the panel strikes the skipped step and says no reason is on record', !!sk && sk.skip === 'Triage skipped: it was moved past that step. No reason is on record.' && /\bk\b/.test(sk.lad), JSON.stringify(sk));
134
+ /* re-pointed (viewer-shell-a, XvABoard): the initiative opens in the Viewer; the stage bar hatches the skipped step and the line under it says why */
135
+ const sk = await until(() => q.evaluate(() => { const v = document.querySelector('#czViewer'); return v && !v.hidden && v.querySelector('.xv-stg') ? { skip: (v.querySelector('.xv-skip') || {}).textContent, seg: v.querySelector('.xv-stg i').className } : null; }));
136
+ ok('B1 the panel hatches the skipped step and says no reason is on record', !!sk && sk.skip === 'Triage skipped: it was moved past that step. No reason is on record.' && /\bsk\b/.test(sk.seg), JSON.stringify(sk));
131
137
  await R.ctx.close();
132
138
  }
133
139
  {
@@ -143,25 +149,27 @@ const mk = (o) => BP.build(F.facts(o));
143
149
  ok('B1 a chip filters the rows to what it counts', await q.evaluate(() => [...document.querySelectorAll('#ibBody .bt-l')].map((r) => r.dataset.row).join() === 'board:sso-partners'));
144
150
  await q.click('#bdChipset [data-f="blocked"]');
145
151
  await q.click('.bt-l[data-row="board:sso-partners"] .bt-nm');
146
- const pk = await until(() => q.evaluate(() => { const k = document.querySelector('#peek'); return k && !k.hidden ? { t: document.querySelector('#pkTitle').textContent, eye: k.querySelector('.pk-eye').textContent, st: k.querySelector('.pk-st').textContent.replace(/\s+/g, ' ').trim(), tks: [...k.querySelectorAll('.pk-jt[data-tk] .bd-pill')].map((e) => e.textContent).join(), jt: [...k.querySelectorAll('.pk-jt[data-tk]')].map((e) => e.textContent.replace(/\s+/g, ' ').trim()), rows: [...k.querySelectorAll('.pk-tks .gi')].map((e) => e.textContent.replace(/\s+/g, ' ').trim()), lad: k.querySelectorAll('.pk-lad span').length, cur: (k.querySelector('.pk-lad span.c') || {}).textContent, nb: k.querySelectorAll('.pk-nb').length, wt: k.querySelectorAll('.pk-wt').length, lk: [...k.querySelectorAll('.pk-lk .bd-chip')].map((e) => e.textContent.replace(/\s+/g, ' ').trim()), ask: k.querySelector('.pk-ask .ft').textContent.replace(/\s+/g, ' ').trim(), sel: !!document.querySelector('.bt-l.sel[data-row="board:sso-partners"]'), side: k.getBoundingClientRect().right === innerWidth || Math.round(k.getBoundingClientRect().right) >= innerWidth - 24, dlg: !!document.querySelector('#dlg.on'), record: !!k.querySelector('[data-pk="record"]') } : null; }));
147
- ok('B1 a row opens the initiative panel in the side panel, not the old dialog, and the row is marked', !!pk && pk.t === 'SSO for partners' && pk.side && !pk.dlg && !pk.record && pk.sel, JSON.stringify(pk));
148
- ok('B1 the panel says the KR and the owner, the status, the step and when it ships', !!pk && pk.eye === 'Feature · KR 1.1 · owner Lee' && pk.st === 'On track·Deliver·ships Nov 4 with v2.4', JSON.stringify(pk && [pk.eye, pk.st]));
149
- ok('B1 its ladder has the eight steps; In Jira lists its tickets (blocked first) with their status, and names release notes and your sign-off (BdPanel)', !!pk && pk.lad === 8 && pk.cur === 'Deliver' && pk.tks.split(',')[0] === 'SSO-12' && pk.tks.split(',').sort().join() === 'SSO-10,SSO-12,SSO-14,SSO-15' && pk.jt.some((x) => /^SSO-10Okta configDone/.test(x)) && pk.jt.some((x) => /^SSO-12SAML errorsBlocked/.test(x)) && pk.rows.some((x) => x === 'Release notesnot on record') && pk.rows.some((x) => x === 'Your sign-offafter the tickets'), JSON.stringify(pk && [pk.tks, pk.jt, pk.rows]));
150
- // re-pointed for the Agreed design (AgBoardPanel has no empty variants): what PMOS has no record of draws no card and no chip, rather than an empty one
151
- ok('B1 what PMOS has no record of is not drawn: no next-action card, no PRD card, no Linked chip', !!pk && pk.nb === 0 && pk.wt === 0 && pk.lk.length === 0, JSON.stringify(pk && [pk.nb, pk.wt, pk.lk]));
152
- ok('B1 the ask box says the answer lands in Home and when Jira was read', !!pk && /^Answer lands in HomeJira \d+ days? ago$/.test(pk.ask), pk && pk.ask);
153
- const n0 = R.posts.length; await q.click('#peek [data-pk="jira"]');
154
- ok('B1 the refresh in the ask box reads Jira again through the Jira source\'s own refresh, and says so', await until(() => R.posts.slice(n0).some((x) => x.path === '/api/sources/refresh' && x.body.source === 'jira' && x.body.ws === 'w1')) && await until(() => q.evaluate(() => /Reading Jira again/.test(document.querySelector('#bdToast').textContent))), JSON.stringify(R.posts.slice(n0)));
155
- await q.click('#peek .pk-jt[data-tk="SSO-12"]');
156
- const tk = await until(() => q.evaluate(() => { const t = document.querySelector('#pkTitle'); return t && /SSO-12/.test(t.textContent) ? { t: t.textContent, back: document.querySelector('#peek .pk-back').textContent, meta: document.querySelector('#peek .pk-st').textContent.replace(/\s+/g, ' '), body: document.querySelector('#peek').textContent.replace(/\s+/g, ' '), jira: (document.querySelector('#peek a[href*="jira.example"]') || {}).href } : null; }));
157
- ok('B1 V1 a ticket opens its Jira panel: blocked and why, what it holds up (the sprint end, the release), its subtasks as the reading holds them, what it counts toward, and a link to Jira', !!tk && tk.t === 'SSO-12 · SAML errors' && tk.back === 'SSO for partners · Deliver' && tk.meta === 'Blocked·Sprint 24' && /Waiting on PLAT-88If it is not fixed by Oct 23, the end of Sprint 24, v2\.4 on Nov 4 slips\./.test(tk.body) && !/Who owns the blocker/.test(tk.body) && /No subtasks are in the Jira reading/.test(tk.body) && /Counts towardv2\.4 shipped \+ your sign-off · 1 of 4/.test(tk.body) && /change only in Jira/.test(tk.body) && /browse\/SSO-12/.test(tk.jira || ''), JSON.stringify(tk));
158
- await q.click('#peek [data-pk="back"]');
159
- ok('B1 the ticket\'s crumb goes back to the initiative', await until(() => q.evaluate(() => document.querySelector('#pkTitle').textContent === 'SSO for partners')));
152
+ /* re-pointed (viewer-shell-a, XvABoard): the initiative opens in the Viewer's shell A, floating over the page's right edge: the summary card,
153
+ * the stage bar, then the folding rows. The Ask box is gone; Discuss in chat and ⋯ take its presses */
154
+ const pk = await until(() => q.evaluate(() => { const v = document.querySelector('#czViewer'), c = window.czViewer && window.czViewer.current(); if (!v || v.hidden || !c || c.kind !== 'Initiative') return null; const r = v.getBoundingClientRect(), out = v.querySelector('[data-czs-id="out"]'); return { t: v.querySelector('.cz-vw-title').textContent, line: (v.querySelector('.czs-line > span:not(.czs-dot):not(.czs-r)') || {}).textContent, right: (v.querySelector('.czs-line .czs-r') || {}).textContent, meta: (v.querySelector('.czs-meta') || {}).textContent, stg: v.querySelectorAll('.xv-stg i').length, now: [...v.querySelectorAll('.xv-stg i')].findIndex((i) => i.classList.contains('now')), out: (out.querySelector('.czs-row b') || {}).textContent, tks: [...out.querySelectorAll('[data-tk]')].map((e) => e.dataset.tk).join(), rows: [...out.querySelectorAll('.xv-lr')].map((e) => e.textContent.replace(/\s+/g, ' ').trim()), secs: [...v.querySelectorAll('.czs-row b')].map((b) => b.textContent), ask: v.querySelectorAll('.cz-vw-body input, .cz-vw-body textarea').length, disc: !!v.querySelector('[data-cz-vw="discuss"]'), sel: !!document.querySelector('.bt-l.sel[data-row="board:sso-partners"]'), w: Math.round(r.width), side: Math.round(innerWidth - r.right) < 40, dlg: !!document.querySelector('#dlg.on'), peek: !document.querySelector('#peek'), record: !!v.querySelector('[data-pk="record"]') }; }));
155
+ ok('B1 a row opens the initiative in the Viewer, floating at 560 px over the right edge, not the old dialog, and the row is marked', !!pk && pk.t === 'SSO for partners' && pk.w === 560 && pk.side && pk.peek && !pk.dlg && !pk.record && pk.sel, JSON.stringify(pk));
156
+ ok('B1 the summary says the status once (the release date is not said again), the step and the owner, and when Jira was read', !!pk && pk.line === 'Ships Nov 4' && /^Deliver( · day \d+)? · owner Lee$/.test(pk.meta) && /^Jira · \d+ days? ago$/.test(pk.right), JSON.stringify(pk && [pk.line, pk.meta, pk.right]));
157
+ ok('B1 the stage bar has the eight steps with Deliver current; the output row lists its tickets (blocked first) with their status, and names release notes and your sign-off (XvABoard)', !!pk && pk.stg === 8 && pk.now === 5 && pk.out === 'v2.4 shipped + your sign-off' && pk.tks.split(',')[0] === 'SSO-12' && pk.tks.split(',').sort().join() === 'SSO-12,SSO-14,SSO-15' && pk.rows.some((x) => /^SSO-12 SAML errors ?Blocked by PLAT-88/.test(x)) && pk.rows.some((x) => /^1 ticket done ?okta config/.test(x)) && pk.rows.includes('Release notesnot on record') && pk.rows.includes('Your sign-offafter the tickets'), JSON.stringify(pk && [pk.tks, pk.rows]));
158
+ ok('B1 what PMOS has no record of is not drawn: no Linked row, no Drafted row, no Jira-differs row', !!pk && !pk.secs.includes('Linked') && !pk.secs.includes('Drafted in PMOS') && !pk.secs.includes('Jira differs from the PRD'), JSON.stringify(pk && pk.secs));
159
+ ok('B1 there is no ask box; Discuss in chat sits in the header', !!pk && pk.ask === 0 && pk.disc, JSON.stringify(pk));
160
+ const n0 = R.posts.length; await vwMore(q, 'Read Jira again');
161
+ ok('B1 Read Jira again under ⋯ reads Jira through the Jira source\'s own refresh, and says so', await until(() => R.posts.slice(n0).some((x) => x.path === '/api/sources/refresh' && x.body.source === 'jira' && x.body.ws === 'w1')) && await until(() => q.evaluate(() => /Reading Jira again/.test(document.querySelector('#bdToast').textContent))), JSON.stringify(R.posts.slice(n0)));
162
+ await q.click('#czViewer [data-tk="SSO-12"]');
163
+ const tk = await until(() => q.evaluate(() => { const v = document.querySelector('#czViewer'), t = v && v.querySelector('.cz-vw-title'); return t && /SSO-12/.test(t.textContent) ? { t: t.textContent, back: !!v.querySelector('[data-cz-vw="back"]'), line: v.querySelector('.czs-line').textContent, meta: v.querySelector('.czs-meta').textContent, body: v.querySelector('.cz-vw-body').textContent.replace(/\s+/g, ' '), pri: (v.querySelector('a.czs-pri') || {}).textContent, jira: (v.querySelector('a.czs-pri') || {}).href } : null; }));
164
+ ok('B1 V1 a ticket opens as a drill-in (XvOptAJira): blocked and on what, what it holds up (the sprint end, the release), its subtasks as the reading holds them, what it counts toward, and Comment in Jira', !!tk && tk.t === 'SSO-12 · SAML errors' && tk.back && /^Blocked/.test(tk.line) && /PLAT-88/.test(tk.line) && /Sprint 24/.test(tk.meta) && /If it is not fixed by Oct 23, the end of Sprint 24, v2\.4 on Nov 4 slips\./.test(tk.body) && !/Who owns the blocker/.test(tk.body) && /No subtasks are in the Jira reading/.test(tk.body) && /Counts toward.*v2\.4 shipped \+ your sign-off · 1 of 4/.test(tk.body) && /change only in Jira/.test(tk.body) && tk.pri === 'Comment in Jira' && /browse\/SSO-12/.test(tk.jira || ''), JSON.stringify(tk));
165
+ await q.click('#czViewer [data-cz-vw="back"]');
166
+ ok('B1 the ticket\'s Back goes to the initiative', await until(async () => (await vwTitle(q)) === 'SSO for partners'));
160
167
  await q.keyboard.press('Escape');
161
- ok('B1 Escape closes the panel', await until(() => q.evaluate(() => document.querySelector('#peek').hidden)));
168
+ ok('B1 Escape closes the Viewer', await vwShut(q));
162
169
  await q.click('.bt-l[data-row="board:self-serve-v2"] .bt-tk:nth-child(3)');
163
- ok('B1 a deliverable segment on the row opens its Jira ticket', await until(() => q.evaluate(() => /ONB-34/.test((document.querySelector('#pkTitle') || {}).textContent || ''))));
170
+ ok('B1 a deliverable segment on the row opens its Jira ticket', await until(async () => /ONB-34/.test(await vwTitle(q))));
164
171
  await q.keyboard.press('Escape');
172
+ await vwShut(q);
165
173
  const n1 = R.posts.length; await q.click('#chJira');
166
174
  ok('B1 the Jira chip reads Jira again', await until(() => R.posts.slice(n1).some((x) => x.path === '/api/sources/refresh' && x.body.source === 'jira')));
167
175
  /* the chips and tools open their designed popovers (BdAsks, BdSprint, BdFilter) and New initiative its panel (BdNew), with no "Waiting for design" tag */
@@ -172,17 +180,19 @@ const mk = (o) => BP.build(F.facts(o));
172
180
  await q.keyboard.press('Escape');
173
181
  }
174
182
  await q.click('#newIni'); await q.click('#bdPop [data-newmenu="ini"]');
175
- waits.push(await until(() => q.evaluate(() => { const k = document.querySelector('#peek'); if (!k || k.hidden) return null; return (k.querySelector('#pkTitle') || {}).textContent === 'New initiative' && !k.querySelector('.bd-wtag') && !!k.querySelector('#nwDrop') && /Counts toward/.test(k.textContent) && !k.querySelector('select[name="lane"]') ? 'New initiative' : null; })) || 'missing New initiative');
183
+ waits.push(await until(() => q.evaluate(() => { const k = document.querySelector('#czViewer'); if (!k || k.hidden) return null; return (k.querySelector('.cz-vw-title') || {}).textContent === 'New initiative' && !k.querySelector('.bd-wtag') && !!k.querySelector('#nwDrop') && /Counts toward/.test(k.textContent) && !k.querySelector('select[name="lane"]') ? 'New initiative' : null; })) || 'missing New initiative');
176
184
  await q.keyboard.press('Escape');
177
185
  ok('B1 the new asks, the sprint and release, Find and Filter open their popovers, and New initiative its panel with material and no lane field', waits.join() === 'New asks,Sprints and releases,Find,Filter,New initiative', waits.join());
178
186
  ok('B1 none of them opened the old dialog', await q.evaluate(() => !document.querySelector('#dlg.on')));
179
187
  /* B3 Ask about this goes to Home */
180
188
  await q.route('**/premium.html?**', (r) => r.fulfill({ contentType: 'text/html', body: '<title>home</title>' }));
181
- await q.click('.bt-l[data-row="board:sso-partners"] .bt-nm'); await until(() => q.evaluate(() => !document.querySelector('#peek').hidden));
182
- await q.fill('#peek .pk-ask input', 'When does SSO ship?'); await q.press('#peek .pk-ask input', 'Enter');
189
+ await q.click('.bt-l[data-row="board:sso-partners"] .bt-nm'); await until(() => vwOn(q, 'Initiative'));
190
+ /* re-pointed (viewer-shell-a, XvABoard): the Ask box is gone; Discuss in chat opens Home in that initiative */
191
+ await q.click('#czViewer [data-cz-vw="discuss"]');
183
192
  await until(() => /premium\.html/.test(q.url()), 5000);
184
193
  const u = new URL(q.url());
185
- ok('B3 the Board has no chat: Ask about this opens Home with the question as a quick ask in that initiative', u.pathname === '/premium.html' && u.searchParams.get('ask') === 'sso-partners' && u.searchParams.get('q') === 'When does SSO ship?' && u.searchParams.get('ws') === 'w1', q.url());
194
+ // the shell's own link (cozy-viewer.js discuss): the chat about the initiative, which Home reopens beside it by its id
195
+ ok('B3 the Board has no chat: Discuss in chat opens Home in the chat about that initiative, with the initiative beside it', u.pathname === '/premium.html' && u.searchParams.get('about') === 'init:sso-partners' && u.searchParams.get('vk') === 'initiative' && u.searchParams.get('vid') === 'sso-partners', q.url());
186
196
  ok('0 no page error on the stage track', R.errors.length === 0, R.errors.join(' | '));
187
197
  await R.ctx.close();
188
198
  }
@@ -205,9 +215,10 @@ const mk = (o) => BP.build(F.facts(o));
205
215
  const y = await q.evaluate(() => { const r = document.querySelector('.bt-l[data-row="board:sso-partners"]'); return { st: r.querySelector('.cs').textContent, dot: r.querySelector('.sc.c .cz-dot').className, tone: r.querySelector('.cs').className }; });
206
216
  ok('B1 a Deliver row whose tickets are all done waits on you: "Your sign-off · v2.4", in blue', y.st === 'Your sign-off · v2.4' && /\byou\b/.test(y.dot) && /m-info/.test(y.dot) && /s-you/.test(y.tone), JSON.stringify(y));
207
217
  await q.click('.bt-l[data-row="board:sso-partners"] .bt-nm');
208
- const nb = await until(() => q.evaluate(() => { const k = document.querySelector('#peek'); return k && !k.hidden ? { nb: (k.querySelector('.pk-nb:not(.off)') || {}).textContent, last: [...k.querySelectorAll('.pk-tks .gi')].pop().textContent } : null; }));
209
- ok('B1 the panel puts the sign-off first, and the output says it waits', !!nb && /^Sign off v2\.4/.test(nb.nb || '') && nb.last === 'Your sign-offwaiting', JSON.stringify(nb));
210
- ok('B1 reviewing the release goes to the initiative page, where the sign-off is', await q.evaluate(() => /\/premium-initiative\.html\?id=sso-partners/.test((document.querySelector('#peek .pk-nb a.solid') || {}).href || '')));
218
+ /* re-pointed (viewer-shell-a, XvABoard): the sign-off leads the summary card, and Sign off is its one primary */
219
+ const nb = await until(() => q.evaluate(() => { const v = document.querySelector('#czViewer'); return v && !v.hidden && v.querySelector('.czs-sum') ? { line: v.querySelector('.czs-line > span:not(.czs-dot):not(.czs-r)').textContent, pri: (v.querySelector('.czs-pri') || {}).textContent, href: (v.querySelector('a.czs-pri') || {}).href || '', n: v.querySelectorAll('.czs-pri').length, last: [...v.querySelectorAll('[data-czs-id="out"] .xv-lr')].pop().textContent.replace(/\s+/g, ' ').trim() } : null; }));
220
+ ok('B1 the panel puts the sign-off first, with Sign off as the one primary, and the output says it waits', !!nb && nb.line === 'Your sign-off · v2.4' && nb.pri === 'Sign off v2.4' && nb.n === 1 && nb.last === 'Your sign-offwaiting', JSON.stringify(nb));
221
+ ok('B1 signing off goes to the initiative page, where the sign-off is', !!nb && /\/premium-initiative\.html\?id=sso-partners/.test(nb.href), nb && nb.href);
211
222
  await R.ctx.close();
212
223
  }
213
224
 
@@ -228,8 +239,8 @@ const mk = (o) => BP.build(F.facts(o));
228
239
  ok('B4 Show them unfolds Monitor and Evaluate', (await listOf()).rows.length === 7);
229
240
  await p.click('#ibBody [data-sort="need"]');
230
241
  await p.click('#ibBody .bd-ltn[data-key="board:partner-rate-limits"]');
231
- ok('B4 a List row opens the initiative panel', await until(() => p.evaluate(() => (document.querySelector('#pkTitle') || {}).textContent === 'Partner API rate limits')));
232
- await p.keyboard.press('Escape');
242
+ ok('B4 a List row opens the initiative in the Viewer', await until(async () => (await vwTitle(p)) === 'Partner API rate limits'));
243
+ await p.keyboard.press('Escape'); await vwShut(p);
233
244
  await view(p, 'stages');
234
245
  const bs = await p.evaluate(() => ({ tag: !!document.querySelector('#ibBody .bd-wtag'), cols: [...document.querySelectorAll('#ibBody .bd-kh')].map((h) => h.textContent), strips: [...document.querySelectorAll('#ibBody .bd-kstrip')].map((h) => h.textContent), build: document.querySelectorAll('#ibBody .bd-kc[data-step="4"] .bd-bc').length, drag: document.querySelectorAll('#ibBody .bd-bc[draggable="true"]').length, lanes: document.querySelectorAll('#ibBody .bd-lh').length }));
235
246
  // PgKanban: any column folds to a strip with its count; empty ones start folded, and Monitor and Evaluate while nothing in them needs you
@@ -256,15 +267,19 @@ const mk = (o) => BP.build(F.facts(o));
256
267
  ok('B6 the timeline\'s first head opens "The longer the span, the higher the grouping", with the spans and the example themes', await until(() => p.evaluate(() => !document.querySelector('#popRules').hidden && /The longer the span, the higher the grouping/.test(document.querySelector('#popRules').textContent) && document.querySelectorAll('#popRules .bd-tbl4 .bd-tr').length === 5 && document.querySelectorAll('#popRules .bd-tbl3 .bd-tr').length === 5)));
257
268
  await p.keyboard.press('Escape');
258
269
  await p.click('#ibBody .tg-n[data-key="board:partner-rate-limits"]');
259
- const tp = await until(() => p.evaluate(() => { const k = document.querySelector('#peek'); return k && !k.hidden ? { eye: k.querySelector('.pk-eye').textContent, stp: k.querySelector('.pk-stp').textContent, seg: k.querySelectorAll('.pk-seg i').length, cur: [...k.querySelectorAll('.pk-seg i')].findIndex((i) => i.classList.contains('c')), dates: k.querySelector('.pk-kv').textContent, dep: k.querySelectorAll('.pk-dep, .pk-need').length, acts: [...k.querySelectorAll('.pk-acts .bd-ib')].map((b) => b.getAttribute('aria-label')).join(), wide: Math.round(k.getBoundingClientRect().width), vw: innerWidth, ft: k.querySelector('.pk-ask .ft').textContent } : null; }));
260
- // re-pointed for AgBoardTimelinePanel: no empty "nothing waits" or "no dependency" card; four actions (dates, move, hold, archive).
261
- // Re-pointed for XnAgBoardPanel (program-hierarchy B1): every desktop side panel is 60 % of the window, so this one is too
262
- ok('B6 an initiative on the timeline opens its own panel: the step as one of eight, the dates, no empty cards, the tickets and the actions', !!tp && tp.eye === 'feature · KR 1.1 · no Jira epic yet' && tp.stp === 'Plan · step 3 of 8' && tp.seg === 8 && tp.cur === 2 && /PMOS planSep 20 → Nov 30/.test(tp.dates) && tp.dep === 0 && Math.abs(tp.wide - Math.round(tp.vw * 0.6)) <= 1 && tp.acts === 'Change the plan dates,Move to another stage,Put on hold,Archive' && tp.ft === 'The answer lands in Home, inside Partner API rate limits.', JSON.stringify(tp));
263
- await p.click('#peek .pk-acts [aria-label="Move to another stage"]');
270
+ /* re-pointed (viewer-shell-a, XvABoard): the timeline opens the same initiative in the Viewer as every other view. The stage bar names the
271
+ * step; Dates and trend holds the PMOS plan; the timeline panel's actions (the plan dates, move, hold, archive) are under ⋯ */
272
+ const tp = await until(() => p.evaluate(() => { const v = document.querySelector('#czViewer'), c = window.czViewer && window.czViewer.current(); if (!v || v.hidden || !c || c.kind !== 'Initiative') return null; return { t: v.querySelector('.cz-vw-title').textContent, meta: (v.querySelector('.czs-meta') || {}).textContent, seg: v.querySelectorAll('.xv-stg i').length, cur: [...v.querySelectorAll('.xv-stg i')].findIndex((i) => i.classList.contains('now')), dates: ((v.querySelector('[data-czs-id="dates"] .czs-body') || {}).textContent || '').replace(/\s+/g, ' '), secs: [...v.querySelectorAll('.czs-row b')].map((b) => b.textContent), w: Math.round(v.getBoundingClientRect().width) }; }));
273
+ ok('B6 an initiative on the timeline opens in the Viewer: the step as one of eight, the plan dates in Dates and trend, no empty rows', !!tp && tp.t === 'Partner API rate limits' && /^Plan/.test(tp.meta) && tp.seg === 8 && tp.cur === 2 && /PMOS plan Sep 20 → Nov 30/.test(tp.dates) && tp.secs.includes('Dates and trend') && !tp.secs.includes('Linked') && tp.w === 560, JSON.stringify(tp));
274
+ await p.click('#czViewer [data-cz-vw="more"]'); await sleep(80);
275
+ const tm = await p.evaluate(() => [...document.querySelectorAll('.cz-vw-menu [role="menuitem"]')].map((b) => b.textContent.trim()));
276
+ ok('B6 ⋯ holds the timeline panel\'s actions first (move, hold, cancel or archive; the plan dates), then Open in full, link and copy', tm[0] === 'Move, hold, cancel or archive' && tm[1] === 'Change the plan dates' && tm.includes('Open in full') && tm.includes('Copy link') && tm.includes('Copy as text'), JSON.stringify(tm));
277
+ await p.click('#czViewer [data-cz-vw="more"]'); await sleep(80);
278
+ await vwMore(p, 'Move, hold, cancel or archive');
264
279
  ok('B6 its actions open the row menu (BdActions)', await until(() => p.evaluate(() => { const m = document.querySelector('#bdPop'); return !!m && !m.hidden && m.getAttribute('role') === 'menu' && /Move to Prioritize/.test(m.textContent) && /Hold/.test(m.textContent) && !m.querySelector('.bd-wtag'); })));
265
280
  await p.keyboard.press('Escape');
266
- ok('B6 Escape closes the menu first and leaves the panel open', await p.evaluate(() => document.querySelector('#bdPop').hidden && !document.querySelector('#peek').hidden));
267
- await p.keyboard.press('Escape');
281
+ ok('B6 Escape closes the menu first and leaves the Viewer open', await p.evaluate(() => document.querySelector('#bdPop').hidden) && await vwOn(p, 'Initiative'));
282
+ await p.keyboard.press('Escape'); await vwShut(p);
268
283
  await spanTo(p, 'year');
269
284
  const yr = await p.evaluate(() => ({ th: document.querySelectorAll('#ibBody .tg-th').length, lines: document.querySelectorAll('#ibBody .tg-th .tg-line').length, cell: document.querySelector('#ibBody .tg-th .tg-tn').textContent.replace(/\s+/g, ' ').trim(), today: (document.querySelector('#ibBody .tg-today') || {}).textContent, group: (document.querySelector('#chGroup') || {}).textContent, jira: !!document.querySelector('#chJira') }));
270
285
  ok('B6 Year groups by theme, with the initiatives as bars inside; with no trail the theme falls back to its anchor\'s objective', yr.th === 1 && yr.lines === 3 && /^Objective 1Q3 2026 objective7 initiatives · KR 1\.1 · 1 late · 2 at risk$/.test(yr.cell) && /^Today · /.test(yr.today || '') && /Group: ?Theme/.test(yr.group || '') && !yr.jira, JSON.stringify(yr));
@@ -292,23 +307,24 @@ const mk = (o) => BP.build(F.facts(o));
292
307
  await p.click('#tabIni');
293
308
 
294
309
  /* B13 focus: Escape closes the panel and gives the focus back to the row; the Board never opens the old dialog */
295
- await p.locator('#ibBody .bt-l[data-row="board:self-serve-v2"] .bt-nm').click(); await until(() => p.evaluate(() => !document.querySelector('#peek').hidden));
296
- ok('B10 the panel has no Record press and the old dialog stays shut and inert', await p.evaluate(() => !document.querySelector('#peek [data-pk="record"]') && !document.querySelector('#dlg'))); // re-pointed: the Agreed Board carries no old dialog markup at all
310
+ await p.locator('#ibBody .bt-l[data-row="board:self-serve-v2"] .bt-nm').click(); await until(() => vwOn(p, 'Initiative'));
311
+ ok('B10 the panel has no Record press and the old dialog stays shut and inert', await p.evaluate(() => !document.querySelector('#czViewer [data-pk="record"]') && !document.querySelector('#dlg'))); // re-pointed: the Agreed Board carries no old dialog markup at all
297
312
  await p.keyboard.press('Escape');
298
- ok('B13 Escape closes the panel and gives the focus back to the row', await until(() => p.evaluate(() => document.querySelector('#peek').hidden && document.activeElement.classList.contains('bt-nm'))), await p.evaluate(() => document.activeElement.tagName + '.' + document.activeElement.className + ' peek=' + document.querySelector('#peek').hidden));
313
+ ok('B13 Escape closes the Viewer and gives the focus back to the row', await until(() => p.evaluate(() => document.querySelector('#czViewer').hidden && document.activeElement.classList.contains('bt-nm'))), await p.evaluate(() => document.activeElement.tagName + '.' + document.activeElement.className + ' viewer=' + document.querySelector('#czViewer').hidden));
299
314
  ok('0 no page error', A.errors.length === 0, A.errors.join(' | '));
300
315
  await A.ctx.close();
301
316
 
302
- /* B14 the panel's expand opens the initiative page; there is no Page/Popup switch */
317
+ /* B14 the panel's expand opens the initiative page; there is no Page/Popup switch. Re-pointed (viewer-shell-a): "Open in full" under ⋯ opens it in a new tab */
303
318
  {
304
319
  const D = await open();
305
- await D.page.route('**/premium-initiative.html*', (r) => r.fulfill({ contentType: 'text/html', body: '<title>x</title>' }));
320
+ await D.ctx.route('**/premium-initiative.html*', (r) => r.fulfill({ contentType: 'text/html', body: '<title>x</title>' }));
306
321
  ok('B14 there is no Page/Popup switch', await D.page.evaluate(() => !document.querySelector('#modeSeg') && !document.querySelector('#modeRow:not([hidden])')));
307
- await D.page.locator('#ibBody .bt-l[data-row="board:self-serve-v2"] .bt-nm').click(); await until(() => D.page.evaluate(() => !document.querySelector('#peek').hidden));
308
- ok('B14 a click on an initiative opens its panel and stays on the Board', new URL(D.page.url()).pathname === '/premium-board.html');
309
- await D.page.click('#peek [data-pk="expand"]'); await sleep(600);
310
- const u = new URL(D.page.url());
311
- ok('B14 the panel\'s expand opens the initiative page with the initiative, the workspace and the board', u.pathname === '/premium-initiative.html' && u.searchParams.get('id') === 'self-serve-v2' && u.searchParams.get('ws') === 'w1' && u.searchParams.get('board') === 'w1', D.page.url());
322
+ await D.page.locator('#ibBody .bt-l[data-row="board:self-serve-v2"] .bt-nm').click(); await until(() => vwOn(D.page, 'Initiative'));
323
+ ok('B14 a click on an initiative opens it in the Viewer and stays on the Board', new URL(D.page.url()).pathname === '/premium-board.html');
324
+ const [pop] = await Promise.all([D.ctx.waitForEvent('page'), vwMore(D.page, 'Open in full')]);
325
+ await pop.waitForLoadState().catch(() => {});
326
+ const u = new URL(pop.url());
327
+ ok('B14 Open in full opens the initiative page with the initiative, the workspace and the board', u.pathname === '/premium-initiative.html' && u.searchParams.get('id') === 'self-serve-v2' && u.searchParams.get('ws') === 'w1' && u.searchParams.get('board') === 'w1', D.page.url());
312
328
  ok('0 no page error on expand', D.errors.length === 0, D.errors.join(' | '));
313
329
  await D.ctx.close();
314
330
  }
@@ -346,10 +362,11 @@ const mk = (o) => BP.build(F.facts(o));
346
362
  await q.click('#bdView'); const s2 = await q.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1 && document.querySelectorAll('#ibBody .bd-scols.ph .bd-scol').length + (((document.querySelector('#ibBody .bd-sempty') || {}).textContent || '').replace(/^Nothing on screen in /, '').match(/[A-Z][a-z]+/g) || []).length === 8);
347
363
  ok(`B13 at 390 px (${theme}) the one view button switches to By stage, every step a column down the page (the empty steps named on one line), with no sideways scroll`, s2);
348
364
  await q.click('#bdView'); await q.locator('#ibBody .bt-l[data-row="board:sso-partners"] .bt-nm').click();
349
- const g = await until(() => q.evaluate(() => { const k = document.querySelector('#peek'); if (k.hidden) return null; const r = k.getBoundingClientRect(); return { l: Math.round(r.left), w: Math.round(r.width), b: Math.round(innerHeight - r.bottom), vw: innerWidth }; }));
350
- ok(`B13 at 390 px (${theme}) the initiative panel is a bottom sheet across the width`, !!g && g.l === 0 && g.w === g.vw && g.b === 0, JSON.stringify(g));
351
- await q.click('#peek [data-pk="acts"]');
352
- ok(`B13 at 390 px (${theme}) the panel's ⋯ opens the row menu as a sheet across the width, with 44 px rows, and no dialog`, await until(() => q.evaluate(() => { const m = document.querySelector('#bdPop'); if (!m || m.hidden) return false; const r = m.getBoundingClientRect(); return m.classList.contains('sheet') && Math.round(r.left) === 0 && Math.round(r.width) === innerWidth && m.querySelectorAll('.bd-mi').length >= 3 && [...m.querySelectorAll('.bd-mi')].every((b) => b.getBoundingClientRect().height >= 44) && !document.querySelector('#dlg.on'); })));
365
+ /* re-pointed (viewer-shell-a, XvABoard): on a phone the Viewer covers the screen; ⋯ holds Move, hold, cancel or archive, which opens the row menu as a sheet */
366
+ const g = await until(() => q.evaluate(() => { const v = document.querySelector('#czViewer'); if (!v || v.hidden) return null; const r = v.getBoundingClientRect(); return { l: Math.round(r.left), w: Math.round(r.width), h: Math.round(r.height), vw: innerWidth, vh: innerHeight }; }));
367
+ ok(`B13 at 390 px (${theme}) the initiative covers the screen`, !!g && g.l === 0 && g.w === g.vw && g.h === g.vh, JSON.stringify(g));
368
+ await vwMore(q, 'Move, hold, cancel or archive');
369
+ ok(`B13 at 390 px (${theme}) Move, hold, cancel or archive opens the row menu as a sheet across the width, with 44 px rows, and no dialog`, await until(() => q.evaluate(() => { const m = document.querySelector('#bdPop'); if (!m || m.hidden) return false; const r = m.getBoundingClientRect(); return m.classList.contains('sheet') && Math.round(r.left) === 0 && Math.round(r.width) === innerWidth && m.querySelectorAll('.bd-mi').length >= 3 && [...m.querySelectorAll('.bd-mi')].every((b) => b.getBoundingClientRect().height >= 44) && !document.querySelector('#dlg.on'); })));
353
370
  await q.keyboard.press('Escape');
354
371
  ok(`0 no page error at 390 px (${theme})`, R.errors.length === 0, R.errors.join(' | '));
355
372
  await R.ctx.close();
@@ -367,19 +384,20 @@ const mk = (o) => BP.build(F.facts(o));
367
384
  ok('T the output counts its parts from the records and names the next one', ub.prog === '2 of 6 parts' && ub.line === 'Next: Evidence' && pr.prog === '1 of 4 parts' && pr.line === 'Next: Timeline', JSON.stringify([ub, pr]));
368
385
  ok('T what waits on you comes first, in blue', rf.st === 'Your verdict' && /s-you/.test(rf.stc), JSON.stringify(rf));
369
386
  await q.click('.bt-l[data-row="board:self-serve-v2"] .bt-nm');
370
- const pk = await until(() => q.evaluate(() => { const k = document.querySelector('#peek'); if (!k || k.hidden || !/Drafted/.test(k.textContent)) return null; const sec = [...k.querySelectorAll('.pk-sec')]; return { st: k.querySelector('.pk-st').textContent.replace(/\s+/g, ' '), stt: (k.querySelector('.pk-st [title]') || {}).title, drafted: (sec.find((x) => /Drafted in PMOS/.test(x.textContent)) || {}).textContent, wt: k.querySelector('.pk-wt').textContent, wtc: k.querySelector('.pk-wt').className, lk: [...k.querySelectorAll('.pk-lk .bd-chip')].map((e) => e.textContent.replace(/\s+/g, ' ').trim()), prd: (k.querySelector('.pk-lk [data-doc]') || {}).dataset, dep: ([...k.querySelectorAll('.pk-lk .bd-chip')].find((x) => /Waits on/.test(x.textContent)) || {}).title }; }));
371
- // re-pointed: AgBoardPanel's status is one line; the usual days stay in the step's tooltip
372
- ok('T the panel says the day in the step, and the usual days in its tooltip', !!pk && /Build day 18/.test(pk.st) && !/usually/.test(pk.st) && pk.stt === 'Build · 18 days in this step · usually 14 days', JSON.stringify(pk && [pk.st, pk.stt]));
373
- ok('T tickets drafted in PMOS and not in Jira are listed, and go to Jira only through your Commit', !!pk && /^Drafted in PMOS · 1V\.4Resend the invite after 48 hoursnot in JiraThey go to Jira only through your Commit\.$/.test(pk.drafted), JSON.stringify(pk && pk.drafted));
374
- ok('T a ticket pushed from an older PRD is flagged as PRD drift', !!pk && /^Jira differs from the PRD · ONB-31 was pushed from an older PRD/.test(pk.wt) && !/off/.test(pk.wtc), JSON.stringify(pk && pk.wt));
387
+ /* re-pointed (viewer-shell-a, XvABoard): the same records, in the summary's meta, the stage bar's tooltip and the folding rows */
388
+ const pk = await until(() => q.evaluate(() => { const v = document.querySelector('#czViewer'); if (!v || v.hidden || !v.querySelector('[data-czs-id="drafted"]')) return null; const sec = (id) => { const x = v.querySelector(`[data-czs-id="${id}"]`); return x ? { n: (x.querySelector('.czs-n') || {}).textContent || '', body: (x.querySelector('.czs-body') || {}).textContent.replace(/\s+/g, ' ').trim() } : null; }; return { meta: v.querySelector('.czs-meta').textContent, stt: (v.querySelector('.xv-stg i.now') || {}).title, drafted: sec('drafted'), wt: sec('drift'), lk: [...v.querySelectorAll('[data-czs-id="linked"] .xv-chip')].map((e) => e.textContent.replace(/\s+/g, ' ').trim()), prd: (v.querySelector('[data-czs-id="linked"] [data-doc]') || {}).dataset, dep: ([...v.querySelectorAll('[data-czs-id="linked"] .xv-chip')].find((x) => /Waits on/.test(x.textContent)) || {}).title }; }));
389
+ ok('T the panel says the day in the step, and the usual days in the stage bar\'s tooltip', !!pk && /^Build · day 18/.test(pk.meta) && !/usually/.test(pk.meta) && pk.stt === 'Build · 18 days in this step · usually 14 days', JSON.stringify(pk && [pk.meta, pk.stt]));
390
+ ok('T tickets drafted in PMOS and not in Jira are listed, and go to Jira only through your Commit', !!pk && pk.drafted.n === '1' && /^V\.4 ?Resend the invite after 48 hours ?not in Jira ?They go to Jira only through your Commit\.$/.test(pk.drafted.body), JSON.stringify(pk && pk.drafted));
391
+ ok('T a ticket pushed from an older PRD is flagged as PRD drift', !!pk && !!pk.wt && /^ONB-31 was pushed from an older PRD/.test(pk.wt.body), JSON.stringify(pk && pk.wt));
375
392
  ok('T the links are the record\'s own: PRD and rubric paths, the epic, and the dependency with where it stands', !!pk && pk.lk.join('|') === 'PRD|Rubric|Waits on SSO for partners|Epic ONB-1' && pk.prd && pk.prd.doc === 'planning/prd/self-serve-v2.md' && /SSO for partners: Deliver/.test(pk.dep || ''), JSON.stringify(pk && [pk.lk, pk.dep]));
376
- await q.click('#peek .pk-lk [data-doc="planning/prd/self-serve-v2.md"]');
393
+ await q.click('#czViewer [data-czs-fold="linked"]');
394
+ await q.click('#czViewer [data-czs-id="linked"] [data-doc="planning/prd/self-serve-v2.md"]');
377
395
  ok('T a linked document opens in the Viewer, as its text', await until(() => q.evaluate(() => { const v = document.querySelector('#czViewer'); return !!v && !v.hidden && /New teams stall at the invite step/.test(v.textContent); })));
378
396
  await q.keyboard.press('Escape'); await sleep(150);
379
- if (!(await q.evaluate(() => document.querySelector('#peek').hidden))) { await q.keyboard.press('Escape'); await sleep(150); }
380
- await q.click('.bt-l[data-row="board:sso-partners"] .bt-nm'); await sleep(200); await q.click('#peek .pk-jt[data-tk="SSO-12"]');
381
- ok('T the ticket panel counts its subtasks from the Jira reading', await until(() => q.evaluate(() => /Subtasks1 of 3/.test(document.querySelector('#peek').textContent) && /1 subtaskdone/.test(document.querySelector('#peek').textContent) && /2 subtasksopen/.test(document.querySelector('#peek').textContent) && !document.querySelector('#peek .pk-box .seg5'))));
382
- await q.keyboard.press('Escape');
397
+ if (await vwOn(q)) { await q.keyboard.press('Escape'); await sleep(150); }
398
+ await q.click('.bt-l[data-row="board:sso-partners"] .bt-nm'); await until(() => vwOn(q, 'Initiative')); await q.click('#czViewer [data-tk="SSO-12"]');
399
+ ok('T the ticket counts its subtasks from the Jira reading', await until(() => q.evaluate(() => { const x = document.querySelector('#czViewer [data-czs-id="sub"]'); if (!x) return false; const t = x.textContent.replace(/\s+/g, ' '); return (x.querySelector('.czs-n') || {}).textContent === '1 of 3' && /1 subtask ?done/.test(t) && /2 subtasks ?open/.test(t) && !document.querySelector('#czViewer .seg5'); })));
400
+ await q.keyboard.press('Escape'); await vwShut(q);
383
401
  /* the long spans: themes from the trail, the Group control, milestones */
384
402
  await view(q, 'time'); await spanTo(q, 'year');
385
403
  const y1 = await q.evaluate(() => ({ cells: [...document.querySelectorAll('#ibBody .tg-tn')].map((c) => c.textContent.replace(/\s+/g, ' ').trim()), sw: getComputedStyle(document.querySelector('#ibBody .tg-sw')).backgroundColor, rel: [...document.querySelectorAll('#ibBody .tg-axl.rl')].map((e) => e.textContent).join() }));
@@ -390,34 +408,34 @@ const mk = (o) => BP.build(F.facts(o));
390
408
  await spanTo(q, 'quarter');
391
409
  ok('T the Quarter marks a release sign-off and a dependency on the bars', await q.evaluate(() => /v2\.4 sign-off/.test(document.querySelector('#ibBody').textContent) && /after SSO for partners/.test(document.querySelector('#ibBody').textContent)));
392
410
  await view(q, 'track');
393
- /* the row actions write through the console's routes, each with Undo */
411
+ /* the row actions write through the console's routes, each with Undo; re-pointed (viewer-shell-a): the initiative's ⋯ opens them */
394
412
  await q.click('#bdChipset [data-f="sprint"]');
395
413
  const n3 = R.posts.length;
396
- await q.click('.bt-l[data-row="board:partner-rate-limits"] .bt-nm'); await sleep(150); await q.click('#peek [data-pk="acts"]');
414
+ await q.click('.bt-l[data-row="board:partner-rate-limits"] .bt-nm'); await until(() => vwOn(q, 'Initiative')); await vwMore(q, 'Move, hold, cancel or archive');
397
415
  await q.click('#bdPop [data-rowact="hold"]');
398
416
  ok('T Put on hold writes one on-hold lifecycle line, with the check-back day', await until(() => R.posts.some((x) => x.path === '/api/lifecycle' && x.body.initiative_id === 'partner-rate-limits' && x.body.state === 'on-hold' && /^\d{4}-\d{2}-\d{2}$/.test(x.body.back || ''))), JSON.stringify(R.posts));
399
417
  await until(() => q.evaluate(() => !!document.querySelector('#bdToast .bd-undo')));
400
418
  await q.click('#bdToast .bd-undo');
401
419
  ok('T Undo writes the state it had before through the same route', await until(() => R.posts.slice(n3).some((x) => x.path === '/api/lifecycle' && x.body.state === 'active' && x.body.reason === 'undo')), JSON.stringify(R.posts.slice(n3)));
402
- await q.click('.bt-l[data-row="board:partner-rate-limits"] .bt-nm'); await sleep(150); await q.click('#peek [data-pk="acts"]');
420
+ await q.click('.bt-l[data-row="board:partner-rate-limits"] .bt-nm'); await until(() => vwOn(q, 'Initiative')); await vwMore(q, 'Move, hold, cancel or archive');
403
421
  ok('T the row menu says how much of the step is ready next to Move', await until(() => q.evaluate(() => /Move to Prioritize1 of 4 ready/.test((document.querySelector('#bdPop [data-rowact="mv:3"]') || {}).textContent || ''))), await q.evaluate(() => (document.querySelector('#bdPop') || {}).textContent));
404
422
  await q.click('#bdPop [data-rowact="mv:3"]');
405
423
  ok('T Move to the next stage writes a move line in the board ledger', await until(() => R.posts.some((x) => x.path === '/api/boards/move' && x.body.id === 'partner-rate-limits' && x.body.to === 'Prioritize' && x.body.board === 'w1')), JSON.stringify(R.posts.slice(-2)));
406
- await q.click('.bt-l[data-row="board:partner-rate-limits"] .bt-nm'); await sleep(150); await q.click('#peek [data-pk="acts"]'); await q.click('#bdPop [data-rowact="cancel"]');
424
+ await q.click('.bt-l[data-row="board:partner-rate-limits"] .bt-nm'); await until(() => vwOn(q, 'Initiative')); await vwMore(q, 'Move, hold, cancel or archive'); await q.click('#bdPop [data-rowact="cancel"]');
407
425
  ok('T Cancel asks why, with the same chips as Decline', await until(() => q.evaluate(() => /Why cancel Partner API rate limits\?/.test(document.querySelector('#bdPop').textContent) && [...document.querySelectorAll('#bdPop [data-why]')].map((b) => b.textContent).join() === 'Out of scope,Already planned,Not now,Other')));
408
426
  await q.click('#bdPop [data-why="Not now"]'); await q.click('#bdPop [data-rowact="cancel-go"]');
409
427
  ok('T Cancel writes a cancelled lifecycle line with the reason', await until(() => R.posts.some((x) => x.path === '/api/lifecycle' && x.body.state === 'cancelled' && x.body.reason === 'Not now')), JSON.stringify(R.posts.slice(-2)));
410
- await q.click('.bt-l[data-row="board:partner-rate-limits"] .bt-nm'); await sleep(150); await q.click('#peek [data-pk="acts"]'); await q.click('#bdPop [data-rowact="archive"]');
428
+ await q.click('.bt-l[data-row="board:partner-rate-limits"] .bt-nm'); await until(() => vwOn(q, 'Initiative')); await vwMore(q, 'Move, hold, cancel or archive'); await q.click('#bdPop [data-rowact="archive"]');
411
429
  ok('T Archive needs no reason and writes an archive line, with Undo', await until(() => R.posts.some((x) => x.path === '/api/boards/archive' && x.body.archived === true && x.body.id === 'partner-rate-limits')) && await until(() => q.evaluate(() => !!document.querySelector('#bdToast .bd-undo'))), JSON.stringify(R.posts.slice(-2)));
412
430
  /* New initiative and the new asks */
413
431
  await q.keyboard.press('Escape');
414
- if (!(await until(() => q.evaluate(() => document.querySelector('#peek').hidden), 2000))) await q.keyboard.press('Escape');
415
- await q.click('#newIni'); await q.click('#bdPop [data-newmenu="ini"]'); await until(() => q.evaluate(() => !!document.querySelector('#peek select[name="anchor"]:not([disabled])')));
416
- await q.fill('#peek input[name="title"]', 'Per-key API usage'); await q.fill('#peek textarea[name="why"]', 'Partners ask which key used the quota.'); await q.selectOption('#peek select[name="anchor"]', 'q3-2026:o1:kr1'); await q.click('#peek form[data-form="new2"] [type="submit"]');
432
+ if (!(await until(() => q.evaluate(() => (!document.querySelector('#czViewer') || document.querySelector('#czViewer').hidden)), 2000))) await q.keyboard.press('Escape');
433
+ await q.click('#newIni'); await q.click('#bdPop [data-newmenu="ini"]'); await until(() => q.evaluate(() => !!document.querySelector('#czViewer select[name="anchor"]:not([disabled])')));
434
+ await q.fill('#czViewer input[name="title"]', 'Per-key API usage'); await q.fill('#czViewer textarea[name="why"]', 'Partners ask which key used the quota.'); await q.selectOption('#czViewer select[name="anchor"]', 'q3-2026:o1:kr1'); await q.click('#czViewer form[data-form="new2"] [type="submit"]');
417
435
  ok('T New initiative records an ask and accepts it into the first stage, anchored, with the Why as its intent and a work lane', await until(() => { const i = R.posts.findIndex((x) => x.path === '/api/boards/asks/add' && x.body.line === 'Per-key API usage'); return i >= 0 && R.posts.slice(i).some((x) => x.path === '/api/boards/asks/accept' && x.body.ask === 'n1' && x.body.anchor === 'q3-2026:o1:kr1' && typeof x.body.lane === 'string' && x.body.lane.length > 0 && x.body.intent === 'Partners ask which key used the quota.'); }), JSON.stringify(R.posts.slice(-3)));
418
436
  await q.keyboard.press('Escape');
419
437
  await q.click('#chAsks'); await q.click('#bdPop [data-askact="accept"][data-id="a1"]');
420
- ok('T accepting an ask with no goal yet opens New initiative from its draft', await until(() => q.evaluate(() => (document.querySelector('#peek input[name="title"]') || {}).value === 'Failed payouts CSV' && (document.querySelector('#pkTitle') || {}).textContent === 'Accept ask')));
438
+ ok('T accepting an ask with no goal yet opens New initiative from its draft', await until(() => q.evaluate(() => (document.querySelector('#czViewer input[name="title"]') || {}).value === 'Failed payouts CSV' && (document.querySelector('#czViewer .cz-vw-title') || {}).textContent === 'Accept ask')));
421
439
  await q.keyboard.press('Escape'); await q.click('#chAsks'); await q.click('#bdPop [data-askact="decline"][data-id="a1"]');
422
440
  await q.click('#bdPop [data-whynot="Out of scope"]'); await q.fill('#bdPop input[name="why"]', 'Finance owns this report'); await q.click('#bdPop [data-askact="decline-go"]');
423
441
  ok('T declining an ask takes a reason, and keeps it', await until(() => R.posts.some((x) => x.path === '/api/boards/asks/decline' && x.body.ask === 'a1' && x.body.why === 'Out of scope: Finance owns this report')), JSON.stringify(R.posts.slice(-2)));
@@ -425,18 +443,18 @@ const mk = (o) => BP.build(F.facts(o));
425
443
  await q.click('#bdFind'); await q.fill('#bdQ', 'sso');
426
444
  ok('T Find lists the initiatives and the Jira work-items that match (BdFilter)', await until(() => q.evaluate(() => [...document.querySelectorAll('#bdQr [data-findini]')].map((b) => b.dataset.findini).join() === 'board:sso-partners' && document.querySelectorAll('#bdQr [data-findtk]').length >= 2)));
427
445
  await q.keyboard.press('Enter');
428
- ok('T Enter opens the first hit\'s panel', await until(() => q.evaluate(() => (document.querySelector('#pkTitle') || {}).textContent === 'SSO for partners' && document.querySelector('#bdPop').hidden)));
429
- await q.keyboard.press('Escape');
446
+ ok('T Enter opens the first hit in the Viewer', await until(async () => (await vwTitle(q)) === 'SSO for partners' && await q.evaluate(() => document.querySelector('#bdPop').hidden)));
447
+ await q.keyboard.press('Escape'); await vwShut(q);
430
448
  await q.click('#bdFilter'); await q.click('#bdPop [data-flt="owners"][data-v="Lee"]');
431
449
  ok('T Filter narrows the rows by owner, and the Showing bar says so', await until(() => q.evaluate(() => [...document.querySelectorAll('#ibBody .bt-l')].map((r) => r.dataset.row).sort().join() === 'board:partner-rate-limits,board:sso-partners' && /ShowingOwner: Lee.*Clear all/.test(document.querySelector('#bdShowing').textContent))));
432
450
  await q.click('#bdPop [data-fclear]'); await q.keyboard.press('Escape');
433
451
  ok('T Clear takes the filter off and hides the Showing bar', await q.evaluate(() => document.querySelector('#bdShowing').hidden));
434
452
  await q.click('#moreBtn'); await q.click('#bdMetrics'); // re-pointed: Metrics moved from the track's footer to the ⋯ menu
435
- ok('T Metrics shows the board\'s tiles, and says which are not on record', await until(() => q.evaluate(() => /Cycle time9 daysmedian, last 90 days/.test(document.querySelector('#peek').textContent) && /ThroughputNot on recordNo run log/.test(document.querySelector('#peek').textContent))));
453
+ ok('T Metrics shows the board\'s tiles, and says which are not on record', await until(() => q.evaluate(() => /Cycle time9 daysmedian, last 90 days/.test(document.querySelector('#czViewer').textContent) && /ThroughputNot on recordNo run log/.test(document.querySelector('#czViewer').textContent))));
436
454
  await q.keyboard.press('Escape');
437
455
  await q.click('#moreBtn'); await q.click('#bdGone');
438
- ok('T the cancelled and archived open from the ⋯ menu, with Reopen', await until(() => q.evaluate(() => /Old idea/.test(document.querySelector('#peek').textContent) && !!document.querySelector('#peek [data-rowact="reopen"]'))));
439
- await q.click('#peek [data-rowact="reopen"]');
456
+ ok('T the cancelled and archived open from the ⋯ menu, with Reopen', await until(() => q.evaluate(() => /Old idea/.test(document.querySelector('#czViewer').textContent) && !!document.querySelector('#czViewer [data-rowact="reopen"]'))));
457
+ await q.click('#czViewer [data-rowact="reopen"]');
440
458
  ok('T Reopen writes an active lifecycle line', await until(() => R.posts.some((x) => x.path === '/api/lifecycle' && x.body.initiative_id === 'old-idea' && x.body.state === 'active' && x.body.reason === 'reopened')));
441
459
  ok('T every write carried the launch nonce', R.posts.filter((x) => /lifecycle|boards/.test(x.path)).every((x) => !!x.headers['x-pmos-nonce']), JSON.stringify(R.posts.map((x) => x.headers['x-pmos-nonce'])));
442
460
  ok('T no old dialog opened and no page error', await q.evaluate(() => !document.querySelector('#dlg.on')) && R.errors.length === 0, R.errors.join(' | '));
@@ -446,7 +464,7 @@ const mk = (o) => BP.build(F.facts(o));
446
464
  /* ?focus=<initiative id>: Insights links to the Board this way, and the Board opens that initiative's panel */
447
465
  {
448
466
  const R = await open({ qs: '&focus=partner-rate-limits' });
449
- ok('F1 ?focus=<id> opens that initiative\'s panel on the Board', await until(() => R.page.evaluate(() => !document.querySelector('#peek').hidden && document.querySelector('#pkTitle').textContent === 'Partner API rate limits' && !!document.querySelector('.bt-l.sel[data-row="board:partner-rate-limits"]'))));
467
+ ok('F1 ?focus=<id> opens that initiative in the Viewer on the Board', await until(async () => (await vwTitle(R.page)) === 'Partner API rate limits' && await R.page.evaluate(() => !!document.querySelector('.bt-l.sel[data-row="board:partner-rate-limits"]'))));
450
468
  await R.ctx.close();
451
469
  }
452
470
 
@@ -66,7 +66,10 @@ const json = (r, b, status = 200) => r.fulfill({ status, contentType: 'applicati
66
66
  ALL.push(X);
67
67
  await material(X, o);
68
68
  await X.page.goto(BASE + '/premium-viewer.html?open=meeting&event=ev-rail&date=' + F.dayKey(W.RAIL));
69
- X.up = await until(() => X.page.evaluate(() => !!document.querySelector('#czViewer [data-a="addmat"]')), 15000);
69
+ X.up = await until(() => X.page.evaluate(() => !!document.querySelector('#czViewer [data-czs-fold="mat"]')), 15000);
70
+ // shell A (XvAPrep): Material is a fold, closed in prep; Add material sits under its rows
71
+ if (X.up && await X.page.evaluate(() => document.querySelector('#czViewer [data-czs-fold="mat"]').getAttribute('aria-expanded') !== 'true')) await X.page.$eval('#czViewer [data-czs-fold="mat"]', (b) => b.click());
72
+ X.up = X.up && await until(() => X.page.evaluate(() => { const b = document.querySelector('#czViewer [data-a="addmat"]'); return !!b && !!b.getClientRects().length; }), 5000);
70
73
  return X;
71
74
  };
72
75
 
@@ -75,10 +78,10 @@ const json = (r, b, status = 200) => r.fulfill({ status, contentType: 'applicati
75
78
  const p = A.page;
76
79
  ok('M1 a calendar meeting opens in the Viewer card with + Add material in Prep', A.up, (await text(p)).slice(0, 300) + ' ERR ' + A.errors.join('|'));
77
80
  if (!A.up) return finish(1);
78
- ok('M2 the material is listed with the scope it was linked at', await until(async () => /Rail PRD/.test(await text(p)) && /every meeting of the series/.test(await text(p)) && /For The report panel/.test(await text(p))), (await text(p)).slice(0, 600));
81
+ ok('M2 the material is listed with the scope it was linked at', await until(async () => /Rail PRD/.test(await text(p)) && /every meeting of the series/.test(await text(p)) && /for The report panel/i.test(await text(p))), (await text(p)).slice(0, 900));
79
82
  await tap(p, '[data-a="addmat"]');
80
- // premium-uncovered-features (meetings, MtMaterial): Add material is a popover under the list; each linked row keeps its own Remove
81
- ok('M1 Add material opens its popover with Find in PMOS and Paste a link, under the linked rows and their Remove', await until(() => p.evaluate(() => !!document.querySelector('#czViewer .vzm-pop[aria-label="Add material"]') && !!document.querySelector('#czViewer [data-a="matq"]') && !!document.querySelector('#czViewer [data-a="matlink"]') && document.querySelectorAll('#czViewer [data-a="matrm"]').length === 2 && !document.querySelector('#czViewer [data-cz-placeholder]'))));
83
+ // XvAMaterial: Add material is a popover under the list; Remove moved to each material's preview, under ⋯ (XvAMaterialPreview)
84
+ ok('M1 Add material opens its popover with Find in PMOS and Paste a link, under the linked rows', await until(() => p.evaluate(() => !!document.querySelector('#czViewer .vzm-pop[aria-label="Add material"]') && !!document.querySelector('#czViewer [data-a="matq"]') && !!document.querySelector('#czViewer [data-a="matlink"]') && document.querySelectorAll('#czViewer .vzm-mats [data-a="mat"]').length === 2 && !document.querySelector('#czViewer [data-cz-placeholder]'))));
82
85
  ok('M1 the sheet says the invite is not changed', /The invite in your calendar is not changed/.test(await text(p)));
83
86
  ok('M1 Suggested asks for the level of this meeting and shows what it returned', await until(async () => A.sugg.includes('') && /Rail brief/.test(await text(p))), JSON.stringify(A.sugg));
84
87
  await p.fill('#czViewer [data-a="matq"]', 'p');
@@ -98,8 +101,12 @@ const json = (r, b, status = 200) => r.fulfill({ status, contentType: 'applicati
98
101
  ok('M3 the list is read again and shows the new row, and the status says what was added', await until(async () => /Partner review/.test(await text(p)) && /Added “Partner review” for every meeting of the series\./.test(await text(p)) && !(await p.$('#czViewer .vzm-pop'))), (await text(p)).slice(0, 500));
99
102
 
100
103
  /* M2 remove, then Undo */
101
- await until(() => p.evaluate(() => document.querySelectorAll('#czViewer [data-a="matrm"]').length === 3));
102
- await p.click('#czViewer [data-a="matrm"][aria-label="Remove Rail PRD"]');
104
+ // Remove is in the preview's ⋯: open Rail PRD's preview, then ⋯ Remove from this meeting
105
+ const openRow = async (pg, title) => { await until(() => pg.evaluate((tt) => [...document.querySelectorAll('#czViewer .vzm-mats [data-a="mat"]')].some((b) => b.innerText.includes(tt)), title)); await pg.evaluate((tt) => [...document.querySelectorAll('#czViewer .vzm-mats [data-a="mat"]')].find((b) => b.innerText.includes(tt)).click(), title); await until(() => pg.evaluate(() => !!document.querySelector('#czViewer .vzx-pv'))); };
106
+ const unfoldMat = (pg) => pg.evaluate(() => { const f = document.querySelector('#czViewer [data-czs-fold="mat"]'); if (f && f.getAttribute('aria-expanded') !== 'true') f.click(); });
107
+ await until(() => p.evaluate(() => document.querySelectorAll('#czViewer .vzm-mats [data-a="mat"]').length === 3));
108
+ await openRow(p, 'Rail PRD');
109
+ ok('M2 the preview\'s ⋯ holds Remove from this meeting', !!(await F.more(p, 'Remove from this meeting')));
103
110
  const rm = await until(() => posted(A.S, '/api/meeting-material').find((x) => x.body.op === 'remove'));
104
111
  ok('M2 Remove posts the item at the scope it was added', rm && rm.body.scope === 'series' && rm.body.item.ref === 'planning/prd/rail.md', JSON.stringify(rm && rm.body));
105
112
  ok('M2 the row leaves after the list is read again, and the status offers Undo', await until(async () => !/Rail PRD/.test((await text(p)).replace(/Removed “Rail PRD”\./, '')) && !!(await p.$('#czViewer [data-a="msgundo"]'))), (await text(p)).slice(0, 500));
@@ -110,10 +117,14 @@ const json = (r, b, status = 200) => r.fulfill({ status, contentType: 'applicati
110
117
 
111
118
  /* M5 refused writes */
112
119
  A.refuse = 'the material store is busy';
113
- await until(() => p.evaluate(() => document.querySelectorAll('#czViewer [data-a="matrm"]').length > 0));
120
+ await unfoldMat(p);
121
+ await until(() => p.evaluate(() => document.querySelectorAll('#czViewer .vzm-mats [data-a="mat"]').length > 0));
114
122
  const n0 = A.mat.length;
115
- await p.click('#czViewer [data-a="matrm"]');
116
- ok('M5 a refused Remove shows the reason, and the row stays', await until(async () => /Not removed: the material store is busy/.test(await text(p))) && await p.evaluate((n) => document.querySelectorAll('#czViewer [data-a="matrm"]').length === n, n0));
123
+ await openRow(p, 'Rail PRD');
124
+ await F.more(p, 'Remove from this meeting');
125
+ await unfoldMat(p);
126
+ ok('M5 a refused Remove shows the reason, and the row stays', await until(async () => /Not removed: the material store is busy/.test(await text(p))) && await until(() => p.evaluate((n) => document.querySelectorAll('#czViewer .vzm-mats [data-a="mat"]').length === n, n0)));
127
+ await unfoldMat(p);
117
128
  await tap(p, '[data-a="addmat"]');
118
129
  await until(() => p.evaluate(() => !!document.querySelector('#czViewer [data-a="matlink"]')));
119
130
  await p.fill('#czViewer [data-a="matlink"]', 'https://x.example/notes');
@@ -132,12 +143,14 @@ const json = (r, b, status = 200) => r.fulfill({ status, contentType: 'applicati
132
143
  ALL.push(B);
133
144
  const q = B.page;
134
145
  await until(() => q.evaluate(() => !!document.querySelector('#czViewer [data-a="maketask"]')), 15000);
146
+ // shell A (XvAReplay): Next steps is a fold; open it so what the press says can be read
147
+ await q.evaluate(() => { const f = document.querySelector('#czViewer [data-czs-fold="steps"]'); if (f && f.getAttribute('aria-expanded') !== 'true') f.click(); });
135
148
  ok('M4 each next step has Make task, and decisions and questions have none', await q.evaluate(() => document.querySelectorAll('#czViewer [data-a="maketask"]').length === 3));
136
149
  await tap(q, '[data-a="maketask"][data-i="0"]');
137
150
  const pl = await until(() => posted(B.S, '/api/plan-items')[0]);
138
151
  const ev = pl && pl.body.events && pl.body.events[0];
139
152
  ok('M4 Make task posts one planned event in the first stage with the owner', ev && ev.ev === 'planned' && ev.initiative === 'viewer' && ev.stage === 'st1' && ev.owner === 'person:Ana' && ev.title === 'Add a print view for documents' && pl.body.ws === 'w1', JSON.stringify(pl && pl.body));
140
- ok('M4 the step says where it went (MtAfter: Task made · added to Viewer, under Intake), with Undo', await until(async () => /Task made · added to Viewer, under Intake/.test(await text(q)) && !!(await q.$('#czViewer [data-a="madeundo"][data-i="0"]'))));
153
+ ok('M4 the step says where it went (MtAfter: Task made · added to Viewer, under Intake), with Undo', await until(async () => /Task made · added to Viewer, under Intake/.test(await text(q)) && !!(await q.$('#czViewer [data-a="madeundo"][data-i="0"]'))), (await text(q)).slice(0, 900));
141
154
  await tap(q, '[data-a="madeundo"][data-i="0"]');
142
155
  const wd = await until(() => posted(B.S, '/api/plan-items')[1]);
143
156
  ok('M4 Undo withdraws the item', wd && wd.body.events[0].ev === 'withdrawn' && wd.body.events[0].item === 'item-9', JSON.stringify(wd && wd.body));