create-pmos 0.441.0 → 0.443.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 (87) hide show
  1. package/package.json +25 -25
  2. package/payload/KIT-VERSION +1 -1
  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/workspace/adler-seasons-art-test.js +106 -0
  7. package/workspace/adler-seasons-test.js +111 -0
  8. package/workspace/briefing-premium-board-test.js +19 -17
  9. package/workspace/briefing-premium-initiative-test.js +7 -4
  10. package/workspace/changelog.json +24 -0
  11. package/workspace/goals-clear-ui-test.js +249 -0
  12. package/workspace/guide/adler.md +10 -0
  13. package/workspace/guide/home.md +8 -1
  14. package/workspace/guide/metric-drafts.md +8 -2
  15. package/workspace/home-railcard-test.js +193 -0
  16. package/workspace/ini-workflow-test.js +6 -2
  17. package/workspace/intelligence-gaps-ui-test.js +16 -14
  18. package/workspace/lib/engine/records/index.js +9 -2
  19. package/workspace/lib/initiative-layout.js +3 -1
  20. package/workspace/lib/insights-premium.js +22 -1
  21. package/workspace/lib/metric-drafts.js +37 -10
  22. package/workspace/lib/metric-read-runs.js +20 -13
  23. package/workspace/lib/metric-reads.js +208 -23
  24. package/workspace/lib/metrics-cli.js +62 -5
  25. package/workspace/lib/routes-goal-status.js +89 -6
  26. package/workspace/lib/routes-insights-premium.js +1 -1
  27. package/workspace/lib/routes-metric-drafts.js +26 -3
  28. package/workspace/lib/settings-store.js +38 -0
  29. package/workspace/metric-drafts-ui-test.js +7 -4
  30. package/workspace/okr-goals-ui-test.js +7 -5
  31. package/workspace/package-lock.json +2 -2
  32. package/workspace/package.json +1 -1
  33. package/workspace/premium-board-actions-test.js +2 -1
  34. package/workspace/premium-chat-attach-test.js +2 -0
  35. package/workspace/program-panel-test.js +1 -1
  36. package/workspace/public/pm/bd-ini-panel.js +2 -2
  37. package/workspace/public/pm/c3-ini-ui.js +1 -1
  38. package/workspace/public/pm/cozy-adler.css +21 -0
  39. package/workspace/public/pm/cozy-adler.js +415 -8
  40. package/workspace/public/pm/cozy-ev.css +16 -1
  41. package/workspace/public/pm/cozy-home.css +8 -0
  42. package/workspace/public/pm/cozy-insights.css +82 -0
  43. package/workspace/public/pm/cozy-live-pill.css +5 -0
  44. package/workspace/public/pm/cozy-news.js +1 -1
  45. package/workspace/public/pm/cozy-seasons.js +318 -0
  46. package/workspace/public/pm/cozy-settings.js +88 -5
  47. package/workspace/public/pm/cozy-today.css +15 -0
  48. package/workspace/public/pm/cozy-viewer.js +50 -18
  49. package/workspace/public/pm/cozy-vw-shell.css +4 -0
  50. package/workspace/public/pm/cozy.css +65 -0
  51. package/workspace/public/pm/dash-view.js +4 -2
  52. package/workspace/public/pm/goals-clear.js +258 -0
  53. package/workspace/public/pm/home-app.js +59 -5
  54. package/workspace/public/pm/home-chat.js +1 -1
  55. package/workspace/public/pm/home-day.js +7 -4
  56. package/workspace/public/pm/home-ini.js +2 -2
  57. package/workspace/public/pm/home-mentions.js +1 -1
  58. package/workspace/public/pm/home-today.js +51 -10
  59. package/workspace/public/pm/impact.js +1 -1
  60. package/workspace/public/pm/ini-groups.js +28 -17
  61. package/workspace/public/pm/ini-links.js +1 -1
  62. package/workspace/public/pm/ini-tasks.js +246 -48
  63. package/workspace/public/pm/ini-view-model.js +45 -16
  64. package/workspace/public/pm/ini-view.css +330 -1
  65. package/workspace/public/pm/ini-view.js +196 -83
  66. package/workspace/public/pm/metric-drafts.js +4 -1
  67. package/workspace/public/pm/mission.js +238 -0
  68. package/workspace/public/pm/premium-board.js +1 -1
  69. package/workspace/public/pm/premium-insights.js +178 -24
  70. package/workspace/public/pm/premium-welcome.js +2 -2
  71. package/workspace/public/pm/split-merge.js +1 -1
  72. package/workspace/public/pm/stage-line.js +2 -2
  73. package/workspace/server.js +6 -2
  74. package/workspace/skills/metric-read.skill +7 -5
  75. package/workspace/split-merge-ui-test.js +1 -1
  76. package/workspace/stage-card-test.js +56 -11
  77. package/workspace/task-links-test.js +2 -0
  78. package/workspace/task-milestones-test.js +5 -1
  79. package/workspace/task-plans-test.js +3 -3
  80. package/workspace/task-views-test.js +279 -37
  81. package/workspace/test-lists/adler-seasons-art.json +13 -0
  82. package/workspace/test-lists/batch18-adler-seasons.json +13 -0
  83. package/workspace/test-lists/goals-clear.json +15 -0
  84. package/workspace/test-lists/home-railcard.json +9 -0
  85. package/workspace/test-lists/mission.json +5 -0
  86. package/workspace/test-lists/viewer-tasks.json +5 -0
  87. package/workspace/tk-tasks-test.js +27 -32
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-pmos",
3
- "version": "0.441.0",
3
+ "version": "0.443.0",
4
4
  "description": "Scaffold the PMOS portable kit — run the PMOS product-management workflow (initiative → lane-fit spec → contract → build → three gates, with work-type lanes for features, research, maintenance, incidents, and content) entirely inside your own repo, with all state as git-versioned files. Includes `workflow-sweep`, which audits the state every board derives from and separates real defects from work you simply have not done. `create-pmos workspace` also installs + launches the local Terminal Workspace GUI. No database, no network, no telemetry.",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -32,6 +32,30 @@
32
32
  "audit"
33
33
  ],
34
34
  "pmosChanges": [
35
+ {
36
+ "v": "0.443.0",
37
+ "at": "2026-10-28T14:17:24.774Z",
38
+ "f": 2,
39
+ "prs": [
40
+ {
41
+ "n": 1087,
42
+ "t": "0.442.0 hotfix, goals made clear, folded list card, task ticket linking (batch 18)",
43
+ "s": "0.442.0 hotfix, goals made clear, folded list card, task ticket linking (batch 18)"
44
+ }
45
+ ]
46
+ },
47
+ {
48
+ "v": "0.442.0",
49
+ "at": "2026-10-28T11:35:22.898Z",
50
+ "f": 2,
51
+ "prs": [
52
+ {
53
+ "n": 1086,
54
+ "t": "Initiative Viewer on phone and desktop, Adler dressed for the season, clear task marks (feedback batch 18 items 1, 8, 12, 13)",
55
+ "s": "Initiative Viewer on phone and desktop, Adler dressed for the season, clear task marks (feedback batch 18 items 1, 8, 12, 13)"
56
+ }
57
+ ]
58
+ },
35
59
  {
36
60
  "v": "0.441.0",
37
61
  "at": "2026-10-28T10:47:11.081Z",
@@ -247,30 +271,6 @@
247
271
  "s": "Twelfth testing feedback batch"
248
272
  }
249
273
  ]
