create-pmos 0.456.0 → 0.458.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 (48) hide show
  1. package/package.json +101 -80
  2. package/payload/KIT-VERSION +2 -2
  3. package/payload/planning/evals/eval-calibration.md +1 -1
  4. package/payload/planning/okrs/health-budgets.md +1 -1
  5. package/payload/state/discoveries.md +1 -1
  6. package/payload/state/log.md +1 -1
  7. package/workspace/briefing-premium-adddoc-test.js +1 -1
  8. package/workspace/briefing-premium-board-test.js +17 -17
  9. package/workspace/briefing-premium-initiative-test.js +8 -10
  10. package/workspace/changelog.json +270 -1845
  11. package/workspace/ev-everywhere-test.js +24 -1
  12. package/workspace/guide/adler.md +1 -1
  13. package/workspace/guide/initiatives-screen.md +12 -2
  14. package/workspace/guide/settings.md +13 -3
  15. package/workspace/ini-workflow-test.js +5 -9
  16. package/workspace/lib/kit-update.js +1 -1
  17. package/workspace/lib/settings-store.js +1 -1
  18. package/workspace/metric-drafts-ui-test.js +11 -9
  19. package/workspace/package-lock.json +2 -2
  20. package/workspace/package.json +1 -1
  21. package/workspace/premium-board-actions-test.js +3 -3
  22. package/workspace/premium-vw-backlog-test.js +1 -1
  23. package/workspace/premium-vw-item-test.js +1 -1
  24. package/workspace/premium-vw-jira-test.js +1 -1
  25. package/workspace/program-panel-test.js +2 -2
  26. package/workspace/public/pm/cozy-ev.css +21 -4
  27. package/workspace/public/pm/cozy-settings.js +43 -19
  28. package/workspace/public/pm/ini-about.js +145 -0
  29. package/workspace/public/pm/ini-tasks.js +6 -34
  30. package/workspace/public/pm/ini-view-model.js +12 -2
  31. package/workspace/public/pm/ini-view.css +180 -143
  32. package/workspace/public/pm/ini-view.js +137 -145
  33. package/workspace/public/pm/metric-drafts.js +8 -2
  34. package/workspace/public/pm/mission.js +159 -135
  35. package/workspace/public/pm/premium-shell.js +24 -24
  36. package/workspace/public/pm/premium.css +11 -14
  37. package/workspace/public/pm/stage-line.js +4 -1
  38. package/workspace/public/pm/upd-weeks.js +56 -0
  39. package/workspace/split-merge-ui-test.js +1 -1
  40. package/workspace/stage-card-tasks-test.js +2 -2
  41. package/workspace/stage-card-test.js +48 -51
  42. package/workspace/task-links-test.js +8 -9
  43. package/workspace/task-press-test.js +2 -2
  44. package/workspace/task-views-test.js +15 -76
  45. package/workspace/test-lists/initiative-mission-control.json +5 -0
  46. package/workspace/test-lists/mission.json +7 -3
  47. package/workspace/test-lists/update-weeks.json +5 -0
  48. package/workspace/tk-tasks-test.js +3 -3
