create-pmos 0.441.0 → 0.443.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/package.json +25 -25
  2. package/payload/KIT-VERSION +1 -1
  3. package/payload/planning/evals/eval-calibration.md +1 -1
  4. package/payload/planning/okrs/health-budgets.md +1 -1
  5. package/payload/state/discoveries.md +1 -1
  6. package/workspace/adler-seasons-art-test.js +106 -0
  7. package/workspace/adler-seasons-test.js +111 -0
  8. package/workspace/briefing-premium-board-test.js +19 -17
  9. package/workspace/briefing-premium-initiative-test.js +7 -4
  10. package/workspace/changelog.json +24 -0
  11. package/workspace/goals-clear-ui-test.js +249 -0
  12. package/workspace/guide/adler.md +10 -0
  13. package/workspace/guide/home.md +8 -1
  14. package/workspace/guide/metric-drafts.md +8 -2
  15. package/workspace/home-railcard-test.js +193 -0
  16. package/workspace/ini-workflow-test.js +6 -2
  17. package/workspace/intelligence-gaps-ui-test.js +16 -14
  18. package/workspace/lib/engine/records/index.js +9 -2
  19. package/workspace/lib/initiative-layout.js +3 -1
  20. package/workspace/lib/insights-premium.js +22 -1
  21. package/workspace/lib/metric-drafts.js +37 -10
  22. package/workspace/lib/metric-read-runs.js +20 -13
  23. package/workspace/lib/metric-reads.js +208 -23
  24. package/workspace/lib/metrics-cli.js +62 -5
  25. package/workspace/lib/routes-goal-status.js +89 -6
  26. package/workspace/lib/routes-insights-premium.js +1 -1
  27. package/workspace/lib/routes-metric-drafts.js +26 -3
  28. package/workspace/lib/settings-store.js +38 -0
  29. package/workspace/metric-drafts-ui-test.js +7 -4
  30. package/workspace/okr-goals-ui-test.js +7 -5
  31. package/workspace/package-lock.json +2 -2
  32. package/workspace/package.json +1 -1
  33. package/workspace/premium-board-actions-test.js +2 -1
  34. package/workspace/premium-chat-attach-test.js +2 -0
  35. package/workspace/program-panel-test.js +1 -1
  36. package/workspace/public/pm/bd-ini-panel.js +2 -2
  37. package/workspace/public/pm/c3-ini-ui.js +1 -1
  38. package/workspace/public/pm/cozy-adler.css +21 -0
  39. package/workspace/public/pm/cozy-adler.js +415 -8
  40. package/workspace/public/pm/cozy-ev.css +16 -1
  41. package/workspace/public/pm/cozy-home.css +8 -0
  42. package/workspace/public/pm/cozy-insights.css +82 -0
  43. package/workspace/public/pm/cozy-live-pill.css +5 -0
  44. package/workspace/public/pm/cozy-news.js +1 -1
  45. package/workspace/public/pm/cozy-seasons.js +318 -0
  46. package/workspace/public/pm/cozy-settings.js +88 -5
  47. package/workspace/public/pm/cozy-today.css +15 -0
  48. package/workspace/public/pm/cozy-viewer.js +50 -18
  49. package/workspace/public/pm/cozy-vw-shell.css +4 -0
  50. package/workspace/public/pm/cozy.css +65 -0
  51. package/workspace/public/pm/dash-view.js +4 -2
  52. package/workspace/public/pm/goals-clear.js +258 -0
  53. package/workspace/public/pm/home-app.js +59 -5
  54. package/workspace/public/pm/home-chat.js +1 -1
  55. package/workspace/public/pm/home-day.js +7 -4
  56. package/workspace/public/pm/home-ini.js +2 -2
  57. package/workspace/public/pm/home-mentions.js +1 -1
  58. package/workspace/public/pm/home-today.js +51 -10
  59. package/workspace/public/pm/impact.js +1 -1
  60. package/workspace/public/pm/ini-groups.js +28 -17
  61. package/workspace/public/pm/ini-links.js +1 -1
  62. package/workspace/public/pm/ini-tasks.js +246 -48
  63. package/workspace/public/pm/ini-view-model.js +45 -16
  64. package/workspace/public/pm/ini-view.css +330 -1
  65. package/workspace/public/pm/ini-view.js +196 -83
  66. package/workspace/public/pm/metric-drafts.js +4 -1
  67. package/workspace/public/pm/mission.js +238 -0
  68. package/workspace/public/pm/premium-board.js +1 -1
  69. package/workspace/public/pm/premium-insights.js +178 -24
  70. package/workspace/public/pm/premium-welcome.js +2 -2
  71. package/workspace/public/pm/split-merge.js +1 -1
  72. package/workspace/public/pm/stage-line.js +2 -2
  73. package/workspace/server.js +6 -2
  74. package/workspace/skills/metric-read.skill +7 -5
  75. package/workspace/split-merge-ui-test.js +1 -1
  76. package/workspace/stage-card-test.js +56 -11
  77. package/workspace/task-links-test.js +2 -0
  78. package/workspace/task-milestones-test.js +5 -1
  79. package/workspace/task-plans-test.js +3 -3
  80. package/workspace/task-views-test.js +279 -37
  81. package/workspace/test-lists/adler-seasons-art.json +13 -0
  82. package/workspace/test-lists/batch18-adler-seasons.json +13 -0
  83. package/workspace/test-lists/goals-clear.json +15 -0
  84. package/workspace/test-lists/home-railcard.json +9 -0
  85. package/workspace/test-lists/mission.json +5 -0
  86. package/workspace/test-lists/viewer-tasks.json +5 -0
  87. package/workspace/tk-tasks-test.js +27 -32
