create-pmos 0.747.0 → 0.749.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 (45) hide show
  1. package/package.json +51 -34
  2. package/payload/AGENTS.md +1 -0
  3. package/payload/KIT-VERSION +1 -1
  4. package/payload/planning/evals/eval-calibration.md +1 -1
  5. package/payload/planning/okrs/health-budgets.md +1 -1
  6. package/payload/state/discoveries.md +1 -1
  7. package/workspace/changelog.json +50 -0
  8. package/workspace/guide/backlog.md +13 -1
  9. package/workspace/guide/cli.md +12 -1
  10. package/workspace/guide/home.md +1 -1
  11. package/workspace/guide/layout.md +6 -6
  12. package/workspace/lib/idle-lab.js +16 -6
  13. package/workspace/lib/outcome-props.js +14 -4
  14. package/workspace/lib/outcomes-cli.js +44 -6
  15. package/workspace/lib/pmos-verbs.js +3 -0
  16. package/workspace/lib/proposals.js +12 -2
  17. package/workspace/lib/route-modules.js +1 -0
  18. package/workspace/lib/routes-lab.js +19 -0
  19. package/workspace/lib/routes-proposals.js +13 -0
  20. package/workspace/lib/routes-standing-rules.js +44 -0
  21. package/workspace/lib/routes-your-move.js +7 -1
  22. package/workspace/lib/rules-cli.js +74 -0
  23. package/workspace/lib/smallest-test.js +200 -0
  24. package/workspace/lib/sprint-draft.js +24 -0
  25. package/workspace/lib/standing-rules.js +187 -0
  26. package/workspace/package-lock.json +2 -2
  27. package/workspace/package.json +1 -1
  28. package/workspace/public/pm/bd-backlog-ds.js +58 -1
  29. package/workspace/public/pm/bd-backlog.js +14 -2
  30. package/workspace/public/pm/cozy-day-pick.js +34 -2
  31. package/workspace/public/pm/cozy-pop-work.js +14 -5
  32. package/workspace/public/pm/cozy-settings.js +6 -2
  33. package/workspace/public/pm/cozy-today-app.js +12 -6
  34. package/workspace/public/pm/cozy-today-model.js +88 -45
  35. package/workspace/public/pm/cozy-today-page.css +6 -0
  36. package/workspace/public/pm/cozy-today-view.js +72 -13
  37. package/workspace/public/pm/range-pick.css +1 -0
  38. package/workspace/public/pm/range-pick.js +21 -4
  39. package/workspace/public/pm/standing-rules-ui.js +100 -0
  40. package/workspace/stage-card-tasks-test.js +24 -2
  41. package/workspace/task-card-test.js +16 -0
  42. package/workspace/test-lists/smallest-test.json +9 -0
  43. package/workspace/test-lists/sprint-draft.json +9 -0
  44. package/workspace/test-lists/standing-rules-list.json +9 -0
  45. package/workspace/test-lists/your-move-today.json +9 -0
@@ -11,7 +11,9 @@
11
11
  * S9 a Jira row: title and status read-only, "<Status> in Jira · read N min ago", dates editable, no Delete
12
12
  * S10 drag on a desktop: to another stage (section + order), inside a stage (order only, kept on the next read)
13
13
  * S11 a long press on a phone's title lifts the row · S12 a milestone on the Timeline is its ◇ only; Kanban says "◇ Nov 14"
14
- * S13 light and dark, phone and desktop: no page error. PMOS_SHOTS=<dir> writes the screens. */
14
+ * S13 light and dark, phone and desktop: no page error
15
+ * S14 the work popup on a desk: a row's date press opens the one calendar with the focus on a day; two taps save Start and Due.
16
+ * PMOS_SHOTS=<dir> writes the screens. */
15
17
  const path = require('path');
16
18
  const { besidePage } = require('./lib/beside-page'); // these checks read the full page beside the page; in the popup work shows its three parts (nav slice 3)
17
19
  const { classicBoard } = require('./lib/classic-board'); // these checks are about the four Board views, not Work (work-one-view)
