create-pmos 0.431.0 → 0.432.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 (58) hide show
  1. package/package.json +13 -13
  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 +12 -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 +25 -16
  17. package/workspace/guide/initiative-boards.md +6 -6
  18. package/workspace/guide/programs.md +2 -2
  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/package-lock.json +2 -2
  27. package/workspace/package.json +1 -1
  28. package/workspace/premium-board-actions-test.js +50 -32
  29. package/workspace/premium-briefing-depth-test.js +33 -34
  30. package/workspace/premium-core-doc-issue-test.js +1 -1
  31. package/workspace/premium-vw-backlog-test.js +1 -1
  32. package/workspace/premium-vw-item-test.js +1 -1
  33. package/workspace/premium-vw-jira-test.js +1 -1
  34. package/workspace/program-leave-test.js +20 -19
  35. package/workspace/public/pm/bd-acts.js +7 -5
  36. package/workspace/public/pm/bd-ini-panel.js +57 -25
  37. package/workspace/public/pm/cozy-ev.css +22 -7
  38. package/workspace/public/pm/cozy-evmodel.js +3 -3
  39. package/workspace/public/pm/cozy-nav.js +29 -32
  40. package/workspace/public/pm/cozy-news.js +11 -27
  41. package/workspace/public/pm/cozy-settings.js +68 -11
  42. package/workspace/public/pm/cozy-sources.js +5 -89
  43. package/workspace/public/pm/cozy-today.css +19 -1
  44. package/workspace/public/pm/hi-pop.css +21 -0
  45. package/workspace/public/pm/hi-pop.js +5 -5
  46. package/workspace/public/pm/home-app.js +62 -25
  47. package/workspace/public/pm/home-day.js +60 -2
  48. package/workspace/public/pm/home-ini.js +66 -27
  49. package/workspace/public/pm/home-more.js +9 -50
  50. package/workspace/public/pm/home-today.js +4 -2
  51. package/workspace/public/pm/ini-more.js +78 -42
  52. package/workspace/public/pm/ini-view-model.js +1 -1
  53. package/workspace/public/pm/ini-view.css +17 -0
  54. package/workspace/public/pm/ini-view.js +25 -7
  55. package/workspace/public/pm/premium-board.js +4 -3
  56. package/workspace/public/pm/prog-move.js +26 -0
  57. package/workspace/public/premium.html +0 -1
  58. package/workspace/stage-card-test.js +10 -1
@@ -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);
@@ -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();