create-pmos 0.608.0 → 0.610.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 (67) hide show
  1. package/package.json +33 -27
  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 +2 -2
  7. package/workspace/briefing-premium-adddoc-test.js +2 -1
  8. package/workspace/briefing-premium-board-test.js +9 -9
  9. package/workspace/briefing-premium-initiative-test.js +7 -6
  10. package/workspace/briefing-premium-insights-test.js +10 -10
  11. package/workspace/briefing-premium-products-test.js +4 -2
  12. package/workspace/briefing-premium-sources-test.js +1 -1
  13. package/workspace/briefing-premium-test.js +4 -4
  14. package/workspace/briefing-premium-work-test.js +1 -1
  15. package/workspace/changelog.json +32 -0
  16. package/workspace/ev-everywhere-test.js +9 -9
  17. package/workspace/guide/home.md +1 -1
  18. package/workspace/guide/layout.md +32 -11
  19. package/workspace/home-other-product-test.js +2 -1
  20. package/workspace/home-railcard-test.js +2 -1
  21. package/workspace/lib/beside-page.js +15 -0
  22. package/workspace/lib/routes-lab.js +4 -1
  23. package/workspace/live-pill-round-test.js +3 -4
  24. package/workspace/package-lock.json +2 -2
  25. package/workspace/package.json +1 -1
  26. package/workspace/panels-test.js +5 -4
  27. package/workspace/premium-chat-context-test.js +6 -6
  28. package/workspace/premium-chat-line-test.js +1 -1
  29. package/workspace/premium-chat-notes-test.js +1 -1
  30. package/workspace/premium-core-doc-issue-test.js +2 -1
  31. package/workspace/premium-vw-cal-test.js +1 -1
  32. package/workspace/premium-vw-doc-test.js +2 -1
  33. package/workspace/program-leave-test.js +2 -1
  34. package/workspace/program-panel-test.js +2 -2
  35. package/workspace/public/pm/bd-ini-panel.js +3 -1
  36. package/workspace/public/pm/bd-scroll.js +4 -2
  37. package/workspace/public/pm/cozy-board.css +3 -0
  38. package/workspace/public/pm/cozy-ev.css +51 -0
  39. package/workspace/public/pm/cozy-evmodel.js +1 -1
  40. package/workspace/public/pm/cozy-live-pill.js +2 -1
  41. package/workspace/public/pm/cozy-nav.js +70 -7
  42. package/workspace/public/pm/cozy-panels.js +1 -1
  43. package/workspace/public/pm/cozy-pick.css +3 -0
  44. package/workspace/public/pm/cozy-pick.js +6 -2
  45. package/workspace/public/pm/cozy-popup.css +113 -0
  46. package/workspace/public/pm/cozy-popup.js +408 -0
  47. package/workspace/public/pm/cozy-proto.js +3 -0
  48. package/workspace/public/pm/cozy-settings.js +10 -1
  49. package/workspace/public/pm/cozy-viewer.js +66 -18
  50. package/workspace/public/pm/home-app.js +11 -3
  51. package/workspace/public/pm/home-ini.js +4 -3
  52. package/workspace/public/pm/ini-agent.js +17 -4
  53. package/workspace/public/pm/ini-view.js +11 -0
  54. package/workspace/public/pm/page-chat.js +16 -4
  55. package/workspace/public/pm/pop-sessions.js +65 -0
  56. package/workspace/public/pm/premium-board.js +7 -3
  57. package/workspace/public/pm/premium-insights.js +14 -2
  58. package/workspace/public/pm/premium-shell.js +1 -1
  59. package/workspace/stage-card-tasks-test.js +2 -2
  60. package/workspace/task-card-test.js +2 -1
  61. package/workspace/task-delete-test.js +2 -1
  62. package/workspace/task-links-test.js +3 -2
  63. package/workspace/task-views-test.js +7 -7
  64. package/workspace/test-lists/one-popup.json +9 -0
  65. package/workspace/tk-tasks-test.js +2 -1
  66. package/workspace/viewer-trail-test.js +1 -1
  67. package/workspace/workflows-setup-test.js +1 -1
