create-pmos 0.631.0 → 0.633.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.
- package/package.json +27 -69
- package/payload/KIT-VERSION +1 -1
- package/payload/planning/evals/eval-calibration.md +1 -1
- package/payload/planning/okrs/health-budgets.md +1 -1
- package/payload/state/discoveries.md +1 -1
- package/workspace/briefing-premium-adddoc-test.js +3 -0
- package/workspace/briefing-premium-board-test.js +4 -2
- package/workspace/briefing-premium-doc-edit-test.js +3 -0
- package/workspace/briefing-premium-initiative-test.js +4 -0
- package/workspace/briefing-premium-insights-test.js +1 -1
- package/workspace/briefing-premium-sources-test.js +2 -2
- package/workspace/changelog.json +26 -0
- package/workspace/core-docs-workflow-test.js +3 -0
- package/workspace/ev-everywhere-test.js +7 -17
- package/workspace/guide/layout.md +12 -5
- package/workspace/guide/notes.md +7 -3
- package/workspace/ini-workflow-test.js +3 -0
- package/workspace/lib/extension-cli.js +4 -1
- package/workspace/lib/extension-setup.js +93 -0
- package/workspace/lib/meeting-focus.js +5 -3
- package/workspace/lib/route-modules.js +1 -0
- package/workspace/lib/routes-extension.js +23 -0
- package/workspace/lib/routes-meeting-focus.js +2 -2
- package/workspace/live-pill-round-test.js +7 -2
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/premium-board-actions-test.js +3 -1
- package/workspace/premium-vw-backlog-test.js +2 -2
- package/workspace/premium-vw-doc-test.js +3 -0
- package/workspace/premium-vw-item-test.js +1 -1
- package/workspace/premium-vw-jira-test.js +4 -3
- package/workspace/public/pm/bd-ini-panel.js +4 -1
- package/workspace/public/pm/bd-prog-panel.js +3 -3
- package/workspace/public/pm/bd-views.js +8 -2
- package/workspace/public/pm/buddy-core.js +2 -2
- package/workspace/public/pm/cozy-board.css +15 -0
- package/workspace/public/pm/cozy-buddy.js +2 -0
- package/workspace/public/pm/cozy-ev.css +25 -0
- package/workspace/public/pm/cozy-ext.js +76 -0
- package/workspace/public/pm/cozy-home.css +38 -2
- package/workspace/public/pm/cozy-nav.js +72 -6
- package/workspace/public/pm/cozy-phone-rec.css +68 -0
- package/workspace/public/pm/cozy-phone-rec.js +105 -0
- package/workspace/public/pm/cozy-phone-settings.css +18 -0
- package/workspace/public/pm/cozy-phone-settings.js +73 -0
- package/workspace/public/pm/cozy-phone-swipe.js +51 -0
- package/workspace/public/pm/cozy-pop-work.css +56 -0
- package/workspace/public/pm/cozy-pop-work.js +72 -4
- package/workspace/public/pm/cozy-rec-tab.js +10 -0
- package/workspace/public/pm/cozy-settings.js +6 -2
- package/workspace/public/pm/cozy-today-app.js +56 -5
- package/workspace/public/pm/cozy-today-page.css +75 -1
- package/workspace/public/pm/cozy-today-view.js +87 -0
- package/workspace/public/pm/cozy-viewer.js +27 -7
- package/workspace/public/pm/home-app.js +31 -2
- package/workspace/public/pm/home-chat.js +8 -0
- package/workspace/public/pm/home-ini.js +7 -3
- package/workspace/public/pm/phone-ask.js +57 -0
- package/workspace/split-merge-ui-test.js +3 -1
- package/workspace/stage-card-tasks-test.js +6 -0
- package/workspace/stage-card-test.js +3 -0
- package/workspace/task-delete-test.js +3 -0
- package/workspace/task-links-test.js +3 -0
- package/workspace/task-plans-test.js +3 -0
- package/workspace/task-views-test.js +3 -0
- package/workspace/test-lists/meeting-buddy.json +1 -1
- package/workspace/test-lists/phone-design-v2.json +9 -0
- package/workspace/tk-tasks-test.js +4 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pmos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.633.0",
|
|
4
4
|
"description": "Scaffold the PMOS portable kit — run the PMOS product-management workflow (initiative → lane-fit spec → contract → build → three gates, with work-type lanes for features, research, maintenance, incidents, and content) entirely inside your own repo, with all state as git-versioned files. Includes `workflow-sweep`, which audits the state every board derives from and separates real defects from work you simply have not done. `create-pmos workspace` also installs + launches the local Terminal Workspace GUI. No database, no network, no telemetry.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|
|
@@ -33,6 +33,32 @@
|
|
|
33
33
|
"audit"
|
|
34
34
|
],
|
|
35
35
|
"pmosChanges": [
|
|
36
|
+
{
|
|
37
|
+
"v": "0.633.0",
|
|
38
|
+
"at": "2026-11-19T13:29:42.454Z",
|
|
39
|
+
"f": 4,
|
|
40
|
+
"prs": [
|
|
41
|
+
{
|
|
42
|
+
"n": 1415,
|
|
43
|
+
"t": "Build the agreed phone design (Ph2 boards)",
|
|
44
|
+
"s": "Build the agreed phone design (Ph2 boards)",
|
|
45
|
+
"k": "new"
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"v": "0.632.0",
|
|
51
|
+
"at": "2026-11-19T11:23:46.354Z",
|
|
52
|
+
"f": 4,
|
|
53
|
+
"prs": [
|
|
54
|
+
{
|
|
55
|
+
"n": 1414,
|
|
56
|
+
"t": "Set up the Meet panel from Settings › Connectors › Google Meet",
|
|
57
|
+
"s": "Set up the Meet panel from Settings › Connectors › Google Meet",
|
|
58
|
+
"k": "new"
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
},
|
|
36
62
|
{
|
|
37
63
|
"v": "0.631.0",
|
|
38
64
|
"at": "2026-11-19T11:03:25.147Z",
|
|
@@ -386,74 +412,6 @@
|
|
|
386
412
|
"k": "new"
|
|
387
413
|
}
|
|
388
414
|
]
|
|
389
|
-
},
|
|
390
|
-
{
|
|
391
|
-
"v": "0.611.0",
|
|
392
|
-
"at": "2026-11-19T00:02:26.120Z",
|
|
393
|
-
"f": 4,
|
|
394
|
-
"prs": [
|
|
395
|
-
{
|
|
396
|
-
"n": 1366,
|
|
397
|
-
"t": "The rail and the popup together keep main green",
|
|
398
|
-
"s": "The rail and the popup together keep main green",
|
|
399
|
-
"k": "fix"
|
|
400
|
-
},
|
|
401
|
-
{
|
|
402
|
-
"n": 1363,
|
|
403
|
-
"t": "Work, one list of initiatives with its timeline (nav slice 4)",
|
|
404
|
-
"s": "Work, one list of initiatives with its timeline (nav slice 4)",
|
|
405
|
-
"k": "new"
|
|
406
|
-
},
|
|
407
|
-
{
|
|
408
|
-
"n": 1364,
|
|
409
|
-
"t": "Today page, a daily log beside today's agenda (nav slice 5)",
|
|
410
|
-
"s": "Today page, a daily log beside today's agenda (nav slice 5)",
|
|
411
|
-
"k": "new"
|
|
412
|
-
},
|
|
413
|
-
{
|
|
414
|
-
"n": 1362,
|
|
415
|
-
"t": "Events, one place for everything with a date (nav slice 6)",
|
|
416
|
-
"s": "Events, one place for everything with a date (nav slice 6)",
|
|
417
|
-
"k": "new"
|
|
418
|
-
},
|
|
419
|
-
{
|
|
420
|
-
"n": 1367,
|
|
421
|
-
"t": "Library, one table of everything that was made (slice 7)",
|
|
422
|
-
"s": "Library, one table of everything that was made (slice 7)",
|
|
423
|
-
"k": "new"
|
|
424
|
-
},
|
|
425
|
-
{
|
|
426
|
-
"n": 1365,
|
|
427
|
-
"t": "What the popup shows for work (nav slice 3)",
|
|
428
|
-
"s": "What the popup shows for work (nav slice 3)",
|
|
429
|
-
"k": "new"
|
|
430
|
-
},
|
|
431
|
-
{
|
|
432
|
-
"n": 1361,
|
|
433
|
-
"t": "Routine, everything that repeats in one place, and a report in the popup (slice 8)",
|
|
434
|
-
"s": "Routine, everything that repeats in one place, and a report in the popup (slice 8)",
|
|
435
|
-
"k": "new"
|
|
436
|
-
}
|
|
437
|
-
]
|
|
438
|
-
},
|
|
439
|
-
{
|
|
440
|
-
"v": "0.610.0",
|
|
441
|
-
"at": "2026-11-18T19:58:43.558Z",
|
|
442
|
-
"f": 4,
|
|
443
|
-
"prs": [
|
|
444
|
-
{
|
|
445
|
-
"n": 1359,
|
|
446
|
-
"t": "The navigation of six places, one thin rail on every page (slice 1)",
|
|
447
|
-
"s": "The navigation of six places, one thin rail on every page (slice 1)",
|
|
448
|
-
"k": "new"
|
|
449
|
-
},
|
|
450
|
-
{
|
|
451
|
-
"n": 1360,
|
|
452
|
-
"t": "One popup with the chat",
|
|
453
|
-
"s": "One popup with the chat",
|
|
454
|
-
"k": "new"
|
|
455
|
-
}
|
|
456
|
-
]
|
|
457
415
|
}
|
|
458
416
|
]
|
|
459
417
|
}
|
package/payload/KIT-VERSION
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Reference
|
|
3
3
|
title: "Eval calibration log"
|
|
4
4
|
description: "Append-only record of every PM override of an evaluator verdict."
|
|
5
|
-
generated: {by: process:create-pmos, at: "2026-11-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-19T13:29:39Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Reference
|
|
3
3
|
title: "Health budgets"
|
|
4
4
|
description: "Closed registry of health-budget anchors (D59), edited only by the PM."
|
|
5
|
-
generated: {by: process:create-pmos, at: "2026-11-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-19T13:29:39Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Reference
|
|
3
3
|
title: "Discoveries and friction log"
|
|
4
4
|
description: "Append-only record of what runs discovered and where the process rubbed."
|
|
5
|
-
generated: {by: process:create-pmos, at: "2026-11-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-19T13:29:39Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -13,6 +13,8 @@ const IP = require('./lib/initiative-premium.js');
|
|
|
13
13
|
const IF = require('./fixtures/initiative-premium-facts.js');
|
|
14
14
|
|
|
15
15
|
const BASE = T.BASE;
|
|
16
|
+
// the phone design (Ph2_init): a phone shows an initiative as the popup's phone page; the old page is ⋯ › Every part
|
|
17
|
+
const everyPart = async (pg) => { await pg.waitForSelector('#czViewer .pw-ph', { state: 'attached', timeout: 20000 }); await pg.evaluate(() => { const r = (window.__czVwMore ? window.__czVwMore(document.body) : []).find((x) => x.label === 'Every part'); if (r) r.go(); }); await pg.waitForTimeout(800); };
|
|
16
18
|
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
17
19
|
const until = async (fn, ms = 10000, step = 100) => { const t0 = Date.now(); for (;;) { const v = await fn(); if (v) return v; if (Date.now() - t0 > ms) return v; await sleep(step); } };
|
|
18
20
|
const results = [];
|
|
@@ -56,6 +58,7 @@ const PAGES = {
|
|
|
56
58
|
await page.route('**/api/custom-docs/**', (r) => { const rq = r.request(); posts.push({ path: new URL(rq.url()).pathname, body: JSON.parse(rq.postData() || '{}'), headers: rq.headers() }); r.fulfill({ status: reply.status, contentType: 'application/json', body: JSON.stringify(reply.body) }); });
|
|
57
59
|
await page.route('**/api/briefing-premium/**', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, turns: [], working: false }) }));
|
|
58
60
|
await page.goto(BASE + P.file + P.qs + theme);
|
|
61
|
+
if (w <= 760 && kind === 'initiative') await everyPart(page);
|
|
59
62
|
let up = await until(() => page.evaluate((s) => !!document.querySelector(s), P.ready), 20000);
|
|
60
63
|
if (up && kind === 'initiative') { /* the page holds the Tasks (batch 11 item 20) */ await docsView(page); up = await until(() => page.evaluate((s) => !!document.querySelector(s), P.btn), 20000); } // the Overview holds the button
|
|
61
64
|
return { ctx, page, errors, posts, up, calls: () => calls, setCustom: (c) => { current = c; }, reply: (a) => { reply = a; } };
|
|
@@ -26,6 +26,8 @@ const FJ = require('./fixtures/board-premium-jira.js');
|
|
|
26
26
|
const FT = require('./fixtures/board-premium-trail.js');
|
|
27
27
|
|
|
28
28
|
const BASE = T.BASE;
|
|
29
|
+
// the phone design (Ph2_init): a phone shows an initiative as the popup's phone page; the old page is ⋯ › Every part
|
|
30
|
+
const everyPart = async (pg) => { await pg.waitForSelector('#czViewer .pw-ph', { state: 'attached', timeout: 20000 }); await pg.evaluate(() => { const r = (window.__czVwMore ? window.__czVwMore(document.body) : []).find((x) => x.label === 'Every part'); if (r) r.go(); }); await pg.waitForTimeout(800); };
|
|
29
31
|
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
30
32
|
/* SHOTS_1B=<dir>: the Viewer as it is now, light and dark, at 1440 and 390 wide (batch 6 item 1b's screenshots); the page is put back after. */
|
|
31
33
|
const four = async (p, name) => {
|
|
@@ -446,7 +448,7 @@ const IVREAD = () => {
|
|
|
446
448
|
for (const theme of ['light', 'dark']) {
|
|
447
449
|
const R = await open({ w: 390, h: 844, theme, model: BP.build(FJ.facts()) }), q = R.page;
|
|
448
450
|
const m = await q.evaluate(() => { const small = [...document.querySelectorAll('#ibBody .bt-nm, #bdChipset .bd-chip, .bd-tab, #newIni, #bdFind, #bdView, #bdFilter')].filter((b) => !b.closest('[hidden]') && b.getBoundingClientRect().height > 0 && b.getBoundingClientRect().height < 44).map((b) => b.className + ':' + Math.round(b.getBoundingClientRect().height)); const fab = document.querySelector('#czFab').getBoundingClientRect(); return { over: document.documentElement.scrollWidth > innerWidth + 1, small, fabRight: Math.round(innerWidth - fab.right), top: Math.round(document.querySelector('.bd-hd').getBoundingClientRect().height), chips: [...document.querySelectorAll('#bdChipset .bd-chip')].map((b) => b.textContent.replace(/\s+/g, ' ').trim()), rows: document.querySelectorAll('.bd-hd').length + document.querySelectorAll('.bd-chiprow').length, jira: !!document.querySelector('.bd-hd #chJira'), order: [...document.querySelectorAll('.bd-hd button')].filter((b) => b.offsetParent && !b.closest('.bd-grpm')).map((b) => b.id).join() }; });
|
|
449
|
-
ok(`B13 at 390 px (${theme}) the page has no sideways scroll, the top bar is ONE line (batch 28 item 3), the menu sits bottom right, and every control is 44 px
|
|
451
|
+
ok(`B13 at 390 px (${theme}) the page has no sideways scroll, the top bar is ONE line (batch 28 item 3), the menu sits bottom right, and every control is 44 px`.replace('the menu sits bottom right', 'the ⋯ menu sits at the right'), !m.over && m.small.length === 0 && m.fabRight < 40 && m.top <= 56 && m.rows === 1, JSON.stringify(m));
|
|
450
452
|
ok(`B13 at 390 px (${theme}) the one row is the picker, the view button, the one pill for what needs a look, Find, the tune button and New; no Jira face, no Shared chip, no workflow chips (BhA)`, m.chips.join() === '1131' && !m.jira && m.order === 'bdPick,bdView,chNeed,bdFind,bdFilter,newIni', JSON.stringify(m));
|
|
451
453
|
await q.click('#bdView');
|
|
452
454
|
const pl = await q.evaluate(() => ({ groups: [...document.querySelectorAll('#ibBody .bd-ghd')].map((g) => g.textContent.replace(/\s+/g, ' ').trim()), shared: /Shared with me/.test((document.querySelector('#bdViewMenu [data-vshared]') || {}).textContent || ''), seg: [...document.querySelectorAll('#bdViewMenu [data-pv]')].map((b) => b.textContent + (b.getAttribute('aria-pressed') === 'true' ? '*' : '')).join(), note: /Timeline needs a wider screen/.test(document.querySelector('#ibBody').textContent), small: [...document.querySelectorAll('#bdViewMenu [data-pv], #ibBody .bd-lrow')].filter((b) => b.getBoundingClientRect().height < 44).length }));
|
|
@@ -457,7 +459,7 @@ const IVREAD = () => {
|
|
|
457
459
|
/* re-pointed (viewer-shell-a, XvABoard; batch 14 item 5): on a phone the Viewer covers the screen; ⋯ Move to a stage opens the stages as a sheet */
|
|
458
460
|
const g = await until(() => q.evaluate(() => { const v = document.querySelector('#czViewer'); if (!v || v.hidden) return null; const r = v.getBoundingClientRect(); return { l: Math.round(r.left), w: Math.round(r.width), h: Math.round(r.height), vw: innerWidth, vh: innerHeight }; }));
|
|
459
461
|
ok(`B13 at 390 px (${theme}) the initiative covers the screen`, !!g && g.l === 0 && g.w === g.vw && g.h === g.vh, JSON.stringify(g));
|
|
460
|
-
await spOpen(q);
|
|
462
|
+
await everyPart(q); await spOpen(q);
|
|
461
463
|
ok(`B13 at 390 px (${theme}) the stage chip opens the stages as a sheet across the width, with 44 px rows, and no dialog`, await until(() => q.evaluate(() => { const m = document.querySelector('.hi-pop'); if (!m) return false; const r = m.getBoundingClientRect(); return m.classList.contains('sheet') && Math.round(r.left) === 0 && Math.round(r.width) === innerWidth && m.querySelectorAll('[data-sp-go]').length >= 3 && [...m.querySelectorAll('.hi-mi')].every((b) => b.getBoundingClientRect().height >= 44) && !document.querySelector('#dlg.on'); })));
|
|
462
464
|
await q.keyboard.press('Escape');
|
|
463
465
|
ok(`0 no page error at 390 px (${theme})`, R.errors.length === 0, R.errors.join(' | '));
|
|
@@ -17,6 +17,8 @@ const IP = require('./lib/initiative-premium.js');
|
|
|
17
17
|
const F = require('./fixtures/initiative-premium-facts.js');
|
|
18
18
|
|
|
19
19
|
const BASE = T.BASE;
|
|
20
|
+
// the phone design (Ph2_init): a phone shows an initiative as the popup's phone page; the old page is ⋯ › Every part
|
|
21
|
+
const everyPart = async (pg) => { await pg.waitForSelector('#czViewer .pw-ph', { state: 'attached', timeout: 20000 }); await pg.evaluate(() => { const r = (window.__czVwMore ? window.__czVwMore(document.body) : []).find((x) => x.label === 'Every part'); if (r) r.go(); }); await pg.waitForTimeout(800); };
|
|
20
22
|
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
21
23
|
const until = async (fn, ms = 10000, step = 100) => { const t0 = Date.now(); for (;;) { const v = await fn(); if (v) return v; if (Date.now() - t0 > ms) return v; await sleep(step); } };
|
|
22
24
|
const results = [];
|
|
@@ -77,6 +79,7 @@ const prop = (o) => Object.assign({ id: 'prop-a', state: 'proposed', prompt: 'ad
|
|
|
77
79
|
await page.route('**/api/docs/library*', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, kinds: [], files: [{ path: PATH, title: 'Self-serve PRD' }], edges: [] }) }));
|
|
78
80
|
await page.route('**/api/docs?*', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, docs: [{ path: PATH, links: [] }] }) }));
|
|
79
81
|
await page.goto(BASE + '/premium.html?ini=self-serve-v2&ws=w1&theme=' + theme);
|
|
82
|
+
if (w <= 760) await everyPart(page);
|
|
80
83
|
// the initiative's page in the Viewer (canvas HbC): its Documents' "Show all N" opens every document there
|
|
81
84
|
await until(() => page.evaluate(() => !!document.querySelector('#czViewer [data-iv-docs]')), 15000);
|
|
82
85
|
await page.click('#czViewer [data-iv-docs]');
|
|
@@ -44,6 +44,8 @@ const BOARD = BP.build(BF.facts());
|
|
|
44
44
|
const BRIEF = BRP.build(BRF.facts());
|
|
45
45
|
const WRITES = /^\/api\/(?:boards\/(?:move|tasks\/(?:add|state))|lifecycle|core-docs\/draft|task-plans\/propose)$/;
|
|
46
46
|
|
|
47
|
+
// the phone design (Ph2_init): a phone shows an initiative as the popup's phone page; the old page is ⋯ › Every part
|
|
48
|
+
const everyPart = async (pg) => { await pg.waitForSelector('#czViewer .pw-ph', { state: 'attached', timeout: 20000 }); await pg.evaluate(() => { const r = (window.__czVwMore ? window.__czVwMore(document.body) : []).find((x) => x.label === 'Every part'); if (r) r.go(); }); await pg.waitForTimeout(800); };
|
|
47
49
|
(async () => {
|
|
48
50
|
const exe = findBrowser();
|
|
49
51
|
if (!exe) { console.log('✗ no Chrome/Chromium on this machine — the suite cannot run'); return finish(1); }
|
|
@@ -231,6 +233,7 @@ const WRITES = /^\/api\/(?:boards\/(?:move|tasks\/(?:add|state))|lifecycle|core-
|
|
|
231
233
|
/* I12 floors at 390 */
|
|
232
234
|
{
|
|
233
235
|
const N = await open({ w: 390, h: 844 });
|
|
236
|
+
await everyPart(N.page);
|
|
234
237
|
await overview(N.page, null);
|
|
235
238
|
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)));
|
|
236
239
|
const fls = [];
|
|
@@ -261,6 +264,7 @@ const WRITES = /^\/api\/(?:boards\/(?:move|tasks\/(?:add|state))|lifecycle|core-
|
|
|
261
264
|
* menu. The colours are read from the page's own tokens, so each theme is checked against itself. */
|
|
262
265
|
for (const [w, h] of [[1440, 900], [390, 844]]) for (const th of ['light', 'dark']) {
|
|
263
266
|
const R = await open({ w, h, theme: th });
|
|
267
|
+
if (w <= 760) await everyPart(R.page);
|
|
264
268
|
const g = await R.page.evaluate(() => {
|
|
265
269
|
const tok = (v) => { const x = document.createElement('i'); x.style.setProperty('background-color', 'var(' + v + ')'); document.body.appendChild(x); const c = getComputedStyle(x).backgroundColor; x.remove(); return c; };
|
|
266
270
|
const cs = (s) => { const e = document.querySelector(s); return e ? getComputedStyle(e) : null; };
|
|
@@ -603,7 +603,7 @@ const BMR = { ok: true, state: 'ready', model: { tiles: [
|
|
|
603
603
|
const f = await R.page.evaluate(() => { const cs = (s) => getComputedStyle(document.querySelector(s)); const main = cs('main.ins'), tab = cs('#viewChip'), strip = cs('#insHero'), row = document.querySelector('#goalTbl .ins-row').getBoundingClientRect();
|
|
604
604
|
return { font: cs('body').fontFamily, radius: main.borderTopLeftRadius, bg: main.backgroundColor, tabBg: tab.backgroundColor, tabR: tab.borderTopLeftRadius, tabW: tab.fontWeight, stripR: strip.borderTopLeftRadius, stripBg: strip.backgroundColor, rowH: Math.round(row.height), over: document.documentElement.scrollWidth > innerWidth, fab: document.querySelector('#czFab').getBoundingClientRect().width, rail: document.querySelector('#czMenu.ev-rail') ? Math.round(document.querySelector('#czMenu.ev-rail').getBoundingClientRect().width) : 0, fabX: Math.round(document.querySelector('#czFab').getBoundingClientRect().left) }; });
|
|
605
605
|
const phone = w < 720;
|
|
606
|
-
ok(`I11 the page wears the Agreed design at ${w} px: Plus Jakarta Sans, the white panel, the pill View chip, the well strip,
|
|
606
|
+
ok(`I11 the page wears the Agreed design at ${w} px: Plus Jakarta Sans, the white panel, the pill View chip, the well strip, the 44 px ⋯ at the top right on a phone (phone design, Ph2_menu), the 72 px rail of places on a desktop (slice 1)`, /^"?Plus Jakarta Sans/.test(f.font) && f.radius === (phone ? '0px' : '28px') && (phone || f.bg === 'rgb(255, 255, 255)') && f.tabBg === 'rgb(244, 243, 240)' && f.tabR === '999px' && +f.tabW >= 600 && (phone || (f.stripR === '16px' && f.stripBg === 'rgb(244, 243, 240)' && f.rowH >= 60)) && !f.over && (phone ? f.fab === 44 && f.fabX > 300 : f.rail === 72), JSON.stringify(f));
|
|
607
607
|
if (!phone) {
|
|
608
608
|
await toTrends(R.page);
|
|
609
609
|
const t = await R.page.evaluate(() => { const tiles = [...document.querySelectorAll('#bmBody [data-tile]')].map((x) => x.getBoundingClientRect()); return { n: tiles.length, tileH: tiles.length ? Math.round(tiles[0].height) : 0, over: document.documentElement.scrollWidth > innerWidth }; });
|
|
@@ -145,7 +145,7 @@ const sh = (cwd, args) => spawnSync('git', args, { cwd, encoding: 'utf8' });
|
|
|
145
145
|
ok('H1 GET /api/sources carries the background health: a level, a line and the issues', h && ['ok', 'warn', 'bad'].includes(h.level) && typeof h.line === 'string' && h.line.length > 10 && Array.isArray(h.issues), JSON.stringify(h));
|
|
146
146
|
const shot = process.env.PMOS_SHOT_DIR || '';
|
|
147
147
|
for (const theme of ['light', 'dark']) {
|
|
148
|
-
const { ctx, page, errors } = await open({ theme, w:
|
|
148
|
+
const { ctx, page, errors } = await open({ theme, w: 1280, h: 844 }); // Connectors are in the computer's Settings: a phone's Settings is one screen (phone design, Ph2_more)
|
|
149
149
|
// premium-agreed-design (shared foundation): the design draws no Sources chip, so there is no dot on the page; the level is still read (GET /api/sources)
|
|
150
150
|
const dot = await page.evaluate(() => (document.querySelector('#srcDot, #srcChip') ? 'drawn' : 'none'));
|
|
151
151
|
await moreItem(page, 'Sources', '.ev-reads');
|
|
@@ -164,7 +164,7 @@ const sh = (cwd, args) => spawnSync('git', args, { cwd, encoding: 'utf8' });
|
|
|
164
164
|
ok('H5 the Today/Needs you footer and the tab count are gone (CnA)', list && !list.footer && !list.count, JSON.stringify(list));
|
|
165
165
|
ok('H3 no Sources chip and no dot are drawn on the page (premium-agreed-design)', dot === 'none', dot);
|
|
166
166
|
if (shot) await page.screenshot({ path: path.join(shot, 'cards-reads-light.png'), fullPage: true });
|
|
167
|
-
} else ok('H4
|
|
167
|
+
} else ok('H4 in dark the list fits: no sideways scroll', list && list.sw <= 1280 && list.w > 0, JSON.stringify(list));
|
|
168
168
|
if (shot) { await sleep(1200); await page.screenshot({ path: path.join(shot, 'sources-health-' + theme + '.png') }); }
|
|
169
169
|
ok('H no page error (' + theme + ')', errors.length === 0, errors.join(' | '));
|
|
170
170
|
await ctx.close();
|
package/workspace/changelog.json
CHANGED
|
@@ -1,4 +1,30 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"v": "0.633.0",
|
|
4
|
+
"at": "2026-11-19T13:29:42.454Z",
|
|
5
|
+
"f": 4,
|
|
6
|
+
"prs": [
|
|
7
|
+
{
|
|
8
|
+
"n": 1415,
|
|
9
|
+
"t": "Build the agreed phone design (Ph2 boards)",
|
|
10
|
+
"s": "Build the agreed phone design (Ph2 boards)",
|
|
11
|
+
"k": "new"
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"v": "0.632.0",
|
|
17
|
+
"at": "2026-11-19T11:23:46.354Z",
|
|
18
|
+
"f": 4,
|
|
19
|
+
"prs": [
|
|
20
|
+
{
|
|
21
|
+
"n": 1414,
|
|
22
|
+
"t": "Set up the Meet panel from Settings › Connectors › Google Meet",
|
|
23
|
+
"s": "Set up the Meet panel from Settings › Connectors › Google Meet",
|
|
24
|
+
"k": "new"
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
},
|
|
2
28
|
{
|
|
3
29
|
"v": "0.631.0",
|
|
4
30
|
"at": "2026-11-19T11:03:25.147Z",
|
|
@@ -24,6 +24,8 @@ const WF = require('../scripts/workflows.js');
|
|
|
24
24
|
|
|
25
25
|
const BASE = T.BASE;
|
|
26
26
|
const SHOTS = process.env.SHOTS || '';
|
|
27
|
+
// the phone design (Ph2_init): a phone shows an initiative as the popup's phone page; the old page is ⋯ › Every part
|
|
28
|
+
const everyPart = async (pg) => { await pg.waitForSelector('#czViewer .pw-ph', { state: 'attached', timeout: 20000 }); await pg.evaluate(() => { const r = (window.__czVwMore ? window.__czVwMore(document.body) : []).find((x) => x.label === 'Every part'); if (r) r.go(); }); await pg.waitForTimeout(800); };
|
|
27
29
|
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
28
30
|
const until = async (fn, ms = 10000, step = 100) => { const t0 = Date.now(); for (;;) { const v = await fn(); if (v) return v; if (Date.now() - t0 > ms) return v; await sleep(step); } };
|
|
29
31
|
const results = [];
|
|
@@ -101,6 +103,7 @@ const OLD = new Map([['initiative:' + ID + '|risks', { drafts: [], issued: { at:
|
|
|
101
103
|
await page.route(/\/api\/workflows(\?.*)?$/, (r) => json(r, { ok: true, workflows: WF.list(LIB) }));
|
|
102
104
|
await page.addInitScript(() => { try { localStorage.setItem('pmos.wf.seen', JSON.stringify({ 'self-serve-v2|tender': 1 })); } catch { /* none */ } });
|
|
103
105
|
await page.goto(BASE + '/premium.html?ini=' + ID + '&ws=w1&board=w1&theme=' + theme);
|
|
106
|
+
if (w <= 760) await everyPart(page);
|
|
104
107
|
let up = await until(() => page.evaluate(() => !!document.querySelector('#czViewer:not([hidden]) [data-hi-v]')), 30000);
|
|
105
108
|
if (up) {
|
|
106
109
|
if (await page.$('#czViewer [data-hi-v="page"] [data-iv-docs]')) await page.click('#czViewer [data-iv-docs]');
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* R1 Settings › Connectors lists each source with when it was read (was Sources, FmA3Settings); R2 Settings opens on General with its
|
|
10
10
|
* sections (on Connectors while a source is stale), and Escape closes it
|
|
11
11
|
* B1 the Board's Settings and Sources open Settings; B2 Ctrl K on Board opens the same Search
|
|
12
|
-
* D1 Theme Dark in Settings › General draws the page dark (data-theme), kept for the next page; P1 at 390 px
|
|
12
|
+
* D1 Theme Dark in Settings › General draws the page dark (data-theme), kept for the next page; P1 at 390 px the phone's ⋯ menu (Ph2_menu) fits, P3 its Settings (Ph2_more)
|
|
13
13
|
* Set EV_SHOTS=<dir> for screenshots at 1440x900 and 390x844, light and dark. Every wait polls the page; no fixed sleep stands in for a state. */
|
|
14
14
|
const fs = require('fs');
|
|
15
15
|
const { classicBoard } = require('./lib/classic-board'); // these checks are about the four Board views, not Work (work-one-view)
|
|
@@ -213,22 +213,12 @@ const put = (root, rel, text) => { fs.mkdirSync(path.dirname(path.join(root, rel
|
|
|
213
213
|
const fit = await pg.evaluate(() => { const r = document.querySelector('#czMenu').getBoundingClientRect(); return { l: Math.round(r.left), r: Math.round(r.right), side: document.documentElement.scrollWidth - innerWidth }; });
|
|
214
214
|
ok(`P1 ${theme} at 390 px the menu fits on screen`, fit.l >= 0 && fit.r <= 390 && fit.side <= 0, JSON.stringify(fit));
|
|
215
215
|
await snap(pg, 'menu-390-' + theme);
|
|
216
|
-
|
|
217
|
-
await pg.
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
await
|
|
222
|
-
await pg.keyboard.press('Escape');
|
|
223
|
-
await pg.click('#hmList [data-hm-day]');
|
|
224
|
-
await until(() => pg.evaluate(() => !!document.querySelector('#czViewer:not([hidden]) .yd')), 20000);
|
|
225
|
-
ok(`P2 ${theme} at 390 px Your day (with New for you) does not scroll sideways`, await pg.evaluate(() => { const b = document.querySelector('#czViewer .cz-vw-body'); return document.documentElement.scrollWidth - innerWidth <= 0 && b.scrollWidth - b.clientWidth <= 1; }));
|
|
226
|
-
await snap(pg, 'day-390-' + theme);
|
|
227
|
-
await pg.keyboard.press('Escape');
|
|
228
|
-
await until(() => pg.evaluate(() => !document.querySelector('#czViewer:not([hidden])')));
|
|
229
|
-
await menu(pg); await pg.click('#czMenu [data-cz-settings]');
|
|
230
|
-
await pg.waitForSelector('#evSettings:not([hidden])');
|
|
231
|
-
ok(`P3 ${theme} at 390 px Settings fits the screen`, await pg.evaluate(() => { const r = document.querySelector('#evSettings').getBoundingClientRect(); return r.left >= 0 && r.right <= 390 && document.documentElement.scrollWidth - innerWidth <= 0; }));
|
|
216
|
+
// the phone's ⋯ (phone design Ph2_menu): Today, Work, Ask PMOS, Settings; no Search or Guide (Work has Find)
|
|
217
|
+
const rows = await pg.evaluate(() => [...document.querySelectorAll('#czMenu a, #czMenu button')].map((x) => x.textContent.trim()).filter(Boolean));
|
|
218
|
+
ok(`P1 ${theme} at 390 px the menu is the phone's: Today, Work, Ask PMOS, Settings, and no Search`, ['Today', 'Work', 'Ask PMOS', 'Settings'].every((t) => rows.some((r) => r.startsWith(t))) && !(await pg.$('#czMenu [data-cz-search]')), JSON.stringify(rows));
|
|
219
|
+
await pg.click('#czMenu [data-cz-settings]');
|
|
220
|
+
await pg.waitForSelector('#phSettings:not([hidden])');
|
|
221
|
+
ok(`P3 ${theme} at 390 px Settings is one screen: Theme, Version and the note, and it fits`, await pg.evaluate(() => { const el = document.querySelector('#phSettings'), r = el.getBoundingClientRect(); return r.left >= 0 && r.right <= 390 && el.scrollHeight <= innerHeight && document.documentElement.scrollWidth - innerWidth <= 0 && /Theme/.test(el.textContent) && /Version/.test(el.textContent); }));
|
|
232
222
|
await snap(pg, 'settings-390-' + theme);
|
|
233
223
|
if (theme === 'dark') ok('D2 ?theme=dark draws the phone dark', await pg.evaluate(() => document.documentElement.dataset.theme === 'dark'));
|
|
234
224
|
ok(`P no page error (${theme})`, errors.length === 0, errors.join(' | '));
|
|
@@ -20,7 +20,7 @@ On a computer, one thin panel at the left edge of every page holds the places. I
|
|
|
20
20
|
- The navigation does not count as a panel.
|
|
21
21
|
- The product choice is at the top left of Work and Goals. It is one choice for both. It shows the product's full name, "All products", or the first name and "+2".
|
|
22
22
|
|
|
23
|
-
On a phone,
|
|
23
|
+
On a phone, **⋯** at the top right of every screen opens the menu: Today, Work, Ask PMOS and Settings (see [On a phone](#on-a-phone)).
|
|
24
24
|
|
|
25
25
|
- [Home](home.md) explains Today in full.
|
|
26
26
|
|
|
@@ -63,7 +63,7 @@ Findings that fit no initiative (the Lab) are ✦ rows in the log. ✓ keeps one
|
|
|
63
63
|
|
|
64
64
|
The agenda is the day by hours, from 08:00 to 18:00, with a red line at the time now. Meetings that overlap sit side by side, so none covers or cuts another. The box is as tall as its hours. It shows your meetings, the reports that go out today at their time, your own events, and focus time: the free time from now until the next meeting, held for the first row of your log, in a dashed box. Focus time is only ever a gap before a meeting: it never runs past the last one. Press the focus time to open that row. A day with no meeting or event shows one quiet line instead of the hours, for example "No events today · 9 h free". **Events** at the top right opens the Events page. "PMOS did" is not on Today; it moves to Routine.
|
|
65
65
|
|
|
66
|
-
On a phone, Today is
|
|
66
|
+
On a phone, Today is one page with no boxes: the overview, the next event with **Record**, and the log. Swipe a row to the right to do or accept it, and to the left to drop it or put it off. Each swipe has **Undo**.
|
|
67
67
|
|
|
68
68
|
## The Viewer
|
|
69
69
|
|
|
@@ -182,13 +182,20 @@ A key that you type in a field, or in a terminal, goes to the field or the termi
|
|
|
182
182
|
|
|
183
183
|
## On a phone
|
|
184
184
|
|
|
185
|
-
|
|
185
|
+
A phone has its own layout. It is not the computer's page made smaller. There is no bottom bar and no round button.
|
|
186
|
+
|
|
187
|
+
- **⋯** is at the top right of every screen. It opens **Waiting on you** with a count (only when something waits), **Live now** (only while something runs), **Today**, **Work**, **Ask PMOS** and **Settings**. A blue dot on ⋯ means that something waits on you. When an item is open, its own menu items are at the top of the same menu.
|
|
188
|
+
- **Today** is the log for today. Swipe a row to the right to do, accept or send it, and to the left to drop it or put it off. Each swipe shows **Undo**. A row has no ✓ or ✕ and rests flat. After a recording, the first line says where PMOS filed it, with **Undo**.
|
|
189
|
+
- **Work** is the list of initiatives: the product, search and filter, **Initiatives** and **Backlog**, and the groups At risk or late, On track and No signal. A Project also shows its end date.
|
|
190
|
+
- **An initiative** shows what the popup on a computer shows, in one column: the stage and its days over, the gate, ✦ Overview, where it stands, the Work breakdown with a dot per stage (grey done, blue in progress, an empty ring to do), the Backlog line, Artefacts and **N documents**. Swipe a ✦ line to the right to say yes and to the left to say no. The box at the bottom asks PMOS about this work.
|
|
191
|
+
- **Ask PMOS** lists your chats grouped by the work they are about. "Not in a work yet" is last. A blue dot marks a chat that waits for you. Write in the box at the bottom to start a new chat.
|
|
192
|
+
- **Settings** has the theme (Light, Dark or Auto) and the version with **Check update**. Connectors, workspaces and updates are on your computer.
|
|
193
|
+
- **Recording** shows the red dot, the time, the meeting's name and a small red stop at the top. Under it: the shared screen cut to the slide, with the slides (only while a screen is shared); **So far**, newest first, each point with its time; and **PMOS proposes**, the line to tell the call. Swipe it to the right to copy it, and to the left to put it away. When you stop, Today opens.
|
|
186
194
|
|
|
187
195
|
A chat on a phone uses the full width of the screen:
|
|
188
196
|
|
|
189
197
|
- **The top bar** has ← on the left, the chat's name with one line under it, and **⋯** on the right. The line says what the chat is about: the initiative, the number of files and the number of pull requests. Something with none is left out. With nothing to show, the line says where your messages go. Tap the line to open a sheet with the initiative, its newest files (and **All files**), its pull requests and **Sends to**, where you change where your messages go.
|
|
190
|
-
-
|
|
191
|
-
- **The messages** have no picture and no name or time line. Copy, Retry and Make it a task are under the newest message. To see them under an older message, touch and hold that message.
|
|
198
|
+
- **The messages** have no picture and no name or time line. Copy, Retry and Make it a task show on an answer when you touch it.
|
|
192
199
|
- **The message box** is one row: **+**, the text, the microphone and send. It stays at the bottom of the screen while you scroll.
|
|
193
200
|
|
|
194
201
|
## First run
|
package/workspace/guide/notes.md
CHANGED
|
@@ -476,9 +476,13 @@ The PMOS Chrome extension shows a small panel over a Google Meet call, so you do
|
|
|
476
476
|
|
|
477
477
|
To add the extension:
|
|
478
478
|
|
|
479
|
-
1.
|
|
480
|
-
2. In Chrome
|
|
481
|
-
3. Press **Load unpacked** and pick the folder
|
|
479
|
+
1. In PMOS, open **Settings › Connectors**. Under **Google Meet**, press the set-up icon. PMOS copies the extension to the folder **PMOS Chrome extension** in your home folder, shows that folder in Finder, and opens Chrome's extensions page.
|
|
480
|
+
2. In Chrome's extensions page, turn on **Developer mode** (top right).
|
|
481
|
+
3. Press **Load unpacked** and pick the folder **PMOS Chrome extension**.
|
|
482
|
+
|
|
483
|
+
The steps also show under the Google Meet row, with the folder's path and a copy button. Chrome keeps these three presses for you: no page can add an extension. If **Load unpacked** is greyed out, your company's Chrome blocks extensions that are not in the Web Store.
|
|
484
|
+
|
|
485
|
+
After an update, PMOS copies the new version to the same folder when you open Settings › Connectors, and the row says so. Press the reload arrow on the PMOS card in Chrome's extensions page. When the panel has loaded in a call, the row says **Working** and the time it was seen. `pmos extension` in a terminal still prints the steps.
|
|
482
486
|
|
|
483
487
|
PMOS must run while you use the panel. The extension looks for PMOS at `http://localhost:7433`. If `pmos` started on another port, open the extension's **Options**, type that address and press **Save**, then reload the Meet tab.
|
|
484
488
|
|
|
@@ -23,6 +23,8 @@ const WF = require('../scripts/workflows.js');
|
|
|
23
23
|
|
|
24
24
|
const BASE = T.BASE;
|
|
25
25
|
const SHOTS = process.env.SHOTS || '';
|
|
26
|
+
// the phone design (Ph2_init): a phone shows an initiative as the popup's phone page; the old page is ⋯ › Every part
|
|
27
|
+
const everyPart = async (pg) => { await pg.waitForSelector('#czViewer .pw-ph', { state: 'attached', timeout: 20000 }); await pg.evaluate(() => { const r = (window.__czVwMore ? window.__czVwMore(document.body) : []).find((x) => x.label === 'Every part'); if (r) r.go(); }); await pg.waitForTimeout(800); };
|
|
26
28
|
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
27
29
|
const until = async (fn, ms = 10000, step = 100) => { const t0 = Date.now(); for (;;) { const v = await fn(); if (v) return v; if (Date.now() - t0 > ms) return v; await sleep(step); } };
|
|
28
30
|
const results = [];
|
|
@@ -88,6 +90,7 @@ const BRIEF = BRP.build(BRF.facts());
|
|
|
88
90
|
for (const p of ['ini-wf', 'wontdo', 'archive', 'ini-auto', 'move']) await page.route('**/api/boards/' + p, (r) => json(r, { ok: true, row: {} }));
|
|
89
91
|
if (!fresh) await page.addInitScript(() => { try { localStorage.setItem('pmos.wf.seen', JSON.stringify({ 'self-serve-v2|tender': 1 })); } catch { /* none */ } });
|
|
90
92
|
await page.goto(BASE + '/premium.html?ini=' + ID + '&ws=w1&board=w1&theme=' + theme);
|
|
93
|
+
if (w <= 760) await everyPart(page);
|
|
91
94
|
const up = await until(() => page.evaluate(() => /Tender/.test((document.querySelector('#czViewer:not([hidden]) .cz-vw-kind') || {}).textContent || '') && !!document.querySelector('#czViewer [data-hi-v="page"] .iv-meta [data-iv-wf]')), 30000);
|
|
92
95
|
return { ctx, page, errors, posts, up, S };
|
|
93
96
|
};
|
|
@@ -16,7 +16,10 @@ const USAGE = ['usage: pmos extension — the Chrome extension: the meeting comp
|
|
|
16
16
|
function lines(folder, exists = true) {
|
|
17
17
|
const out = [];
|
|
18
18
|
if (!exists) { out.push(`✗ the extension folder is not here: ${folder}`, ' Reinstall the workspace with `pmos upgrade`.'); return out; }
|
|
19
|
-
out.push('PMOS for Chrome', '',
|
|
19
|
+
out.push('PMOS for Chrome', '',
|
|
20
|
+
'Easiest: in PMOS open Settings › Connectors › Google Meet and press Set up. It puts the extension in a folder you can see',
|
|
21
|
+
'("PMOS Chrome extension" in your home folder) and opens Chrome\'s extensions page.', '',
|
|
22
|
+
` folder ${folder}`, '',
|
|
20
23
|
'Load it in three steps:',
|
|
21
24
|
' 1. In Chrome, open chrome://extensions',
|
|
22
25
|
' 2. Turn on Developer mode (top right)',
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
/* extension-setup.js — set up the PMOS Chrome extension from the workspace (initiative meeting-buddy, follow-up; Wawan 2026-11-19:
|
|
3
|
+
* "I can't find the file. Make it easy, make the setup can be done on the workspace").
|
|
4
|
+
*
|
|
5
|
+
* The extension ships inside the workspace package, which npm puts under a hidden folder (for example ~/.nvm/…/pmos-workspace/extension).
|
|
6
|
+
* Chrome's Load unpacked window does not show hidden folders. So one press copies the extension to a folder the PM can see,
|
|
7
|
+
* ~/PMOS Chrome extension, shows that folder in Finder, and opens Chrome's extensions page. Chrome keeps the last step for the
|
|
8
|
+
* person (Developer mode, Load unpacked, pick the folder): no page or program can load an extension for them.
|
|
9
|
+
*
|
|
10
|
+
* status({ home, seenAt }) -> { ok, folder, copied, version, shipped, current, seen } pure apart from reading the two manifests
|
|
11
|
+
* copyTo(src, dest) copies the extension folder (files only, no links), replacing what is there
|
|
12
|
+
* setup({ home, open, platform }) -> { ok, folder, opened } copy, then show the folder and open chrome://extensions (macOS; else the folder only)
|
|
13
|
+
* refresh({ home }) -> bool on start: when the copy exists and is older than the shipped one, copy again (Chrome still needs the reload arrow)
|
|
14
|
+
* markSeen(now) / seenAt() the buddy page reports itself when it loads inside the Meet panel (GET /api/extension/seen)
|
|
15
|
+
* Nothing here touches Chrome's own files or settings. */
|
|
16
|
+
const fs = require('fs');
|
|
17
|
+
const os = require('os');
|
|
18
|
+
const path = require('path');
|
|
19
|
+
|
|
20
|
+
const SHIPPED = path.resolve(__dirname, '..', 'extension');
|
|
21
|
+
const NAME = 'PMOS Chrome extension';
|
|
22
|
+
const folderOf = (home) => path.join(home || os.homedir(), NAME);
|
|
23
|
+
|
|
24
|
+
function versionOf(dir) {
|
|
25
|
+
try { return String(JSON.parse(fs.readFileSync(path.join(dir, 'manifest.json'), 'utf8')).version || ''); } catch { return ''; }
|
|
26
|
+
}
|
|
27
|
+
/** The extension's files as relative paths (plain files only; a link is skipped). */
|
|
28
|
+
function filesOf(dir, rel = '') {
|
|
29
|
+
const out = [];
|
|
30
|
+
let ents = [];
|
|
31
|
+
try { ents = fs.readdirSync(path.join(dir, rel), { withFileTypes: true }); } catch { return out; }
|
|
32
|
+
for (const e of ents) {
|
|
33
|
+
if (e.name.startsWith('.')) continue;
|
|
34
|
+
const r = path.join(rel, e.name);
|
|
35
|
+
if (e.isDirectory()) out.push(...filesOf(dir, r));
|
|
36
|
+
else if (e.isFile()) out.push(r);
|
|
37
|
+
}
|
|
38
|
+
return out;
|
|
39
|
+
}
|
|
40
|
+
/** Same content in both folders (every shipped file present and equal). */
|
|
41
|
+
function same(src, dest) {
|
|
42
|
+
for (const r of filesOf(src)) {
|
|
43
|
+
let a, b; try { a = fs.readFileSync(path.join(src, r)); b = fs.readFileSync(path.join(dest, r)); } catch { return false; }
|
|
44
|
+
if (!a.equals(b)) return false;
|
|
45
|
+
}
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function copyTo(src, dest) {
|
|
50
|
+
const files = filesOf(src);
|
|
51
|
+
if (!files.includes('manifest.json')) throw new Error('the shipped extension has no manifest.json');
|
|
52
|
+
fs.mkdirSync(dest, { recursive: true });
|
|
53
|
+
// a file the new version dropped would stay and confuse Chrome: take out what the shipped folder no longer has
|
|
54
|
+
for (const r of filesOf(dest)) if (!files.includes(r)) { try { fs.unlinkSync(path.join(dest, r)); } catch {} }
|
|
55
|
+
for (const r of files) { fs.mkdirSync(path.dirname(path.join(dest, r)), { recursive: true }); fs.copyFileSync(path.join(src, r), path.join(dest, r)); }
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
let lastSeen = 0;
|
|
59
|
+
function markSeen(now = Date.now()) { lastSeen = now; }
|
|
60
|
+
function seenAt() { return lastSeen; }
|
|
61
|
+
|
|
62
|
+
function status({ home, src = SHIPPED, seenAt: seen = lastSeen } = {}) {
|
|
63
|
+
const folder = folderOf(home);
|
|
64
|
+
const copied = fs.existsSync(path.join(folder, 'manifest.json'));
|
|
65
|
+
const shipped = versionOf(src);
|
|
66
|
+
return { ok: true, folder, copied, version: copied ? versionOf(folder) : '', shipped, current: copied && same(src, folder), seen: seen ? new Date(seen).toISOString() : null };
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
function opener(platform) {
|
|
70
|
+
if (platform !== 'darwin') return null;
|
|
71
|
+
return (args) => { try { require('child_process').spawn('open', args, { detached: true, stdio: 'ignore' }).unref(); return true; } catch { return false; } };
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function setup({ home, src = SHIPPED, platform = process.platform, open = opener(platform) } = {}) {
|
|
75
|
+
const folder = folderOf(home);
|
|
76
|
+
try { copyTo(src, folder); } catch (e) { return { ok: false, error: 'PMOS could not copy the extension: ' + String((e && e.message) || e).slice(0, 160) }; }
|
|
77
|
+
let opened = false;
|
|
78
|
+
if (open) {
|
|
79
|
+
// show the folder in Finder, then Chrome's extensions page (a page cannot open chrome:// links; this computer can)
|
|
80
|
+
opened = !!open(['-R', path.join(folder, 'manifest.json')]);
|
|
81
|
+
open(['-a', 'Google Chrome', 'chrome://extensions']);
|
|
82
|
+
}
|
|
83
|
+
return { ok: true, folder, opened };
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function refresh({ home, src = SHIPPED } = {}) {
|
|
87
|
+
const folder = folderOf(home);
|
|
88
|
+
if (!fs.existsSync(path.join(folder, 'manifest.json'))) return false;
|
|
89
|
+
if (same(src, folder)) return false;
|
|
90
|
+
try { copyTo(src, folder); return true; } catch { return false; }
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
module.exports = { status, setup, refresh, copyTo, markSeen, seenAt, folderOf, SHIPPED, NAME };
|
|
@@ -38,6 +38,7 @@ const TOPICS_MAX = 30; // every invite line is kept; lib/agenda-topics
|
|
|
38
38
|
const NOTES_MAX = 5;
|
|
39
39
|
const CHIPS_MAX = 4;
|
|
40
40
|
const RAISE_KINDS = Object.freeze(['check', 'follow-up', 'no-owner', 'show', 'chat']); // chat: a line the PM may post in the call chat (meeting-buddy); a draft only
|
|
41
|
+
const GISTS_MAX = 12; // the phone's "So far": the companion's last gists, each with its time
|
|
41
42
|
const RAISE_MAX = 2; // the Now panel shows at most this many prompts; a Show it? offer counts as one
|
|
42
43
|
const INI_ID = /^[A-Za-z0-9][A-Za-z0-9._-]{0,79}$/;
|
|
43
44
|
const FROM = Object.freeze(['talk', 'screen', 'prep', 'last']); // where an answer came from: the talk, the shared screen, the prep, last time
|
|
@@ -305,7 +306,7 @@ const moveLine = (action, topic, at) => ({ k: 'move', at, action, topic: str(top
|
|
|
305
306
|
const raiseLine = (id, action, at, round) => ({ k: 'raise', at, id: str(id, 80), action: action === 'raised' || action === 'undo' ? action : 'skip', ...(round ? { round: str(round, 120) } : {}) });
|
|
306
307
|
|
|
307
308
|
/** The page's state from the state file's lines. topics = topicsFrom(...) (the starting topics); startMs = the meeting's start; nowMs = now.
|
|
308
|
-
* → { gist, chips, current, topics: [{ id, text, src, state: now|discussed|notyet|parked, minutes, at?, by? }], runs: [{ topic, from_min, to_min }],
|
|
309
|
+
* → { gist, gists: [{ at, text }] (each new gist, oldest first, at most GISTS_MAX), chips, current, topics: [{ id, text, src, state: now|discussed|notyet|parked, minutes, at?, by? }], runs: [{ topic, from_min, to_min }],
|
|
309
310
|
* notes: [{ id, at, cat, heard, body, why, src, from?, acts?, show, when?, ask? }], raise: [{ id, kind, text, from, at }] (open, newest first, at most 2),
|
|
310
311
|
* raised: every Raise now item with its state (for the prompt), seen, last_run_at, pending, asks, error }. */
|
|
311
312
|
function foldState(lines, { topics = [], startMs = null, nowMs = Date.now() } = {}) {
|
|
@@ -316,7 +317,7 @@ function foldState(lines, { topics = [], startMs = null, nowMs = Date.now() } =
|
|
|
316
317
|
return byKey.get(k);
|
|
317
318
|
};
|
|
318
319
|
for (const t of topics) addTopic(t.text || t, t.src || 'steps');
|
|
319
|
-
let current = null; const runs = []; let veto = null; let gist = ''; let chips = []; const notes = []; let seen = 0; let lastRunAt = 0; let pending = false; let error = null; let authAt = 0;
|
|
320
|
+
let current = null; const runs = []; let veto = null; let gist = ''; const gists = []; let chips = []; const notes = []; let seen = 0; let lastRunAt = 0; let pending = false; let error = null; let authAt = 0;
|
|
320
321
|
const asks = new Map(); const raises = new Map(); // veto: the line the PM said "Not this one" to, kept off for 5 min
|
|
321
322
|
const addRaise = (r, at) => {
|
|
322
323
|
if (!r || !r.id || raises.has(r.id)) return;
|
|
@@ -332,6 +333,7 @@ function foldState(lines, { topics = [], startMs = null, nowMs = Date.now() } =
|
|
|
332
333
|
else if (l.k === 'fail') { if (!l.id) { pending = false; error = str(l.error, 200) || 'The companion did not answer.'; authAt = l.auth ? at : 0; } else if (asks.has(l.id)) asks.get(l.id).state = 'failed', asks.get(l.id).error = str(l.error, 200); }
|
|
333
334
|
else if (l.k === 'out') {
|
|
334
335
|
pending = false; error = null; authAt = 0;
|
|
336
|
+
if (l.gist && l.gist !== gist) gists.push({ at, text: l.gist });
|
|
335
337
|
if (l.gist) gist = l.gist;
|
|
336
338
|
if (Array.isArray(l.chips)) chips = l.chips;
|
|
337
339
|
const tp = l.topic || {};
|
|
@@ -376,7 +378,7 @@ function foldState(lines, { topics = [], startMs = null, nowMs = Date.now() } =
|
|
|
376
378
|
});
|
|
377
379
|
const allRaise = [...raises.values()];
|
|
378
380
|
const raise = allRaise.filter((r) => r.state === 'open').sort((a, b) => b.at - a.at).slice(0, RAISE_MAX).map(({ state, ...r }) => r);
|
|
379
|
-
return { gist, chips, current: current ? current.id : null, topics: outTopics, runs: outRuns, notes, raise, raised: allRaise, seen, last_run_at: lastRunAt, pending, asks: [...asks.values()], error, auth_at: authAt };
|
|
381
|
+
return { gist, gists: gists.slice(-GISTS_MAX), chips, current: current ? current.id : null, topics: outTopics, runs: outRuns, notes, raise, raised: allRaise, seen, last_run_at: lastRunAt, pending, asks: [...asks.values()], error, auth_at: authAt };
|
|
380
382
|
}
|
|
381
383
|
|
|
382
384
|
/* ── when the companion runs ────────────────────────────────────────────────────────────────────────────────────── */
|