create-pmos 0.397.0 → 0.398.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 (145) hide show
  1. package/package.json +13 -13
  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 +101 -52
  8. package/workspace/briefing-premium-board-test.js +252 -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 +86 -196
  12. package/workspace/briefing-premium-doc-edit-test.js +95 -83
  13. package/workspace/briefing-premium-initiative-test.js +159 -296
  14. package/workspace/briefing-premium-insights-test.js +337 -219
  15. package/workspace/briefing-premium-metrics-test.js +53 -97
  16. package/workspace/briefing-premium-products-test.js +40 -27
  17. package/workspace/briefing-premium-sources-test.js +66 -48
  18. package/workspace/briefing-premium-test.js +150 -647
  19. package/workspace/briefing-premium-work-test.js +88 -283
  20. package/workspace/changelog.json +12 -0
  21. package/workspace/fixtures/board-premium-trail.js +32 -0
  22. package/workspace/fixtures/premium-viewer-fixtures.js +182 -0
  23. package/workspace/guide/briefing-premium.md +3 -1
  24. package/workspace/guide/home.md +47 -0
  25. package/workspace/guide/index.md +1 -0
  26. package/workspace/lib/agent-roles.js +71 -0
  27. package/workspace/lib/board-premium.js +85 -19
  28. package/workspace/lib/board-trail.js +223 -0
  29. package/workspace/lib/home-work-item.js +58 -0
  30. package/workspace/lib/insights-goals.js +196 -0
  31. package/workspace/lib/insights-premium.js +62 -14
  32. package/workspace/lib/insights-records.js +101 -0
  33. package/workspace/lib/jira-tickets.js +1 -1
  34. package/workspace/lib/route-modules.js +4 -0
  35. package/workspace/lib/routes-board-trail.js +33 -0
  36. package/workspace/lib/routes-home-desk.js +176 -0
  37. package/workspace/lib/routes-insights-premium.js +12 -3
  38. package/workspace/lib/routes-insights-records.js +129 -0
  39. package/workspace/lib/routes-notes.js +1 -0
  40. package/workspace/lib/routes-viewer.js +108 -0
  41. package/workspace/lib/transcript-steps.js +123 -0
  42. package/workspace/lib/viewer-meeting.js +205 -0
  43. package/workspace/lib/viewer-report.js +89 -0
  44. package/workspace/package-lock.json +2 -2
  45. package/workspace/package.json +1 -1
  46. package/workspace/premium-board-actions-test.js +85 -75
  47. package/workspace/premium-briefing-depth-test.js +66 -53
  48. package/workspace/premium-chat-attach-test.js +54 -63
  49. package/workspace/premium-chat-chart-tab-test.js +35 -37
  50. package/workspace/premium-chat-context-test.js +19 -18
  51. package/workspace/premium-chat-goal-view-test.js +23 -23
  52. package/workspace/premium-chat-notes-test.js +26 -31
  53. package/workspace/premium-chat-report-tab-test.js +32 -28
  54. package/workspace/premium-chat-term-test.js +16 -16
  55. package/workspace/premium-chat-viewer-test.js +60 -59
  56. package/workspace/premium-core-doc-issue-test.js +50 -43
  57. package/workspace/premium-html-viewer-test.js +14 -17
  58. package/workspace/premium-phone-card-test.js +7 -2
  59. package/workspace/premium-phone-room-test.js +41 -35
  60. package/workspace/premium-report-read-test.js +115 -197
  61. package/workspace/premium-viewer-download-test.js +19 -22
  62. package/workspace/premium-viewer-flicker-test.js +11 -16
  63. package/workspace/premium-viewer-share-test.js +6 -9
  64. package/workspace/premium-viewer-test.js +41 -60
  65. package/workspace/premium-vw-backlog-test.js +53 -33
  66. package/workspace/premium-vw-cal-test.js +82 -128
  67. package/workspace/premium-vw-copy-test.js +17 -33
  68. package/workspace/premium-vw-doc-test.js +11 -10
  69. package/workspace/premium-vw-item-test.js +50 -49
  70. package/workspace/premium-vw-jira-test.js +53 -27
  71. package/workspace/premium-vw-meet-test.js +118 -187
  72. package/workspace/premium-vw-notes-test.js +85 -108
  73. package/workspace/premium-vw-rec-test.js +72 -194
  74. package/workspace/premium-vw-slides-test.js +46 -50
  75. package/workspace/premium-welcome-test.js +3 -2
  76. package/workspace/premium-work-depth-test.js +61 -53
  77. package/workspace/public/pm/bd-acts.js +305 -0
  78. package/workspace/public/pm/bd-span.js +186 -82
  79. package/workspace/public/pm/bd-stages.js +25 -11
  80. package/workspace/public/pm/c3-doc-sheet.js +1 -1
  81. package/workspace/public/pm/c3-md.js +3 -395
  82. package/workspace/public/pm/c3-phone-detail.js +1 -1
  83. package/workspace/public/pm/c3-phone-model.js +3 -68
  84. package/workspace/public/pm/chat-term.js +3 -3
  85. package/workspace/public/pm/cozy-board.css +497 -230
  86. package/workspace/public/pm/cozy-home.css +570 -142
  87. package/workspace/public/pm/cozy-home.js +5 -3
  88. package/workspace/public/pm/cozy-insights.css +296 -167
  89. package/workspace/public/pm/cozy-md.js +396 -0
  90. package/workspace/public/pm/cozy-nav.js +17 -6
  91. package/workspace/public/pm/cozy-placeholder.js +26 -0
  92. package/workspace/public/pm/cozy-viewer.css +3 -3
  93. package/workspace/public/pm/cozy-viewer.js +144 -0
  94. package/workspace/public/pm/cozy-vw.css +485 -0
  95. package/workspace/public/pm/cozy.css +83 -1
  96. package/workspace/public/pm/home-adddoc.js +48 -0
  97. package/workspace/public/pm/home-app.js +905 -0
  98. package/workspace/public/pm/home-around.js +515 -0
  99. package/workspace/public/pm/home-chat.js +459 -0
  100. package/workspace/public/pm/home-data.js +312 -0
  101. package/workspace/public/pm/home-draft.js +68 -0
  102. package/workspace/public/pm/home-more.js +249 -0
  103. package/workspace/public/pm/home-phone-card.js +109 -0
  104. package/workspace/public/pm/home-work.js +519 -0
  105. package/workspace/public/pm/phone-moment.js +69 -0
  106. package/workspace/public/pm/pm-work-view.js +1 -1
  107. package/workspace/public/pm/premium-attach.js +4 -0
  108. package/workspace/public/pm/premium-board.js +423 -394
  109. package/workspace/public/pm/premium-chart-tab.js +110 -62
  110. package/workspace/public/pm/premium-deck.js +3 -3
  111. package/workspace/public/pm/premium-first.js +25 -21
  112. package/workspace/public/pm/premium-insights.js +792 -568
  113. package/workspace/public/pm/premium-meeting.js +61 -549
  114. package/workspace/public/pm/premium-notes.js +1 -1
  115. package/workspace/public/pm/premium-report-frame.css +20 -0
  116. package/workspace/public/pm/premium-report-read.js +509 -480
  117. package/workspace/public/pm/premium-report-tab.js +87 -63
  118. package/workspace/public/pm/premium-shell.js +72 -119
  119. package/workspace/public/pm/premium-viewer.js +22 -1
  120. package/workspace/public/pm/premium-vw-cal.js +187 -48
  121. package/workspace/public/pm/premium-vw-doc.css +6 -0
  122. package/workspace/public/pm/premium-vw-doc.js +40 -2
  123. package/workspace/public/pm/premium-vw-file.js +2 -2
  124. package/workspace/public/pm/premium-vw-meet.js +6 -83
  125. package/workspace/public/pm/premium-vw-mtg.js +731 -0
  126. package/workspace/public/pm/premium-vw-notes.js +56 -69
  127. package/workspace/public/pm/premium-vw-open.js +35 -0
  128. package/workspace/public/pm/premium-vw-page.js +16 -0
  129. package/workspace/public/pm/premium-vw-rec.js +11 -218
  130. package/workspace/public/pm/premium-vw-slides.css +5 -0
  131. package/workspace/public/pm/premium-vw-slides.js +44 -8
  132. package/workspace/public/pm/term-view.js +22 -0
  133. package/workspace/public/premium-board.html +28 -70
  134. package/workspace/public/premium-initiative.html +8 -48
  135. package/workspace/public/premium-insights.html +22 -60
  136. package/workspace/public/premium-viewer.html +20 -0
  137. package/workspace/public/premium.html +16 -107
  138. package/workspace/server.js +18 -3
  139. package/workspace/test-files.json +1 -0
  140. package/workspace/test-lists/home-libs.json +9 -0
  141. package/workspace/test-lists/premium-report-read.json +1 -1
  142. package/workspace/test-lists/premium-vw-agreed.json +9 -0
  143. package/workspace/test-lists/premium-vw-notes.json +1 -1
  144. package/workspace/public/pm/premium-work.js +0 -729
  145. package/workspace/public/pm/premium.js +0 -1146
@@ -1,11 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
  'use strict';
