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
@@ -3,7 +3,11 @@
3
3
  /* premium-work-depth-test.js — My work depth on premium (initiative premium-work-depth; planning/prd/premium-work-depth-prd.md W1 to W12).
4
4
  * The real page from the real server. Most checks answer GET /api/my-work-premium with the model lib/my-work-premium.js builds from a fixture and record every
5
5
  * press the page makes, so the only POSTs allowed are the listed routes, each with the launch nonce. The last block drives the real routes over a scratch state folder.
6
- * W2 edit · W3 steps · W4 Not before · W5 Someday · W6 Focus and jobs · W7 the agent · W8 keys and swipe · W9 Undo · W11 refusals · W12 floors */
6
+ * W2 edit · W3 steps · W4 Not before · W5 Someday · W6 Focus and jobs · W7 the agent · W8 keys and swipe · W9 Undo · W11 refusals · W12 floors
7
+ * Re-pointed to the Agreed design (initiative premium-agreed-design): /premium-work.html is Home now, and My work is a minimal card in the Home
8
+ * Viewer (pm/home-work.js; no "Waiting for design" marker since premium-uncovered-features, canvas HmMyWork), opened from the place menu: More, My work. Your list holds the Work queue's rows; a row
9
+ * opens the item in the same card (its fields sheet, its agent, its draft or source), and Focus and jobs opens the same way. Back, or Escape,
10
+ * goes back to the list. The presses, the routes and the keys and swipe are the same as on the old page. */
7
11
  const fs = require('fs');
8
12
  const path = require('path');
9
13
  const { spawn } = require('child_process');
@@ -63,21 +67,23 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
63
67
  };
64
68
  await page.route('**/api/pm-items/**', rec); await page.route('**/api/pm-jobs/**', rec); await page.route('**/api/my-work/**', rec);
65
69
  await page.route('**/api/briefing-premium/**', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, turns: [], working: false }) }));
66
- await page.goto(BASE + '/premium-work.html?theme=' + theme);
67
- const up = await until(() => page.evaluate(() => document.querySelectorAll('#qBody .wrow').length > 0), 20000);
70
+ await page.goto(BASE + '/premium.html?theme=' + theme);
71
+ await until(() => page.evaluate(() => !!document.querySelector('#czFab')), 15000);
72
+ await page.click('#czFab'); await page.click('[data-cz-more]');
73
+ await page.locator('#hmMenu button').filter({ hasText: 'My work' }).first().click();
74
+ const up = await until(() => page.evaluate(() => document.querySelectorAll('#czViewer:not([hidden]) .mw-list .wrow').length > 0), 20000);
68
75
  return { ctx, page, errors, posts, up, replies, setModel: (m) => { current = m; }, refuse: (f) => { fail = f; }, last: () => posts[posts.length - 1] };
69
76
  };
70
- // re-pointed for premium-agreed-design: on a desktop Home the dialog is the docked chat and is always on, so a row's dialog is "on" when its
71
- // Edit switch (#iTog) is drawn in it, and "off" when the dock is back on your own chat
72
- const rowDlg = () => { const g = document.querySelector('#dlg'); return g.classList.contains('on') && (!document.body.classList.contains('cz-dock') || !!g.querySelector('#iTog')); };
77
+ // re-pointed for premium-agreed-design: the item (or Focus and jobs) is "open" while its view is drawn in the My work card, and "closed" when the card is back on the list
78
+ const rowDlg = () => !!document.querySelector('#czViewer:not([hidden]) .mw-sub');
73
79
  const dlgOn = (p) => until(() => p.evaluate(rowDlg));
74
80
  const dlgOff = (p) => until(() => p.evaluate(rowDlg).then((x) => !x));
75
- /* the Work queue shows one tab at a time: bring up the tab that holds a row before pressing it (each press redraws the tab row, so the button is found again) */
76
- const showKey = (p, key) => p.evaluate((key) => { const has = () => document.querySelector(`#qBody .wrow[data-key="${key}"], #waitBody .wrow[data-key="${key}"]`); if (has()) return true; for (const k of [...document.querySelectorAll('#qTabs .qtb, #qMenu .qtb')].map((b) => b.dataset.tab)) { document.querySelector(`#qTabs [data-tab="${k}"], #qMenu [data-tab="${k}"]`).click(); if (has()) return true; } return false; }, key);
77
- const qTab = async (p, k) => { if (!(await p.locator(`#qTabs [data-tab="${k}"]`).count())) await p.click('#qMore'); await p.click(`#qTabs [data-tab="${k}"], #qMenu [data-tab="${k}"]`); };
78
- /* Escape closes the fields sheet first, then the dialog */
79
- const escAll = async (p) => { await p.keyboard.press('Escape'); if (await p.evaluate(() => document.querySelector('#dlg').classList.contains('on'))) { await sleep(100); await p.keyboard.press('Escape'); } await dlgOff(p); };
80
- const openKey = async (p, key) => { await showKey(p, key); await p.locator(`.wrow[data-key="${key}"] .wrh`).first().click(); await dlgOn(p); await sleep(700); };
81
+ /* Your list holds every row of the queue but Kept and Done: bring the Your list tab up before pressing a row (each press redraws the list, so the button is found again) */
82
+ const showKey = (p, key) => p.evaluate((key) => { const has = () => document.querySelector(`.mw-list .wrow[data-key="${key}"], .mw-wait .wrow[data-key="${key}"]`); if (has()) return true; const y = document.querySelector('#czViewer [data-tab="yours"]'); if (y) y.click(); return !!has(); }, key);
83
+ const qTab = async (p) => { await p.click('#czViewer [data-tab="yours"]'); };
84
+ /* Escape closes the fields sheet first, then the item view */
85
+ const escAll = async (p) => { await p.keyboard.press('Escape'); if (await p.evaluate(rowDlg)) { await sleep(100); await p.keyboard.press('Escape'); } await dlgOff(p); };
86
+ const openKey = async (p, key) => { await showKey(p, key); await p.locator(`.mw-list .wrow[data-key="${key}"] .wrh`).first().click(); await dlgOn(p); await sleep(300); };
81
87
  const undoOf = async (p, direct) => { await until(() => p.evaluate(() => /Undo/.test(document.querySelector('#toast').textContent))); if (direct) { /* the Undo window is 8 s; on a loaded runner the real-server steps before this can outlast it, so press the button itself rather than race the toast's fade */ await p.evaluate(() => document.querySelector('#toast .undo').click()); } else await p.locator('#toast .undo').click(); await sleep(250); };
