create-pmos 0.692.0 → 0.693.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 +9 -3
- 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/adler-moments-test.js +3 -35
- package/workspace/adler-seasons-test.js +1 -1
- package/workspace/briefing-premium-adddoc-test.js +1 -1
- package/workspace/briefing-premium-board-test.js +1 -1
- package/workspace/briefing-premium-doc-edit-test.js +1 -1
- package/workspace/briefing-premium-work-test.js +2 -2
- package/workspace/changelog.json +8 -2
- package/workspace/chat-asks-test.js +1 -1
- package/workspace/core-docs-workflow-test.js +1 -1
- package/workspace/ev-everywhere-test.js +3 -14
- package/workspace/guide/home.md +1 -1
- package/workspace/guide/layout.md +2 -2
- package/workspace/guide/settings-and-switches.md +0 -1
- package/workspace/impact-screens-test.js +2 -47
- package/workspace/ini-workflow-test.js +1 -1
- package/workspace/live-pill-round-test.js +6 -18
- package/workspace/milestone-suggest-test.js +4 -28
- package/workspace/news-viewers-test.js +3 -29
- 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 +4 -4
- package/workspace/premium-chat-attach-test.js +3 -2
- package/workspace/premium-chat-chart-tab-test.js +8 -7
- package/workspace/premium-chat-context-test.js +3 -1
- package/workspace/premium-chat-goal-view-test.js +3 -1
- package/workspace/premium-chat-line-test.js +8 -6
- package/workspace/premium-chat-report-tab-test.js +13 -5
- package/workspace/premium-chat-term-test.js +2 -2
- package/workspace/premium-chat-viewer-test.js +10 -16
- package/workspace/premium-core-doc-issue-test.js +7 -2
- package/workspace/premium-discuss-landing-test.js +9 -5
- package/workspace/premium-html-viewer-test.js +7 -3
- package/workspace/premium-link-suggest-test.js +6 -10
- package/workspace/premium-phone-card-test.js +2 -2
- package/workspace/premium-viewer-download-test.js +1 -1
- package/workspace/premium-viewer-flicker-test.js +1 -1
- package/workspace/premium-viewer-share-test.js +2 -2
- package/workspace/premium-viewer-test.js +1 -1
- package/workspace/premium-vw-cal-test.js +1 -1
- package/workspace/premium-vw-copy-test.js +3 -3
- package/workspace/premium-vw-doc-test.js +1 -1
- package/workspace/premium-vw-item-test.js +1 -1
- package/workspace/premium-work-depth-test.js +2 -2
- package/workspace/program-charter-test.js +1 -12
- package/workspace/program-leave-test.js +2 -2
- package/workspace/program-order-test.js +3 -65
- package/workspace/project-onboard-flow-test.js +5 -5
- package/workspace/public/pm/cozy-home.css +0 -6
- package/workspace/public/pm/cozy-panels.js +2 -6
- package/workspace/public/pm/cozy-popup.css +1 -0
- package/workspace/public/pm/cozy-popup.js +15 -2
- package/workspace/public/pm/cozy-today-page.css +1 -1
- package/workspace/public/pm/cozy-today.css +0 -14
- package/workspace/public/pm/cozy-viewer.js +14 -38
- package/workspace/public/pm/goal-chat.js +2 -2
- package/workspace/public/pm/home-app.js +8 -67
- package/workspace/public/pm/home-chat.js +1 -1
- package/workspace/public/pm/home-ses-name.js +3 -2
- package/workspace/public/pm/home-today.js +4 -18
- package/workspace/public/premium-intelligence.html +1 -1
- package/workspace/public/premium-viewer.html +1 -1
- package/workspace/public/premium-workflows.html +1 -1
- package/workspace/ready-dash-ui-test.js +1 -1
- package/workspace/rename-test.js +2 -2
- package/workspace/server.js +11 -12
- package/workspace/session-names-test.js +34 -56
- package/workspace/sort-order-test.js +2 -71
- package/workspace/split-merge-ui-test.js +1 -1
- package/workspace/stage-card-tasks-test.js +1 -1
- package/workspace/stage-card-test.js +1 -1
- package/workspace/task-card-test.js +1 -1
- package/workspace/task-press-test.js +1 -1
- package/workspace/task-views-test.js +1 -1
- package/workspace/test-lists/adler-seasons-art.json +3 -6
- package/workspace/test-lists/batch18-asks.json +1 -1
- package/workspace/test-lists/briefing-premium.json +1 -11
- package/workspace/test-lists/premium-agreed-viewer.json +1 -1
- package/workspace/test-run.js +0 -2
- package/workspace/test-timings.json +0 -4
- package/workspace/tk-tasks-test.js +3 -17
- package/workspace/viewer-trail-test.js +2 -2
- package/workspace/workflows-setup-test.js +4 -2
- package/workspace/adler-seasons-art-test.js +0 -116
- package/workspace/briefing-premium-initiative-test.js +0 -289
- package/workspace/briefing-premium-products-test.js +0 -209
- package/workspace/briefing-premium-sources-test.js +0 -250
- package/workspace/briefing-premium-test.js +0 -282
- package/workspace/home-other-product-test.js +0 -197
- package/workspace/home-pill-test.js +0 -138
- package/workspace/home-railcard-test.js +0 -196
- package/workspace/home-rows-test.js +0 -389
- package/workspace/panels-test.js +0 -454
- package/workspace/public/premium.html +0 -48
- package/workspace/test-lists/batch18-panels.json +0 -9
- package/workspace/test-lists/home-railcard.json +0 -9
- package/workspace/test-lists/home-sessions-pill.json +0 -6
- package/workspace/test-lists/viewer-home-rows.json +0 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pmos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.693.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": {
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
],
|
|
35
35
|
"pmosChanges": [
|
|
36
36
|
{
|
|
37
|
-
"v": "0.
|
|
38
|
-
"at": "2026-11-22T09:
|
|
37
|
+
"v": "0.693.0",
|
|
38
|
+
"at": "2026-11-22T09:36:04.094Z",
|
|
39
39
|
"f": 4,
|
|
40
40
|
"prs": [
|
|
41
41
|
{
|
|
@@ -43,6 +43,12 @@
|
|
|
43
43
|
"t": "Show who raised each initiative (Raised by column, group, sort and filter on Work)",
|
|
44
44
|
"s": "Show who raised each initiative (Raised by column, group, sort and filter on Work)",
|
|
45
45
|
"k": "new"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"n": 1490,
|
|
49
|
+
"t": "Delete Home's desk page, its fold and its rail card (home-page-retire slice 1b)",
|
|
50
|
+
"s": "Delete Home's desk page, its fold and its rail card (home-page-retire slice 1b)",
|
|
51
|
+
"k": "imp"
|
|
46
52
|
}
|
|
47
53
|
]
|
|
48
54
|
},
|
package/payload/KIT-VERSION
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Reference
|
|
3
3
|
title: "Eval calibration log"
|
|
4
4
|
description: "Append-only record of every PM override of an evaluator verdict."
|
|
5
|
-
generated: {by: process:create-pmos, at: "2026-11-22T09:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-22T09:36:01Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Reference
|
|
3
3
|
title: "Health budgets"
|
|
4
4
|
description: "Closed registry of health-budget anchors (D59), edited only by the PM."
|
|
5
|
-
generated: {by: process:create-pmos, at: "2026-11-22T09:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-22T09:36:01Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Reference
|
|
3
3
|
title: "Discoveries and friction log"
|
|
4
4
|
description: "Append-only record of what runs discovered and where the process rubbed."
|
|
5
|
-
generated: {by: process:create-pmos, at: "2026-11-22T09:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-22T09:36:01Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
'use strict';
|
|
3
3
|
/* adler-moments-test.js — Adler on the phone and in Settings, in the real pages (feedback batch 17 item 4-B; canvas AdP2, AdP5, AdP6, AdM4).
|
|
4
|
-
*
|
|
4
|
+
* Today from the real server (Your day's checks, F1, F2 and P1, went with Home's list: home-desk-layout-delete), at 390 px with touch; the board and briefing are the fixtures, and GET /api/sources is stubbed with
|
|
5
5
|
* Jira failed. POST /api/sources/refresh is recorded.
|
|
6
6
|
* E1 no ears over the menu button (chief-of-staff delete list); the button's name says a call is the PM's
|
|
7
|
-
* F1 Your day (Good morning) says "Jira isn't answering." in one quiet line with its read-again icon; no rain cloud
|
|
8
|
-
* F2 its icon reads Jira again (POST /api/sources/refresh with source jira)
|
|
9
|
-
* P1 a pull from the top of Your day lets Adler peek up, says it reads again, and reads Home again
|
|
10
7
|
* S1 Settings > Updates: a face on the updates card; General: one face only
|
|
11
8
|
* N no page error
|
|
12
9
|
* PMOS_SHOTS=<dir> also saves the screenshots. */
|
|
@@ -75,8 +72,8 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
|
75
72
|
await page.route(/\/api\/sources\/refresh$/, (rq) => json(rq, { ok: true, started: 'local' }));
|
|
76
73
|
// the night scene would hide nothing here, but keep the test on the day: Quiet after off
|
|
77
74
|
await page.addInitScript(() => { try { localStorage.setItem('pmos.adler', JSON.stringify({ 'adler.quiet': 'never' })); } catch { /* none */ } });
|
|
78
|
-
await page.goto(BASE + '/
|
|
79
|
-
await until(() => page.evaluate(() => !!document.
|
|
75
|
+
await page.goto(BASE + '/today.html');
|
|
76
|
+
await until(() => page.evaluate(() => !!document.getElementById('czFab')), 30000);
|
|
80
77
|
|
|
81
78
|
/* E1 — chief-of-staff (UI grill delete list): no ears over the menu button; the one dot says a call is the PM's, and the name says it */
|
|
82
79
|
await page.evaluate(() => document.dispatchEvent(new CustomEvent('cz:calls', { detail: { count: 1 } })));
|
|
@@ -84,35 +81,6 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
|
84
81
|
ok('E1 no ears over the menu button; its name says one call is yours', !!ears && !ears.ears, JSON.stringify(ears));
|
|
85
82
|
await shot(page, 'ears');
|
|
86
83
|
|
|
87
|
-
/* F1-F2 */
|
|
88
|
-
await page.click('#hmList [data-hm-day]');
|
|
89
|
-
// Good morning (batch 27 item 10, frames G1-G3): a failed source is one quiet line under the lead, never the lead and never the rain cloud
|
|
90
|
-
const f1 = await until(() => page.evaluate(() => { const b = document.querySelector('#czViewer .gm-lead .yd-open'); const q = b && b.querySelector('.gm-src'); if (!q) return null; return { quiet: q.querySelector('span').textContent, line: b.querySelector('.yd-ht b').textContent, rain: !!b.querySelector('.k-rain, .yd-scene'), sync: !!q.querySelector('[data-yd="sync"][aria-label="Read Jira again"]') }; }), 15000);
|
|
91
|
-
ok('F1 Your day says "Jira isn\'t answering." in one quiet line with its read-again icon; no rain cloud, and the lead is the day\'s own line', f1 && /^Jira isn’t answering\./.test(f1.quiet) && !/answering/.test(f1.line) && !f1.rain && f1.sync, JSON.stringify(f1));
|
|
92
|
-
await shot(page, 'sync-fail');
|
|
93
|
-
await page.click('#czViewer [data-yd="sync"]');
|
|
94
|
-
const f2 = await until(() => posts.find((p) => p.path === '/api/sources/refresh'));
|
|
95
|
-
ok('F2 the icon reads Jira again', f2 && /"source":"jira"/.test(f2.body), JSON.stringify(f2));
|
|
96
|
-
|
|
97
|
-
/* P1 — a pull from the top of the body, as a finger would */
|
|
98
|
-
const reads = () => page.evaluate(() => performance.getEntriesByType('resource').filter((e) => /\/api\/home-review/.test(e.name)).length);
|
|
99
|
-
const before = await reads();
|
|
100
|
-
const peek = await page.evaluate(async () => {
|
|
101
|
-
const body = document.querySelector('#czViewer .cz-vw-body') || document.querySelector('#czViewer [data-cz-pull]');
|
|
102
|
-
const el = document.querySelector('[data-cz-pull]') || body;
|
|
103
|
-
const t = (y) => new Touch({ identifier: 1, target: el, clientX: 200, clientY: y });
|
|
104
|
-
el.dispatchEvent(new TouchEvent('touchstart', { touches: [t(120)], bubbles: true }));
|
|
105
|
-
for (let y = 130; y <= 300; y += 20) el.dispatchEvent(new TouchEvent('touchmove', { touches: [t(y)], bubbles: true }));
|
|
106
|
-
const mid = !!el.querySelector('.cz-pull .ad-svg');
|
|
107
|
-
el.dispatchEvent(new TouchEvent('touchend', { touches: [], changedTouches: [t(300)], bubbles: true }));
|
|
108
|
-
await new Promise((r) => setTimeout(r, 50));
|
|
109
|
-
const p = el.querySelector('.cz-pull'); return { mid, reading: p ? p.querySelector('.cz-pull-t').textContent : '' };
|
|
110
|
-
});
|
|
111
|
-
ok('P1 a pull lets Adler peek up, and he says he reads your day again', peek.mid && peek.reading === 'Reading your day again', JSON.stringify(peek));
|
|
112
|
-
await shot(page, 'pull');
|
|
113
|
-
const after = await until(async () => ((await reads()) > before ? true : null), 15000);
|
|
114
|
-
ok('P1 and Home reads again', after);
|
|
115
|
-
|
|
116
84
|
/* S1 */
|
|
117
85
|
await page.evaluate(() => import('/pm/cozy-settings.js').then((M) => M.openSettings('updates')));
|
|
118
86
|
const s1 = await until(() => page.evaluate(() => { const m = document.querySelector('#evSettings .ev-st-main'); return m && m.querySelector('.ev-upd') ? { faces: m.querySelectorAll('.ev-ad svg, .ev-ad .ad-dot').length } : null; }), 15000);
|
|
@@ -53,7 +53,7 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
|
53
53
|
page.on('request', (rq) => { if (rq.method() === 'POST' && new URL(rq.url()).pathname === '/api/settings') { try { posts.push(JSON.parse(rq.postData() || '{}')); } catch { /* not JSON */ } } });
|
|
54
54
|
// the clock: Date.now and new Date() read 3 Nov 2026 (timers keep running)
|
|
55
55
|
await page.addInitScript((t) => { const D = Date, off = t - D.now(); class F extends D { constructor(...a) { super(...(a.length ? a : [D.now() + off])); } static now() { return D.now() + off; } } window.Date = F; }, NOW);
|
|
56
|
-
await page.goto(BASE + '/
|
|
56
|
+
await page.goto(BASE + '/today.html');
|
|
57
57
|
await until(() => page.evaluate(() => !!document.querySelector('#hmList')), 30000);
|
|
58
58
|
// each viewport starts from the defaults (the server keeps a press between the two)
|
|
59
59
|
await page.evaluate(() => import('/pm/http.js').then((M) => Promise.all(['adler.dress.days', 'adler.dress.wear', 'adler.dress.on'].map((key) => M.pmPost('/api/settings', { key, reset: true })))));
|
|
@@ -36,7 +36,7 @@ const CUSTOM = [
|
|
|
36
36
|
];
|
|
37
37
|
const PAGES = {
|
|
38
38
|
// the initiative is a layout inside Home (premium-agreed-design): Add a document is in its Overview, a minimal form in the Viewer (Waiting for design)
|
|
39
|
-
initiative: { file: '/
|
|
39
|
+
initiative: { file: '/today.html', api: '**/api/initiative-premium*', scope: 'initiative:self-serve-v2', mk: (custom) => IP.build(IF.facts({ custom })), ready: '#czViewer .iv-mc', btn: '#czViewer [data-hi-v="docs"]', qs: '?ini=self-serve-v2&ws=w1&board=w1&theme=' },
|
|
40
40
|
};
|
|
41
41
|
|
|
42
42
|
(async () => {
|
|
@@ -308,7 +308,7 @@ const IVREAD = () => {
|
|
|
308
308
|
const pri = await q.evaluate(() => [...document.querySelectorAll('#czViewer [data-iv-primary]')].map((b) => ({ act: b.dataset.ivPrimary, label: b.getAttribute('aria-label'), text: b.textContent.trim() })));
|
|
309
309
|
ok('B1 the panel puts the sign-off first, with the sign-off as the one icon-only primary', !!nb && /sign-off can wait|Every release ticket is done/.test(nb.why || '') && pri.length === 1 && pri[0].act === 'page' && pri[0].label === 'Your sign-off · v2.4' && pri[0].text === '', JSON.stringify([nb && nb.why, pri]));
|
|
310
310
|
await Promise.all([q.waitForURL(/[?&]ini=sso-partners/, { timeout: 8000 }).catch(() => {}), q.click('#czViewer [data-iv-primary]')]);
|
|
311
|
-
ok('B1 signing off goes to the initiative\'s page on Home, where the sign-off is', /\/
|
|
311
|
+
ok('B1 signing off goes to the initiative\'s page on Home, where the sign-off is', /\/today\.html\?.*\bini=sso-partners/.test(q.url()), q.url());
|
|
312
312
|
await R.ctx.close();
|
|
313
313
|
}
|
|
314
314
|
|
|
@@ -78,7 +78,7 @@ const prop = (o) => Object.assign({ id: 'prop-a', state: 'proposed', prompt: 'ad
|
|
|
78
78
|
});
|
|
79
79
|
await page.route('**/api/docs/library*', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, kinds: [], files: [{ path: PATH, title: 'Self-serve PRD' }], edges: [] }) }));
|
|
80
80
|
await page.route('**/api/docs?*', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, docs: [{ path: PATH, links: [] }] }) }));
|
|
81
|
-
await page.goto(BASE + '/
|
|
81
|
+
await page.goto(BASE + '/today.html?ini=self-serve-v2&ws=w1&theme=' + theme);
|
|
82
82
|
if (w <= 760) await everyPart(page);
|
|
83
83
|
// the initiative's page in the Viewer (canvas HbC): its Documents' "Show all N" opens every document there
|
|
84
84
|
await until(() => page.evaluate(() => !!document.querySelector('#czViewer [data-iv-docs]')), 15000);
|
|
@@ -57,7 +57,7 @@ const view = () => { const v = document.querySelector('#czViewer:not([hidden])')
|
|
|
57
57
|
await page.route('**/api/pm-items/**', (r) => { const rq = r.request(); posts.push({ path: new URL(rq.url()).pathname, body: JSON.parse(rq.postData() || '{}'), headers: rq.headers() }); r.fulfill({ status: answer.status, contentType: 'application/json', body: JSON.stringify(answer.body) }); });
|
|
58
58
|
}
|
|
59
59
|
await page.goto(BASE + '/premium-work.html?theme=' + theme);
|
|
60
|
-
await until(() => page.evaluate(() => /\/
|
|
60
|
+
await until(() => page.evaluate(() => /\/today\.html$/.test(location.pathname) && !!document.querySelector('#czFab')), 15000);
|
|
61
61
|
await sleep(600);
|
|
62
62
|
await page.evaluate(() => import('/pm/home-work.js').then((M) => { M.openMyWork(); })); // the page itself: Home no longer opens it (testing fixes); an item and Focus open alone
|
|
63
63
|
const up = await until(() => page.evaluate(() => { const v = document.querySelector('#czViewer:not([hidden])'); return !!v && /My work/.test(v.textContent) && !/Reading your list/.test(v.textContent); }), 15000);
|
|
@@ -70,7 +70,7 @@ const view = () => { const v = document.querySelector('#czViewer:not([hidden])')
|
|
|
70
70
|
ok('0 My work opens in the Viewer', !!A.up);
|
|
71
71
|
if (!A.up) return finish(1);
|
|
72
72
|
/* M1 */
|
|
73
|
-
ok('M1 /premium-work.html opens Today (Home), the place menu marks Today and nothing on the page is the old My work page', await p.evaluate(() => /\/
|
|
73
|
+
ok('M1 /premium-work.html opens Today (Home), the place menu marks Today and nothing on the page is the old My work page', await p.evaluate(() => /\/today\.html$/.test(location.pathname) && /Today/.test((document.querySelector('#czMenu [aria-current="page"]') || {}).textContent || '') && !document.querySelector('#qBody, #capIn, nav.rail')));
|
|
74
74
|
ok('M1 the page is still served at /premium-work and /premium-work.html', (await fetch(BASE + '/premium-work', { redirect: 'manual' })).status === 302 && (await fetch(BASE + '/premium-work.html')).status === 200);
|
|
75
75
|
/* M4 */
|
|
76
76
|
const v0 = await p.evaluate(view);
|
package/workspace/changelog.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
[
|
|
2
2
|
{
|
|
3
|
-
"v": "0.
|
|
4
|
-
"at": "2026-11-22T09:
|
|
3
|
+
"v": "0.693.0",
|
|
4
|
+
"at": "2026-11-22T09:36:04.094Z",
|
|
5
5
|
"f": 4,
|
|
6
6
|
"prs": [
|
|
7
7
|
{
|
|
@@ -9,6 +9,12 @@
|
|
|
9
9
|
"t": "Show who raised each initiative (Raised by column, group, sort and filter on Work)",
|
|
10
10
|
"s": "Show who raised each initiative (Raised by column, group, sort and filter on Work)",
|
|
11
11
|
"k": "new"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"n": 1490,
|
|
15
|
+
"t": "Delete Home's desk page, its fold and its rail card (home-page-retire slice 1b)",
|
|
16
|
+
"s": "Delete Home's desk page, its fold and its rail card (home-page-retire slice 1b)",
|
|
17
|
+
"k": "imp"
|
|
12
18
|
}
|
|
13
19
|
]
|
|
14
20
|
},
|
|
@@ -51,7 +51,7 @@ const STEPS = [{ text: 'Calendar', state: 'done' }, { text: 'Mail', state: 'done
|
|
|
51
51
|
await page.route('**/api/briefing-premium/**', (r) => { const rq = r.request(); if (rq.method() !== 'GET') posts.push({ path: new URL(rq.url()).pathname, body: JSON.parse(rq.postData() || '{}') }); r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, turns: [], working: false, session: 's-asks' }) }); });
|
|
52
52
|
await page.route('**/api/sessions/conversation**', (r) => r.fulfill({ json: { ok: true, ...st.conv } }));
|
|
53
53
|
await page.goto(BASE + '/premium-chat.html?about=' + encodeURIComponent(KEY), { waitUntil: 'domcontentloaded' });
|
|
54
|
-
await page.waitForFunction(() =>
|
|
54
|
+
await page.waitForFunction(() => { const i = document.querySelector('#hmIn'); return !!i && !!i.offsetParent; }, null, { timeout: 15000 }); // on a desktop the chat is the popup's: wait until it shows
|
|
55
55
|
return { page, ctx, errors, posts, st };
|
|
56
56
|
};
|
|
57
57
|
const card = (page, kind) => until(async () => page.evaluate((k) => { const c = document.querySelector(`#hmLog .hm-askk[data-ask-kind="${k}"]`); if (!c) return null; const w = c.closest('.hm-askw, .hm-askc');
|
|
@@ -102,7 +102,7 @@ const OLD = new Map([['initiative:' + ID + '|risks', { drafts: [], issued: { at:
|
|
|
102
102
|
await page.route('**/api/briefing-premium/**', (r) => json(r, { ok: true, turns: [], working: false }));
|
|
103
103
|
await page.route(/\/api\/workflows(\?.*)?$/, (r) => json(r, { ok: true, workflows: WF.list(LIB) }));
|
|
104
104
|
await page.addInitScript(() => { try { localStorage.setItem('pmos.wf.seen', JSON.stringify({ 'self-serve-v2|tender': 1 })); } catch { /* none */ } });
|
|
105
|
-
await page.goto(BASE + '/
|
|
105
|
+
await page.goto(BASE + '/today.html?ini=' + ID + '&ws=w1&board=w1&theme=' + theme);
|
|
106
106
|
if (w <= 760) await everyPart(page);
|
|
107
107
|
let up = await until(() => page.evaluate(() => !!document.querySelector('#czViewer:not([hidden]) [data-hi-v]')), 30000);
|
|
108
108
|
if (up) {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* U1 the place menu: Home, Board, Intelligence, then Search and Settings as icons (feedback batch 16 item 5, FmA1Menu); no More anywhere
|
|
6
6
|
* S1 Ctrl K opens Search over the page; typing finds a document on main and a draft on the worktree; the kind chips narrow; Escape closes
|
|
7
7
|
* S2 the worktree chip lists the worktree and leaving it out drops its draft; S3 a result opens in the Viewer
|
|
8
|
-
* N1
|
|
8
|
+
* N1 the place menu opens no New for you page
|
|
9
9
|
* R1 Settings › Connectors lists each source with when it was read (was Sources, FmA3Settings); R2 Settings opens on General with its
|
|
10
10
|
* sections (on Connectors while a source is stale), and Escape closes it
|
|
11
11
|
* B1 the Board's Settings and Sources open Settings; B2 Ctrl K on Board opens the same Search
|
|
@@ -70,7 +70,7 @@ const put = (root, rel, text) => { fs.mkdirSync(path.dirname(path.join(root, rel
|
|
|
70
70
|
browser = classicBoard(await chromium.launch({ executablePath: exe, headless: true, args: ['--no-sandbox'] }));
|
|
71
71
|
const shot = process.env.EV_SHOTS || '';
|
|
72
72
|
const snap = async (pg, name) => { if (!shot) return; fs.mkdirSync(shot, { recursive: true }); await sleep(400); await pg.screenshot({ path: path.join(shot, name + '.png') }); };
|
|
73
|
-
const open = async ({ w = 1440, h = 900, page = '
|
|
73
|
+
const open = async ({ w = 1440, h = 900, page = 'today.html', theme = '' } = {}) => {
|
|
74
74
|
const ctx = await browser.newContext({ viewport: { width: w, height: h } });
|
|
75
75
|
const pg = await ctx.newPage(); const errors = [], posts = [];
|
|
76
76
|
pg.on('pageerror', (e) => errors.push(String(e)));
|
|
@@ -111,19 +111,8 @@ const put = (root, rel, text) => { fs.mkdirSync(path.dirname(path.join(root, rel
|
|
|
111
111
|
await pg.keyboard.press('Escape');
|
|
112
112
|
await until(() => pg.evaluate(() => !document.querySelector('#czViewer:not([hidden])')));
|
|
113
113
|
|
|
114
|
-
/* N: New for you
|
|
115
|
-
posts.length = 0;
|
|
116
|
-
const nfy = (await json('GET', '/api/news-for-you?ws=' + encodeURIComponent(ws))).body || {};
|
|
117
|
-
await pg.click('#hmList [data-hm-day]');
|
|
118
|
-
const yd = await until(() => pg.evaluate(() => { const v = document.querySelector('#czViewer:not([hidden])'); if (!v || !v.querySelector('.yd')) return null; const f = v.querySelector('.gm-since');
|
|
119
|
-
return { cal: !!v.querySelector('.cz-vw-hd [data-cz-vw-p="cal"]'), more: !!v.querySelector('.cz-vw-hd [data-cz-vw="more"]'), fold: !!f, rows: f ? f.querySelectorAll('[data-yd="news"]').length : 0, all: !!(f && f.querySelector('[data-yd="seen"]')) }; }), 20000);
|
|
120
|
-
ok('N1 Good morning opens Your day, with the calendar as an icon in its header and no ⋯', !!yd && yd.cal && !yd.more, JSON.stringify(yd));
|
|
121
|
-
ok('N1 New for you is Good morning’s Since yesterday (nyt-ui GM2): the newest 3 at most, with ✓✓; nothing new draws no block', !!yd && (nfy.count > 0 ? yd.fold && yd.rows === Math.min(3, nfy.count) && yd.all : !yd.fold), JSON.stringify({ yd, count: nfy.count }));
|
|
114
|
+
/* N: the place menu no longer opens a New for you page (Your day's own checks went with Home's list: home-desk-layout-delete) */
|
|
122
115
|
ok('N1 the place menu no longer opens a New for you page', await pg.evaluate(() => !document.querySelector('#czMenu [data-cz-news]')));
|
|
123
|
-
const own = posts.filter((u) => u !== '/api/loose-props/rows');
|
|
124
|
-
ok('N1 opening Your day posted nothing', own.length === 0, JSON.stringify(posts));
|
|
125
|
-
await snap(pg, 'day-1440-light');
|
|
126
|
-
await pg.keyboard.press('Escape');
|
|
127
116
|
|
|
128
117
|
/* R: Sources and Settings */
|
|
129
118
|
await until(() => pg.evaluate(() => !document.querySelector('#czViewer:not([hidden])')));
|
package/workspace/guide/home.md
CHANGED
|
@@ -162,7 +162,7 @@ Press the name in the Viewer's header. The name becomes a field.
|
|
|
162
162
|
|
|
163
163
|
PMOS names a session after its first real answer. It does not ask. It changes the name again only when the job changes.
|
|
164
164
|
|
|
165
|
-
- To rename a session, press
|
|
165
|
+
- To rename a session on a desk, press ⋯ in the chat's top bar, then Rename session. The name becomes a field. On a phone, press the name in the top bar. Enter saves and Esc cancels, as above.
|
|
166
166
|
- Your name always wins. After you rename a session, PMOS does not rename it again.
|
|
167
167
|
- **Undo** gives back the name that PMOS gave, and PMOS names the session again.
|
|
168
168
|
- The Home row shows the same name.
|
|
@@ -43,7 +43,7 @@ On a phone, **⋯** at the top right of every screen opens the menu: Today, Work
|
|
|
43
43
|
|
|
44
44
|
## Today
|
|
45
45
|
|
|
46
|
-
On a computer, Today is one page that starts at the left of the panel. At the top are the day and the time, and a greeting. Under them, the Overview and Today's log take the left (at most about 1100 px wide). Today's agenda is in one grey box on the right, about 340 px wide, with the meeting you recorded under it. Today is built from the parts of the PMOS design system: the Overview is a summary card, the log a list card, and the agenda a timeline. Today reads every product. Home's old address
|
|
46
|
+
On a computer, Today is one page that starts at the left of the panel. At the top are the day and the time, and a greeting. Under them, the Overview and Today's log take the left (at most about 1100 px wide). Today's agenda is in one grey box on the right, about 340 px wide, with the meeting you recorded under it. Today is built from the parts of the PMOS design system: the Overview is a summary card, the log a list card, and the agenda a timeline. Today reads every product. Home's old address (`/premium.html`, and a link that names one item) opens Today; Home's own page is gone.
|
|
47
47
|
|
|
48
48
|
The **Overview** is one card written by PMOS (✦). It says how many lines are open, the ones to start with and why, how much free time today has and when your first or next meeting is. It names only what the lines themselves say. The names of the lines to start with are links: press one to open it. Under it, PMOS suggests what to clean up with ✓ ✕, only when it is true, for example "Drop the 2 checks carried more than 60 days".
|
|
49
49
|
|
|
@@ -278,7 +278,7 @@ A chat on a phone uses the full width of the screen:
|
|
|
278
278
|
|
|
279
279
|
Setup is a conversation in Home. It replaces the chat on the right while it runs, and the list of your work stays on the left. There is no separate setup page.
|
|
280
280
|
|
|
281
|
-
Today starts setup when PMOS has no project yet; on a desk it opens in the popup's chat. `pmos` also starts it on a first run. To start it again, open `/
|
|
281
|
+
Today starts setup when PMOS has no project yet; on a desk it opens in the popup's chat. `pmos` also starts it on a first run. To start it again, open `/today.html?onboard=1`. The old addresses `/welcome`, `/premium.html?onboard=1` and `/premium-welcome.html` open the same conversation; the three-step Welcome page they once served is gone.
|
|
282
282
|
|
|
283
283
|
Setup saves its progress on this computer, outside any project folder. A reload continues from the same step.
|
|
284
284
|
|
|
@@ -241,7 +241,6 @@ Do not set these on your own computer. The suites set them to make a run short o
|
|
|
241
241
|
| Variable | What it does | Default | Same in Settings |
|
|
242
242
|
|---|---|---|---|
|
|
243
243
|
| `PMOS_TEST` | `1` allows the test seam of the audit sink. | off | — |
|
|
244
|
-
| `PMOS_DESK_HOME` | `keep` keeps Home at `/premium.html` (the suites set it). Without it, every `/premium.html` address opens Today with the same query; on a desk the chat, session or setup it names opens in the popup. | Today | — |
|
|
245
244
|
| `PMOS_OFFLOOP` | `0` runs the board fold in the server thread, not in a worker. | worker | — |
|
|
246
245
|
| `PMOS_TICK_MS` | The server's tick. | 1 minute | — |
|
|
247
246
|
| `PMOS_LIVENESS_MS` | How often the session list is sent again. | 2 seconds | — |
|
|
@@ -3,11 +3,7 @@
|
|
|
3
3
|
/* impact-screens-test.js — Your impact in the real pages (feedback batch 16 item 7, Phases 2 to 4; canvas GmA1Home, GmA3Garden, GmA2Board).
|
|
4
4
|
* The real Home and Board from the real server; GET /api/impact/week and /weeks are stubbed in the contract's shape (7-impact-api.md), and
|
|
5
5
|
* every POST is recorded so the test can say nothing left for anywhere but /api/impact/seen.
|
|
6
|
-
* H1
|
|
7
|
-
* H2 the one celebration: a thanks says itself in the toast once and is marked read
|
|
8
|
-
* H3 a press opens "Your impact this week" in the Viewer: a row per item, each with its source to open, and the lock line; no digit
|
|
9
|
-
* H4 the log icon opens "Your impact": this week open, a quiet week in plain words, past weeks folded
|
|
10
|
-
* H5 off (or gated): no face press; the greeting is as it was
|
|
6
|
+
* (H1 to H6, Your impact from Home's greeting, went with Home's list: home-desk-layout-delete)
|
|
11
7
|
* B1 Board: an initiative with a milestone delivered this month shows who made it happen, unranked, each with a ticket; no send press
|
|
12
8
|
* N every POST went to /api/impact/seen, and no page error
|
|
13
9
|
* PMOS_SHOTS=<dir> also saves the screenshots. */
|
|
@@ -76,7 +72,7 @@ const WEEKS = { ok: true, on: true, live: true, weeks: [
|
|
|
76
72
|
]);
|
|
77
73
|
}
|
|
78
74
|
|
|
79
|
-
const open = async ({ w = 1440, h = 900, week = WEEK(), url = '/
|
|
75
|
+
const open = async ({ w = 1440, h = 900, week = WEEK(), url = '/today.html' } = {}) => {
|
|
80
76
|
const ctx = await browser.newContext({ viewport: { width: w, height: h }, hasTouch: w < 500 });
|
|
81
77
|
const page = await ctx.newPage();
|
|
82
78
|
const errors = [], posts = [];
|
|
@@ -94,47 +90,6 @@ const WEEKS = { ok: true, on: true, live: true, weeks: [
|
|
|
94
90
|
return { ctx, page, errors, posts };
|
|
95
91
|
};
|
|
96
92
|
|
|
97
|
-
/* H1-H4 */
|
|
98
|
-
{
|
|
99
|
-
const { ctx, page, errors, posts } = await open();
|
|
100
|
-
const face = await until(() => page.evaluate(() => { const b = document.querySelector('#hmList [data-hm-impact]'); return b ? { label: b.getAttribute('aria-label'), next: !!(b.nextElementSibling && b.nextElementSibling.matches('[data-hm-day]')), dayFace: !!document.querySelector('#hmList [data-hm-day] .ad-svg') } : null; }), 30000);
|
|
101
|
-
ok('H1 the greeting\'s Adler is its own press, "Your impact this week", right before "Good morning"', face && face.label === 'Your impact this week' && face.next && !face.dayFace, JSON.stringify(face));
|
|
102
|
-
const toastSaid = await until(() => page.evaluate(() => { const t = document.getElementById('toast'); return t && /thanked you/.test(t.textContent) ? t.textContent : null; }));
|
|
103
|
-
ok('H2 the one celebration: Chen\'s thanks says itself in the toast, and it is marked read', /Chen thanked you · Chen: “the drop-off spec saved us a day”/.test(toastSaid || '') && (await until(() => posts.includes('/api/impact/seen'))), toastSaid);
|
|
104
|
-
await shot(page, 'home-face');
|
|
105
|
-
await page.click('#hmList [data-hm-impact]');
|
|
106
|
-
const vw = await until(() => page.evaluate(() => { const v = document.querySelector('#czViewer'); const c = window.czViewer && window.czViewer.current(); if (!v || v.hidden || !c || c.id !== 'impact-week') return null; const rows = [...v.querySelectorAll('.im-row')]; return rows.length ? { title: c.title, rows: rows.map((r) => ({ t: r.querySelector('.im-t').textContent, href: r.querySelector('a.im-ib') && r.querySelector('a.im-ib').getAttribute('href') })), text: v.querySelector('.cz-vw-body').innerText } : null; }));
|
|
107
|
-
ok('H3 the Viewer "Your impact this week": a row per item, each opening its own source', vw && vw.title === 'Your impact this week' && vw.rows.length === 3 && vw.rows[0].href === 'https://acme.slack.com/archives/C1/p1' && vw.rows[2].href === '/premium.html?ini=descope', JSON.stringify(vw));
|
|
108
|
-
const chrome = vw ? vw.text.replace(/IDPF-\d+/g, '') : '';
|
|
109
|
-
ok('H3 the lock line, and no digit anywhere on the page body (no count, no score)', /Only you see this\. Nothing leaves PMOS\./.test(chrome) && !/\d/.test(chrome), chrome);
|
|
110
|
-
await shot(page, 'impact-week');
|
|
111
|
-
await page.click('#czViewer [data-cz-vw-p="log"]');
|
|
112
|
-
const log = await until(() => page.evaluate(() => { const c = window.czViewer && window.czViewer.current(); const b = document.querySelector('#czViewer .cz-vw-body'); if (!c || c.id !== 'impact-log' || !b || !b.querySelector('.im-wk')) return null; return { sections: b.querySelectorAll('section.im-wk').length, folded: [...b.querySelectorAll('details.im-wk')].map((d) => d.open), quiet: [...b.querySelectorAll('.im-wk.quiet')].map((q) => q.innerText.replace(/\s+/g, ' ').trim()), adler: !!b.querySelector('.im-log .ad-svg') }; }));
|
|
113
|
-
ok('H4 the log: this week open, last week folded, a quiet week in plain words, Adler at the top', log && log.sections === 1 && log.folded.length === 1 && log.folded[0] === false && log.quiet[0] === 'Week of Oct 12 A quiet week' && log.adler, JSON.stringify(log));
|
|
114
|
-
await shot(page, 'impact-log');
|
|
115
|
-
ok('N Home: every POST went to /api/impact/seen or the page\'s own reads, and no page error', !posts.some((p) => /slack|mail|jira|outbox|share|send/i.test(p)) && !errors.length, JSON.stringify({ posts, errors }));
|
|
116
|
-
await ctx.close();
|
|
117
|
-
}
|
|
118
|
-
/* H5 */
|
|
119
|
-
for (const [name, week] of [['off', { ok: true, on: false }], ['gated', WEEK({ live: false, items: [], grow: 'rest', celebrate: null })]]) {
|
|
120
|
-
const { ctx, page } = await open({ week });
|
|
121
|
-
await until(() => page.evaluate(() => !!document.querySelector('#hmList [data-hm-day]')), 30000);
|
|
122
|
-
await sleep(800);
|
|
123
|
-
const st = await page.evaluate(() => ({ face: !!document.querySelector('#hmList [data-hm-impact]'), dayFace: !!document.querySelector('#hmList [data-hm-day] .ad-svg') }));
|
|
124
|
-
ok(`H5 ${name}: no impact press; the greeting keeps its own face`, !st.face && st.dayFace, JSON.stringify(st));
|
|
125
|
-
await ctx.close();
|
|
126
|
-
}
|
|
127
|
-
/* H6 a phone */
|
|
128
|
-
{
|
|
129
|
-
const { ctx, page } = await open({ w: 390, h: 844, week: WEEK({ celebrate: null }) });
|
|
130
|
-
await until(() => page.evaluate(() => !!document.querySelector('#hmList [data-hm-impact]')), 30000);
|
|
131
|
-
await shot(page, 'home-face-phone');
|
|
132
|
-
await page.click('#hmList [data-hm-impact]');
|
|
133
|
-
const full = await until(() => page.evaluate(() => { const v = document.querySelector('#czViewer'); return v && !v.hidden && v.querySelectorAll('.im-row').length === 3 ? v.getBoundingClientRect().width : null; }));
|
|
134
|
-
ok('H6 a phone: the press opens the week full screen', full >= 380, String(full));
|
|
135
|
-
await shot(page, 'impact-week-phone');
|
|
136
|
-
await ctx.close();
|
|
137
|
-
}
|
|
138
93
|
/* B1 */
|
|
139
94
|
{
|
|
140
95
|
const { ctx, page, errors, posts } = await open({ url: '/premium-board.html' });
|
|
@@ -89,7 +89,7 @@ const BRIEF = BRP.build(BRF.facts());
|
|
|
89
89
|
await page.route(/\/api\/workflows(\?.*)?$/, (r) => json(r, { ok: true, workflows: LIB }));
|
|
90
90
|
for (const p of ['ini-wf', 'wontdo', 'archive', 'ini-auto', 'move']) await page.route('**/api/boards/' + p, (r) => json(r, { ok: true, row: {} }));
|
|
91
91
|
if (!fresh) await page.addInitScript(() => { try { localStorage.setItem('pmos.wf.seen', JSON.stringify({ 'self-serve-v2|tender': 1 })); } catch { /* none */ } });
|
|
92
|
-
await page.goto(BASE + '/
|
|
92
|
+
await page.goto(BASE + '/today.html?ini=' + ID + '&ws=w1&board=w1&theme=' + theme);
|
|
93
93
|
if (w <= 760) await everyPart(page);
|
|
94
94
|
const up = await until(() => page.evaluate(() => /Tender/.test((document.querySelector('#czViewer:not([hidden]) .cz-vw-kind') || {}).textContent || '') && !!document.querySelector('#czViewer [data-hi-v="page"] .iv-meta [data-iv-wf]')), 30000);
|
|
95
95
|
return { ctx, page, errors, posts, up, S };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
'use strict';
|
|
3
|
-
/* live-pill-round-test.js — the Live pill as a round number
|
|
3
|
+
/* live-pill-round-test.js — the Live pill as a round number and the panel divider's look (feedback batch 18 item 15,
|
|
4
4
|
* slice 15-B; canvas TbT1Split, TbT4Off, TbT9Divider; brief next18/briefs/15-arrange-panels-build.md rules 9 to 11). The real pages from the
|
|
5
5
|
* real server; GET /api/live is answered by the suite, so the pill's state is the suite's.
|
|
6
6
|
* L1 nothing live: no pill · L2 the pill is a 44 px round button stacked above the menu button, with the number of live items and no marks
|
|
7
7
|
* L3 Claude asks: blue with a glow · L4 with the panels engine a press goes to czPanels.slideOver(item) · L6 false from it: today's open
|
|
8
8
|
* L5 the open menu hides the pill · V1 the first divider wears the sprout, the others only the handle · V2 the day's charm replaces the
|
|
9
|
-
* sprout, fitted to its box · V3 Settings > Adler > Off: the handle only
|
|
10
|
-
* F2 a phone: no
|
|
9
|
+
* sprout, fitted to its box · V3 Settings > Adler > Off: the handle only
|
|
10
|
+
* F2 a phone: no round pill, Live now in the ⋯ menu · every page: no page error (Home's list fold went with Home's page, home-desk-layout-delete)
|
|
11
11
|
* PMOS_SHOTS=<dir> also saves the screenshots. */
|
|
12
12
|
const path = require('path');
|
|
13
13
|
const { classicBoard } = require('./lib/classic-board'); // these checks are about the four Board views, not Work (work-one-view)
|
|
@@ -75,7 +75,7 @@ const ASKS = () => RUNNING().concat([{ id: 'b', name: 'Redistribute plan items',
|
|
|
75
75
|
}));
|
|
76
76
|
ok('L2 the pill shows the number of live items and no marks', l2 && l2.text === '2' && l2.marks === 0 && !l2.asks, JSON.stringify(l2));
|
|
77
77
|
// with the popup's chat (cozy-popup.js sets window.czOpenChat) the rail's chat icon holds the sessions, so the round button gives way
|
|
78
|
-
// (cozy-ev.css cz-chatpop); it comes back only while a panel is put away (panels
|
|
78
|
+
// (cozy-ev.css cz-chatpop); it comes back only while a panel is put away (cozy-panels.js)
|
|
79
79
|
ok('L2 beside the rail\'s chat icon it gives way to the popup\'s chat; without it, a 44 px round button stacked above the chat icon on its centre line', l2 && (l2.chatpop ? l2.w === 0 && l2.h === 0 : l2.w === 44 && l2.h === 44 && l2.round === '50%' && l2.above && l2.centred), JSON.stringify(l2));
|
|
80
80
|
ok('L2 its name still says what it holds and its key', l2 && /^What you work on now: 2 running\. Open \(Ctrl J\)$/.test(l2.label), l2 && l2.label);
|
|
81
81
|
await shot(page, 'pill-running');
|
|
@@ -150,18 +150,9 @@ const ASKS = () => RUNNING().concat([{ id: 'b', name: 'Redistribute plan items',
|
|
|
150
150
|
await page.evaluate(() => { window.czPanels = { slideOver: () => false, list: () => [] }; });
|
|
151
151
|
if (l2 && l2.chatpop) await page.keyboard.press('Control+j'); else await page.click('#czLive');
|
|
152
152
|
await until(() => page.$('#czLiveList a[data-lv="s:b"]'));
|
|
153
|
-
await Promise.all([page.waitForURL(/
|
|
154
|
-
ok('L6 czPanels.slideOver(item) gives false (it did nothing): the row opens as today', /
|
|
153
|
+
await Promise.all([page.waitForURL(/today\.html\?session=b/, { timeout: 15000 }).catch(() => null), page.click('#czLiveList a[data-lv="s:b"]')]);
|
|
154
|
+
ok('L6 czPanels.slideOver(item) gives false (it did nothing): the row opens as today (Today, home-page-retire)', /today\.html\?session=b/.test(page.url()), page.url());
|
|
155
155
|
|
|
156
|
-
/* F1 */
|
|
157
|
-
await page.goto(BASE + '/premium.html');
|
|
158
|
-
const f1 = await until(() => page.evaluate(() => { const b = document.querySelector('#hmList .hm-hd [data-hm-fold]'); return b ? { label: b.getAttribute('aria-label'), title: b.title, text: b.textContent.trim(), svg: !!b.querySelector('svg') } : null; }), 30000);
|
|
159
|
-
ok('F1 the list head has an icon-only fold, named and with a tooltip', f1 && f1.label === 'Fold the list to the rail' && f1.title === f1.label && !f1.text && f1.svg, JSON.stringify(f1));
|
|
160
|
-
await shot(page, 'home-fold');
|
|
161
|
-
await page.click('#hmList .hm-hd [data-hm-fold]');
|
|
162
|
-
ok('F1 with no Viewer open, the press folds the list away', await until(() => page.evaluate(() => document.body.classList.contains('hm-folded') && getComputedStyle(document.querySelector('#hmList')).display === 'none')));
|
|
163
|
-
await page.click('#hmUnfold');
|
|
164
|
-
ok('F1 the button at the top left brings it back', await until(() => page.evaluate(() => !document.body.classList.contains('hm-folded') && !!document.querySelector('#hmList .hm-hd [data-hm-fold]'))));
|
|
165
156
|
ok('every page: no page error', errors.length === 0, errors.join(' | '));
|
|
166
157
|
|
|
167
158
|
/* F2 */
|
|
@@ -177,9 +168,6 @@ const ASKS = () => RUNNING().concat([{ id: 'b', name: 'Redistribute plan items',
|
|
|
177
168
|
ok('F2 a phone: the ⋯ menu says Live now 3', lv === 'Live now3' || /Live now\s*3/.test(lv || ''), JSON.stringify(lv));
|
|
178
169
|
await ph.click('#czFab');
|
|
179
170
|
await shot(ph, 'phone-pill');
|
|
180
|
-
await ph.goto(BASE + '/premium.html');
|
|
181
|
-
await until(() => ph.evaluate(() => !!document.querySelector('#hmList .hm-hd')), 30000);
|
|
182
|
-
ok('F2 a phone has no rail, so no fold', await ph.evaluate(() => !document.querySelector('[data-hm-fold]')));
|
|
183
171
|
await pctx.close();
|
|
184
172
|
await finish();
|
|
185
173
|
})();
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
'use strict';
|
|
3
|
-
/* milestone-suggest-test.js — Claude's milestone suggestions on the program panel
|
|
4
|
-
* canvas XmsgB, sticky xmsgRules). Serves the real Board
|
|
3
|
+
/* milestone-suggest-test.js — Claude's milestone suggestions on the program panel and the charter (feedback batch 4 item 6, option B;
|
|
4
|
+
* canvas XmsgB, sticky xmsgRules). Serves the real Board page from the real server; Project Ascent comes from fixtures/program-ascent.js
|
|
5
5
|
* with a `review` added the way GET /api/programs answers it, and the program writes are captured, not written.
|
|
6
6
|
* F a program with no milestones: Claude's first suggestions take the place of "Add the first milestone", each with why and its source; ✓ ✎ ✕
|
|
7
7
|
* are icon-only; keep all · W later changes lead Waits on you; ✓ keeps, ✕ drops · C the pencil opens the charter with the change filled in;
|
|
8
8
|
* Save writes it and answers the suggestion; last checked and Check now · Z nothing to suggest, nothing shows · K the ◆ dates are reported once
|
|
9
|
-
* · M Home's program card
|
|
9
|
+
* · H on a phone (M, Home's program card, went with Home's list: home-desk-layout-delete). PMOS_SHOTS=<dir> also saves the screenshots the frames are compared with. */
|
|
10
10
|
const path = require('path');
|
|
11
11
|
const { besidePage } = require('./lib/beside-page'); // these checks read the full page beside the page; in the popup work shows its three parts (nav slice 3)
|
|
12
12
|
const { classicBoard } = require('./lib/classic-board'); // these checks are about the four Board views, not Work (work-one-view)
|
|
@@ -61,7 +61,7 @@ const withReview = (open, o = {}) => F.programs().map((p) => ({ ...p, ...(o.empt
|
|
|
61
61
|
if (SHOTS) fs.mkdirSync(SHOTS, { recursive: true });
|
|
62
62
|
const shot = async (p, name) => { if (SHOTS) await p.screenshot({ path: path.join(SHOTS, name + '.png') }); };
|
|
63
63
|
|
|
64
|
-
const open = async ({ w = 1440, h = 900, programs = withReview(CHANGES), dark = false
|
|
64
|
+
const open = async ({ w = 1440, h = 900, programs = withReview(CHANGES), dark = false } = {}) => {
|
|
65
65
|
const c = await browser.newContext({ viewport: { width: w, height: h }, colorScheme: dark ? 'dark' : 'light' });
|
|
66
66
|
const page = await c.newPage();
|
|
67
67
|
const errors = [], posts = [];
|
|
@@ -74,7 +74,6 @@ const withReview = (open, o = {}) => F.programs().map((p) => ({ ...p, ...(o.empt
|
|
|
74
74
|
await page.route('**/api/boards/items*', (r) => json(r, { ok: true, items: A.ITEMS[wsOf(r)] || [] }));
|
|
75
75
|
await page.route('**/api/programs/*', (r) => { const rq = r.request(); posts.push({ path: new URL(rq.url()).pathname, body: JSON.parse(rq.postData() || '{}') }); r.fulfill({ contentType: 'application/json', body: '{"ok":true}' }); });
|
|
76
76
|
await page.route('**/api/board-trail*', (r) => r.fulfill({ status: 500, contentType: 'application/json', body: '{"ok":false,"error":"not in this check"}' }));
|
|
77
|
-
if (home) { await page.goto(BASE + '/premium.html?ws=idpf'); return { page, ctx: c, errors, posts }; }
|
|
78
77
|
await page.goto(BASE + '/premium-board.html?ws=idpf&program=' + programs[0].id);
|
|
79
78
|
await until(() => page.evaluate(() => { const v = document.querySelector('#czViewer'); return !!v && !v.hidden && !!v.querySelector('.pp-vw .pv'); }));
|
|
80
79
|
await until(() => page.evaluate(() => !/reading its board/.test((document.querySelector('#czViewer [data-czs-id="tree"]') || {}).textContent || '')), 6000);
|
|
@@ -146,25 +145,6 @@ const withReview = (open, o = {}) => F.programs().map((p) => ({ ...p, ...(o.empt
|
|
|
146
145
|
ok('Z nothing to suggest: no suggestion row anywhere on the panel', await Z.page.evaluate(() => !document.querySelector('#czViewer .msg-r, #czViewer .msg-box')));
|
|
147
146
|
await Z.ctx.close();
|
|
148
147
|
|
|
149
|
-
/* ── M: Home's Your move ── */
|
|
150
|
-
const M = await open({ home: true });
|
|
151
|
-
// the program's milestone changes lead its card on Home (batch 14 item 4)
|
|
152
|
-
await until(() => M.page.evaluate(() => !!document.querySelector('[data-hm-prog]')), 10000);
|
|
153
|
-
const hm = await until(() => M.page.evaluate(() => { const b = document.querySelector('[data-hm-sel="ms:project-ascent"]'); return b ? [...b.querySelectorAll('b, em')].map((x) => x.textContent.trim()).join(' · ') : null; }), 10000);
|
|
154
|
-
ok('M Home\'s program card has one line for its milestone changes, first', hm === '3 milestone changes · Pilot live to Dec 2', String(hm));
|
|
155
|
-
if (hm) {
|
|
156
|
-
await M.page.click('[data-hm-sel="ms:project-ascent"]');
|
|
157
|
-
ok('M a tap opens the program, where the changes lead its proposals', !!(await until(() => M.page.evaluate(() => { const b = document.querySelector('#czViewer [data-pv="props"]'); if (b && b.getAttribute('aria-expanded') !== 'true') b.click(); return !!document.querySelector('#czViewer .pv-props .msg-r'); }), 8000)));
|
|
158
|
-
}
|
|
159
|
-
// batch 16: on a desktop the greeting opens Your day in the Viewer, as on a phone; the calendar is under ⋯
|
|
160
|
-
if (await M.page.$('[data-hm-day]')) {
|
|
161
|
-
await M.page.click('[data-hm-day]');
|
|
162
|
-
const vw = await until(() => M.page.evaluate(() => { const v = document.querySelector('#czViewer'); const t = v && !v.hidden ? v.textContent.replace(/\s+/g, ' ') : ''; return /Your day/.test(t) ? t : null; }), 8000);
|
|
163
|
-
ok('D on a desktop the greeting opens Your day in the Viewer, as on a phone', !!vw, String(vw).slice(0, 200));
|
|
164
|
-
}
|
|
165
|
-
ok('0 no page error on Home', M.errors.length === 0, M.errors.join(' | '));
|
|
166
|
-
await M.ctx.close();
|
|
167
|
-
|
|
168
148
|
/* ── H: a phone ── */
|
|
169
149
|
const S = await open({ w: 390, h: 844 });
|
|
170
150
|
await S.page.click('#czViewer [data-pv="props"]');
|
|
@@ -181,10 +161,6 @@ const withReview = (open, o = {}) => F.programs().map((p) => ({ ...p, ...(o.empt
|
|
|
181
161
|
await shot(K.page, 'XmsgB-asks-built-dark'); await K.ctx.close();
|
|
182
162
|
const K2 = await open({ dark: true, w: 390, h: 844, programs: withReview(FIRST, { empty: true }) });
|
|
183
163
|
await shot(K2.page, 'XmsgB-first-phone-dark'); await K2.ctx.close();
|
|
184
|
-
const K3 = await open({ w: 390, h: 844, home: true });
|
|
185
|
-
if (await until(() => K3.page.$('[data-hm-day]'), 8000)) { await until(() => K3.page.evaluate(() => !!document.querySelector('[data-hm-prog]')), 8000); await K3.page.click('[data-hm-day]'); }
|
|
186
|
-
await until(() => K3.page.$('[data-hm-sel="ms:project-ascent"]'), 8000);
|
|
187
|
-
await shot(K3.page, 'XmsgB-home-phone'); await K3.ctx.close();
|
|
188
164
|
}
|
|
189
165
|
finish();
|
|
190
166
|
})();
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
* development OvA5Overlap, OvA6Given, OvA7Drafted). A real server on a scratch repository (c3-scan-fixture.js). The real Home runs at
|
|
5
5
|
* 390 and 1440 wide; GET /api/news-for-you, /api/boards/initiative and /api/phone-day are answered in the browser, so each Viewer has
|
|
6
6
|
* one overlap note, one task given to the PM and one finished draft. The POSTs are caught and answered, never sent.
|
|
7
|
-
* O the overlap note · G a task given to you · F the Finished Viewer from Your day
|
|
7
|
+
* O the overlap note · G a task given to you · D dark and desk widths (F, the Finished Viewer from Your day, went with Home's list:
|
|
8
|
+
* home-desk-layout-delete)
|
|
8
9
|
* Set NEWS_VIEWER_SHOTS=<dir> to save screenshots. */
|
|
9
10
|
const fs = require('fs');
|
|
10
11
|
const path = require('path');
|
|
@@ -65,7 +66,7 @@ const ROWS = { 'psle-article-paywall-lock': { title: 'PSLE Article Paywall Lock'
|
|
|
65
66
|
if (route === '/api/news-for-you/seen' && fin) for (const f of fin) if (b && b.ids && b.ids.includes(f.key)) f.seen = true;
|
|
66
67
|
return fail[route] ? json(r, { ok: false, error: fail[route] }, 409) : json(r, { ok: true }); });
|
|
67
68
|
}
|
|
68
|
-
await p.goto(`${F.BASE}/
|
|
69
|
+
await p.goto(`${F.BASE}/today.html?ws=${encodeURIComponent(ws)}`);
|
|
69
70
|
await until(() => p.evaluate(() => !!document.querySelector('#hmList')));
|
|
70
71
|
return { p, ctx, posts, errs };
|
|
71
72
|
}
|
|
@@ -143,33 +144,6 @@ const ROWS = { 'psle-article-paywall-lock': { title: 'PSLE Article Paywall Lock'
|
|
|
143
144
|
ok('G7 no page error', !errs.length, errs.join(' | '));
|
|
144
145
|
await ctx.close();
|
|
145
146
|
}
|
|
146
|
-
/* F — the Finished Viewer from Your day's Drafted for you */
|
|
147
|
-
{
|
|
148
|
-
const fin = [{ id: 't-0123456789ab', key: 'fin:today:t-0123456789ab', title: 'Project Ascent status summary', summary: 'Where the tender stands, and what the TC decides.', body: '## Where the tender stands\nTwo of three vendors cleared the security review.\n\n## What the TC decides\nVendor B on cost, or vendor A on support.', at: new Date(new Date().setHours(8, 10, 0, 0)).toISOString(), status: 'done', link: null, seen: false }];
|
|
149
|
-
const { p, ctx, posts, errs } = await page({ items: [], fin });
|
|
150
|
-
// Home reads the day with the list: Your day opens once that read is in
|
|
151
|
-
await until(() => fin.read);
|
|
152
|
-
await sleep(800);
|
|
153
|
-
await p.click('[data-hm-day]');
|
|
154
|
-
await until(() => p.evaluate(() => !!document.querySelector('#czViewer [data-yd="fin"]')));
|
|
155
|
-
// Good morning says "N drafted for you" once: its line opens the fold (batch 27 item 10)
|
|
156
|
-
await p.click('#czViewer [data-yd="gm-fold"][data-fold="drafts"]');
|
|
157
|
-
await p.click('#czViewer [data-yd="fin"]');
|
|
158
|
-
await until(() => p.evaluate(() => /Project Ascent status summary/.test((document.querySelector('#czVwTitle') || {}).textContent || '')));
|
|
159
|
-
const t = await vwText(p);
|
|
160
|
-
ok('F1 the finished row opens the draft to read: Finished, nothing sent, the text as a document', /Finished · this morning/.test(t) && /Nothing is sent/.test(t) && await p.evaluate(() => /Two of three vendors/.test((document.querySelector('#czViewer article.hv-doc') || {}).textContent || '')), t.slice(0, 300));
|
|
161
|
-
const pri = await p.evaluate(() => [...document.querySelectorAll('#czViewer .czs-pri')].map((b) => b.textContent));
|
|
162
|
-
ok('F2 ONE primary, "Done with it"; the chat icon "Change it in chat" is in the header; no bare "Open it"', pri.join('|') === 'Done with it' && await p.evaluate(() => !!document.querySelector('#czViewer [data-cz-vw-p="chat"][aria-label="Change it in chat"]')) && !/Open it$/.test(t), pri);
|
|
163
|
-
await shot(p, 'finished-390');
|
|
164
|
-
await p.click('#czViewer .czs-pri');
|
|
165
|
-
await until(() => posts.some((x) => x.path === '/api/news-for-you/seen'));
|
|
166
|
-
const seen = posts.find((x) => x.path === '/api/news-for-you/seen');
|
|
167
|
-
const gone = await until(() => p.evaluate(() => { const c = document.querySelector('#czViewer'); return c && /Your day/.test(document.querySelector('#czVwTitle').textContent) && !c.querySelector('[data-yd="fin"]'); }));
|
|
168
|
-
if (!gone) console.log(await p.evaluate(() => document.querySelector('#czVwTitle').textContent + ' | ' + !!document.querySelector('#czViewer [data-yd="fin"]')));
|
|
169
|
-
ok('F3 Done with it marks the draft seen and it leaves Drafted for you', seen && seen.body.ids[0] === fin[0].key && gone, JSON.stringify(seen));
|
|
170
|
-
ok('F4 no page error', !errs.length, errs.join(' | '));
|
|
171
|
-
await ctx.close();
|
|
172
|
-
}
|
|
173
147
|
/* D — dark and desk */
|
|
174
148
|
{
|
|
175
149
|
const { p, ctx, errs } = await page({ width: 1440, scheme: 'dark' });
|