3
3
  /* briefing-premium-work-test.js — the premium My work page (initiative briefing-premium-work; planning/prd/briefing-premium-work-prd.md M1 to M12).
4
- * Serves 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
5
- * (fixtures/my-work-premium-facts.js) and answer the presses themselves, so no real item is touched; the last block drives the real routes of a scratch state folder.
6
- * M1 rail and place · M2 hero · M3 add · M4 the plate · M5 agents (held controls) · M6 waiting · M7 review · M8 presses · M9 one count
7
- * M10 header · M11 refusals · M12 floors and fidelity against the mockup
8
- */
4
+ * Re-pointed by premium-agreed-design: My work is no longer a page. /premium-work.html opens Home, and My work is a minimal view in the Viewer
5
+ * (home-more.js openMyWork, from the place menu's More), marked "Waiting for design": four tabs (Your list, Waiting on others, Weekly review,
6
+ * Untouched), Done on each of your rows, and one add box. The old page's hero, dialog fields (When, Waiting on, Keep, Drop), Undo and the
7
+ * per-item agent are not in the Agreed design and are not drawn; their routes stay and the last block still drives them for real.
8
+ * Serves 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
9
+ * fixture (fixtures/my-work-premium-facts.js) and answer the presses themselves; the last block drives the real routes of a scratch state folder.
10
+ * M1 the address and the way in · M3 add · M4 your list · M6 waiting · M7 review and untouched · M8 Done · M10 a failed read · M11 a refusal
11
+ * M12 floors at 390 · E1-E7 the real routes */
9
12
  const path = require('path');
10
13
  const { spawn } = require('child_process');
11
14
  const { findBrowser } = require('./lib/find-browser');
@@ -15,18 +18,9 @@ const F = require('./fixtures/my-work-premium-facts.js');
15
18
 
16
19
  const BASE = T.BASE;
17
20
  const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
18
- const until = async (fn, ms = 10000, step = 100) => { const t0 = Date.now(); for (;;) { const v = await fn(); if (v) return v; if (Date.now() - t0 > ms) return v; await sleep(step); } };
19
- /* 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) */
20
- const showKey = (pg, key) => pg.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);
21
- /* re-pointed for premium-agreed-design: on a desktop Home the dialog is the docked chat and is always on, so "a dialog is open" below means a row's
22
- * dialog: #dlg is on and, when docked, not showing your own chat (its eyebrow reads Chat) */
21
+ const until = async (fn, ms = 10000, step = 100) => { const t0 = Date.now(); for (;;) { let v; try { v = await fn(); } catch { v = null; } if (v) return v; if (Date.now() - t0 > ms) return v; await sleep(step); } };
23
22
  const results = [];
24
- const ok = (name, cond, extra = '') => { results.push({ name, cond: !!cond }); console.log(`${cond ? '✓' : '✗'} ${name}${!cond && extra !== '' ? ' — ' + extra : ''}`); };
25
- /* the dialog's fields (premium-simple-ui): a field opens its panel; When holds Today, Not yet, Not before and Someday */
26
- /* the fields sit in a sheet behind Edit ▾ in the dialog's switch row, closed by default (PM, 2026-10-20) */
27
- const sheet = async (pg) => { if (await pg.locator('#iTog[aria-expanded="false"]').count()) await pg.click('#iTog'); };
28
- const field = async (pg, k) => { await sheet(pg); if (await pg.locator(`#card .ffd[data-k="${k}"][aria-expanded="false"]`).count()) await pg.click(`#card .ffd[data-k="${k}"]`); };
29
- const more = (pg) => field(pg, 'when');
23
+ const ok = (name, cond, extra = '') => { results.push({ name, cond: !!cond }); console.log(`${cond ? '✓' : '✗'} ${name}${!cond && extra !== '' ? ' — ' + String(extra).slice(0, 600) : ''}`); };
30
24
  let srv = null; let browser = null;