@@ -63,10 +65,11 @@ const TICKETS = [{ key: 'IDPF-3387', title: 'Refactor the AppAuthService', statu
63
65
  browser = besidePage(classicBoard(await chromium.launch({ executablePath: exe })));
64
66
 
65
67
  // where: 'home' (premium.html's Viewer) or 'board' (the Board's panel)
66
- const open = async ({ where = 'home', w = 390, h = 844, theme = 'light', view = 'list' } = {}) => {
68
+ const open = async ({ where = 'home', w = 390, h = 844, theme = 'light', view = 'list', pop = false } = {}) => {
67
69
  const touch = w < 700, id = where === 'home' ? 'self-serve-v2' : 'usage-billing';
68
70
  const ctx = await browser.newContext({ viewport: { width: w, height: h }, hasTouch: touch, isMobile: touch, colorScheme: theme });
69
71
  await ctx.addInitScript(() => { try { if (localStorage.getItem('cz-pn:board') == null) localStorage.setItem('cz-pn:board', JSON.stringify({ v: 2, share: 0.405 })); } catch { /* none */ } }); // the Board's Viewer at 560 px beside the page (cozy-panels.js keeps only this share), so its Tasks Timeline is wide enough to drag
72
+ if (pop) await ctx.addInitScript(() => { try { localStorage.setItem('cz-pop-open', 'popup'); } catch { /* none */ } }); // S14: work in the popup, as a PM sees it
70
73
  await ctx.addInitScript((v) => { localStorage.setItem('pmos.tasks.view', v); localStorage.setItem('pmos.tasks.zoom', 'month'); }, view);
71
74
  const page = await ctx.newPage(), errors = [], posts = [];
72
75
  await page.clock.install({ time: DAY }); // the fixture's day: the date picker's month and its Today chips stay on it after the real day passes
@@ -110,6 +113,7 @@ const TICKETS = [{ key: 'IDPF-3387', title: 'Refactor the AppAuthService', statu
110
113
  await until(() => page.evaluate(() => document.querySelectorAll('#ibBody .ini2, #ibBody .bt-l').length > 0), 20000);
111
114
  await page.evaluate(() => { const b = [...document.querySelectorAll('[data-row="board:usage-billing"] .bt-nm, [data-key="board:usage-billing"]')].find((x) => x.offsetParent); if (b) b.click(); });
112
115
  }
116
+ if (pop) return { ctx, page, errors, posts, S };
113
117
  // a phone shows the initiative as the popup's phone page (phone design, Ph2_init); the old page with its Tasks is ⋯ › Every part
114
118
  if (touch && where === 'home') { await everyPart(page); await sleep(800); }
115
119
  await until(() => page.evaluate((v) => !!document.querySelector(v === 'list' ? '#czViewer .iv-wbs' : '#czViewer :is(.ivt, .iva, .ivk)'), view), 20000);
@@ -409,5 +413,23 @@ const TICKETS = [{ key: 'IDPF-3387', title: 'Refactor the AppAuthService', statu
409
413
  ok(`S13 ${where} ${w} dark: no page error`, D.errors.length === 0, D.errors.join(' | '));
410
414
  await D.ctx.close();
411
415
  }
416
+
417
+ /* S14 the work popup (cozy-pop-work.js dateMenu): a row's date press opens the one range picker, and two taps set Start and Due */
418
+ {
419
+ const P = await open({ where: 'board', w: 1440, h: 900, pop: true }), q = P.page;
420
+ await until(() => q.evaluate(() => !!document.querySelector('.cz-pop:not([hidden]) [data-pw-date="task-b4"]')), 20000);
421
+ await q.evaluate(() => document.querySelector('.cz-pop:not([hidden]) [data-pw-date="task-b4"]').click());
422
+ const o14 = await until(() => q.evaluate(() => { const r = document.querySelector('.pw-rp .rp'); return r ? { ends: [...r.querySelectorAll('[data-rp-end]')].map((e) => e.dataset.rpEnd + (e.classList.contains('on') ? '*' : '')).join(), seg: !!document.querySelector('.pw-seg'), clear: !!r.querySelector('[data-rp-clear]'), focus: (document.activeElement || {}).dataset ? document.activeElement.dataset.rpDay || '' : '' } : null; }).then((x) => (x && x.focus ? x : null)), 3000) || await q.evaluate(() => ({ ends: [...document.querySelectorAll('.pw-rp [data-rp-end]')].map((e) => e.dataset.rpEnd + (e.classList.contains('on') ? '*' : '')).join(), focus: (document.activeElement || {}).outerHTML ? document.activeElement.outerHTML.slice(0, 120) : '' }));
423
+ ok('S14 the work popup: a row\'s date press opens the one calendar under Task or Milestone, Start on, the focus on a day, No date at the foot', o14 && o14.ends === 'start*,due' && o14.seg && o14.clear && /^2026-10-\d\d$/.test(o14.focus), JSON.stringify(o14));
424
+ await q.click('.pw-rp .rp-g [data-rp-day="2026-10-20"]');
425
+ const s14 = await until(() => { const x = lastPost(P, '/api/boards/tasks/edit'); return x && x.body.task === 'task-b4' && x.body.start === '2026-10-20' ? x : null; });
426
+ const due14 = await until(() => q.evaluate(() => { const e = document.querySelector('.pw-rp [data-rp-end="due"]'); return !!e && e.classList.contains('on'); }));
427
+ ok('S14 the first tap saves the start and the due day is next, the calendar stays open', s14 && due14, JSON.stringify(P.posts.slice(-3)));
428
+ await q.click('.pw-rp .rp-g [data-rp-day="2026-10-24"]');
429
+ const d14 = await until(() => { const x = lastPost(P, '/api/boards/tasks/edit'); return x && x.body.task === 'task-b4' && x.body.due === '2026-10-24' ? x : null; });
430
+ ok('S14 the second tap saves the due day and closes the calendar', d14 && await until(() => q.evaluate(() => !document.querySelector('.pw-rp'))), JSON.stringify(P.posts.slice(-3)));
431
+ ok('S14 the work popup: no page error', P.errors.length === 0, P.errors.join(' | '));
432
+ await P.ctx.close();
433
+ }
412
434
  return finish();
413
435
  })();
@@ -243,6 +243,22 @@ async function pure() {
243
243
  const wk = [await fd()];
244
244
  for (const k of ['Home', 'End', 'PageDown', 'PageUp']) { await p.keyboard.press(k); wk.push(await fd()); }
245
245
  ok('D4 the keys: Home and End go to the week ends, Page Down and Page Up move a month and redraw it', wk.join() === '2026-10-23,2026-10-19,2026-10-25,2026-11-25,2026-10-25', JSON.stringify(wk));
246
+ // words (bet A488, done test dates-in-words W6): the day read shows before anything is saved; Enter saves it; an unknown sprint saves nothing
247
+ const fri = await p.evaluate(async () => (await import('/pm/cozy-day-pick.js')).parseDay('friday'));
248
+ const n0 = A.posts.filter((x) => x.path === '/api/boards/tasks/edit').length;
249
+ await p.click(C + ' .tkc-dp [data-rp-end="due"] .rp-in'); await p.fill(C + ' .tkc-dp [data-rp-end="due"] .rp-in', 'friday');
250
+ const said = await until(() => p.evaluate((c) => { const m = document.querySelector(c + ' .tkc-dp .rp-msg'); return m && !m.hidden ? m.textContent : ''; }, C));
251
+ const longFri = await p.evaluate(async (v) => (await import('/pm/cozy-day-pick.js')).dayLong(v), fri);
252
+ ok('D4 words: "friday" typed in Due shows the day it reads before anything is saved', said === 'Reads as ' + longFri + ' · Enter saves' && /^Friday /.test(longFri) && A.posts.filter((x) => x.path === '/api/boards/tasks/edit').length === n0, JSON.stringify({ said, longFri, n0 }));
253
+ await p.keyboard.press('Enter');
254
+ ok('D4 words: Enter saves the Friday as the due day and closes the picker', await until(() => last(A, '/api/boards/tasks/edit').body.due === fri) && await until(() => p.evaluate((c) => !document.querySelector(c + ' .tkc-dp'), C)), JSON.stringify(last(A, '/api/boards/tasks/edit')));
255
+ await p.click(C + ' [data-tkc="dates"]');
256
+ await until(() => p.evaluate((c) => !!document.querySelector(c + ' .tkc-dp'), C));
257
+ const n1 = A.posts.filter((x) => x.path === '/api/boards/tasks/edit').length;
258
+ await p.click(C + ' .tkc-dp [data-rp-end="due"] .rp-in'); await p.fill(C + ' .tkc-dp [data-rp-end="due"] .rp-in', 'end of sprint'); await p.keyboard.press('Enter');
259
+ const sp = await until(() => p.evaluate((c) => { const m = document.querySelector(c + ' .tkc-dp .rp-msg'); return m && !m.hidden ? m.textContent : ''; }, C));
260
+ await sleep(300);
261
+ ok('D4 words: "end of sprint" where no sprint is known says so and saves nothing', sp === 'No sprint is known here. Type a day.' && A.posts.filter((x) => x.path === '/api/boards/tasks/edit').length === n1, JSON.stringify({ sp, n1 }));
246
262
  await p.mouse.click(5, 5);
247
263
  ok('D4 a press outside closes the picker', await until(() => p.evaluate((c) => !document.querySelector(c + ' .tkc-dp'), C)));
248
264
  // owner
@@ -0,0 +1,9 @@
1
+ {
2
+ "_comment": "smallest test first (factory job #1662, bet A472): lib/outcomes.js untested, smallestTestDraft, recordTest/undoTest, testCount; outcome-props filing; ✓ and Undo through routes-proposals; pmos outcomes test|tests; Your move asks for a result.",
3
+ "modules": [
4
+ "smallest-test.test.js"
5
+ ],
6
+ "seconds": {
7
+ "smallest-test.test.js": 8
8
+ }
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "_comment": "Draft the next sprint from team capacity (initiative sprint-draft-capacity, bet A471, done test D1-D7): capacity from the finished sprints, carry-over first, the ranked ready work fills the room. Pure checks and source reads. No browser, no network.",
3
+ "modules": [
4
+ "sprint-draft.test.js"
5
+ ],
6
+ "seconds": {
7
+ "sprint-draft.test.js": 3
8
+ }
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "_comment": "Standing rules list (initiative standing-rules-list, bet A470, done test S1-S8): the standing rules PMOS keeps, read, edited, retired and brought back; the monthly retire ✦; pmos rules. Scratch repositories only. No server, connector, model or network.",
3
+ "modules": [
4
+ "standing-rules.test.js"
5
+ ],
6
+ "seconds": {
7
+ "standing-rules.test.js": 5
8
+ }
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "_comment": "One ranked Your move on Today (initiative your-move, bet A468, done test C1-C8): the rank, the split, the desk group and fold, the Overview and the phone. Pure; no browser, no server.",
3
+ "modules": [
4
+ "your-move-today.test.js"
5
+ ],
6
+ "seconds": {
7
+ "your-move-today.test.js": 1
8
+ }
9
+ }