82
88
 
83
89
  const A = await open();
@@ -88,17 +94,17 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
88
94
  const wait = async (fn) => until(fn, 5000);
89
95
 
90
96
  /* W6 Focus: one quiet chip in the Work queue head; Accept and Not today are in its dialog (premium-calmer-first-screen) */
91
- const bar = await p.evaluate(() => { const b = document.querySelector('#xFocus .xfq'); return { say: b.getAttribute('aria-label'), text: b.textContent, inHead: !!b.closest('#queue .ch'), solid: [...document.querySelectorAll('#xFocus .cta')].length, tag: [...document.querySelectorAll('#qBody .xfc.sug')].map((x) => x.closest('.wrow').dataset.key) }; });
92
- ok('W6 the Focus chip names the first suggestion and why, from the record, and sits in the Work queue head with no Accept on the page', /to walk in with a decision ready/.test(bar.say) && /Suggested · /.test(bar.say) && /1 due today/.test(bar.say) && /^Focus1 suggested$/.test(bar.text) && bar.inHead && bar.solid === 0, JSON.stringify(bar));
97
+ const bar = await p.evaluate(() => { const b = document.querySelector('#xFocus .xfq'); return { say: b.getAttribute('aria-label'), text: b.textContent, inHead: !!b.closest('.mw-list .mw-head'), solid: [...document.querySelectorAll('#xFocus .pri, .mw-list [data-fx]')].length, tag: [...document.querySelectorAll('.mw-list .xfc.sug')].map((x) => x.closest('.wrow').dataset.key) }; });
98
+ ok('W6 the Focus chip names the first suggestion and why, from the record, and sits at the head of Your list with no Accept on the list', /to walk in with a decision ready/.test(bar.say) && /Suggested · /.test(bar.say) && /1 due today/.test(bar.say) && /^Focus\s*1 suggested$/.test(bar.text) && bar.inHead && bar.solid === 0, JSON.stringify(bar));
93
99
  ok('W6 the suggested item\'s row carries a quiet "Suggested focus" tag', bar.tag.join() === 'work:item-bbbbbbbbbbb2', JSON.stringify(bar));
94
- await p.locator('#xFocus [data-xf="more"]').click(); await dlgOn(p); await sleep(600);
100
+ await p.locator('#xFocus [data-xf="more"]').click(); await dlgOn(p); await sleep(300);
95
101
  await p.locator('[data-fx="acc"][data-k="job:job-1"]').click();
96
102
  ok('W6 Accept posts the suggestion to focus/accept with its own fields', await wait(() => A.last() && A.last().path === '/api/pm-items/focus/accept'
97
103
  && JSON.stringify(Object.keys(A.last().body).sort()) === JSON.stringify(['item_ids', 'job', 'key', 'title', 'why']) && A.last().body.key === 'job:job-1' && A.last().body.item_ids.join() === 'item-bbbbbbbbbbb2' && A.last().body.job === 'job-1'), JSON.stringify(A.last()));
98
104
  await undoOf(p);
99
105
  ok('W9 Undo of Accept posts focus/clear for that key', A.last().path === '/api/pm-items/focus/clear' && A.last().body.key === 'job:job-1' && Object.keys(A.last().body).join() === 'key', JSON.stringify(A.last()));
100
- const fd = await p.evaluate(() => ({ title: document.querySelector('#dTitle').textContent, text: document.querySelector('#oMain').textContent, ask: document.querySelector('#askF').hidden, add: document.querySelector('[data-fx="jadd"]').disabled }));
101
- ok('W6 See all lists the suggestion with the item it covers, and the PM\'s jobs with open counts', fd.title === 'Focus and jobs' && /to walk in with a decision ready/.test(fd.text) && /Prepare for the Design review/.test(fd.text) && /When a design review is on the calendar, I want to walk in with a decision ready, so the review ends with a disposition\./.test(fd.text) && /1 open item/.test(fd.text) && !fd.ask, JSON.stringify(fd));
106
+ const fd = await p.evaluate(() => ({ title: document.querySelector('#czVwTitle').textContent, text: document.querySelector('.mw-fj').textContent, wait: !!document.querySelector('.mw-fj .hx-wait'), add: document.querySelector('[data-fx="jadd"]').disabled }));
107
+ ok('W6 See all lists the suggestion with the item it covers, and the PM\'s jobs with open counts', fd.title === 'Focus and jobs' && /to walk in with a decision ready/.test(fd.text) && /Prepare for the Design review/.test(fd.text) && /When a design review is on the calendar, I want to walk in with a decision ready, so the review ends with a disposition\./.test(fd.text) && /1 open item/.test(fd.text) && !fd.wait, JSON.stringify(fd));
102
108
  ok('W6 Add the job stays off until the line has when, I want and so', fd.add && await p.evaluate(async () => { const i = document.querySelector('#xjIn'); i.value = 'when a launch slips'; i.dispatchEvent(new Event('input', { bubbles: true })); return document.querySelector('[data-fx="jadd"]').disabled; }));