@@ -0,0 +1,56 @@
1
+ /* pm/upd-weeks.js — the published kits' change log, grouped by calendar week (Settings › Updates; initiative premium-updates, the weekly log).
2
+ * Pure: no DOM, no network. The two Settings screens (cozy-settings.js, premium-shell.js) draw what it returns.
3
+ * weeksOf(entries, now, mine) → [{ key, name, range, kits: [oldest, newest], newer, groups: { new, imp, fix }, count }] newest week first
4
+ * lineOf(item) → { b, s } a bold name and the sentence under it (the PR's title and its summary), or just the sentence
5
+ * An entry is { v, at, prs: [{ n, t, s, k }] } as scripts/kit-changelog.js writes it. A week runs Monday to Sunday in this computer's time zone.
6
+ * Each PR becomes one line in New, Improved or Fixed by its kind k; chore, docs, test and CI PRs (k = x) are left out, and a week with no line
7
+ * is not listed (zero is silence). A kit published before kinds were kept has no k, so its title decides: a fix word means Fixed, else Improved. */
8
+ export const KINDS = [['new', 'New'], ['imp', 'Improved'], ['fix', 'Fixed']];
9
+ const MON = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
10
+ const cmpVer = (a, b) => { const x = String(a || '0').split('-')[0].split('.').map(Number), y = String(b || '0').split('-')[0].split('.').map(Number); for (let i = 0; i < 3; i++) if ((x[i] || 0) !== (y[i] || 0)) return (x[i] || 0) < (y[i] || 0) ? -1 : 1; return 0; };
11
+ const FIX = /\b(fix|fixes|fixed|hotfix|bug|no longer|sticks|stops?)\b/i;
12
+
13
+ /** 'new' | 'imp' | 'fix' | 'x' (left out). */
14
+ export function kindOf(p) {
15
+ if (p && (p.k === 'new' || p.k === 'imp' || p.k === 'fix' || p.k === 'x')) return p.k;
16
+ return FIX.test((p && (p.t || p.s)) || '') ? 'fix' : 'imp';
17
+ }
18
+ export function lineOf(p) {
19
+ const s = String((p && p.s) || ''), t = String((p && p.t) || '');
20
+ return t && t !== s ? { b: t, s } : { b: '', s };
21
+ }
22
+ const mondayOf = (d) => new Date(d.getFullYear(), d.getMonth(), d.getDate() - ((d.getDay() + 6) % 7));
23
+ const keyOf = (d) => d.getFullYear() + '-' + String(d.getMonth() + 1).padStart(2, '0') + '-' + String(d.getDate()).padStart(2, '0');
24
+ const dm = (d) => d.getDate() + ' ' + MON[d.getMonth()];
25
+ function rangeOf(mon) {
26
+ const sun = new Date(mon.getFullYear(), mon.getMonth(), mon.getDate() + 6);
27
+ return mon.getMonth() === sun.getMonth() ? mon.getDate() + ' – ' + dm(sun) : dm(mon) + ' – ' + dm(sun);
28
+ }
29
+
30
+ export function weeksOf(entries, now = Date.now(), mine = null) {
31
+ const thisMon = mondayOf(new Date(now)), lastMon = new Date(thisMon.getFullYear(), thisMon.getMonth(), thisMon.getDate() - 7);
32
+ const by = new Map();
33
+ for (const e of Array.isArray(entries) ? entries : []) {
34
+ if (!e || !e.v) continue;
35
+ const d = e.at ? new Date(e.at) : null, dated = d && !isNaN(d), mon = dated ? mondayOf(d) : null, key = dated ? keyOf(mon) : 'undated';
36
+ if (!by.has(key)) by.set(key, { key, mon, kits: [], newer: false, groups: { new: [], imp: [], fix: [] }, seen: new Set() });
37
+ const w = by.get(key);
38
+ w.kits.push(e.v);
39
+ if (mine && cmpVer(e.v, mine) > 0) w.newer = true;
40
+ for (const p of e.prs || []) {
41
+ const k = kindOf(p); if (k === 'x') continue;
42
+ if (p.n && w.seen.has(p.n)) continue;
43
+ if (p.n) w.seen.add(p.n);
44
+ w.groups[k].push({ n: p.n || null, t: p.t || '', s: p.s || '', v: e.v });
45
+ }
46
+ }
47
+ const out = [];
48
+ for (const w of by.values()) {
49
+ const count = w.groups.new.length + w.groups.imp.length + w.groups.fix.length;
50
+ if (!count) continue;
51
+ const sorted = [...w.kits].sort(cmpVer);
52
+ const name = !w.mon ? 'Date not recorded' : keyOf(w.mon) === keyOf(thisMon) ? 'This week' : keyOf(w.mon) === keyOf(lastMon) ? 'Last week' : 'Week of ' + dm(w.mon);
53
+ out.push({ key: w.key, name, range: w.mon ? rangeOf(w.mon) : '', kits: [sorted[0], sorted[sorted.length - 1]], newer: w.newer, groups: w.groups, count, mon: w.mon });
54
+ }
55
+ return out.sort((a, b) => (a.mon && b.mon ? b.mon - a.mon : a.mon ? -1 : b.mon ? 1 : 0)).map(({ mon, ...w }) => w);
56
+ }
@@ -89,7 +89,7 @@ const shot = (p, name) => (SHOTS ? p.screenshot({ path: path.join(SHOTS, name) }
89
89
  if (!(await p.evaluate(() => !!document.querySelector('#ibBody .sm-dot')))) return finish(1);
90
90
  const key = await p.evaluate(() => { const d = document.querySelector('#ibBody .sm-dot'); const b = d && d.closest('[data-key]'); return b ? b.dataset.key : null; });
91
91
  await p.click(`#ibBody [data-key="${key}"]`);
92
- const card = await until(() => p.evaluate(() => { const c = document.querySelector('#czViewer .sm-card'); return c ? { title: c.querySelector('.sm-h b').textContent, btns: [...c.querySelectorAll('[data-sm]')].map((b) => b.getAttribute('aria-label')), after: !!c.closest('.iv-cl') && !!(c.previousElementSibling && c.previousElementSibling.classList.contains('iv-card')) } : null; }));
92
+ const card = await until(() => p.evaluate(() => { const c = document.querySelector('#czViewer .sm-card'); return c ? { title: c.querySelector('.sm-h b').textContent, btns: [...c.querySelectorAll('[data-sm]')].map((b) => b.getAttribute('aria-label')), after: !!c.closest('.iv-cl') && !!(c.previousElementSibling && c.previousElementSibling.classList.contains('iv-mc')) } : null; }));
93
93
  ok('B the card under the summary: the spark title and ✕ Not now, ✎ Change it first, ✓ Split as suggested', card && /^Split off .+\?$/.test(card.title) && card.btns.join('|') === 'Not now|Change it first|Split as suggested' && card.after, JSON.stringify(card));
94
94
  await shot(p, 'board-suggest.png');
95
95
  await p.click('#czViewer [data-sm="edit"]');
@@ -304,7 +304,7 @@ const TICKETS = [{ key: 'IDPF-3387', title: 'Refactor the AppAuthService', statu
304
304
  await A.ctx.close();
305
305
 
306
306
  /* ── the Board's panel, desktop ── */
307
- const B = await open({ where: 'board', w: 1440, h: 900 }), q = B.page;
307
+ const B = await open({ where: 'board', w: 1440, h: 1600 }), q = B.page;
308
308
  await q.hover('#czViewer .iv-tr[data-iv-r="task-b1"]');
309
309
  const R10 = await q.evaluate(() => { const r = document.querySelector('#czViewer .iv-tr[data-iv-r="task-b1"]'), g = r.querySelector('.iv-grip'); return { grip: !!g && getComputedStyle(g).opacity === '1', dates: r.querySelector('.iv-dc').textContent.replace(/\s+/g, ' ').trim(), av: !!r.querySelector('.iv-rav') }; });
310
310
  ok('S10 desktop: a row shows start – due at the right and the owner\'s face; on hover the grip shows', R10.grip && R10.dates === 'Oct 30 – Nov 6' && R10.av, JSON.stringify(R10));
@@ -354,7 +354,7 @@ const TICKETS = [{ key: 'IDPF-3387', title: 'Refactor the AppAuthService', statu
354
354
  await B.ctx.close();
355
355
 
356
356
  /* S12 the Timeline and Kanban */
357
- const C = await open({ where: 'board', w: 1440, h: 900, view: 'timeline' }), c = C.page;
357
+ const C = await open({ where: 'board', w: 1440, h: 1600, view: 'timeline' }), c = C.page;
358
358
  await c.evaluate(() => { const b = [...document.querySelectorAll('#czViewer .ivt-gh')].find((x) => /Deliver/.test(x.textContent) && x.getAttribute('aria-expanded') === 'false'); if (b) b.click(); });
359
359
  const T12 = await until(() => c.evaluate(() => { const d = document.querySelector('#czViewer .ivt [data-ivt-bar="task-d1"]'); return d ? { cls: d.className, one: d.dataset.one, label: (document.querySelector('#czViewer .ivt-ms.lb b') || {}).textContent } : null; }));
360
360
  ok('S12 Timeline: a milestone is its ◇ on its date with no bar, the date beside it', T12 && /\bivt-d\b/.test(T12.cls) && /\bms\b/.test(T12.cls) && !/ivt-b/.test(T12.cls) && T12.label === 'Nov 14', JSON.stringify(T12));
@@ -114,22 +114,18 @@ async function pure() {
114
114
  if (sessions) await page.route(/\/api\/sessions(\?.*)?$/, (r) => json(r, { sessions }));
115
115
  if (trail) await page.route('**/api/board-trail*', (r) => json(r, trail));
116
116
  await page.goto(BASE + '/premium.html?ini=self-serve-v2&ws=w1&board=w1&theme=' + theme);
117
- const up = await until(() => page.evaluate(() => !!document.querySelector('#czViewer [data-hi-v="page"] .iv-sc')), 30000);
117
+ const up = await until(() => page.evaluate(() => !!document.querySelector('#czViewer [data-hi-v="page"] .iv-mc')), 30000);
118
118
  return { ctx, page, errors, posts, up };
119
119
  };
120
120
  const V = '#czViewer [data-hi-v="page"]';
121
121
  const shot = async (p, name, sel) => { if (!SHOTS) return; await sleep(300); await (sel ? p.locator(sel).first() : p).screenshot({ path: path.join(SHOTS, name + '.png') }); };
122
- /* re-pointed (batch 18 item 1, the card and the mission): the card's head names the stage; the mission draws a strip part a stage with the
123
- * current one marked; a tap on the picture opens in place "N of M done", ⋯ (the stage picker) and → the next stage, then the stages and
124
- * milestones with their dates. The steps are said once, in Tasks */
125
- // the dates line shows when it is drawn: always on a desktop (Wawan 11:58), after the picture's tap on a phone
126
- const miShown = (p) => p.evaluate((v) => { const m = document.querySelector(v + ' .iv-mio'); return !!m && getComputedStyle(m).display !== 'none'; }, V);
127
- const openMi = async (p) => { if (!(await miShown(p))) await p.click(V + ' [data-iv-mi]', { position: { x: 8, y: 8 } }); await until(() => miShown(p)); };
122
+ /* re-pointed (initiative-mission-control): the component's telemetry card names the stage; the trajectory draws the stages as the path's colours with
123
+ * the current one marked; the way to finish this stage holds the next-stage move. The steps are said once, in Tasks */
128
124
  const card = (p) => p.evaluate((v) => {
129
- const c = document.querySelector(v + ' .iv-sc'); const t = (n) => (n ? n.textContent.replace(/\s+/g, ' ').trim() : '');
130
- const go = c.querySelector('.iv-scgo');
131
- return { head: t(c.querySelector('.iv-sch')), stage: t(c.querySelector('.iv-sch > b, .iv-sch .iv-stc b')), chip: !!c.querySelector('.iv-sch [data-iv-stagepick]'),
132
- bars: c.querySelectorAll('.mi-svg .mi-st, .mi-svg .mi-dsh').length, now: c.querySelectorAll('.mi-svg :is(.mi-st, .mi-dsh):is(.nw, .late, .hold)').length, more: !!c.querySelector('.iv-mio .iv-mo[data-iv-stagepick]'), stageRows: c.querySelectorAll('.iv-mio [data-iv-stage]').length,
125
+ const c = document.querySelector(v + ' .iv-mc'); const t = (n) => (n ? n.textContent.replace(/\s+/g, ' ').trim() : '');
126
+ const go = c.querySelector('.iv-gx .iv-scgo');
127
+ return { head: t(c.querySelector('.iv-tel-t')), stage: t(c.querySelector('.iv-tel-t .iv-shn b')), chip: !!c.querySelector('.iv-tel-t [data-iv-stagepick]'),
128
+ segs: c.querySelectorAll('.mi-svg .mi-pt').length, now: c.querySelectorAll('.mi-svg .mi-pt:is(.nw, .late, .hold)').length,
133
129
  steps: document.querySelectorAll(v + ' .cz-sl').length, pri: document.querySelectorAll(v + ' [data-iv-primary]').length,
134
130
  cta: !!document.querySelector(v + ' [data-hm-cta]'), ov: !!document.querySelector(v + ' [data-hm-ov]'), sw: !!c.querySelector('.hi-sw'), tail: go ? go.getAttribute('aria-label') : '', next: !!c.querySelector('[data-iv-next]'), nextTxt: t(go), ms: !!(go && go.dataset.ms), ready: !!(go && go.classList.contains('on')) };
135
131
  }, V);
@@ -137,18 +133,14 @@ async function pure() {
137
133
  /* D1 a desktop: the Build stage of the fixture (the contract waits for you, a Jira ticket open, Deliver next) */
138
134
  {
139
135
  const A = await open(), p = A.page;
140
- ok('D1 the initiative\'s page draws the one view\'s stage card', A.up);
141
- const c0 = await card(p);
142
- ok('D1 the header names the stage', c0.stage === 'Build', JSON.stringify(c0));
143
- ok('D1 the mission\'s strip holds one part a stage of the workflow, the current one marked', c0.bars === 8 && c0.now === 1, JSON.stringify(c0));
144
- ok('D1 the next stage waits in place until the picture is tapped while the Viewer is one column (one primary: the ask\'s)', !(await miShown(p)), JSON.stringify(c0));
145
- await openMi(p);
136
+ ok('D1 the initiative\'s page draws the one component', A.up);
146
137
  const c = await card(p);
147
- ok('D1 a tap on the picture opens in place: ⋯ for the stage and the next stage; no list of the stages, the picture shows them (Wawan 10:59)', c.more && c.stageRows === 0, JSON.stringify(c));
148
- ok('D1 the old CTA button, the C overview tile, the switch and the step list are gone from the card; at most one primary on the page', !c.cta && !c.ov && !c.sw && c.steps === 0 && c.pri <= 1, JSON.stringify(c));
138
+ ok('D1 the telemetry card names the stage', c.stage === 'Build', JSON.stringify(c));
139
+ ok('D1 the trajectory draws each stage as a colour of the path, the current one marked', c.segs >= 2 && c.now >= 1, JSON.stringify(c));
140
+ ok('D1 the separate stage card, Milestones card and success-measure card are gone: one component, at most one primary on the page', await p.evaluate((v) => !document.querySelector(v + ' .iv-card, ' + v + ' .iv-msc, ' + v + ' .iv-sc') && document.querySelectorAll(v + ' .iv-mc').length === 1, V) && !c.cta && !c.ov && !c.sw && c.steps === 0 && c.pri <= 1, JSON.stringify(c));
149
141
  ok('D1 the → names ◆ Deliver, the next stage', c.next && /^Next: ◆ Deliver\. Move to Deliver$/.test(c.tail) && c.ms, c.tail);
150
142
  ok('D1 batch 14 item 11: the button shows the next stage\'s name with the → ("◆ Deliver"), not a bare arrow', /◆ Deliver$/.test(c.nextTxt), c.nextTxt);
151
- await shot(p, 'desk-build', V + ' .iv-sc');
143
+ await shot(p, 'desk-build', V + ' .iv-mc');
152
144
  // batch 16 item 5c (FmI2Stage): the stage's name is a chip; it opens every stage, the switch, then hold, Won't do and Archive (no Cancel)
153
145
  ok('D1 batch 16 item 5c: the stage is a chip that changes it', c.chip, JSON.stringify(c));
154
146
  await p.click(V + ' [data-iv-stagepick]');
@@ -178,42 +170,49 @@ async function pure() {
178
170
  await A.ctx.close();
179
171
  }
180
172
 
181
- /* D1b Wawan 10:53 (canvas v586): on a desktop wide enough for two columns the milestones are their own card under the card, always shown:
182
- * "Milestones N of M done", a tick on each done one, the next one marked, the release said; a row opens its task */
173
+ /* D1b the way to finish this stage: the open milestone tasks of the stage, each with its date ("in N days", orange when late), the done ones
174
+ * counted; a row opens its task. In a viewer 1000 px wide it stands beside the telemetry card; narrower it stacks under it. */
183
175
  {
184
176
  const TASKS = [{ uid: 'b', title: 'Brief signed off', status: 'Done', end: '2026-07-20', milestone: true, section: 'discover' }, { uid: 'w', title: 'Build the flow', status: 'In progress', start: '2026-09-01', end: '2026-11-20', section: 'build' },
177
+ { uid: 'g', title: 'Design frozen', status: 'Done', end: '2026-09-10', milestone: true, section: 'build' }, { uid: 'bt', title: 'Beta ready', status: 'To do', end: '2026-11-20', milestone: true, section: 'build' },
178
+ { uid: 'ss', title: 'Security sign-off', status: 'To do', end: '2026-10-01', milestone: true, section: 'build' },
185
179
  { uid: 'r', title: 'Rollout to all workspaces', status: 'To do', end: '2026-12-01', milestone: true, section: 'deliver' }, { uid: 'e', title: 'Did it work?', status: 'To do', end: '2027-02-01', milestone: true, section: 'evaluate' }];
186
180
  const f = BF.facts(); f.rows = f.rows.map((r) => (r.id === 'self-serve-v2' ? { ...r, stage: 'Build', start: '2026-06-01', end: '2027-02-01', status: 'on track' } : r));
187
181
  const B = BP.build(f), row = B.rows.find((x) => x.id === 'self-serve-v2'); row.tasks = TASKS; row.start = '2026-06-01'; row.end = '2027-02-01';
188
182
  const A = await open({ w: 1440, h: 900, board: B }), p = A.page;
189
- if (!(await p.evaluate((v) => document.querySelector(v + ' .iv').getBoundingClientRect().width >= 820, V))) await p.evaluate(() => window.czViewer.wide(true)); // Home's header has ⧉ in place of ⤢ since batch 18 item 15; wide() is the same width
190
- const mc = await until(() => p.evaluate((v) => { const m = document.querySelector(v + ' .iv-cl > .iv-msc'); if (!m || !m.offsetParent) return null; const rows = [...m.querySelectorAll('.iv-msr')];
191
- return { head: m.querySelector('.iv-msh').textContent.replace(/\s+/g, ' ').trim(), rows: rows.map((r) => r.className.replace('iv-msr', '').trim() + ':' + r.textContent.replace(/\s+/g, ' ').trim()), tick: m.querySelectorAll('.iv-msr.dn .iv-msk.dn svg').length,
192
- press: rows.every((r) => r.dataset.ivMs && /Open its task$/.test(r.getAttribute('aria-label'))), after: !!(m.previousElementSibling && m.previousElementSibling.classList.contains('iv-card')) }; }, V));
193
- ok('D1b the Milestones card sits under the card: "Milestones 1 of 3 done", the done one ticked', !!mc && mc.after && /^Milestones ?1 of 3 done$/.test(mc.head) && mc.tick === 1 && /^dn:Brief signed off/.test(mc.rows[0]), JSON.stringify(mc));
194
- ok('D1b the next one is marked with "in N days", and the release says so', !!mc && /^up:Rollout to all workspacesDec 1 · in \d+ days · release$/.test(mc.rows[1]) && /^:Did it work\?Feb 1/.test(mc.rows[2]), JSON.stringify(mc && mc.rows));
195
- ok('D1b each row is a press for its task', !!mc && mc.press, JSON.stringify(mc));
183
+ if (!(await p.evaluate((v) => document.querySelector(v + ' .iv').getBoundingClientRect().width >= 1000, V))) await p.evaluate(() => window.czViewer.wide(true)); // the same width as the header's ⧉
184
+ const gx = await until(() => p.evaluate((v) => { const g = document.querySelector(v + ' .iv-gx'); if (!g || !g.offsetParent) return null; const rows = [...g.querySelectorAll('.iv-gr')], dn = [...g.querySelectorAll('.iv-gx-dn')].map((x) => x.textContent.trim());
185
+ return { title: g.querySelector('.iv-gx-t b').textContent.trim(), sub: g.querySelector('.iv-gx-t .s').textContent.trim(), count: (g.querySelector('.iv-gx-c small') || {}).textContent, rows: rows.map((r) => (r.classList.contains('late') ? 'late:' : ':') + r.querySelector('.iv-grn').textContent + '|' + r.querySelector('.iv-grw').textContent), done: dn.join('|'),
186
+ press: rows.every((r) => r.dataset.ivMs && /Open its task$/.test(r.getAttribute('aria-label'))), pri: !!g.querySelector('.iv-scgo') }; }, V));
187
+ ok('D1b the way to finish this stage names the next stage and lists the stage\'s open milestone tasks by date, the late one first', !!gx && gx.title === 'To finish this stage' && gx.sub === 'Then: ◆ Deliver' && gx.rows.length === 2 && /^late:Security sign-off\|\d+ days late$/.test(gx.rows[0]) && /^:Beta ready\|/.test(gx.rows[1]), JSON.stringify(gx));
188
+ ok('D1b a milestone of another stage is not listed here; the done one is counted; a row opens its task; the next-stage move stays', !!gx && !gx.rows.some((x) => /Brief|Rollout|Did it work/.test(x)) && /1 milestone done/.test(gx.done || '') && gx.press && gx.pri, JSON.stringify(gx));
196
189
  const layout = await p.evaluate((v) => {
197
- const root = document.querySelector(v + ' .iv'), summary = root.querySelector('.iv-cl'), tasks = root.querySelector('.iv-tasks'), picture = root.querySelector('.iv-mi');
198
- const s = summary.getBoundingClientRect(), t = tasks.getBoundingClientRect(), pic = picture.getBoundingClientRect();
199
- return { stacked: t.top >= s.bottom, full: Math.abs(t.width - s.width) < 2, compact: pic.width <= 261 && pic.height < 150,
200
- scroll: getComputedStyle(tasks).overflowY, overflow: root.scrollWidth > root.clientWidth };
190
+ const root = document.querySelector(v + ' .iv'), mc = root.querySelector('.iv-mc'), tel = root.querySelector('.iv-tel'), g = root.querySelector('.iv-gx'), tasks = root.querySelector('.iv-tasks');
191
+ const m = mc.getBoundingClientRect(), t = tasks.getBoundingClientRect(), a = tel.getBoundingClientRect(), b = g.getBoundingClientRect();
192
+ return { wide: root.getBoundingClientRect().width, side: a.right <= b.left + 1 && Math.abs(a.top - b.top) < 4, tall: Math.abs(a.height - b.height) < 6, below: t.top >= m.bottom, full: Math.abs(t.width - m.width) < 2, overflow: root.scrollWidth > root.clientWidth, sky: a.height >= 200 };
201
193
  }, V);
202
- ok('D1b desktop puts full-width Tasks below a compact summary, with one page scroll', layout.stacked && layout.full && layout.compact && layout.scroll === 'visible' && !layout.overflow, JSON.stringify(layout));
203
- // Wawan 11:58 (0.442.0 hotfix): in two columns the dates line, ⋯ and the next stage show under the picture without a tap, and the
204
- // milestones are said once, in this card; a tap on the picture does not list them again
205
- ok('D1b in two columns the dates line and the next stage show under the picture at once', await miShown(p) && await p.evaluate((v) => { const n = document.querySelector(v + ' .iv-sc [data-iv-next]'); return !!n && !!n.offsetParent; }, V));
206
- const once = () => p.evaluate((v) => [...document.querySelectorAll(v + ' .iv-msl')].filter((l) => l.offsetParent).length, V);
207
- const n0 = await once(); await p.click(V + ' [data-iv-mi]', { position: { x: 8, y: 8 } }); await sleep(300);
208
- ok('D1b in two columns the milestones are listed once, before and after a tap on the picture', n0 === 1 && await once() === 1, String(n0));
209
- await shot(p, 'desk-milestones');
210
- // the phone: the same list behind a tap on the mission, under the stage's dates, ⋯ and the next stage (XvpE2Stages, Wawan 10:59)
194
+ ok('D1b in a viewer 1000 px wide the way to finish stands beside the telemetry card, as tall as it', layout.wide < 1000 || (layout.side && layout.tall), JSON.stringify(layout));
195
+ ok('D1b Tasks stays below the component at the full width of the viewer, with no sideways scroll', layout.below && layout.full && !layout.overflow && layout.sky, JSON.stringify(layout));
196
+ await shot(p, 'desk-gates', V + ' .iv-mc');
197
+ // the master hide: one banner with the stage, the days left, the count and the next-stage move; the way to finish and About go; unhiding returns them as they were
198
+ await p.click(V + ' [data-iv-mc="mc"]');
199
+ const bn = await until(() => p.evaluate((v) => { const b = document.querySelector(v + ' .iv-mc.shut-mc .iv-bn'); if (!b) return null; return { text: b.textContent.replace(/\s+/g, ' ').trim(), gx: !!document.querySelector(v + ' .iv-gx'), ab: !!document.querySelector(v + ' .iv-ab'), tj: !!document.querySelector(v + ' .iv-tj'), next: document.querySelectorAll(v + ' [data-iv-next]').length }; }, V));
200
+ ok('D1b the master hide folds the three into one banner: the stage, the dates, the count and the next-stage move; the way to finish and About are not drawn', !!bn && /Build/.test(bn.text) && /Feb 1/.test(bn.text) && /of \d+ done/.test(bn.text) && /Deliver/.test(bn.text) && !bn.gx && !bn.ab && !bn.tj && bn.next === 1, JSON.stringify(bn));
201
+ await shot(p, 'desk-hidden', V + ' .iv-mc');
202
+ await p.click(V + ' [data-iv-mc="mc"]');
203
+ ok('D1b unhiding returns the telemetry first, and the way to finish as it was', await until(() => p.evaluate((v) => !!document.querySelector(v + ' .iv-mc:not(.shut-mc) .iv-tj') && !!document.querySelector(v + ' .iv-gx .iv-gr'), V)));
204
+ // the way to finish folds by itself, and keeps its count and its button
205
+ await p.click(V + ' [data-iv-mc="gx"]');
206
+ ok('D1b the way to finish folds its rows and keeps the count and the next-stage move', await until(() => p.evaluate((v) => !!document.querySelector(v + ' .iv-mc.shut-gx') && !document.querySelector(v + ' .iv-gx .iv-gr') && !!document.querySelector(v + ' .iv-gx .iv-scgo') && !!document.querySelector(v + ' .iv-gx-c'), V)));
207
+ // the choice is the PM's own, kept for this initiative in this browser
208
+ ok('D1b the folds are kept in the browser for this initiative', await p.evaluate(() => /"gx":false/.test(localStorage.getItem('pmos.iv.mc.self-serve-v2') || '')));
209
+ // the phone: the way to finish and About start folded; Tasks has no Full width icon
211
210
  const Q = await open({ w: 390, h: 844, board: B }), q = Q.page;
212
- ok('D1b a phone has no Milestones card', await q.evaluate((v) => { const m = document.querySelector(v + ' .iv-msc'); return !m || !m.offsetParent; }, V));
213
- await openMi(q);
214
- const ph = await q.evaluate((v) => { const o = document.querySelector(v + ' .iv-mio'); return { head: o.querySelector('.iv-msh') ? o.querySelector('.iv-msh').textContent.replace(/\s+/g, ' ').trim() : '', rows: [...o.querySelectorAll('.iv-msr')].map((r) => r.className.replace('iv-msr', '').trim() + ':' + r.textContent.replace(/\s+/g, ' ').trim()), more: !!o.querySelector('.iv-mo'), over: document.documentElement.scrollWidth - innerWidth }; }, V);
215
- ok('D1b a tap on the phone\'s mission opens the same milestones list, under ⋯', /^Milestones ?1 of 3 done$/.test(ph.head) && JSON.stringify(ph.rows) === JSON.stringify(mc && mc.rows) && ph.more && ph.over <= 0, JSON.stringify(ph));
216
- await shot(q, 'phone-milestones');
211
+ const ph = await q.evaluate((v) => ({ shutGx: !!document.querySelector(v + ' .iv-mc.shut-gx'), shutAb: !!document.querySelector(v + ' .iv-mc.shut-ab'), btn: !!document.querySelector(v + ' .iv-gx .iv-scgo'), count: !!document.querySelector(v + ' .iv-gx-c'), over: document.documentElement.scrollWidth - innerWidth,
212
+ full: !!document.querySelector(v + ' [data-iv-full]') }), V);
213
+ ok('D1b a phone starts with the way to finish and About folded, the count and the next-stage move still drawn, and no sideways scroll', ph.shutGx && ph.shutAb && ph.btn && ph.count && ph.over <= 0, JSON.stringify(ph));
214
+ ok('D1b Tasks has no Full width icon', !ph.full && !(await p.evaluate((v) => !!document.querySelector(v + ' [data-iv-full]'), V)), JSON.stringify(ph));
215
+ await shot(q, 'phone-gates', V + ' .iv-mc');
217
216
  ok('D1b the phone raised no error', Q.errors.length === 0, Q.errors.join(' | '));
218
217
  await Q.ctx.close();
219
218
  ok('D1b the page raised no error', A.errors.length === 0, A.errors.join(' | '));
@@ -227,8 +226,7 @@ async function pure() {
227
226
  const trail = { ok: true, items: { 'self-serve-v2': { since } }, usual: { discover: { n: 5, days: 7 } }, usualBy: {} };
228
227
  const A = await open({ w: 390, h: 844, theme: 'dark', model: SCEN.discover(), board: DB, sessions, trail }), p = A.page;
229
228
  ok('D3 the phone draws the same card', A.up);
230
- ok('D3 a phone keeps the milestones behind a tap on the mission: no Milestones card', await p.evaluate((v) => { const m = document.querySelector(v + ' .iv-msc'); return !m || !m.offsetParent; }, V));
231
- await openMi(p);
229
+ ok('D3 a phone has no Milestones card, and the way to finish starts folded', await p.evaluate((v) => !document.querySelector(v + ' .iv-msc') && !!document.querySelector(v + ' .iv-mc.shut-gx'), V));
232
230
  const c = await card(p);
233
231
  ok('D3 the → names Plan, the next stage', /^Next: Plan/.test(c.tail) && c.next && !c.ms, c.tail);
234
232
  await shot(p, 'phone-discover');
@@ -270,10 +268,9 @@ async function pure() {
270
268
  /* D5 every step done, a milestone next: the next stage is ◆ Deliver; its sheet moves it with nothing open, and says so with Undo */
271
269
  {
272
270
  const A = await open({ model: SCEN.ready() }), p = A.page;
273
- if (!(await p.evaluate((v) => { const n = document.querySelector(v + ' [data-iv-next]'); return !!(n && n.offsetParent); }, V))) await openMi(p); // the next stage shows: in the head, or under the picture once it is open
274
271
  const c = await card(p);
275
272
  ok('D5 every step done: the → names ◆ Deliver', A.up && /^Next: ◆ Deliver/.test(c.tail) && c.ms, JSON.stringify(c));
276
- await shot(p, 'desk-ready', V + ' .iv-sc');
273
+ await shot(p, 'desk-ready', V + ' .iv-mc');
277
274
  await p.click(V + ' [data-iv-next]');
278
275
  await until(() => p.evaluate(() => !!document.querySelector('.hi-pop [data-hi-go]')));
279
276
  await p.click('.hi-pop [data-hi-go]');
@@ -12,7 +12,7 @@
12
12
  * S the ✦ after the title opens "Claude proposes N" with the link proposal: ✓ posts /api/proposals/keep; the moved list says "Was", Undo all, the quiet switch, and marks them seen
13
13
  * D drags: a dot onto another bar's start posts /link fs; a linked bar's move posts /move
14
14
  * L List and Kanban: the link icon, the first task it waits on; a press opens Waits on / Then with a search
15
- * P a phone: a tap on a linked bar opens Waits on / Then as a bottom sheet
15
+ * P a phone (the List only): a press on the link icon opens Waits on / Then as a bottom sheet
16
16
  * SHOTS=<dir> writes the screenshots there. */
17
17
  const path = require('path');
18
18
  const fs = require('fs');
@@ -224,17 +224,16 @@ function model() {
224
224
  await ctx.close();
225
225
  }
226
226
 
227
- // ── P: a phone
227
+ // ── P: a phone shows the List only (initiative-mission-control R8): no Timeline; the link icon opens Waits on / Then as a bottom sheet
228
228
  {
229
- const { ctx, page, errors } = await open({ w: 390, h: 844 });
230
- await page.locator(bar('task-b')).first().click();
229
+ const { ctx, page, errors } = await open({ w: 390, h: 844, view: 'list' });
230
+ await page.locator('#czViewer .iv-wl > .iv-more').first().click().catch(() => {});
231
+ await page.waitForTimeout(300);
232
+ await page.locator('#czViewer .lk-mt[data-lk-meta="task-c"]').first().click();
231
233
  await page.waitForSelector('.lk-pop.sheet', { timeout: 4000 });
232
- const P = await page.evaluate(() => { const s = document.querySelector('.lk-pop.sheet'), r = s.getBoundingClientRect(); return { bottom: Math.round(r.bottom), w: Math.round(r.width), text: s.textContent, dates: !!s.querySelector('[data-lk-dates]'), lines: document.querySelectorAll('#czViewer .lk-sv path.lk-ln').length, scroll: document.documentElement.scrollWidth }; });
233
- ok('P1 a tap on a linked bar draws its links and opens Waits on / Then as a bottom sheet, with its dates one row down', P.bottom === 844 && P.w === 390 && /Waits on/.test(P.text) && /Then/.test(P.text) && P.dates && P.lines >= 2 && P.scroll <= 390, JSON.stringify(P));
234
+ const P = await page.evaluate(() => { const s = document.querySelector('.lk-pop.sheet'), r = s.getBoundingClientRect(); return { bottom: Math.round(r.bottom), w: Math.round(r.width), text: s.textContent, scroll: document.documentElement.scrollWidth, tl: !!document.querySelector('#czViewer .ivt') }; });
235
+ ok('P1 a phone draws the List with no Timeline, and a press on the link icon opens Waits on as a bottom sheet', P.bottom === 844 && P.w === 390 && /Waits on/.test(P.text) && P.scroll <= 390 && !P.tl, JSON.stringify(P));
234
236
  await shot(page, 'DepBuild8Phone');
235
- await page.locator('.lk-pop [data-lk-dates]').click();
236
- await page.waitForTimeout(300);
237
- ok('P2 "Change the dates" opens the date picker', !!(await page.$('.tkc.ivq .tkc-pop')), '');
238
237
  ok('P3 no page error', errors.length === 0, errors.join(' | '));
239
238
  await ctx.close();
240
239
  }
@@ -76,7 +76,7 @@ const titleBtn = (p, uid) => until(async () => { await openSections(p); return p
76
76
  // the one task editor: the initiative's view gave way, the Viewer's title is the task's, and the card (task-card.js) is drawn with its Status row
77
77
  const editorOf = (p, title) => until(() => p.evaluate((a) => { const v = document.querySelector(a[0]), c = window.czViewer && window.czViewer.current(); if (!v || !c) return null;
78
78
  const t = (v.querySelector('.cz-vw-title') || {}).textContent || '';
79
- return !v.querySelector('.iv-sc') && t.includes(a[1]) && /Status/.test(v.textContent) && !/no longer on/.test(v.textContent) ? 'ok' : null; }, [V, title]), 8000);
79
+ return !v.querySelector('.iv-mc') && t.includes(a[1]) && /Status/.test(v.textContent) && !/no longer on/.test(v.textContent) ? 'ok' : null; }, [V, title]), 8000);
80
80
  const back = (p) => p.evaluate(() => { const b = document.querySelector('#czViewer [data-cz-vw="back"]'); if (!b || b.hidden) return false; b.click(); return true; });
81
81
 
82
82
  (async () => {
@@ -91,7 +91,7 @@ const back = (p) => p.evaluate(() => { const b = document.querySelector('#czView
91
91
  /* Home: the initiative's page in the Viewer */
92
92
  const H = await page('/premium.html?ini=' + ID + '&ws=w1&board=w1&theme=light');
93
93
  const hp = H.p;
94
- const up = await until(() => hp.evaluate((v) => !!document.querySelector(v + ' [data-hi-v="page"] .iv-sc'), V), 30000);
94
+ const up = await until(() => hp.evaluate((v) => !!document.querySelector(v + ' [data-hi-v="page"] .iv-mc'), V), 30000);
95
95
  ok('T0 Home opens the initiative\'s page', up);
96
96
  ok('T1 each task\'s title is a press', await titleBtn(hp, 't1') && await titleBtn(hp, 't2'));
97
97
  await openCard(hp, 't1', V);
@@ -247,21 +247,11 @@ const IF = require('./fixtures/initiative-premium-facts.js');
247
247
  await p.keyboard.press('Escape');
248
248
  ok('V5 Escape closes the picker and leaves the panel open', await p.evaluate(() => !document.querySelector('.tkc.ivq') && !!document.querySelector('#czViewer .ivt')));
249
249
 
250
- /* V4 full width (batch 17 item 3): the Timeline takes the window, as the Board's does; Escape goes back to the panel */
251
- const pw = await p.evaluate(() => document.querySelector('#czViewer').getBoundingClientRect().width);
252
- await p.click('#czViewer [data-iv-full]');
253
- 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; }));
254
- ok('V4 Full width spreads the Timeline over the window, the icon pressed', !!fw && fw.pressed === 'true' && pw < fw.w, JSON.stringify({ pw, fw }));
255
- await shot(p, 'timeline-full-1440');
250
+ /* V4 no Full width icon (initiative-mission-control R8): the split panel replaces it. The Timeline keeps its own zoom and fits the panel at All. */
251
+ ok('V4 the Tasks header has no Full width icon on the Timeline', await p.evaluate(() => !document.querySelector('#czViewer [data-iv-full]') && !document.body.classList.contains('ivt-full')));
256
252
  await sheetPick(p, 'zoom', 'all');
257
253
  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; }));
258
- ok('V4 in full width All stretches to the window and still fits', fit && fit.fits && fit.tw > fit.vw - 120, JSON.stringify(fit));
259
- await shot(p, 'timeline-full-all-1440');
260
- await p.keyboard.press('Escape');
261
- const back = await until(() => p.evaluate(() => (!document.body.classList.contains('ivt-full') && !!document.querySelector('#czViewer .ivt') ? Math.round(document.querySelector('#czViewer').getBoundingClientRect().width) : null)));
262
- ok('V4 Escape takes the Timeline back to the panel, the Viewer stays open', back != null && back < fw.w, String(back));
263
- const pfit = await p.evaluate(() => { const T = document.querySelector('#czViewer .iva'); return { tw: Math.round(T.getBoundingClientRect().width), fits: T.scrollWidth <= T.clientWidth + 1 }; });
264
- ok('V4 back in the panel All fits the panel again', pfit.fits, JSON.stringify(pfit));
254
+ ok('V4 at All the Timeline fits the panel', fit && fit.fits, JSON.stringify(fit));
265
255
  await sheetPick(p, 'zoom', 'week');
266
256
 
267
257
  /* V6 Kanban: one stage at a time (the current first), columns by status, Won't do a folded strip */
@@ -299,32 +289,22 @@ const IF = require('./fixtures/initiative-premium-facts.js');
299
289
  }
300
290
  await A.ctx.close();
301
291
 
302
- /* V9 the phone: Kanban one column a screen with tabs; Timeline puts the title above its bar and does not drag */
292
+ /* V9 the phone (initiative-mission-control R8): Tasks is a list only. A Kanban or Timeline picked on a desk reads as the List; the sheet has no View row;
293
+ * a long press on a box opens the status picker */
303
294
  for (const theme of ['light', 'dark']) {
304
295
  const Ph = await open({ w: 390, h: 844, theme, touch: true, store: { 'pmos.tasks.view': 'kanban' } }), q = Ph.page;
305
- const pk = await q.evaluate(() => { const K = document.querySelector('#czViewer .ivk'), t = document.querySelector('#czViewer .ivk-tabs'), c = K && K.querySelector('.ivk-c'); return K ? { tabs: t && getComputedStyle(t).display, tw: [...t.querySelectorAll('button')].map((b) => b.textContent.trim()).join('|'), cw: Math.round(c.getBoundingClientRect().width), kw: Math.round(K.getBoundingClientRect().width), car: getComputedStyle(document.querySelector('#czViewer .iv-car') || document.body).display } : null; });
306
- if (theme === 'light') {
307
- ok('V9 phone Kanban: one column a screen, the next peeks, status tabs on top', pk && pk.tabs === 'flex' && pk.tw === 'To do 2|In progress 2|Done 1' && pk.cw < pk.kw && pk.cw > pk.kw * 0.7, JSON.stringify(pk));
308
- ok('V9 phone: no caret (a long press on the box opens the status picker)', pk && pk.car === 'none', JSON.stringify(pk));
309
- }
310
- await shot(q, 'kanban-390-' + theme);
296
+ const pk = await q.evaluate(() => ({ kanban: !!document.querySelector('#czViewer .ivk'), timeline: !!document.querySelector('#czViewer .ivt, #czViewer .iva'), list: !!document.querySelector('#czViewer .iv-wbs'), full: !!document.querySelector('#czViewer [data-iv-full]') }));
297
+ if (theme === 'light') ok('V9 phone: a Kanban picked on a desk reads as the List, and there is no Full width icon', pk.list && !pk.kanban && !pk.timeline && !pk.full, JSON.stringify(pk));
298
+ await shot(q, 'list-390-' + theme);
311
299
  if (theme === 'light') {
312
300
  await q.evaluate(() => document.querySelector('#czViewer [data-iv-vbtn]').click());
313
- 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 }; }));
301
+ 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, view: !!s.querySelector('[data-ivs-view]'), by: !!s.querySelector('[data-ivs-by]') }; }));
314
302
  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));
303
+ ok('V10 phone: the sheet has Group by and no View row (a phone shows the List only)', ps && ps.by && !ps.view, JSON.stringify(ps));
315
304
  await shot(q, 'sheet-390');
316
305
  await q.evaluate(() => document.querySelector('.vs-scrim').dispatchEvent(new PointerEvent('pointerdown', { bubbles: true })));
317
306
  ok('V10 phone: a tap on the scrim closes the sheet', await until(() => q.evaluate(() => !document.querySelector('.tkc.ivq') && !document.querySelector('.vs-scrim')), 2000));
318
- }
319
- await sheetPick(q, 'view', 'timeline');
320
- await until(() => q.evaluate(() => !!document.querySelector('#czViewer .ivt')));
321
- await sleep(200);
322
- 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 }; });
323
- if (theme === 'light') ok('V9 phone Timeline: the title sits above its bar; no drag grips', pt.above && pt.grips === 'none', JSON.stringify(pt));
324
- await shot(q, 'timeline-390-' + theme);
325
- if (theme === 'light') {
326
307
  // a long press on the box opens the status picker; the click that follows does not mark it done
327
- await sheetPick(q, 'view', 'list');
328
308
  await until(() => q.evaluate(() => !!document.querySelector('#czViewer [data-iv-check="task-b"]')));
329
309
  const n0 = Ph.posts.length;
330
310
  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 }; });