@@ -312,7 +312,7 @@ const TICKETS = [{ key: 'IDPF-3387', title: 'Refactor the AppAuthService', statu
312
312
  await A.ctx.close();
313
313
 
314
314
  /* ── the Board's panel, desktop ── */
315
- const B = await open({ where: 'board', w: 1440, h: 1600 }), q = B.page;
315
+ const B = await open({ where: 'board', w: 1520, h: 1600 }), q = B.page;
316
316
  await q.hover('#czViewer .iv-tr[data-iv-r="task-b1"]');
317
317
  const R10 = await q.evaluate(() => { const r = document.querySelector('#czViewer .iv-tr[data-iv-r="task-b1"]'), g = r.querySelector('.iv-grip'); return { grip: !!g && getComputedStyle(g).opacity === '1', dates: r.querySelector('.iv-dc').textContent.replace(/\s+/g, ' ').trim(), av: !!r.querySelector('.iv-rav') }; });
318
318
  ok('S10 desktop: a row shows start – due at the right and the owner\'s face; on hover the grip shows', R10.grip && R10.dates === 'Oct 30 – Nov 6' && R10.av, JSON.stringify(R10));
@@ -362,7 +362,7 @@ const TICKETS = [{ key: 'IDPF-3387', title: 'Refactor the AppAuthService', statu
362
362
  await B.ctx.close();
363
363
 
364
364
  /* S12 the Timeline and Kanban */
365
- const C = await open({ where: 'board', w: 1440, h: 1600, view: 'timeline' }), c = C.page;
365
+ const C = await open({ where: 'board', w: 1520, h: 1600, view: 'timeline' }), c = C.page;
366
366
  await c.evaluate(() => { const b = [...document.querySelectorAll('#czViewer .ivt-gh')].find((x) => /Deliver/.test(x.textContent) && x.getAttribute('aria-expanded') === 'false'); if (b) b.click(); });
367
367
  const T12 = await until(() => c.evaluate(() => { const d = document.querySelector('#czViewer .ivt [data-ivt-bar="task-d1"]'); return d ? { cls: d.className, one: d.dataset.one, label: (document.querySelector('#czViewer .ivt-ms.lb b') || {}).textContent } : null; }));
368
368
  ok('S12 Timeline: a milestone is its ◇ on its date with no bar, the date beside it', T12 && /\bivt-d\b/.test(T12.cls) && /\bms\b/.test(T12.cls) && !/ivt-b/.test(T12.cls) && T12.label === 'Nov 14', JSON.stringify(T12));
@@ -13,6 +13,7 @@ const fs = require('fs');
13
13
  const { spawn } = require('child_process');
14
14
  const { pathToFileURL } = require('url');
15
15
  const { findBrowser } = require('./lib/find-browser');
16
+ const { besidePage } = require('./lib/beside-page'); // these checks are about work beside the page, not the popup
16
17
  const T = require('./test-run').configure({ name: 'task-card' });
17
18
  const IP = require('./lib/initiative-premium.js');
18
19
  const F = require('./fixtures/initiative-premium-facts.js');
@@ -132,7 +133,7 @@ async function pure() {
132
133
  try { ({ chromium } = require('playwright-core')); } catch { console.log('✗ playwright-core is not installed'); return finish(1); }
133
134
  srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT), PMOS_SELF_ROOT: path.resolve(__dirname, '..') }) });
134
135
  await T.waitForServer(BASE);
135
- browser = await chromium.launch({ executablePath: exe });
136
+ browser = besidePage(await chromium.launch({ executablePath: exe }));
136
137
  const BOARD = BP.build(BF.facts()), BRIEF = BRP.build(BRF.facts());
137
138
  if (SHOTS) fs.mkdirSync(SHOTS, { recursive: true });
138
139
  const shot = async (p, name, sel) => { if (!SHOTS) return; await sleep(300); await (sel ? p.locator(sel).first() : p).screenshot({ path: path.join(SHOTS, name + '.png') }); };
@@ -13,6 +13,7 @@
13
13
  const path = require('path');
14
14
  const { spawn } = require('child_process');
15
15
  const { findBrowser } = require('./lib/find-browser');
16
+ const { besidePage } = require('./lib/beside-page'); // these checks are about work beside the page, not the popup
16
17
  const T = require('./test-run').configure({ name: 'task-delete' });
17
18
  const BP = require('./lib/board-premium.js');
18
19
  const F = require('./fixtures/board-premium-facts.js');
@@ -53,7 +54,7 @@ const openCard = async (pg, uid, V = '#czViewer') => {
53
54
  try { ({ chromium } = require('playwright-core')); } catch { console.log('✗ playwright-core is not installed'); return finish(1); }
54
55
  srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT) }) });
55
56
  await T.waitForServer(BASE);
56
- browser = await chromium.launch({ executablePath: exe });
57
+ browser = besidePage(await chromium.launch({ executablePath: exe }));
57
58
 