103
109
  await p.fill('#xjIn', 'when a launch slips, I want the owner named, so the date holds');
104
110
  ok('W6 …and turns on when it has all three', await p.evaluate(() => !document.querySelector('[data-fx="jadd"]').disabled));
@@ -112,7 +118,7 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
112
118
  { const m = mk((v) => { v.focus = { suggestions: [], accepted: [{ key: 'job:job-1', title: 'to walk in with a decision ready', why: '1 due today', item_ids: ['item-bbbbbbbbbbb2'], job: 'job-1' }], dismissed: [] }; });
113
119
  const R = await open({ model: m }); const t = await R.page.evaluate(() => ({ bar: document.querySelector('#xFocus .xfq').getAttribute('aria-label'), tag: [...document.querySelectorAll('.xfc')].map((x) => x.closest('.wrow').dataset.key) }));
114
120
  ok('W6 an accepted group is named on the bar and tags its Today row with Focus', /Your focus today/.test(t.bar) && t.tag.join() === 'work:item-bbbbbbbbbbb2', JSON.stringify(t));
115
- await R.page.locator('#xFocus [data-xf="more"]').click(); await dlgOn(R.page); await sleep(500);
121
+ await R.page.locator('#xFocus [data-xf="more"]').click(); await dlgOn(R.page); await sleep(300);
116
122
  await R.page.click('[data-fx="clr"]');
117
123
  ok('W6 Clear posts focus/clear, and Undo accepts the group again with the same fields', await until(() => R.last() && R.last().path === '/api/pm-items/focus/clear') && (await undoOf(R.page), R.last().path === '/api/pm-items/focus/accept' && R.last().body.key === 'job:job-1' && R.last().body.item_ids.join() === 'item-bbbbbbbbbbb2'), JSON.stringify(R.last()));
118
124
  await R.ctx.close(); }
@@ -141,7 +147,7 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
141
147
  const sbtn = await txt('[data-p="xt"][data-k="steps"]');
142
148
  ok('W3 the Who does it field counts the item\'s steps and names who does them', /Who does it/.test(sbtn) && /You, Agent drafts · 2 steps/.test(sbtn), sbtn);
143
149
  await field(p, 'steps');
144
- const st = await p.evaluate(() => ({ items: [...document.querySelectorAll('.xsteps li .xst')].map((x) => x.textContent), pressed: [...document.querySelectorAll('.xsteps [aria-pressed="true"]')].map((x) => x.textContent), h: [...document.querySelectorAll('.xpan .cta, .xpan input')].map((b) => Math.round(b.getBoundingClientRect().height)) }));
150
+ const st = await p.evaluate(() => ({ items: [...document.querySelectorAll('.xsteps li .xst')].map((x) => x.textContent), pressed: [...document.querySelectorAll('.xsteps [aria-pressed="true"]')].map((x) => x.textContent), h: [...document.querySelectorAll('.xpan .hx-b, .xpan input')].map((b) => Math.round(b.getBoundingClientRect().height)) }));
145
151
  ok('W3 each step shows who does it, from the record', st.items.join('|') === 'List the open questions|Send the agenda to the team' && st.pressed.join() === 'You,Agent drafts' && st.h.every((x) => x >= 44), JSON.stringify(st));
146
152
  A.replies['/api/pm-items/steps/who'] = { ok: true, who: 'agent-drafts', forced: true };
147
153
  await p.click('[data-p="xwho"][data-sid="step-2"][data-v="agent-does"]');
@@ -149,16 +155,16 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
149
155
  await p.fill('#xsIn', 'Book the room');
150
156
  await p.click('[data-p="xsadd"]');
151
157
  ok('W3 Add posts the item and the text to steps/add', await wait(() => A.last().path === '/api/pm-items/steps/add' && A.last().body.id === 'item-bbbbbbbbbbb2' && A.last().body.text === 'Book the room' && Object.keys(A.last().body).sort().join() === 'id,text'), JSON.stringify(A.last()));
152
- ok('W3 the dialog stays open and the typed step is cleared', await until(() => p.evaluate(() => document.querySelector('#dlg').classList.contains('on') && !!document.querySelector('#xsIn') && document.querySelector('#xsIn').value === '')));
158
+ ok('W3 the item stays open and the typed step is cleared', await until(() => p.evaluate(() => !!document.querySelector('.mw-it') && !!document.querySelector('#xsIn') && document.querySelector('#xsIn').value === '')), await p.evaluate(() => ((document.querySelector('#czViewer:not([hidden]) .cz-vw-body') || {}).textContent || 'no Viewer').slice(0, 300)));
153
159
  const n1 = pc(); await p.click('[data-p="xsadd"]'); await sleep(250);
154
160
  ok('W3 Add with no text posts nothing', pc() === n1);
155
161
  await p.keyboard.press('Escape');