@@ -384,40 +364,10 @@ const IF = require('./fixtures/initiative-premium-facts.js');
384
364
  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); });
385
365
 
386
366
  for (const theme of ['light', 'dark']) {
387
- for (const zoom of ['week', 'month']) {
388
- const P = await openH({ theme, zoom }), q = P.page;
389
- const g = await rowsGeo(q);
390
- 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));
391
- 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));
392
- // H2: where a group's name crosses the Today line, the name does not hide it
393
- const tl = await q.evaluate(() => { const x = document.querySelector('#czViewer .ivt-today').getBoundingClientRect().left;
394
- 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); });
395
- 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));
396
- const ax = await axisGeo(q);
397
- 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));
398
- if (zoom === 'week') {
399
- await q.evaluate(() => { const s = document.querySelector('#czViewer .ivt-sc'); s.scrollLeft += 160; });
400
- await sleep(200);
401
- const g2 = await rowsGeo(q), ax2 = await axisGeo(q);
402
- 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 }));
403
- await q.evaluate(() => { const s = document.querySelector('#czViewer .ivt-sc'); s.scrollLeft -= 160; });
404
- await sleep(150);
405
- ok(`H5 Home phone ${theme}: no Full width on a phone`, !(await q.$('#czViewer [data-iv-full]')));
406
- }
407
- await shotH(q, `hotfix-home-390-${zoom}-${theme}`);
408
- ok(`H0 Home phone ${zoom} ${theme}: no page error`, P.errors.length === 0, P.errors.join(' | '));
409
- await P.ctx.close();
410
- }
411
- const Pa = await openH({ theme, zoom: 'all' }), qa = Pa.page;
412
- 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) }; }));
413
- 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));
414
- await shotH(qa, `hotfix-home-390-all-${theme}`);
415
- await Pa.ctx.close();
416
-
417
- /* desktop: the Board's panel */
367
+ /* desktop: the Board's panel (a phone shows the List only, so it has no Timeline to check) */
418
368
  const D = await openH({ where: 'board', w: 1440, h: 900, theme }), d = D.page;
