create-pmos 0.431.0 → 0.433.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 (63) 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/board-programs-test.js +10 -4
  7. package/workspace/briefing-premium-board-test.js +24 -22
  8. package/workspace/briefing-premium-initiative-test.js +10 -5
  9. package/workspace/briefing-premium-products-test.js +2 -0
  10. package/workspace/briefing-premium-sources-test.js +15 -8
  11. package/workspace/briefing-premium-work-test.js +6 -3
  12. package/workspace/changelog.json +24 -0
  13. package/workspace/ev-everywhere-test.js +40 -33
  14. package/workspace/guide/briefing-premium.md +1 -1
  15. package/workspace/guide/data-freshness.md +3 -1
  16. package/workspace/guide/home.md +26 -17
  17. package/workspace/guide/initiative-boards.md +6 -6
  18. package/workspace/guide/programs.md +3 -3
  19. package/workspace/ini-workflow-test.js +13 -8
  20. package/workspace/lib/briefing-premium.js +6 -3
  21. package/workspace/lib/engine/boards.js +13 -2
  22. package/workspace/lib/ini-deleted.js +58 -0
  23. package/workspace/lib/initiative-rows.js +4 -1
  24. package/workspace/lib/routes-boards.js +48 -0
  25. package/workspace/lib/search-index.js +3 -1
  26. package/workspace/milestone-pins-test.js +8 -3
  27. package/workspace/package-lock.json +2 -2
  28. package/workspace/package.json +1 -1
  29. package/workspace/premium-board-actions-test.js +50 -32
  30. package/workspace/premium-briefing-depth-test.js +33 -34
  31. package/workspace/premium-core-doc-issue-test.js +1 -1
  32. package/workspace/premium-vw-backlog-test.js +1 -1
  33. package/workspace/premium-vw-item-test.js +1 -1
  34. package/workspace/premium-vw-jira-test.js +1 -1
  35. package/workspace/product-lane-test.js +5 -5
  36. package/workspace/program-leave-test.js +20 -19
  37. package/workspace/public/pm/bd-acts.js +7 -5
  38. package/workspace/public/pm/bd-ini-panel.js +57 -25
  39. package/workspace/public/pm/bd-span.js +5 -4
  40. package/workspace/public/pm/cozy-ev.css +22 -7
  41. package/workspace/public/pm/cozy-evmodel.js +3 -3
  42. package/workspace/public/pm/cozy-nav.js +29 -32
  43. package/workspace/public/pm/cozy-news.js +11 -27
  44. package/workspace/public/pm/cozy-settings.js +68 -11
  45. package/workspace/public/pm/cozy-sources.js +5 -89
  46. package/workspace/public/pm/cozy-today.css +19 -1
  47. package/workspace/public/pm/hi-pop.css +21 -0
  48. package/workspace/public/pm/hi-pop.js +5 -5
  49. package/workspace/public/pm/home-app.js +62 -25
  50. package/workspace/public/pm/home-day.js +60 -2
  51. package/workspace/public/pm/home-ini.js +66 -27
  52. package/workspace/public/pm/home-more.js +9 -50
  53. package/workspace/public/pm/home-today.js +4 -2
  54. package/workspace/public/pm/ini-more.js +78 -42
  55. package/workspace/public/pm/ini-view-model.js +1 -1
  56. package/workspace/public/pm/ini-view.css +17 -0
  57. package/workspace/public/pm/ini-view.js +25 -7
  58. package/workspace/public/pm/premium-board.js +4 -3
  59. package/workspace/public/pm/prog-move.js +26 -0
  60. package/workspace/public/pm/stage-line.js +4 -3
  61. package/workspace/public/premium.html +0 -1
  62. package/workspace/stage-card-test.js +10 -1
  63. package/workspace/task-milestones-test.js +4 -3
@@ -12,10 +12,14 @@
12
12
  * fold with Undo; nothing when nothing is drafted.