156
- ok('W3 Escape closes the fields sheet first and leaves the dialog open', await until(() => p.evaluate(() => document.querySelector('#iSheet').hidden && document.querySelector('#iTog').getAttribute('aria-expanded') === 'false' && document.querySelector('#dlg').classList.contains('on'))));
162
+ ok('W3 Escape closes the fields sheet first and leaves the item open', await until(() => p.evaluate(() => document.querySelector('#iSheet').hidden && document.querySelector('#iTog').getAttribute('aria-expanded') === 'false' && !!document.querySelector('#czViewer:not([hidden]) .mw-it'))));
157
163
  await escAll(p);
158
164
 
159
165
  /* W4 Not before */
160
166
  await openKey(p, 'work:item-ccccccccccc1');
161
- ok('W4 an item with a Not before day says it on the When field', /Not before 18 Oct/.test(await txt('#card .ffd[data-k="when"]')));
167
+ ok('W4 an item with a Not before day says it on the When field', /Not before 18 Oct/.test(await txt('#card .ffd[data-k="when"]')), await p.evaluate(() => ((document.querySelector('#czViewer:not([hidden]) .cz-vw-body') || {}).textContent || 'no Viewer').slice(0, 300)));
162
168
  await more(p); await p.click('[data-p="xt"][data-k="defer"]');
163
169
  const dq = await p.evaluate(() => [...document.querySelectorAll('[data-p="xdq"]')].map((b) => [b.textContent, b.dataset.v].join('=')));
164
170
  ok('W4 Tomorrow, Monday and In a week are dates from the server\'s day (Fri 16 Oct)', dq.join() === 'Tomorrow=2026-10-17,Monday=2026-10-19,In a week=2026-10-23', dq.join());
@@ -193,7 +199,7 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
193
199
  await p.fill('#agAsk', 'Draft your reply: partial refunds, short');
194
200
  await p.click('[data-p="ag-brief"]');
195
201
  ok('W7 Let the agent draft this posts act brief with the item, the PM\'s words and the workspace', await wait(() => A.last().path === '/api/my-work/act' && A.last().body.action === 'brief' && A.last().body.item === 'item-aaaaaaaaaaa1' && A.last().body.instruction === 'Draft your reply: partial refunds, short' && 'ws' in A.last().body && Object.keys(A.last().body).sort().join() === 'action,instruction,item,ws'), JSON.stringify(A.last()));
196
- ok('W7 the dialog stays open', await p.evaluate(() => document.querySelector('#dlg').classList.contains('on')));
202
+ ok('W7 the item stays open', await p.evaluate(() => !!document.querySelector('#czViewer:not([hidden]) .mw-it')));
197
203
  await escAll(p);
198
204
  await openKey(p, 'work:item-bbbbbbbbbbb3');
199
205
  ok('W7 a working agent shows its state and only Stop', await p.evaluate(() => document.querySelector('.agblk').dataset.state === 'working' && [...document.querySelectorAll('.agblk button')].map((b) => b.textContent.trim()).join() === 'Stop'));
@@ -209,7 +215,7 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
209
215
  /* W7 a ready draft: nothing is posted before the confirm */
210
216
  const RD = await open({ model: mk((v) => { v.work.today[0].origin = 'jira'; v.work.today[0].place = null; }) }), q = RD.page;
211
217
  await openKey(q, 'work:wbs:alpha:4.2');
212
- const rd = await q.evaluate(() => ({ state: document.querySelector('.agblk').dataset.state, tag: document.querySelector('.agpane .agtag').textContent, body: document.querySelector('.agpane').textContent, btn: [...document.querySelectorAll('.agblk .xco b, .agblk > .cact button')].map((b) => b.textContent.trim()), copy: !!document.querySelector('[data-pp="copy"]'), open: !!document.querySelector('[data-pp="open"]') }));
218
+ const rd = await q.evaluate(() => ({ state: document.querySelector('.agblk').dataset.state, tag: document.querySelector('.agpane .agtag').textContent, body: document.querySelector('.agpane').textContent, btn: [...document.querySelectorAll('.agblk .xco b, .agblk > .hx-top button')].map((b) => b.textContent.trim()), copy: !!document.querySelector('[data-pp="copy"]'), open: !!document.querySelector('[data-pp="open"]') }));
213
219
  ok('W7 a ready draft is labelled the agent\'s, unchecked, and shows it in the detail panel with Open and Copy, and offers Post, Edit, Keep, Mark done and Send back', rd.state === 'ready' && /Draft for Jira/.test(rd.tag) && /Agent draft · not checked/.test(rd.body) && /sign off A and B/.test(rd.body) && rd.copy && rd.open && rd.btn.join() === 'Post it to Jira,Edit the draft,Keep it as a draft,Mark it done,Post it to Jira,Send it back with a note', JSON.stringify(rd));
214
220
  const m0 = RD.posts.length; await q.click('[data-p="ag-post"]'); await sleep(300);
215
221
  const cf = await q.evaluate(() => ({ text: document.querySelector('.xcon').textContent, btn: [...document.querySelectorAll('.xcon button')].map((b) => b.textContent.trim()) }));
