create-pmos 0.421.0 → 0.423.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 (112) 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/scripts/anchor-resolve.js +93 -15
  6. package/payload/state/discoveries.md +1 -1
  7. package/workspace/board-programs-test.js +87 -3
  8. package/workspace/briefing-premium-adddoc-test.js +1 -1
  9. package/workspace/briefing-premium-board-test.js +13 -11
  10. package/workspace/briefing-premium-initiative-test.js +30 -38
  11. package/workspace/changelog.json +24 -0
  12. package/workspace/fixtures/report-api/draft.json +2 -1
  13. package/workspace/guide/briefing-premium.md +2 -1
  14. package/workspace/guide/home.md +14 -4
  15. package/workspace/guide/programs.md +5 -3
  16. package/workspace/guide/workflows.md +5 -1
  17. package/workspace/home-other-product-test.js +55 -0
  18. package/workspace/ini-workflow-test.js +4 -4
  19. package/workspace/lib/board-premium.js +21 -6
  20. package/workspace/lib/custom-docs.js +65 -3
  21. package/workspace/lib/doc-live-root.js +37 -0
  22. package/workspace/lib/engine/anchor-resolve.js +93 -15
  23. package/workspace/lib/engine/boards.js +30 -2
  24. package/workspace/lib/engine/intake.js +1 -1
  25. package/workspace/lib/hold-spans.js +24 -10
  26. package/workspace/lib/initiative-writer.js +63 -1
  27. package/workspace/lib/kg.js +1 -1
  28. package/workspace/lib/plan-items.js +36 -5
  29. package/workspace/lib/programs.js +11 -3
  30. package/workspace/lib/report-draft.js +3 -0
  31. package/workspace/lib/route-modules.js +2 -0
  32. package/workspace/lib/routes-board-premium.js +28 -0
  33. package/workspace/lib/routes-boards.js +92 -13
  34. package/workspace/lib/routes-doc-sheet.js +29 -1
  35. package/workspace/lib/routes-initiatives.js +12 -0
  36. package/workspace/lib/routes-programs.js +44 -5
  37. package/workspace/lib/routes-task-links.js +329 -0
  38. package/workspace/lib/routes-task-plans.js +333 -0
  39. package/workspace/lib/split-merge-suggest.js +162 -0
  40. package/workspace/lib/split-merge.js +379 -0
  41. package/workspace/lib/task-cli.js +73 -13
  42. package/workspace/lib/task-items.js +15 -3
  43. package/workspace/lib/task-links.js +422 -0
  44. package/workspace/lib/task-plans.js +232 -0
  45. package/workspace/lib/vendor/scripts/anchor-resolve.js +93 -15
  46. package/workspace/lib/vendor/scripts/intake.js +1 -1
  47. package/workspace/package-lock.json +2 -2
  48. package/workspace/package.json +1 -1
  49. package/workspace/premium-board-actions-test.js +2 -2
  50. package/workspace/premium-core-doc-issue-test.js +2 -2
  51. package/workspace/premium-vw-backlog-test.js +3 -3
  52. package/workspace/premium-vw-doc-test.js +26 -3
  53. package/workspace/premium-vw-item-test.js +3 -3
  54. package/workspace/premium-vw-jira-test.js +6 -6
  55. package/workspace/product-lane-test.js +165 -0
  56. package/workspace/program-leave-test.js +203 -0
  57. package/workspace/program-panel-test.js +1 -1
  58. package/workspace/public/pm/bd-acts.js +5 -2
  59. package/workspace/public/pm/bd-ini-panel.js +32 -9
  60. package/workspace/public/pm/bd-prog-panel.js +22 -7
  61. package/workspace/public/pm/bd-prog.js +6 -1
  62. package/workspace/public/pm/bd-span.js +234 -30
  63. package/workspace/public/pm/bd-views.js +3 -2
  64. package/workspace/public/pm/cozy-board.css +90 -0
  65. package/workspace/public/pm/cozy-home.css +3 -0
  66. package/workspace/public/pm/doc-follow.js +36 -0
  67. package/workspace/public/pm/home-app.js +62 -14
  68. package/workspace/public/pm/home-ini-model.js +0 -34
  69. package/workspace/public/pm/home-ini.js +81 -204
  70. package/workspace/public/pm/home-list.js +2 -2
  71. package/workspace/public/pm/home-today.js +3 -1
  72. package/workspace/public/pm/ini-groups.js +228 -0
  73. package/workspace/public/pm/ini-links.js +561 -0
  74. package/workspace/public/pm/ini-tasks.js +131 -30
  75. package/workspace/public/pm/ini-versions.js +348 -0
  76. package/workspace/public/pm/ini-view-model.js +113 -43
  77. package/workspace/public/pm/ini-view.css +341 -18
  78. package/workspace/public/pm/ini-view.js +153 -38
  79. package/workspace/public/pm/premium-board.js +160 -21
  80. package/workspace/public/pm/premium-report-read.js +20 -1
  81. package/workspace/public/pm/premium-shell.js +29 -4
  82. package/workspace/public/pm/premium-vw-doc.js +46 -11
  83. package/workspace/public/pm/prog-move.js +69 -0
  84. package/workspace/public/pm/split-merge.css +77 -0
  85. package/workspace/public/pm/split-merge.js +265 -0
  86. package/workspace/public/pm/stage-line.js +414 -0
  87. package/workspace/public/pm/task-card.css +3 -0
  88. package/workspace/public/pm/task-card.js +15 -6
  89. package/workspace/public/pm/wf-page.css +2 -0
  90. package/workspace/public/pm/wf-page.js +2 -0
  91. package/workspace/public/pm/wf-stage.js +2 -1
  92. package/workspace/server.js +15 -1
  93. package/workspace/split-merge-ui-test.js +175 -0
  94. package/workspace/stage-card-test.js +12 -11
  95. package/workspace/task-card-test.js +3 -2
  96. package/workspace/task-delete-test.js +126 -0
  97. package/workspace/task-links-test.js +227 -0
  98. package/workspace/task-milestones-test.js +176 -0
  99. package/workspace/task-plans-test.js +181 -0
  100. package/workspace/task-views-test.js +3 -3
  101. package/workspace/test-lists/bd-ini-panel.json +8 -2
  102. package/workspace/test-lists/product-lane.json +6 -0
  103. package/workspace/test-lists/program-leave.json +6 -0
  104. package/workspace/test-lists/split-merge.json +15 -0
  105. package/workspace/test-lists/task-delete.json +5 -0
  106. package/workspace/test-lists/task-links.json +6 -0
  107. package/workspace/test-lists/task-milestones.json +6 -0
  108. package/workspace/test-lists/task-plans.json +6 -0
  109. package/workspace/test-lists/viewer-live-file.json +9 -0
  110. package/workspace/timeline-holds-test.js +61 -4
  111. package/workspace/tk-tasks-test.js +173 -57
  112. package/workspace/workflows-setup-test.js +4 -3
@@ -40,7 +40,7 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
40
40
  const mk = (o) => IP.build(F.facts(o));
41
41
  const BOARD = BP.build(BF.facts());
42
42
  const BRIEF = BRP.build(BRF.facts());
43
- const WRITES = /^\/api\/(?:boards\/(?:move|tasks\/(?:add|state))|lifecycle|core-docs\/draft)$/;
43
+ const WRITES = /^\/api\/(?:boards\/(?:move|tasks\/(?:add|state))|lifecycle|core-docs\/draft|task-plans\/propose)$/;
44
44
 
