create-pmos 0.423.0 → 0.425.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 +25 -25
- package/payload/KIT-VERSION +2 -2
- 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/payload/state/log.md +1 -1
- package/workspace/board-programs-test.js +41 -26
- package/workspace/briefing-premium-board-test.js +7 -4
- package/workspace/briefing-premium-insights-test.js +31 -15
- package/workspace/briefing-premium-products-test.js +62 -46
- package/workspace/changelog.json +24 -0
- package/workspace/guide/briefing-premium.md +3 -2
- package/workspace/guide/claude-proposes.md +37 -0
- package/workspace/guide/home.md +2 -2
- package/workspace/guide/index.md +2 -0
- package/workspace/guide/notes.md +39 -1
- package/workspace/guide/present-in-a-meeting.md +57 -0
- package/workspace/guide/programs.md +2 -2
- package/workspace/home-pill-test.js +138 -0
- package/workspace/lib/briefing-premium-products.js +18 -4
- package/workspace/lib/headless.js +14 -1
- package/workspace/lib/meeting-focus.js +64 -14
- package/workspace/lib/pmos-verbs.js +3 -0
- package/workspace/lib/proposal-runs.js +148 -0
- package/workspace/lib/proposals.js +370 -0
- package/workspace/lib/propose-cli.js +96 -0
- package/workspace/lib/route-modules.js +1 -0
- package/workspace/lib/routes-board-premium.js +11 -0
- package/workspace/lib/routes-boards.js +1 -1
- package/workspace/lib/routes-briefing-premium.js +19 -0
- package/workspace/lib/routes-meeting-focus.js +28 -6
- package/workspace/lib/routes-proposals.js +325 -0
- package/workspace/lib/routes-task-links.js +35 -28
- package/workspace/lib/settings-store.js +2 -1
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/premium-board-actions-test.js +2 -2
- package/workspace/premium-briefing-depth-test.js +1 -1
- package/workspace/premium-rec-now-test.js +153 -0
- package/workspace/premium-rec-tab-test.js +167 -0
- package/workspace/public/pm/bd-asks.js +3 -0
- package/workspace/public/pm/cozy-aud.css +9 -0
- package/workspace/public/pm/cozy-aud.js +80 -0
- package/workspace/public/pm/cozy-live-pill.js +3 -0
- package/workspace/public/pm/cozy-pick.css +41 -0
- package/workspace/public/pm/cozy-pick.js +134 -0
- package/workspace/public/pm/cozy-rec-bridge.js +32 -0
- package/workspace/public/pm/cozy-rec-now.css +104 -0
- package/workspace/public/pm/cozy-rec-now.js +330 -0
- package/workspace/public/pm/cozy-rec-present.css +69 -0
- package/workspace/public/pm/cozy-rec-present.js +467 -0
- package/workspace/public/pm/cozy-rec-tab.css +90 -0
- package/workspace/public/pm/cozy-rec-tab.js +219 -0
- package/workspace/public/pm/cozy-settings.js +8 -2
- package/workspace/public/pm/cozy-today.css +23 -0
- package/workspace/public/pm/cozy-viewer.js +14 -3
- package/workspace/public/pm/cozy-vw-shell.css +8 -0
- package/workspace/public/pm/home-app.js +56 -27
- package/workspace/public/pm/home-list.js +17 -10
- package/workspace/public/pm/home-more.js +2 -31
- package/workspace/public/pm/home-task.js +2 -1
- package/workspace/public/pm/home-today.js +69 -19
- package/workspace/public/pm/ini-groups.js +30 -5
- package/workspace/public/pm/ini-links.js +6 -48
- package/workspace/public/pm/ini-props.js +218 -0
- package/workspace/public/pm/ini-view-model.js +6 -1
- package/workspace/public/pm/ini-view.css +47 -0
- package/workspace/public/pm/ini-view.js +23 -6
- package/workspace/public/pm/live-model.js +1 -1
- package/workspace/public/pm/premium-board.js +56 -25
- package/workspace/public/pm/premium-insights.js +42 -24
- package/workspace/public/pm/premium-meeting.js +17 -4
- package/workspace/public/pm/premium-mtg-present.js +4 -3
- package/workspace/public/pm/premium-report-read.js +2 -0
- package/workspace/public/pm/premium-vw-item.js +2 -1
- package/workspace/public/pm/premium-vw-mtg.js +15 -7
- package/workspace/public/pm/rec-state.js +13 -5
- package/workspace/public/pm/rec-tab-core.js +92 -0
- package/workspace/public/pm/task-card.css +13 -0
- package/workspace/public/pm/task-card.js +37 -2
- package/workspace/public/pm/view-notes.js +9 -0
- package/workspace/public/premium-aud.html +22 -0
- package/workspace/public/premium-board.html +1 -0
- package/workspace/public/premium-insights.html +2 -1
- package/workspace/public/premium-rec.html +30 -0
- package/workspace/public/premium.html +1 -0
- package/workspace/rec-present-test.js +229 -0
- package/workspace/server.js +46 -3
- package/workspace/skills/initiative-propose.skill +45 -0
- package/workspace/stage-card-test.js +1 -1
- package/workspace/task-links-test.js +26 -14
- package/workspace/test-lists/claude-proposes.json +5 -0
- package/workspace/test-lists/home-sessions-pill.json +6 -0
- package/workspace/test-lists/rec-now.json +6 -0
- package/workspace/test-lists/rec-present.json +13 -0
- package/workspace/test-lists/recording-tab.json +13 -0
- package/workspace/tk-tasks-test.js +13 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pmos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.425.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": {
|
|
@@ -32,6 +32,30 @@
|
|
|
32
32
|
"audit"
|
|
33
33
|
],
|
|
34
34
|
"pmosChanges": [
|
|
35
|
+
{
|
|
36
|
+
"v": "0.425.0",
|
|
37
|
+
"at": "2026-10-27T01:04:19.475Z",
|
|
38
|
+
"f": 2,
|
|
39
|
+
"prs": [
|
|
40
|
+
{
|
|
41
|
+
"n": 1066,
|
|
42
|
+
"t": "Recording tab and one product picker (batch 12, items 1 and 5)",
|
|
43
|
+
"s": "Recording tab and one product picker (batch 12, items 1 and 5)"
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"v": "0.424.0",
|
|
49
|
+
"at": "2026-10-27T00:38:50.632Z",
|
|
50
|
+
"f": 2,
|
|
51
|
+
"prs": [
|
|
52
|
+
{
|
|
53
|
+
"n": 1064,
|
|
54
|
+
"t": "Twelfth testing feedback batch",
|
|
55
|
+
"s": "Twelfth testing feedback batch"
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
},
|
|
35
59
|
{
|
|
36
60
|
"v": "0.423.0",
|
|
37
61
|
"at": "2026-10-26T16:10:21.071Z",
|
|
@@ -247,30 +271,6 @@
|
|
|
247
271
|
"s": "Tap the title to rename a program, an initiative or a task"
|
|
248
272
|
}
|
|
249
273
|
]
|
|
250
|
-
},
|
|
251
|
-
{
|
|
252
|
-
"v": "0.405.0",
|
|
253
|
-
"at": "2026-10-24T09:32:24.061Z",
|
|
254
|
-
"f": 2,
|
|
255
|
-
"prs": [
|
|
256
|
-
{
|
|
257
|
-
"n": 1035,
|
|
258
|
-
"t": "Home session list, program chat, and new initiative sessions",
|
|
259
|
-
"s": "Home session list, program chat, and new initiative sessions"
|
|
260
|
-
}
|
|
261
|
-
]
|
|
262
|
-
},
|
|
263
|
-
{
|
|
264
|
-
"v": "0.404.0",
|
|
265
|
-
"at": "2026-10-24T05:07:12.902Z",
|
|
266
|
-
"f": 2,
|
|
267
|
-
"prs": [
|
|
268
|
-
{
|
|
269
|
-
"n": 1034,
|
|
270
|
-
"t": "Chat names the real program press; add Turn into a program to the initiative ⋯",
|
|
271
|
-
"s": "Chat names the real program press; add Turn into a program to the initiative ⋯"
|
|
272
|
-
}
|
|
273
|
-
]
|
|
274
274
|
}
|
|
275
275
|
]
|
|
276
276
|
}
|
package/payload/KIT-VERSION
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
kernel-source: pmos@
|
|
2
|
-
assembled: 2026-10-
|
|
1
|
+
kernel-source: pmos@a3368d3b
|
|
2
|
+
assembled: 2026-10-27
|
|
3
3
|
mode: vendor
|
|
@@ -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-10-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-27T01:04:16Z"}
|
|
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-10-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-27T01:04:16Z"}
|
|
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-10-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-27T01:04:16Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
package/payload/state/log.md
CHANGED
|
@@ -53,15 +53,24 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
|
53
53
|
const boards = [...F.programFacts('idpf').boards, R3];
|
|
54
54
|
return ws === 'replay' ? F.programFacts('microsites', { boards, board: { ...F.programFacts('microsites').board, ...R3, product: 'Replay' } }) : F.programFacts(ws, { boards });
|
|
55
55
|
};
|
|
56
|
-
|
|
56
|
+
// the one product pick (batch 12 item 5): GET and POST /api/briefing-premium/products, kept here as the server keeps the setting
|
|
57
|
+
const reg = [{ ws: 'idpf', name: 'IDPF', primary: true }, { ws: 'microsites', name: 'Microsites' }].concat(o.third ? [{ ws: 'replay', name: 'Replay' }] : []);
|
|
58
|
+
const pk = { on: o.pick || reg.map((x) => x.ws), posts: [], reads: [] };
|
|
59
|
+
const pickBody = () => JSON.stringify({ ok: true, all: pk.on.length === reg.length, chosen: true, products: reg.map((x) => ({ ...x, home: false, initials: null, on: pk.on.includes(x.ws) })) });
|
|
60
|
+
await page.route('**/api/board-premium*', (r) => { const q = new URL(r.request().url()).searchParams; pk.reads.push(q.get('ws') || ''); r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, state: 'ready', model: BP.build(facts(q.get('ws') || 'idpf')), as_of: Date.now() }) }); });
|
|
61
|
+
await page.route('**/api/briefing-premium/products', (r) => {
|
|
62
|
+
if (r.request().method() === 'POST') { const b = JSON.parse(r.request().postData() || '{}'); pk.posts.push(b.on); pk.on = b.on; }
|
|
63
|
+
r.fulfill({ contentType: 'application/json', body: pickBody() });
|
|
64
|
+
});
|
|
57
65
|
await page.route('**/api/programs', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, programs: o.programs || F.programs() }) }));
|
|
58
66
|
await page.route('**/api/board-trail*', (r) => r.fulfill({ status: 500, contentType: 'application/json', body: JSON.stringify({ ok: false, error: 'not in this check' }) }));
|
|
59
67
|
await page.addInitScript(([s]) => { try { if (!sessionStorage.getItem('set')) { sessionStorage.setItem('set', '1'); for (const [k, v] of Object.entries(s)) localStorage.setItem(k, v); } } catch { /* none */ } }, [{ 'pmos.board.view': o.view || 'track', 'pmos.board.pview': o.view === 'time' ? 'track' : o.view || 'track', 'pmos.board.grouping': o.grouping || 'program', ...(o.store || {}) }]);
|
|
60
68
|
await page.addInitScript(() => { window.__prog = []; document.addEventListener('bd:program', (e) => window.__prog.push(e.detail && e.detail.id)); });
|
|
61
|
-
|
|
69
|
+
// o.plain: the Board as the place menu opens it (no ws), showing the saved pick; else a one-off link to one product's board
|
|
70
|
+
await page.goto(BASE + '/premium-board.html' + (o.plain ? (o.qs || '').replace(/^&/, '?') : '?ws=' + (o.ws || 'idpf') + '&board=' + (o.ws || 'idpf') + (o.qs || '')));
|
|
62
71
|
await page.waitForSelector('#ibBody [data-key]', { timeout: 15000 });
|
|
63
72
|
await page.waitForTimeout(700); // the programs and the other product's rows land after the board
|
|
64
|
-
return { ctx, page, errors };
|
|
73
|
+
return { ctx, page, errors, pk };
|
|
65
74
|
};
|
|
66
75
|
const events = (p) => p.evaluate(() => window.__prog.slice());
|
|
67
76
|
|
|
@@ -307,19 +316,20 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
|
307
316
|
await ctx.close();
|
|
308
317
|
}
|
|
309
318
|
|
|
310
|
-
/* A All products (PgBoard, PgKanban, PgList): every product's board on one page; the program holds a sub-row per product
|
|
319
|
+
/* A All products (PgBoard, PgKanban, PgList): every product's board on one page; the program holds a sub-row per product.
|
|
320
|
+
* The chip is the one product picker Home and Insights share (batch 12 item 5): its pick is saved, never kept in the address. */
|
|
311
321
|
{
|
|
312
|
-
const { ctx, page: p, errors } = await open({
|
|
313
|
-
await p.click('#
|
|
314
|
-
const items = await p.evaluate(() => [...document.querySelectorAll('#
|
|
322
|
+
const { ctx, page: p, errors, pk } = await open({ plain: true, pick: ['idpf'] });
|
|
323
|
+
await p.click('#bdPick');
|
|
324
|
+
const items = await p.evaluate(() => [...document.querySelectorAll('#ppMenu [data-pp] b')].map((b) => b.textContent));
|
|
315
325
|
ok('A the product picker offers All products first, then each product', items[0] === 'All products' && items.length === 3, JSON.stringify(items));
|
|
316
|
-
// All products ticks every product; the pick
|
|
317
|
-
await p.click('#
|
|
326
|
+
// All products ticks every product; the pick is saved when the list closes, and the Board opens on it
|
|
327
|
+
await p.click('#ppMenu [data-pp="*"]');
|
|
318
328
|
await Promise.all([p.waitForNavigation(), p.keyboard.press('Escape')]);
|
|
319
329
|
await p.waitForSelector('#ibBody [data-key]'); await p.waitForTimeout(700);
|
|
320
330
|
const a = await p.evaluate(() => ({
|
|
321
331
|
url: location.search,
|
|
322
|
-
crumb: (document.querySelector('#
|
|
332
|
+
crumb: (document.querySelector('#bdPick') || {}).textContent || '', label: (document.querySelector('#bdPick') || { getAttribute: () => '' }).getAttribute('aria-label'),
|
|
323
333
|
band: (document.querySelector('#ibBody .bt-pg .bt-pgo') || {}).textContent || '',
|
|
324
334
|
subs: [...document.querySelectorAll('#ibBody .bt-psb')].map((x) => x.textContent.replace(/\s+/g, ' ').trim()),
|
|
325
335
|
kids: [...document.querySelectorAll('#ibBody .bt-kid .bt-nm b')].map((b) => b.textContent),
|
|
@@ -327,7 +337,7 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
|
327
337
|
docs: getComputedStyle(document.querySelector('#tabDocs')).display === 'none', nw: document.querySelector('#newIni').hidden,
|
|
328
338
|
chips: [...document.querySelectorAll('#bdChipset .bd-chip')].map((c) => c.id).filter(Boolean),
|
|
329
339
|
}));
|
|
330
|
-
ok('A the
|
|
340
|
+
ok('A All products is saved, the address stays plain and the chip says All', a.url === '' && /^All/.test(a.crumb) && a.label === 'Products: all 2' && JSON.stringify(pk.posts) === '[["idpf","microsites"]]', JSON.stringify({ a, posts: pk.posts }));
|
|
331
341
|
ok('A the program comes first and holds a sub-row per product with that product\'s initiatives', /Project Ascent/.test(a.band) && a.subs.length === 2 && /IDPF/.test(a.subs[0]) && a.kids.length === 3, JSON.stringify(a));
|
|
332
342
|
ok('A then one group per product with the rows no program holds', a.prods.length === 2 && a.prods[0] === 'IDPF', JSON.stringify(a));
|
|
333
343
|
ok('A documents, New initiative, Jira and asks work across products; only the sprint waits for a product to be picked', !a.docs && !a.nw && a.chips.includes('chJira') && a.chips.includes('chAsks') && !a.chips.includes('chSprint'), JSON.stringify(a));
|
|
@@ -341,40 +351,45 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
|
341
351
|
await ctx.close();
|
|
342
352
|
}
|
|
343
353
|
|
|
344
|
-
/* M several products (batch 11 item 7): the
|
|
354
|
+
/* M several products (batch 11 item 7, now the one pick of batch 12 item 5): the list ticks several; the Board shows exactly those, merged */
|
|
345
355
|
{
|
|
346
|
-
const { ctx, page: p, errors } = await open({ third: true });
|
|
347
|
-
await p.click('#
|
|
348
|
-
const st = () => p.evaluate(() => ({ open:
|
|
356
|
+
const { ctx, page: p, errors, pk } = await open({ third: true, plain: true, pick: ['idpf'] });
|
|
357
|
+
await p.click('#bdPick');
|
|
358
|
+
const st = () => p.evaluate(() => ({ open: !!document.querySelector('#ppMenu'), ticks: [...document.querySelectorAll('#ppMenu [data-pp]')].map((b) => b.querySelector('b').textContent + ':' + b.getAttribute('aria-checked')) }));
|
|
349
359
|
const m0 = await st();
|
|
350
360
|
ok('M the menu ticks: All products shows a dash (some), the product on screen is ticked', m0.ticks.join(',') === 'All products:mixed,IDPF:true,Microsites:false,Replay:false', JSON.stringify(m0));
|
|
351
|
-
await p.click('#
|
|
361
|
+
await p.click('#ppMenu [data-pp="microsites"]');
|
|
352
362
|
const m1 = await st();
|
|
353
363
|
ok('M a press ticks a product and the menu stays open', m1.open && m1.ticks[2] === 'Microsites:true', JSON.stringify(m1));
|
|
354
|
-
await p.click('#
|
|
364
|
+
await p.click('#ppMenu [data-pp="microsites"]'); await p.click('#ppMenu [data-pp="idpf"]');
|
|
355
365
|
const m2 = await st();
|
|
356
366
|
ok('M a second press unticks; the last ticked product stays ticked', m2.open && m2.ticks.join(',') === 'All products:mixed,IDPF:true,Microsites:false,Replay:false', JSON.stringify(m2));
|
|
357
|
-
await p.click('#
|
|
367
|
+
await p.click('#ppMenu [data-pp="microsites"]');
|
|
358
368
|
await Promise.all([p.waitForNavigation(), p.mouse.click(1400, 880)]);
|
|
359
369
|
await p.waitForSelector('#ibBody [data-key]'); await p.waitForTimeout(700);
|
|
360
|
-
const look = () => p.evaluate(() => ({ url: decodeURIComponent(location.search),
|
|
370
|
+
const look = () => p.evaluate(() => ({ url: decodeURIComponent(location.search), tiles: [...document.querySelectorAll('#bdPick .ppk-t')].map((t) => t.textContent).join(','), label: document.querySelector('#bdPick').getAttribute('aria-label'), ws: [...new Set([...document.querySelectorAll('#ibBody [data-key]')].map((x) => x.dataset.key.split('/')[0]))].sort() }));
|
|
361
371
|
const a = await look();
|
|
362
|
-
ok('M a click outside closes the menu and the Board shows the ticked products only, merged', a.url === '
|
|
363
|
-
ok('M the
|
|
372
|
+
ok('M a click outside closes the menu, saves the pick and the Board shows the ticked products only, merged', a.url === '' && JSON.stringify(pk.on) === '["idpf","microsites"]' && a.ws.join(',') === 'idpf,microsites', JSON.stringify(a));
|
|
373
|
+
ok('M the chip shows the ticked products\' tiles; the words are in its name', a.tiles === 'ID,MI' && a.label === 'Products: IDPF, Microsites', JSON.stringify(a));
|
|
364
374
|
await p.reload(); await p.waitForSelector('#ibBody [data-key]'); await p.waitForTimeout(700);
|
|
365
375
|
const b = await look();
|
|
366
|
-
ok('M a reload keeps the pick', b.url === a.url && b.
|
|
367
|
-
await p.click('#
|
|
376
|
+
ok('M a reload keeps the pick', b.url === a.url && b.label === a.label && b.ws.join(',') === 'idpf,microsites', JSON.stringify(b));
|
|
377
|
+
await p.click('#bdPick');
|
|
368
378
|
const m3 = await st();
|
|
369
379
|
ok('M the menu ticks the products on screen', m3.ticks.join(',') === 'All products:mixed,IDPF:true,Microsites:true,Replay:false', JSON.stringify(m3));
|
|
370
|
-
await p.click('#
|
|
380
|
+
await p.click('#ppMenu [data-pp="*"]');
|
|
371
381
|
const m4 = await st();
|
|
372
382
|
ok('M All products ticks every product', m4.ticks.join(',') === 'All products:true,IDPF:true,Microsites:true,Replay:true', JSON.stringify(m4));
|
|
373
|
-
await p.click('#
|
|
383
|
+
await p.click('#ppMenu [data-pp="idpf"]'); await p.click('#ppMenu [data-pp="microsites"]');
|
|
384
|
+
pk.reads.length = 0;
|
|
374
385
|
await Promise.all([p.waitForNavigation(), p.keyboard.press('Escape')]);
|
|
375
386
|
await p.waitForSelector('#ibBody [data-key]'); await p.waitForTimeout(500);
|
|
376
387
|
const c = await look();
|
|
377
|
-
ok('M unticked down to one product, the Board is that product\'s own board', c.url === '
|
|
388
|
+
ok('M unticked down to one product, the Board is that product\'s own board', c.url === '' && pk.reads[pk.reads.length - 1] === 'replay' && c.label === 'Products: Replay', JSON.stringify({ c, reads: pk.reads }));
|
|
389
|
+
// a one-off link (?ws=&board=) shows that board and leaves the saved pick alone
|
|
390
|
+
await p.goto(BASE + '/premium-board.html?ws=microsites&board=microsites'); await p.waitForSelector('#ibBody [data-key]'); await p.waitForTimeout(500);
|
|
391
|
+
const d = await look();
|
|
392
|
+
ok('M a link to one board shows it and does not change the saved pick', d.label === 'Products: Microsites' && JSON.stringify(pk.on) === '["replay"]' && pk.posts.length === 2, JSON.stringify({ d, on: pk.on, posts: pk.posts.length }));
|
|
378
393
|
ok('M the page threw nothing', !errors.length, errors.join('\n'));
|
|
379
394
|
await ctx.close();
|
|
380
395
|
}
|
|
@@ -91,6 +91,8 @@ const IVREAD = () => {
|
|
|
91
91
|
await page.route('**/api/doc?**', (r) => r.fulfill({ contentType: 'text/markdown', body: '---\ntype: PRD\ntitle: Self-serve onboarding v2\n---\n\n## Problem\nNew teams stall at the invite step.' }));
|
|
92
92
|
await page.route('**/api/sources/refresh', (r) => { const rq = r.request(); posts.push({ path: new URL(rq.url()).pathname, body: JSON.parse(rq.postData() || '{}'), headers: rq.headers() }); r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true }) }); });
|
|
93
93
|
await page.route('**/api/briefing-premium/**', (r) => { const rq = r.request(); if (rq.method() === 'GET') return r.fulfill({ contentType: 'application/json', body: JSON.stringify(thread) }); posts.push({ path: new URL(rq.url()).pathname, body: JSON.parse(rq.postData() || '{}'), headers: rq.headers() }); return r.fulfill({ status: 200, contentType: 'application/json', body: JSON.stringify({ ok: true }) }); });
|
|
94
|
+
// the one product chip (batch 12 item 5): one product, ticked
|
|
95
|
+
await page.route('**/api/briefing-premium/products', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, all: false, chosen: false, products: [{ ws: 'pmos', name: 'pmos', home: false, primary: true, initials: 'PM', on: true }] }) }));
|
|
94
96
|
await page.goto(BASE + '/premium-board.html?theme=' + theme + qs);
|
|
95
97
|
const up = await until(() => page.evaluate(() => document.querySelectorAll('#ibBody .ini2').length > 0 || /could not be read/.test(document.querySelector('#snap').textContent)), 20000);
|
|
96
98
|
return { ctx, page, errors, posts, up, calls: () => calls, setModel: (m) => { current = m; }, set: (a) => { answer = a; }, setThread: (t) => { thread = t; } };
|
|
@@ -111,9 +113,9 @@ const IVREAD = () => {
|
|
|
111
113
|
const vwShut = (pg) => until(() => pg.evaluate(() => { const v = document.querySelector('#czViewer'); return !v || v.hidden; }));
|
|
112
114
|
|
|
113
115
|
/* B1 (premium-agreed-design N1 N2): the floating place menu, no page header, one toolbar */
|
|
114
|
-
const place = await p.evaluate(() => { const f = document.querySelector('#czFab'), h1 = document.querySelector('main h1'), r = h1.getBoundingClientRect(), tb = document.querySelector('.bd-hd').getBoundingClientRect(); return { fab: f && f.getAttribute('aria-label'), w: Math.round(f.getBoundingClientRect().width), rail: document.querySelector('nav.rail') ? getComputedStyle(document.querySelector('nav.rail')).display : 'gone', h1: Math.round(r.width) + 'x' + Math.round(r.height), top: Math.round(tb.top), name: document.querySelector('#
|
|
116
|
+
const place = await p.evaluate(() => { const f = document.querySelector('#czFab'), h1 = document.querySelector('main h1'), r = h1.getBoundingClientRect(), tb = document.querySelector('.bd-hd').getBoundingClientRect(); return { fab: f && f.getAttribute('aria-label'), w: Math.round(f.getBoundingClientRect().width), rail: document.querySelector('nav.rail') ? getComputedStyle(document.querySelector('nav.rail')).display : 'gone', h1: Math.round(r.width) + 'x' + Math.round(r.height), top: Math.round(tb.top), name: (document.querySelector('#bdPick') || { getAttribute: () => '' }).getAttribute('aria-label'), sw: !document.querySelector('#crSw'), title: document.title }; });
|
|
115
117
|
ok('N1 the floating menu is the one way between places: 56 px, it says Board, and the old rail is gone from the page', /^Open the menu. You are in Board(\. |$)/.test(place.fab) && place.w === 56 && place.rail === 'gone', JSON.stringify(place));
|
|
116
|
-
ok('N2 no page header on desktop: the heading is for screen readers only and the toolbar starts at the top', place.h1 === '1x1' && place.top < 60 && place.name === 'pmos' && place.sw, JSON.stringify(place));
|
|
118
|
+
ok('N2 no page header on desktop: the heading is for screen readers only and the toolbar starts at the top', place.h1 === '1x1' && place.top < 60 && place.name === 'Products: pmos' && place.sw, JSON.stringify(place));
|
|
117
119
|
await p.click('#czFab');
|
|
118
120
|
const menu = await p.evaluate(() => [...document.querySelectorAll('#czMenu a')].map((a) => a.textContent + (a.getAttribute('aria-current') ? '*' : '') + '>' + a.getAttribute('href')).join('|'));
|
|
119
121
|
ok('N1 the menu opens Home, Board and Insights, and marks Board', menu === 'Home>/premium.html|Board*>/premium-board.html|Insights>/premium-insights.html', menu);
|
|
@@ -391,7 +393,8 @@ const IVREAD = () => {
|
|
|
391
393
|
/* B15 the product picker */
|
|
392
394
|
{
|
|
393
395
|
const D = await open(); const q = D.page;
|
|
394
|
-
|
|
396
|
+
// batch 12 item 5: the product chip replaces the board name and its switcher; with one product it shows that product's tile, never All
|
|
397
|
+
ok('B15 the picker is the product chip (one product: its tile, no All, no switcher), and the Board has no chat button', await q.evaluate(() => { const c = document.querySelector('#bdPick'); return !!c && c.getAttribute('aria-label') === 'Products: pmos' && [...c.querySelectorAll('.ppk-t')].map((t) => t.textContent).join() === 'PM' && !c.querySelector('.ppk-all') && !document.querySelector('#crSw') && !document.querySelector('#crAsk') && !document.querySelector('#askIn'); }));
|
|
395
398
|
await D.ctx.close();
|
|
396
399
|
}
|
|
397
400
|
|
|
@@ -406,7 +409,7 @@ const IVREAD = () => {
|
|
|
406
409
|
const c2 = await browser.newContext({ viewport: { width: 1280, height: 900 } }), p2 = await c2.newPage();
|
|
407
410
|
await p2.route('**/api/board-premium*', (r) => r.fulfill({ status: 500, contentType: 'application/json', body: JSON.stringify({ ok: false, state: 'error', error: 'the board could not be read' }) }));
|
|
408
411
|
await p2.goto(BASE + '/premium-board.html');
|
|
409
|
-
ok('B2 a failed read says why and draws nothing', await until(() => p2.evaluate(() => /The reason: the board could not be read/.test(document.querySelector('#ibBody .bd-msg').textContent) && document.querySelectorAll('#ibBody .ini2').length === 0), 4000));
|
|
412
|
+
ok('B2 a failed read says why and draws nothing', await until(() => p2.evaluate(() => /The reason: the board could not be read/.test((document.querySelector('#ibBody .bd-msg') || {}).textContent || '') && document.querySelectorAll('#ibBody .ini2').length === 0), 4000));
|
|
410
413
|
await c2.close();
|
|
411
414
|
}
|
|
412
415
|
|
|
@@ -62,7 +62,7 @@ const BMR = { ok: true, state: 'ready', model: { tiles: [
|
|
|
62
62
|
await T.waitForServer(BASE);
|
|
63
63
|
browser = await chromium.launch({ executablePath: exe });
|
|
64
64
|
|
|
65
|
-
const open = async ({ w = 1440, h = 900, theme = 'light', model = mk(), answers = null, bm = BMR, q = '' } = {}) => {
|
|
65
|
+
const open = async ({ w = 1440, h = 900, theme = 'light', model = mk(), answers = null, bm = BMR, q = '', pick = null } = {}) => {
|
|
66
66
|
const ctx = await browser.newContext({ viewport: { width: w, height: h } });
|
|
67
67
|
const page = await ctx.newPage();
|
|
68
68
|
let current = model, calls = 0; const errors = [], posts = [];
|
|
@@ -70,9 +70,16 @@ const BMR = { ok: true, state: 'ready', model: { tiles: [
|
|
|
70
70
|
page.on('request', (rq) => { if (rq.method() !== 'GET') posts.push(rq.method() + ' ' + new URL(rq.url()).pathname); });
|
|
71
71
|
await page.route('**/api/insights-premium*', (r) => { calls++; if (answers) { const a = answers(calls); return r.fulfill({ status: a.status, contentType: 'application/json', body: JSON.stringify(a.body) }); } return r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, state: 'ready', model: current, as_of: 1 }) }); });
|
|
72
72
|
await page.route('**/api/board-metrics-premium*', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify(bm) }));
|
|
73
|
+
// the one product pick Home and Board share (batch 12 item 5): every product the model's switcher names, the ticked ones from pick
|
|
74
|
+
const reg = (model.board.switcher && model.board.switcher.length ? model.board.switcher : [model.board]).map((b) => ({ ws: b.ws, name: b.name }));
|
|
75
|
+
const pk = { on: pick || [model.board.ws], posts: [] };
|
|
76
|
+
await page.route('**/api/briefing-premium/products', (r) => {
|
|
77
|
+
if (r.request().method() === 'POST') { pk.on = JSON.parse(r.request().postData() || '{}').on; pk.posts.push(pk.on); }
|
|
78
|
+
r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, all: false, chosen: true, products: reg.map((x, i) => ({ ...x, home: false, primary: !i, initials: null, on: pk.on.includes(x.ws) })) }) });
|
|
79
|
+
});
|
|
73
80
|
await page.goto(BASE + '/premium-insights.html?theme=' + theme + q);
|
|
74
81
|
const up = await until(() => page.evaluate(() => document.querySelectorAll('#goalTbl .ins-row').length > 0 || /could not be read/.test(document.querySelector('#brief').textContent) || !!document.querySelector('#goalTbl .ins-empty')), 20000);
|
|
75
|
-
return { ctx, page, errors, posts, up, calls: () => calls, setModel: (m) => { current = m; } };
|
|
82
|
+
return { ctx, page, errors, posts, up, pk, calls: () => calls, setModel: (m) => { current = m; } };
|
|
76
83
|
};
|
|
77
84
|
/* the Viewer card (pm/cozy-viewer.js): its title, and the feature its "Waiting for design" card names */
|
|
78
85
|
const vw = (pg) => pg.evaluate(() => { const v = document.querySelector('#czViewer'); if (!v || v.hidden) return null; const ph = v.querySelector('[data-cz-placeholder]'); return { title: (v.querySelector('.cz-vw-title') || {}).textContent || '', wait: ph ? ph.dataset.czPlaceholder : null, text: v.querySelector('.cz-vw-body').textContent }; });
|
|
@@ -86,8 +93,8 @@ const BMR = { ok: true, state: 'ready', model: { tiles: [
|
|
|
86
93
|
const txt = (s, pg = p) => pg.evaluate((q) => (document.querySelector(q) || {}).textContent || '', s);
|
|
87
94
|
|
|
88
95
|
/* N: the place menu, no page header, nothing old */
|
|
89
|
-
const nav = await p.evaluate(() => ({ fabs: document.querySelectorAll('#czFab').length, label: document.querySelector('#czFab').getAttribute('aria-label'), rail: document.querySelector('nav.rail') ? getComputedStyle(document.querySelector('nav.rail')).display : 'gone', name: document.querySelector('#
|
|
90
|
-
ok('N1 one floating place menu replaces the rail (gone from the page), it says you are in Insights, and the product picker names the board', nav.fabs === 1 && nav.label === 'Open the menu. You are in Insights' && nav.rail === 'gone' && nav.name === 'pmos' && nav.boards === 1, JSON.stringify(nav));
|
|
96
|
+
const nav = await p.evaluate(() => ({ fabs: document.querySelectorAll('#czFab').length, label: document.querySelector('#czFab').getAttribute('aria-label'), rail: document.querySelector('nav.rail') ? getComputedStyle(document.querySelector('nav.rail')).display : 'gone', name: document.querySelector('#prodPick').getAttribute('aria-label'), boards: document.querySelectorAll('#prodPick .ppk-t').length }));
|
|
97
|
+
ok('N1 one floating place menu replaces the rail (gone from the page), it says you are in Insights, and the product picker names the board', nav.fabs === 1 && nav.label === 'Open the menu. You are in Insights' && nav.rail === 'gone' && nav.name === 'Products: pmos' && nav.boards === 1, JSON.stringify(nav));
|
|
91
98
|
{ await p.click('#czFab'); const mn = await p.evaluate(() => ({ open: !document.querySelector('#czMenu').hidden, links: [...document.querySelectorAll('#czMenu a')].map((a) => a.textContent + '=' + a.getAttribute('href')), cur: (document.querySelector('#czMenu [aria-current="page"]') || {}).textContent })); await p.keyboard.press('Escape');
|
|
92
99
|
ok('N1 the menu opens Home, Board and Insights, marks Insights, and Escape closes it', mn.open && mn.links.join() === 'Home=/premium.html,Board=/premium-board.html,Insights=/premium-insights.html' && mn.cur === 'Insights' && await p.evaluate(() => document.querySelector('#czMenu').hidden), JSON.stringify(mn)); }
|
|
93
100
|
{ const hd = await p.evaluate(() => { const b = document.querySelector('#insBar').getBoundingClientRect(), m = document.querySelector('main.ins').getBoundingClientRect(); return { bar: Math.round(b.top), main: Math.round(m.top), tabs: [...document.querySelectorAll('.ins-tabs [role="tab"]')].map((t) => t.textContent.replace(/\s+\d+$/, '').trim() + ':' + t.getAttribute('aria-selected')).join(), h1: [...document.querySelectorAll('h1')].filter((h) => h.getBoundingClientRect().height > 2).length }; });
|
|
@@ -134,8 +141,8 @@ const BMR = { ok: true, state: 'ready', model: { tiles: [
|
|
|
134
141
|
await vwClose(p);
|
|
135
142
|
await p.click('#viewChip'); const vm = await p.evaluate(() => ({ head: document.querySelector('#viewMenu .ins-mh').textContent, items: [...document.querySelectorAll('#viewMenu [data-view]')].map((b) => b.dataset.view + ((b.querySelector('.k') || {}).textContent ? ':' + b.querySelector('.k').textContent : '')).join(), nd: !!document.querySelector('#viewMenu [data-newdash]') })); await p.keyboard.press('Escape');
|
|
136
143
|
ok('B1 the Dashboard menu lists every view with the default one marked, then Delivery trends, then New dashboard (IsMenus)', vm.head === 'Dashboard' && vm.items === 'all:default,pd-1,p:Growth,p:Reliability,trends' && vm.nd, JSON.stringify(vm));
|
|
137
|
-
await p.click('#prodPick'); const pr = await p.evaluate(() => ({
|
|
138
|
-
ok('B1 the product picker
|
|
144
|
+
await p.click('#prodPick'); const pr = await p.evaluate(() => ({ chip: document.querySelector('#prodPick').getAttribute('aria-label'), items: [...document.querySelectorAll('#ppMenu [data-pp] b')].map((b) => b.textContent).join(), all: !!document.querySelector('#ppMenu [data-pp="*"]'), add: !!document.querySelector('#ppMenu [data-pp-add]') })); await p.keyboard.press('Escape');
|
|
145
|
+
ok('B1 the product chip is the one picker Home and Board share; with one product it lists that one and Add a product, no All', pr.chip === 'Products: pmos' && pr.items === 'pmos' && !pr.all && pr.add, JSON.stringify(pr));
|
|
139
146
|
}
|
|
140
147
|
|
|
141
148
|
/* G1 the Goals table */
|
|
@@ -486,6 +493,8 @@ const BMR = { ok: true, state: 'ready', model: { tiles: [
|
|
|
486
493
|
ok('E6 the real model keeps the gap: the 1 Aug to 1 Oct step is wider than 1 Jul to 1 Aug', !!m && m.charts[0].pts[2].fx - m.charts[0].pts[1].fx > 1.9 * (m.charts[0].pts[1].fx - m.charts[0].pts[0].fx));
|
|
487
494
|
const ctx = await browser.newContext({ viewport: { width: 1280, height: 900 } }), pg = await ctx.newPage(), errs = [];
|
|
488
495
|
pg.on('pageerror', (e) => errs.push(String(e)));
|
|
496
|
+
const H0 = await T.pressHeaders(base2), self = ((await (await fetch(base2 + '/api/briefing-premium/products')).json()).products || []).find((x) => x.primary);
|
|
497
|
+
await fetch(base2 + '/api/briefing-premium/products', { method: 'POST', headers: H0, body: JSON.stringify({ on: [self && self.ws] }) }); // the pick: this repository only
|
|
489
498
|
await pg.goto(base2 + '/premium-insights.html');
|
|
490
499
|
ok('E7 the real page draws that goal with the record\'s numbers and its line, a small count as blocks, and no script error', await until(() => pg.evaluate(() => { const r = document.querySelector('#goalTbl [data-goal="krm-a"]'); return !!r && r.querySelector('.val b').textContent === '30%' && !!r.querySelector('svg.ins-spark') && document.querySelectorAll('#goalTbl [data-goal="krm-b"] .ins-blocks i.on').length === 1 && document.querySelectorAll('#goalTbl [data-goal="krm-b"] .ins-blocks i').length === 2; }), 20000) && errs.length === 0, errs.join(' | '));
|
|
491
500
|
const H = await T.pressHeaders(base2);
|
|
@@ -526,22 +535,29 @@ const BMR = { ok: true, state: 'ready', model: { tiles: [
|
|
|
526
535
|
await ctx.close();
|
|
527
536
|
}
|
|
528
537
|
|
|
529
|
-
/* M: Portfolio (IsMenus): with two products the
|
|
538
|
+
/* M: Portfolio (IsMenus): with two products ticked (the one pick, batch 12 item 5) their goals roll up, grouped by product */
|
|
530
539
|
{
|
|
531
540
|
const two = [{ ws: 'w1', id: 'w1', name: 'pmos', goals: 5 }, { ws: 'w2', id: 'w2', name: 'Billing', goals: 1 }];
|
|
532
541
|
const other = IP.build(F.facts({ board: { ws: 'w2', id: 'w2', name: 'Billing' }, boards: two, outcomes: F.facts().outcomes.slice(0, 1).map((o) => Object.assign({}, o, { id: 'krm-inv', name: 'Invoices paid on time' })), initiatives: [], saved: [] }));
|
|
533
|
-
const
|
|
542
|
+
const asked = [];
|
|
543
|
+
const R = await open({ model: mk({ boards: two }), pick: ['w1', 'w2'] }), q = R.page;
|
|
534
544
|
await q.route('**/api/insights-premium?ws=w2*', (r) => { asked.push(r.request().url()); r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, state: 'ready', model: other }) }); });
|
|
535
|
-
await q.
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
ok('M1
|
|
545
|
+
await q.reload(); // the route above answers the second product from the first read on
|
|
546
|
+
const pf = await until(async () => { const x = await q.evaluate(() => ({ chip: (document.querySelector('#prodPick') || { getAttribute: () => '' }).getAttribute('aria-label'), all: (document.querySelector('#prodPick .ppk-all') || {}).textContent, groups: [...document.querySelectorAll('#goalTbl .ins-grp')].map((g) => g.querySelector('[role="cell"]').textContent), rows: document.querySelectorAll('#goalTbl [data-goal]').length, brief: document.querySelector('#brief').textContent, budgets: document.querySelectorAll('#goalTbl [data-budget]').length })); return x.groups.includes('Billing') ? x : null; }, 8000);
|
|
547
|
+
ok('M1 two products ticked (the chip says All): Portfolio reads the other product once and groups every goal by product; budgets stay with their product', !!pf && pf.chip === 'Products: all 2' && pf.all === 'All' && pf.groups.slice(0, 2).join() === 'pmos,Billing' && pf.rows === 6 && /^Portfolio: 6 goals across 2 products/.test(pf.brief) && pf.budgets === 0 && asked.length === 1, JSON.stringify(pf));
|
|
548
|
+
await q.click('#prodPick'); const pm = await q.evaluate(() => [...document.querySelectorAll('#ppMenu [data-pp]')].map((b) => b.querySelector('b').textContent + ':' + ((b.querySelector('em') || {}).textContent || '') + ':' + b.getAttribute('aria-checked')).join());
|
|
549
|
+
ok('M1 the list counts each product\'s goals and ticks both', pm === 'All products::true,pmos:5 goals:true,Billing:1 goal:true', pm);
|
|
550
|
+
await q.keyboard.press('Escape');
|
|
540
551
|
await q.click('#goalTbl [data-goal="w2~krm-inv"] .nm'); const gv = await until(() => vw(q));
|
|
541
552
|
ok('M1 a goal of another product opens its detail, named with its product and not on this product\'s dashboards', gv && /Invoices paid on time$/.test(gv.title) && /Billing/.test(gv.text) && !(await q.evaluate(() => document.querySelector('#czViewer [data-gx="dash"], #czViewer [data-gx="chart"]'))), JSON.stringify(gv));
|
|
542
553
|
await vwClose(q);
|
|
543
|
-
await q.click('#
|
|
544
|
-
ok('M1
|
|
554
|
+
await q.click('#tabOutcomes'); await sleep(100);
|
|
555
|
+
ok('M1 several ticked: Outcomes says it shows the first product only', /Shows pmos only/.test(await q.evaluate(() => (document.querySelector('#outTbl .ins-onenote') || {}).textContent || '')));
|
|
556
|
+
await q.click('#tabGoals');
|
|
557
|
+
await q.click('#prodPick'); await q.click('#ppMenu [data-pp="w2"]');
|
|
558
|
+
await Promise.all([q.waitForNavigation(), q.keyboard.press('Escape')]);
|
|
559
|
+
await until(() => q.evaluate(() => document.querySelectorAll('#goalTbl [data-goal]').length === 5), 8000);
|
|
560
|
+
ok('M1 unticking the other product saves the pick and leaves Portfolio', JSON.stringify(R.pk.posts) === '[["w1"]]' && (await q.evaluate(() => document.querySelector('#prodPick').getAttribute('aria-label'))) === 'Products: pmos' && (await q.evaluate(() => document.querySelectorAll('#goalTbl .ins-grp').length === 0 || ![...document.querySelectorAll('#goalTbl .ins-grp')].some((g) => /Billing/.test(g.textContent)))), JSON.stringify(R.pk.posts));
|
|
545
561
|
await R.ctx.close();
|
|
546
562
|
}
|
|
547
563
|
/* P: the phone (IsPhone): the goal detail full screen with Readings, Moved by and Dashboards; a report setup as a sheet */
|