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
@@ -5,7 +5,15 @@
5
5
  * XtvA5PhoneKanban, XtvA6PhoneTimeline, XtvA7BoardPanel). Serves the real Board page from the real server, answers GET /api/board-premium
6
6
  * with the model lib/board-premium.js builds from fixtures/board-premium-facts.js plus one initiative's tasks, and captures the writes.
7
7
  * V1 the view switch, remembered · V2 the box's one press and its caret · V3 the date press · V4 Timeline · V5 a bar's drag · V6 Kanban
8
- * V7 a card's drag · V8 Won't do and Archived in the List · V9 the phone. SHOTS_5B=<dir> writes the screens. */
8
+ * V7 a card's drag · V8 Won't do and Archived in the List · V9 the phone. SHOTS_5B=<dir> writes the screens.
9
+ * Batch 18 item 1 (1-B; XvpA4Sheet, XvpA3Timeline, XvpA3bMonths): the header holds one view button, its sheet picks View, Group by and Zoom
10
+ * (Weeks, Months, All); the List shows only the stages with something open and folds a stage after 3 tasks; All fits the whole initiative.
11
+ * V10 the sheet · V11 the List's folds · V12 Timeline at All. The pure half is viewer-tasks.test.js.
12
+ * 0.442.0 hotfix (Wawan 2026-10-28 "So much broken UI"; shots next18/hotfix-442/): H1 a phone's titles whole, bars their own size (Home's
13
+ * Viewer makes every button 44 px) · H2 the Today line unbroken · H3 no half-cut axis label · H4 one ◇ a milestone · H5 Full width in the
14
+ * Tasks header · H6 the grouping kept over a task edit. Home's Viewer (premium.html) and the Board's panel, 390 and 1440, light and dark.
15
+ * H7 (Wawan 13:02, 13:03): a task whose title names a Jira ticket PMOS read is that ticket (Jira mark, the key once, Jira's status, no box
16
+ * and no Kanban drag) and its dates stay the PM's to set (date press and bar drag save to the task); a key PMOS has not read is plain text. */
9
17
  const path = require('path');
10
18
  const { spawn } = require('child_process');
11
19
  const { findBrowser } = require('./lib/find-browser');
@@ -41,6 +49,18 @@ const TASKS = [
41
49
  { uid: 'task-h', title: 'Plan the rollout', status: 'To do', owner: 'Wawan', start: '2026-11-02', end: '2026-11-06', section: 'plan' },
42
50
  ];
43
51
  const model = () => { const M = BP.build(F.facts()); const r = M.rows.find((x) => x.id === 'usage-billing'); r.tasks = TASKS.map((t) => ({ ...t })); return M; };
52
+ /* the hotfix's tasks (H*): long titles that start past the first screen, a milestone with a due day only, owners with initials */
53
+ const HTASKS = [
54
+ { uid: 'h1', title: '11.0 Contract Negotiation with selected vendor and their legal team', status: 'In progress', owner: 'Rina Chen', start: '2026-10-08', end: '2026-10-21' },
55
+ { uid: 'h2', title: '11.2 Conclude nego, update TC meeting minutes', status: 'To do', owner: 'Claude', start: '2026-10-18', end: '2026-10-31' },
56
+ { uid: 'h3', title: '11.3 TC endorse meeting minutes and confirm the candidate', status: 'To do', owner: 'Claude', start: '2026-10-29', end: '2026-11-11' },
57
+ { uid: 'h4', title: 'Award contract', milestone: true, status: 'To do', owner: 'Wawan', end: '2026-10-22' },
58
+ { uid: 'h5', title: 'Kick-off notes', status: 'Done', owner: 'Wawan', end: '2026-10-12' },
59
+ ];
60
+ const BRP = require('./lib/briefing-premium.js');
61
+ const BRF = require('./fixtures/briefing-premium-facts.js');
62
+ const IP = require('./lib/initiative-premium.js');
63
+ const IF = require('./fixtures/initiative-premium-facts.js');
44
64
 