@@ -242,12 +248,12 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
242
248
  { const R = await open(); await openKey(R.page, 'work:item-bbbbbbbbbbb2');
243
249
  R.refuse({ status: 409, body: { ok: false, error: 'the draft moved on while you read it' } });
244
250
  await more(R.page); await R.page.click('[data-p="xt"][data-k="someday"]'); await sleep(500);
245
- const e = await R.page.evaluate(() => ({ open: document.querySelector('#dlg').classList.contains('on'), msg: document.querySelector('#cardErr').textContent, shown: !document.querySelector('#cardErr').hidden, dis: [...document.querySelectorAll('#card button')].filter((b) => b.disabled && b.id !== 'wBtn').length }));
246
- ok('W11 a refused press shows the server\'s words, keeps the dialog open and leaves the buttons on', e.open && e.shown && /the draft moved on/.test(e.msg) && e.dis === 0, JSON.stringify(e));
251
+ const e = await R.page.evaluate(() => ({ open: !!document.querySelector('#czViewer:not([hidden]) .mw-it'), msg: document.querySelector('#cardErr').textContent, shown: !document.querySelector('#cardErr').hidden, dis: [...document.querySelectorAll('#card button')].filter((b) => b.disabled && b.id !== 'wBtn').length }));
252
+ ok('W11 a refused press shows the server\'s words, keeps the item open and leaves the buttons on', e.open && e.shown && /the draft moved on/.test(e.msg) && e.dis === 0, JSON.stringify(e));
247
253
  await R.ctx.close(); }
248
254
 
249
255
  /* W8 keys */
250
- await showKey(p, 'work:item-bbbbbbbbbbb2'); await p.locator('#qBody .wrow[data-key="work:item-bbbbbbbbbbb2"] .wrh').focus();
256
+ await showKey(p, 'work:item-bbbbbbbbbbb2'); await p.locator('.mw-list .wrow[data-key="work:item-bbbbbbbbbbb2"] .wrh').focus();
251
257
  const desc = await p.evaluate(() => document.activeElement.getAttribute('aria-description'));
252
258
  ok('W8 a row names what the arrows do and that J and K move', /Right arrow: Done\. Left arrow: Tomorrow\. J and K move between rows\./.test(desc || ''), desc);
253
259
  await p.keyboard.press('j');
@@ -255,32 +261,32 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
255
261
  await p.keyboard.press('ArrowRight');
256
262
  ok('W8 Right arrow on a Today row posts done, with Undo', await wait(() => A.last().path === '/api/pm-items/done' && A.last().body.id === 'item-bbbbbbbbbbb2') && await until(() => p.evaluate(() => /Undo/.test(document.querySelector('#toast').textContent))), JSON.stringify(A.last()));
257
263
  await sleep(300);
258
- await showKey(p, 'work:item-bbbbbbbbbbb2'); await p.locator('#qBody .wrow[data-key="work:item-bbbbbbbbbbb2"] .wrh').focus(); await p.keyboard.press('ArrowLeft');
264
+ await showKey(p, 'work:item-bbbbbbbbbbb2'); await p.locator('.mw-list .wrow[data-key="work:item-bbbbbbbbbbb2"] .wrh').focus(); await p.keyboard.press('ArrowLeft');
259
265
  ok('W8 Left arrow on a Today row puts it off to tomorrow (defer to the next day)', await wait(() => A.last().path === '/api/pm-items/defer' && A.last().body.id === 'item-bbbbbbbbbbb2' && A.last().body.until === '2026-10-17'), JSON.stringify(A.last()));
260
266
  await sleep(300);
261
- await showKey(p, 'work:item-aaaaaaaaaaa1'); await p.locator('#qBody .wrow[data-key="work:item-aaaaaaaaaaa1"] .wrh').focus(); await p.keyboard.press('ArrowRight');
267
+ await showKey(p, 'work:item-aaaaaaaaaaa1'); await p.locator('.mw-list .wrow[data-key="work:item-aaaaaaaaaaa1"] .wrh').focus(); await p.keyboard.press('ArrowRight');
262
268
  ok('W8 Right arrow on an Inbox row moves it to Today (flag)', await wait(() => A.last().path === '/api/pm-items/flag' && A.last().body.id === 'item-aaaaaaaaaaa1' && A.last().body.flagged === true), JSON.stringify(A.last()));
263
269
  await sleep(300);
264
- await showKey(p, 'work:item-aaaaaaaaaaa2'); await p.locator('#qBody .wrow[data-key="work:item-aaaaaaaaaaa2"] .wrh').focus(); await p.keyboard.press('ArrowLeft');
270
+ await showKey(p, 'work:item-aaaaaaaaaaa2'); await p.locator('.mw-list .wrow[data-key="work:item-aaaaaaaaaaa2"] .wrh').focus(); await p.keyboard.press('ArrowLeft');
265
271
  ok('W8 Left arrow on an Inbox row sends it to Someday', await wait(() => A.last().path === '/api/pm-items/someday' && A.last().body.id === 'item-aaaaaaaaaaa2'), JSON.stringify(A.last()));
266
272
  await sleep(300);
267
- const n2 = pc(); await showKey(p, 'work:item-eeeeeeeeeee1'); await p.locator('#qBody .wrow[data-key="work:item-eeeeeeeeeee1"] .wrh').focus(); await p.keyboard.press('ArrowLeft'); await sleep(250);
273
+ const n2 = pc(); await showKey(p, 'work:item-eeeeeeeeeee1'); await p.locator('.mw-list .wrow[data-key="work:item-eeeeeeeeeee1"] .wrh').focus(); await p.keyboard.press('ArrowLeft'); await sleep(250);
268
274
  ok('W8 a Someday row has no left action, and posts nothing', pc() === n2);