419
- 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]') }; });
420
- 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));
369
+ const fl = await d.evaluate(() => ({ head: !!document.querySelector('#czViewer [data-iv-full]'), view: !!document.querySelector('#czViewer .iv-th [data-iv-vbtn]') }));
370
+ ok(`H5 Board 1440 ${theme}: the Tasks header holds the view button and no Full width icon`, !fl.head && fl.view, JSON.stringify(fl));
421
371
  const ax = await axisGeo(d);
422
372
  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));
423
373
  const ms = await d.evaluate(() => { const b = document.querySelector('#czViewer [data-ivt-bar="h4"]'); return b ? { cls: b.className, tf: getComputedStyle(b).transform } : null; });
@@ -605,7 +555,7 @@ const IF = require('./fixtures/initiative-premium-facts.js');
605
555
  ];
606
556
  for (const theme of ['light', 'dark']) {
607
557
  const B = await openH({ where: 'board', w: 1440, h: 900, theme, tasks: STASKS });
608
- await B.page.evaluate(() => { const b = document.querySelector('#czViewer [data-iv-full]'); if (b) b.click(); });
558
+ await B.page.evaluate(() => { if (window.czViewer && window.czViewer.wide) window.czViewer.wide(true); }); // the Viewer as wide as the split panel makes it
609
559
  await sleep(400);
610
560
  const S1 = await B.page.evaluate(() => {
611
561
  const T = document.querySelector('#czViewer .ivt'), vis = (e) => !!e && e.getBoundingClientRect().width > 0 && getComputedStyle(e).display !== 'none';
@@ -634,7 +584,7 @@ const IF = require('./fixtures/initiative-premium-facts.js');
634
584
  await until(() => B.page.evaluate(() => document.querySelectorAll('#ibBody .ini2, #ibBody .bt-l').length > 0), 20000);
635
585
  await B.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(); });
636
586
  await until(() => B.page.evaluate(() => !!document.querySelector('#czViewer .ivt')), 15000);
637
- await B.page.evaluate(() => { const b = document.querySelector('#czViewer [data-iv-full]'); if (b && b.getAttribute('aria-pressed') !== 'true') b.click(); });
587
+ await B.page.evaluate(() => { if (window.czViewer && window.czViewer.wide) window.czViewer.wide(true); });
638
588
  await sleep(300);
639
589
  const heads = await B.page.evaluate(() => [...document.querySelectorAll('#czViewer .ivt-r.ax .ivt-col')].filter((e) => e.getBoundingClientRect().width > 0).map((e) => e.textContent));
640
590
  ok('S3 Columns: Owner on and Key off, remembered over a reload', kept === '["status","start","due","owner"]' && heads.join() === 'Status,Start,Due,Owner', JSON.stringify({ kept, heads }));
@@ -647,17 +597,6 @@ const IF = require('./fixtures/initiative-premium-facts.js');
647
597
  }
