create-pmos 0.424.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 +13 -13
- 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/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 +46 -43
- package/workspace/changelog.json +12 -0
- package/workspace/guide/briefing-premium.md +3 -2
- package/workspace/guide/home.md +2 -2
- package/workspace/guide/index.md +1 -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/lib/briefing-premium-products.js +18 -4
- package/workspace/lib/meeting-focus.js +64 -14
- package/workspace/lib/routes-briefing-premium.js +19 -0
- package/workspace/lib/routes-meeting-focus.js +28 -6
- package/workspace/lib/settings-store.js +2 -1
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- 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/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/home-app.js +37 -22
- package/workspace/public/pm/home-list.js +17 -10
- package/workspace/public/pm/home-more.js +2 -31
- package/workspace/public/pm/home-today.js +4 -4
- 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-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/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 +9 -1
- 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/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,18 @@
|
|
|
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
|
+
},
|
|
35
47
|
{
|
|
36
48
|
"v": "0.424.0",
|
|
37
49
|
"at": "2026-10-27T00:38:50.632Z",
|
|
@@ -259,18 +271,6 @@
|
|
|
259
271
|
"s": "Tap the title to rename a program, an initiative or a task"
|
|
260
272
|
}
|
|
261
273
|
]
|
|
262
|
-
},
|
|
263
|
-
{
|
|
264
|
-
"v": "0.405.0",
|
|
265
|
-
"at": "2026-10-24T09:32:24.061Z",
|
|
266
|
-
"f": 2,
|
|
267
|
-
"prs": [
|
|
268
|
-
{
|
|
269
|
-
"n": 1035,
|
|
270
|
-
"t": "Home session list, program chat, and new initiative sessions",
|
|
271
|
-
"s": "Home session list, program chat, and new initiative sessions"
|
|
272
|
-
}
|
|
273
|
-
]
|
|
274
274
|
}
|
|
275
275
|
]
|
|
276
276
|
}
|
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-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
|
|
|
@@ -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 */
|
|
@@ -3,14 +3,15 @@
|
|
|
3
3
|
/* briefing-premium-products-test.js — the premium Briefing across products (initiative briefing-premium-products; planning/prd/briefing-premium-products-prd.md P1 to P13).
|
|
4
4
|
* The real server with two product repositories registered beside the home one (the PMOS checkout the server runs from). Both products hold a
|
|
5
5
|
* kill condition KC9 that has passed its date, so each has a "decide" row with the SAME id: the page must keep them apart.
|
|
6
|
-
* P1 by default the home workspace is not read
|
|
7
|
-
* P2 the picker lists every workspace, the home one included
|
|
8
|
-
* P3
|
|
6
|
+
* P1 by default the home workspace is not read
|
|
7
|
+
* P2 the product chip on Home (the one picker Home, Board and Insights share, batch 12 item 5) lists every workspace, the home one included
|
|
8
|
+
* P3 the ticks are saved when the list closes and survive a reload; All saves every one ('*'); the default ticks save the default (null)
|
|
9
9
|
* P4 an unticked product's rows leave the list
|
|
10
10
|
* P6 each row carries its product
|
|
11
11
|
* P9 deciding a row writes into the owning product's journal and no other
|
|
12
12
|
* P10 a message about a merged row starts a Claude Code session in that product
|
|
13
|
-
*
|
|
13
|
+
* P12 ?ws= is a one-off view of that product: the chip shows it, and the saved pick stays
|
|
14
|
+
* P13 floors: the chip and its rows are 44 px high, reachable by keyboard, no sideways scroll at 390 px, both themes
|
|
14
15
|
* Every wait polls the page; no fixed sleep stands in for a state. */
|
|
15
16
|
const fs = require('fs');
|
|
16
17
|
const os = require('os');
|
|
@@ -21,9 +22,8 @@ const T = require('./test-run').configure({ name: 'briefing-premium-products' })
|
|
|
21
22
|
|
|
22
23
|
const BASE = T.BASE;
|
|
23
24
|
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
24
|
-
/*
|
|
25
|
-
*
|
|
26
|
-
* (#hxCount), one switch per workspace and Back to the default. The rows are Home's Needs-you rows; a row's product leads its hint. */
|
|
25
|
+
/* The product picker is the chip by Good morning (#hmPick, pm/cozy-pick.js; canvas XhpA1Desk): every workspace with a tick box, All products,
|
|
26
|
+
* Add a product; the ticks apply when the list (#ppMenu) closes. More > Products is gone. The rows are Home's Needs-you rows. */
|
|
27
27
|
const until = async (fn, ms = 15000, step = 150) => { const t0 = Date.now(); for (;;) { let v = null; try { v = await fn(); } catch { v = null; } if (v) return v; if (Date.now() - t0 > ms) return v; await sleep(step); } };
|
|
28
28
|
const results = [];
|
|
29
29
|
const ok = (name, cond, extra = '') => { results.push({ name, cond: !!cond }); console.log(`${cond ? '✓' : '✗'} ${name}${!cond && extra !== '' ? ' — ' + String(extra).slice(0, 300) : ''}`); };
|
|
@@ -86,15 +86,11 @@ const product = (name, cond) => {
|
|
|
86
86
|
await page.waitForSelector('#hmList .hm-pg', { state: 'attached', timeout: 30000 }); // a group of the one list (premium-uncovered-features)
|
|
87
87
|
return { ctx, page, errors };
|
|
88
88
|
};
|
|
89
|
-
// the picker: the
|
|
90
|
-
const pick = async (page) => {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
await page.waitForSelector('#czViewer #hxCount', { state: 'visible', timeout: 10000 });
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
|
-
const pickText = (page) => page.textContent('#czViewer #hxCount');
|
|
89
|
+
// the picker: the chip by Good morning opens the list; ticks reads its tick boxes, close presses Escape (the pick applies then)
|
|
90
|
+
const pick = async (page) => { if (!(await page.$('#ppMenu'))) { await page.waitForSelector('#hmPick', { timeout: 20000 }); await page.click('#hmPick'); await page.waitForSelector('#ppMenu', { timeout: 10000 }); } };
|
|
91
|
+
const ticks = (page) => page.$$eval('#ppMenu [data-pp]', (els) => els.map((e) => e.dataset.pp + ':' + e.getAttribute('aria-checked')));
|
|
92
|
+
const tick = (page, ws) => page.click(`#ppMenu [data-pp="${ws}"]`);
|
|
93
|
+
const setting = async () => (await json('GET', '/api/settings')).body.settings.find((x) => x.key === 'ws.briefing.include');
|
|
98
94
|
// premium-uncovered-features (canvas HmProducts): another product is a closed group of the one list ("IDPF · 1 your turn"); open it to see its rows
|
|
99
95
|
const openGroups = (page) => page.evaluate(() => { document.querySelectorAll('#hmList [data-hm-pg][aria-expanded="false"]').forEach((b) => b.click()); });
|
|
100
96
|
const rowsOf = async (page) => { await openGroups(page).catch(() => {}); return rowsOf0(page).then(async (a) => a.concat(await pillRows(page))); };
|
|
@@ -118,33 +114,39 @@ const product = (name, cond) => {
|
|
|
118
114
|
const rows = await rowsOf(page);
|
|
119
115
|
ok('P6 each row sits in its product\'s group', rows.length === 2 && rows.map((r) => r.tag).sort().join() === 'IDPF,microsites', JSON.stringify(rows));
|
|
120
116
|
await pick(page);
|
|
121
|
-
const
|
|
122
|
-
ok('
|
|
123
|
-
|
|
124
|
-
ok('
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
await page.
|
|
117
|
+
const t0 = await ticks(page);
|
|
118
|
+
ok('P2 the chip lists every workspace, the home one included: All products, then each with its tick, then Add a product', t0.length === 4 && t0[0].startsWith('*:') && t0.includes(wA.id + ':true') && t0.includes(wB.id + ':true') && t0.some((x) => x.startsWith(home.id + ':')) && !!(await page.$('#ppMenu [data-pp-add]')), JSON.stringify(t0));
|
|
119
|
+
const hs = await page.$$eval('#ppMenu button', (els) => els.map((e) => Math.round(e.getBoundingClientRect().height)));
|
|
120
|
+
ok('P13 each row of the list is at least 44 px high', hs.every((h) => h >= 44), JSON.stringify(hs));
|
|
121
|
+
// untick the home workspace (it shows as Home's own board) and microsites: the list stays open, the pick applies when it closes
|
|
122
|
+
if (t0.includes(home.id + ':true')) await tick(page, home.id);
|
|
123
|
+
await tick(page, wB.id);
|
|
124
|
+
ok('P2 a press ticks or unticks and the list stays open', !!(await page.$('#ppMenu')) && (await ticks(page)).includes(wB.id + ':false'));
|
|
125
|
+
await page.keyboard.press('Escape');
|
|
130
126
|
ok('P4 an unticked product\'s row leaves the list', await until(async () => { const r = await rowsOf(page); return r.length === 1 && r[0].tag === 'IDPF'; }, 20000));
|
|
131
|
-
const saved =
|
|
127
|
+
const saved = await setting();
|
|
132
128
|
ok('P3 the choice is saved as a list of workspace ids', saved && JSON.stringify(saved.value) === JSON.stringify([wA.id]), JSON.stringify(saved));
|
|
133
|
-
ok('P2 the
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
await page.
|
|
137
|
-
await
|
|
129
|
+
ok('P2 the chip shows the ticked product\'s tile, its name in words', /IDPF$/.test(await page.getAttribute('#hmPick', 'aria-label')) && (await page.$$('#hmPick .ppk-t')).length === 1, await page.getAttribute('#hmPick', 'aria-label'));
|
|
130
|
+
// the keyboard: Enter opens the list, the arrows move, Enter ticks, Escape applies
|
|
131
|
+
await page.focus('#hmPick'); await page.keyboard.press('Enter'); await page.waitForSelector('#ppMenu');
|
|
132
|
+
ok('P13 keyboard: Enter on the chip opens the list on its first row', await page.evaluate(() => document.activeElement && document.activeElement.dataset.pp === '*'));
|
|
133
|
+
await page.focus(`#ppMenu [data-pp="${wB.id}"]`); await page.keyboard.press('Enter');
|
|
134
|
+
ok('P13 keyboard: Enter on a row ticks it', (await ticks(page)).includes(wB.id + ':true'));
|
|
135
|
+
await page.keyboard.press('ArrowDown');
|
|
136
|
+
ok('P13 keyboard: the arrows move in the list', await page.evaluate(() => !!document.activeElement && !!document.activeElement.closest('#ppMenu')));
|
|
138
137
|
await page.keyboard.press('Escape');
|
|
139
|
-
ok('P13 keyboard: Escape closes the
|
|
138
|
+
ok('P13 keyboard: Escape closes the list and applies the ticks', !(await page.$('#ppMenu')) && !!(await until(async () => (await rowsOf(page)).length === 2, 20000)));
|
|
139
|
+
ok('P3 the default ticks save the default: the saved choice is gone', (await until(async () => ((await setting()) || {}).changed === false, 10000)), JSON.stringify(await setting()));
|
|
140
|
+
await pick(page); if ((await ticks(page)).includes(home.id + ':true')) await tick(page, home.id); await tick(page, wB.id); await page.keyboard.press('Escape');
|
|
141
|
+
await until(async () => JSON.stringify(((await setting()) || {}).value) === JSON.stringify([wA.id]), 10000);
|
|
140
142
|
ok('P3 the choice survives a reload', await (async () => { await page.reload({ waitUntil: 'domcontentloaded' }); return until(async () => { const r = await rowsOf(page); return r.length === 1 && r[0].tag === 'IDPF' ? 1 : 0; }, 20000); })());
|
|
141
|
-
//
|
|
142
|
-
await pick(page); await page
|
|
143
|
-
ok('P3
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
ok('P3 and the saved choice is gone',
|
|
143
|
+
// All products: every workspace, the home one included, is read; saved as '*' so a workspace added later joins
|
|
144
|
+
await pick(page); await tick(page, '*'); await page.keyboard.press('Escape');
|
|
145
|
+
ok('P3 All products saves every workspace (*) and the home one is read', !!(await until(async () => { const st = await setting(); const m = await json('GET', '/api/briefing-premium'); return st && JSON.stringify(st.value) === '["*"]' && m.body && m.body.model && m.body.model.products.available.every((a) => a.on); }, 20000)), JSON.stringify(await setting()));
|
|
146
|
+
ok('P3 with every one ticked the chip says All', /^All/.test(await page.textContent('#hmPick')) && /all 3$/.test(await page.getAttribute('#hmPick', 'aria-label')), await page.getAttribute('#hmPick', 'aria-label'));
|
|
147
|
+
// back to the default: tick exactly the two products
|
|
148
|
+
await pick(page); await tick(page, home.id); await page.keyboard.press('Escape');
|
|
149
|
+
ok('P3 ticking the default again reads every product but the home one, and the saved choice is gone', await until(async () => (await rowsOf(page)).length === 2 && ((await setting()) || {}).changed === false, 20000), JSON.stringify(await setting()));
|
|
148
150
|
ok('no page error', errors.length === 0, errors.join(' | '));
|
|
149
151
|
await ctx.close();
|
|
150
152
|
}
|
|
@@ -186,16 +188,17 @@ const product = (name, cond) => {
|
|
|
186
188
|
const { ctx, page } = await open({ w, h: 800, theme: th });
|
|
187
189
|
await until(async () => (await rowsOf(page)).length >= 1, 20000);
|
|
188
190
|
await pick(page);
|
|
189
|
-
const o = await page.evaluate(() => ({ sw: document.documentElement.scrollWidth, cw: document.documentElement.clientWidth, menu: (() => { const r = document.querySelector('#
|
|
190
|
-
ok(`P13 at ${w} px, ${th}: no sideways scroll with the
|
|
191
|
+
const o = await page.evaluate(() => ({ sw: document.documentElement.scrollWidth, cw: document.documentElement.clientWidth, chip: Math.round(document.querySelector('#hmPick').getBoundingClientRect().height), sheet: document.querySelector('#ppMenu').classList.contains('sheet'), menu: (() => { const r = document.querySelector('#ppMenu').getBoundingClientRect(); return { l: Math.round(r.left), r: Math.round(r.right) }; })() }));
|
|
192
|
+
ok(`P13 at ${w} px, ${th}: no sideways scroll with the list open, the list stays on screen (a sheet on a phone), and the chip is 44 px`, o.sw <= o.cw && o.menu.l >= 0 && o.menu.r <= o.cw && o.sheet === (w < 760) && (w >= 760 || o.chip >= 44), JSON.stringify(o));
|
|
191
193
|
await ctx.close();
|
|
192
194
|
}
|
|
193
195
|
|
|
194
196
|
{
|
|
195
197
|
// the narrowed view (P12): the one-workspace page, with a way back
|
|
198
|
+
const before = JSON.stringify(((await setting()) || {}).value);
|
|
196
199
|
const { ctx, page } = await open({ q: '?ws=' + encodeURIComponent(wB.id) });
|
|
197
|
-
await
|
|
198
|
-
ok('P12 ?ws= shows that one workspace
|
|
200
|
+
await page.waitForSelector('#hmPick', { timeout: 20000 });
|
|
201
|
+
ok('P12 ?ws= shows that one workspace on the chip and leaves the saved pick alone', /microsites$/.test(await page.getAttribute('#hmPick', 'aria-label')) && JSON.stringify(((await setting()) || {}).value) === before, await page.getAttribute('#hmPick', 'aria-label'));
|
|
199
202
|
await ctx.close();
|
|
200
203
|
}
|
|
201
204
|
return finish();
|
package/workspace/changelog.json
CHANGED
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"v": "0.425.0",
|
|
4
|
+
"at": "2026-10-27T01:04:19.475Z",
|
|
5
|
+
"f": 2,
|
|
6
|
+
"prs": [
|
|
7
|
+
{
|
|
8
|
+
"n": 1066,
|
|
9
|
+
"t": "Recording tab and one product picker (batch 12, items 1 and 5)",
|
|
10
|
+
"s": "Recording tab and one product picker (batch 12, items 1 and 5)"
|
|
11
|
+
}
|
|
12
|
+
]
|
|
13
|
+
},
|
|
2
14
|
{
|
|
3
15
|
"v": "0.424.0",
|
|
4
16
|
"at": "2026-10-27T00:38:50.632Z",
|