58
59
  /** The Board on the timeline, with the initiative panel open on Scarlet's Tasks. o: { w, h, phone, dark } */
59
60
  const open = async (o = {}) => {
@@ -18,6 +18,7 @@ const path = require('path');
18
18
  const fs = require('fs');
19
19
  const { spawn } = require('child_process');
20
20
  const { findBrowser } = require('./lib/find-browser');
21
+ const { besidePage } = require('./lib/beside-page'); // these checks are about work beside the page, not the popup
21
22
  const T = require('./test-run').configure({ name: 'task-links-ui' });
22
23
  const BP = require('./lib/board-premium.js');
23
24
  const F = require('./fixtures/board-premium-facts.js');
@@ -70,11 +71,11 @@ function model() {
70
71
  try { ({ chromium } = require('playwright-core')); } catch { console.log('✗ playwright-core is not installed'); return finish(1); }
71
72
  srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT) }) });
72
73
  await T.waitForServer(BASE);
73
- browser = await chromium.launch({ executablePath: exe });
74
+ browser = besidePage(await chromium.launch({ executablePath: exe }));
74
75
  const shot = async (page, name, sel) => { if (!SHOTS) return; fs.mkdirSync(SHOTS, { recursive: true }); const p = path.join(SHOTS, name + '.png'); if (sel) await page.locator(sel).first().screenshot({ path: p }); else await page.screenshot({ path: p }); };
75
76
 