648
598
  ok(`S0 Board ${theme}: no page error`, !B.errors.length, B.errors.join(' | '));
649
599
  await B.ctx.close();
650
- // a phone (Home's Viewer, premium.html?ini=…): no columns; the title above its bar with its box; the late line still runs
651
- const H = await openH({ where: 'home', w: 390, h: 844, theme, tasks: STASKS });
652
- const P5 = await H.page.evaluate(() => {
653
- const T = document.querySelector('#czViewer .ivt'), r = T.querySelector('[data-ivt-bar="s1"]').closest('.ivt-r');
654
- const n = r.querySelector('.iv-tt').getBoundingClientRect(), b = r.querySelector('[data-ivt-bar="s1"]').getBoundingClientRect();
655
- return { cols: [...T.querySelectorAll('.ivt-col')].filter((e) => getComputedStyle(e).display !== 'none').length, box: getComputedStyle(r.querySelector('.ivt-bx')).display !== 'none', above: n.bottom <= b.top + 1, late: T.querySelectorAll('.ivt-late').length };
656
- });
657
- ok(`S5 Home phone ${theme}: no columns; each title sits above its bar with its box; the late line runs to Today`, P5.cols === 0 && P5.box && P5.above && P5.late === 2, JSON.stringify(P5));
658
- await shotH(H.page, 'sts-home-phone-' + theme);
659
- ok(`S0 Home phone ${theme}: no page error`, !H.errors.length, H.errors.join(' | '));
660
- await H.ctx.close();
661
600
  }