45
65
  (async () => {
46
66
  const exe = findBrowser();
@@ -70,13 +90,36 @@ const model = () => { const M = BP.build(F.facts()); const r = M.rows.find((x) =
70
90
  };
71
91
  const shot = async (p, name) => { if (process.env.SHOTS_5B) await p.screenshot({ path: path.join(process.env.SHOTS_5B, name + '.png') }); };
72
92
  const lastPost = (A, route) => A.posts.filter((x) => x.path === route).pop();
93
+ // the one view button opens the sheet; a press there applies at once and the sheet stays; Escape closes it
94
+ const sheetPick = async (pg, kind, val) => {
95
+ await pg.evaluate(() => document.querySelector('#czViewer [data-iv-vbtn]').click());
96
+ await until(() => pg.evaluate(() => !!document.querySelector('.tkc.ivq .ivs')));
97
+ await pg.evaluate(([k, v]) => document.querySelector(`.tkc.ivq .ivs [data-ivs-${k}="${v}"]`).click(), [kind, val]);
98
+ await sleep(150);
99
+ await pg.keyboard.press('Escape');
100
+ await until(() => pg.evaluate(() => !document.querySelector('.tkc.ivq .ivs')));
101
+ };
102
+ const zoomNow = (pg) => pg.evaluate(() => { if (document.querySelector('#czViewer .iva')) return 'all'; const T = document.querySelector('#czViewer .ivt[data-ivt]'); return T ? T.dataset.ivt.split('|').pop() : null; });
73
103
 
74
104
  const A = await open(), p = A.page;
75
105
  /* V1 the switch: List first; icon only, words in aria-label; the last view is remembered */
76
- const sw = await p.evaluate(() => [...document.querySelectorAll('#czViewer .ivx-sb')].map((b) => b.getAttribute('aria-label') + (b.getAttribute('aria-pressed') === 'true' ? '*' : '') + (b.textContent.trim() ? '+text' : '')).join());
77
- ok('V1 the Tasks header has the icon-only switch List, Timeline, Kanban; the first time it is List', sw === 'List*,Timeline,Kanban', sw);
106
+ const sw = await p.evaluate(() => { const b = document.querySelector('#czViewer .iv-th [data-iv-vbtn]'); return b ? b.getAttribute('aria-label') + (b.textContent.trim() ? '+text' : '') : null; });
107
+ ok('V1 the Tasks header has one icon-only view button; the first time it is List', sw === 'Tasks view: List. Change the view, grouping or zoom', sw);
78
108
  const order = await p.evaluate(() => [...document.querySelector('#czViewer .iv-th').children].map((e) => e.className || e.tagName).join());
79
- ok('V1 the switch sits before the +', /ivx-seg,iv-ib$/.test(order), order);
109
+ ok('V1 the header holds the view button and + only, in that order', /,ivx-vb,iv-ib$/.test(order) && !/ivx-seg|ig-by|ivx-pick/.test(order), order);
110
+
111
+ /* V11 the List: only the stages with something open; the rest wait in one fold at the foot; a stage folds after 3 tasks */
112
+ const L0 = await p.evaluate(() => ({ secs: [...document.querySelectorAll('#czViewer .iv-wbs > .iv-ws .w b')].map((b) => b.textContent), rest: (document.querySelector('#czViewer .iv-rest') || {}).textContent || null,
113
+ rows: [...document.querySelectorAll('#czViewer .iv-wbs .iv-wl > .iv-tr .iv-tt')].map((e) => e.textContent), more: (document.querySelector('#czViewer .iv-wl > .iv-more') || {}).textContent || null }));
114
+ ok('V11 the List shows only Discover and Plan (each has something open); the six others wait in one fold', L0.secs.join('|') === 'Discover|Plan' && /^6 stages\s*nothing open/.test(L0.rest || ''), JSON.stringify(L0));
115
+ ok('V11 Discover shows 3 tasks, then "1 more"', L0.rows.length === 3 && /^1 more/.test(L0.more || ''), JSON.stringify(L0));
116
+ await p.click('#czViewer .iv-wl > .iv-more');
117
+ const L1 = await until(() => p.evaluate(() => { const n = document.querySelectorAll('#czViewer .iv-wbs .iv-wl > .iv-tr .iv-tt').length; return n > 3 ? n : null; }));
118
+ ok('V11 "1 more" shows the rest of the stage', L1 === 4, String(L1));
119
+ await p.click('#czViewer .iv-rest');
120
+ const L2 = await until(() => p.evaluate(() => { const s = [...document.querySelectorAll('#czViewer .iv-wbs > .iv-ws .w b')].map((b) => b.textContent); return s.length > 2 ? s : null; }));
121
+ ok('V11 the fold opens the stages with nothing open, in order', L2 && L2.join('|') === 'Discover|Plan|Triage|Prioritize|Build|Deliver|Monitor|Evaluate', JSON.stringify(L2));
122
+ await p.click('#czViewer .iv-rest');
80
123
 
81
124
  /* V8 the List: Won't do joins the Done fold, struck through; Archived is a fold after Done, only when there is one */
82
125
  await p.evaluate(() => { const b = [...document.querySelectorAll('#czViewer .iv-grp')].find((x) => /^Done/.test(x.textContent)); if (b) b.click(); });
@@ -129,8 +172,19 @@ const model = () => { const M = BP.build(F.facts()); const r = M.rows.find((x) =
129
172
  const du = await until(() => { const x = lastPost(A, '/api/boards/tasks/edit'); return x && x.body.due === '2026-10-10' ? x : null; });
130
173
  ok('V3 Undo puts the old due day back', !!du, JSON.stringify(A.posts.slice(-2)));
131
174
 
132
- /* V4 Timeline: the same groups, bars by start → due, a circle for a due day only, a dashed date press at today, the Today line */
133
- await p.click('#czViewer [data-iv-view="timeline"]');
175
+ /* V10 the sheet: View, Group by and Zoom, three rows of the same shape; a bottom sheet on a phone, under the button on a desktop */
176
+ await p.click('#czViewer [data-iv-vbtn]');
177
+ const sh = await until(() => p.evaluate(() => { const q = document.querySelector('.tkc.ivq .ivs'); if (!q) return null; const b = document.querySelector('#czViewer [data-iv-vbtn]').getBoundingClientRect(), r = q.getBoundingClientRect();
178
+ return { rows: [...q.querySelectorAll('.ivs-seg')].map((g) => g.getAttribute('aria-label') + ':' + [...g.children].map((c) => (c.getAttribute('aria-label') || c.textContent.trim()) + (c.getAttribute('aria-pressed') === 'true' ? '*' : '')).join(',')), under: Math.round(r.top - b.bottom), right: Math.round(b.right - r.right), sheet: q.closest('.sheet') ? 1 : 0, exp: document.querySelector('#czViewer [data-iv-vbtn]').getAttribute('aria-expanded') }; }));
179
+ ok('V10 the sheet holds View and Group by (no Zoom for the List); Stage pressed; Epic and Your groups behind ⋯', sh && sh.rows.join('|') === 'View:List*,Timeline,Kanban|Group by:Stage*,Owner,Status,Other groupings: Epic, Your groups', JSON.stringify(sh));
180
+ ok('V10 on a desktop it opens under the button, right edges aligned, the button expanded', sh && !sh.sheet && sh.under >= 0 && sh.under <= 12 && Math.abs(sh.right) <= 2 && sh.exp === 'true', JSON.stringify(sh));
181
+ await p.click('.tkc.ivq .ivs [data-ivs-view="timeline"]');
182
+ const sh2 = await until(() => p.evaluate(() => { const q = document.querySelector('.tkc.ivq .ivs'); return q && document.querySelector('#czViewer .ivt') ? [...q.querySelectorAll('.ivs-seg')].map((g) => g.getAttribute('aria-label')).join('|') : null; }));
183
+ ok('V10 Timeline applies at once; the sheet stays open and adds Zoom', sh2 === 'View|Group by|Zoom', sh2);
184
+ await p.keyboard.press('Escape');
185
+ ok('V10 Escape closes the sheet and leaves the panel open', await until(() => p.evaluate(() => !document.querySelector('.tkc.ivq') && !!document.querySelector('#czViewer .ivt'))));
186
+
187
+ /* V4 Timeline: the same groups, bars by start → due, a circle for a due day only, the tasks with no dates in one row, the Today line */
134
188
  await until(() => p.evaluate(() => !!document.querySelector('#czViewer .ivt')));
135
189
  await sleep(200);
136
190
  const tl = await p.evaluate(() => {
@@ -138,27 +192,37 @@ const model = () => { const M = BP.build(F.facts()); const r = M.rows.find((x) =
138
192
  const bar = (uid) => { const b = T.querySelector(`[data-ivt-bar="${uid}"]`); return b ? b.className.replace(/\s+/g, ' ').trim() : null; };
139
193
  const today = T.querySelector('.ivt-today').getBoundingClientRect(), sc = T.querySelector('.ivt-sc'), nw = T.querySelector('.ivt-n').getBoundingClientRect();
140
194
  return { groups: [...T.querySelectorAll('.ivt-gh b')].map((b) => b.textContent), rows: rows.map((r) => (r.querySelector('.iv-tt') || {}).textContent || r.textContent.trim()), a: bar('task-a'), b: bar('task-b'), c: bar('task-c'),
141
- ghost: !!T.querySelector('.ivt-g[data-iv-date="task-d"]'), zoom: document.querySelector('#czViewer [data-iv-zoom]').textContent, seen: today.left > nw.right && today.left < sc.getBoundingClientRect().right,
195
+ ghost: !!T.querySelector('.ivt-nd .ivt-set[data-iv-date="task-d"]') && /1 without dates/.test(T.querySelector('.ivt-nd').textContent) && !T.querySelector('.ivt-g'), zoom: T.dataset.ivt.split('|').pop(), seen: today.left > nw.right && today.left < sc.getBoundingClientRect().right,
142
196
  lg: document.querySelector('#czViewer .ivt-lg').textContent, arch: /Old spike notes/.test(T.textContent) };
143
197
  });
144
198
  ok('V4 Timeline keeps the List\'s stage groups, one per stage (batch 11 item 5)', tl.groups.join('|') === 'Triage|Discover|Plan|Prioritize|Build|Deliver|Monitor|Evaluate', JSON.stringify(tl.groups));
145
- ok('V4 bars by start and due: in progress light blue, late amber; a due day only is a circle; no dates is a dashed date press', /ivt-b/.test(tl.a) && / pr/.test(tl.a) && /ivt-d/.test(tl.b) && /ivt-b lt/.test(tl.c) && tl.ghost, JSON.stringify(tl));
146
- ok('V4 Weeks is the first zoom; it opens on today, the Today line in view; the legend sits under it', tl.zoom === 'Weeks' && tl.seen && /To do.*In progress.*Late.*Due only.*Jira/.test(tl.lg), JSON.stringify(tl));
199
+ ok('V4 bars by start and due: in progress light blue, late amber; a due day only is a circle; no dates: one "1 without dates · Set" row', /ivt-b/.test(tl.a) && / pr/.test(tl.a) && /ivt-d/.test(tl.b) && /ivt-b lt/.test(tl.c) && tl.ghost, JSON.stringify(tl));
200
+ ok('V4 Weeks is the first zoom; it opens on today, the Today line in view; the legend sits under it', tl.zoom === 'week' && tl.seen && /To do.*In progress.*Late.*Due only.*Jira/.test(tl.lg), JSON.stringify(tl));
147
201
  ok('V4 an archived task shows nowhere in Timeline', !tl.arch);
148
202
  await shot(p, 'timeline-1440');
149
- await p.click('#czViewer [data-iv-zoom]');
150
- await p.evaluate(() => { const b = [...document.querySelectorAll('.tkc.ivq [data-ivq-i]')].find((x) => /Months/.test(x.textContent)); if (b) b.click(); });
151
- const mz = await until(() => p.evaluate(() => { const z = document.querySelector('#czViewer [data-iv-zoom]'); return z && z.textContent === 'Months' ? document.querySelector('#czViewer .ivt').dataset.px : null; }));
152
- ok('V4 the zoom picker changes Weeks to Months', mz === '4', mz);
153
- await p.click('#czViewer [data-iv-zoom]');
154
- const zl = await p.evaluate(() => [...document.querySelectorAll('.tkc.ivq [data-ivq-i]')].map((x) => x.textContent.trim()));
155
- ok('V4 the zoom picker offers Weeks, Months, Quarter, Year, 2 years and 5 years (batch 17 item 3)', ['Weeks', 'Months', 'Quarter', 'Year', '2 years', '5 years'].every((t) => zl.some((x) => x.includes(t))), JSON.stringify(zl));
156
- await p.evaluate(() => { const b = [...document.querySelectorAll('.tkc.ivq [data-ivq-i]')].find((x) => /5 years/.test(x.textContent)); if (b) b.click(); });
157
- const y5 = await until(() => p.evaluate(() => { const z = document.querySelector('#czViewer [data-iv-zoom]'); if (!z || z.textContent !== '5 years') return null; const T = document.querySelector('#czViewer .ivt'); return { px: T.dataset.px, ticks: [...T.querySelectorAll('.ivt-r.ax .ivt-c span')].map((e) => e.textContent.trim()).filter(Boolean).slice(0, 8) }; }));
158
- ok('V4 5 years draws the axis by year', y5 && +y5.px >= 0.16 && y5.ticks.length && y5.ticks.every((t) => /^\d{4}$/.test(t)), JSON.stringify(y5));
159
- await p.click('#czViewer [data-iv-zoom]');
160
- await p.evaluate(() => { const b = [...document.querySelectorAll('.tkc.ivq [data-ivq-i]')].find((x) => /Weeks/.test(x.textContent)); if (b) b.click(); });
161
- await until(() => p.evaluate(() => (document.querySelector('#czViewer [data-iv-zoom]') || {}).textContent === 'Weeks'));
203
+ await sheetPick(p, 'zoom', 'month');
204
+ const mz = await until(() => p.evaluate(() => { const T = document.querySelector('#czViewer .ivt[data-ivt]'); return T && /\|month$/.test(T.dataset.ivt) ? T.dataset.px : null; }));
205
+ ok('V4 the sheet\'s Zoom changes Weeks to Months', mz === '4', mz);
206
+ await p.click('#czViewer [data-iv-vbtn]');
207
+ const zl = await until(() => p.evaluate(() => { const g = document.querySelector('.tkc.ivq .ivs-seg[aria-label="Zoom"]'); return g ? [...g.children].map((x) => x.textContent.trim()) : null; }));
208
+ ok('V4 Zoom offers Weeks, Months and All (batch 18 item 1: three steps in place of six)', zl && zl.join('|') === 'Weeks|Months|All', JSON.stringify(zl));
209
+ await p.keyboard.press('Escape');
210
+
211
+ /* V12 Timeline at All: one row per stage, the whole initiative in the panel's width; a press on a stage unfolds its tasks under it */
212
+ await sheetPick(p, 'zoom', 'all');
213
+ await until(() => p.evaluate(() => !!document.querySelector('#czViewer .iva')));
214
+ await sleep(150);
215
+ const A12 = await p.evaluate(() => { const T = document.querySelector('#czViewer .iva'), rows = [...T.querySelectorAll('.iva-r.g')];
216
+ return { rows: rows.length, fits: T.scrollWidth <= T.clientWidth + 1, open: rows.filter((r) => r.getAttribute('aria-expanded') === 'true').map((r) => r.getAttribute('aria-label').split(',')[0]),
217
+ tasks: [...T.querySelectorAll('.iva-r.k .iv-tt')].map((e) => e.textContent), today: !!T.querySelector('.iva-tc'), plan: (rows.find((r) => /^Plan,/.test(r.getAttribute('aria-label'))) || {}).getAttribute('aria-label') }; });
218
+ ok('V12 All draws one row per stage and fits the panel: no sideways scroll, Today across it', A12.rows === 8 && A12.fits && A12.today, JSON.stringify(A12));
219
+ ok('V12 the current stage is unfolded: its tasks and milestones under it with their dates', A12.open.join() === 'Discover' && A12.tasks.includes('Map SDK public methods to v6') && !A12.tasks.includes('Plan the rollout'), JSON.stringify(A12));
220
+ await p.click('#czViewer .iva-r.g[aria-label^="Plan,"]');
221
+ const A13 = await until(() => p.evaluate(() => { const t = [...document.querySelectorAll('#czViewer .iva-r.k .iv-tt')].map((e) => e.textContent); return t.includes('Plan the rollout') ? document.querySelector('#czViewer .iva-r.k [data-ivt-bar="task-h"]') ? t : null : null; }));
222
+ ok('V12 a press on a stage unfolds its tasks, each with its bar', !!A13, JSON.stringify(A13));
223
+ await shot(p, 'timeline-all-1440');
224
+ await sheetPick(p, 'zoom', 'week');
225
+ await until(() => zoomNow(p).then((z) => z === 'week'));
162
226
 
163
227
  /* V5 drag a bar: it snaps to days, a tip says the new dates, the save follows with Undo; an end changes only its own day */
164
228
  const bb = await p.evaluate(() => { const r = document.querySelector('#czViewer [data-ivt-bar="task-a"]').getBoundingClientRect(); return { x: r.left + r.width / 2, y: r.top + r.height / 2, l: r.left, r: r.right }; });
@@ -187,21 +251,19 @@ const model = () => { const M = BP.build(F.facts()); const r = M.rows.find((x) =
187
251
  const fw = await until(() => p.evaluate(() => { const r = document.querySelector('#czViewer').getBoundingClientRect(); return r.width > innerWidth - 40 ? { w: Math.round(r.width), pressed: document.querySelector('#czViewer [data-iv-full]').getAttribute('aria-pressed') } : null; }));
188
252
  ok('V4 Full width spreads the Timeline over the window, the icon pressed', !!fw && fw.pressed === 'true' && pw < fw.w, JSON.stringify({ pw, fw }));
189
253
  await shot(p, 'timeline-full-1440');
190
- const zoomTo = async (l) => { await p.click('#czViewer [data-iv-zoom]'); await p.evaluate((l) => { const b = [...document.querySelectorAll('.tkc.ivq [data-ivq-i]')].find((x) => x.textContent.includes(l)); if (b) b.click(); }, l); await until(() => p.evaluate((l) => (document.querySelector('#czViewer [data-iv-zoom]') || {}).textContent === l, l)); };
191
- await zoomTo('5 years');
192
- const fit = await p.evaluate(() => { const T = document.querySelector('#czViewer .ivt'), I = T.querySelector('.ivt-in'), td = +T.dataset.today; return { px: +T.dataset.px, tw: Math.round(T.getBoundingClientRect().width), iw: Math.round(I.getBoundingClientRect().width), under: [...T.querySelectorAll('.ivt-r.ax .ivt-c span')].filter((e) => e.textContent.trim() && Math.abs(+e.dataset.tlx - td) < 44).map((e) => e.textContent) }; });
193
- ok('V4 in full width 5 years stretches to the window, past its own scale', fit.px > 0.16 && fit.iw >= fit.tw - 40, JSON.stringify(fit));
194
- ok('V4 no axis label sits under the Today pill', fit.under.length === 0, JSON.stringify(fit));
195
- await shot(p, 'timeline-full-5y-1440');
254
+ await sheetPick(p, 'zoom', 'all');
255
+ const fit = await until(() => p.evaluate(() => { const T = document.querySelector('#czViewer .iva'); return T ? { tw: Math.round(T.getBoundingClientRect().width), vw: Math.round(document.querySelector('#czViewer').getBoundingClientRect().width), fits: T.scrollWidth <= T.clientWidth + 1 } : null; }));
256
+ ok('V4 in full width All stretches to the window and still fits', fit && fit.fits && fit.tw > fit.vw - 120, JSON.stringify(fit));
257
+ await shot(p, 'timeline-full-all-1440');
196
258
  await p.keyboard.press('Escape');
197
259
  const back = await until(() => p.evaluate(() => (!document.body.classList.contains('ivt-full') && !!document.querySelector('#czViewer .ivt') ? Math.round(document.querySelector('#czViewer').getBoundingClientRect().width) : null)));
198
260
  ok('V4 Escape takes the Timeline back to the panel, the Viewer stays open', back != null && back < fw.w, String(back));
199
- const pfit = await p.evaluate(() => { const T = document.querySelector('#czViewer .ivt'), I = T.querySelector('.ivt-in'); return { tw: Math.round(T.getBoundingClientRect().width), iw: Math.round(I.getBoundingClientRect().width) }; });
200
- ok('V4 back in the panel 5 years fits the panel again', pfit.iw >= pfit.tw - 40 && pfit.iw <= pfit.tw + 4, JSON.stringify(pfit));
201
- await zoomTo('Weeks');
261
+ const pfit = await p.evaluate(() => { const T = document.querySelector('#czViewer .iva'); return { tw: Math.round(T.getBoundingClientRect().width), fits: T.scrollWidth <= T.clientWidth + 1 }; });
262
+ ok('V4 back in the panel All fits the panel again', pfit.fits, JSON.stringify(pfit));
263
+ await sheetPick(p, 'zoom', 'week');
202
264
 
203
265
  /* V6 Kanban: one stage at a time (the current first), columns by status, Won't do a folded strip */
204
- await p.click('#czViewer [data-iv-view="kanban"]');
266
+ await sheetPick(p, 'view', 'kanban');
205
267
  await until(() => p.evaluate(() => !!document.querySelector('#czViewer .ivk')));
206
268
  const kb = await p.evaluate(() => { const K = document.querySelector('#czViewer .ivk'); return { stage: document.querySelector('#czViewer [data-iv-kstage]').textContent, cols: [...K.querySelectorAll('.ivk-c h4')].map((h) => h.textContent).join('|'), wont: K.querySelector('.ivk-w').textContent, cards: [...K.querySelectorAll('.ivk-d .iv-tt')].map((e) => e.textContent), arch: /Old spike notes/.test(K.textContent) }; });
207
269
  ok('V6 Kanban opens on the current stage, with columns To do, In progress, Done', kb.stage === 'Discover' && kb.cols === 'To do2|In progress2|Done1', JSON.stringify(kb));
@@ -221,8 +283,8 @@ const model = () => { const M = BP.build(F.facts()); const r = M.rows.find((x) =
221
283
 
222
284
  /* V1 the view is remembered across initiatives and visits */
223
285
  const R = await open({ store: await p.evaluate(() => ({ 'pmos.tasks.view': localStorage.getItem('pmos.tasks.view') })) });
224
- const rem = await R.page.evaluate(() => (document.querySelector('#czViewer .ivx-sb[aria-pressed="true"]') || {}).dataset.ivView);
225
- ok('V1 the last view is remembered for the PM: the next panel opens on Kanban', rem === 'kanban', rem);
286
+ const rem = await R.page.evaluate(() => (document.querySelector('#czViewer [data-iv-vbtn]') || { getAttribute: () => '' }).getAttribute('aria-label'));
287
+ ok('V1 the last view is remembered for the PM: the next panel opens on Kanban', /^Tasks view: Kanban\./.test(rem), rem);
226
288
  await R.ctx.close();
227
289
  ok('V0 no page error', A.errors.length === 0, A.errors.join(' | '));
228
290
  if (process.env.SHOTS_5B) {
@@ -239,7 +301,15 @@ const model = () => { const M = BP.build(F.facts()); const r = M.rows.find((x) =
239
301
  ok('V9 phone: no caret (a long press on the box opens the status picker)', pk && pk.car === 'none', JSON.stringify(pk));
240
302
  }
241
303
  await shot(q, 'kanban-390-' + theme);
242
- await q.evaluate(() => document.querySelector('#czViewer [data-iv-view="timeline"]').click());
304
+ if (theme === 'light') {
305
+ await q.evaluate(() => document.querySelector('#czViewer [data-iv-vbtn]').click());
306
+ const ps = await until(() => q.evaluate(() => { const s = document.querySelector('.tkc.ivq.sheet .ivs'); if (!s) return null; const r = s.getBoundingClientRect(); return { bottom: Math.round(innerHeight - r.bottom), w: Math.round(r.width), scrim: !!document.querySelector('.vs-scrim'), grab: getComputedStyle(s.querySelector('.ivs-grab')).display }; }));
307
+ ok('V10 phone: the sheet is a bottom sheet over a scrim, full width, with its grab', ps && ps.bottom <= 1 && ps.w >= 388 && ps.scrim && ps.grab === 'block', JSON.stringify(ps));
308
+ await shot(q, 'sheet-390');
309
+ await q.evaluate(() => document.querySelector('.vs-scrim').dispatchEvent(new PointerEvent('pointerdown', { bubbles: true })));
310
+ ok('V10 phone: a tap on the scrim closes the sheet', await until(() => q.evaluate(() => !document.querySelector('.tkc.ivq') && !document.querySelector('.vs-scrim')), 2000));
311
+ }
312
+ await sheetPick(q, 'view', 'timeline');
243
313
  await until(() => q.evaluate(() => !!document.querySelector('#czViewer .ivt')));
244
314
  await sleep(200);
245
315
  const pt = await q.evaluate(() => { const r = document.querySelector('#czViewer .ivt-r.k'), n = r.querySelector('.ivt-n').getBoundingClientRect(), c = r.querySelector('.ivt-c').getBoundingClientRect(); return { above: c.top >= n.bottom - 1, grips: getComputedStyle(document.querySelector('#czViewer .ivt-gp') || document.body).display }; });
@@ -247,7 +317,7 @@ const model = () => { const M = BP.build(F.facts()); const r = M.rows.find((x) =
247
317
  await shot(q, 'timeline-390-' + theme);
248
318
  if (theme === 'light') {
249
319
  // a long press on the box opens the status picker; the click that follows does not mark it done
250
- await q.evaluate(() => document.querySelector('#czViewer [data-iv-view="list"]').click());
320
+ await sheetPick(q, 'view', 'list');
251
321
  await until(() => q.evaluate(() => !!document.querySelector('#czViewer [data-iv-check="task-b"]')));
252
322
  const n0 = Ph.posts.length;
253
323
  const bx = await q.evaluate(() => { const r = document.querySelector('#czViewer [data-iv-check="task-b"]').getBoundingClientRect(); return { x: r.left + r.width / 2, y: r.top + r.height / 2 }; });
@@ -264,7 +334,179 @@ const model = () => { const M = BP.build(F.facts()); const r = M.rows.find((x) =
264
334
  }
265
335
  if (process.env.SHOTS_5B) {
266
336
  const D = await open({ theme: 'dark', store: { 'pmos.tasks.view': 'timeline' } }); await sleep(200); await shot(D.page, 'timeline-1440-dark');
267
- await D.page.evaluate(() => document.querySelector('#czViewer [data-iv-view="kanban"]').click()); await sleep(200); await shot(D.page, 'kanban-1440-dark'); await D.ctx.close();
337
+ await sheetPick(D.page, 'view', 'kanban'); await sleep(200); await shot(D.page, 'kanban-1440-dark'); await D.ctx.close();
338
+ }
339
+
340
+ /* ── 0.442.0 hotfix: H1–H6 ── */
341
+ // where: 'home' (premium.html's Viewer; self-serve-v2 is in Build) or 'board' (usage-billing's panel; in Discover)
342
+ const openH = async ({ where = 'home', w = 390, h = 844, theme = 'light', view = 'timeline', zoom = 'week', tasks = HTASKS, tickets = null, drafts = null } = {}) => {
343
+ const touch = w < 700, id = where === 'home' ? 'self-serve-v2' : 'usage-billing', sec = where === 'home' ? 'build' : 'discover';
344
+ const ctx = await browser.newContext({ viewport: { width: w, height: h }, hasTouch: touch, isMobile: touch, colorScheme: theme });
345
+ await ctx.addInitScript(([v, z]) => { localStorage.setItem('pmos.tasks.view', v); localStorage.setItem('pmos.tasks.zoom', z); }, [view, zoom]);
346
+ const page = await ctx.newPage(), errors = [], posts = [];
347
+ let layout = { ok: true, by: 'stage', picked: false, names: [], of: {}, sets: [] };
348
+ const M = () => { const m = BP.build(F.facts()); const r = m.rows.find((x) => x.id === id); r.tasks = tasks.map((t) => ({ ...t, section: sec })); if (tickets) r.track = { ...(r.track || {}), tickets }; return m; };
349
+ const json = (r, b, status = 200) => r.fulfill({ status, contentType: 'application/json', body: JSON.stringify(b) });
350
+ page.on('pageerror', (e) => errors.push(String((e && e.stack) || e)));
351
+ await page.route('**/api/board-premium*', (r) => json(r, { ok: true, state: 'ready', model: M(), as_of: Date.now() }));
352
+ await page.route('**/api/board-trail*', (r) => json(r, { ok: false }, 500));
353
+ await page.route('**/api/initiative-premium*', (r) => json(r, { ok: true, state: 'ready', model: IP.build(IF.facts()), as_of: Date.now() }));
354
+ await page.route(/\/api\/briefing-premium(\?.*)?$/, (r) => json(r, { ok: true, state: 'ready', model: BRP.build(BRF.facts()), as_of: Date.now() }));
355
+ await page.route('**/api/briefing-premium/**', (r) => json(r, { ok: true, turns: [], working: false }));
356
+ await page.route('**/api/jira/tickets*', (r) => json(r, drafts || { ok: false, error: 'not in this check' }));
357
+ // the layout answers as the server does once a pick saves (the write's own wording is initiative-layout.test.js's)
358
+ await page.route('**/api/initiative-layout*', (r) => { const rq = r.request(); if (rq.method() === 'POST') { const b = JSON.parse(rq.postData() || '{}'); posts.push({ path: '/api/initiative-layout', body: b }); layout = { ...layout, by: b.grouping || b.by, picked: true }; } json(r, layout); });
359
+ await page.route(/\/api\/(boards\/|lifecycle)/, (r) => { const rq = r.request(); if (rq.method() !== 'GET') posts.push({ path: new URL(rq.url()).pathname, body: JSON.parse(rq.postData() || '{}') }); json(r, { ok: true }); });
360
+ if (where === 'home') await page.goto(BASE + '/premium.html?ini=self-serve-v2&ws=w1&board=w1&theme=' + theme);
361
+ else {
362
+ await page.goto(BASE + '/premium-board.html?theme=' + theme);
363
+ await until(() => page.evaluate(() => document.querySelectorAll('#ibBody .ini2, #ibBody .bt-l').length > 0), 20000);
364
+ await page.evaluate(() => { const b = [...document.querySelectorAll('[data-row="board:usage-billing"] .bt-nm, [data-key="board:usage-billing"]')].find((x) => x.offsetParent); if (b) b.click(); });
365
+ }
366
+ await until(() => page.evaluate((v) => !!document.querySelector(v === 'timeline' ? '#czViewer :is(.ivt, .iva)' : '#czViewer .iv-th'), view), 20000);
367
+ await sleep(300);
368
+ return { ctx, page, errors, posts };
369
+ };
370
+ const shotH = async (pg, name) => { if (!process.env.SHOTS_5B) return; await pg.evaluate(() => { const t = document.querySelector('#czViewer :is(.ivt, .iva)'); if (t) t.scrollIntoView({ block: 'start' }); }); await sleep(150); await pg.screenshot({ path: path.join(process.env.SHOTS_5B, name + '.png') }); };
371
+ // the geometry of a phone's rows: each title's width, its label inside the screen, its bar's height and place inside its row
372
+ const rowsGeo = (pg) => pg.evaluate(() => { const sc = document.querySelector('#czViewer .ivt-sc').getBoundingClientRect();
373
+ return [...document.querySelectorAll('#czViewer .ivt-r.k')].filter((r) => r.querySelector('.ivt-n[data-tln]')).map((r) => { const n = r.querySelector('.ivt-n').getBoundingClientRect(), t = r.querySelector('.iv-tt').getBoundingClientRect(), b = r.querySelector('.ivt-b, .ivt-d'), q = b && b.getBoundingClientRect(), R = r.getBoundingClientRect();
374
+ return { t: r.querySelector('.iv-tt').textContent.slice(0, 12), tw: Math.round(t.width), inside: n.left >= sc.left - 1 && n.right <= sc.right + 1, bh: q ? Math.round(q.height) : null, bin: q ? q.top >= R.top - 1 && q.bottom <= R.bottom + 1 : true, rh: Math.round(R.height) }; }); });
375
+ const axisGeo = (pg) => pg.evaluate(() => { const T = document.querySelector('#czViewer .ivt'), sc = T.querySelector('.ivt-sc').getBoundingClientRect(), nw = T.querySelector('.ivt-n').offsetWidth, ch = T.querySelector('.ivt-today i').getBoundingClientRect();
376
+ return [...T.querySelectorAll('.ivt-r.ax .ivt-c span')].filter((e) => getComputedStyle(e).visibility !== 'hidden').map((e) => { const r = e.getBoundingClientRect(); return { t: e.textContent, cut: r.left + 4 < sc.left + nw - 1 && r.right > sc.left + nw, chip: r.right > ch.left - 4 && r.left + 4 < ch.right + 4 && r.left < sc.right }; }).filter((x) => x.cut || x.chip); });
377
+
378
+ for (const theme of ['light', 'dark']) {
379
+ for (const zoom of ['week', 'month']) {
380
+ const P = await openH({ theme, zoom }), q = P.page;
381
+ const g = await rowsGeo(q);
382
+ ok(`H1 Home phone ${zoom} ${theme}: every task names itself (at least 60 px of title) and its label is whole on the screen`, g.length === 4 && g.every((x) => x.tw >= 60 && x.inside), JSON.stringify(g));
383
+ ok(`H1 Home phone ${zoom} ${theme}: a bar keeps its own size inside its row (Home's 44 px button rule does not reach it); rows stay under 66 px`, g.every((x) => (x.bh == null || x.bh <= 20) && x.bin && x.rh <= 66), JSON.stringify(g));
384
+ // H2: where a group's name crosses the Today line, the name does not hide it
385
+ const tl = await q.evaluate(() => { const x = document.querySelector('#czViewer .ivt-today').getBoundingClientRect().left;
386
+ return [...document.querySelectorAll('#czViewer .ivt-r.g .ivt-n')].filter((n) => { const r = n.getBoundingClientRect(); return r.left < x && r.right > x; }).map((n) => getComputedStyle(n).backgroundColor); });
387
+ ok(`H2 Home phone ${zoom} ${theme}: the Today line runs unbroken through the group names`, tl.every((c) => c === 'rgba(0, 0, 0, 0)'), JSON.stringify(tl));
388
+ const ax = await axisGeo(q);
389
+ ok(`H3 Home phone ${zoom} ${theme}: no axis label is half cut at the left or drawn under the Today chip`, ax.length === 0, JSON.stringify(ax));
390
+ if (zoom === 'week') {
391
+ await q.evaluate(() => { const s = document.querySelector('#czViewer .ivt-sc'); s.scrollLeft += 160; });
392
+ await sleep(200);
393
+ const g2 = await rowsGeo(q), ax2 = await axisGeo(q);
394
+ ok(`H1 Home phone ${theme}: scrolled sideways, the titles stay whole on the screen and no axis label is cut`, g2.every((x) => x.tw >= 60 && x.inside) && ax2.length === 0, JSON.stringify({ g2, ax2 }));
395
+ await q.evaluate(() => { const s = document.querySelector('#czViewer .ivt-sc'); s.scrollLeft -= 160; });
396
+ await sleep(150);
397
+ ok(`H5 Home phone ${theme}: no Full width on a phone`, !(await q.$('#czViewer [data-iv-full]')));
398
+ }
399
+ await shotH(q, `hotfix-home-390-${zoom}-${theme}`);
400
+ ok(`H0 Home phone ${zoom} ${theme}: no page error`, P.errors.length === 0, P.errors.join(' | '));
401
+ await P.ctx.close();
402
+ }
403
+ const Pa = await openH({ theme, zoom: 'all' }), qa = Pa.page;
404
+ const ga = await qa.evaluate(() => [...document.querySelectorAll('#czViewer .iva-r.k')].map((r) => { const b = r.querySelector('.iva-tb, .iva-md'); return { t: r.querySelector('.iv-tt').textContent.slice(0, 12), bh: b ? Math.round(b.getBoundingClientRect().height) : null, tw: Math.round(r.querySelector('.iv-tt').getBoundingClientRect().width) }; }));
405
+ ok(`H1 Home phone All ${theme}: bars and ◇ keep their own size; every task names itself`, ga.length >= 4 && ga.every((x) => (x.bh == null || x.bh <= 17) && x.tw >= 60), JSON.stringify(ga));
406
+ await shotH(qa, `hotfix-home-390-all-${theme}`);
407
+ await Pa.ctx.close();
408
+
409
+ /* desktop: the Board's panel */
410
+ const D = await openH({ where: 'board', w: 1440, h: 900, theme }), d = D.page;
411
+ const fl = await d.evaluate(() => { const b = document.querySelector('#czViewer .iv-th [data-iv-full]'), vb = document.querySelector('#czViewer .iv-th [data-iv-vbtn]'); return { head: !!b, after: !!b && vb.nextElementSibling === b, legend: !!document.querySelector('#czViewer .ivt-lg [data-iv-full]') }; });
412
+ ok(`H5 Board 1440 ${theme}: Full width sits in the Tasks header beside the view button, not at the Timeline's foot`, fl.head && fl.after && !fl.legend, JSON.stringify(fl));
413
+ const ax = await axisGeo(d);
414
+ ok(`H3 Board 1440 ${theme}: no axis label half cut at the name column or under the Today chip`, ax.length === 0, JSON.stringify(ax));
415
+ const ms = await d.evaluate(() => { const b = document.querySelector('#czViewer [data-ivt-bar="h4"]'); return b ? { cls: b.className, tf: getComputedStyle(b).transform } : null; });
416
+ ok(`H4 Board 1440 ${theme}: a milestone with a due day only is its ◇ on the Timeline, not the due-only circle`, !!ms && /\bms\b/.test(ms.cls) && ms.tf !== 'none', JSON.stringify(ms));
417
+ await shotH(d, `hotfix-board-1440-week-${theme}`);
418
+ await sheetPick(d, 'zoom', 'all');
419
+ await until(() => d.evaluate(() => !!document.querySelector('#czViewer .iva')));
420
+ const one = await d.evaluate(() => { const r = [...document.querySelectorAll('#czViewer .iva-r.k')].find((x) => /Award contract/.test(x.textContent)); return r ? r.querySelectorAll('.iva-mg, .iva-l .iv-ms').length : -1; });
421
+ ok(`H4 Board 1440 All ${theme}: a milestone row shows its ◇ once (it led and trailed the title)`, one === 1, String(one));
422
+ const fa = await d.evaluate(() => !document.querySelector('#czViewer .iv-th [data-iv-full]'));
423
+ ok(`H5 Board 1440 ${theme}: at All (it fits the panel) there is no Full width`, fa);
424
+ await shotH(d, `hotfix-board-1440-all-${theme}`);
425
+ await sheetPick(d, 'view', 'list');
426
+ ok(`H5 Board 1440 ${theme}: the List has no Full width`, await d.evaluate(() => !document.querySelector('#czViewer .iv-th [data-iv-full]')));
427
+ ok(`H0 Board 1440 ${theme}: no page error`, D.errors.length === 0, D.errors.join(' | '));
428
+ await D.ctx.close();
429
+ }
430
+
431
+ /* H6 the grouping survives a task edit: pick Owner in the sheet, mark a task done, the redraw keeps Owner */
432
+ {
433
+ const G = await openH({ where: 'home', w: 1440, h: 900, view: 'list' }), g = G.page;
434
+ await g.click('#czViewer [data-iv-vbtn]');
435
+ await until(() => g.evaluate(() => !!document.querySelector('.tkc.ivq .ivs [data-ivs-by="owner"]')));
436
+ await g.click('.tkc.ivq .ivs [data-ivs-by="owner"]');
437
+ const saved = await until(() => G.posts.find((x) => x.path === '/api/initiative-layout'));
438
+ await g.keyboard.press('Escape');
439
+ const heads0 = await until(() => g.evaluate(() => { const h = [...document.querySelectorAll('#czViewer .iv-wbs .iv-ws b')].map((b) => b.textContent); return h.some((x) => /Wawan|Claude|Rina/.test(x)) ? h : null; }));
440
+ ok('H6 Owner is picked and saved', !!saved && !!heads0, JSON.stringify({ saved: saved && saved.body, heads0 }));
441
+ await g.click('#czViewer [data-iv-check="h2"]');
442
+ await until(() => G.posts.find((x) => x.path === '/api/boards/tasks/state'));
443
+ await sleep(1500);
444
+ const st = await g.evaluate(() => { const vb = document.querySelector('#czViewer [data-iv-vbtn]'); vb.click(); return null; });
445
+ const by = await until(() => g.evaluate(() => { const b = document.querySelector('.tkc.ivq .ivs [data-ivs-by][aria-pressed="true"], .tkc.ivq .ivs [data-ivs-more][aria-pressed="true"]'); return b ? (b.dataset.ivsBy || b.textContent.trim()) : null; }));
446
+ const heads1 = await g.evaluate(() => [...document.querySelectorAll('#czViewer .iv-wbs .iv-ws b')].map((b) => b.textContent));
447
+ ok('H6 after a task edit the redraw keeps Owner: no fall back to Epic or Stage', by === 'owner' && heads1.some((x) => /Wawan|Claude|Rina/.test(x)), JSON.stringify({ st, by, heads1 }));
448
+ await G.ctx.close();
449
+ }
450
+
451
+ /* H7 a task named for a Jira ticket */
452
+ {
453
+ const JT = [
454
+ { uid: 'j1', title: 'MSD-4376 Microsite page in the single layout', status: 'To do', owner: 'Wawan', start: '2026-10-10', end: '2026-10-16' },
455
+ { uid: 'j2', title: 'Plan block at the top [MSD-4377]', status: 'To do', owner: 'Wawan', start: '2026-10-14', end: '2026-10-22' },
456
+ { uid: 'j3', title: 'MSD-9999 Navigation tabs', status: 'In progress', owner: 'Wawan', start: '2026-10-15', end: '2026-10-24' },
457
+ ];
458
+ const JK = [{ key: 'MSD-4376', title: 'Microsite page', status: 'Done', raw: 'Closed' }, { key: 'MSD-4377', title: 'Plan block', status: 'In progress', raw: 'In Review', due: '2026-11-30' }];
459
+ const J = await openH({ where: 'board', w: 1440, h: 900, view: 'list', tasks: JT, tickets: JK }), j = J.page;
460
+ await j.evaluate(() => { const b = [...document.querySelectorAll('#czViewer .iv-grp')].find((x) => /^Done/.test(x.textContent)); if (b) b.click(); });
461
+ await sleep(200);
462
+ const L = await j.evaluate(() => { const row = (re) => [...document.querySelectorAll('#czViewer .iv-tr')].find((r) => re.test(r.textContent));
463
+ const one = (r) => r ? { sq: (r.querySelector('.iv-jq') || { className: '' }).className, box: !!r.querySelector('[data-iv-check]'), em: [...r.querySelectorAll('.iv-tt em')].map((e) => e.textContent).join(), tt: r.querySelector('.iv-tt').textContent, label: (r.querySelector('.iv-jq') || { getAttribute: () => '' }).getAttribute('aria-label') } : null;
464
+ return { j1: one(row(/Microsite page/)), j2: one(row(/Plan block/)), j3: one(row(/Navigation tabs/)) }; });
465
+ ok('H7 List: a task named for a ticket PMOS read shows the Jira status square for Jira\'s status, no box, the key once', L.j1 && /ig-sq done/.test(L.j1.sq) && !L.j1.box && L.j1.em === 'MSD-4376' && L.j1.tt === 'MSD-4376 Microsite page in the single layout' && /Closed/.test(L.j1.label), JSON.stringify(L.j1));
466
+ ok('H7 List: a key anywhere in the title links too, In progress from Jira\'s "In Review"', L.j2 && /ig-sq doing/.test(L.j2.sq) && L.j2.em === 'MSD-4377' && L.j2.tt === 'MSD-4377 Plan block at the top', JSON.stringify(L.j2));
467
+ ok('H7 List: a key PMOS has not read is plain text in a plain task, with its box', L.j3 && L.j3.box && !L.j3.sq && L.j3.em === '' && L.j3.tt === 'MSD-9999 Navigation tabs', JSON.stringify(L.j3));
468
+ // the dates stay the PM's: the date press opens the picker, a day picked saves on the task
469
+ await j.click('#czViewer .iv-tr [data-iv-date="j2"]');
470
+ await until(() => j.evaluate(() => !!document.querySelector('.tkc.ivq .tkc-dp')));
471
+ const tip = await j.evaluate(() => document.querySelector('#czViewer .iv-tr [data-iv-date="j2"]').getAttribute('title'));
472
+ await j.click('.tkc.ivq .tkc-dp [data-tkc-day="2026-10-24"]');
473
+ const dd = await until(() => J.posts.find((x) => x.path === '/api/boards/tasks/edit' && x.body.task === 'j2'));
474
+ ok('H7 a linked task\'s dates are the PM\'s: the date press saves the day on the task, kept in PMOS', !!dd && dd.body.due === '2026-10-24' && /kept in PMOS/.test(tip || ''), JSON.stringify({ dd: dd && dd.body, tip }));
475
+ await sleep(600);
476
+ await sheetPick(j, 'view', 'timeline');
477
+ await until(() => j.evaluate(() => !!document.querySelector('#czViewer .ivt')));
478
+ await sleep(300);
479
+ const T7 = await j.evaluate(() => { const r = document.querySelector('#czViewer [data-ivt-bar="j2"]').closest('.ivt-r'); return { sq: !!r.querySelector('.iv-jq.ig-sq'), box: !!r.querySelector('[data-iv-check]'), drag: document.querySelector('#czViewer [data-ivt-bar="j2"]').hasAttribute('data-ivt-drag'), plain: !!document.querySelector('#czViewer [data-iv-check="j3"]') }; });
480
+ ok('H7 Timeline: the linked task shows the Jira square, no box, and its bar drags; the plain one keeps its box', T7.sq && !T7.box && T7.drag && T7.plain, JSON.stringify(T7));
481
+ const bb = await j.evaluate(() => { const r = document.querySelector('#czViewer [data-ivt-bar="j2"]').getBoundingClientRect(); return { x: r.left + r.width / 2, y: r.top + r.height / 2 }; });
482
+ const n0 = J.posts.length;
483
+ await j.mouse.move(bb.x, bb.y); await j.mouse.down(); await j.mouse.move(bb.x + 20, bb.y, { steps: 3 }); await j.mouse.move(bb.x + 42, bb.y, { steps: 3 }); await j.mouse.up();
484
+ const mv = await until(() => J.posts.slice(n0).find((x) => x.path === '/api/boards/tasks/edit' && x.body.task === 'j2'));
485
+ ok('H7 Timeline: dragging the linked task\'s bar moves its dates, saved on the task', !!mv && !!mv.body.start && !!mv.body.due, JSON.stringify(mv && mv.body));
486
+ await sleep(500);
487
+ await sheetPick(j, 'view', 'kanban');
488
+ await until(() => j.evaluate(() => !!document.querySelector('#czViewer .ivk')));
489
+ await j.evaluate(() => { const b = document.querySelector('#czViewer [data-iv-kstage]'); if (b) b.click(); });
490
+ await until(() => j.evaluate(() => !!document.querySelector('.tkc.ivq [data-ivq-i]')));
491
+ await j.evaluate(() => { const b = [...document.querySelectorAll('.tkc.ivq [data-ivq-i]')].find((x) => /All stages/.test(x.textContent)); if (b) b.click(); });
492
+ await sleep(300);
493
+ const K = await j.evaluate(() => { const card = (re) => [...document.querySelectorAll('#czViewer .ivk-d')].find((c) => re.test(c.textContent)); const col = (c) => c && c.closest('[data-ivk-col]') && c.closest('[data-ivk-col]').dataset.ivkCol;
494
+ const a = card(/Microsite/), b = card(/Plan block/), c = card(/Navigation tabs/); return { a: col(a), b: col(b), bDrag: b && b.getAttribute('draggable'), cDrag: c && c.getAttribute('draggable') }; });
495
+ ok('H7 Kanban: linked tasks sit in Jira\'s column and do not drag (Jira owns the status); the plain task drags', K.a === 'Done' && K.b === 'In progress' && K.bDrag == null && K.cDrag === 'true', JSON.stringify(K));
496
+ ok('H7 no page error', J.errors.length === 0, J.errors.join(' | '));
497
+ await J.ctx.close();
498
+ // By epic: a task linked to a ticket its draft put in Jira shows once, as the ticket, with the task's bar on the Timeline
499
+ const DR = { ok: true, drafted: 2, groups: [], epic: {}, tickets: [{ id: 'S1', summary: 'Plan block at the top', inJira: true, key: 'MSD-4377', jira: { status: 'In Review', category: 'doing' } }, { id: 'S2', summary: 'FAQ section', inJira: false, selectable: true }] };
500
+ const E = await openH({ where: 'board', w: 1440, h: 900, view: 'timeline', tasks: JT, tickets: JK.slice(0, 1), drafts: DR }), e = E.page;
501
+ await e.click('#czViewer [data-iv-vbtn]'); await until(() => e.evaluate(() => !!document.querySelector('.tkc.ivq .ivs [data-ivs-more]')));
502
+ await e.click('.tkc.ivq .ivs [data-ivs-more]');
503
+ await until(() => e.evaluate(() => !!document.querySelector('.ig-pop [role="menuitemradio"]')));
504
+ await e.click('.ig-pop [role="menuitemradio"]:has-text("Epic")');
505
+ const EP = await until(() => e.evaluate(() => { const r = document.querySelector('#czViewer .ivt-r.k [data-ig-tk="S1"]'); if (!r) return null; const row = r.closest('.ivt-r');
506
+ return { bar: !!row.querySelector('[data-ivt-bar="j2"]'), twice: [...document.querySelectorAll('#czViewer .ivt-r.k')].filter((x) => /Plan block/.test(x.textContent)).length, j1: (document.querySelector('#czViewer [data-ivt-bar="j1"]') || { closest: () => null }).closest('.ivt-r') ? 1 : 0 }; }), 15000);
507
+ ok('H7 By epic: the linked task shows once, as its ticket in Jira, carrying the task\'s bar', !!EP && EP.bar && EP.twice === 1, JSON.stringify(EP));
508
+ ok('H7 By epic: no page error', E.errors.length === 0, E.errors.join(' | '));
509
+ await E.ctx.close();
268
510
  }
269
511
  return finish();
270
512
  })();
@@ -0,0 +1,13 @@
1
+ {
2
+ "_comment": "Batch 18 item 8-B, Adler dressed for the season: the charms, their scenes and where they show (pm/cozy-adler.js charms and charmScene, the tap popover, Your day's scene and greeting, the chat face, first run, the Board's win). adler-seasons-art.test.js is pure; adler-seasons-art-test.js drives the real Home at 390 px and 1280 px on Deepavali, with 8-A's calendar module stubbed.",
3
+ "modules": [
4
+ "adler-seasons-art.test.js"
5
+ ],
6
+ "panels": [
7
+ "adler-seasons-art-test.js"
8
+ ],
9
+ "seconds": {
10
+ "adler-seasons-art.test.js": 1,
11
+ "adler-seasons-art-test.js": 30
12
+ }
13
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "_comment": "batch 18 item 8-A: the calendar that dresses Adler (pm/cozy-seasons.js: the 44 days, the windows, nearer day wins, solemn days, the place) and Settings › Adler › Dress for the day (adler.dress.* in lib/settings-store.js). adler-seasons.test.js is pure; adler-seasons-test.js drives the real Settings at 390 px and 1280 px with the clock in Deepavali week.",
3
+ "modules": [
4
+ "adler-seasons.test.js"
5
+ ],
6
+ "panels": [
7
+ "adler-seasons-test.js"
8
+ ],
9
+ "seconds": {
10
+ "adler-seasons.test.js": 1,
11
+ "adler-seasons-test.js": 30
12
+ }
13
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "_comment": "Feedback batch 18 item 11, goals made clear. Backend 11-A: how a goal is counted (num and den beside each reading), the hourly rhythm and a time of day, Read now that never moves the next read, Claude's checks that hold a strange reading, file it, compare with your number and the pick, a guardrail without a date, and the fields the UI reads (lib/metric-reads.js, lib/metric-drafts.js recipeOf, lib/metrics-cli.js reading, lib/routes-goal-status.js, lib/insights-premium.js readFields, lib/routes-metric-drafts.js liveRows, scripts/records); pure folds, fake run parts and the routes in process on a scratch workspace. UI 11-B (frames Gc*): the drafts table, the check panel, the first readings, a key result's counts said once, a failed read and a held reading; goals-clear.test.mjs is pure (pm/goals-clear.js), goals-clear-ui-test.js drives the real page at 1440 px and 390 px with the 11-A routes stubbed.",
3
+ "modules": [
4
+ "goals-clear.test.js",
5
+ "goals-clear.test.mjs"
6
+ ],
7
+ "panels": [
8
+ "goals-clear-ui-test.js"
9
+ ],
10
+ "seconds": {
11
+ "goals-clear.test.js": 3,
12
+ "goals-clear.test.mjs": 1,
13
+ "goals-clear-ui-test.js": 30
14
+ }
15
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "_comment": "Home's folded rail: a tile's press opens a card of that group's rows beside it (feedback batch 18 item 14; home-app.js drawRailCard, home-today.js railCardHtml, cozy-viewer.js railCard). A browser suite.",
3
+ "panels": [
4
+ "home-railcard-test.js"
5
+ ],
6
+ "seconds": {
7
+ "home-railcard-test.js": 30
8
+ }
9
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "_comment": "Batch 18 item 1-A: the rocket mission on the initiative card (pm/mission.js): stages lead, dates measure, milestone flags, crowded flags. Pure.",
3
+ "modules": ["mission.test.js"],
4
+ "seconds": { "mission.test.js": 1 }
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "_comment": "Batch 18 item 1, slice 1-B (Wawan 2026-10-28 \"promote to ready for development, then build\"; canvas XvpA4Sheet, XvpA3Timeline, XvpA3bMonths): the initiative Viewer's Tasks on phone and desktop. One view button opens the sheet (View, Group by, Zoom Weeks/Months/All); the List shows only stages with something open and folds a stage after 3 tasks; the Timeline at All fits the whole initiative. viewer-tasks.test.js is the pure half (pm/ini-tasks.js); the browser half is task-views-test.js.",
3
+ "modules": ["viewer-tasks.test.js"],
4
+ "seconds": { "viewer-tasks.test.js": 1 }
5
+ }