@@ -87,7 +87,7 @@ const LAYOUT = { ok: true, auto: true, held: [], by: 'stage', names: [], of: {},
87
87
  page.on('request', (rq) => { if (rq.method() === 'POST') posts.push({ path: new URL(rq.url()).pathname, body: JSON.parse(rq.postData() || '{}') }); });
88
88
  const json = (r, b, status = 200) => r.fulfill({ status, contentType: 'application/json', body: JSON.stringify(b) });
89
89
  const press = (b) => {
90
- if (b.kind === 'by') L = { ...L, by: b.by, picked: true };
90
+ if (b.kind === 'by') L = { ...L, by: b.grouping, picked: true }; // the page sends `grouping` (pm-guard refuses `by`)
91
91
  else if (b.kind === 'groups') { const of = {}; for (const [k, v] of Object.entries(L.of)) if (b.names.includes(v)) of[k] = v; L = { ...L, names: b.names, of }; }
92
92
  else if (b.kind === 'rename') { const of = {}; for (const [k, v] of Object.entries(L.of)) of[k] = v === b.from ? b.to : v; L = { ...L, names: L.names.map((n) => (n === b.from ? b.to : n)), of }; }
93
93
  else if (b.kind === 'place') { const of = { ...L.of }; if (b.group) of[b.task] = b.group; else delete of[b.task]; L = { ...L, of }; }
@@ -121,14 +121,19 @@ const LAYOUT = { ok: true, auto: true, held: [], by: 'stage', names: [], of: {},
121
121
  const heads = (p) => p.evaluate((v) => [...document.querySelectorAll(v + ' .iv-wbs .iv-ws b')].map((b) => b.textContent), V);
122
122
  const epics = (p) => until(() => p.evaluate((v) => !!document.querySelector(v + ' .iv-wbs .ig-tk'), V), 20000);
123
123
  const lastPost = (A, route) => A.posts.filter((x) => x.path === route).pop();
124
+ // Group by and the views live in the view sheet (batch 18 item 1, XvpA4Sheet): the one view button opens it
125
+ const sheetOpen = async (pg) => { await pg.click(V + ' [data-iv-vbtn]'); return until(() => pg.evaluate(() => !!document.querySelector('.tkc.ivq .ivs'))); };
126
+ const openMore = async (pg) => { await sheetOpen(pg); await pg.click('.tkc.ivq .ivs [data-ivs-more]'); };
127
+ const grouped = async (pg) => { await sheetOpen(pg); const r = await pg.evaluate(() => { const b = document.querySelector('.tkc.ivq .ivs [data-ivs-more]'); return b && b.getAttribute('aria-pressed') === 'true' ? b.textContent.trim() : 'no'; }); await pg.keyboard.press('Escape'); return r; };
128
+ const viewTo = async (pg, m) => { await sheetOpen(pg); await pg.click(`.tkc.ivq .ivs [data-ivs-view="${m}"]`); await sleep(150); await pg.keyboard.press('Escape'); await until(() => pg.evaluate(() => !document.querySelector('.tkc.ivq .ivs'))); };
124
129
 
125
130
  /* G1 · T1 · desktop: the page's Tasks, grouped by epic by itself */
126
131
  const A = await open(), p = A.page;
127
132
  ok('0 Home draws the initiative', A.up);
128
133
  ok('T1 Tasks groups by epic by itself once the tickets are drafted', await epics(p));
129
134
  const hd = await p.evaluate((v) => [...document.querySelector(v + ' .iv-th').children].map((e) => (e.getAttribute('aria-label') || e.className || e.tagName) + (e.textContent.trim() && e.matches('button') ? '+text' : '')).join(), V);
130
- ok('G1 one icon-only "Group tasks by" press in the Tasks header, right side, before the view switch', /Group tasks by,Tasks view,Add a task/.test(hd), hd);
131
- ok('G1 the group icon shows its grouping is not the default', await p.evaluate((v) => document.querySelector(v + ' [data-ig-by]').classList.contains('on'), V));
135
+ ok('G1 the Tasks header holds the one view button and + (Group by is in its sheet)', /,Tasks view: List\. Change the view, grouping or zoom,Add a task/.test(hd) && !/Group tasks by/.test(hd), hd);
136
+ ok('G1 the sheet shows the grouping is not the default: its ⋯ reads Epic, pressed', (await grouped(p)) === 'Epic');
132
137
  ok('T1 one group per epic, in the PRD\'s order, then Your tasks', (await heads(p)).join('|') === 'Sign-in and sign-up|Sessions, SSO and second factor|Your tasks', JSON.stringify(await heads(p)));
133
138
  const sends = await p.evaluate((v) => [...document.querySelectorAll(v + ' .iv-wbs > :is(.iv-wsw, .iv-ws)')].map((g) => !!g.querySelector('[data-ig-send]')).join(), V);
134
139
  ok('T1 each epic has its send icon; Your tasks has none', sends === 'true,true,false', sends);
@@ -137,28 +142,17 @@ const LAYOUT = { ok: true, auto: true, held: [], by: 'stage', names: [], of: {},
137
142
  ok('T1 the ticket that lacks text carries its marker', await p.evaluate((v) => { const m = document.querySelector(v + ' .ig-tk[data-ig-tk="S5"] .ig-mk.warn'); return !!m && /Missing/.test(m.getAttribute('aria-label')); }, V));
138
143
  ok('T1 the card leads Tasks: "N tickets are drafted, not in Jira" with one Send to Jira', /6 tickets are drafted, not in Jira/.test(await txt(p, V + ' .ig-sum')) && (await txt(p, V + ' .ig-sum [data-ig-sendall]')) === 'Send to Jira' && (await p.$$(V + ' [data-ig-sendall]')).length === 1, await txt(p, V + ' .ig-sum'));
139
144
  await shot(p, 'tasks-epic-1440.png');
140
- /* batch 12 item 0 · the stage card's stage while Tasks is grouped by epic: Tasks keeps the epic grouping, shows that stage's tasks only */
141
- const st = await p.evaluate((v) => { const b = [...document.querySelectorAll(v + ' .iv-tl .iv-tlp[data-iv-stage]')].find((x) => !x.classList.contains('now')); return b ? { key: b.dataset.ivStage, title: b.title } : null; }, V);
142
- ok('S0 the stage card has a stage part to press', !!st, JSON.stringify(st));
143
- if (st) {
144
- await p.click(`${V} .iv-tl .iv-tlp[data-iv-stage="${st.key}"]`);
145
- const only = await until(() => p.evaluate((v) => { const c = document.querySelector(v + ' .iv-th [data-ig-all]'); return c ? c.textContent.trim() : null; }, V));
146
- ok('S0 the Tasks header names the stage shown, with a ✕ to show every stage', !!only && st.title.includes(only), only + ' / ' + st.title);
147
- ok('S0 the grouping stays: the group icon is still on, and no stage section opens in its place', await p.evaluate((v) => document.querySelector(v + ' [data-ig-by]').classList.contains('on'), V));
148
- ok('S0 a stage with no Jira tickets shows no epic groups', await p.evaluate((v) => !document.querySelector(v + ' .ig-tk') && !document.querySelector(v + ' .ig-sum'), V));
149
- await shot(p, 'tasks-epic-stage-1440.png');
150
- await p.click(V + ' .iv-th [data-ig-all]');
151
- ok('S0 the ✕ shows every stage again: the epics come back', await epics(p) && await p.evaluate((v) => !document.querySelector(v + ' [data-ig-all]'), V));
152
- }
153
- await p.click(V + ' [data-ig-by]');
145
+ /* batch 12 item 0 (the stage card's stage shown in Tasks) has no press since batch 18 item 1: a tap on the mission opens its milestones
146
+ * (Wawan 10:59), so the S0 checks went with the stage line */
147
+ await openMore(p);
154
148
  const gm = await until(() => p.evaluate(() => { const m = document.querySelector('.ig-pop [role="menu"]'); return m ? [...m.querySelectorAll('[role^="menuitem"]')].map((b) => b.innerText.replace(/\s+/g, ' ').trim() + (b.getAttribute('aria-checked') === 'true' ? '*' : '')) : null; }));
155
149
  ok('G1 the menu: Group by Stage, Epic, Your groups, Owner, Status, then New group; Epic is checked', !!gm && gm.join('|') === 'Stage|Epic 2 epics*|Your groups|Owner|Status|New group', JSON.stringify(gm));
156
150
  await shot(p, 'group-menu-1440.png');
157
151
  await p.click('.ig-pop [role="menuitemradio"]:has-text("Stage")');
158
152
  const by = await until(() => lastPost(A, '/api/initiative-layout'));
159
- ok('G1 a pick is kept for the workspace: by stage', !!by && by.body.kind === 'by' && by.body.by === 'stage' && by.body.initiative === I && by.body.ws === 'w1', JSON.stringify(by && by.body));
153
+ ok('G1 a pick is kept for the workspace: by stage', !!by && by.body.kind === 'by' && by.body.grouping === 'stage' && by.body.initiative === I && by.body.ws === 'w1', JSON.stringify(by && by.body));
160
154
  ok('G1 Stage draws the stages again, with no ticket rows', await until(() => p.evaluate((v) => !document.querySelector(v + ' .ig-tk') && !document.querySelector(v + ' .ig-sum') && [...document.querySelectorAll(v + ' .iv-wbs .iv-ws b')].some((b) => /Discover/.test(b.textContent)), V)));
161
- await p.click(V + ' [data-ig-by]');
155
+ await openMore(p);
162
156
  await p.click('.ig-pop [role="menuitemradio"]:has-text("Epic")');
163
157
  await epics(p);
164
158
 
@@ -242,7 +236,7 @@ const LAYOUT = { ok: true, auto: true, held: [], by: 'stage', names: [], of: {},
242
236
  await q.keyboard.press('Enter');
243
237
  const rn = await until(() => lastPost(B, '/api/initiative-layout'));
244
238
  ok('G2 Rename writes the new name', !!rn && rn.body.kind === 'rename' && rn.body.from === 'Legal' && rn.body.to === 'Legal and filing', JSON.stringify(rn && rn.body));
245
- await q.click(V + ' [data-ig-by]');
239
+ await openMore(q);
246
240
  const gm2 = await until(() => q.evaluate(() => { const m = document.querySelector('.ig-pop [role="menu"]'); return m ? m.textContent.replace(/\s+/g, ' ') : null; }));
247
241
  ok('G2 the menu lists Your group sets, then New group', !!gm2 && /Your group sets\s*Design · Legal/.test(gm2) && /New group$/.test(gm2.trim()), gm2);
248
242
  await q.click('.ig-pop [role="menuitem"]:has-text("New group")');
@@ -253,17 +247,17 @@ const LAYOUT = { ok: true, auto: true, held: [], by: 'stage', names: [], of: {},
253
247
  await shot(q, 'tasks-mine-after-1440.png');
254
248
 
255
249
  /* G3 · Timeline and Kanban draw the same groups */
256
- await q.click(V + ' [data-iv-view="timeline"]');
250
+ await viewTo(q, 'timeline');
257
251
  const tg = await until(() => q.evaluate((v) => { const g = [...document.querySelectorAll(v + ' .ivt-gh b')].map((b) => b.textContent); return g.length ? g : null; }, V));
258
252
  ok('G3 Timeline draws the same groups', !!tg && tg.join('|') === 'Design|Legal and filing|Filing|Not in a group', JSON.stringify(tg));
259
253
  await shot(q, 'timeline-mine-1440.png');
260
- await q.click(V + ' [data-iv-view="kanban"]');
254
+ await viewTo(q, 'kanban');
261
255
  ok('G3 Kanban\'s picker is the group picker: All first', await until(() => q.evaluate((v) => { const b = document.querySelector(v + ' [data-iv-kstage]'); return !!b && b.textContent.trim() === 'All' && /^Group: All/.test(b.getAttribute('aria-label')); }, V)));
262
256
  await q.click(V + ' [data-iv-kstage]');
263
257
  const kg = await until(() => q.evaluate(() => { const m = document.querySelector('.ivq-m'); return m ? [...m.querySelectorAll('[role="menuitemradio"]')].map((b) => b.querySelector('span:nth-child(2)').textContent) : null; }));
264
258
  ok('G3 the picker lists All and each group', !!kg && kg.join('|') === 'All|Design|Legal and filing|Filing|Not in a group', JSON.stringify(kg));
265
259
  await q.keyboard.press('Escape');
266
- await q.click(V + ' [data-iv-view="list"]');
260
+ await viewTo(q, 'list');
267
261
  ok('0 Your groups: no page error', !B.errors.length, B.errors.join(' | '));
268
262
  await B.ctx.close();
269
263
  }
@@ -272,18 +266,18 @@ const LAYOUT = { ok: true, auto: true, held: [], by: 'stage', names: [], of: {},
272
266
  {
273
267
  const C = await open({ w: 390, h: 844, view: SENT }), c = C.page;
274
268
  ok('G4 phone: the Tasks open grouped by epic', await epics(c));
275
- const fit = await c.evaluate((v) => { const h = document.querySelector(v + ' .iv-th'), r = h.getBoundingClientRect(); const kids = [...h.children].filter((e) => e.offsetParent); return { over: h.scrollWidth > h.clientWidth + 1, rows: new Set(kids.filter((e) => e.matches('button, .ivx-seg')).map((e) => Math.round(e.getBoundingClientRect().top))).size, right: Math.max(...kids.map((e) => e.getBoundingClientRect().right)) <= r.right + 1, views: [...h.querySelectorAll('.ivx-sb')].filter((b) => b.offsetParent).length }; }, V);
276
- ok('G4 phone: the header holds the group icon, the view in use and + on one line, nothing cut', !fit.over && fit.rows === 1 && fit.right && fit.views === 1, JSON.stringify(fit));
277
- await c.click(V + ' .ivx-sb[aria-pressed="true"]');
278
- const vm = await until(() => c.evaluate(() => { const m = document.querySelector('.ivq-m'); return m ? [...m.querySelectorAll('[role="menuitemradio"]')].map((b) => b.textContent.trim()) : null; }));
279
- ok('G4 phone: the view icon opens List, Timeline and Kanban', !!vm && vm.join('|') === 'List|Timeline|Kanban', JSON.stringify(vm));
269
+ const fit = await c.evaluate((v) => { const h = document.querySelector(v + ' .iv-th'), r = h.getBoundingClientRect(); const kids = [...h.children].filter((e) => e.offsetParent); return { over: h.scrollWidth > h.clientWidth + 1, rows: new Set(kids.filter((e) => e.matches('button')).map((e) => Math.round(e.getBoundingClientRect().top))).size, right: Math.max(...kids.map((e) => e.getBoundingClientRect().right)) <= r.right + 1, views: [...h.querySelectorAll('[data-iv-vbtn]')].filter((b) => b.offsetParent).length }; }, V);
270
+ ok('G4 phone: the header holds the view button and + on one line, nothing cut', !fit.over && fit.rows === 1 && fit.right && fit.views === 1, JSON.stringify(fit));
271
+ await sheetOpen(c);
272
+ const vm = await c.evaluate(() => { const g = document.querySelector('.tkc.ivq.sheet .ivs-seg[aria-label="View"]'); return g ? [...g.children].map((b) => b.getAttribute('aria-label')) : null; });
273
+ ok('G4 phone: the view button opens the bottom sheet: List, Timeline and Kanban', !!vm && vm.join('|') === 'List|Timeline|Kanban', JSON.stringify(vm));
280
274
  await c.keyboard.press('Escape');
281
275
  const row = await c.evaluate((v) => { const r = document.querySelector(v + ' .ig-tk[data-ig-tk="S1"]'); return r ? { t: r.textContent.replace(/\s+/g, ' ').trim(), sq: (r.querySelector('.ig-sq') || {}).className, av: (r.querySelector('.ivt-av') || {}).textContent, lab: r.querySelector('.ig-sq') && r.querySelector('.ig-sq').getAttribute('aria-label') } : null; }, V);
282
276
  ok('T1 after the send: the key, a status square and the assignee', !!row && /IDPF-411 Sign-in parity/.test(row.t) && /doing/.test(row.sq) && row.av === 'Ru' && row.lab === 'In Jira: In Progress', JSON.stringify(row));
283
277
  ok('T1 "Jira read at 9:02" is said once', (await c.$$eval(V + ' .ig-read', (n) => n.map((x) => x.textContent))).join() === 'Jira read at 9:02');
284
278
  ok('T1 an epic keeps its send icon while a ticket in it is not in Jira', await c.evaluate((v) => [...document.querySelectorAll(v + ' .iv-wbs > :is(.iv-wsw, .iv-ws)')].slice(0, 2).map((g) => !!g.querySelector('[data-ig-send]')).join() === 'true,true', V));
285
279
  await shot(c, 'sent-390.png');
286
- await c.click(V + ' [data-ig-by]');
280
+ await openMore(c);
287
281
  ok('G4 phone: the group menu rises from the bottom as a sheet', await until(() => c.evaluate(() => { const s = document.querySelector('.ig-pop.sheet'); if (!s) return false; const r = s.getBoundingClientRect(); return Math.abs(r.bottom - innerHeight) < 2 && r.left === 0; })));
288
282
  await shot(c, 'group-sheet-390.png');
289
283
  await c.keyboard.press('Escape');
@@ -302,9 +296,10 @@ const LAYOUT = { ok: true, auto: true, held: [], by: 'stage', names: [], of: {},
302
296
  /* G5 · the Board's panel: the same section */
303
297
  {
304
298
  const E = await open({ page: 'board' }), e = E.page;
305
- ok('G5 the Board\'s panel has the group icon and groups by epic by itself', E.up && !!(await e.$(V + ' .iv-th [data-ig-by]')) && await epics(e));
306
- await e.click(V + ' [data-ig-by]');
307
- await e.click('.ig-pop [role="menuitemradio"]:has-text("Owner")');
299
+ ok('G5 the Board\'s panel has the view button and groups by epic by itself', E.up && !!(await e.$(V + ' .iv-th [data-iv-vbtn]')) && await epics(e));
300
+ await sheetOpen(e);
301
+ await e.click('.tkc.ivq .ivs [data-ivs-by="owner"]');
302
+ await e.keyboard.press('Escape');
308
303
  ok('G5 By owner on the Board: one group per owner', await until(() => e.evaluate((v) => [...document.querySelectorAll(v + ' .iv-wbs .iv-ws b')].map((b) => b.textContent).join('|') === 'Claude|Wawan', V)), JSON.stringify(await heads(e)));
309
304
  await shot(e, 'board-owner-1440.png');
310
305
  ok('0 Board: no page error', !E.errors.length, E.errors.join(' | '));