662
601
  }
663
602
 
@@ -0,0 +1,5 @@
1
+ {
2
+ "_comment": "initiative-mission-control: the initiative's one component (the telemetry card as a trajectory, the way to finish the stage, About) with its master hide and folds, and Tasks without the Full width icon, list only on a phone. Pure.",
3
+ "modules": ["mission-control.test.js", "ini-about.test.js"],
4
+ "seconds": { "mission-control.test.js": 1, "ini-about.test.js": 1 }
5
+ }
@@ -1,5 +1,9 @@
1
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 }
2
+ "_comment": "Batch 18 item 1-A and initiative-mission-control: the mission picture (pm/mission.js), drawn as a trajectory on a time axis: stages lead, dates measure, the path, milestones, crowded milestones, the months. Pure.",
3
+ "modules": [
4
+ "mission.test.js"
5
+ ],
6
+ "seconds": {
7
+ "mission.test.js": 1
8
+ }
5
9
  }
@@ -0,0 +1,5 @@
1
+ {
2
+ "_comment": "Settings › Updates with the weekly change log (What's new merged into Updates; layout C, the week picker). pm/upd-weeks.js groups the published kits by week and kind in node; the screens that draw it are checked by ev-everywhere-test.js. scripts/tests/kit-changelog.test.js covers the kind each PR keeps.",
3
+ "modules": ["upd-weeks.test.mjs"],
4
+ "seconds": { "upd-weeks.test.mjs": 1 }
5
+ }
@@ -112,7 +112,7 @@ const LAYOUT = { ok: true, auto: true, held: [], by: 'stage', names: [], of: {},
112
112
  return { ctx, page, errors, posts, up, set: (v) => { cur = v; } };
113
113
  }