250
- },
251
- {
252
- "v": "0.423.0",
253
- "at": "2026-10-26T16:10:21.071Z",
254
- "f": 2,
255
- "prs": [
256
- {
257
- "n": 1063,
258
- "t": "Eleventh testing feedback batch, part 2",
259
- "s": "Eleventh testing feedback batch, part 2"
260
- }
261
- ]
262
- },
263
- {
264
- "v": "0.422.0",
265
- "at": "2026-10-26T13:03:41.940Z",
266
- "f": 2,
267
- "prs": [
268
- {
269
- "n": 1061,
270
- "t": "Eleventh testing feedback batch",
271
- "s": "Eleventh testing feedback batch"
272
- }
273
- ]
274
274
  }
275
275
  ]
276
276
  }
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@f3e2d970
1
+ kernel-source: pmos@22227288
2
2
  assembled: 2026-10-28
3
3
  mode: vendor
@@ -2,7 +2,7 @@
2
2
  type: Reference
3
3
  title: "Eval calibration log"
4
4
  description: "Append-only record of every PM override of an evaluator verdict."
5
- generated: {by: process:create-pmos, at: "2026-10-28T10:47:08Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-28T14:17:21Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -2,7 +2,7 @@
2
2
  type: Reference
3
3
  title: "Health budgets"
4
4
  description: "Closed registry of health-budget anchors (D59), edited only by the PM."
5
- generated: {by: process:create-pmos, at: "2026-10-28T10:47:08Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-28T14:17:21Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -2,7 +2,7 @@
2
2
  type: Reference
3
3
  title: "Discoveries and friction log"
4
4
  description: "Append-only record of what runs discovered and where the process rubbed."
5
- generated: {by: process:create-pmos, at: "2026-10-28T10:47:08Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-28T14:17:21Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -0,0 +1,106 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+ /* adler-seasons-art-test.js — Adler dressed for the season, in the real Home (feedback batch 18 item 8-B; canvas AsPlaces, AsSet2Tap).
4
+ * The real Home from the real server, at 390 px with touch and at 1280 px; the board and briefing are the fixtures. The page's clock is
5
+ * 09:30 on Deepavali (8 Nov 2026), and the calendar module (pm/cozy-seasons.js, 8-A's) is stubbed to answer Deepavali, so this suite tests
6
+ * 8-B's half only. POST /api/settings is recorded.
7
+ * Y1 Your day opens on the Deepavali scene (the charm's sky, the diya), and the greeting wishes it: "Happy Deepavali"
8
+ * Y2 the scene fits the sheet: no sideways scroll, and the scene is as wide as the card
9
+ * T1 a press on the scene says "Dressed for Deepavali." with two named icons; no toast said he dressed up
10
+ * T2 "Not this one" saves the calendar's setting (POST /api/settings) and the scene goes plain at once
11
+ * N no page error
12
+ * PMOS_SHOTS=<dir> also saves the screenshots. */
13
+ const path = require('path');
14
+ const fs = require('fs');
15
+ const { spawn } = require('child_process');
16
+ const { findBrowser } = require('./lib/find-browser');
17
+ const T = require('./test-run').configure({ name: 'adler-seasons-art' });
18
+ const BRP = require('./lib/briefing-premium.js');
19
+ const BRF = require('./fixtures/briefing-premium-facts.js');
20
+ const BP = require('./lib/board-premium.js');
21
+ const BF = require('./fixtures/board-premium-facts.js');
22
+
23
+ const BASE = T.BASE;
24
+ const SHOTS = process.env.PMOS_SHOTS || '';
25
+ const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
26
+ 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); } };
27
+ const results = [];
28
+ const ok = (name, cond, extra = '') => { results.push({ name, cond: !!cond }); console.log(`${cond ? '✓' : '✗'} ${name}${!cond && extra !== '' ? ' — ' + String(extra).slice(0, 600) : ''}`); };
29
+ let srv = null; let browser = null;
30
+ const finish = async (code) => {
31
+ if (browser) await browser.close().catch(() => {});
32
+ if (srv) { try { srv.kill('SIGKILL'); } catch { /* gone */ } }
33
+ T.killTmux();
34
+ const bad = results.filter((x) => !x.cond).length;
35
+ console.log(`\n${results.length - bad}/${results.length} adler-seasons-art assertions passed`);
36
+ process.exit(code !== undefined ? code : (bad ? 1 : 0));
37
+ };
38
+ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
39
+
40
+ // 8-A's calendar, as the page imports it: Deepavali, the day itself; "Not this one" names one setting row
41
+ const SEASONS = `export const charmToday = () => ({ key: 'deepavali', name: 'Deepavali', until: '2026-11-10T23:59:59', today: true });
42
+ export const skipThisYear = (key, now) => ({ key: 'adler.dress.skip', value: key + ':' + now.getFullYear() });`;
43
+
44
+ (async () => {
45
+ const exe = process.env.PMOS_CHROME || findBrowser();
46
+ if (!exe) { console.log('✗ no Chrome/Chromium on this machine — the adler-seasons-art suite cannot run'); return finish(1); }
47
+ let chromium;
48
+ try { ({ chromium } = require('playwright-core')); } catch { console.log('✗ playwright-core is not installed'); return finish(1); }
49
+ srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT) }) });
50
+ await T.waitForServer(BASE);
51
+ browser = await chromium.launch({ executablePath: exe });
52
+ if (SHOTS) fs.mkdirSync(SHOTS, { recursive: true });
53
+ const BRIEF = BRP.build(BRF.facts());
54
+ const BOARD = BP.build(BF.facts());
55
+
56
+ for (const [tag, vp] of [['390', { width: 390, height: 844, hasTouch: true, isMobile: true }], ['1280', { width: 1280, height: 860 }]]) {
57
+ const { width, height, ...rest } = vp;
58
+ const ctx = await browser.newContext({ viewport: { width, height }, ...rest });
59
+ const page = await ctx.newPage();
60
+ const errors = [], posts = [], toasts = [];
61
+ page.on('pageerror', (e) => errors.push(String(e)));
62
+ page.on('request', (rq) => { if (rq.method() === 'POST') posts.push({ path: new URL(rq.url()).pathname, body: rq.postData() || '' }); });
63
+ const json = (rq, b) => rq.fulfill({ status: 200, contentType: 'application/json', body: JSON.stringify(b) });
64
+ await page.clock.setFixedTime(new Date(2026, 10, 8, 9, 30));
65
+ await page.route(/\/api\/board-premium(\?.*)?$/, (rq) => json(rq, { ok: true, state: 'ready', model: BOARD, as_of: Date.now() }));
66
+ await page.route(/\/api\/briefing-premium(\?.*)?$/, (rq) => json(rq, { ok: true, state: 'ready', model: BRIEF, as_of: Date.now() }));
67
+ await page.route('**/api/briefing-premium/**', (rq) => json(rq, { ok: true, turns: [], working: false }));
68
+ await page.route(/\/pm\/cozy-seasons\.js(\?.*)?$/, (rq) => rq.fulfill({ status: 200, contentType: 'text/javascript', body: SEASONS }));
69
+ await page.route(/\/api\/settings$/, (rq) => (rq.request().method() === 'POST' ? json(rq, { ok: true }) : rq.continue()));
70
+ await page.exposeFunction('__toast', (t) => toasts.push(t));
71
+ await page.addInitScript(() => {
72
+ document.addEventListener('DOMContentLoaded', () => { const t = document.getElementById('toast'); if (t) new MutationObserver(() => { if (t.classList.contains('on')) window.__toast(t.textContent); }).observe(t, { attributes: true }); });
73
+ });
74
+ await page.goto(BASE + '/premium.html');
75
+ await until(() => page.evaluate(() => !!document.querySelector('#hmList [data-hm-day]')), 30000);
76
+ // the calendar answers once Settings > Adler is read (cozy-nav's loadPrefs); wait for the charm before opening the day
77
+ await until(() => page.evaluate(() => import('/pm/cozy-adler.js').then((A) => !!A.dress())), 15000);
78
+
79
+ /* Y1-Y2 */
80
+ await page.click('#hmList [data-hm-day]');
81
+ const y1 = await until(() => page.evaluate(() => {
82
+ const b = document.querySelector('#czViewer .yd-open'); const sc = b && b.querySelector('.yd-scene svg.ad-scene');
83
+ if (!sc) return null;
84
+ const r = sc.getBoundingClientRect(), card = b.getBoundingClientRect();
85
+ return { charm: sc.classList.contains('ch-deepavali'), sky: !!sc.querySelector('.adg-deepavali0'), diya: !!sc.querySelector('.adk-amber3'), line: b.querySelector('.yd-ht b').textContent,
86
+ w: Math.round(r.width), cw: Math.round(card.width), h: Math.round(r.height), scroll: document.documentElement.scrollWidth - innerWidth };
87
+ }), 15000);
88
+ ok(`Y1 ${tag} Your day opens on the Deepavali scene with the diya, and wishes it`, y1 && y1.charm && y1.sky && y1.diya && /^Happy Deepavali\b/.test(y1.line), JSON.stringify(y1));
89
+ ok(`Y2 ${tag} the scene fills the card's width, keeps its height, and nothing scrolls sideways`, y1 && y1.w >= y1.cw - 2 && y1.h > 60 && y1.h <= 152 && y1.scroll <= 0, JSON.stringify(y1));
90
+ if (SHOTS) { await sleep(400); await page.screenshot({ path: path.join(SHOTS, `day-deepavali-${tag}.png`) }); }
91
+
92
+ /* T1-T2 */
93
+ await page.click('#czViewer .yd-scene[data-ad-dress]');
94
+ const t1 = await until(() => page.evaluate(() => { const t = document.querySelector('#czViewer .ad-tip'); return t ? { text: t.querySelector('.ad-tip-t').textContent, icons: [...t.querySelectorAll('button')].map((b) => b.getAttribute('aria-label')) } : null; }));
95
+ ok(`T1 ${tag} a press says "Dressed for Deepavali." with "Not this one" and Dress for the day; no toast said he dressed`, t1 && t1.text === 'Dressed for Deepavali.' && t1.icons.length === 2 && /^Not this one/.test(t1.icons[0]) && !toasts.some((x) => /Deepavali|dress/i.test(x)), JSON.stringify({ t1, toasts }));
96
+ if (SHOTS) await page.screenshot({ path: path.join(SHOTS, `tap-${tag}.png`) });
97
+ await page.click('#czViewer .ad-tip [data-ad-tip="skip"]');
98
+ const t2 = await until(() => page.evaluate(() => { const b = document.querySelector('#czViewer .yd-open'); return b && !b.querySelector('.ch-deepavali') && !b.querySelector('.ad-tip') ? { plain: true, btn: !!b.querySelector('[data-ad-dress]') } : null; }));
99
+ const saved = posts.find((p) => p.path === '/api/settings');
100
+ ok(`T2 ${tag} "Not this one" saves the calendar's setting, and he is plain at once`, t2 && !t2.btn && saved && JSON.parse(saved.body).key === 'adler.dress.skip' && JSON.parse(saved.body).value === 'deepavali:2026', JSON.stringify({ t2, saved }));
101
+
102
+ ok(`N ${tag} no page error`, !errors.length, JSON.stringify(errors));
103
+ await ctx.close();
104
+ }
105
+ return finish();
106
+ })();
@@ -0,0 +1,111 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+ /* adler-seasons-test.js — Settings › Adler › Dress for the day in the real page (feedback batch 18 item 8, slice 8-A; canvas AsSet1).
4
+ * The real Settings dialog from the real server, at 390 px with touch and at 1280 px. The page clock is pinned to 3 Nov 2026 in
5
+ * Singapore (Deepavali week), and Settings > Adler is reached the way the tap popover's › reaches it: openSettings('dress').
6
+ * D1 the Adler section has a "Dress for the day" row that says what he wears, and its › opens the page
7
+ * D2 the page: the master switch, the place, the group rows, Wear now; "Today: Deepavali" with its end date
8
+ * D3 More festivals opens one switch per day; pressing Pongal posts adler.dress.days
9
+ * D4 Wear now Movie night posts adler.dress.wear for today, and the button says it is worn
10
+ * D5 the master switch off posts adler.dress.on false and leaves one line
11
+ * D6 no page error, and nothing wider than the phone
12
+ * PMOS_SHOTS=<dir> also saves the screenshots. */
13
+ const path = require('path');
14
+ const fs = require('fs');
15
+ const { spawn } = require('child_process');
16
+ const { findBrowser } = require('./lib/find-browser');
17
+ const T = require('./test-run').configure({ name: 'adler-seasons' });
18
+
19
+ const BASE = T.BASE;
20
+ const SHOTS = process.env.PMOS_SHOTS || '';
21
+ const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
22
+ 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
+ const results = [];
24
+ const ok = (name, cond, extra = '') => { results.push({ name, cond: !!cond }); console.log(`${cond ? '✓' : '✗'} ${name}${!cond && extra !== '' ? ' — ' + String(extra).slice(0, 600) : ''}`); };
25
+ let srv = null; let browser = null;
26
+ const finish = async (code) => {
27
+ if (browser) await browser.close().catch(() => {});
28
+ if (srv) { try { srv.kill('SIGKILL'); } catch { /* gone */ } }
29
+ T.killTmux();
30
+ const bad = results.filter((x) => !x.cond).length;
31
+ console.log(`\n${results.length - bad}/${results.length} adler-seasons assertions passed`);
32
+ process.exit(code !== undefined ? code : (bad ? 1 : 0));
33
+ };
34
+ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
35
+
36
+ (async () => {
37
+ const exe = process.env.PMOS_CHROME || findBrowser();
38
+ if (!exe) { console.log('✗ no Chrome/Chromium on this machine — the adler-seasons suite cannot run'); return finish(1); }
39
+ let chromium;
40
+ try { ({ chromium } = require('playwright-core')); } catch { console.log('✗ playwright-core is not installed'); return finish(1); }
41
+ srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT) }) });
42
+ await T.waitForServer(BASE);
43
+ browser = await chromium.launch({ executablePath: exe });
44
+ if (SHOTS) fs.mkdirSync(SHOTS, { recursive: true });
45
+ const NOW = Date.UTC(2026, 10, 3, 2, 0); // 3 Nov 2026, 10:00 in Singapore
46
+
47
+ for (const [w, h, phone] of [[390, 844, true], [1280, 860, false]]) {
48
+ const tag = phone ? '390' : '1280';
49
+ const ctx = await browser.newContext({ viewport: { width: w, height: h }, hasTouch: phone, isMobile: phone, timezoneId: 'Asia/Singapore', locale: 'en-SG' });
50
+ const page = await ctx.newPage();
51
+ const errors = [], posts = [];
52
+ page.on('pageerror', (e) => errors.push(String(e)));
53
+ page.on('request', (rq) => { if (rq.method() === 'POST' && new URL(rq.url()).pathname === '/api/settings') { try { posts.push(JSON.parse(rq.postData() || '{}')); } catch { /* not JSON */ } } });
54
+ // the clock: Date.now and new Date() read 3 Nov 2026 (timers keep running)
55
+ await page.addInitScript((t) => { const D = Date, off = t - D.now(); class F extends D { constructor(...a) { super(...(a.length ? a : [D.now() + off])); } static now() { return D.now() + off; } } window.Date = F; }, NOW);
56
+ await page.goto(BASE + '/premium.html');
57
+ await until(() => page.evaluate(() => !!document.querySelector('#hmList')), 30000);
58
+ // each viewport starts from the defaults (the server keeps a press between the two)
59
+ await page.evaluate(() => import('/pm/http.js').then((M) => Promise.all(['adler.dress.days', 'adler.dress.wear', 'adler.dress.on'].map((key) => M.pmPost('/api/settings', { key, reset: true })))));
60
+ posts.length = 0;
61
+ const shot = async (name) => { if (SHOTS) { await sleep(400); await page.screenshot({ path: path.join(SHOTS, `dress-${name}-${tag}.png`) }); } };
62
+
63
+ /* D1 */
64
+ await page.evaluate(() => import('/pm/cozy-settings.js').then((M) => M.openSettings('adler')));
65
+ const d1 = await until(() => page.evaluate(() => { const b = document.querySelector('#evSettings [data-ev-dress="open"]'); if (!b) return null; const row = b.closest('.ev-trow'); return row.textContent; }), 15000);
66
+ ok(`D1 ${tag} the Adler section's "Dress for the day" row says what he wears now`, d1 && /Dress for the day/.test(d1) && /Today: Deepavali, until 15 Nov/.test(d1), d1);
67
+ await page.click('#evSettings [data-ev-dress="open"]');
68
+
69
+ /* D2 */
70
+ const d2 = await until(() => page.evaluate(() => { const m = document.querySelector('#evSettings .ev-st-main'); if (!m || !m.querySelector('.ev-dr-hd')) return null; return { text: m.textContent.replace(/\s+/g, ' '), master: m.querySelector('[data-ev-dsw="adler.dress.on"]').getAttribute('aria-checked'), now: (m.querySelector('.ev-dr-now') || {}).textContent || '', place: m.querySelector('#evPlace') ? m.querySelector('#evPlace').value : null, wear: m.querySelectorAll('[data-ev-wear]').length, back: !!m.querySelector('[data-ev-dress="back"][aria-label]') }; }));
71
+ ok(`D2 ${tag} the page: master switch on, Singapore · tropics from the computer, the group rows, Wear now`, d2 && d2.master === 'true' && /Singapore · tropics/.test(d2.text) && /From your computer/.test(d2.text) && d2.place === ''
72
+ && ['Public holidays in Singapore', 'Seasons', 'Space and science days', 'School days', 'More festivals and national days', 'Big sports', 'Exam season', 'Your birthday', 'Wear now'].every((x) => d2.text.includes(x)) && d2.wear === 2 && d2.back, JSON.stringify(d2));
73
+ ok(`D2 ${tag} "Today: Deepavali", he wears it until 15 Nov; Good Friday stays quiet`, d2 && /Today: Deepavali/.test(d2.now) && /until 15 Nov/.test(d2.now) && /Good Friday/.test(d2.text) && /Monsoon, Dec to early Mar/.test(d2.text), d2 && d2.now);
74
+ const wide = await page.evaluate(() => document.querySelector('#evSettings .ev-st-main').scrollWidth - document.querySelector('#evSettings .ev-st-main').clientWidth);
75
+ ok(`D6 ${tag} nothing wider than the dialog`, wide <= 1, String(wide));
76
+ await shot('page');
77
+
78
+ /* D3 */
79
+ await page.click('#evSettings [data-ev-dress="more"]');
80
+ const d3 = await until(() => page.evaluate(() => { const l = document.querySelector('#evMore'); return l ? [...l.querySelectorAll('[data-ev-dday]')].map((b) => b.dataset.evDday + ':' + b.getAttribute('aria-checked')) : null; }));
81
+ ok(`D3 ${tag} More festivals: one switch per day, Pongal off and Mid-Autumn on by default`, d3 && d3.includes('pongal:false') && d3.includes('midautumn:true') && d3.length >= 10, JSON.stringify(d3));
82
+ await shot('more');
83
+ await page.click('#evMore [data-ev-dday="pongal"]');
84
+ const p3 = await until(() => posts.find((p) => p.key === 'adler.dress.days'));
85
+ ok(`D3 ${tag} pressing Pongal posts adler.dress.days with pongal on`, p3 && p3.value && p3.value.pongal === true, JSON.stringify(p3));
86
+ const on3 = await until(() => page.evaluate(() => { const b = document.querySelector('#evMore [data-ev-dday="pongal"]'); return b && b.getAttribute('aria-checked') === 'true'; }));
87
+ ok(`D3 ${tag} and the switch shows it`, on3, JSON.stringify(posts.filter((p) => p.key === "adler.dress.days")));
88
+
89
+ /* D4 */
90
+ await page.click('#evSettings [data-ev-wear="movie"]');
91
+ const p4 = await until(() => posts.find((p) => p.key === 'adler.dress.wear'));
92
+ ok(`D4 ${tag} Wear now Movie night posts adler.dress.wear for today`, p4 && p4.value && p4.value.key === 'movie' && p4.value.day === '2026-11-03', JSON.stringify(p4));
93
+ const d4 = await until(() => page.evaluate(() => { const b = document.querySelector('#evSettings [data-ev-wear="movie"]'); const n = document.querySelector('#evSettings .ev-dr-now'); return b && b.getAttribute('aria-pressed') === 'true' ? { label: b.getAttribute('aria-label'), now: n ? n.textContent : '' } : null; }));
94
+ ok(`D4 ${tag} the button says it is worn, and Movie night is what he wears today`, d4 && /^Take off Movie night/.test(d4.label) && /Today: Movie night/.test(d4.now), JSON.stringify(d4));
95
+ await page.click('#evSettings [data-ev-wear="movie"]');
96
+ await until(() => posts.filter((p) => p.key === 'adler.dress.wear').length === 2);
97
+
98
+ /* D5 */
99
+ await page.click('#evSettings [data-ev-dsw="adler.dress.on"]');
100
+ const p5 = await until(() => posts.find((p) => p.key === 'adler.dress.on'));
101
+ const d5 = await until(() => page.evaluate(() => { const m = document.querySelector('#evSettings .ev-st-main'); return m && !m.querySelector('[data-ev-wear]') ? m.textContent : null; }));
102
+ ok(`D5 ${tag} the master switch off posts false and leaves one line`, p5 && p5.value === false && d5 && /hoodie every day/.test(d5), JSON.stringify(p5));
103
+ await shot('off');
104
+ await page.click('#evSettings [data-ev-dsw="adler.dress.on"]');
105
+ await until(() => posts.filter((p) => p.key === 'adler.dress.on').length === 2);
106
+
107
+ ok(`D6 ${tag} no page error`, errors.length === 0, errors.join(' | '));
108
+ await ctx.close();
109
+ }
110
+ finish();
111
+ })();
@@ -53,14 +53,16 @@ const mk = (o) => BP.build(F.facts(o));
53
53
  const IVREAD = () => {
54
54
  const v = document.querySelector('#czViewer'), iv = v && !v.hidden && v.querySelector('.iv'); if (!iv) return null;
55
55
  const tx = (sel, root = iv) => { const e = root.querySelector(sel); return e ? e.textContent.replace(/\s+/g, ' ').trim() : null; };
56
+ // batch 18 item 1: the mission replaces the stage line; its stages, dates and next stage open in place, so a first read opens it
57
+ const mi = iv.querySelector('[data-iv-mi]'); if (mi && !iv.querySelector('.iv-mio')) { mi.click(); return null; }
56
58
  const sc = iv.querySelector('.iv-sc'), c = window.czViewer && window.czViewer.current(), r = v.getBoundingClientRect();
57
- return { t: tx('.cz-vw-title', v), kind: c && c.kind, line: tx('.iv-s1 b'), right: tx('.iv-s1 .iv-r'), why: tx('.iv-why'), meta: tx('.iv-meta'), wfi: (iv.querySelector('.iv-meta .wfi') || {}).title || null,
59
+ return { t: tx('.cz-vw-title', v), kind: c && c.kind, why: tx('.iv-why'), late: !!iv.querySelector('.mi-svg .late'), meta: tx('.iv-meta'), wfi: (iv.querySelector('.iv-meta .wfi') || {}).title || null,
58
60
  primary: (iv.querySelector('[data-iv-primary]') || {}).dataset ? (iv.querySelector('[data-iv-primary]') || { dataset: {} }).dataset.ivPrimary || null : null,
59
- stage: sc && tx('.iv-sch b', sc), where: sc && tx('.iv-scm', sc), no: sc && tx('.iv-sch .iv-no', sc),
60
- // the stage line (batch 11 item 21): one part a stage, read back as "<done|now|next> [ms]" a stage, as the ladder's bars were
61
- ...(() => { const by = new Map(); for (const x of sc ? sc.querySelectorAll('.iv-tl .iv-tlp') : []) if (!by.has(x.dataset.ivStage)) by.set(x.dataset.ivStage, x);
62
- const ps = [...by.values()]; return { bars: ps.map((x) => [['done', 'now', 'next'].find((k) => x.classList.contains(k)) || '', /^◆ /.test(x.title) ? 'ms' : ''].filter(Boolean).join(' ')).join('|'), titles: ps.map((x) => x.title) }; })(),
63
- aria: sc && sc.getAttribute('aria-label'), dates: sc && tx('.iv-tl-dt', sc), next: sc && sc.querySelector('.iv-scgo') ? sc.querySelector('.iv-scgo').getAttribute('aria-label') : null,
61
+ stage: sc && tx('.iv-sch b', sc), where: sc && tx('.iv-scd', sc), no: sc && tx('.iv-sch .iv-no', sc),
62
+ // the mission's strip (batch 18 item 1): one part a stage, read back as done, now or next; the current stage's name under it; in place the milestones
63
+ bars: sc ? [...sc.querySelectorAll('.mi-svg :is(.mi-st, .mi-dsh)')].map((x) => (x.classList.contains('dn') ? 'done' : x.classList.contains('q') ? 'next' : 'now')).join('|') : '',
64
+ nm: sc && tx('.iv-mi-nm', sc), ms: sc ? [...sc.querySelectorAll('.iv-mio .iv-msr')].map((x) => x.textContent.replace(/\s+/g, ' ').trim()) : [],
65
+ aria: sc && sc.getAttribute('aria-label'), dates: sc && tx('.iv-mio-h .iv-dtc', sc), next: sc && sc.querySelector('.iv-scgo') ? sc.querySelector('.iv-scgo').getAttribute('aria-label') : null,
64
66
  tasks: tx('.iv-th'), secs: [...iv.querySelectorAll('.iv-ws')].map((b) => b.textContent.replace(/\s+/g, ' ').trim()), tks: [...iv.querySelectorAll('[data-iv-ticket]')].map((e) => e.dataset.ivTicket).join(),
65
67
  rows: [...iv.querySelectorAll('.iv-tr')].map((e) => e.textContent.replace(/\s+/g, ' ').trim()), q: [...iv.querySelectorAll('.iv-q')].map((e) => e.textContent), empty: !!iv.querySelector('.iv-empty'),
66
68
  folds: [...iv.querySelectorAll('.iv-fr b, .czs-row b')].map((b) => b.textContent), body: v.querySelector('.cz-vw-body').textContent.replace(/\s+/g, ' '),
@@ -165,7 +167,7 @@ const IVREAD = () => {
165
167
  await q.click('.bt-l[data-row="board:usage-billing"] .bt-nm');
166
168
  /* re-pointed (batch 11 item 21, the stage line): as on the Board's timeline, a skipped stage has no part; a » marks it only between two parts */
167
169
  const sk = await until(() => q.evaluate(IVREAD));
168
- ok('B1 the panel\'s line has no part for the skipped first step: it starts at Discover, now', !!sk && sk.bars.split('|').length === 7 && sk.bars.split('|')[0] === 'now' && /^Discover · /.test(sk.titles[0]) && !sk.titles.some((x) => /Triage/.test(x)), JSON.stringify(sk && [sk.bars, sk.titles]));
170
+ ok('B1 the mission has no part for the skipped first step: it starts at Discover, now', !!sk && sk.bars.split('|').length === 7 && sk.bars.split('|')[0] === 'now' && sk.nm === 'Discover', JSON.stringify(sk && [sk.bars, sk.nm]));
169
171
  await R.ctx.close();
170
172
  }
171
173
  {
@@ -180,10 +182,10 @@ const IVREAD = () => {
180
182
  const R = await open({ model: BP.build(f) }), q = R.page;
181
183
  await q.click('.bt-l[data-row="board:usage-billing"] .bt-nm');
182
184
  const td = await until(() => q.evaluate(IVREAD));
183
- ok('XipB a Tender initiative: Late, the one sentence why from the record, the progress said once, by hand, the owner and the Tender workflow', !!td && td.line === 'Late' && /^The plan ended Aug 11(, 2026)?, \d+ days ago, and Tender new CIAM is in Technical POC\.$/.test(td.why) && td.right === '53% · by hand' && /wawan ?· ?Tender$/.test(td.meta) && td.wfi === 'Tender', JSON.stringify(td));
184
- ok('XipB the stage card is the Tender stage: "Technical POC", 5 of 7 on the ladder, the seven Tender stages with Technical POC current and ◆ on the last two', !!td && td.stage === 'Technical POC' && td.no === '5' && td.bars === 'done|done|done|done|now|next ms|next ms' && td.aria === 'Stage 5 of 7 of Tender: Technical POC. Next stage: Award decision.' && !/No st(ep|age) on record/.test(td.body), JSON.stringify(td && [td.stage, td.no, td.bars, td.aria]));
185
- ok('XipB the → names the next stage; no breakdown draws the seven Tender sections dashed, with Technical POC marked now', !!td && /^Next: ◆ Award decision/.test(td.next || '') && td.empty && /Technical POC · now/.test(td.body), JSON.stringify(td && [td.next, td.empty]));
186
- ok('XipB the dates under the line say the plan and the overrun; no Jira date; the progress number is said once', !!td && /^Apr 23 ?Aug 11 ?\d+ days over$/.test(td.dates || '') && !/Jira:/.test(td.dates) && (td.body.match(/53%/g) || []).length === 1 && !td.folds.includes('Dates and trend'), JSON.stringify(td && [td.dates, td.folds]));
185
+ ok('XipB a Tender initiative: late in the orange marks of the mission, no words for it (XvpE1States), the owner and the Tender workflow', !!td && td.late && !td.why && /Owner: wawan/.test(td.meta) && td.wfi === 'Tender', JSON.stringify(td));
186
+ ok('XipB the stage card is the Tender stage: "Technical POC", 5 of 7 on the ladder, the seven Tender stages with Technical POC current', !!td && td.stage === 'Technical POC' && td.no === '5' && td.bars === 'done|done|done|done|now|next|next' && td.aria === 'Stage 5 of 7 of Tender: Technical POC. Next stage: Award decision.' && !/No st(ep|age) on record/.test(td.body), JSON.stringify(td && [td.stage, td.no, td.bars, td.aria]));
187
+ ok('XipB the → names the next stage; no breakdown draws the seven Tender sections dashed, with Technical POC marked now', !!td && /^Next: ◆ Award decision/.test(td.next || '') && td.empty && td.nm === 'Technical POC', JSON.stringify(td && [td.next, td.empty, td.nm]));
188
+ ok('XipB the dates in place say the plan and the overrun; no Jira date; the progress number is said once at most', !!td && /^Apr 23 – Aug 11 · \d+ days over$/.test(td.dates || '') && !/Jira:/.test(td.dates) && (td.body.match(/53%/g) || []).length <= 1 && !td.folds.includes('Dates and trend'), JSON.stringify(td && [td.dates, td.folds]));
187
189
  if (process.env.PMOS_SHOTS) await q.screenshot({ path: path.join(process.env.PMOS_SHOTS, 'ini-tender-1440.png') });
188
190
  await R.ctx.close();
189
191
  if (process.env.PMOS_SHOTS) {
@@ -213,10 +215,10 @@ const IVREAD = () => {
213
215
  const sel = await q.evaluate(() => ({ sel: !!document.querySelector('.bt-l.sel[data-row="board:sso-partners"]'), dlg: !!document.querySelector('#dlg.on'), peek: !document.querySelector('#peek'), record: !!document.querySelector('#czViewer [data-pk="record"]') }));
214
216
  ok('B1 a row opens the initiative in the Viewer, floating at 560 px over the right edge, not the old dialog, and the row is marked', !!pk && pk.t === 'SSO for partners' && pk.w === 560 && pk.side && sel.peek && !sel.dlg && !sel.record && sel.sel, JSON.stringify([pk, sel]));
215
217
  /* re-pointed (the one view): the meta is the owner and the workflow, each fact once; the progress source is the right of the status line */
216
- ok('B1 the summary says the status once (the release date is not said again), the owner and the workflow, and when Jira was read', !!pk && pk.line === 'Ships Nov 4' && /Lee ?· ?Product feature$/.test(pk.meta) && pk.wfi === 'Product feature' && !/day|owner|Deliver/.test(pk.meta) && /^Jira · \d+ days? ago$/.test(pk.right), JSON.stringify(pk && [pk.line, pk.meta, pk.right]));
218
+ ok('B1 the meta line holds the owner and the workflow as icons, each fact once (XvpA1)', !!pk && /Owner: Lee/.test(pk.meta) && pk.wfi === 'Product feature' && !/day|Deliver/.test(pk.meta), JSON.stringify(pk && [pk.meta, pk.wfi]));
217
219
  /* re-pointed (batch 6 rules 1, 4 and 11): the card says where it is (6 of 8 on the ladder) and how much of Deliver's tickets are done; the
218
220
  * tickets themselves are said once, as Deliver's section in Tasks, blocked first, with "N of M done in Jira" */
219
- ok('B1 the stage card names the stage (Deliver, 6 on the ladder of eight, ◆ on Deliver and Evaluate) and how many tickets are done; Deliver\'s section lists the open tickets, blocked first, with the done count', !!pk && pk.bars.split('|').length === 8 && pk.bars.split('|')[5] === 'now ms' && /ms$/.test(pk.bars.split('|')[7]) && pk.stage === 'Deliver' && pk.no === '' && /^1 of 4 done in Jira/.test(pk.where || '') && pk.tks.split(',')[0] === 'SSO-12' && pk.tks.split(',').sort().join() === 'SSO-12,SSO-14,SSO-15' && /SSO-12 SAML errors ?Blocked by PLAT-88/.test(pk.body) && pk.q.some((x) => /^1 of 4 done in Jira/.test(x)) && !pk.folds.includes('Dates and trend'), JSON.stringify(pk && [pk.stage, pk.where, pk.bars, pk.tks, pk.q, pk.folds]));
221
+ ok('B1 the stage card names the stage (Deliver, 6 on the ladder of eight, ◆ as its tile); Deliver\'s section lists the open tickets, blocked first, with the done count', !!pk && pk.bars.split('|').length === 8 && pk.bars.split('|')[5] === 'now' && pk.stage === 'Deliver' && pk.no === '' && pk.tks.split(',')[0] === 'SSO-12' && pk.tks.split(',').sort().join() === 'SSO-12,SSO-14,SSO-15' && /SSO-12 SAML errors ?Blocked by PLAT-88/.test(pk.body) && pk.q.some((x) => /^1 of 4 done in Jira/.test(x)) && !pk.folds.includes('Dates and trend'), JSON.stringify(pk && [pk.stage, pk.where, pk.bars, pk.tks, pk.q, pk.folds]));
220
222
  ok('B1 what PMOS has no record of is not drawn: no Drafted row, no Jira-differs row; Linked holds only Jira\'s freshness and its ↻ (batch 16 item 5c)', !!pk && !pk.folds.includes('Drafted in PMOS') && !pk.folds.includes('Jira differs from the PRD'), JSON.stringify(pk && pk.folds));
221
223
  ok('B1 there is no ask box; Discuss in chat sits in the header', !!pk && pk.ask === 0 && pk.disc, JSON.stringify(pk));
222
224
  if (process.env.PMOS_SHOTS) await q.screenshot({ path: path.join(process.env.PMOS_SHOTS, 'ini-deliver-1280.png') });
@@ -281,7 +283,7 @@ const IVREAD = () => {
281
283
  /* re-pointed (the one view, rule 9): what waits on you leads the summary card, with the sign-off as its one icon-only primary; the status moves to the meta line */
282
284
  const nb = await until(() => q.evaluate(IVREAD));
283
285
  const pri = await q.evaluate(() => [...document.querySelectorAll('#czViewer [data-iv-primary]')].map((b) => ({ act: b.dataset.ivPrimary, label: b.getAttribute('aria-label'), text: b.textContent.trim() })));
284
- ok('B1 the panel puts the sign-off first, with the sign-off as the one icon-only primary', !!nb && nb.line === 'Waits on you' && /sign-off can wait|Every release ticket is done/.test(nb.why || '') && pri.length === 1 && pri[0].act === 'page' && pri[0].label === 'Your sign-off · v2.4' && pri[0].text === '', JSON.stringify([nb && [nb.line, nb.why], pri]));
286
+ ok('B1 the panel puts the sign-off first, with the sign-off as the one icon-only primary', !!nb && /sign-off can wait|Every release ticket is done/.test(nb.why || '') && pri.length === 1 && pri[0].act === 'page' && pri[0].label === 'Your sign-off · v2.4' && pri[0].text === '', JSON.stringify([nb && nb.why, pri]));
285
287
  await Promise.all([q.waitForURL(/[?&]ini=sso-partners/, { timeout: 8000 }).catch(() => {}), q.click('#czViewer [data-iv-primary]')]);
286
288
  ok('B1 signing off goes to the initiative\'s page on Home, where the sign-off is', /\/premium\.html\?.*\bini=sso-partners/.test(q.url()), q.url());
287
289
  await R.ctx.close();
@@ -335,7 +337,7 @@ const IVREAD = () => {
335
337
  * over the eight; the old Plan card is the dates line (start, plan end, days left; no Jira date without a Jira forecast); the progress says
336
338
  * where it comes from; Dates and trend is gone */
337
339
  const tp = await until(() => p.evaluate(IVREAD).then((x) => (x && x.kind === 'Initiative' ? x : null)));
338
- ok('B6 an initiative on the timeline opens in the Viewer: the stage card names Plan over the eight steps, the dates line draws the plan dates, no empty rows', !!tp && tp.t === 'Partner API rate limits' && tp.stage === 'Plan' && tp.bars.split('|').length === 8 && tp.bars.split('|').indexOf('now') === 2 && tp.right === '18% · by hand' && /^Sep 20(, 2026)? ?Nov 30(, 2026)? · \d+ days left$/.test(tp.dates || '') && !/Jira:/.test(tp.dates) && !tp.folds.includes('Dates and trend'), JSON.stringify(tp && [tp.stage, tp.bars, tp.right, tp.dates, tp.folds]));
340
+ ok('B6 an initiative on the timeline opens in the Viewer: the stage card names Plan over the eight steps, the dates line draws the plan dates, no empty rows', !!tp && tp.t === 'Partner API rate limits' && tp.stage === 'Plan' && tp.bars.split('|').length === 8 && tp.bars.split('|').indexOf('now') === 2 && /^Sep 20(, 2026)? – Nov 30(, 2026)? · \d+ days left$/.test(tp.dates || '') && !/Jira:/.test(tp.dates) && !tp.folds.includes('Dates and trend'), JSON.stringify(tp && [tp.stage, tp.bars, tp.dates, tp.folds]));
339
341
  await p.click('#czViewer [data-cz-vw="more"]'); await sleep(80);
340
342
  const tm = await p.evaluate(() => [...document.querySelectorAll('.cz-vw-menu [role="menuitem"]')].map((b) => b.querySelector('span').textContent.trim()));
341
343
  /* re-pointed (batch 14 item 5): ⋯ is the ONE initiative menu (pm/ini-more.js), Home's order; no "Move, hold, cancel or archive", no "Open in full" */
@@ -456,8 +458,8 @@ const IVREAD = () => {
456
458
  ok('T what waits on you comes first, in blue', rf.st === 'Your verdict' && /s-you/.test(rf.stc) && rf.you && rf.line === 'Give your verdict', JSON.stringify(rf));
457
459
  await q.click('.bt-l[data-row="board:self-serve-v2"] .bt-nm');
458
460
  /* re-pointed (the one view): the same records, in the stage card's day clock, the ladder, Linked (a fold of the view) and the Board's own rows */
459
- const pk = await until(() => q.evaluate(() => { const v = document.querySelector('#czViewer'); if (!v || v.hidden || !v.querySelector('[data-czs-id="drafted"]') || !v.querySelector('.iv')) return null; const sec = (id) => { const x = v.querySelector(`[data-czs-id="${id}"]`); return x ? { n: (x.querySelector('.czs-n') || {}).textContent || '', body: (x.querySelector('.czs-body') || {}).textContent.replace(/\s+/g, ' ').trim() } : null; }; return { meta: v.querySelector('.iv-meta').textContent, where: (v.querySelector('.iv-scm') || {}).textContent, stage: (v.querySelector('.iv-sch b') || {}).textContent, stt: (v.querySelector('.iv-tl .iv-tlp.now') || {}).title, drafted: sec('drafted'), wt: sec('drift') }; }));
460
- ok('T the stage card says where it stands and the day in the stage of the usual days; the line marks the stage now', !!pk && pk.stage === 'Build' && /18 of ~14 days$/.test(pk.where || '') && !/day|usually/.test(pk.meta) && /^Build · .*now$/.test(pk.stt || ''), JSON.stringify(pk && [pk.stage, pk.where, pk.meta, pk.stt]));
461
+ const pk = await until(() => q.evaluate(() => { const v = document.querySelector('#czViewer'); if (!v || v.hidden || !v.querySelector('[data-czs-id="drafted"]') || !v.querySelector('.iv')) return null; const sec = (id) => { const x = v.querySelector(`[data-czs-id="${id}"]`); return x ? { n: (x.querySelector('.czs-n') || {}).textContent || '', body: (x.querySelector('.czs-body') || {}).textContent.replace(/\s+/g, ' ').trim() } : null; }; return { meta: v.querySelector('.iv-meta').textContent, where: (v.querySelector('.iv-scm') || {}).textContent, stage: (v.querySelector('.iv-sch b') || {}).textContent, stt: !!v.querySelector('.mi-svg :is(.mi-st, .mi-dsh):is(.nw, .late, .hold)'), drafted: sec('drafted'), wt: sec('drift') }; }));
462
+ ok('T the stage card names the stage; the mission marks it now; the meta line says no days (batch 18 item 1: the day clock is not drawn)', !!pk && pk.stage === 'Build' && !/day|usually/.test(pk.meta) && pk.stt === true, JSON.stringify(pk && [pk.stage, pk.where, pk.meta, pk.stt]));
461
463
  if (process.env.PMOS_SHOTS) await q.screenshot({ path: path.join(process.env.PMOS_SHOTS, 'ini-build-1280.png') });
462
464
  ok('T tickets drafted in PMOS and not in Jira are listed, and go to Jira only through your Commit', !!pk && pk.drafted.n === '1' && /^V\.4 ?Resend the invite after 48 hours ?not in Jira ?They go to Jira only through your Commit\.$/.test(pk.drafted.body), JSON.stringify(pk && pk.drafted));
463
465
  ok('T a ticket pushed from an older PRD is flagged as PRD drift', !!pk && !!pk.wt && /^ONB-31 was pushed from an older PRD/.test(pk.wt.body), JSON.stringify(pk && pk.wt));
@@ -128,11 +128,14 @@ const WRITES = /^\/api\/(?:boards\/(?:move|tasks\/(?:add|state))|lifecycle|core-
128
128
  await p.goto(BASE + '/premium.html?ini=self-serve-v2&ws=w1&board=w1&theme=light'); await ready(p);
129
129
 
130
130
  /* I3 header and the ONE view (batch 6 items 1 and 3: the Board's panel draws the same; stage-card-test.js holds the stage card's behaviour) */
131
+ await until(() => p.evaluate(() => !!document.querySelector('#czViewer [data-iv-mi]')), 15000);
132
+ if (!(await p.evaluate(() => !!document.querySelector('#czViewer .iv-mio')))) await p.click('#czViewer [data-iv-mi]', { position: { x: 8, y: 8 } });
133
+ await until(() => p.evaluate(() => !!document.querySelector('#czViewer .iv-mio')));
131
134
  const card = await p.evaluate(() => { const c = document.querySelector('#czViewer .iv-sc'), iv = document.querySelector('#czViewer .iv'); const q = (s, r = c) => ((r.querySelector(s) || {}).textContent || '').replace(/\s+/g, ' ').trim(), d = (s) => ((document.querySelector(s) || {}).textContent || '').trim();
132
- return { kind: d('#czViewer .cz-vw-kind'), title: d('#czVwTitle'), stage: q('.iv-sch > b, .iv-sch .iv-stc b'), where: q('.iv-scm'), bars: new Set([...c.querySelectorAll('.iv-tl .iv-tlp')].map((x) => x.dataset.ivStage)).size + c.querySelectorAll('.iv-tl .iv-tl-sk').length, now: new Set([...c.querySelectorAll('.iv-tl .iv-tlp.now')].map((x) => x.dataset.ivStage)).size, tail: (c.querySelector('.iv-scgo') || { getAttribute: () => '' }).getAttribute('aria-label') || '', ms: !!c.querySelector('.iv-scgo[data-ms]'),
135
+ return { kind: d('#czViewer .cz-vw-kind'), title: d('#czVwTitle'), stage: q('.iv-sch > b, .iv-sch .iv-stc b'), where: q('.iv-scm'), bars: c.querySelectorAll('.mi-svg :is(.mi-st, .mi-dsh)').length, now: c.querySelectorAll('.mi-svg :is(.mi-st, .mi-dsh):is(.nw, .late, .hold)').length, tail: (c.querySelector('.iv-scgo') || { getAttribute: () => '' }).getAttribute('aria-label') || '', ms: !!c.querySelector('.iv-scgo[data-ms]'),
133
136
  pri: iv.querySelectorAll('[data-iv-primary]').length, cta: !!iv.querySelector('[data-hm-cta]'), tasks: q('.iv-th', iv), empty: !!iv.querySelector('.iv-empty'), secs: [...iv.querySelectorAll('.iv-ws b')].map((b) => b.textContent), meta: q('.iv-meta', iv) }; });
134
137
  ok('I3 the page\'s header names the initiative, its workflow and its anchor (D99)', card.title === 'Self-serve onboarding v2' && /^Product feature · \S/.test(card.kind), JSON.stringify(card));
135
- ok('I3 the card shows the stage the workflow engine derives, with one part a stage on its line and the current one marked', card.stage === 'Build' && card.bars === 8 && card.now === 1, JSON.stringify(card));
138
+ ok('I3 the card shows the stage the workflow engine derives, with one part a stage on its mission strip and the current one marked', card.stage === 'Build' && card.bars === 8 && card.now === 1, JSON.stringify(card));
136
139
  ok('I1 the summary leads with at most one primary; the card holds no step list; Tasks is the WBS by stage', card.pri <= 1 && !card.cta && /^Tasks/.test(card.tasks) && (card.secs.length > 0 || card.empty) && !/pull request|builder agent/i.test(card.secs.join(' ')), JSON.stringify(card));
137
140
  ok('I1 the card\'s → names the next stage', /^Next: ◆ Deliver/.test(card.tail), JSON.stringify(card));
138
141
  ok('I3 Deliver is a milestone: the next stage carries the ◆ mark (Agreed design AgInitAgents)', card.ms, JSON.stringify(card));
@@ -258,8 +261,8 @@ const WRITES = /^\/api\/(?:boards\/(?:move|tasks\/(?:add|state))|lifecycle|core-
258
261
  const tok = (v) => { const x = document.createElement('i'); x.style.setProperty('background-color', 'var(' + v + ')'); document.body.appendChild(x); const c = getComputedStyle(x).backgroundColor; x.remove(); return c; };
259
262
  const cs = (s) => { const e = document.querySelector(s); return e ? getComputedStyle(e) : null; };
260
263
  const fab = document.querySelector('#czFab'), fr = fab && fab.getBoundingClientRect();
261
- const c = document.querySelector('#czViewer .iv-sc').getBoundingClientRect();
262
- return { font: cs('body').fontFamily, cta: (cs('#czViewer .iv-go') || {}).backgroundColor, ctaAlt: !document.querySelector('#czViewer .iv-go'), solid: tok('--cz-solid'), blue: tok('--cz-blue'), well: tok('--cz-well'), card: tok('--cz-card'), box: cs('#czViewer .iv-sc').backgroundColor, rad: parseFloat(cs('#czViewer .iv-sc').borderTopLeftRadius), fab: fr ? [Math.round(fr.width), Math.round(fr.height)] : null, over: document.documentElement.scrollWidth - innerWidth, cardW: Math.round(c.width) };
264
+ const c = document.querySelector('#czViewer .iv-card').getBoundingClientRect();
265
+ return { font: cs('body').fontFamily, cta: (cs('#czViewer .iv-go') || {}).backgroundColor, ctaAlt: !document.querySelector('#czViewer .iv-go'), solid: tok('--cz-solid'), blue: tok('--cz-blue'), well: tok('--cz-well'), card: tok('--cz-card'), box: cs('#czViewer .iv-card').backgroundColor, rad: parseFloat(cs('#czViewer .iv-card').borderTopLeftRadius), fab: fr ? [Math.round(fr.width), Math.round(fr.height)] : null, over: document.documentElement.scrollWidth - innerWidth, cardW: Math.round(c.width) };
263
266
  });
264
267
  const d = [];
265
268
  if (!/^Nunito/.test(g.font)) d.push('font ' + g.font);
@@ -1,4 +1,28 @@
1
1
  [
2
+ {
3
+ "v": "0.443.0",
4
+ "at": "2026-10-28T14:17:24.774Z",
5
+ "f": 2,
6
+ "prs": [
7
+ {
8
+ "n": 1087,
9
+ "t": "0.442.0 hotfix, goals made clear, folded list card, task ticket linking (batch 18)",
10
+ "s": "0.442.0 hotfix, goals made clear, folded list card, task ticket linking (batch 18)"
11
+ }
12
+ ]
13
+ },
14
+ {
15
+ "v": "0.442.0",
16
+ "at": "2026-10-28T11:35:22.898Z",
17
+ "f": 2,
18
+ "prs": [
19
+ {
20
+ "n": 1086,
21
+ "t": "Initiative Viewer on phone and desktop, Adler dressed for the season, clear task marks (feedback batch 18 items 1, 8, 12, 13)",
22
+ "s": "Initiative Viewer on phone and desktop, Adler dressed for the season, clear task marks (feedback batch 18 items 1, 8, 12, 13)"
23
+ }
24
+ ]
25
+ },
2
26
  {
3
27
  "v": "0.441.0",
4
28
  "at": "2026-10-28T10:47:11.081Z",