76
77
  const open = async (o = {}) => {
77
- const ctx = await browser.newContext({ viewport: { width: o.w || 1440, height: o.h || 900 } });
78
+ const ctx = await browser.newContext({ viewport: { width: o.w || 1520, height: o.h || 900 } }); // 1520: the rail of places takes 80 px (the Viewer keeps its wide Tasks layout)
78
79
  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
79
80
  const page = await ctx.newPage();
80
81
  const errors = [], posts = [];
@@ -72,7 +72,7 @@ const IF = require('./fixtures/initiative-premium-facts.js');
72
72
  await T.waitForServer(BASE);
73
73
  browser = await chromium.launch({ executablePath: exe });
74
74
 
75
- const open = async ({ w = 1440, h = 900, theme = 'light', touch = false, store = null } = {}) => {
75
+ const open = async ({ w = 1520, h = 900, theme = 'light', touch = false, store = null } = {}) => { // 1520: the rail of places takes 80 px, and the Viewer beside the Board stays as wide as it was at 1440 (its wide Tasks layout)
76
76
  const ctx = await browser.newContext({ viewport: { width: w, height: h }, hasTouch: touch, isMobile: touch });
77
77
  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
78
78
  if (store) await ctx.addInitScript((s) => { for (const [k, v] of Object.entries(s)) localStorage.setItem(k, v); }, store);
@@ -365,7 +365,7 @@ const IF = require('./fixtures/initiative-premium-facts.js');
365
365
 
366
366
  for (const theme of ['light', 'dark']) {
367
367
  /* desktop: the Board's panel (a phone shows the List only, so it has no Timeline to check) */
368
- const D = await openH({ where: 'board', w: 1440, h: 900, theme }), d = D.page;
368
+ const D = await openH({ where: 'board', w: 1520, h: 900, theme }), d = D.page;
369
369
  const fl = await d.evaluate(() => ({ head: !!document.querySelector('#czViewer [data-iv-full]'), view: !!document.querySelector('#czViewer .iv-th [data-iv-vbtn]') }));
370
370
  ok(`H5 Board 1440 ${theme}: the Tasks header holds the view button and no Full width icon`, !fl.head && fl.view, JSON.stringify(fl));
371
371
  const ax = await axisGeo(d);
@@ -414,7 +414,7 @@ const IF = require('./fixtures/initiative-premium-facts.js');
414
414
  { uid: 'j3', title: 'MSD-9999 Navigation tabs', status: 'In progress', owner: 'Wawan', start: '2026-10-15', end: '2026-10-24' },
415
415
  ];
416
416
  const JK = [{ key: 'MSD-4376', title: 'Microsite page', status: 'Done', raw: 'Closed' }, { key: 'MSD-4377', title: 'Plan block', status: 'In progress', raw: 'In Review', due: '2026-11-30' }];
417
- const J = await openH({ where: 'board', w: 1440, h: 900, view: 'list', tasks: JT, tickets: JK }), j = J.page;
417
+ const J = await openH({ where: 'board', w: 1520, h: 900, view: 'list', tasks: JT, tickets: JK }), j = J.page;
418
418
  await j.evaluate(() => { const b = [...document.querySelectorAll('#czViewer .iv-grp')].find((x) => /^Done/.test(x.textContent)); if (b) b.click(); });
419
419
  await sleep(200);
420
420
  const L = await j.evaluate(() => { const row = (re) => [...document.querySelectorAll('#czViewer .iv-tr')].find((r) => re.test(r.textContent));
@@ -464,7 +464,7 @@ const IF = require('./fixtures/initiative-premium-facts.js');
464
464
  await J.ctx.close();
465
465
  // By epic: a task linked to a ticket its draft put in Jira shows once, as the ticket, with the task's bar on the Timeline
466
466
  const DR = { ok: true, drafted: 2, groups: [], epic: {}, tickets: [{ id: 'S1', summary: 'Plan block at the top', inJira: true, key: 'MSD-4377', jira: { status: 'In Review', category: 'doing' } }, { id: 'S2', summary: 'FAQ section', inJira: false, selectable: true }] };
467
- const E = await openH({ where: 'board', w: 1440, h: 900, view: 'timeline', tasks: JT, tickets: JK.slice(0, 1), drafts: DR }), e = E.page;
467
+ const E = await openH({ where: 'board', w: 1520, h: 900, view: 'timeline', tasks: JT, tickets: JK.slice(0, 1), drafts: DR }), e = E.page;
468
468
  await e.click('#czViewer [data-iv-vbtn]'); await until(() => e.evaluate(() => !!document.querySelector('.tkc.ivq .ivs [data-ivs-more]')));
469
469
  await e.click('.tkc.ivq .ivs [data-ivs-more]');
470
470
  await until(() => e.evaluate(() => !!document.querySelector('.ig-pop [role="menuitemradio"]')));
@@ -485,7 +485,7 @@ const IF = require('./fixtures/initiative-premium-facts.js');
485
485
  { uid: 'j2', title: 'Plan block at the top [MSD-4377]', status: 'To do', owner: 'Wawan', start: '2026-10-14', end: '2026-10-22' },
486
486
  ];
487
487
  const JK = [{ key: 'MSD-4376', title: 'Microsite page', status: 'Done', raw: 'Closed' }, { key: 'MSD-4377', title: 'Plan block', status: 'In progress', raw: 'In Review' }];
488
- const J = await openH({ where: 'board', w: 1440, h: 900, view: 'kanban', tasks: JT, tickets: JK }), j = J.page;
488
+ const J = await openH({ where: 'board', w: 1520, h: 900, view: 'kanban', tasks: JT, tickets: JK }), j = J.page;
489
489
  const asks = [], answers = { 'mv-0000000001': [{ state: 'moving' }, { state: 'moved', status: 'In Review' }], 'mv-0000000003': [{ state: 'refused', why: 'it needs a fix version.' }] };
490
490
  await j.route('**/api/jira/move*', (r) => { const rq = r.request();
491
491
  if (rq.method() === 'POST') { const b = JSON.parse(rq.postData() || '{}'); asks.push(b); return r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, id: 'mv-' + String(asks.length).padStart(10, '0'), move: { key: b.key, to: b.to, state: 'moving' } }) }); }
@@ -536,7 +536,7 @@ const IF = require('./fixtures/initiative-premium-facts.js');
536
536
  await J.ctx.close();
537
537
  // while the agent works: the row is drawn where the PM moved it, its square a dashed outline, "Moving in Jira"
538
538
  const JKm = [JK[0], { ...JK[1], status: 'Done', move: { id: 'mv-0000000009', state: 'moving', to: 'Done', from: 'In progress' } }];
539
- const W = await openH({ where: 'board', w: 1440, h: 900, view: 'list', tasks: JT, tickets: JKm }), q = W.page;
539
+ const W = await openH({ where: 'board', w: 1520, h: 900, view: 'list', tasks: JT, tickets: JKm }), q = W.page;
540
540
  const mvr = await until(() => q.evaluate(() => { const r = [...document.querySelectorAll('#czViewer .iv-tr')].find((x) => /Plan block/.test(x.textContent)); return r ? { mv: !!r.querySelector('.iv-jq.mv'), txt: (r.querySelector('.iv-jmv') || {}).textContent || '', sq: getComputedStyle(r.querySelector('.iv-jq')).borderStyle } : null; }));
541
541
  ok('H8 moving: a dashed square and "Moving in Jira" on the row', !!mvr && mvr.mv && mvr.txt === 'Moving in Jira' && mvr.sq === 'dashed', JSON.stringify(mvr));
542
542
  await shot(q, 'jira-moving-1440');
@@ -554,7 +554,7 @@ const IF = require('./fixtures/initiative-premium-facts.js');
554
554
  { uid: 's6', title: 'API contract', status: 'Done', owner: 'Una', start: '2026-09-29', end: '2026-10-03' },
555
555
  ];
556
556
  for (const theme of ['light', 'dark']) {
557
- const B = await openH({ where: 'board', w: 1440, h: 900, theme, tasks: STASKS });
557
+ const B = await openH({ where: 'board', w: 1520, h: 900, theme, tasks: STASKS });
558
558
  await B.page.evaluate(() => { if (window.czViewer && window.czViewer.wide) window.czViewer.wide(true); }); // the Viewer as wide as the split panel makes it
559
559
  await sleep(400);
560
560
  const S1 = await B.page.evaluate(() => {
@@ -0,0 +1,9 @@
1
+ {
2
+ "_comment": "One popup with the chat (one-popup-with-chat, done test T1-T3, T5, T7): the pure session rows (public/pm/pop-sessions.js), the Viewer's header in the popup, and a read of cozy-popup.js. No browser.",
3
+ "modules": [
4
+ "one-popup.test.js"
5
+ ],
6
+ "seconds": {
7
+ "one-popup.test.js": 1
8
+ }
9
+ }
@@ -12,6 +12,7 @@ const fs = require('fs');
12
12
  const path = require('path');
13
13
  const { spawn } = require('child_process');
14
14
  const { findBrowser } = require('./lib/find-browser');
15
+ const { besidePage } = require('./lib/beside-page'); // these checks are about work beside the page, not the popup
15
16
  const { openMission } = require('./lib/open-mission');
16
17
  const T = require('./test-run').configure({ name: 'tk-tasks' });
17
18
  const IP = require('./lib/initiative-premium.js');
@@ -76,7 +77,7 @@ const LAYOUT = { ok: true, auto: true, held: [], by: 'stage', names: [], of: {},
76
77
  try { ({ chromium } = require('playwright-core')); } catch { console.log('✗ playwright-core is not installed'); return finish(1); }
77
78
  srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT), PMOS_SELF_ROOT: path.resolve(__dirname, '..') }) });