269
- await p.locator('#waitBody .wrh').first().focus(); await p.keyboard.press('ArrowRight'); await sleep(250);
275
+ await p.click('#czViewer [data-tab="waiting"]'); await p.locator('.mw-wait .wrh').first().focus(); await p.keyboard.press('ArrowRight'); await sleep(250);
270
276
  ok('W8 a Waiting row has no arrow actions, and posts nothing', pc() === n2);
271
- await showKey(p, 'work:wbs:alpha:4.2'); await p.locator('#qBody .wrow[data-key="work:wbs:alpha:4.2"] .wrh').focus();
277
+ await showKey(p, 'work:wbs:alpha:4.2'); await p.locator('.mw-list .wrow[data-key="work:wbs:alpha:4.2"] .wrh').focus();
272
278
  ok('W8 a Today row whose draft is ready offers Review on the right, not Done', /Right arrow: Review/.test(await p.evaluate(() => document.activeElement.getAttribute('aria-description'))));
273
279
  await p.keyboard.press('ArrowRight'); await dlgOn(p);
274
- ok('W8 …and Review opens the dialog without posting', pc() === n2 + 0 || A.last().path !== '/api/pm-items/done');
280
+ ok('W8 …and Review opens the item without posting', pc() === n2 + 0 || A.last().path !== '/api/pm-items/done');
275
281
  await escAll(p);
276
282
  { const r = await open(); const t = r.page;
277
- await showKey(t, 'work:item-aaaaaaaaaaa4'); await t.locator('#qBody .wrow[data-key="work:item-aaaaaaaaaaa4"] .wrh').focus(); await t.keyboard.press('ArrowRight');
283
+ await showKey(t, 'work:item-aaaaaaaaaaa4'); await t.locator('.mw-list .wrow[data-key="work:item-aaaaaaaaaaa4"] .wrh').focus(); await t.keyboard.press('ArrowRight');
278
284
  ok('W8 the keys work on a row you added too (flag)', await until(() => r.last() && r.last().path === '/api/pm-items/flag' && r.last().body.id === 'item-aaaaaaaaaaa4'), JSON.stringify(r.last()));
279
285
  await r.ctx.close(); }
280
286
 
281
287
  /* W8 swipe */
282
288
  const drag = async (pg, key, dx, hold = false) => {
283
- await showKey(pg, key); const loc = pg.locator(`#qBody .wrow[data-key="${key}"] .wrh`); await loc.evaluate((e) => e.scrollIntoView({ block: 'center' })); await sleep(150); // centred, so the Undo toast at the foot of the screen does not cover the row
289
+ await showKey(pg, key); const loc = pg.locator(`.mw-list .wrow[data-key="${key}"] .wrh`); await loc.evaluate((e) => e.scrollIntoView({ block: 'center' })); await sleep(150); // centred, so the Undo toast at the foot of the screen does not cover the row
284
290
  const b = await loc.boundingBox(); const y = b.y + b.height / 2, x = b.x + b.width / 2;
285
291
  await pg.mouse.move(x, y); await pg.mouse.down(); await pg.mouse.move(x + dx / 3, y, { steps: 4 }); await pg.mouse.move(x + dx, y, { steps: 6 });
286
292
  const seen = await pg.evaluate(() => { const rv = document.querySelector('.xrv'); return rv ? { text: rv.textContent.trim(), op: +getComputedStyle(rv).opacity, tr: getComputedStyle(rv.parentElement.querySelector('.wrow')).transform } : null; });
@@ -294,7 +300,7 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
294
300
  ok('W8 a drag of 50 px snaps back and posts nothing', r.posts.length === n3 && s2 && s2.op < 0.7, JSON.stringify([s2, r.posts.length - n3]));
295
301
  const s3 = await drag(t, 'work:item-bbbbbbbbbbb3', -130); await sleep(300);
296
302
  ok('W8 dragging left shows "Tomorrow" and posts defer to the next day', s3 && s3.text === 'Tomorrow' && await until(() => r.last().path === '/api/pm-items/defer' && r.last().body.until === '2026-10-17'), JSON.stringify([s3, r.last()]));
297
- const n4 = r.posts.length; await showKey(t, 'work:item-aaaaaaaaaaa3'); await t.locator('#qBody .wrow[data-key="work:item-aaaaaaaaaaa3"] .wrh').click(); await dlgOn(t);
303
+ const n4 = r.posts.length; await showKey(t, 'work:item-aaaaaaaaaaa3'); await t.locator('.mw-list .wrow[data-key="work:item-aaaaaaaaaaa3"] .wrh').click(); await dlgOn(t);
298
304
  ok('W8 an ordinary click still opens the row and posts nothing', r.posts.length === n4);
299
305
  await r.ctx.close(); }