31
25
  const finish = async (code) => {
32
26
  if (browser) await browser.close().catch(() => {});
@@ -39,6 +33,8 @@ const finish = async (code) => {
39
33
  process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
40
34
 
41
35
  const mk = () => WP.build({ v: F.view(), now: F.NOW });
36
+ const MW = '#czViewer:not([hidden])';
37
+ const view = () => { const v = document.querySelector('#czViewer:not([hidden])'); if (!v) return null; return { kind: (v.querySelector('.cz-vw-kind') || {}).textContent, wait: !!v.querySelector('.hx-wait'), tab: (v.querySelector('.hx-tabs [aria-selected="true"]') || {}).textContent || '', tabs: [...v.querySelectorAll('.hx-tabs [role=tab]')].map((b) => b.textContent), rows: [...v.querySelectorAll('.hx-row b, .hx-row strong')].map((b) => b.textContent), text: v.textContent.replace(/\s+/g, ' '), done: v.querySelectorAll('[data-done]').length }; };
42
38
 
43
39
  (async () => {
44
40
  const exe = findBrowser();
@@ -49,299 +45,108 @@ const mk = () => WP.build({ v: F.view(), now: F.NOW });
49
45
  await T.waitForServer(BASE);
50
46
  browser = await chromium.launch({ executablePath: exe });
51
47
 
52
- /* a page whose list and presses the test answers */
53
- const open = async ({ w = 1280, h = 900, theme = 'light', model = mk() } = {}) => {
54
- const ctx = await browser.newContext({ viewport: { width: w, height: h } });
48
+ /* a page whose list and presses the test answers; My work is opened the way the PM opens it: the place menu, More, My work */
49
+ const open = async ({ w = 1280, h = 900, theme = 'light', model = mk(), fail = false, real = false } = {}) => {
50
+ const ctx = await browser.newContext({ viewport: { width: w, height: h }, colorScheme: theme, hasTouch: w < 1000 });
55
51
  const page = await ctx.newPage();
56
- let current = model; const errors = [], posts = []; let answer = { status: 200, body: { ok: true } }; let thread = { ok: true, turns: [], working: false }; let gets = 0;
52
+ const errors = [], posts = []; let answer = { status: 200, body: { ok: true } };
57
53
  page.on('pageerror', (e) => errors.push(String((e && e.message) || e)));
58
- await page.route('**/api/my-work-premium', (r) => { gets++; r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, state: 'ready', model: current, as_of: Date.now() }) }); });
59
- await page.route('**/api/pm-items/**', (r) => { const rq = r.request(); posts.push({ path: new URL(rq.url()).pathname, body: JSON.parse(rq.postData() || '{}'), headers: rq.headers() }); r.fulfill({ status: answer.status, contentType: 'application/json', body: JSON.stringify(answer.body) }); });
60
- await page.route('**/api/briefing-premium/**', (r) => { const rq = r.request(); if (rq.method() === 'GET') return r.fulfill({ contentType: 'application/json', body: JSON.stringify(thread) }); posts.push({ path: new URL(rq.url()).pathname, body: JSON.parse(rq.postData() || '{}'), headers: rq.headers() }); return r.fulfill({ status: answer.status, contentType: 'application/json', body: JSON.stringify(answer.body) }); });
54
+ if (!real) {
55
+ await page.route('**/api/my-work-premium*', (r) => r.fulfill({ status: fail ? 500 : 200, contentType: 'application/json', body: JSON.stringify(fail ? { ok: false, error: 'the list could not be read' } : { ok: true, state: 'ready', model, as_of: Date.now() }) }));
56
+ await page.route('**/api/pm-items/**', (r) => { const rq = r.request(); posts.push({ path: new URL(rq.url()).pathname, body: JSON.parse(rq.postData() || '{}'), headers: rq.headers() }); r.fulfill({ status: answer.status, contentType: 'application/json', body: JSON.stringify(answer.body) }); });
57
+ }
61
58
  await page.goto(BASE + '/premium-work.html?theme=' + theme);
62
- const up = await until(() => page.evaluate(() => document.querySelectorAll('#qBody .wrow').length > 0), 20000);
63
- return { ctx, page, errors, posts, up, setModel: (m) => { current = m; }, set: (a) => { answer = a; }, setThread: (t) => { thread = t; }, gets: () => gets };
59
+ await until(() => page.evaluate(() => /\/premium\.html$/.test(location.pathname) && !!document.querySelector('#czFab')), 15000);
60
+ await sleep(600);
61
+ await page.click('#czFab'); await page.click('[data-cz-more]');
62
+ await page.locator('#hmMenu button, #czViewer button').filter({ hasText: 'My work' }).first().click();
63
+ const up = await until(() => page.evaluate(() => { const v = document.querySelector('#czViewer:not([hidden])'); return !!v && /My work/.test(v.textContent) && !/Reading your list/.test(v.textContent); }), 15000);
64
+ return { ctx, page, errors, posts, up, set: (a) => { answer = a; } };
64
65
  };
65
66
 
67
+ const M = mk();
66
68
  const A = await open();
67
- ok('0 the page draws the Work queue', A.up);
69
+ const p = A.page;
70
+ ok('0 My work opens in the Viewer', !!A.up);
68
71
  if (!A.up) return finish(1);
69
- const p = A.page, M = mk();
70
- const txt = (s) => p.evaluate((q) => (document.querySelector(q) || {}).textContent || '', s);
71
-
72
72
  /* M1 */
73
- const rail = await p.evaluate(() => ({ names: [...document.querySelectorAll('.rail .pl')].map((b) => b.textContent.trim()), cur: document.querySelector('.rail [aria-current="page"]').textContent.trim(), go: [...document.querySelectorAll('.rail [data-go]')].map((b) => b.dataset.go), pi: getComputedStyle(document.querySelector('.rail')).getPropertyValue('--pi').trim(), title: document.title }));
74
- // premium-agreed-design H3: My work opens Home, which holds the Work queue; the floating place menu replaces the rail and marks Home
75
- const nav = await p.evaluate(() => ({ cur: (document.querySelector('#czMenu [aria-current="page"]') || {}).textContent || '', railShown: !!document.querySelector('.rail') && getComputedStyle(document.querySelector('.rail')).display !== 'none' }));
76
- ok('M1 My work opens Home: the place menu marks Home and the rail is not on screen', /PMOS · Home/.test(rail.title) && nav.cur === 'Home' && !nav.railShown, JSON.stringify({ rail, nav }));
77
- { await p.click('#moreBtn'); const tc = await p.evaluate(() => { const a = document.querySelector('#toConsole'); if (!a) return null; const r = a.getBoundingClientRect(); return { href: a.getAttribute('href'), label: a.getAttribute('aria-label'), w: Math.round(r.width), h: Math.round(r.height), tab: a.tabIndex }; }); ok('M1 the ⋯ menu links to the console (premium-console-link, premium-topbar)', tc && tc.href === '/console.html' && tc.label === 'Open the console' && tc.w >= 44 && tc.h >= 44 && tc.tab === 0, JSON.stringify(tc)); await p.keyboard.press('Escape'); }
78
- const res = await fetch(BASE + '/premium-work').then((r) => r.status);
79
- ok('M13 My work has no Calendar card: the Briefing holds the calendar (premium-calendar-card A1)', await p.evaluate(() => !document.querySelector('#weekCard') && ![...document.querySelectorAll('h2')].some((h) => /Calendar|This week/.test(h.textContent))));
80
- ok('M1 the page is served at /premium-work and /premium-work.html', res === 200 && (await fetch(BASE + '/premium-work.html')).status === 200);
81
- {
82
- // re-pointed for premium-agreed-design: the rail is hidden and the floating place menu replaces it; its Home entry opens the Briefing (Home) page
83
- const r2 = await open(); await r2.page.click('#czFab'); await r2.page.locator('#czMenu a[href="/premium.html"]').click();
84
- ok('M1 the Briefing button opens the Briefing page', await until(() => /\/premium\.html$/.test(r2.page.url()), 5000), r2.page.url());
85
- await r2.ctx.close();
86
- }
87
-
88
- /* M2 */
89
- // re-pointed for premium-agreed-design: My work opens Home, whose hero is the Briefing's; what the list holds is said by the Work queue's caption
90
- // (the count marked) and its tabs, and the waiting card's caption
91
- const hero = await p.evaluate(() => ({ text: document.querySelector('#qCap').textContent, k: [...document.querySelectorAll('#qCap b')].map((x) => x.textContent), tabs: [...document.querySelectorAll('#qTabs .qtb, #qMenu .qtb')].map((b) => b.textContent).join(), wait: document.querySelector('#waitCap').textContent }));
92
- ok('M2 the hero is the model\'s sentences, numbers marked', hero.text === [M.queue.n + ' to clear', ...M.queue.cap].join(' · ') && hero.k.join() === String(M.queue.n), hero.text);
93
- ok('M2 the hero says what the records hold', /Today3/.test(hero.tabs) && /Inbox4/.test(hero.tabs) && hero.wait === 'longest 8 days', JSON.stringify(hero));
94
-
95
- /* M10 */
96
- // re-pointed for premium-agreed-design: Home's header is the Briefing's (its own suites read it), so what is real about the list is said by the
97
- // Work queue itself: the Inbox names Jira and Slack as the source of what they hold, and the Done tab says their items close there, not here
98
- {
99
- const r10 = await open(), pg10 = r10.page;
100
- await pg10.click('#qTabs [data-tab="inbox"]'); const inb = await pg10.evaluate(() => document.querySelector('#qBody').textContent);
101
- await pg10.click('#qMore'); await pg10.click('#qMenu [data-tab="done"]'); const dn = await pg10.evaluate(() => document.querySelector('#qNote').textContent);
102
- ok('M10 the header says what is real and that Jira and Slack appear only when read', /New from Jira and Slack/.test(inb) && /Items from Jira or Slack close there, not here/.test(dn), dn);
103
- await r10.ctx.close();
104
- }
105
-
106
- /* M4 the Work queue: one card, a tab for each place a thing waits */
107
- const qtab = async (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}"]`); };
108
- const q = await p.evaluate(() => ({ tabs: [...document.querySelectorAll('#qTabs .qtb')].map((b) => b.textContent), rest: [...document.querySelectorAll('#qMenu .qtb')].map((b) => b.textContent), menuShut: document.querySelector('#qMenu').hidden && document.querySelector('#qMore').getAttribute('aria-expanded') === 'false', sel: [...document.querySelectorAll('#qTabs [aria-selected="true"]')].map((b) => b.dataset.tab), tops: new Set([...document.querySelectorAll('#qTabs .qtb')].map((b) => Math.round(b.getBoundingClientRect().top))).size, cap: document.querySelector('#qCap').textContent, first: [...document.querySelectorAll('.tgf')].map((x) => x.closest('.wrow').dataset.key), titles: [...document.querySelectorAll('#qBody .wtit')].map((x) => x.textContent.replace('Do this first', '')), chips: [...document.querySelectorAll('#qBody .due')].map((x) => x.textContent), od: [...document.querySelectorAll('#qBody .due.od')].length, ck: [...document.querySelectorAll('#qBody .wck')].map((b) => Math.round(b.getBoundingClientRect().height)), cols: new Set([...document.querySelectorAll('#qBody > *')].map((e) => Math.round(e.getBoundingClientRect().left))).size, old: ['#plate', '#agCard', '#trayCard'].filter((x) => document.querySelector(x)), title: document.querySelector('#hQueue').textContent }));
109
- // re-pointed for premium-agreed-design: on Home the Work queue card is headed "Your list"
110
- ok('M4 one Work queue card replaces On your plate, With agents and the tray', q.title === 'Your list' && q.old.length === 0, JSON.stringify(q));
111
- ok('M4 Today and Inbox sit in one pill row with their counts; Upcoming, Someday, Kept and Done wait under a shut More (no Agents tab); the card opens on Today', q.tabs.join() === 'Today3,Inbox4' && q.rest.join() === 'Upcoming2,Someday1,Kept0,Done0' && q.menuShut && q.sel.join() === 'today' && q.tops === 1, JSON.stringify(q));
112
- await p.click('#qMore'); await p.click('#qMenu [data-tab="someday"]');
113
- const mo = await p.evaluate(() => ({ row: [...document.querySelectorAll('#qTabs .qtb')].map((b) => b.dataset.tab), sel: document.querySelector('#qTabs [aria-selected="true"]').dataset.tab, shut: document.querySelector('#qMenu').hidden, n: document.querySelectorAll('#qBody .wrow').length }));
114
- ok('M4 a tab picked under More takes its place in the row, is chosen, and the menu shuts', mo.row.join() === 'today,inbox,someday' && mo.sel === 'someday' && mo.shut && mo.n === 1, JSON.stringify(mo));
115
- await qtab('today');
116
- // re-pointed for premium-agreed-design: on a desktop Home the list sits in the left column, so its rows stack in one column
117
- ok('M4 Today holds its rows in two columns, with a due chip only where a date was set; the overdue one says so', q.cols === 1 && q.titles.length === 3 && q.titles[0] === 'Sign off the fit-out contractor shortlist' && q.chips.join() === 'Overdue · 15 Oct,Today' && q.od === 1, JSON.stringify(q));
118
- ok('M4 "Do this first" tags the overdue item only, and a check circle is 44 px', q.first.length === 1 && q.first[0] === 'work:wbs:alpha:4.2' && q.ck.length === 3 && q.ck.every((h) => h >= 44), JSON.stringify([q.first, q.ck]));
119
- const dec = await p.evaluate(() => { const b = document.querySelector('#qBody .wrow[data-key="work:wbs:alpha:4.2"] .wck'); const r = b.closest('.wrow'); return { dec: b.classList.contains('dec'), eye: !!b.querySelector('circle'), label: b.getAttribute('aria-label'), first: r.classList.contains('first'), tagBlock: getComputedStyle(r.querySelector('.tgf')).display, bar: getComputedStyle(r).boxShadow !== 'none', others: [...document.querySelectorAll('#qBody .wck')].filter((x) => x !== b).every((x) => !x.classList.contains('dec')) }; });
120
- ok('M4 an item whose agent draft is ready has a highlighted eye circle (not a check), the first overdue row carries the ember bar and its tag sits on its own line', dec.dec && dec.eye && /^Review the agent draft/.test(dec.label) && dec.first && dec.tagBlock === 'block' && dec.bar && dec.others, JSON.stringify(dec));
121
- await qtab('inbox');
122
- const ib = await p.evaluate(() => ({ labels: [...document.querySelectorAll('#qBody .wsec .label')].map((x) => x.textContent), counts: [...document.querySelectorAll('#qBody .wsec em')].map((x) => x.textContent), glyphs: [...document.querySelectorAll('#qBody .inb .wgl')].map((x) => x.title), titles: [...document.querySelectorAll('#qBody .wtit')].map((x) => x.textContent), checks: document.querySelectorAll('#qBody .wck').length, note: document.querySelector('#qNote').textContent, focus: document.activeElement && document.activeElement.dataset.tab }));
123
- ok('M4 Inbox holds what is new from Jira and Slack, then what you added, each with its source; nothing there has a check', ib.labels.join() === 'New from Jira and Slack,Added by you' && /^3 · counts to clear/.test(ib.counts[0]) && /^1 · not counted/.test(ib.counts[1]) && ib.glyphs.join() === 'Jira,Jira,Slack,Yours' && ib.titles[3] === 'Is the payment-step experiment worth another week?' && ib.checks === 0 && /counts to clear only once you place it/.test(ib.note) && ib.focus === 'inbox', JSON.stringify(ib));
124
- await p.focus('#qTabs [data-tab="inbox"]'); await p.keyboard.press('ArrowRight');
125
- ok('M4 the arrow keys move between tabs', await p.evaluate(() => document.activeElement.dataset.tab === 'upcoming' && document.querySelector('#qTabs [aria-selected="true"]').dataset.tab === 'upcoming'));
126
- ok('M4 the add box has no Enter label', !(await p.evaluate(() => !!document.querySelector('#cap kbd'))));
127
- ok('M4 no suggestion, no estimate and no demo label is drawn', !(await p.evaluate(() => /Accept all|~\d+ min|demo|fold the laundry|on the shelf|composts/i.test(document.querySelector('#queue').textContent))));
128
-
129
- /* M5 no Agents tab: the agent's state is a chip on the row, in the tab where the item waits (PM, 2026-10-20) */
130
- const chips = () => p.evaluate(() => [...document.querySelectorAll('#qBody .wrow')].map((r) => [r.dataset.key, (r.querySelector('.wag') || {}).textContent || ''].join('=')).filter((x) => !/=$/.test(x)));
131
- const upc = await chips();
132
- await qtab('today'); const tdc = await chips();
133
- ok('M5 a failed run shows "Agent stopped" on its Upcoming row; Today shows "Draft ready" and "Agent working"; there are no counts tiles', upc.join() === 'work:item-ccccccccccc2=Agent stopped' && tdc.sort().join() === 'work:item-bbbbbbbbbbb3=Agent working,work:wbs:alpha:4.2=Draft ready' && !(await p.evaluate(() => !!document.querySelector('#qPipe'))), JSON.stringify({ upc, tdc }));
134
- await qtab('today');
135
-
73
+ ok('M1 /premium-work.html opens Home, the place menu marks Home and nothing on the page is the old My work page', await p.evaluate(() => /\/premium\.html$/.test(location.pathname) && /Home/.test((document.querySelector('#czMenu [aria-current="page"]') || {}).textContent || '') && !document.querySelector('#qBody, #capIn, nav.rail')));
74
+ ok('M1 the page is still served at /premium-work and /premium-work.html', (await fetch(BASE + '/premium-work', { redirect: 'manual' })).status === 302 && (await fetch(BASE + '/premium-work.html')).status === 200);
75
+ /* M4 */
76
+ const v0 = await p.evaluate(view);
77
+ ok('M4 My work is a minimal view marked Waiting for design, with four tabs, on Your list', v0.kind === 'My work' && v0.wait && v0.tabs.join() === 'Your list,Waiting on others,Weekly review,Untouched' && v0.tab === 'Your list', JSON.stringify(v0));
78
+ const mine = M.queue.tabs.filter((t) => t.key !== 'kept' && t.key !== 'done').flatMap((t) => t.groups.flatMap((g) => g.rows || []));
79
+ ok('M4 Your list holds every row of the queue but Kept and Done, each with Done', mine.every((r) => v0.text.includes(r.title)) && v0.done === mine.length, JSON.stringify({ want: mine.length, done: v0.done }));
80
+ ok('M4 no suggestion, no estimate and no demo label is drawn', !/Accept all|~\d+ min|demo|fold the laundry|on the shelf|composts/i.test(v0.text));
136
81
  /* M6 */
137
- const wt = await p.evaluate(() => ({ cap: document.querySelector('#waitCap').textContent, rows: [...document.querySelectorAll('#waitBody .wtit')].map((x) => x.textContent), subs: [...document.querySelectorAll('#waitBody .ws')].map((x) => x.textContent), nudge: /Nudge/.test(document.querySelector('#waitCard').textContent) }));
138
- ok('M6 waiting on others: longest first, who and how long, no nudge', wt.cap === 'longest 8 days' && wt.rows[0] === 'Review the partner data-sharing clause' && /waiting on Dara/.test(wt.subs[0]) && !wt.nudge, JSON.stringify(wt));
139
-
82
+ await p.click(`${MW} [data-tab="waiting"]`);
83
+ const v1 = await p.evaluate(view);
84
+ ok('M6 Waiting on others lists who owes the PM, longest first', v1.tab === 'Waiting on others' && v1.text.indexOf(M.waiting.rows[0].title) >= 0 && v1.text.indexOf(M.waiting.rows[0].title) < v1.text.indexOf(M.waiting.rows[1].title), JSON.stringify(v1));
140
85
  /* M7 */
141
- const rv = await p.evaluate(() => ({ hidden: document.querySelector('#revCard').hidden, txt: document.querySelector('#revTxt').textContent }));
142
- ok('M7 the untouched card counts the items from the review list', !rv.hidden && /^2 items have sat untouched for 7 days/.test(rv.txt), JSON.stringify(rv));
143
-
144
- /* M9 */
145
- // re-pointed for premium-agreed-design: Home has no My work hero or dock; the caption's count must agree with the Today and Inbox tabs it counts
146
- ok('M9 the hero, the Work queue and the dock agree on one count', await p.evaluate(() => /^7 to clear/.test(document.querySelector('#qCap').textContent) && ['today', 'inbox'].map((k) => Number(document.querySelector(`#qTabs [data-tab="${k}"] em, #qTabs [data-tab="${k}"]`).textContent.replace(/\D/g, ''))).reduce((a, b) => a + b, 0) === 7));
147
-
148
- /* M3 add */
149
- A.set({ status: 200, body: { ok: true, item: { id: 'item-new', title: 'Reply to Lee', due: null, priority: 'P1' } } });
150
- { const v = F.view(); v.work.inbox.push(F.it('item-new', 'Reply to Lee', { priority: 'P1' })); A.setModel(WP.build({ v, now: F.NOW })); }
151
- await p.fill('#capIn', 'Reply to Lee !p1'); await p.press('#capIn', 'Enter');
152
- ok('M3 one line is posted to the Work page\'s add route, and the page shows what was read', await until(() => A.posts.some((x) => x.path === '/api/pm-items/add' && x.body.line === 'Reply to Lee !p1' && Object.keys(x.body).join() === 'line')) && await until(() => txt('#capHint').then((t) => /Added: Reply to Lee \(P1\)\. It is in your inbox until you place it\./.test(t))));
153
- ok('M3 a new item lands in the Inbox tab under Added by you, and its dialog opens at once so it can be placed', await until(() => p.evaluate(() => (document.querySelector('#dlg').classList.contains('on') && !(document.body.classList.contains('cz-dock') && /^Chat/.test(document.querySelector('#dEye').textContent))) && document.querySelector('#dTitle').textContent === 'Reply to Lee' && /Inbox, added by you/.test(document.querySelector('#oMain').textContent) && document.querySelector('#qBody').dataset.tab === 'inbox' && !!document.querySelector('#qBody [data-key="work:item-new"]')), 6000));
154
- await p.keyboard.press('Escape'); await until(() => p.evaluate(() => !(document.querySelector('#dlg').classList.contains('on') && !(document.body.classList.contains('cz-dock') && /^Chat/.test(document.querySelector('#dEye').textContent))))); A.setModel(mk());
155
- const n0 = A.posts.length; await p.fill('#capIn', ' '); await p.press('#capIn', 'Enter'); await sleep(200);
156
- ok('M3 an empty line is not posted', A.posts.length === n0 && /Write one line/.test(await txt('#capHint')));
157
- ok('M3 a message about a press stays on screen after the box loses focus', await p.evaluate(() => { document.activeElement.blur(); return getComputedStyle(document.querySelector('#capHint')).display !== 'none'; }));
158
- { const R2 = await open({ w: 390, h: 844 }); const hid = await R2.page.evaluate(() => getComputedStyle(document.querySelector('#capHint')).display); await R2.page.focus('#capIn'); const shown = await R2.page.evaluate(() => getComputedStyle(document.querySelector('#capHint')).display);
159
- ok('M3 the hint under the add box is hidden on load and shows while the box has focus (premium-calmer-first-screen)', hid === 'none' && shown !== 'none', JSON.stringify([hid, shown])); await R2.ctx.close(); }
160
- await qtab('today'); // a line with no date opened the queue on Inbox
161
-
162
- /* M8 presses from a check circle, and from the dialog */
163
- {
164
- const n = A.posts.length;
165
- await showKey(p, 'work:wbs:alpha:4.2'); await p.locator('.wrow[data-key="work:wbs:alpha:4.2"] .wck.dec').click(); await until(() => p.evaluate(() => (document.querySelector('#dlg').classList.contains('on') && !(document.body.classList.contains('cz-dock') && /^Chat/.test(document.querySelector('#dEye').textContent))))); await sleep(500);
166
- ok('M8 the eye circle opens the item to review the draft and posts nothing', A.posts.length === n && (await p.textContent('#dTitle')) === 'Sign off the fit-out contractor shortlist' && /Agent draft · not checked/.test(await p.textContent('#oMain')));
167
- await p.keyboard.press('Escape'); await until(() => p.evaluate(() => !(document.querySelector('#dlg').classList.contains('on') && !(document.body.classList.contains('cz-dock') && /^Chat/.test(document.querySelector('#dEye').textContent)))));
168
- }
169
- const openKey = async (key) => { await showKey(p, key); await p.locator(`.wrow[data-key="${key}"] .wrh`).first().click(); await until(() => p.evaluate(() => (document.querySelector('#dlg').classList.contains('on') && !(document.body.classList.contains('cz-dock') && /^Chat/.test(document.querySelector('#dEye').textContent))))); await sleep(700); };
170
- const shut = async () => { await p.keyboard.press('Escape'); await until(() => p.evaluate(() => !(document.querySelector('#dlg').classList.contains('on') && !(document.body.classList.contains('cz-dock') && /^Chat/.test(document.querySelector('#dEye').textContent))))); };
171
- const lastPost = () => A.posts[A.posts.length - 1];
172
- A.set({ status: 200, body: { ok: true } });
173
- const g0 = A.gets();
174
- await showKey(p, 'work:item-bbbbbbbbbbb2'); await p.locator('.wrow[data-key="work:item-bbbbbbbbbbb2"] .wck').click();
175
- ok('M8 a check circle posts Done with the item id only, offers Undo, and the page reads again', await until(() => A.posts.some((x) => x.path === '/api/pm-items/done' && Object.keys(x.body).join() === 'id' && x.body.id === 'item-bbbbbbbbbbb2')) && await until(() => p.evaluate(() => /Undo/.test(document.querySelector('#toast').textContent))) && await until(() => A.gets() > g0));
176
- await p.locator('#toast .undo').click();
177
- ok('M8 Undo posts Reopen for that item', await until(() => A.posts.some((x) => x.path === '/api/pm-items/reopen' && x.body.id === 'item-bbbbbbbbbbb2')));
178
- await openKey('work:item-aaaaaaaaaaa1');
179
- const dlg = await p.evaluate(() => ({ title: document.querySelector('#dTitle').textContent, mod: document.querySelector('#dlg').getAttribute('aria-modal'), ask: !!document.querySelector('#askGo'),
180
- fields: [...document.querySelectorAll('#card .ffd small')].map((x) => x.textContent).join(), when: document.querySelector('#card .ffd[data-k="when"] b').textContent,
181
- bar: [...document.querySelectorAll('#card .ibrow button, #card .fbar button')].map((b) => b.textContent.trim()).join(), solid: [...document.querySelectorAll('#card .cta')].length,
182
- shut: document.querySelector('#iSheet').hidden && !document.querySelector('#dBody .ffd'), row: !!document.querySelector('#dTabs #card [data-p="done"]') }));
183
- await more(p); dlg.opts = await p.evaluate(() => [...document.querySelectorAll('#card .fmenu .fopt > span')].map((x) => x.textContent).join());
184
- await field(p, 'wait'); dlg.wDis = await p.evaluate(() => document.querySelector('#wBtn').disabled);
185
- ok('M8 a dialog shows Edit ▾ and Done in its switch row, the fields closed behind Edit and out of the conversation; the fields are the agent, When, Waiting on, Who does it, Priority · Due; When holds Today, Not yet, Not before and Someday; Waiting needs a name', dlg.title === 'Decide how partial refunds are handled'
186
- && dlg.fields === 'The agent,When,Waiting on,Who does it,Priority · Due' && /^Inbox/.test(dlg.when) && dlg.bar === 'EditInbox,Done,Drop it' && dlg.solid === 1 && dlg.shut && dlg.row
187
- && dlg.opts === 'Today,Later today,Tomorrow,Next week,Not before a date…,Someday' && dlg.mod === 'false' /* re-pointed for premium-agreed-design: docked on Home the dialog is not modal (the list beside it stays live) */ && dlg.ask && dlg.wDis, JSON.stringify(dlg));
188
- await more(p);
189
- await p.locator('#card [data-p="notyet"][data-when="tomorrow"]').click();
190
- ok('M8 Not yet posts the item and the day, and closes the dialog', await until(() => A.posts.some((x) => x.path === '/api/pm-items/notyet' && x.body.id === 'item-aaaaaaaaaaa1' && x.body.when === 'tomorrow' && Object.keys(x.body).sort().join() === 'id,when')) && await until(() => p.evaluate(() => !(document.querySelector('#dlg').classList.contains('on') && !(document.body.classList.contains('cz-dock') && /^Chat/.test(document.querySelector('#dEye').textContent))))));
191
- for (const [sel, route, check] of [['[data-p="flag"]', '/api/pm-items/flag', (b) => b.flagged === true], ['[data-p="xt"][data-k="someday"]', '/api/pm-items/someday', (b) => Object.keys(b).join() === 'id'], ['[data-p="done"]', '/api/pm-items/done', (b) => Object.keys(b).join() === 'id'], ['[data-p="remove"]', '/api/pm-items/remove', (b) => Object.keys(b).join() === 'id']]) {
192
- await openKey('work:item-aaaaaaaaaaa2'); const n = A.posts.length;
193
- if (sel.includes('someday') || sel.includes('flag')) await more(p);
194
- if (sel.includes('remove')) await sheet(p);
195
- await p.locator('#card ' + sel).click();
196
- ok(`M8 ${route.split('/').pop()} posts exactly what the Work page's route takes`, await until(() => A.posts.length > n && lastPost().path === route && lastPost().body.id === 'item-aaaaaaaaaaa2' && check(lastPost().body)), JSON.stringify(lastPost()));
197
- await until(() => p.evaluate(() => !(document.querySelector('#dlg').classList.contains('on') && !(document.body.classList.contains('cz-dock') && /^Chat/.test(document.querySelector('#dEye').textContent)))));
198
- }
199
- ok('M8 Done and Drop offer Undo for a short time', await p.evaluate(() => /Undo/.test(document.querySelector('#toast').textContent)));
200
- await openKey('work:item-aaaaaaaaaaa3'); await field(p, 'wait'); await p.fill('#wOn', ' Priya ');
201
- ok('M8 Waiting needs a name', await p.evaluate(() => !document.querySelector('#wBtn').disabled));
202
- await p.click('#wBtn');
203
- ok('M8 Waiting posts the name', await until(() => A.posts.some((x) => x.path === '/api/pm-items/waiting' && x.body.id === 'item-aaaaaaaaaaa3' && x.body.on === 'Priya')));
204
- await until(() => p.evaluate(() => !(document.querySelector('#dlg').classList.contains('on') && !(document.body.classList.contains('cz-dock') && /^Chat/.test(document.querySelector('#dEye').textContent)))));
205
- await openKey('work:item-ddddddddddd1');
206
- ok('M7 an item on the review list offers Keep, and Keep posts it', await p.evaluate(() => !!document.querySelector('#card [data-p="keep"]')));
207
- await sheet(p); await p.click('#card [data-p="keep"]');
208
- ok('M7 Keep posts the item id only', await until(() => A.posts.some((x) => x.path === '/api/pm-items/keep' && Object.keys(x.body).join() === 'id' && x.body.id === 'item-ddddddddddd1')));
209
- await until(() => p.evaluate(() => !(document.querySelector('#dlg').classList.contains('on') && !(document.body.classList.contains('cz-dock') && /^Chat/.test(document.querySelector('#dEye').textContent)))));
86
+ await p.click(`${MW} [data-tab="review"]`);
87
+ ok('M7 Weekly review says what the review holds', (await p.evaluate(view)).text.includes(M.friday.cap));
88
+ await p.click(`${MW} [data-tab="stale"]`);
89
+ const v2 = await p.evaluate(view);
90
+ ok('M7 Untouched counts the items from the review list and lists the ones the list holds', v2.text.includes(M.review.n + ' items have sat untouched for ' + M.review.days + ' days') && v2.done >= 1 && v2.done <= M.review.ids.length, JSON.stringify(v2));
91
+ /* M3 */
92
+ await p.click(`${MW} [data-tab="yours"]`);
93
+ await p.click(`${MW} [data-x="add"]`);
94
+ ok('M3 an empty line is not posted', A.posts.length === 0);
95
+ await p.fill('#hxLine', 'Call Ana tomorrow');
96
+ await p.click(`${MW} [data-x="add"]`);
97
+ ok('M3 one line is posted to the add route, and the view says so', !!(await until(() => A.posts.find((x) => x.path === '/api/pm-items/add' && x.body.line === 'Call Ana tomorrow'))) && !!(await until(() => p.evaluate(() => /Added\./.test(document.querySelector('#czViewer').textContent)))));
98
+ /* M8 */
99
+ const id = mine[1].id;
100
+ await p.click(`${MW} [data-done="${id}"]`);
101
+ ok('M8 Done posts the item id only, and the view says Done.', !!(await until(() => A.posts.find((x) => x.path === '/api/pm-items/done' && Object.keys(x.body).join() === 'id' && x.body.id === id))) && !!(await until(() => p.evaluate(() => /Done\./.test(document.querySelector('#czViewer').textContent)))));
210
102
  ok('M8 no press carried a writer field', A.posts.every((x) => !['by', 'via', 'at', 'actor', 'pm', 'nonce'].some((k) => k in x.body)));
211
103
  const mint = await T.nonce(BASE);
212
- ok('M8 every press carried the launch nonce', !!mint && A.posts.filter((x) => x.path.startsWith('/api/pm-items/')).every((x) => x.headers['x-pmos-nonce'] === mint));
213
-
214
- /* M11 refusal */
215
- A.set({ status: 409, body: { ok: false, error: 'that item is already done' } });
216
- await openKey('work:item-ccccccccccc1'); await p.locator('#card [data-p="done"]').click();
217
- ok('M11 a refused press shows the route\'s reason, keeps the dialog open and turns the buttons back on', await until(() => p.evaluate(() => !document.querySelector('#cardErr').hidden && /already done/.test(document.querySelector('#cardErr').textContent) && (document.querySelector('#dlg').classList.contains('on') && !(document.body.classList.contains('cz-dock') && /^Chat/.test(document.querySelector('#dEye').textContent))) && !document.querySelector('#card [data-p="done"]').disabled)));
218
- A.set({ status: 200, body: { ok: true } });
219
-
220
- /* agent beside the item */
221
- A.setThread({ ok: true, working: false, turns: [{ id: 'bq-1', q: 'What is this about?', state: 'answered', a: 'It is about <b>shipping</b>.' }] });
222
- await shut(); await openKey('work:item-aaaaaaaaaaa1');
223
- ok('A1 the read-only agent is beside the item: its answer is labelled and shown as text', await until(() => p.evaluate(() => /Earlier read-only answer/.test(document.querySelector('#dBody .stream').textContent) && document.querySelector('#dBody .stream').textContent.includes('<b>shipping</b>')), 5000));
224
- A.setThread({ ok: true, working: false, turns: [] });
225
- await p.fill('#askIn', 'Why is this here?'); const nA = A.posts.length; await p.press('#askIn', 'Enter');
226
- ok('A1 a question posts the item key and the text, and nothing else', await until(() => A.posts.length > nA && lastPost().path === '/api/briefing-premium/ask' && lastPost().body.key === 'work:item-aaaaaaaaaaa1' && lastPost().body.text === 'Why is this here?' && Object.keys(lastPost().body).sort().join() === 'key,text'), JSON.stringify(lastPost()));
227
- await shut();
228
-
104
+ ok('M8 every press carried the launch nonce', !!mint && A.posts.every((x) => x.headers['x-pmos-nonce'] === mint));
105
+ /* M11 */
106
+ A.set({ status: 409, body: { ok: false, error: 'That item is already done.' } });
107
+ await p.click(`${MW} [data-done="${mine[2].id}"]`);
108
+ ok('M11 a refused press shows the route\'s reason', !!(await until(() => p.evaluate(() => /already done/.test(document.querySelector('#czViewer').textContent)))));
229
109
  ok('0 no page error', A.errors.length === 0, A.errors.join(' | '));
230
110
  await A.ctx.close();
231
111
 
232
- /* M2 / M4 degraded: an empty list */
233
- {
234
- const E = await open({ model: WP.build({ v: { today: '2026-10-16', work: {} }, now: F.NOW }) });
235
- ok('M2 an empty list says so, in one sentence, and the Work queue says nothing is placed for today', await E.page.evaluate(() => /^0 to clear/.test(document.querySelector('#qCap').textContent) && /Nothing is placed for today/.test(document.querySelector('#qBody').textContent) && document.querySelector('#revCard').hidden && /Nobody owes you anything/.test(document.querySelector('#waitBody').textContent))); // re-pointed for premium-agreed-design: Home's hero is the Briefing's and it has no dock, so the Work queue says the list is empty
236
- await E.ctx.close();
237
- }
238
- {
239
- // a failed read says why and draws nothing
240
- const ctx = await browser.newContext({ viewport: { width: 1280, height: 900 } }), pg = await ctx.newPage();
241
- await pg.route('**/api/my-work-premium', (r) => r.fulfill({ status: 500, contentType: 'application/json', body: JSON.stringify({ ok: false, state: 'error', error: 'the list could not be read' }) }));
242
- await pg.goto(BASE + '/premium-work.html');
243
- ok('M10 a failed read says why and shows nothing instead of a guess', await until(() => pg.evaluate(() => /The reason: the list could not be read/.test(document.querySelector('#qNote').textContent) && document.querySelectorAll('#qBody .wrow').length === 0), 5000)); // re-pointed for premium-agreed-design: on Home the Work queue's note says why
244
- await ctx.close();
245
- }
112
+ /* M10 */
113
+ { const E = await open({ fail: true });
114
+ ok('M10 a failed read says why and shows nothing instead of a guess', !!(await until(() => E.page.evaluate(() => /Your list could not be read: the list could not be read/.test(document.querySelector('#czViewer').textContent) && !document.querySelector('#czViewer [data-done]')))));
115
+ await E.ctx.close(); }
246
116
 
247
- {
248
- const R = await open({ w: 820, h: 1000 }), t = R.page;
249
- await showKey(t, 'work:item-aaaaaaaaaaa1'); await t.locator('.wrow[data-key="work:item-aaaaaaaaaaa1"] .wrh').click(); await until(() => t.evaluate(() => (document.querySelector('#dlg').classList.contains('on') && !(document.body.classList.contains('cz-dock') && /^Chat/.test(document.querySelector('#dEye').textContent))))); await sleep(900);
250
- const g = await t.evaluate(() => { const r = document.querySelector('#dlg').getBoundingClientRect(); return { l: Math.round(r.left), w: Math.round(r.width), vw: innerWidth, tabs: getComputedStyle(document.querySelector('#dTabs')).display }; });
251
- ok('M12 on a tablet (820 px) the dialog is centred with a 12 px margin, and the Detail / Conversation switch is shown', Math.abs(g.l - (g.vw - g.w) / 2) <= 2 && g.w === g.vw - 24 && g.tabs !== 'none', JSON.stringify(g));
252
- await R.ctx.close();
253
- }
254
- /* M12 floors on a phone, both themes */
117
+ /* M12 floors at 390, both themes */
255
118
  for (const theme of ['light', 'dark']) {
256
- const R = await open({ w: 390, h: 844, theme }), q = R.page;
257
- await showKey(q, 'work:item-aaaaaaaaaaa1'); await q.locator('.wrow[data-key="work:item-aaaaaaaaaaa1"] .wrh').click(); await until(() => q.evaluate(() => (document.querySelector('#dlg').classList.contains('on') && !(document.body.classList.contains('cz-dock') && /^Chat/.test(document.querySelector('#dEye').textContent))))); await sleep(800);
258
- const geo = () => q.evaluate(() => { const r = document.querySelector('#dlg').getBoundingClientRect(); return { l: Math.round(r.left), w: Math.round(r.width), vw: innerWidth }; });
259
- const g1 = await geo();
260
- ok(`M12 at 390 px (${theme}) the dialog opens on Detail at the full width of the screen`, g1.l === 0 && g1.w === g1.vw, JSON.stringify(g1));
261
- /* the compact head (Wawan's phone, 2026-10-20): every dialog opens with a short head, so the detail gets most of the screen; a press on the title shows it whole */
262
- const hd = () => q.evaluate(() => { const t = document.querySelector('#dTitle'), lh = parseFloat(getComputedStyle(t).lineHeight); return { cmp: document.querySelector('#dlg').classList.contains('cmp'), eye: getComputedStyle(document.querySelector('#dEye')).display, lines: Math.round(t.getBoundingClientRect().height / lh), top: Math.round(document.querySelector('#dOut').getBoundingClientRect().top), full: document.querySelector('#dlg').classList.contains('tfull') }; });
263
- const h1 = await hd(); await q.click('#dTitle'); const h2 = await hd(); await q.click('#dTitle'); const h3 = await hd();
264
- ok(`M12 at 390 px (${theme}) the item dialog has the compact head: no eyebrow, a title of two lines at most, the detail starting in the top third`, h1.cmp && h1.eye === 'none' && h1.lines <= 2 && h1.top < 844 / 3, JSON.stringify(h1));
265
- ok(`M12 at 390 px (${theme}) a press on the title shows the whole head, and a second press clamps it again`, h2.full && h2.eye !== 'none' && !h3.full && h3.eye === 'none', JSON.stringify([h2, h3]));
266
- await q.click('#dTabs [data-t="chat"]'); await sleep(900);
267
- const g2 = await geo();
268
- ok(`M12 at 390 px (${theme}) with the conversation brought in it is still full width`, g2.l === 0 && g2.w === g2.vw && await q.evaluate(() => document.querySelector('#dTabs [data-t="chat"]').getAttribute('aria-pressed') === 'true' && getComputedStyle(document.querySelector('#dBody')).display !== 'none' && getComputedStyle(document.querySelector('#dOut')).display === 'none'), JSON.stringify(g2));
269
- const m = await q.evaluate(() => { const hs = (sel) => [...document.querySelectorAll(sel)].map((b) => Math.round(b.getBoundingClientRect().height)); return { over: document.documentElement.scrollWidth > innerWidth + 1 || document.querySelector('#dlg').scrollWidth > document.querySelector('#dlg').clientWidth + 1, small: [].concat(hs('#card .cta'), hs('#card .seg2 button'), hs('#wOn'), hs('#askIn'), hs('#askGo')).filter((h) => h < 44) }; });
270
- ok(`M12 at 390 px (${theme}) the dialog has no sideways scroll and every control is 44 px`, !m.over && m.small.length === 0, JSON.stringify(m));
271
- await q.keyboard.press('Escape'); await sleep(300);
272
- const pg = await q.evaluate(() => ({ over: document.documentElement.scrollWidth > innerWidth + 1, small: [...document.querySelectorAll('.wck, .capb, .wrh, #revBtn, .fchip, .qtb')].filter((b) => !b.closest('[hidden]') && b.getBoundingClientRect().height < 44 && b.getBoundingClientRect().height > 0).map((b) => b.className + ':' + Math.round(b.getBoundingClientRect().height)) }));
273
- ok(`M12 at 390 px (${theme}) the page has no sideways scroll and every control is 44 px`, !pg.over && pg.small.length === 0, JSON.stringify(pg));
274
- const tb = await q.evaluate(() => ({ rows: new Set([...document.querySelectorAll('#qTabs .qtb')].map((b) => Math.round(b.getBoundingClientRect().top))).size, scrolls: getComputedStyle(document.querySelector('#qTabs')).overflowX }));
275
- ok(`M12 at 390 px (${theme}) the Work queue tabs are one row that scrolls sideways, never two`, tb.rows === 1 && tb.scrolls === 'auto', JSON.stringify(tb));
276
- /* the rail after the keyboard (Wawan's phone, 2026-10-20): leaving a field nudges the scroll by a pixel and back, so iOS places the fixed rail at the bottom again */
277
- await q.evaluate(() => { const y = document.querySelector('#qBody').getBoundingClientRect().top + scrollY - 250; scrollTo(0, y); window.__ys = []; addEventListener('scroll', () => window.__ys.push(scrollY)); });
278
- await sleep(200); const y0 = await q.evaluate(() => scrollY);
279
- await q.evaluate(() => { const i = document.querySelector('#capIn'); i.focus({ preventScroll: true }); i.blur(); }); await sleep(600);
280
- // re-pointed for premium-agreed-design: the floating place menu replaces the rail as the fixed layer; on a phone it sits 24 px off the bottom
281
- const kb = await q.evaluate(() => { const r = document.querySelector('#czNav').getBoundingClientRect(); return { ys: window.__ys, y: scrollY, bottom: Math.round(innerHeight - r.bottom) }; });
282
- ok(`M12 at 390 px (${theme}) leaving a field settles the fixed layer: a one-pixel scroll and back, and the rail stays 12 px off the bottom`, kb.ys.length >= 2 && kb.y === y0 && kb.bottom === 24, JSON.stringify({ y0, ...kb }));
283
- await R.ctx.close();
284
- }
285
- {
286
- // re-pointed for premium-agreed-design: on a desktop Home the dialog is docked beside a live list on purpose, so the modal dialog is checked where it is modal (a tablet, 820 px)
287
- const R = await open({ w: 820, h: 1000 }); await showKey(R.page, 'work:item-aaaaaaaaaaa1'); await R.page.locator('.wrow[data-key="work:item-aaaaaaaaaaa1"] .wrh').first().focus();
288
- await R.page.keyboard.press('Enter'); await until(() => R.page.evaluate(() => (document.querySelector('#dlg').classList.contains('on') && !(document.body.classList.contains('cz-dock') && /^Chat/.test(document.querySelector('#dEye').textContent))))); await sleep(500);
289
- ok('M12 the page behind a dialog is inert, Escape closes it and focus returns to the row', await R.page.evaluate(() => ['.rail', 'main.stage', '#dock'].every((s) => document.querySelector(s).inert)) && (await R.page.keyboard.press('Escape'), await until(() => R.page.evaluate(() => !(document.querySelector('#dlg').classList.contains('on') && !(document.body.classList.contains('cz-dock') && /^Chat/.test(document.querySelector('#dEye').textContent))) && document.activeElement.classList.contains('wrh')))));
290
- await R.ctx.close();
119
+ const P = await open({ w: 390, h: 844, theme });
120
+ const f = await P.page.evaluate(() => { const v = document.querySelector('#czViewer:not([hidden])'), r = v.getBoundingClientRect(); return { w: Math.round(r.width), over: document.documentElement.scrollWidth - innerWidth, small: [...v.querySelectorAll('button')].filter((b) => b.offsetParent !== null && b.getBoundingClientRect().height < 43.5).map((b) => b.textContent.trim()).slice(0, 5) }; });
121
+ ok(`M12 (${theme}) on a phone My work covers the screen, with no sideways scroll and 44 px buttons`, f.w >= 380 && f.over <= 0 && f.small.length === 0, JSON.stringify(f));
122
+ ok(`M12 (${theme}) no page error`, P.errors.length === 0, P.errors.join(' | '));
123
+ await P.ctx.close();
291
124
  }
292
125
 
293
126
  /* the real routes, over a scratch state folder: add, read back, mark done, read back */
294
127
  {
295
- const ctx = await browser.newContext({ viewport: { width: 1280, height: 900 } }), pg = await ctx.newPage(), errs = [];
296
- pg.on('pageerror', (e) => errs.push(String(e)));
297
- await pg.goto(BASE + '/premium-work.html');
298
- // re-pointed for premium-agreed-design: /premium-work.html opens Home, whose hero is the Briefing's and which has no dock; the Work queue says the list is empty
299
- ok('E1 on an empty scratch state the real page says the list is empty', await until(() => pg.evaluate(() => document.querySelector('#qBody').textContent === 'Nothing is placed for today.' && /^0 to clear/.test(document.querySelector('#qCap').textContent)), 20000));
300
- await pg.fill('#capIn', 'Reply to Rina about SSO !p1'); await pg.press('#capIn', 'Enter');
301
- ok('E2 an added line comes back through the real routes in the Inbox tab, with its priority, not counted to clear, and its dialog opens', await until(() => pg.evaluate(() => document.querySelector('#qBody').dataset.tab === 'inbox' && /Reply to Rina about SSO/.test(document.querySelector('#qBody').textContent) && /P1/.test(document.querySelector('#qBody').textContent) && /Added by you/.test(document.querySelector('#qBody').textContent) && document.querySelector('#dN').textContent === '0' && (document.querySelector('#dlg').classList.contains('on') && !(document.body.classList.contains('cz-dock') && /^Chat/.test(document.querySelector('#dEye').textContent)))), 15000));
302
- await sleep(700);
303
- await more(pg); await pg.locator('#card [data-p="flag"]').click();
304
- ok('E3 Today, picked in the When field of that dialog, moves it from the Inbox to Today through the real route', await until(() => pg.evaluate(() => document.querySelector('#qTabs [data-tab="today"]').textContent === 'Today1' && document.querySelector('#qTabs [data-tab="inbox"]').textContent === 'Inbox0' && /^1 to clear/.test(document.querySelector('#qCap').textContent)), 15000));
305
- await pg.click('#qTabs [data-tab="today"]'); await pg.locator('#qBody .wck').first().click();
306
- ok('E4 the check circle marks it done, and the list is empty again', await until(() => pg.evaluate(() => document.querySelector('#qBody').textContent === 'Nothing is placed for today.' && /^0 to clear/.test(document.querySelector('#qCap').textContent)), 15000));
128
+ const R = await open({ real: true }), pg = R.page;
129
+ ok('E1 on an empty scratch state the real view says the list is empty', !!(await until(() => pg.evaluate(() => /Nothing on your list/.test(document.querySelector('#czViewer').textContent)), 20000)));
130
+ await pg.fill('#hxLine', 'Reply to Rina about SSO !p1'); await pg.click(`${MW} [data-x="add"]`);
131
+ ok('E2 an added line comes back through the real routes on Your list', !!(await until(() => pg.evaluate(() => /Reply to Rina about SSO/.test(document.querySelector('#czViewer').textContent) && !!document.querySelector('#czViewer [data-done]')), 20000)), await pg.evaluate(() => document.querySelector('#czViewer').textContent.slice(0, 300)));
132
+ const api0 = await fetch(BASE + '/api/my-work-premium').then((r) => r.json());
133
+ const all0 = api0.model.queue.tabs.flatMap((t) => t.groups.flatMap((g) => g.rows || []));
134
+ ok('E3 the real model holds it with its priority', all0.some((r) => /Reply to Rina about SSO/.test(r.title) && /P1/i.test(JSON.stringify(r))), JSON.stringify(all0).slice(0, 400));
135
+ await pg.locator(`${MW} [data-done]`).first().click();
136
+ ok('E4 Done marks it done, and the list is empty again', !!(await until(() => pg.evaluate(() => /Nothing on your list/.test(document.querySelector('#czViewer').textContent)), 15000)));
307
137
  const api = await fetch(BASE + '/api/my-work-premium').then((r) => r.json());
308
- ok('E5 the model route answers ready with the list the Work page reads', api.ok && api.state === 'ready' && api.model.dock.needs === 0);
138
+ ok('E5 the model route answers ready with the list the view reads', api.ok && api.state === 'ready' && api.model.dock.needs === 0);
309
139
  const hdr = await T.pressHeaders(BASE);
310
140
  const ask = await fetch(BASE + '/api/briefing-premium/ask', { method: 'POST', headers: hdr, body: JSON.stringify({ key: 'work:item-ghost', text: 'q' }) }).then((r) => r.status);
311
- ok('E6 a question about an item that is not on the page starts nothing (404)', ask === 404, String(ask));
141
+ ok('E6 a question about an item that is not on the list starts nothing (404)', ask === 404, String(ask));
312
142
  const post = await fetch(BASE + '/api/my-work-premium', { method: 'POST', headers: hdr, body: '{}' }).then((r) => r.status);
313
143
  ok('E7 the model route is read-only', post === 405, String(post));
314
- ok('0 no page error against the real routes', errs.length === 0, errs.join(' | '));
315
- await ctx.close();
316
- }
317
-
318
- /* M12 fidelity against the design: computed style of the regions the page has.
319
- * re-pointed for premium-agreed-design: the PM approved the Agreed design (planning/prd/premium-agreed-design-prd.md) in place of the
320
- * prototype mockup this block used to match, so the reference is now that design's tokens in cozy.css: every region is drawn, set in the
321
- * design's typeface, its text in one of the design's inks, and the add button filled with the design's blue (or the solid it points at). */
322
- {
323
- const REGIONS = [['date', '.hero .date'], ['brief', '.brief'], ['cap', '.cap'], ['capin', '.cap input'], ['capbtn', '.cap .capb'], ['plate', '#queue'], ['heading', '#hQueue'], ['row', '#qBody .wrow:not(.first)'], ['title', '#qBody .wrow:not(.first) .wtit'], ['sub', '#qBody .wrow:not(.first) .ws'], ['due', '#qBody .due:not(.od)'], ['waitrow', '#waitBody .wrow']];
324
- const INKED = ['date', 'brief', 'capin', 'heading', 'row', 'title', 'sub', 'due', 'waitrow'];
325
- for (const [w, h] of [[1280, 900], [390, 844]]) for (const th of ['light', 'dark']) {
326
- const R = await open({ w, h, theme: th }); await sleep(500);
327
- await R.page.evaluate(() => Promise.all(document.getAnimations().filter((a) => a.effect && a.effect.getComputedTiming().iterations !== Infinity).map((a) => a.finished.catch(() => null)))).catch(() => null);
328
- const got = await R.page.evaluate((regions) => {
329
- const tok = (v, prop) => { const e = document.createElement('i'); e.style.cssText = `position:absolute;visibility:hidden;${prop}:var(${v})`; document.body.appendChild(e); const cs = getComputedStyle(e); const out = prop === 'font-family' ? cs.fontFamily : prop === 'color' ? cs.color : cs.backgroundColor; e.remove(); return out; };
330
- // the inks are the design's three, plus the page tokens it points at them (cozy-home.css: in dark the page keeps premium.css's dark inks and solid)
331
- const T = { sans: tok('--cz-sans', 'font-family'), inks: ['--cz-ink', '--cz-ink2', '--cz-ink3', '--ink', '--ink-2', '--ink-3'].map((v) => tok(v, 'color')), blue: [tok('--cz-blueink', 'background-color'), tok('--cz-blue', 'background-color'), tok('--solid', 'background-color')] };
332
- const o = {}; for (const [n, sel] of regions) { const e = document.querySelector('main.stage:not([hidden]) ' + sel); if (!e) { o[n] = null; continue; } const cs = getComputedStyle(e); o[n] = { fontFamily: cs.fontFamily, color: cs.color, backgroundColor: cs.backgroundColor }; }
333
- return { T, o };
334
- }, REGIONS);
335
- const diffs = [];
336
- for (const [n] of REGIONS) {
337
- const v = got.o[n]; if (!v) { diffs.push(n + ' missing'); continue; }
338
- if (v.fontFamily !== got.T.sans) diffs.push(`${n}.fontFamily ${v.fontFamily} | ${got.T.sans}`);
339
- if (INKED.includes(n) && !got.T.inks.includes(v.color)) diffs.push(`${n}.color ${v.color} | ${got.T.inks.join(' or ')}`);
340
- }
341
- if (got.o.capbtn && !got.T.blue.includes(got.o.capbtn.backgroundColor)) diffs.push(`capbtn.backgroundColor ${got.o.capbtn.backgroundColor} | ${got.T.blue.join(' or ')}`);
342
- ok(`M12 styles and geometry match the mockup at ${w} px, ${th}`, diffs.length === 0, diffs.join(' ; '));
343
- await R.ctx.close();
144
+ for (const [route, body] of [['notyet', { id: 'item-ghost', until: 'tomorrow' }], ['waiting', { id: 'item-ghost', on: 'Priya' }], ['keep', { id: 'item-ghost' }]]) {
145
+ const s = await fetch(BASE + '/api/pm-items/' + route, { method: 'POST', headers: hdr, body: JSON.stringify(body) }).then((r) => r.status);
146
+ ok(`E8 the ${route} route the old dialog pressed still answers, and refuses an item it does not hold`, s >= 400 && s < 500, String(s));
344
147
  }
148
+ ok('0 no page error against the real routes', R.errors.length === 0, R.errors.join(' | '));
149
+ await R.ctx.close();
345
150
  }
346
151
  return finish();
347
- })().catch((e) => { console.error(e); finish(1); });
152
+ })();
@@ -1,4 +1,16 @@
1
1
  [
2
+ {
3
+ "v": "0.398.0",
4
+ "at": "2026-10-23T04:45:54.728Z",
5
+ "f": 2,
6
+ "prs": [
7
+ {
8
+ "n": 1012,
9
+ "t": "Rebuild Home, Viewer, Board and Insights to the Agreed design",
10
+ "s": "Rebuild Home, Viewer, Board and Insights to the Agreed design"
11
+ }
12
+ ]
13
+ },
2
14
  {
3
15
  "v": "0.397.0",
4
16
  "at": "2026-10-22T20:10:19.514Z",
@@ -0,0 +1,32 @@
1
+ 'use strict';
2
+ /* fixtures/board-premium-trail.js — a GET /api/board-trail answer (lib/board-trail.js trail()) for the initiatives of fixtures/board-premium-facts.js
3
+ * (initiative premium-agreed-design). Each initiative shows one thing the trail adds: days in the step, a skip with its reason, the parts of an output,
4
+ * what waits on you, tickets drafted in PMOS, PRD drift, links, a dependency and the themes. */
5
+ const item = (o = {}) => ({ since: null, sinceFrom: null, days: null, skipped: [], parts: null, next: null, you: null, links: { prd: null, rubric: null, evaluation: null, epic: null },
6
+ drafted: [], gate: null, drift: [], deps: [], theme: 'q3-2026:o1', tickets: {}, ...o });
7
+ function trail() {
8
+ return {
9
+ ok: true, at: '2026-10-17T09:12:00.000Z',
10
+ usual: { triage: { days: 2, n: 5 }, discover: { days: 9, n: 4 }, plan: { days: 6, n: 2 }, prioritize: { days: null, n: 0 }, build: { days: 14, n: 6 }, deliver: { days: 4, n: 3 }, monitor: { days: null, n: 0 }, evaluate: { days: null, n: 0 } },
11
+ themes: [
12
+ { key: 'q3-2026:o1', name: 'Foundation', note: 'Make PMOS reliable to run', tone: 'blue', objective: 'PMOS has a trustworthy harness', period: 'Q3 2026', from: 'planning/prd/self-serve-v2.md' },
13
+ { key: 'health', name: 'Health budgets', note: null, tone: 'grey', objective: null, period: null, from: null },
14
+ ],
15
+ items: {
16
+ 'self-serve-v2': item({ since: '2026-09-29', sinceFrom: 'move', days: 18, links: { prd: 'planning/prd/self-serve-v2.md', rubric: 'planning/evals/self-serve-v2.md', evaluation: null, epic: 'ONB-1' },
17
+ drafted: [{ id: 'V.4', summary: 'Resend the invite after 48 hours', key: null, prdChanged: false, waiting: true }, { id: 'V.1', summary: 'Welcome checklist', key: 'ONB-31', prdChanged: true, waiting: false }],
18
+ drift: ['ONB-31'], gate: { open: true, why: '' }, deps: [{ id: 'sso-partners', title: 'SSO for partners', stage: 'Deliver', known: true, done: false }] }),
19
+ 'partner-rate-limits': item({ since: '2026-10-11', sinceFrom: 'git', days: 6, skipped: [{ stage: 'discover', why: 'Moved from Triage to Plan: the PRD came with the ask.', from: 'move', at: '2026-10-11' }],
20
+ parts: [{ name: 'scope', done: true }, { name: 'timeline', done: false }, { name: 'tickets drafted', done: false }, { name: 'tickets pushed', done: false }], next: 'Timeline',
21
+ links: { prd: 'planning/prd/partner-rate-limits.md', rubric: null, evaluation: null, epic: null } }),
22
+ 'usage-billing': item({ since: '2026-10-03', sinceFrom: 'git', days: 14, parts: [{ name: 'problem', done: true }, { name: 'users', done: true }, { name: 'evidence', done: false }, { name: 'scope', done: false }, { name: 'success metric', done: false }, { name: 'risks', done: false }], next: 'Evidence' }),
23
+ 'sso-partners': item({ since: '2026-10-13', sinceFrom: 'move', days: 4, links: { prd: 'planning/prd/sso-partners.md', rubric: 'planning/evals/sso-partners.md', evaluation: null, epic: 'SSO-1' },
24
+ drafted: [{ id: 'S.3', summary: 'SAML errors', key: 'SSO-12', prdChanged: false, waiting: false }], tickets: { 'SSO-12': { subtasks: { done: 1, total: 3 }, reason: 'Waiting on PLAT-88', flagged: true } } }),
25
+ 'audit-log-export': item({ since: '2026-09-20', sinceFrom: 'git', days: 27 }),
26
+ 'refund-reason-codes': item({ since: '2026-10-10', sinceFrom: 'git', days: 7, parts: [{ name: 'report', done: true }, { name: 'evaluation', done: true }, { name: 'verdict', done: false, you: true }], next: 'Your verdict',
27
+ you: { text: 'Your verdict', why: 'The evaluation is in. Accept it or return the run.', kind: 'verdict' }, links: { prd: null, rubric: null, evaluation: 'planning/evals/refund-reason-codes-eval.md', epic: null } }),
28
+ 'docs-search': item({ since: '2026-10-08', sinceFrom: 'git', days: 9, theme: 'health', skipped: [{ stage: 'triage', why: 'The chore lane has no Triage step.', from: 'lane' }, { stage: 'discover', why: 'The chore lane has no Discover step.', from: 'lane' }, { stage: 'prioritize', why: 'The chore lane has no Prioritize step.', from: 'lane' }] }),
29
+ },
30
+ };
31
+ }
32
+ module.exports = { trail };