78
79
  await T.waitForServer(BASE);
79
- browser = await chromium.launch({ executablePath: exe });
80
+ browser = besidePage(await chromium.launch({ executablePath: exe }));
80
81
 
81
82
  // the layout answers like lib/initiative-layout.js folds it: a press changes it, and the next read sees the change
82
83
  const open = async ({ w = 1440, h = 900, theme = 'light', view = VIEW, layout = {}, page: pg = 'home', touch = false } = {}) => {
@@ -53,7 +53,7 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
53
53
  html: `<p>${x}</p>${['A', 'B', 'C', 'D', 'E'].filter((y) => y !== x).map((y) => `<button type="button" data-tgo="${y}">${y}</button>`).join('')}` });
54
54
  window.__item = item;
55
55
  document.addEventListener('click', (e) => { const b = e.target.closest('[data-tgo]'); if (b) setTimeout(() => window.czViewer.open(item(b.dataset.tgo)), 30); }); // a module that reads first
56
- const o = document.createElement('div'); o.id = 'tOut'; o.style.cssText = 'position:fixed;left:8px;bottom:8px;z-index:1;display:flex;gap:4px';
56
+ const o = document.createElement('div'); o.id = 'tOut'; o.style.cssText = 'position:fixed;left:8px;bottom:8px;z-index:100;display:flex;gap:4px';
57
57
  o.innerHTML = '<button type="button" data-tgo="A">A</button><button type="button" data-tgo="E">E</button>';
58
58
  document.body.append(o);
59
59
  });
@@ -90,7 +90,7 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
90
90
  };
91
91
  // Settings › Workspaces › Workflows the PM's way: the menu, Settings, Workspaces, the Workflows row
92
92
  const openWf = async (pg) => {
93
- await pg.click('#czFab'); await pg.click('[data-cz-settings]');
93
+ if (await pg.isVisible('#czFab')) await pg.click('#czFab'); await pg.click('[data-cz-settings]');
94
94
  await pg.click('#evSettings [data-ev-sec="workspaces"]'); await pg.click('#evSettings [data-ev-sub="workflows"]');
95
95
  await pg.waitForSelector('#evSettings #wfMain', { timeout: 8000 }).catch(() => {});
96
96
  };