45
45
  (async () => {
46
46
  const exe = findBrowser();
@@ -74,14 +74,20 @@ const WRITES = /^\/api\/(?:boards\/(?:move|tasks\/(?:add|state))|lifecycle|core-
74
74
  // initiative reads, its card from the record (the ladder). Before the record reads, the page says it is reading.
75
75
  async function ready(page, full = true) { return until(() => page.evaluate((f) => /·/.test((document.querySelector('#czViewer:not([hidden]) .cz-vw-kind') || {}).textContent || '') && (!f || (!!document.querySelector('#czViewer .iv-sc') && !!((document.querySelector('#czViewer .iv-sch > b') || {}).textContent || '').trim())), full), 30000); }
76
76
  const txt = (p, s) => p.evaluate((q) => ((document.querySelector(q) || {}).textContent || '').replace(/\s+/g, ' ').trim(), s);
77
- // the Overview opens on Tasks; a phone keeps the Tasks, Documents and Stage switch, and in shell A on a desktop the other views sit under ⋯ (XvATasks); view names the one to show
78
- const LABEL = { tasks: 'Tasks', docs: 'Documents', stage: 'Stage' };
77
+ // batch 11 item 20: the page holds the Tasks (the old All tasks panel is gone); its ⋯ holds Move to a stage and its Documents fold opens
78
+ // Documents; the Stage and Documents views hold each other under ⋯; ← goes back to the page. view names the one to show ('tasks' is the page)
79
+ const LABEL = { docs: 'Documents', stage: 'Stage' };
80
+ const onPage = (p) => p.evaluate((v) => !!document.querySelector(v + ' [data-hi-v="page"]'), V);
79
81
  const show = async (p, view) => {
80
- if (await p.evaluate((a) => !!document.querySelector(a[0] + ` [data-hi-view="${a[1]}"]`), [V, view])) await p.click(`${V} [data-hi-view="${view}"]`);
81
- else { await p.click('#czViewer [data-cz-vw="more"]'); await until(() => p.evaluate(() => !!document.querySelector('#czViewer .cz-vw-menu'))); await p.click(`#czViewer .cz-vw-menu [role="menuitem"]:has(> span:first-child:text-is("${LABEL[view]}"))`); }
82
+ if (view === 'tasks') { for (let i = 0; i < 4 && !(await onPage(p)); i++) { await p.click('#czViewer [data-cz-vw="back"]'); await sleep(150); } return until(() => onPage(p)); }
83
+ if (await onPage(p) && view === 'docs') await p.click(`${V} [data-iv-docs]`);
84
+ else {
85
+ await p.click('#czViewer [data-cz-vw="more"]'); await until(() => p.evaluate(() => !!document.querySelector('#czViewer .cz-vw-menu')));
86
+ await p.click(`#czViewer .cz-vw-menu [role="menuitem"]:has(> span:first-child:text-is("${(await onPage(p)) ? 'Move to a stage' : LABEL[view]}"))`);
87
+ }
82
88
  return until(() => p.evaluate((a) => !!document.querySelector(a[0] + ` [data-hi-v="${a[1]}"]`), [V, view])); };
83
89
  const moreLabels = (p) => p.evaluate(async () => { const b = document.querySelector('#czViewer [data-cz-vw="more"]'); if (!b) return []; b.click(); await new Promise((r) => setTimeout(r, 50)); const m = document.querySelector('#czViewer .cz-vw-menu'); const out = m ? [...m.querySelectorAll('[role="menuitem"] span:first-of-type')].map((x) => x.textContent) : []; b.click(); return out; });
84
- // the initiative's page first (its list row opens it again when something else is shown), then Tasks from the page's + (HbCDrill)
90
+ // the initiative's page first (its list row opens it again when something else is shown), then the view asked for
85
91
  const overview = async (p, view = 'stage') => {
86
92
  if (!(await p.evaluate((v) => !!document.querySelector(v + ' [data-hi-v="page"]'), V))) {
87
93
  if (!(await p.evaluate(() => { const b = document.querySelector('#hmList [data-hm-sel="i:self-serve-v2"]'); return !!b && !!b.offsetParent; }))) await p.click('#hmNeeds');
@@ -89,8 +95,6 @@ const WRITES = /^\/api\/(?:boards\/(?:move|tasks\/(?:add|state))|lifecycle|core-
89
95
  }
90
96
  const s = await until(() => p.evaluate((v) => { const o = document.querySelector(v); if (!o) return null; if (o.querySelector('[data-hi-v="page"]')) return 'ok'; return /could not be read/.test(o.textContent) ? 'err' : null; }, V), 30000);
91
97
  if (s !== 'ok') return !!s;
92
- await p.click('#czViewer [data-cz-vw="more"]').then(() => p.click('.cz-vw-menu [role="menuitem"]:has(> span:first-child:text-is("All tasks"))'));
93
- await until(() => p.evaluate((v) => !!document.querySelector(v + ' [data-hi-v="tasks"]'), V));
94
98
  if (view && view !== 'tasks') await show(p, view);
95
99
  return true; };
96
100
  const writes = (X) => X.posts.filter((x) => WRITES.test(x.path));
@@ -121,12 +125,12 @@ const WRITES = /^\/api\/(?:boards\/(?:move|tasks\/(?:add|state))|lifecycle|core-
121
125
 
122
126
  /* I3 header and the ONE view (batch 6 items 1 and 3: the Board's panel draws the same; stage-card-test.js holds the stage card's behaviour) */
123
127
  const card = await p.evaluate(() => { const c = document.querySelector('#czViewer .iv-sc'), iv = document.querySelector('#czViewer .iv'); const q = (s, r = c) => ((r.querySelector(s) || {}).textContent || '').replace(/\s+/g, ' ').trim(), d = (s) => ((document.querySelector(s) || {}).textContent || '').trim();
124
- return { kind: d('#czViewer .cz-vw-kind'), title: d('#czVwTitle'), stage: q('.iv-sch > b'), where: q('.iv-sch .iv-r'), bars: c.querySelectorAll('.iv-lad i').length, now: c.querySelectorAll('.iv-lad i.now').length, tail: q('.iv-nx'), ms: !!c.querySelector('.iv-nx .iv-nd.ms'),
128
+ return { kind: d('#czViewer .cz-vw-kind'), title: d('#czVwTitle'), stage: q('.iv-sch > b'), where: q('.iv-scm'), bars: new Set([...c.querySelectorAll('.iv-tl .iv-tlp')].map((x) => x.dataset.ivStage)).size + c.querySelectorAll('.iv-tl .iv-tl-sk').length, now: new Set([...c.querySelectorAll('.iv-tl .iv-tlp.now')].map((x) => x.dataset.ivStage)).size, tail: (c.querySelector('.iv-scgo') || { getAttribute: () => '' }).getAttribute('aria-label') || '', ms: !!c.querySelector('.iv-scgo[data-ms]'),
125
129
  pri: iv.querySelectorAll('[data-iv-primary]').length, cta: !!iv.querySelector('[data-hm-cta]'), tasks: q('.iv-th', iv), empty: !!iv.querySelector('.iv-empty'), secs: [...iv.querySelectorAll('.iv-ws b')].map((b) => b.textContent), meta: q('.iv-meta', iv) }; });
126
130
  ok('I3 the page\'s header names the initiative, its workflow and its anchor (D99)', card.title === 'Self-serve onboarding v2' && /^Product feature · \S/.test(card.kind), JSON.stringify(card));
127
- ok('I3 the card shows the stage the workflow engine derives, with one bar a step and the current one marked', card.stage === 'Build' && card.bars === 8 && card.now === 1, JSON.stringify(card));
131
+ ok('I3 the card shows the stage the workflow engine derives, with one part a stage on its line and the current one marked', card.stage === 'Build' && card.bars === 8 && card.now === 1, JSON.stringify(card));
128
132
  ok('I1 the summary leads with at most one primary; the card holds no step list; Tasks is the WBS by stage', card.pri <= 1 && !card.cta && /^Tasks/.test(card.tasks) && (card.secs.length > 0 || card.empty) && !/pull request|builder agent/i.test(card.secs.join(' ')), JSON.stringify(card));
129
- ok('I1 the card ends on the next stage', /^Deliver/.test(card.tail), JSON.stringify(card));
133
+ ok('I1 the card\'s → names the next stage', /^Next: ◆ Deliver/.test(card.tail), JSON.stringify(card));
130
134
  ok('I3 Deliver is a milestone: the next stage carries the ◆ mark (Agreed design AgInitAgents)', card.ms, JSON.stringify(card));
131
135
  ok('I1 the card wrote nothing on its own', writes(A).length === 0, JSON.stringify(writes(A)));
132
136
 
@@ -138,24 +142,17 @@ const WRITES = /^\/api\/(?:boards\/(?:move|tasks\/(?:add|state))|lifecycle|core-
138
142
  ok('I7 a file opens as its page in the Viewer, not a dialog', await until(() => p.evaluate((v) => !!document.querySelector(v + ' .obody.vw[data-vw="doc:planning/prd/self-serve-v2-prd.md"]') && !(document.querySelector('#dlg') && !!document.querySelector('#dlg.on')), V), 15000));
139
143
 
140
144
  /* I4 the Overview */
141
- const i4 = await overview(p, null) && await p.evaluate((v) => /Tasks/.test(document.querySelector('#czViewer .cz-vw-kind').textContent) && !document.querySelector(v + ' [data-hi-view]') && !document.querySelector(v + ' .hx-wait'), V);
142
- const i4m = await moreLabels(p);
143
- ok('I4 All tasks under ⋯ opens the initiative\'s Tasks, with Documents and Stage under ⋯ on a desktop (XvATasks), and no Waiting for design marker', i4 && ['Group tasks by', 'Documents', 'Stage', 'Open the full record'].every((l) => i4m.includes(l)), JSON.stringify(i4m));
144
- const tk = await p.evaluate((v) => { const o = document.querySelector(v); return { tasks: [...o.querySelectorAll('[data-ov-tkrow]')].map((r) => r.dataset.ovTkrow).sort(), checks: [...o.querySelectorAll('button[data-hi-chk]')].map((b) => b.dataset.hiChk).sort() }; }, V);
145
- await p.click('#czViewer [data-cz-vw="back"]');
146
- ok('I4 ← from Tasks comes back to the page (HbCDrill)', await until(() => p.evaluate((v) => !!document.querySelector(v + ' [data-hi-v="page"]'), V)));
145
+ const i4 = await overview(p, null) && await until(() => p.evaluate((v) => !!document.querySelector(v + ' [data-hi-v="page"] .iv-th [data-iv-add]') && !document.querySelector(v + ' [data-hi-view]') && !document.querySelector(v + ' .hx-wait'), V));
146
+ ok('I4 the page holds the Tasks with its +, and no All tasks switch (batch 11 item 20), and no Waiting for design marker', !!i4);
147
147
  ok('I4 the card has no Overview tile: the chat box on the page talks about the initiative (stage card D)', await p.evaluate((v) => !document.querySelector(v + ' .iv [data-hm-ov]') && /^Message Claude about Self-serve onboarding v2/.test(document.querySelector('#hmIn').placeholder), V));
148
148
  const pm = await moreLabels(p);
149
- ok('I4 the page\'s ⋯ holds the stage switch, the stakeholder, the program, the Board and the record, then hold and cancel last (HbCMore)', ['All tasks', 'Moves on by itself', 'Add a stakeholder', 'Turn into a program', 'Open on the Board', 'The record', 'Put on hold', 'Cancel the initiative'].every((l) => pm.includes(l)) && pm[pm.length - 1] === 'Cancel the initiative', JSON.stringify(pm));
150
- await p.click('#czViewer [data-cz-vw="more"]').then(() => p.click('.cz-vw-menu [role="menuitem"]:has(> span:first-child:text-is("All tasks"))'));
151
- await until(() => p.evaluate((v) => !!document.querySelector(v + ' [data-hi-v="tasks"]'), V));
149
+ ok('I4 the page\'s ⋯ holds the stage switch, the stakeholder, the program, the Board and the record, then hold and cancel last (HbCMore)', ['Move to a stage', 'Moves on by itself', 'Add a stakeholder', 'Turn into a program', 'Open on the Board', 'The record', 'Put on hold', 'Cancel the initiative'].every((l) => pm.includes(l)) && !pm.includes('All tasks') && pm[pm.length - 1] === 'Cancel the initiative', JSON.stringify(pm));
152
150
  await show(p, 'stage');
153
151
  const st = await p.evaluate((v) => { const o = document.querySelector(v); return { moves: [...o.querySelectorAll('[data-ov-move]')].map((b) => b.dataset.ovMove), cur: (o.querySelector('[data-ov-move][aria-pressed="true"]') || {}).textContent, life: [...o.querySelectorAll('[data-ov-life]')].map((b) => b.dataset.ovLife) }; }, V);
154
152
  await show(p, 'docs');
155
153
  const ov = await p.evaluate((v) => { const o = document.querySelector(v); return { docs: [...o.querySelectorAll('[data-ov-doc]')].map((d) => d.dataset.ovDoc).sort(), draft: [...o.querySelectorAll('[data-ov-draft], [data-czs-act^="draft:"], [data-ov-none]')].map((b) => b.dataset.ovDraft || b.dataset.ovNone || b.dataset.czsAct.slice(6)).sort(), pri: ((o.querySelector('.czs-pri[data-czs-act^="draft:"]') || {}).dataset || {}).czsAct || '', drafting: [...o.querySelectorAll('[data-ov-doc]')].filter((d) => /Drafting/.test(d.textContent)).map((d) => d.dataset.ovDoc), dread: [...o.querySelectorAll('[data-ov-dread]')].map((b) => b.dataset.ovDread), sum: (o.querySelector('[data-ov-dsum]') || {}).textContent || '' }; }, V);
156
154
  const M = mk();
157
155
  ok('I4 the Stage view lists the board\'s stages with the current one pressed, and the lifecycle presses', JSON.stringify(st.moves) === JSON.stringify(M.acts.stages) && st.cur === 'Build' && st.life.join() === 'on-hold,cancelled', JSON.stringify(st));
158
- ok('I6 the tasks are the record\'s, and only a PMOS task has a check box it can change', JSON.stringify(tk.tasks) === JSON.stringify(M.tasks.rows.map((t) => t.key).sort()) && JSON.stringify(tk.checks) === JSON.stringify(M.tasks.rows.filter((t) => t.pmos && t.uid).map((t) => t.key).sort()), JSON.stringify(tk));
159
156
  ok('I7 the core documents are the non-technical ones, with the engine\'s summary', JSON.stringify(ov.docs) === JSON.stringify(M.docs.rows.filter((d) => !d.tech).map((d) => d.key).sort()) && ov.sum === M.docs.cap, JSON.stringify(ov));
160
157
  ok('I7 a document not started offers Draft it (the summary\'s one primary drafts the first, the rest offer it from their row); a running one says Drafting and has no press; a draft offers Read', /^draft:(problem|research)$/.test(ov.pri) && [...new Set(ov.draft)].filter((k) => k === 'problem' || k === 'research').sort().join() === 'problem,research' && ov.drafting.join() === 'launch' && ov.dread.length === M.docs.rows.filter((d) => !d.tech && d.st === 'draft' && d.path && d.slot).length, JSON.stringify(ov));
161
158
 
@@ -174,21 +171,16 @@ const WRITES = /^\/api\/(?:boards\/(?:move|tasks\/(?:add|state))|lifecycle|core-
174
171
  await p.fill(`${V} #ovWhy`, 'Waiting on legal'); await settle(() => p.click(`${V} [data-ov-life-go]`));
175
172
  const lf = await until(() => A.posts.find((x) => x.path === '/api/lifecycle'));
176
173
  ok('I10 Record posts the state and the reason to the lifecycle route', lf && lf.body.initiative_id === 'self-serve-v2' && lf.body.state === 'on-hold' && lf.body.reason === 'Waiting on legal' && lf.body.ws === 'w1', JSON.stringify(lf && lf.body));
177
- await show(p, 'tasks');
178
- await until(() => p.evaluate((v) => !!document.querySelector(v + ' #ovTask'), V));
179
- await p.click(`${V} [data-ov-add]`); await sleep(200);
174
+ await show(p, 'tasks'); // the page's + opens the add field in Tasks (batch 11 item 20)
175
+ await p.click(`${V} [data-iv-add]`);
176
+ await until(() => p.evaluate((v) => !!document.querySelector(v + ' #ivAddTask'), V));
177
+ await p.press(`${V} #ivAddTask`, 'Enter'); await sleep(200);
180
178
  ok('I6 Add with no title posts nothing', !A.posts.some((x) => x.path === '/api/boards/tasks/add'));
181
- await p.fill(`${V} #ovTask`, 'Release plan'); await settle(() => p.click(`${V} [data-ov-add]`));
182
- const ad = await until(() => A.posts.find((x) => x.path === '/api/boards/tasks/add'));
183
- ok('I10 Add posts the workspace, the board, this initiative and the title to the board\'s own route', ad && ad.body.ws === 'w1' && ad.body.board === 'w1' && ad.body.initiative === 'self-serve-v2' && ad.body.title === 'Release plan', JSON.stringify(ad && ad.body));
184
- // a PMOS task's status is in its row's menu (InTasks)
185
- const pk = M.tasks.rows.find((t) => t.pmos && t.uid).key;
186
- await until(() => p.evaluate((a) => !!document.querySelector(a[0] + ` [data-hi-tmore="${a[1]}"]`), [V, pk]));
187
- await p.click(`${V} [data-hi-tmore="${pk}"]`);
188
- await until(() => p.evaluate(() => !!document.querySelector('.hi-pop[role="menu"]')));
189
- await settle(() => p.click('.hi-pop[role="menu"] [role="menuitemradio"]:has(> span:first-child:text-is("In progress"))'));
190
- const ts = await until(() => A.posts.find((x) => x.path === '/api/boards/tasks/state'));
191
- ok('I10 a status change posts the board, the task and the state, and nothing else', ts && Object.keys(ts.body).sort().join() === 'board,state,task,ws' && ts.body.state === 'In progress', JSON.stringify(ts && ts.body));
179
+ await p.fill(`${V} #ivAddTask`, 'Release plan'); await settle(() => p.press(`${V} #ivAddTask`, 'Enter'));
180
+ const ad = await until(() => A.posts.find((x) => x.path === '/api/task-plans/propose'));
181
+ // an initiative with no Live task: the page's add starts a proposal (batch 11 item 8), it never writes the board's tasks directly
182
+ ok('I10 Add on a page with no Live task proposes the task: the workspace, this initiative and the title', ad && ad.body.ws === 'w1' && ad.body.initiative === 'self-serve-v2' && ad.body.title === 'Release plan' && !A.posts.some((x) => x.path === '/api/boards/tasks/add'), JSON.stringify(ad && ad.body));
183
+ // a task's quick status on the page is covered by task-views-test.js (batch 9 item 5b); this record's page draws no task rows
192
184
  await show(p, 'docs');
193
185
  await until(() => p.evaluate((v) => !!document.querySelector(v + ' .czs-pri[data-czs-act^="draft:"]'), V));
194
186
  const first = await p.evaluate((v) => document.querySelector(v + ' .czs-pri[data-czs-act^="draft:"]').dataset.czsAct.slice(6), V);
@@ -228,13 +220,13 @@ const WRITES = /^\/api\/(?:boards\/(?:move|tasks\/(?:add|state))|lifecycle|core-
228
220
  {
229
221
  const N = await open({ w: 390, h: 844 });
230
222
  await overview(N.page, null);
231
- ok('I4 a phone keeps the Tasks, Documents and Stage switch (PgTkList)', await N.page.evaluate((v) => [...document.querySelectorAll(v + ' [data-hi-view]')].map((b) => b.textContent).join() === 'Tasks,Documents,Stage', V));
223
+ ok('I4 a phone draws no Tasks, Documents and Stage switch: the Tasks sit on the page (batch 11 item 20)', await until(() => N.page.evaluate((v) => !!document.querySelector(v + ' [data-hi-v="page"] .iv-th') && !document.querySelector(v + ' [data-hi-view]'), V)));
232
224
  const fls = [];
233
- for (const view of ['tasks', 'docs', 'stage']) {
225
+ for (const view of ['docs', 'stage']) { // the page's own floors (its Tasks too) are the page suites' (tk-tasks-test.js G4)
234
226
  await show(N.page, view);
235
227
  fls.push(await N.page.evaluate((a) => { const o = document.querySelector(a[0]); const small = [...o.querySelectorAll('button, select, input')].filter((b) => b.offsetParent && b.getBoundingClientRect().height < 44).map((b) => b.textContent.trim().slice(0, 24) || b.id || b.getAttribute('aria-label') || b.tagName); return { view: a[1], over: document.documentElement.scrollWidth - innerWidth, small }; }, [V, view]));
236
228
  }
237
- ok('I12 at 390 px the Overview\'s Tasks, Documents and Stage have no sideways scroll and every target is 44 px', fls.every((fl) => fl.over <= 0 && fl.small.length === 0), JSON.stringify(fls));
229
+ ok('I12 at 390 px the Overview\'s Documents and Stage have no sideways scroll and every target is 44 px', fls.every((fl) => fl.over <= 0 && fl.small.length === 0), JSON.stringify(fls));
238
230
  ok('I12 no page error at 390 px', N.errors.length === 0, N.errors.join(' | '));
239
231
  await N.ctx.close();
240
232
  }
@@ -1,4 +1,28 @@
1
1
  [
2
+ {
3
+ "v": "0.423.0",
4
+ "at": "2026-10-26T16:10:21.071Z",
5
+ "f": 2,
6
+ "prs": [
7
+ {
8
+ "n": 1063,
9
+ "t": "Eleventh testing feedback batch, part 2",
10
+ "s": "Eleventh testing feedback batch, part 2"
11
+ }
12
+ ]
13
+ },
14
+ {
15
+ "v": "0.422.0",
16
+ "at": "2026-10-26T13:03:41.940Z",
17
+ "f": 2,
18
+ "prs": [
19
+ {
20
+ "n": 1061,
21
+ "t": "Eleventh testing feedback batch",
22
+ "s": "Eleventh testing feedback batch"
23
+ }
24
+ ]
25
+ },
2
26
  {
3
27
  "v": "0.421.0",
4
28
  "at": "2026-10-26T06:44:56.884Z",
@@ -29,7 +29,8 @@
29
29
  "milestones": [
30
30
  "2026-10-24"
31
31
  ],
32
- "holds": []
32
+ "holds": [],
33
+ "gaps": []
33
34
  }
34
35
  ]
35
36
  },
@@ -222,6 +222,7 @@ Every markdown document opens as one page in a tab: a PRD, a new document or any
222
222
  - **Page** shows the document as it reads. **Edit** lets you type on the page itself, with a toolbar, a **/** menu for blocks, and Ctrl+S to save. **Markdown** shows the source text. Only the sections you changed are written; the other sections and the front matter keep their exact text. A line that is only an HTML comment, such as `<!-- pmos:note … -->` or `<!-- pmos:slide … -->`, is not shown on the page, and a save writes it back as it was.
223
223
  - When the agent proposes an edit, the page shows it applied and highlighted. Click a highlight to see the old text, and click **Put it back** to restore it. The bar above the page has **Keep as vN**, which keeps the changes that remain, and **Undo all**, which asks first and then rejects the whole edit.
224
224
  - **Health**, **Links** and **Copies** under the toolbar show the document's checks, the documents it links to, and its linked copies. The checks only read the file.
225
+ - **The page follows the file.** When a chat changes the document, the page shows the new text within a few seconds. You do not refresh the page, and the chat does not need to commit. A document of an initiative is read from that initiative's own folder (its git worktree) when its chat works there. If you are editing and have not saved, your edit stays: the page says the file changed, and **Cancel** shows the new text. A report and a document opened from the Board follow the file in the same way.
225
226
 
226
227
  ### Confluence pages and Google Docs
227
228
 
@@ -324,7 +325,7 @@ Board is the fourth place on the rail, after Chat, at `/premium-board.html`. It
324
325
  - **The view chip** in the Initiatives head says which view is shown (List, By stage or Timeline); press it to pick another.
325
326
  - **List** shows the late and at-risk initiatives first, then the board's now view, up to 100 loaded and 25 on screen at a time. A row shows the owner and lane, a status chip when it is not on track, how far through the workflow it is (and "derived" when the workflow engine placed it), a progress bar only when a record holds progress, and the planned finish only when an end date was set ("Not planned" otherwise). "Do this first" appears only when the first row is late.
326
327
  - **By stage** has one column for each stage of the board's workflow with the board's own count and its first five initiatives.
327
- - **List** and **Timeline** show ten tasks a page with Previous and Next; **By stage** shows six cards a column with Show more. **Timeline** draws a bar for each initiative that has dates, with the days left or over, and counts the rest. A bar runs from the earliest start to the latest due date of the initiative's breakdown items and its tasks. Every stage shows, Monitor and Evaluate too. Under a program, every initiative of the program has a row; one with no dates says **No dates** beside today. With no dates on record it says so and draws nothing. A gap in the plan that overlaps a hold still leaves out the days outside the hold, also when the hold has no return date.
328
+ - **List** and **Timeline** show ten tasks a page with Previous and Next; **By stage** shows six cards a column with Show more. **Timeline** draws a bar for each initiative that has dates, with the days left or over, and counts the rest. A bar runs from the earliest start to the latest due date of the initiative's breakdown items and its tasks. Every stage shows, Monitor and Evaluate too. Under a program, every initiative of the program has a row; one with no dates says **No dates** beside today. In each group the rows run by start date, then end date, and the ones with no dates come last; the status dot still marks a late or at-risk initiative. With no dates on record it says so and draws nothing. A gap in the plan that overlaps a hold still leaves out the days outside the hold, also when the hold has no return date.
328
329
  - **Sprint** appears when an agent session has read Jira for the board. Otherwise it says there is none. Press it to open the sprint's facts, with the sprint as a board in a second tab: **To do**, **In progress** and **Done** columns from the last Jira read, with the dates, the days left and the points. The sprint goal is the one the Jira status check writes from the sprint's tickets, as on the console's Sprints tab, with its summary; Jira's own goal shows under it only as a reference (**In Jira: "…"**). Until the check has written one, the tab says **No goal yet**. The active and next sprints are buttons at the top. The closed sprints are behind **Past sprints**, which is shut until you press it. Press any card to open its ticket in another tab. A ticket that is on no initiative of this board shows what the sprint read holds (title, status, points and its Jira link). The board is read only: Jira owns each ticket's status and sprint, so you move tickets in Jira. Tickets with no sprint are not in this read. **Coming up** shows the next release, from the releases ledger.
329
330
  - **Open the backlog** is in the Sprint dialog and on its sprint tab. It opens the board's Jira backlog in a tab beside the dialog: the open sprints (active, then next) and then **Backlog**, the tickets in no sprint and not done. A row shows the key, title, status, points and initiative, and why a blocked ticket is blocked. **All**, **Blocked** and **Bugs** filter it (Bugs appears only when the Jira read holds the issue type). A row opens its ticket. The list holds only the tickets the board's initiatives pushed to Jira or hold under their epics, in key order: the Jira read has no rank, assignee or capacity. You move and rank tickets in Jira. With no Jira read, the tab says so.
330
331
  - **Next release** shows the next release that carries an initiative of this board, the one planned after it, and the three latest past releases (**Released** when accepted, else **Past**). It reads the release records (`releases/releases.jsonl`, written from the console's Releases view); Jira fix versions alone do not make a release. With no release planned it says so and still lists the past ones. With none at all it says "No release is on record for this board, past or planned."
@@ -2,7 +2,7 @@
2
2
  type: Guide
3
3
  title: "Home (/premium.html) and the designed features"
4
4
  description: "Home in the Agreed design: the list grouped by product, the Viewer, the place menu, New for you, Search, and the initiative, meeting, report, Board and Insights features designed after it."
5
- timestamp: 2026-10-25
5
+ timestamp: 2026-10-26
6
6
  ---
7
7
 
8
8
  # Home
@@ -15,7 +15,7 @@ Home is the page at `/premium.html`. It follows the Agreed design and the "Uncov
15
15
  - Press **Good morning** to open **Your day**. Your day shows the date, the meetings of the day, **Your move** (the items that wait on you, with their count) and **This week** (the Weekly review). Your move shows only in Your day, not in the list.
16
16
  - A **program** comes first, above the products. Its header shows the program icon, its name, the next milestone (◆ and the date) and how many of its initiatives are ready for that milestone. Inside it, the program's own tasks come first, then its initiatives under a small heading for each product. Each initiative shows once. Press the program's name to open the program in the Viewer. The chat then talks about the program. Press the chevron to close or open the group.
17
17
  - A program with no open initiative yet still shows, with "No initiatives yet" or "No open initiatives". With one product picked, it shows under its own product. Home reads again when you come back to its tab, so a program made on the Board shows at once.
18
- - Then the list is grouped by **product**. A product header shows a tile with the product's short name, the product name, one dot for each goal (green on track, amber off track) and a chevron. You set the short name in Settings. Press the product's name to open the product in the Viewer, with its goals and this week's update and metrics review. The chat then talks about the product. This is the same for every product in the list: Home stays on the workspace you opened it on. For another product, the weekly update and the metrics review open that product's own Home in a new tab. An initiative of another product opens from that product's own board, and its chat works in that product's workspace.
18
+ - Then the list is grouped by **product**. A product header shows a tile with the product's short name, the product name, one dot for each goal (green on track, amber off track) and a chevron. You set the short name in Settings. Press the product's name to open the product in the Viewer, with its goals and this week's update and metrics review. The chat then talks about the product. This is the same for every product in the list: Home stays on the workspace you opened it on. For another product, the weekly update and the metrics review open that product's own Home in a new tab. An initiative of another product opens from that product's own board, and its chat works in that product's workspace. This is also true for a new initiative that an agent made with `pmos initiative new` and that is not on the board's Now list yet: it opens with its title, stage and tasks.
19
19
  - Each row is one line. A dot is a session: blue when it waits on you, a ring while it runs. A check box is a task: amber when it is late. The stage track on the right shows where the initiative is. A session that runs under an initiative shows indented under it. An initiative shows its 3 most urgent tasks, and **N more** shows the rest.
20
20
  - **Not in an initiative** is one line at the end, with a blue dot, an amber square and a count. Press it to open the items that have no initiative.
21
21
  - **Kept** and **Done** are in the filter icon's menu, on a desktop only.
@@ -46,15 +46,24 @@ A reply PMOS sees in the thread clears the ask on the next read. A new ask after
46
46
  Press an initiative's name in the list, or open `?ini=<id>`. The list stays as it is and the initiative's row is selected. The chat talks about the initiative, and its page opens in the Viewer.
47
47
 
48
48
  - The page's header shows the lane and the anchor, the name, **New session** (+), ⋯, Open wide and Close.
49
- - The stage card shows the stage, the exit items, the next step and **Overview with Claude**. **Overview with Claude** types the question into the chat box. Nothing is sent until you press send.
49
+ - The stage card shows the stage, **N of M done** for its tasks, the days in the stage (for example "9 of ~7 days", amber when over the usual time) and → for the next stage. → turns blue when every task of the stage is done.
50
+ - Under the header is one line for the whole initiative. Each stage is a part of the line, on its own dates. Done stages are grey, the current stage is blue, later stages are light, and a stage with no dated task is dashed. The ◇ marks are the milestone tasks, with the name above and the date below. The end ◇ is the end date. A thin tick is Today.
51
+ - Press a part to show that stage in **Tasks**. Press **N of M done** to do the same. Press a ◇ to open the milestone task in **Tasks**. Milestones a few days apart merge into one ◇ with a count. Press it to list them.
52
+ - The line also shows what the Board's timeline shows: » for a skipped stage, a dotted gap and ⏸ for a hold (press ⏸ to set or change the return date), a hairline for 2 weeks or more with no activity (press it; ahead of Today, + adds a task in the gap), hatching past the end date, a dashed Jira forecast, a thin line under it for a saved plan, and "after <initiative>" when it waits on another initiative.
53
+ - With no dates at all, the parts are even and dashed. The calendar button opens **Tasks** in the Timeline view to set the dates.
54
+ - On a phone the line shows only the next open milestone's name. Press the line to unfold the stages and milestones as a list under it.
50
55
  - Under the card are the 3 most urgent tasks and the documents that need a look. **Show N more** opens all the tasks and **Show all N** opens all the documents. ← goes back to the page. A task or a document that you open from the page also has ← back to the page.
51
56
  - ⋯ has **Moves on by itself**, **Move back a stage**, **Move to a stage**, **Add a stakeholder**, **Turn into a program**, **Open on the Board**, **The record**, **Put on hold** and **Cancel the initiative**.
52
57
  - To go back to all work, press the browser's Back, or Menu > **Home**. Neither reloads the page. Close (×) closes the page but keeps the initiative's chat.
53
58
  - If there is no room beside the chat, the Viewer shows on top of the chat. The list stays.
54
59
  - On a phone the page fills the screen. **Message Claude about <name>** opens the chat.
55
60
  - **Moves on by itself** is a switch, on by default. When every exit item is done, the stage moves to the next stage and a message shows **Undo**. A stage never moves by itself into a milestone (Deliver or Evaluate). This rule is a proposal that the PM has not confirmed yet.
56
- - **Move to <next>** with open exit items asks first (**Move anyway**, with a note). **Back** always asks for a reason.
61
+ - → with open tasks in the stage asks first (**Move anyway**, with a note). **Back** always asks for a reason.
57
62
  - **Tasks** in the Viewer can be grouped by stage, by groups that you name, by owner or by status. Drag a task to another group.
63
+ - In the Build stage, the open Jira tickets show with the tasks. A task whose name starts with a Jira key (for example "MSD-4376 Navigation tabs") is that ticket, so the ticket shows once, as the task, and counts once.
64
+ - **Set a Jira ticket's dates.** Press the dates of a Jira ticket in the List, or drag its bar on the Timeline, as you do for a task. PMOS keeps the start and due days and shows them in place of the sprint end. Jira does not change. The status and the name stay Jira's.
65
+ - **Tasks** show one row (one group) for each stage of the workflow, in order. Finished stages and later stages are never merged into one row; they start folded, and the current stage and any stage with a late task start open.
66
+ - **Delete a task.** Press the caret under a task's box (on a phone, press and hold the box) and press the trash at the end of the status picker. The task goes at once and the message shows **Undo**. The ⋯ menu of a task also has **Delete**. You can delete every PMOS task, also a task that Claude planned in the breakdown. A Jira ticket has no Delete: change it in Jira. A task deleted in a draft leaves only the draft.
58
67
 
59
68
  ## Rename a program, an initiative or a task
60
69
 
@@ -62,6 +71,7 @@ Press the name in the Viewer's header. The name becomes a field.
62
71
 
63
72
  - Type the new name. Press Enter or the check to save it. Press Esc to stop without a change. An empty name is not saved.
64
73
  - The new name shows at once in the list, the chat header, the Viewer, the Board and the Timeline. The message **Renamed** has **Undo**.
74
+ - An initiative of another product renames in that product's own repository, the same as on the Board.
65
75
  - Only the name changes. The id, the record file, the links and the history stay the same.
66
76
  - An initiative with a Jira epic shows **Rename the Jira epic too**. It is off by default. When you select it, Home opens the initiative's chat with the request typed. Send it to let your agent rename the epic in Jira. PMOS does not change Jira itself.
67
77
  - A program has no Jira box. Its goal stays as it is.
@@ -2,7 +2,7 @@
2
2
  type: Guide
3
3
  title: "Programs on the Board: All products, groupings and the program panel"
4
4
  description: "A program groups initiatives across products. How it shows on the Board (stage track, Kanban, timeline and List), the All products mode, the By product grouping, the program panel and the side panel width."
5
- timestamp: 2026-10-25
5
+ timestamp: 2026-10-26
6
6
  ---
7
7
 
8
8
  # Programs on the Board
@@ -14,13 +14,15 @@ Programs do not change how Insights, the weekly update or sprints count initiati
14
14
  ## The Board
15
15
 
16
16
  - The product picker has **All products** when you have more than one product. All products shows the initiatives of every product on one Board (`/premium-board.html?all=1`).
17
+ - The product picker takes several products. Press a product to tick or untick it; the menu stays open. **All products** ticks every product, and shows a dash when only some are ticked. The last ticked product stays ticked. When the menu closes, the Board shows the ticked products, merged as on All products. The button shows the first product and "+N" (for example "pmos-idpf +1"). The pick is in the address (`?pick=<workspace>|<board>` for each product), so a reload keeps it.
17
18
  - A program comes first. Its band shows the stage spread of its initiatives, the next milestone and how many initiatives are ready for it. Under the band, the initiatives sit under a small heading for each product. Then each product has its own group.
18
- - To group by product only, open **Filter** and choose **By product**. A program member then shows a small layers icon. A chip shows while By product is on.
19
+ - To group by product only, open **Filter** and choose **By product**. A program member then shows a small layers icon and stays under its product in every view, the timeline included. A chip shows while By product is on.
19
20
  - **Kanban** shows programs as swimlanes, then products. Press a column header to fold the column to a strip with its count. An empty column starts folded. The Board remembers each fold.
20
21
  - The **timeline** draws a program row that brackets its initiatives' bars, on every span. Program milestones are diamonds. Milestones that are close together merge into one diamond with a count.
22
+ - On the timeline, a **product's head row** also shows milestones. Nothing is added by hand: the row shows every milestone of the product's initiatives, which are each milestone task and each initiative's end diamond (its Deliver or Evaluate date). The diamonds are the same as on the initiative rows: open, filled when done, orange when late. Diamonds that are close together merge into one diamond with a count and the date range under it. Press it to see a list with the milestone, its initiative and the date. Press a line to open that initiative. Hold the pointer on a single diamond to see its milestone and initiative. A thin line goes from the first start to the last end of the product's initiatives. When the product is folded, the row stays the same, so it is a summary of the product. On a phone the diamonds have no dates; tap the row to see all the milestones in date order. A product inside a program has no such row, because the program row shows its milestones.
21
23
  - **List** has a Product column and a Program column. Press a column header to sort by it.
22
24
  - **New** opens a menu: **New initiative** or **New program**.
23
- - A new program shows at once, before any initiative joins it. A program with no open initiative shows on its own product's Board and on All products, with "No initiatives yet" or "No open initiatives". Press its name, then **⋯** and **Move an initiative in**. That menu lists open initiatives only.
25
+ - A new program shows at once, before any initiative joins it. A program with no open initiative shows on its own product's Board and on All products, with "No initiatives yet" or "No open initiatives". Press its name, then **⋯** and **Move an initiative in**. That menu lists open initiatives only, grouped by product, with the program's own product first, wherever you open the program (Home, another product's Board or All products). An initiative joins in its own product.
24
26
  - To make an initiative a program, open the initiative, press **⋯**, then **Turn into a program**. The initiative joins the new program, and the program panel opens. **Turn into a program** shows only for an initiative that is in no program.
25
27
  - The chat cannot make or change a program. Every program change is a press on the Board. When you ask the chat about a program, it tells you which press to use.
26
28
 
@@ -17,7 +17,7 @@ Open it from **Menu › Settings › Workflows**. The address is `/premium-workf
17
17
  - **The workflow** is one numbered list of stages, in three columns: **To do**, **In progress** and **Done**. Drag a stage to change its place or its column. **Add a stage** adds one at the end of that column. The dashed **Won't do · Archived** column is in every workflow: any initiative can go there from any stage, and come back to Triage.
18
18
  - **Triage** is always the first stage, in To do.
19
19
  - Tap the name of the workflow to rename it. **⋯** has **Copy** and **Archive**. You cannot archive a workflow that initiatives use.
20
- - **Product feature** cannot change. **Copy it** to make a workflow of your own from it.
20
+ - **Product feature** cannot change. **Copy it** to make a workflow of your own from it. A stage of Product feature has **Copy it** too: the copy opens on that stage.
21
21
 
22
22
  ## A stage
23
23
 
@@ -73,5 +73,9 @@ An agent adds and closes tasks when you ask, so you do not have to find the task
73
73
  - `pmos task state <task> [<task> …] --to <state>` sets the state of one or more tasks: To do, In progress, Done, Won't do or Archived. `--why` adds the reason, and for Done it is the evidence you read. Each change writes the same line as the page's press, under the agent's name. Won't do on a breakdown item withdraws it, and it cannot come back.
74
74
  - `pmos task set <task> [<task> …] --stage <stage>` puts one or more tasks under a stage of the initiative's workflow, by the stage's key or name. `--stage none` takes them out of every stage. The Tasks section groups the tasks by these stages. A task's stage is its place in the plan: it does not change the task's state, and it does not move the initiative. `set` also takes `--due`, `--start`, `--owner` and `--notes`; `--due none` and `--start none` clear a day.
75
75
  - `pmos task remove <task> [<task> …]` deletes a task that was added by mistake, such as a placeholder or a duplicate. The task goes from every list, and the Undo on the page brings it back. For work that stopped, use Archived or Won't do instead. A breakdown item cannot be deleted: set it to Won't do.
76
+ - `pmos task link <from> <to>` makes `<to>` wait on `<from>`. `--type` sets how they wait: `fs` (start after it finishes, the default), `ss` (start when it starts), `ff` (finish when it finishes) or `sf` (finish when it starts). `--lag` adds days, or takes them away with a negative number. Make a link only when the PM asks for it. To suggest a link, add `--propose --why "<reason>"`: the link shows under the blue ✦ in the Tasks header, and the PM approves it or drops it. A link that loops back to a task is refused.
77
+ - `pmos task unlink <from> <to>` removes the link. The dates stay as they are.
78
+
79
+ A link keeps the dates in order. When a task moves later, the tasks that wait on it move with it, and the page lists the moves under the grey ✦. Claude does not move a milestone, a task in another initiative or a task past the committed date: it asks the PM under the grey ✦. A Jira ticket never moves: Claude drafts a comment for the outbox instead.
76
80
 
77
81
  When an initiative reaches a stage, each entry of that stage's To finish list becomes one task, once. Closing that task, on the stage card, in the Tasks section or with `pmos task state`, marks the entry done on the stage card.
@@ -7,6 +7,9 @@
7
7
  * O2 the chat is the initiative's own, named by its title (its target carries ws=microsites)
8
8
  * O3 the Microsites heading opens its page in the Viewer and Home stays on IDPF: no navigation, the list keeps the IDPF group
9
9
  * O5 its chat's first message starts a session in Microsites, and "A new session" (In: chip, + New) starts a second one beside it
10
+ * O6 batch 11 item 10: an initiative `pmos initiative new` made in Microsites sits in Later, so the Microsites model does not list it. Its
11
+ * next step (tagged ws=microsites) puts it on Home; pressing it reads it from Microsites, never IDPF's board, under its title
12
+ * O7 the same initiative opened by a link with no next step: the read on IDPF fails, the Microsites one finds it, and its chat is Microsites'
10
13
  * Serves the real page from the real server; the reads are fixtures (fixtures/program-ascent.js through the Board and Home fixtures). */
11
14
  const path = require('path');
12
15
  const { spawn } = require('child_process');
@@ -124,6 +127,58 @@ const model = () => { const m = IP.build(F.facts()); return { ...m, id: ID, key:
124
127
  ok('O4 a phone: the press opens the Microsites chat full screen, the page closed', await until(() => pp.evaluate(() => { const t = document.querySelector('#hmChat textarea, textarea'); return !document.querySelector('#czViewer:not([hidden]) .hi-talk') && !!t && !!t.offsetParent && t.placeholder === 'Message Claude about Microsites'; }), 5000));
125
128
  await pctx.close();
126
129
 
130
+ // O6, O7 (batch 11 item 10): an initiative made by `pmos initiative new` in Microsites, unplaced (Later), so not on the model's list
131
+ const NEW = 'psle-addon-follow-on', NEW_TITLE = 'PSLE Companion add-on follow-on plan';
132
+ const newModel = () => ({ ...model(), id: NEW, key: 'init:' + NEW, title: NEW_TITLE });
133
+ const later = async (withStep) => {
134
+ const c = await browser.newContext({ viewport: { width: 1440, height: 900 } });
135
+ const pg = await c.newPage(), rd = [], asked = [];
136
+ pg.on('pageerror', (e) => errors.push(String((e && e.message) || e)));
137
+ await pg.route('**/api/initiative-premium*', (r) => {
138
+ const q = new URL(r.request().url()).searchParams; rd.push({ id: q.get('id'), ws: q.get('ws'), board: q.get('board') });
139
+ // the real route: a workspace's default board when none is named; an id on another board is a 404
140
+ if (q.get('id') === NEW && q.get('ws') === 'microsites' && (!q.get('board') || q.get('board') === 'microsites')) return json(r, { ok: true, state: 'ready', model: newModel(), as_of: Date.now() });
141
+ return json(r, { ok: false, state: 'error', error: 'no work-lane initiative ' + q.get('id') + ' in this workspace' }, 404);
142
+ });
143
+ await pg.route(/\/api\/board-premium(\?.*)?$/, (r) => { const ws = new URL(r.request().url()).searchParams.get('ws') || 'idpf'; return json(r, { ok: true, state: 'ready', model: BP.build(BF.programFacts(ws)), as_of: Date.now() }); });
144
+ await pg.route(/\/api\/briefing-premium(\?.*)?$/, (r) => {
145
+ const m = BRP.buildMany(BRF.programFacts());
146
+ if (withStep) m.list.rows = [{ key: 'blocked:' + NEW + ':microsites', kind: 'blocked', title: 'Unblock the brief step', subject: NEW_TITLE, prepared: '', product: 'Microsites', ws: 'microsites', from: [NEW] }].concat(m.list.rows || []);
147
+ return json(r, { ok: true, state: 'ready', model: m, as_of: Date.now() });
148
+ });
149
+ await pg.route('**/api/programs', (r) => json(r, { ok: true, programs: [] }));
150
+ // the last route added wins: the ask's own after the catch-all
151
+ await pg.route('**/api/briefing-premium/**', (r) => json(r, { ok: true, turns: [], working: false }));
152
+ await pg.route('**/api/briefing-premium/ask*', (r) => { asked.push({ ws: new URL(r.request().url()).searchParams.get('ws') }); return json(r, { ok: true, session: 'sess-x', started: true }); });
153
+ await pg.goto(BASE + '/premium.html?ws=idpf' + (withStep ? '' : '&ini=' + NEW));
154
+ return { c, pg, rd, asked };
155
+ };
156
+ const pageState = (pg) => until(() => pg.evaluate((v) => { const o = document.querySelector(v); if (!o) return null; if (o.querySelector('[data-hi-v="page"]')) return 'ok'; return /could not be read/.test(o.textContent) ? 'err' : null; }, V), 30000);
157
+ {
158
+ const { c, pg, rd } = await later(true);
159
+ const nrow = `#hmList [data-hm-sel="i:${NEW}"]`;
160
+ const seen = await until(async () => {
161
+ await pg.evaluate(() => document.querySelectorAll('#hmList [data-hm-pg][aria-expanded="false"]').forEach((b) => b.click())).catch(() => {});
162
+ return pg.evaluate((s) => { const b = document.querySelector(s); return !!b && !!b.offsetParent; }, nrow);
163
+ }, 40000);
164
+ ok('O6 the Microsites initiative in Later shows on Home under its next step', seen);
165
+ if (seen) await pg.click(nrow);
166
+ const s6 = await pageState(pg);
167
+ ok('O6 its page opens, not "The initiative could not be read"', s6 === 'ok', s6);
168
+ ok('O6 it is read from Microsites, never from IDPF\'s board', rd.some((x) => x.id === NEW && x.ws === 'microsites') && !rd.some((x) => x.id === NEW && (x.board === 'idpf' || (x.ws || 'idpf') === 'idpf')), JSON.stringify(rd));
169
+ ok('O6 the chat names it by its title, not its id', await until(() => pg.evaluate((t) => (document.querySelector('#hmIn') || {}).placeholder === 'Message Claude about ' + t, NEW_TITLE), 5000), await pg.evaluate(() => (document.querySelector('#hmIn') || {}).placeholder));
170
+ await c.close();
171
+ }
172
+ {
173
+ const { c, pg, rd, asked } = await later(false);
174
+ const s7 = await pageState(pg);
175
+ ok('O7 opened by a link with no next step: its page opens from Microsites', s7 === 'ok', s7 + ' ' + JSON.stringify(rd));
176
+ ok('O7 the chat is its own, in Microsites', await until(() => pg.evaluate((t) => (document.querySelector('#hmIn') || {}).placeholder === 'Message Claude about ' + t, NEW_TITLE), 5000), await pg.evaluate(() => (document.querySelector('#hmIn') || {}).placeholder));
177
+ await pg.fill('#hmIn', 'What is next?'); await pg.keyboard.press('Enter');
178
+ ok('O7 its first message starts the session in Microsites', await until(() => asked.length >= 1, 5000) && asked[0].ws === 'microsites', JSON.stringify(asked));
179
+ await c.close();
180
+ }
181
+
127
182
  ok('no page error', errors.length === 0, errors.join(' | '));
128
183
  await ctx.close();
129
184
  return finish();
@@ -98,8 +98,8 @@ const BRIEF = BRP.build(BRF.facts());
98
98
  ok('W1 the page opens on the initiative with the workflow on its meta line', A.up, await txt(p, V + ' .cz-vw-kind'));
99
99
  ok('W1 the kind line names the workflow and the anchor: "Tender · KR 1.1" (Kind becomes Workflow)', /^Tender · KR 1\.1$/.test(await txt(p, V + ' .cz-vw-kind')), await txt(p, V + ' .cz-vw-kind'));
100
100
  ok('W1 the card names the stage of that workflow: Triage', (await txt(p, V + ' .iv-sch > b')) === 'Triage', await txt(p, V + ' .iv-sch'));
101
- ok('W1 the ladder draws the ten stages of Tender, three of them milestones', await p.evaluate((v) => document.querySelectorAll(v + ' .iv-lad i').length === 10 && document.querySelectorAll(v + ' .iv-lad i.ms').length === 3, V));
102
- ok('W1 the next stage is Tender\'s own: the card\'s last line is Requirements', /^Requirements/.test(await txt(p, V + ' .iv-nx')), await txt(p, V + ' .iv-nx'));
101
+ ok('W1 the line draws the ten stages of Tender, three of them milestones', await p.evaluate((v) => { const t = [...new Map([...document.querySelectorAll(v + ' .iv-tl .iv-tlp')].map((x) => [x.dataset.ivStage, x.title])).values()]; return t.length === 10 && t.filter((x) => /^◆ /.test(x)).length === 3; }, V));
102
+ ok('W1 the next stage is Tender\'s own: the → names Requirements', await p.evaluate((v) => /^Next: Requirements/.test(document.querySelector(v + ' .iv-scgo').getAttribute('aria-label')), V));
103
103
  ok('W1 the icon names the workflow for a screen reader', await p.evaluate((v) => /Workflow: Tender/.test(document.querySelector(v + ' [data-iv-wf]').getAttribute('aria-label')), V));
104
104
  ok('W2 PMOS set it from the BRD: the toast says so, with Undo (WfTriage)', await until(() => p.evaluate(() => { const t = document.getElementById('hiToast'); return !!t && !t.hidden && /Set to Tender from the BRD/.test(t.textContent) && !!t.querySelector('[data-hi-undo]'); })));
105
105
  await shot(p, 'triage-1440');
@@ -139,7 +139,7 @@ const BRIEF = BRP.build(BRF.facts());
139
139
  await p.reload();
140
140
  await until(() => p.evaluate((v) => !!document.querySelector(v + ' .hi-end'), V), 30000);
141
141
  ok('W7 the page of a Won’t do says why, and offers Back to Triage', /Won't do · No budget: Moved to next year’s budget\./.test(await txt(p, V + ' .hi-end')), await txt(p, V + ' .hi-end'));
142
- ok('W7 its stage does not move: the card has no next stage to move to', !(await p.evaluate((v) => !!document.querySelector(v + ' .iv-sc .iv-nx, ' + v + ' [data-iv-next]'), V)), await txt(p, V + ' .iv-sc'));
142
+ ok('W7 its stage does not move: the card has no next stage to move to', !(await p.evaluate((v) => !!document.querySelector(v + ' .iv-sc .iv-scgo, ' + v + ' [data-iv-next]'), V)), await txt(p, V + ' .iv-sc'));
143
143
  ok('W7 ⋯ has Back to Triage in place of Won’t do', await moreLabels(p).then((l) => l.includes('Back to Triage') && !l.includes('Won’t do')));
144
144
  await shot(p, 'wontdo-page-1440');
145
145
  await p.click(V + ' .hi-end [data-wf-back]');
@@ -149,7 +149,7 @@ const BRIEF = BRP.build(BRF.facts());
149
149
 
150
150
  // W8 the phone, and dark
151
151
  const P = await open({ w: 390, h: 844, fresh: false, B: board('requirements') });
152
- ok('W8 the phone opens the page with the workflow at Requirements, the second of its ten bars', P.up && (await txt(P.page, V + ' .iv-sch > b')) === 'Requirements' && await P.page.evaluate((v) => { const b = [...document.querySelectorAll(v + ' .iv-lad i')]; return b.length === 10 && b[1].classList.contains('now'); }, V));
152
+ ok('W8 the phone opens the page with the workflow at Requirements, the second of its ten bars', P.up && (await txt(P.page, V + ' .iv-sch > b')) === 'Requirements' && await P.page.evaluate((v) => { const t = [...new Map([...document.querySelectorAll(v + ' .iv-tl .iv-tlp')].map((x) => [x.dataset.ivStage, x.title])).values()]; return t.length === 10 && / · now$/.test(t[1]); }, V));
153
153
  ok('W8 the toast shows once only: seen before, not again', !(await P.page.evaluate(() => { const t = document.getElementById('hiToast'); return !!t && !t.hidden; })));
154
154
  await shot(P.page, 'page-390');
155
155
  await P.page.click(V + ' [data-iv-wf]');
@@ -86,7 +86,8 @@ function ticketsBy(sprints, items) {
86
86
  }
87
87
  for (const w of items || []) {
88
88
  if (!w || w.src !== 'jira' || w.kind === 'Epic' || !w.key) continue;
89
- add(w.ini, { key: w.key, title: clip(w.title || w.key, 120), status: w.status || 'To do', raw: w.status || '', cls: w.blocked ? 'bl' : TK_CLS[w.status] || '', blocked: !!w.blocked, reason: '', points: null, url: '', sprint: '', sprintState: '', sprintEnd: '', assignee: w.owner || '' });
89
+ add(w.ini, { key: w.key, title: clip(w.title || w.key, 120), status: w.status || 'To do', raw: w.status || '', cls: w.blocked ? 'bl' : TK_CLS[w.status] || '', blocked: !!w.blocked, reason: '', points: null, url: '', sprint: '', sprintState: '', sprintEnd: '', assignee: w.owner || '',
90
+ ...(w.datesHere ? { start: w.start || '', due: w.end || '', datesHere: true } : {}) }); // the dates the PM keeps in PMOS (batch 11 item 23)
90
91
  }
91
92
  return by;
92
93
  }
@@ -195,7 +196,7 @@ function actsOf(r, boardNames) {
195
196
  stages: own, stage: (lib ? r.wfStage.name : r.stage) || null, life,
196
197
  reason: life ? clip(st.reason || '', 300) : '', back: life === 'hold' && st.back ? shortDate(st.back) : '', backDay: life === 'hold' && st.back ? String(st.back).slice(0, 10) : null,
197
198
  ...(life && st.at ? { since: shortDate(String(st.at).slice(0, 10)) } : {}),
198
- archived: r.archived ? { reason: clip(r.archived.reason || '', 300), into: r.archived.into ? (r.archived.intoTitle || r.archived.into) : null, ...(r.archived.at ? { at: shortDate(String(r.archived.at).slice(0, 10)) } : {}) } : null,
199
+ archived: r.archived ? { reason: clip(r.archived.reason || '', 300), into: r.archived.into ? (r.archived.intoTitle || r.archived.into) : null, ...(r.archived.into ? { intoId: r.archived.into } : {}), ...(r.archived.at ? { at: shortDate(String(r.archived.at).slice(0, 10)) } : {}) } : null,
199
200
  };
200
201
  }
201
202
  /** The words an ask and an initiative title share (three letters or more, not common words), for "Close to: <initiative>". */
@@ -245,8 +246,13 @@ const DAY_RE = /^\d{4}-\d{2}-\d{2}$/;
245
246
  const dayOr = (v) => (typeof v === 'string' && DAY_RE.test(v) ? v : null);
246
247
  const holdsOf = (r) => (Array.isArray(r.holds) ? r.holds : []).filter((h) => h && dayOr(h.from)).slice(-12)
247
248
  .map((h) => ({ from: h.from, to: dayOr(h.to), back: dayOr(h.back), reason: clip(h.reason || '', 200) }));
248
- /** The plain gaps of a row: stretches of 4 weeks or more that no dated work covers. */
249
- const gapsOf = (r) => (Array.isArray(r.gaps) ? r.gaps : []).filter((g) => g && dayOr(g.from) && dayOr(g.to)).slice(0, 12).map((g) => ({ from: g.from, to: g.to }));
249
+ /** The plain gaps of a row: stretches of 2 weeks or more that no dated work covers, with the stage of the work on each side (batch 11 item 13). */
250
+ const stageKey = (v) => (typeof v === 'string' && v ? clip(v, 80) : null);
251
+ const gapsOf = (r) => (Array.isArray(r.gaps) ? r.gaps : []).filter((g) => g && dayOr(g.from) && dayOr(g.to)).slice(0, 12)
252
+ .map((g) => ({ from: g.from, to: g.to, ...(stageKey(g.before) ? { before: stageKey(g.before) } : {}), ...(stageKey(g.after) ? { after: stageKey(g.after) } : {}) }));
253
+ /** Where the dated work of each stage runs (batch 11 item 13): the » of a skipped stage sits between two of them. */
254
+ const stageSpansOf = (r) => (Array.isArray(r.stageSpans) ? r.stageSpans : []).filter((x) => x && stageKey(x.stage) && dayOr(x.start) && dayOr(x.due)).slice(0, 40)
255
+ .map((x) => ({ stage: stageKey(x.stage), start: x.start, due: x.due }));
250
256
  function rowOf(r, wf, today) {
251
257
  const names = (wf || []).map((s) => s.name), cur = names.indexOf(r.stage);
252
258
  const bad = r.status === 'late' || r.status === 'at risk';
@@ -265,7 +271,7 @@ function rowOf(r, wf, today) {
265
271
  finish: r.end ? shortDate(r.end) : 'Not planned', over: !!over, start: r.start || null, end: r.end || null,
266
272
  owner: r.owner || null, lane: r.lane || null, anchor: r.anchor || null, kr: krShort(r.anchor), rank: Number.isInteger(r.rank) ? r.rank : null, warnings: (r.warnings || []).filter((w) => typeof w === 'string').slice(0, 12), epics: Array.isArray(r.epics) ? r.epics.filter((e) => typeof e === 'string').slice(0, 6) : [], updated: r.updated || null, reading: r.reading || null, overDays: over ? days(r.end, today) : 0,
267
273
  acts: actsOf(r, names),
268
- holds: holdsOf(r), gaps: gapsOf(r),
274
+ holds: holdsOf(r), gaps: gapsOf(r), stageSpans: stageSpansOf(r),
269
275
  // D99: the workflow it runs and where it stands in it (lib/routes-boards.js workflowRowOf); Product feature when the server sends none
270
276
  ...wfFields(r),
271
277
  dialog: {
@@ -310,10 +316,19 @@ function build(f) {
310
316
  // the start too: the Tasks Timeline draws a bar from the start to the due day (batch 9 item 5b)
311
317
  taskBy.get(w.ini).push({ uid: w.uid, title: clip(w.title || '', 160), status: w.status || 'To do', owner: w.owner || '', start: w.start || '', end: w.end || '', ...(w.from ? { from: { stage: w.from.stage, finish: w.from.finish } } : {}),
312
318
  // one view (feedback batch 6 item 1): its place in the breakdown, and a breakdown item's own stage and order
313
- ...(typeof w.section === 'string' ? { section: w.section } : {}), ...(w.itemStage ? { itemStage: w.itemStage } : {}), ...(Number.isFinite(w.order) ? { order: w.order } : {}), ...(w.store === 'item' ? { item: true } : {}) });
319
+ ...(typeof w.section === 'string' ? { section: w.section } : {}), ...(w.itemStage ? { itemStage: w.itemStage } : {}), ...(Number.isFinite(w.order) ? { order: w.order } : {}), ...(w.store === 'item' ? { item: true } : {}), ...(w.milestone ? { milestone: true } : {}) });
320
+ }
321
+ // the milestones of each initiative (feedback batch 11 item 3): its tasks flagged ◇, PMOS and Jira alike, at their due dates. Won't do and
322
+ // Archived take one off the timeline; one with no due date is not drawn (the Tasks list asks for the date)
323
+ const msBy = new Map();
324
+ for (const w of f.items || []) {
325
+ if (!w || !w.milestone || w.kind === 'Epic' || !w.ini || !w.uid || w.status === "Won't do" || w.status === 'Archived' || !isoDay(w.end)) continue;
326
+ if (!msBy.has(w.ini)) msBy.set(w.ini, []);
327
+ msBy.get(w.ini).push({ id: w.uid, name: clip(w.title || w.uid, 120), date: String(w.end).slice(0, 10), done: w.status === 'Done', ...(typeof w.section === 'string' && w.section ? { sec: w.section } : w.from && w.from.stage ? { sec: w.from.stage } : {}), ...(w.src === 'jira' ? { jira: true } : {}) });
314
328
  }
315
329
  // every task, not the first 60: the Board's panel and Home count the same tasks (feedback batch 6 item 1: Board said 56 done, Home 61)
316
330
  for (const r of rows.concat(stageRows, gone.cancelled, gone.archived)) if (!r.tasks) r.tasks = (taskBy.get(r.id) || []).slice(0, TASK_MAX);
331
+ for (const r of rows.concat(stageRows, gone.cancelled, gone.archived)) if (!r.milestones) r.milestones = (msBy.get(r.id) || []).sort((a, b) => a.date.localeCompare(b.date)).slice(0, 40);
317
332
  for (const r of rows.concat(stageRows, gone.cancelled, gone.archived)) if (!r.track) {
318
333
  r.track = trackOf(r, tkBy.get(r.id), todayIso, relOfIni.get(r.id)); r.theme = themeOf(r.anchor);
319
334
  if (epicBy.has(r.id) && !r.epics.includes(epicBy.get(r.id))) r.epics.unshift(epicBy.get(r.id));