13
13
  * o: { add (the Tasks + icon), adding (the inline field is open), next (the next stage is a press: Home's move sheet), openTask, docs: { n, html? } | null,
14
14
  * quick (each task's box carries the status caret and its date is a press: the host has h.status and h.dates),
15
- * draft (the empty breakdown's Draft it), program (the chip opens the program), wf (the workflow on the meta line opens the Change picker) }
15
+ * draft (the empty breakdown's Draft it), program (the chip opens the program), wf (the workflow on the meta line opens the Change picker),
16
+ * and what left the ⋯ for the thing it changes (batch 16 item 5c, FmI2Stage): person (the dashed + after the owner adds a
17
+ * stakeholder), stagePick (the stage's name is a chip that opens the stage picker), planDates (the plan's dates are a chip
18
+ * that changes them), jira (the ↻ beside Jira's freshness in Linked reads Jira again) }
16
19
  * wireView(body, h) the presses, once per body: h.check(uid, btn), h.openTask(uid), h.openTicket(key), h.add(btn) (the + icon: the host
17
20
  * redraws with o.adding, an inline field), h.addTask(title, input), h.addCancel(), h.next(btn),
18
21
  * h.primary(act, btn), h.program(id), h.docs(), h.doc(path) (a linked document), h.draft(btn), h.wf(btn), h.redraw() (after a fold opens or closes),
22
+ * h.person(btn), h.stagePick(btn), h.planDates(btn), h.jira(btn) (batch 16 item 5c),
19
23
  * h.sm(act, btn) a press on Claude's split or merge card (pm/split-merge.js press), h.openIni(id) the merged summary's link,
20
24
  * h.status(uid, state) and h.dates(uid, { start?, due? }) (the quick changes, each saved at once with Undo in the host's toast);
21
25
  * the stage card's line (batch 11 item 21, pm/stage-line.js): h.add(btn, { start, due }) a gap's + (a task on those dates),
@@ -49,7 +53,7 @@ const P = {
49
53
  go: 'M5 12h14M13 6l6 6-6 6', check: 'M5 12l5 5 9-10', right: 'M10 7l5 5-5 5', down: 'M7 10l5 5 5-5', plus: 'M12 5v14M5 12h14',
50
54
  prog: 'M12 3l9 5-9 5-9-5zM3 13l9 5 9-5', doc: 'M7 3h7l5 5v13H7zM14 3v5h5', draft: 'M12 3v4M12 17v4M3 12h4M17 12h4M5.6 5.6l2.8 2.8M15.6 15.6l2.8 2.8M5.6 18.4l2.8-2.8M15.6 8.4l2.8-2.8',
51
55
  skip: 'M6 7l5 5-5 5M13 7l5 5-5 5', // » a skipped stage (batch 11 item 13: the same mark as the timelines)
52
- pause: 'M9 6v12M15 6v12', cal: 'M4 5h16v15H4zM8 3v4M16 3v4M4 10h16',
56
+ pause: 'M9 6v12M15 6v12', cal: 'M4 5h16v15H4zM8 3v4M16 3v4M4 10h16', again: 'M20 11a8 8 0 1 0-2.3 5.7M20 5v6h-6',
53
57
  };
54
58
  const FOLD = new Map(); // `${id}|${key}` → true (open) | false (shut): the PM's own fold, for the session
55
59
  const isOpen = (v, key, dflt) => { const k = (v.id || v.key) + '|' + key; return FOLD.has(k) ? FOLD.get(k) : !!dflt; };
@@ -60,8 +64,10 @@ function summaryHtml(s, o = {}) {
60
64
  const dot = s.tone === 'you' ? 'you' : s.tone === 'warn' ? 'warn' : s.tone === 'ok' ? 'ok' : '';
61
65
  const go = s.primary ? `<button type="button" class="iv-go" data-iv-primary="${esc(s.primary.act)}" aria-label="${esc(s.primary.label)}" title="${esc(s.primary.label)}">${SVG(P.go, 16, 2.2)}</button>` : '';
62
66
  const meta = [];
67
+ // the dashed + after the people (batch 16 item 5c): Add a stakeholder, where it left the ⋯
68
+ const addP = o.person ? `<button type="button" class="iv-addp" data-iv-person aria-label="Add a stakeholder" title="Add a stakeholder">${SVG(P.plus, 12, 2.4)}</button>` : '';
63
69
  if (s.status) meta.push(`<span class="iv-st ${esc(s.status.tone)}"><i aria-hidden="true"></i>${esc(s.status.text)}</span>`);
64
- meta.push(s.owner ? `<span class="iv-who"><span class="iv-av" aria-hidden="true">${esc(s.owner.av)}</span>${esc(s.owner.name)}</span>` : '<span class="iv-who q">No owner</span>');
70
+ meta.push((s.owner ? `<span class="iv-who"><span class="iv-av" aria-hidden="true">${esc(s.owner.av)}</span>${esc(s.owner.name)}</span>` : '<span class="iv-who q">No owner</span>') + addP);
65
71
  if (s.wf) meta.push(o.wf ? `<button type="button" class="iv-wf" data-iv-wf aria-haspopup="listbox" aria-label="${esc('Workflow: ' + (s.wf.name || 'Product feature') + '. Change')}" title="Change the workflow">${wfIcon(s.wf, 15)}${esc(s.wf.name || 'Product feature')}</button>`
66
72
  : `<span class="iv-wf">${wfIcon(s.wf, 15)}${esc(s.wf.name || 'Product feature')}</span>`);
67
73
  if (s.program) meta.push(`<button type="button" class="iv-prog" data-iv-program="${esc(s.program.id)}" title="Open the program ${esc(s.program.title)}">${SVG(P.prog, 15)}${esc(s.program.title)}</button>`);
@@ -71,7 +77,7 @@ function summaryHtml(s, o = {}) {
71
77
  if (!s.text && !go) {
72
78
  const m = [];
73
79
  if (s.status) m.push(`<span class="iv-st ${esc(s.status.tone)}"><i aria-hidden="true"></i>${esc(s.status.text)}</span>`);
74
- m.push(s.owner ? `<span class="iv-who" title="${esc('Owner: ' + s.owner.name)}"><span class="iv-av" aria-hidden="true">${esc(s.owner.av)}</span><span class="iv-sr">${esc(s.owner.name)}</span></span>` : '<span class="iv-who q">No owner</span>');
80
+ m.push((s.owner ? `<span class="iv-who" title="${esc('Owner: ' + s.owner.name)}"><span class="iv-av" aria-hidden="true">${esc(s.owner.av)}</span><span class="iv-sr">${esc(s.owner.name)}</span></span>` : '<span class="iv-who q">No owner</span>') + addP);
75
81
  const wn = s.wf ? s.wf.name || 'Product feature' : '';
76
82
  if (s.wf) m.push(o.wf ? `<button type="button" class="iv-wf" data-iv-wf aria-haspopup="listbox" aria-label="${esc('Workflow: ' + wn + '. Change')}" title="${esc('Workflow: ' + wn + '. Change')}">${wfIcon(s.wf, 15)}<span class="iv-sr">${esc(wn)}</span></button>`
77
83
  : `<span class="iv-wf" title="${esc('Workflow: ' + wn)}">${wfIcon(s.wf, 15)}<span class="iv-sr">${esc(wn)}</span></span>`);
@@ -102,7 +108,13 @@ function stageHtml(st, o, id) {
102
108
  const go = n ? `<${o.next ? 'button type="button" data-iv-next' : 'span'} class="iv-scgo${st.ready ? ' on' : ''}"${n.ms ? ' data-ms="1"' : ''} aria-label="${esc('Next: ' + (n.ms ? '◆ ' : '') + n.name + (o.next ? '. Move to ' + n.name : ''))}" title="${esc('Next: ' + n.name)}"><span class="iv-scgn">${n.ms ? '◆ ' : ''}${esc(n.name)}</span>${SVG(P.go, 16, 2.2)}</${o.next ? 'button' : 'span'}>` : '';
103
109
  // a phone puts "N of M done" and the clock on a line of their own under the name (ScxA2Phone)
104
110
  const meta = of || clock || chip ? `<span class="iv-scm">${of}${clock}${chip}</span>` : '';
105
- const head = `<div class="iv-sch">${tile}<b>${esc(st.name)}</b><span class="iv-sp"></span>${meta}${cal}${go}</div>`;
111
+ // the stage's name is the chip that moves it (batch 16 item 5c, FmI2Stage): every stage, Moves on by itself, hold, Won't do, Archive
112
+ const name = o.stagePick ? `<button type="button" class="iv-stc" data-iv-stagepick aria-haspopup="menu" aria-expanded="false" aria-label="${esc('Stage: ' + st.name + '. Change')}" title="Change the stage"><b>${esc(st.name)}</b>${SVG(P.down, 12, 2.4)}</button>` : `<b>${esc(st.name)}</b>`;
113
+ // the plan's dates are the chip that changes them; with none, a calendar says so
114
+ const D = st.dates, dtxt = D && (D.start || D.end) ? [D.start, D.end].filter(Boolean).join(' – ') : '';
115
+ const dates = o.planDates ? (dtxt ? `<button type="button" class="iv-dtc" data-iv-plandates aria-label="${esc('Plan dates: ' + dtxt + '. Change')}" title="Change the plan dates">${esc(dtxt)}</button>`
116
+ : `<button type="button" class="iv-ib iv-scb" data-iv-plandates aria-label="No plan dates yet. Set them" title="Set the plan dates">${SVG(P.cal, 16)}</button>`) : '';
117
+ const head = `<div class="iv-sch">${tile}${name}<span class="iv-sp"></span>${meta}${dates}${dates && cal && L.cal === 'dates' ? '' : cal}${go}</div>`;
106
118
  return `<section class="iv-sc" aria-label="${esc(st.aria || 'Stage · ' + st.name)}">${head}${lineHtml(L, { open: LINE.get(id) || '', hold: !!o.hold })}</section>`;
107
119
  }
108
120
 
@@ -233,10 +245,12 @@ function foldsHtml(v, o) {
233
245
  rows.push(`<button type="button" class="iv-fr" ${inl ? `data-iv-fold="docs" aria-expanded="${op}"` : 'data-iv-docs'}><b>Documents</b><span class="n">${n}</span>${chev(op)}</button>` + (op ? `<div class="iv-fb">${own}${fd.length ? `<div class="iv-fds">${fdHtml}</div>` : ''}</div>` : ''));
234
246
  }
235
247
  const L = (v.linked || []).concat(((v.found && v.found.linked) || []).map((x) => ({ kind: 'found', label: x.label, title: x.title, ref: x.ref })));
236
- if (L.length) {
248
+ // Jira's freshness with its ↻ (batch 16 item 5c): Read Jira again sits beside the tickets' last read, where it left the ⋯
249
+ const jr = o.jira && v.jiraAt ? `<span class="iv-jfr">${esc(v.jiraAt)}<button type="button" class="iv-ib" data-iv-jira aria-label="Read Jira again" title="Read Jira again">${SVG(P.again, 15, 2)}</button></span>` : '';
250
+ if (L.length || jr) {
237
251
  const op = isOpen(v, 'linked', false);
238
252
  const chip = (x) => (x.kind === 'doc' ? `<button type="button" class="iv-chip" data-iv-doc="${esc(x.path)}" title="${esc(x.path)}">${esc(x.label)}</button>` : `<span class="iv-chip"${x.title ? ` title="${esc(x.title)}"` : ''}>${esc(x.label)}</span>`);
239
- rows.push(`<button type="button" class="iv-fr" data-iv-fold="linked" aria-expanded="${op}"><b>Linked</b><span class="n">${L.length}</span>${chev(op)}</button>` + (op ? `<div class="iv-fb iv-chips">${L.map(chip).join('')}</div>` : ''));
253
+ rows.push(`<button type="button" class="iv-fr" data-iv-fold="linked" aria-expanded="${op}"><b>Linked</b>${L.length ? `<span class="n">${L.length}</span>` : ''}${chev(op)}</button>` + (op ? `<div class="iv-fb iv-chips">${L.map(chip).join('')}${jr}</div>` : ''));
240
254
  }
241
255
  return rows.length ? `<div class="iv-folds">${rows.join('')}</div>` : '';
242
256
  }
@@ -289,6 +303,10 @@ export function wireView(body, h) {
289
303
  if (d.smOpen && H.openIni) { e.preventDefault(); H.openIni(d.smOpen, b); return; }
290
304
  if (d.ivPrimary && H.primary) { e.preventDefault(); H.primary(d.ivPrimary, b); return; }
291
305
  if ('ivWf' in d && H.wf) { e.preventDefault(); H.wf(b); return; }
306
+ if ('ivPerson' in d && H.person) { e.preventDefault(); H.person(b); return; }
307
+ if ('ivStagepick' in d && H.stagePick) { e.preventDefault(); H.stagePick(b); return; }
308
+ if ('ivPlandates' in d && H.planDates) { e.preventDefault(); H.planDates(b); return; }
309
+ if ('ivJira' in d && H.jira) { e.preventDefault(); H.jira(b); return; }
292
310
  if (d.ivProgram && H.program) { e.preventDefault(); H.program(d.ivProgram, b); return; }
293
311
  if (d.ivDoc && H.doc) { e.preventDefault(); H.doc(d.ivDoc, b); return; }
294
312
  if ('ivDocs' in d && H.docs) { e.preventDefault(); H.docs(b); return; }
@@ -615,10 +615,11 @@ async function turnProgram(r) {
615
615
  say('Now a program · ' + r.title + '.');
616
616
  PG.openProgram(res.program.id);
617
617
  }
618
- /** The ⋯ items of an initiative in a program: Move out of it, Move to another program (pm/prog-move.js). The rows stay; the panel stays on it. */
618
+ /** The ⋯ "Program" entry (pm/prog-move.js programItem, batch 16 item 5c): move, leave, join or make a program. The rows stay; the panel stays on it. */
619
619
  function moveItems(r) {
620
- return PM.moveItems({ programs: () => PGS, ws: r.ws || M.board.ws || '', id: r.id, product: r.product || M.board.product || M.board.name || '', pmPost, say,
621
- reload: async () => { await loadPrograms(); load(); }, phone: () => PHONE.matches, stateOf: (p) => progState(p), openList: moveList });
620
+ return [PM.programItem({ programs: () => PGS, ws: r.ws || M.board.ws || '', id: r.id, product: r.product || M.board.product || M.board.name || '', pmPost, say,
621
+ reload: async () => { await loadPrograms(); load(); }, phone: () => PHONE.matches, stateOf: (p) => progState(p), openList: moveList,
622
+ turn: M.board.self ? null : () => turnProgram(r) })].filter(Boolean);
622
623
  }
623
624
  /** Split or merge (pm/split-merge.js; canvas XsmA1Menu, XsmA1Suggest): the context of one row. After the write the Board reads again and the
624
625
  * row the PM lands on (the new one after a split, the one that stays after a merge) is selected and open. */
@@ -8,6 +8,9 @@
8
8
  * o: { programs() GET /api/programs' list, ws the initiative's workspace, id, product the product group it lands in, pmPost, say(msg, undo)
9
9
  * the page's toast, reload() the page and its programs read again, openList(anchor, label, rows [{ label, sub, icon, go }]) the page's
10
10
  * small menu, phone() true on a phone, stateOf?(p) the program's state from programState }
11
+ * programItem(o) the ONE "Program" entry of the short initiative ⋯ (feedback batch 16 item 5c, canvas FmI1Menu): its note is the program
12
+ * it is in; a press opens one picker with the open programs (the current one marked), "No program" (the move out) and,
13
+ * in no program, "Make it a program" (o.turn()). A press on another program moves it there, or joins it. Every move has Undo.
11
14
  * outText(program, product, n, phone) the toast: "Moved out of Project Ascent · now under IDPF · off 1 milestone"; a phone says only
12
15
  * "Now under IDPF · off 1 milestone". Zero milestones is silence.
13
16
  *
@@ -44,6 +47,29 @@ export function moveItems(o) {
44
47
  return out;
45
48
  }
46
49
 
50
+ export function programItem(o) {
51
+ const L = (o.programs && o.programs()) || [], p = o.id ? programOf(L, o.ws || '', o.id) : null;
52
+ const open = L.filter((x) => x && !x.archived);
53
+ if (!p && !open.length && !o.turn) return null;
54
+ const rows = open.map((x) => (p && x.id === p.id ? { label: x.title, sub: 'Now', icon: LAYERS_ICON, on: true, go: () => {} }
55
+ : { label: x.title, sub: subOf(o, x), icon: LAYERS_ICON, go: () => (p ? moveInto(o, p, x) : join(o, x)) }));
56
+ if (p) rows.push({ label: 'No program', icon: OUT_ICON, go: () => moveOut(o, p) });
57
+ else if (o.turn) rows.push({ label: 'Make it a program', icon: LAYERS_ICON, go: () => o.turn() });
58
+ return { label: 'Program', note: p ? p.title : '', icon: LAYERS_ICON, on: (b) => o.openList(b, 'Program', rows) };
59
+ }
60
+ /** Join a program from no program; Undo leaves it again. */
61
+ async function join(o, to) {
62
+ const ws = o.ws || null;
63
+ const r = await o.pmPost('/api/programs/member', { ws, program: to.id, initiative: o.id }).catch(() => null);
64
+ if (!r || !r.ok) { o.say((r && r.error) || 'It did not join. The server did not say why.'); return; }
65
+ o.say('Now in ' + to.title, async () => {
66
+ const u = await o.pmPost('/api/programs/member', { ws, program: to.id, initiative: o.id, leave: true }).catch(() => null);
67
+ o.say(u && u.ok ? 'Out of ' + to.title + ' again.' : (u && u.error) || 'The undo did not land.');
68
+ await o.reload();
69
+ });
70
+ await o.reload();
71
+ }
72
+
47
73
  async function moveOut(o, p) {
48
74
  const ws = wsIn(p, o);
49
75
  const r = await o.pmPost('/api/programs/member', { ws, program: p.id, initiative: o.id, leave: true }).catch(() => null);
@@ -226,11 +226,12 @@ export function lineOf(r, o = {}) {
226
226
  });
227
227
  const skips = skipsOf(parts, P, B);
228
228
 
229
- // 8 the ◇s: the end ◇ is the committed end (a milestone task on that day, or the latest one in the workflow's last ◆ stage, IS it, at the
230
- // task's own date and with its own date under it: the timeline-label hotfix, as the Board); the others merge when they are within NEAR % of each other
229
+ // 8 the ◇s: the end ◇ is the committed end (a milestone task on that day, else the latest one in the workflow's last ◆ stage, else the
230
+ // latest milestone task of all, IS it, at the task's own date and with its own date under it: the timeline-label hotfixes, as the Board,
231
+ // "End always names a milestone"); the others merge when they are within NEAR % of each other
231
232
  const lastMs = (list.filter((s) => s.ms).slice(-1)[0] || {}).key;
232
233
  const inLast = lastMs ? MS.filter((m) => m.sec === lastMs) : [];
233
- const endTask = E && !draft ? (MS.filter((m) => +m.d === +E).slice(-1)[0] || inLast.slice(-1)[0] || null) : null;
234
+ const endTask = E && !draft ? (MS.filter((m) => +m.d === +E).slice(-1)[0] || inLast.slice(-1)[0] || MS.slice().sort((a, b) => a.d - b.d).pop() || null) : null;
234
235
  const clash = openHold && openHold.kind === 'open' && E && openHold.b > E ? md(openHold.b, t) : '';
235
236
  const L = MS.filter((m) => !endTask || m.id !== endTask.id);
236
237
  const reach = Math.max(1, Math.round(((D1 - D0) / DAY) * (NEAR / 100)));
@@ -28,7 +28,6 @@
28
28
  <button type="button" class="hm-ib hm-back" id="hmBack" aria-label="Back to Today" title="Back to Today"><svg viewBox="0 0 24 24" width="18" height="18" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M19 12H5M11 6l-6 6 6 6"/></svg></button>
29
29
  <div class="hm-top-t"><b id="hmTopTitle">Home</b><span id="hmTopSub"></span></div>
30
30
  <button type="button" class="hm-needs" id="hmNeeds" aria-controls="hmList" aria-expanded="false"><i aria-hidden="true"></i><span id="hmNeedsN">Reading</span></button>
31
- <button type="button" class="hm-ib" id="hmMoreP" aria-haspopup="menu" aria-label="More" title="More"><svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="6" cy="12" r="1.4"/><circle cx="12" cy="12" r="1.4"/><circle cx="18" cy="12" r="1.4"/></svg></button>
32
31
  </header>
33
32
  <main class="hm-desk" id="hmDesk">
34
33
  <aside class="hm-list" id="hmList" aria-label="Sessions"></aside>
@@ -124,7 +124,7 @@ async function pure() {
124
124
  const card = (p) => p.evaluate((v) => {
125
125
  const c = document.querySelector(v + ' .iv-sc'); const t = (n) => (n ? n.textContent.replace(/\s+/g, ' ').trim() : '');
126
126
  const parts = [...c.querySelectorAll('.iv-tl .iv-tlp')], keys = [...new Set(parts.map((x) => x.dataset.ivStage))], go = c.querySelector('.iv-scgo');
127
- return { head: t(c.querySelector('.iv-sch')), stage: t(c.querySelector('.iv-sch > b')), bars: keys.length + c.querySelectorAll('.iv-tl .iv-tl-sk').length, now: new Set(parts.filter((x) => x.classList.contains('now')).map((x) => x.dataset.ivStage)).size,
127
+ 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]'), bars: keys.length + c.querySelectorAll('.iv-tl .iv-tl-sk').length, now: new Set(parts.filter((x) => x.classList.contains('now')).map((x) => x.dataset.ivStage)).size,
128
128
  titles: keys.map((k) => parts.find((x) => x.dataset.ivStage === k).title), steps: document.querySelectorAll(v + ' .cz-sl').length, pri: document.querySelectorAll(v + ' [data-iv-primary]').length,
129
129
  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]'), ms: !!(go && go.dataset.ms), ready: !!(go && go.classList.contains('on')), clock: t(c.querySelector('.iv-clk')), late: !!c.querySelector('.iv-clk.w') };
130
130
  }, V);
@@ -141,6 +141,15 @@ async function pure() {
141
141
  ok('D1 the → names ◆ Deliver, the next stage', c.next && /^Next: ◆ Deliver\. Move to Deliver$/.test(c.tail) && c.ms, c.tail);
142
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.head), c.head);
143
143
  await shot(p, 'desk-build', V + ' .iv-sc');
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)
145
+ ok('D1 batch 16 item 5c: the stage is a chip that changes it', c.chip, JSON.stringify(c));
146
+ await p.click(V + ' [data-iv-stagepick]');
147
+ const sp = await until(() => p.evaluate(() => { const el = document.querySelector('.hi-pop'); if (!el) return null;
148
+ return { st: [...el.querySelectorAll('[data-sp-go]')].map((b) => b.textContent.replace(/\s+/g, ' ').trim()), now: (el.querySelector('[data-sp-go][aria-checked="true"]') || {}).textContent || '', sw: !!el.querySelector('[data-sp-auto][role="switch"]'),
149
+ life: [...el.querySelectorAll('[data-sp-life]')].map((b) => b.textContent.trim()), text: el.textContent }; }));
150
+ ok('D1 batch 16 item 5c: the stage picker lists the stages with Build marked now, and the switch', sp && sp.st.length >= 5 && /Build/.test(sp.now) && sp.sw, JSON.stringify(sp));
151
+ ok('D1 batch 16 item 5c: under them Put on hold, Won’t do and Archive; Cancel merged into Won’t do', sp && sp.life.join('|') === 'Put on hold|Won’t do|Archive' && !/Cancel/.test(sp.text), JSON.stringify(sp));
152
+ await p.keyboard.press('Escape');
144
153
  // the move popover opens under the next-stage line
145
154
  await p.click(V + ' [data-iv-next]');
146
155
  const pop = await until(() => p.evaluate((v) => { const el = document.querySelector('.hi-pop'); const a = document.querySelector(v + ' [data-iv-next]'); if (!el || !a) return null; const r = el.getBoundingClientRect(), ar = a.getBoundingClientRect();
@@ -49,6 +49,7 @@ const ITEMS = [
49
49
  it('scarlet', 'task-faq', 'Support FAQ', { section: 'evaluate', end: null }),
50
50
  it('passkey', 'task-late', 'Beta to staff', { start: '2026-10-01', end: '2026-10-16' }),
51
51
  it('passkey', 'task-pk2', 'Rollout 50%', { end: '2026-12-18' }),
52
+ it('recovery', 'task-c0', 'Codes drafted', { end: '2027-02-27' }),
52
53
  it('recovery', 'task-c1', 'Codes live', { end: '2027-03-02' }),
53
54
  it('recovery', 'task-c2', 'Support FAQ live', { end: '2027-03-06' }),
54
55
  it('recovery', 'task-wont', 'Dropped', { end: '2027-02-01', status: "Won't do" }),
@@ -105,13 +106,13 @@ const ITEMS = [
105
106
  const pk = await rowOf(p, 'board:passkey');
106
107
  ok('B a late milestone: an orange outline, and the row\'s dot turns orange', pk && /tg-tm late\|Beta to staff · Oct 16 · late/.test(pk.tm[0]) && !pk.tml.length && /cz-dot late/.test(pk.dot), JSON.stringify(pk));
107
108
  const rc = await rowOf(p, 'board:recovery');
108
- ok('M two milestones four days apart merge into one counted ◇; Won\'t do is not drawn', rc && rc.tm.length === 0 && rc.tmc.length === 1 && /^tg-tmc\|2\|task-c1 task-c2$/.test(rc.tmc[0]) && !rc.tml.length, JSON.stringify(rc));
109
+ ok('M two milestones three days apart merge into one counted ◇; the latest is the end ◇; Won\'t do is not drawn', rc && rc.tm.length === 0 && rc.tmc.length === 1 && /^tg-tmc\|2\|task-c0 task-c1$/.test(rc.tmc[0]) && /Support FAQ live · Mar 6/.test(rc.end) && !rc.tml.length, JSON.stringify(rc));
109
110
  const lg = await p.evaluate(() => (document.querySelector('#bdChipset .tg-lgd') || document.querySelector('.tg-lgd') || {}).textContent || '');
110
111
  ok('B the legend says Milestone, not "Deliver or Evaluate"', /Milestone/.test(lg) && !/Deliver or Evaluate/.test(lg), lg);
111
112
  await shot(p, 'milestones-board-1440');
112
113
  await p.click('#ibBody [data-row="board:recovery"] .tg-tmc');
113
114
  const list = await p.evaluate(() => { const m = document.querySelector('.tg-msp'); return m ? [...m.querySelectorAll('[data-ms-open]')].map((b) => b.textContent) : null; });
114
- ok('M the counted ◇ lists its milestones right under it: ◇, name, date', list && list.join('|') === 'Codes liveMar 2|Support FAQ liveMar 6', JSON.stringify(list));
115
+ ok('M the counted ◇ lists its milestones right under it: ◇, name, date', list && list.join('|') === 'Codes draftedFeb 27|Codes liveMar 2', JSON.stringify(list));
115
116
  await shot(p, 'milestones-board-list-1440');
116
117
  await p.keyboard.press('Escape');
117
118
  ok('M Escape closes the list', await p.evaluate(() => !document.querySelector('.tg-msp')));
@@ -123,7 +124,7 @@ const ITEMS = [
123
124
  {
124
125
  const { ctx, page: p } = await open({ mode: 'pinned' });
125
126
  const sc = await rowOf(p, 'board:scarlet'), pk = await rowOf(p, 'board:passkey');
126
- ok('D by default only the last milestone shows: Scarlet\'s is its end ◇ (no ◇ in the middle), Passkey\'s last task keeps its ◇', sc && !sc.tm.length && !sc.tmc.length && /KPI evaluated/.test(sc.end) && pk && pk.tm.length === 1 && /Rollout 50%/.test(pk.tm[0]), JSON.stringify([sc, pk]));
127
+ ok('D by default only the last milestone shows: Scarlet\'s is its end ◇ (no ◇ in the middle), so is Passkey\'s last task (hotfix 2: the end always names a milestone)', sc && !sc.tm.length && !sc.tmc.length && /KPI evaluated/.test(sc.end) && pk && !pk.tm.length && /Rollout 50%/.test(pk.end), JSON.stringify([sc, pk]));
127
128
  await ctx.close();
128
129
  }
129
130