300
306
  { const r = await open({ rm: true }); const t = r.page;
@@ -317,16 +323,16 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
317
323
  const R = await open({ w: 390, h: 844, theme }), q2 = R.page;
318
324
  const bar2 = await q2.evaluate(() => { const b = document.querySelector('#xFocus').getBoundingClientRect(); return { over: document.documentElement.scrollWidth > innerWidth + 1, w: Math.round(b.width), h: [...document.querySelectorAll('#xFocus button')].map((x) => Math.round(x.getBoundingClientRect().height)) }; });
319
325
  ok(`W12 at 390 px (${theme}) the Focus bar fits and its buttons are 44 px`, !bar2.over && bar2.h.every((x) => x >= 44), JSON.stringify(bar2));
320
- await openKey(q2, 'work:item-bbbbbbbbbbb2'); await q2.click('#dTabs [data-t="chat"]'); await sleep(900);
326
+ await openKey(q2, 'work:item-bbbbbbbbbbb2');
321
327
  const g = {};
322
328
  for (const k of ['edit', 'steps', 'defer']) {
323
329
  await more(q2); await q2.click(`[data-p="xt"][data-k="${k}"]`); await sleep(150);
324
- g[k] = await q2.evaluate(() => ({ over: document.documentElement.scrollWidth > innerWidth + 1 || document.querySelector('#dlg').scrollWidth > document.querySelector('#dlg').clientWidth + 1, small: [...document.querySelectorAll('#card button, #card input, #card select')].filter((b) => !b.closest('[hidden]') && b.getBoundingClientRect().height > 0 && b.getBoundingClientRect().height < 43.5).map((b) => (b.dataset.p || b.id) + ':' + Math.round(b.getBoundingClientRect().height)) }));
330
+ g[k] = await q2.evaluate(() => ({ over: document.documentElement.scrollWidth > innerWidth + 1 || document.querySelector('#czViewer .cz-vw-body').scrollWidth > document.querySelector('#czViewer .cz-vw-body').clientWidth + 1, small: [...document.querySelectorAll('#card button, #card input, #card select')].filter((b) => !b.closest('[hidden]') && b.getBoundingClientRect().height > 0 && b.getBoundingClientRect().height < 43.5).map((b) => (b.dataset.p || b.id) + ':' + Math.round(b.getBoundingClientRect().height)) }));
325
331
  }
326
332
  ok(`W12 at 390 px (${theme}) the edit, steps and Not before panels have no sideways scroll and every control is 44 px`, ['edit', 'steps', 'defer'].every((k) => !g[k].over && g[k].small.length === 0), JSON.stringify(g));
327
333
  await escAll(q2);
328
- await showKey(R.page, 'work:wbs:alpha:4.2'); await R.page.locator('#qBody .wrow[data-key="work:wbs:alpha:4.2"] .wrh').click(); await dlgOn(q2); await sleep(500); await q2.click('#dTabs [data-t="chat"]'); await sleep(900);
329
- const ag = await q2.evaluate(() => ({ over: document.documentElement.scrollWidth > innerWidth + 1 || document.querySelector('#dlg').scrollWidth > document.querySelector('#dlg').clientWidth + 1, small: [...document.querySelectorAll('.agblk button')].filter((b) => b.getBoundingClientRect().height < 43.5).map((b) => b.textContent.trim()) }));
334
+ await showKey(R.page, 'work:wbs:alpha:4.2'); await R.page.locator('.mw-list .wrow[data-key="work:wbs:alpha:4.2"] .wrh').click(); await dlgOn(q2); await sleep(300);
335
+ const ag = await q2.evaluate(() => ({ over: document.documentElement.scrollWidth > innerWidth + 1 || document.querySelector('#czViewer .cz-vw-body').scrollWidth > document.querySelector('#czViewer .cz-vw-body').clientWidth + 1, small: [...document.querySelectorAll('.agblk button')].filter((b) => b.getBoundingClientRect().height < 43.5).map((b) => b.textContent.trim()) }));
330
336
  ok(`W12 at 390 px (${theme}) the agent block has no sideways scroll and its buttons are 44 px`, !ag.over && ag.small.length === 0, JSON.stringify(ag));
331
337
  await R.ctx.close();
332
338
  }
@@ -340,10 +346,13 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
340
346
  pg.on('pageerror', (e) => errs.push(String(e)));
341
347
  const get = (u) => fetch(BASE + u).then((r) => r.json());
342
348
  await pg.goto(BASE + '/premium-work.html');
343
- // re-pointed for premium-agreed-design: /premium-work.html opens Home, whose hero is the Briefing's; the empty list is said by the Work queue
344
- ok('E1 on an empty scratch state the page says the list is empty and Focus has nothing to suggest', await until(() => pg.evaluate(() => /^Nothing needs you right now/.test(document.querySelector('#brief').textContent) && document.querySelector('#qBody').textContent === 'Nothing is placed for today.' && /Nothing to suggest/.test(document.querySelector('#xFocus .xfq').getAttribute('aria-label'))), 20000));
345
- await pg.fill('#capIn', 'Reply to Rina about SSO !p1'); await pg.press('#capIn', 'Enter');
346
- await dlgOn(pg); await sleep(700);
349
+ // re-pointed for premium-agreed-design: /premium-work.html opens Home; My work is the card from the place menu, and an added line is opened from Your list
350
+ await until(() => pg.evaluate(() => /\/premium\.html$/.test(location.pathname) && !!document.querySelector('#czFab')), 15000);
351
+ await pg.click('#czFab'); await pg.click('[data-cz-more]'); await pg.locator('#hmMenu button').filter({ hasText: 'My work' }).first().click();
352
+ ok('E1 on an empty scratch state My work says the list is empty and Focus has nothing to suggest', await until(() => pg.evaluate(() => /Nothing is open/.test((document.querySelector('#czViewer .mw-list') || {}).textContent || '') && /Nothing to suggest/.test(document.querySelector('#xFocus .xfq').getAttribute('aria-label'))), 20000));
353
+ await pg.fill('#hxLine', 'Reply to Rina about SSO !p1'); await pg.click('#czViewer [data-x="add"]');
354
+ await until(() => pg.evaluate(() => !!document.querySelector('.mw-list .wrh')), 8000);
355
+ await pg.locator('.mw-list .wrh').first().click(); await dlgOn(pg); await sleep(300);
347
356
  await more(pg); await pg.click('[data-p="xt"][data-k="edit"]'); await pg.fill('#xeT', 'Reply to Rina about SSO beta'); await pg.fill('#xeD', '2026-10-30'); await pg.click('[data-p="xpri"][data-v="P2"]'); await pg.click('[data-p="xsave"]');