114
114
  await page.goto(BASE + '/premium.html?ini=' + I + '&ws=w1&board=w1&theme=' + theme);
115
- const up = await until(() => page.evaluate(() => !!document.querySelector('#czViewer .iv-sc')), 30000);
115
+ const up = await until(() => page.evaluate(() => !!document.querySelector('#czViewer .iv-mc')), 30000);
116
116
  return { ctx, page, errors, posts, up, set: (v) => { cur = v; } };
117
117
  };
118
118
  const V = '#czViewer:not([hidden])';
@@ -269,8 +269,8 @@ const LAYOUT = { ok: true, auto: true, held: [], by: 'stage', names: [], of: {},
269
269
  const fit = await c.evaluate((v) => { const h = document.querySelector(v + ' .iv-th'), r = h.getBoundingClientRect(); const kids = [...h.children].filter((e) => e.offsetParent); return { over: h.scrollWidth > h.clientWidth + 1, rows: new Set(kids.filter((e) => e.matches('button')).map((e) => Math.round(e.getBoundingClientRect().top))).size, right: Math.max(...kids.map((e) => e.getBoundingClientRect().right)) <= r.right + 1, views: [...h.querySelectorAll('[data-iv-vbtn]')].filter((b) => b.offsetParent).length }; }, V);
270
270
  ok('G4 phone: the header holds the view button and + on one line, nothing cut', !fit.over && fit.rows === 1 && fit.right && fit.views === 1, JSON.stringify(fit));
271
271
  await sheetOpen(c);
272
- const vm = await c.evaluate(() => { const g = document.querySelector('.tkc.ivq.sheet .ivs-seg[aria-label="View"]'); return g ? [...g.children].map((b) => b.getAttribute('aria-label')) : null; });
273
- ok('G4 phone: the view button opens the bottom sheet: List, Timeline and Kanban', !!vm && vm.join('|') === 'List|Timeline|Kanban', JSON.stringify(vm));
272
+ const vm = await c.evaluate(() => { const s = document.querySelector('.tkc.ivq.sheet'); return s ? { view: !!s.querySelector('.ivs-seg[aria-label="View"]'), by: [...(s.querySelectorAll('.ivs-seg[aria-label="Group by"] > button') || [])].map((b) => (b.getAttribute('aria-label') || b.textContent.trim())).slice(0, 3) } : null; });
273
+ ok('G4 phone: the view button opens the bottom sheet with Group by and no View row (a phone shows the List only)', !!vm && !vm.view && vm.by.join('|') === 'Stage|Owner|Status', JSON.stringify(vm));
274
274
  await c.keyboard.press('Escape');
275
275
  const row = await c.evaluate((v) => { const r = document.querySelector(v + ' .ig-tk[data-ig-tk="S1"]'); return r ? { t: r.textContent.replace(/\s+/g, ' ').trim(), sq: (r.querySelector('.ig-sq') || {}).className, av: (r.querySelector('.ivt-av') || {}).textContent, lab: r.querySelector('.ig-sq') && r.querySelector('.ig-sq').getAttribute('aria-label') } : null; }, V);
276
276
  ok('T1 after the send: the key, a status square and the assignee', !!row && /IDPF-411 Sign-in parity/.test(row.t) && /doing/.test(row.sq) && row.av === 'Ru' && row.lab === 'In Jira: In Progress', JSON.stringify(row));