create-pmos 0.478.0 → 0.479.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 -14
- package/payload/KIT-VERSION +1 -1
- package/payload/planning/evals/eval-calibration.md +1 -1
- package/payload/planning/okrs/health-budgets.md +1 -1
- package/payload/state/discoveries.md +1 -1
- package/workspace/briefing-premium-initiative-test.js +1 -1
- package/workspace/changelog.json +12 -0
- package/workspace/guide/home.md +2 -1
- package/workspace/guide/programs.md +15 -5
- package/workspace/lib/board-pack-route.js +10 -1
- package/workspace/lib/board-pack.js +31 -2
- package/workspace/lib/briefing-premium-products.js +5 -2
- package/workspace/lib/briefing-premium.js +5 -3
- package/workspace/lib/ready-reports.js +31 -6
- package/workspace/metric-drafts-ui-test.js +2 -1
- package/workspace/milestone-suggest-test.js +12 -6
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/program-charter-test.js +5 -5
- package/workspace/program-panel-test.js +28 -25
- package/workspace/public/pm/bd-prog-panel.js +84 -60
- package/workspace/public/pm/chat-md.js +5 -2
- package/workspace/public/pm/cozy-home.css +3 -0
- package/workspace/public/pm/dash-view.js +9 -5
- package/workspace/public/pm/goal-chat.js +3 -1
- package/workspace/public/pm/home-app.js +53 -21
- package/workspace/public/pm/home-chat.js +2 -2
- package/workspace/public/pm/premium.css +1 -0
- package/workspace/public/pm/prog-page.css +76 -0
- package/workspace/public/pm/prog-page.js +112 -0
- package/workspace/public/pm/readonly.js +8 -1
- package/workspace/ready-dash-ui-test.js +53 -73
|
@@ -3,14 +3,15 @@
|
|
|
3
3
|
/* ready-dash-ui-test.js — the ready-made Dashboard in the program panel and the initiative view, and a ready-made report's two cuts in the one
|
|
4
4
|
* report Viewer (batch 17 item 1; canvas PbH1Header, PbA1, PbA2, PbA7, PbG2, PbG5). Serves the real Board page from the real server; Project
|
|
5
5
|
* Ascent comes from fixtures/program-ascent.js, and the /api/ready-reports routes answer fixtures/ready-reports.js, the shape the backend agreed.
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
6
|
+
* Batch 21 item 2 made the program panel and the product page ONE page (pm/prog-page.js, canvas RdProgL–P): the batch 17 Work | Dashboard
|
|
7
|
+
* toggle is gone there, and these checks read the one page.
|
|
8
|
+
* H the program page: the ✦ line, the goal card, then Tasks, Initiatives (open first), Reports, Documents; no toggle
|
|
9
|
+
* N the proposals fold into one row for the owner; ✓ keeps the pick (POST /api/proposals/keep)
|
|
10
|
+
* R the Reports tab: a report row opens the one report Viewer: Sponsors · 1 minute | Team · full; Sponsors reads the cut
|
|
11
|
+
* L the last tab per page: after a reload Reports opens first
|
|
12
|
+
* I the initiative view on the Board keeps its own dashboard toggle; G a held report (PbG2) in the Reports tab: Wait posts the hold
|
|
13
|
+
* Z no dashboard: the page still draws · M on a phone (390): the title keeps 150 px, no sideways scroll, tabs 40 px
|
|
14
|
+
* P the product page on Home (390 and 1440) is the same one page; the metrics review is a row in its Reports tab.
|
|
14
15
|
* PMOS_SHOTS=<dir> also saves the screenshots. */
|
|
15
16
|
const path = require('path');
|
|
16
17
|
const fs = require('fs');
|
|
@@ -99,110 +100,87 @@ const SPONSORS = '# Inline login slips to early December unless passkeys move to
|
|
|
99
100
|
const sizes = (p, sel) => p.evaluate((s) => [...new Set([...document.querySelectorAll(s + ', ' + s + ' *')].filter((e) => e.childNodes.length && [...e.childNodes].some((n) => n.nodeType === 3 && n.textContent.trim())).map((e) => getComputedStyle(e).fontSize))], sel);
|
|
100
101
|
const SCALE = new Set(['11px', '12px', '14px', '16px', '20px', '28px']);
|
|
101
102
|
|
|
102
|
-
/* ── H: the
|
|
103
|
+
/* ── H: the program panel is ONE page (batch 21 item 2, canvas RdProgL–P): no Work | Dashboard toggle ── */
|
|
104
|
+
const pg = (pp) => pp.evaluate(() => {
|
|
105
|
+
const v = document.querySelector('#czViewer .pv'); if (!v) return null;
|
|
106
|
+
return { toggle: !!document.querySelector('#czViewer [data-cz-vw-p="dash"]'), line: !!v.querySelector('.pv-line'), goal: !!v.querySelector('.pv-gc'),
|
|
107
|
+
tabs: [...v.querySelectorAll('[data-pv="tab"]')].map((t) => t.dataset.k + (t.getAttribute('aria-selected') === 'true' ? '*' : '')), props: !!v.querySelector('[data-pv="props"]'),
|
|
108
|
+
title: (() => { const e = document.querySelector('#czViewer .cz-vw-t'); return e ? Math.round(e.getBoundingClientRect().width) : 0; })(), w: v.getBoundingClientRect().width, over: v.scrollWidth > v.clientWidth + 1 };
|
|
109
|
+
});
|
|
103
110
|
const X = await open();
|
|
104
111
|
const p = X.page;
|
|
105
|
-
const h0 = await until(
|
|
106
|
-
ok('H one toggle
|
|
112
|
+
const h0 = await until(() => pg(p));
|
|
113
|
+
ok('H one page with no toggle: the ✦ line, the goal card, then Tasks, Initiatives (open first), Reports, Documents', !!h0 && !h0.toggle && h0.line && h0.goal && h0.tabs.join() === 'tasks,initiatives*,reports,documents', JSON.stringify(h0));
|
|
107
114
|
ok('H the dashboard is read for the program, as a press to act (a Board row)', X.gets.some((g) => g.scope === 'program:project-ascent' && g.from === 'act' && g.ws === 'idpf'), JSON.stringify(X.gets));
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
/* ── D: the Dashboard ── */
|
|
111
|
-
await p.click('#czViewer [data-cz-vw-p="dash"]');
|
|
112
|
-
const d0 = await until(() => dash(p));
|
|
113
|
-
ok('D the blocks in order: Goals, Milestones, Needs you, Reports; no empty block', !!d0 && d0.heads.join() === 'Goals,Milestones,Needs you,Reports', JSON.stringify(d0));
|
|
114
|
-
ok('D the ✦ line leads with what Claude handled, with Adler\'s face', !!d0 && d0.hd === '3 of 4 milestones hold their dates. I drafted the sponsor update for Thursday.' && d0.face, JSON.stringify(d0));
|
|
115
|
-
const h1 = await head(p);
|
|
116
|
-
ok('D the same icon now shows the list to go back, pressed', !!h1.toggle && h1.toggle.label === 'Show the work' && h1.toggle.pressed === 'true', JSON.stringify(h1));
|
|
117
|
-
ok('D in the panel beside the Board the blocks stack in one column', !!d0 && d0.cols === 1, JSON.stringify(d0));
|
|
118
|
-
const ds = await sizes(p, '#czViewer .db');
|
|
119
|
-
ok('S the Dashboard uses the type scale only', ds.length && ds.every((x) => SCALE.has(x)), ds.join());
|
|
120
|
-
await shot(p, 'PbA2Prog-desk-built');
|
|
115
|
+
await shot(p, 'RdProgL-desk-built');
|
|
121
116
|
|
|
122
|
-
/* ──
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
ok('W wide (PbA7): two columns, each block its own card', !!dw && dw.cols === 2, JSON.stringify(await dash(p)));
|
|
126
|
-
await shot(p, 'PbA7Desk-built');
|
|
127
|
-
await p.click('#czViewer [data-cz-vw="place"]'); await p.click('.cz-pn-menu [data-cz-pn-place="split"]');
|
|
128
|
-
|
|
129
|
-
/* ── N: Needs you ✓ ── */
|
|
117
|
+
/* ── N: Claude's proposals fold into one row for the owner; ✓ keeps the pick ── */
|
|
118
|
+
ok('N the proposals that wait on the owner fold into one row', !!h0 && h0.props, JSON.stringify(h0));
|
|
119
|
+
await p.click('#czViewer [data-pv="props"]');
|
|
130
120
|
await p.click('#czViewer .db-need [data-db="needs"][data-k="keep"]');
|
|
131
121
|
const kp = await until(() => X.posts.find((x) => x.path === '/api/proposals/keep'));
|
|
132
122
|
ok('N ✓ keeps Claude\'s pick: POST /api/proposals/keep with the proposal ids and the initiative', !!kp && kp.body.ids.join() === 'p-dates-1' && kp.body.initiative === 'descope-parity' && kp.body.ws === 'idpf', JSON.stringify(kp));
|
|
133
123
|
ok('N the dashboard is read again after the press', (await until(() => X.gets.filter((g) => g.scope === 'program:project-ascent').length >= 2, 3000)));
|
|
134
124
|
|
|
135
|
-
/* ── the
|
|
136
|
-
await p.click('#czViewer
|
|
137
|
-
ok('D the pencil on Milestones opens the charter', !!(await until(() => p.evaluate(() => window.czViewer && window.czViewer.current() && /^charter:/.test(window.czViewer.current().id)), 4000)));
|
|
138
|
-
await p.click('#czViewer [data-cz-vw="back"]');
|
|
139
|
-
ok('D ← comes back to the Dashboard', !!(await until(() => p.evaluate(() => !!document.querySelector('#czViewer .db')), 4000)));
|
|
140
|
-
|
|
141
|
-
/* ── R: a report row, and its two cuts ── */
|
|
125
|
+
/* ── R: the Reports tab: a report row, and its two cuts ── */
|
|
126
|
+
await p.click('#czViewer [data-pv="tab"][data-k="reports"]');
|
|
142
127
|
await p.click('#czViewer .db [data-db="report"][data-k="r-sponsor"]');
|
|
143
128
|
const seg = await until(() => p.evaluate(() => { const s = document.querySelector('#czViewer .vz-cuts'); return s ? [...s.querySelectorAll('button')].map((b) => b.textContent + ':' + b.getAttribute('aria-pressed')) : null; }), 8000);
|
|
144
129
|
ok('R the report opens in the one report Viewer with Sponsors · 1 minute | Team · full, Team first', !!seg && seg.join() === 'Sponsors · 1 minute:false,Team · full:true', JSON.stringify(seg));
|
|
145
|
-
await shot(p, 'PbA4Report-team-built');
|
|
146
130
|
await p.click('#czViewer .vz-cuts [data-r="cut|sponsors"]');
|
|
147
131
|
const cut = await until(() => p.evaluate(() => { const L = [...document.querySelectorAll('#czViewer .vz-cutl li')]; return L.length ? L.map((l) => (l.classList.contains('on') ? '✓' : '·') + l.querySelector('b').textContent + (l.querySelector('small') ? ' (' + l.querySelector('small').textContent + ')' : '')) : null; }), 5000);
|
|
148
132
|
ok('R Sponsors reads the cut (GET /api/ready-reports/cut) and ticks what sponsors read; the rest say Team only', !!cut && cut.join(' / ') === '✓The answer and 3 points / ✓Your decision / ✓Scorecard / ·Tickets and risks (Team only) / ·Next week\'s plan (Team only)', JSON.stringify(cut));
|
|
149
133
|
ok('R the cut was read for this file', X.gets.some((g) => g.cut === 'sponsors' && g.path === 'reports/one-login-sponsor/2026-10-29.md'));
|
|
150
134
|
ok('R Edit is not offered on the sponsors cut (the team cut is the one edited)', await p.evaluate(() => !document.querySelector('#czViewer [data-r="edit"]')));
|
|
151
|
-
await shot(p, 'PbG5Readers-built');
|
|
152
135
|
await p.click('#czViewer .vz-cuts [data-r="cut|team"]');
|
|
153
136
|
ok('R Team shows the full draft again', !!(await until(() => p.evaluate(() => !document.querySelector('#czViewer .vz-cutl') && document.querySelector('#czViewer [data-r="cut|team"]').getAttribute('aria-pressed') === 'true'), 3000)));
|
|
154
137
|
ok('0 no page error (desk)', X.errors.length === 0, X.errors.join(' | '));
|
|
155
138
|
await p.close();
|
|
156
139
|
|
|
157
|
-
/* ── L: the last
|
|
140
|
+
/* ── L: the last tab per page ── */
|
|
158
141
|
const L = await open({ ctx: X.ctx });
|
|
159
|
-
const
|
|
160
|
-
ok('L after a reload the
|
|
142
|
+
const hl = await until(() => pg(L.page), 8000);
|
|
143
|
+
ok('L after a reload the page opens on the PM\'s last tab on this program: Reports', !!hl && hl.tabs.includes('reports*'), JSON.stringify(hl));
|
|
161
144
|
|
|
162
|
-
/* ── I: the initiative view on the Board ── */
|
|
163
|
-
await L.page.click('#czViewer [data-
|
|
145
|
+
/* ── I: the initiative view on the Board, from the Initiatives tab ── */
|
|
146
|
+
await L.page.click('#czViewer [data-pv="tab"][data-k="initiatives"]');
|
|
164
147
|
await until(() => L.page.evaluate(() => { const b = document.querySelector('#czViewer [data-czs-fold="tree"]'); if (b && b.getAttribute('aria-expanded') !== 'true') b.click(); return !!document.querySelector('#czViewer button.pp-open[data-ini="descope-parity"]'); }));
|
|
165
148
|
await L.page.click('#czViewer button.pp-open[data-ini="descope-parity"]');
|
|
166
|
-
const it = await until(async () =>
|
|
167
|
-
ok('I the initiative view
|
|
149
|
+
const it = await until(async () => (await L.page.evaluate(() => !!document.querySelector('#czViewer .iv') && !!document.querySelector('#czViewer [data-cz-vw-p="dash"]'))), 8000);
|
|
150
|
+
ok('I the initiative view keeps its own dashboard toggle; Work shows first', !!it);
|
|
168
151
|
ok('I the initiative\'s dashboard is read for its scope', L.gets.some((g) => g.scope === 'initiative:descope-parity'));
|
|
169
152
|
await L.page.click('#czViewer [data-cz-vw-p="dash"]');
|
|
170
|
-
const di = await until(() =>
|
|
171
|
-
ok('I PbA1: Goal, Ships, Needs you, Reports', !!di && di.
|
|
153
|
+
const di = await until(() => L.page.evaluate(() => { const d = document.querySelector('#czViewer .db'); return d ? [...d.querySelectorAll('.db-h')].map((x) => x.textContent) : null; }));
|
|
154
|
+
ok('I PbA1: Goal, Ships, Needs you, Reports', !!di && di.join() === 'Goal,Ships,Needs you,Reports', JSON.stringify(di));
|
|
172
155
|
ok('I Ships: the range against the promise', await L.page.evaluate(() => /28 Nov to 5 Dec/.test(document.querySelector('#czViewer .db').textContent) && /promised 18 Nov/.test(document.querySelector('#czViewer .db').textContent)));
|
|
173
|
-
await shot(L.page, 'PbA1Ini-desk-built');
|
|
174
156
|
ok('0 no page error (initiative)', L.errors.length === 0, L.errors.join(' | '));
|
|
175
157
|
await X.ctx.close();
|
|
176
158
|
|
|
177
|
-
/* ── G: a held report (PbG2) ── */
|
|
159
|
+
/* ── G: a held report (PbG2), in the Reports tab ── */
|
|
178
160
|
const G = await open({ dash: { 'program:project-ascent': { ...RR.held(), scope: 'program:project-ascent' } } });
|
|
179
|
-
await until(
|
|
180
|
-
await G.page.click('#czViewer [data-
|
|
181
|
-
await until(() =>
|
|
182
|
-
ok('G the held update: the honest ✦ line and Skip, Send with a note, Wait', await G.page.evaluate(() => !!document.querySelector('#czViewer .db-hd.warn') && document.querySelectorAll('#czViewer .db-held .db-ib').length === 3));
|
|
161
|
+
await until(() => pg(G.page));
|
|
162
|
+
await G.page.click('#czViewer [data-pv="tab"][data-k="reports"]');
|
|
163
|
+
ok('G the held update: Skip, Send with a note, Wait', !!(await until(() => G.page.evaluate(() => document.querySelectorAll('#czViewer .db-held .db-ib').length === 3), 4000)));
|
|
183
164
|
await G.page.click('#czViewer .db-held [data-k="r-weekly|wait"]');
|
|
184
165
|
const hp = await until(() => G.posts.find((x) => x.path === '/api/ready-reports/hold'));
|
|
185
166
|
ok('G Wait posts the hold (POST /api/ready-reports/hold, act wait)', !!hp && hp.body.act === 'wait' && hp.body.kind === 'weekly' && hp.body.scope === 'program:project-ascent', JSON.stringify(hp));
|
|
186
|
-
await shot(G.page, 'PbG2Stale-built');
|
|
187
167
|
ok('0 no page error (held)', G.errors.length === 0, G.errors.join(' | '));
|
|
188
168
|
await G.ctx.close();
|
|
189
169
|
|
|
190
|
-
/* ── Z: no dashboard: no toggle ── */
|
|
170
|
+
/* ── Z: no dashboard: the page still draws, no toggle ── */
|
|
191
171
|
const Z = await open({ dash: { 'program:project-ascent': null } });
|
|
192
172
|
await until(() => Z.gets.some((g) => g.scope === 'program:project-ascent'), 5000); await sleep(500);
|
|
193
|
-
const hz = await
|
|
194
|
-
ok('Z the dashboard cannot be read:
|
|
173
|
+
const hz = await until(() => pg(Z.page), 5000);
|
|
174
|
+
ok('Z the dashboard cannot be read: the one page draws from the program\'s own records, no toggle', !!hz && !hz.toggle && hz.tabs.length === 4, JSON.stringify(hz));
|
|
195
175
|
await Z.ctx.close();
|
|
196
176
|
|
|
197
177
|
/* ── M: a phone ── */
|
|
198
178
|
const M = await open({ w: 390, h: 844, dark: true });
|
|
199
|
-
const hm = await until(
|
|
200
|
-
ok('M at 390 px the title keeps 150 px
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
ok('M every press is at least 40 px', await M.page.evaluate(() => [...document.querySelectorAll('#czViewer .db .db-ib')].every((b) => b.getBoundingClientRect().width >= 40)));
|
|
205
|
-
await shot(M.page, 'PbA2Prog-phone-dark-built');
|
|
179
|
+
const hm = await until(() => pg(M.page));
|
|
180
|
+
ok('M at 390 px the title keeps 150 px (RdProgP)', !!hm && hm.title >= 150, JSON.stringify(hm));
|
|
181
|
+
ok('M the page fits the phone: no sideways scroll', !!hm && !hm.over && hm.w <= 390, JSON.stringify(hm));
|
|
182
|
+
ok('M every tab is at least 40 px tall', await M.page.evaluate(() => [...document.querySelectorAll('#czViewer [data-pv="tab"]')].every((b) => b.getBoundingClientRect().height >= 40)));
|
|
183
|
+
await shot(M.page, 'RdProgP-phone-dark-built');
|
|
206
184
|
ok('0 no page error (phone)', M.errors.length === 0, M.errors.join(' | '));
|
|
207
185
|
await M.ctx.close();
|
|
208
186
|
|
|
@@ -213,13 +191,15 @@ const SPONSORS = '# Inline login slips to early December unless passkeys move to
|
|
|
213
191
|
pg.on('pageerror', (e) => errs.push(String((e && e.stack) || e)));
|
|
214
192
|
await pg.route('**/api/ready-reports/dashboard*', (r) => { const u = new URL(r.request().url()); gets.push({ scope: u.searchParams.get('scope'), from: u.searchParams.get('from') }); return r.fulfill({ contentType: 'application/json', body: JSON.stringify(RR.product()) }); });
|
|
215
193
|
await pg.goto(BASE + '/premium.html?ini=product');
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
194
|
+
// batch 21 item 2: the product page is the same ONE page as a program's (prog-page.js): no toggle, Initiatives open first
|
|
195
|
+
const pd = await until(() => pg.evaluate(() => { const v = document.querySelector('#czViewer .pv'); if (!v) return null; return { goal: !!v.querySelector('.pv-gc'), tabs: [...v.querySelectorAll('[data-pv="tab"]')].map((t) => t.dataset.k + (t.getAttribute('aria-selected') === 'true' ? '*' : '')), over: v.scrollWidth > v.clientWidth + 1, toggle: !!document.querySelector('#czViewer [data-cz-vw-p="dash"]') }; }), 15000);
|
|
196
|
+
ok('P (' + nm + ') the product page is the one page: the goal card, Tasks, Initiatives (open first), Reports, Documents; no toggle', !!pd && pd.goal && pd.tabs.join() === 'tasks,initiatives*,reports,documents' && !pd.toggle && !pd.over, JSON.stringify(pd));
|
|
197
|
+
await pg.click('#czViewer [data-pv="tab"][data-k="reports"]');
|
|
198
|
+
const mx = await until(() => pg.evaluate(() => { const b = document.querySelector('#czViewer [data-hp="metrics"]'); if (!b) return null; const r = b.getBoundingClientRect(); return { h: r.height, text: b.textContent }; }), 4000);
|
|
199
|
+
ok('P (' + nm + ') the metrics review keeps its way in: a row in the Reports tab, 40 px', !!mx && /Metrics review/.test(mx.text) && mx.h >= 40, JSON.stringify(mx));
|
|
200
|
+
if (nm === 'desk') { await pg.click('#czViewer [data-hp="metrics"]'); ok('P the row opens the metrics review, ← back to the product', !!(await until(() => pg.evaluate(() => { const c = window.czViewer && window.czViewer.current(); return c && c.id !== 'product' ? c.id : null; })))); }
|
|
221
201
|
ok('P (' + nm + ') read as a page to read (scope product)', gets.some((g) => g.scope === 'product' && g.from === 'read'), JSON.stringify(gets));
|
|
222
|
-
await shot(pg, '
|
|
202
|
+
await shot(pg, 'RdProgProduct-' + nm + '-built');
|
|
223
203
|
ok('0 no page error (product, ' + nm + ')', errs.length === 0, errs.join(' | '));
|
|
224
204
|
await c.close();
|
|
225
205
|
}
|