348
357
  await dlgOff(pg);
349
358
  let it = (await get('/api/pm-items')).items.find((i) => /SSO beta/.test(i.title));
@@ -351,7 +360,7 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
351
360
  await undoOf(pg, true); await sleep(300);
352
361
  it = (await get('/api/pm-items')).items.find((i) => i.id === it.id);
353
362
  ok('E3 Undo writes the old values back (the title the parser made, no day, P1)', it.title === 'Reply to Rina about SSO !' && !it.due && it.priority === 'P1', JSON.stringify(it));
354
- await pg.locator('#qBody .wrh').first().click(); await dlgOn(pg); await sleep(700);
363
+ await pg.locator('.mw-list .wrh').first().click(); await dlgOn(pg); await sleep(300);
355
364
  await more(pg); await pg.click('[data-p="xt"][data-k="steps"]');
356
365
  await pg.fill('#xsIn', 'Send the SSO plan to Rina'); await pg.click('[data-p="xsadd"]');
357
366
  ok('E4 a step is added through the real route', await until(async () => ((await get('/api/pm-items')).items.find((i) => i.id === it.id) || {}).steps && (await get('/api/pm-items')).items.find((i) => i.id === it.id).steps.length === 1, 8000));
@@ -365,20 +374,19 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
365
374
  await undoOf(pg, true); await sleep(300);
366
375
  it = (await get('/api/pm-items')).items.find((i) => i.id === it.id);
367
376
  ok('E7 Undo clears it', !it.defer, JSON.stringify(it));
368
- await pg.locator('.wrow, #qBody .wrh').first().click({ trial: true }).catch(() => {});
369
- await pg.locator('#qBody .wrh').first().click(); await dlgOn(pg); await sleep(700);
377
+ await pg.locator('.mw-list .wrh').first().click(); await dlgOn(pg); await sleep(300);
370
378
  await more(pg); await pg.click('[data-p="xt"][data-k="someday"]'); await dlgOff(pg);
371
379
  ok('E8 Someday parks the real record', (await get('/api/pm-items')).work.someday.some((i) => i.id === it.id));
372
380
  await undoOf(pg, true); await sleep(300);
373
381
  ok('E9 Undo brings it back (unpark)', !(await get('/api/pm-items')).work.someday.some((i) => i.id === it.id));
374
- await pg.locator('#qBody .wrh').first().click(); await dlgOn(pg); await sleep(700); await more(pg); await pg.click('[data-p="flag"]'); await dlgOff(pg);
382
+ await pg.locator('.mw-list .wrh').first().click(); await dlgOn(pg); await sleep(300); await more(pg); await pg.click('[data-p="flag"]'); await dlgOff(pg);
375
383
  ok('E10 once the item is in Today, Focus suggests it and the bar says why', await until(() => pg.evaluate(() => /Suggested · /.test(document.querySelector('#xFocus .xfq').getAttribute('aria-label'))), 8000));
376
- await pg.click('#xFocus [data-xf="more"]'); await dlgOn(pg); await sleep(500);
384
+ await pg.click('#xFocus [data-xf="more"]'); await dlgOn(pg); await sleep(300);
377
385
  await pg.locator('[data-fx="acc"]').first().click();
378
- ok('E11 Accept writes the group to today\'s Focus, and the Today row carries the Focus tag', await until(async () => (await get('/api/pm-items')).focus.accepted.length === 1, 8000) && (await escAll(pg), await qTab(pg, 'today'), await until(() => pg.evaluate(() => !!document.querySelector('#qBody .xfc:not(.sug)')), 8000)));
379
- await pg.click('#xFocus [data-xf="more"]'); await dlgOn(pg); await sleep(500);
386
+ ok('E11 Accept writes the group to today\'s Focus, and the Today row carries the Focus tag', await until(async () => (await get('/api/pm-items')).focus.accepted.length === 1, 8000) && (await escAll(pg), await qTab(pg), await until(() => pg.evaluate(() => !!document.querySelector('.mw-list .xfc:not(.sug)')), 8000)));
387
+ await pg.click('#xFocus [data-xf="more"]'); await dlgOn(pg); await sleep(300);
380
388
  await pg.fill('#xjIn', 'when a launch slips, I want the owner named, so the date holds'); await pg.click('[data-fx="jadd"]');
381
- ok('E12 Add a job writes it, and the dialog lists it with its open count', await until(async () => (await get('/api/pm-items')).jobs.length === 1, 8000) && await until(() => pg.evaluate(() => /the owner named/.test(document.querySelector('#oMain').textContent) && /0 open items/.test(document.querySelector('#oMain').textContent)), 8000));
389
+ ok('E12 Add a job writes it, and the dialog lists it with its open count', await until(async () => (await get('/api/pm-items')).jobs.length === 1, 8000) && await until(() => pg.evaluate(() => /the owner named/.test(document.querySelector('.mw-fj').textContent) && /0 open items/.test(document.querySelector('.mw-fj').textContent)), 8000));
382
390
  await pg.click('[data-fx="clr"]');
383
391
  ok('E13 Clear forgets today\'s accept', await until(async () => (await get('/api/pm-items')).focus.accepted.length === 0, 8000));
384
392
  const hdr = await T.pressHeaders(BASE);