create-pmos 0.395.0 → 0.397.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +25 -30
- 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/scripts/nine-stages.js +49 -20
- package/payload/state/discoveries.md +1 -1
- package/workspace/briefing-premium-adddoc-test.js +20 -40
- package/workspace/briefing-premium-board-test.js +145 -107
- package/workspace/briefing-premium-calendar-2-test.js +5 -2
- package/workspace/briefing-premium-calendar-3-test.js +13 -8
- package/workspace/briefing-premium-calendar-test.js +16 -5
- package/workspace/briefing-premium-initiative-test.js +50 -41
- package/workspace/briefing-premium-insights-test.js +104 -85
- package/workspace/briefing-premium-metrics-test.js +11 -32
- package/workspace/briefing-premium-sources-test.js +42 -21
- package/workspace/briefing-premium-test.js +112 -98
- package/workspace/briefing-premium-work-test.js +78 -64
- package/workspace/changelog.json +24 -0
- package/workspace/fixtures/board-premium-facts.js +2 -1
- package/workspace/fixtures/board-premium-jira.js +28 -0
- package/workspace/fixtures/initiative-premium-facts.js +2 -1
- package/workspace/fixtures/initiatives-api/list.json +30 -42
- package/workspace/fixtures/initiatives-api/roadmap.json +40 -56
- package/workspace/fixtures/initiatives-api/sheet.json +10 -14
- package/workspace/fixtures/insights-premium-facts.js +11 -2
- package/workspace/guide/briefing-premium.md +3 -1
- package/workspace/guide/index.md +1 -0
- package/workspace/guide/lifecycle.md +51 -0
- package/workspace/home-shot.js +38 -0
- package/workspace/lib/board-premium.js +92 -1
- package/workspace/lib/engine/boards.js +15 -14
- package/workspace/lib/engine/nine-stages.js +49 -20
- package/workspace/lib/engine/signals/detectors.js +13 -11
- package/workspace/lib/insights-premium.js +78 -1
- package/workspace/lib/routes-board-premium.js +3 -2
- package/workspace/lib/routes-initiatives.js +1 -1
- package/workspace/lib/routes-insights-premium.js +8 -1
- package/workspace/lib/vendor/scripts/nine-stages.js +49 -20
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/premium-agreed-viewer-shots.js +76 -0
- package/workspace/premium-board-actions-test.js +2 -0
- package/workspace/premium-chat-chart-tab-test.js +6 -5
- package/workspace/premium-chat-context-test.js +8 -6
- package/workspace/premium-chat-goal-view-test.js +9 -7
- package/workspace/premium-chat-notes-test.js +3 -2
- package/workspace/premium-chat-report-tab-test.js +8 -2
- package/workspace/premium-chat-term-test.js +3 -1
- package/workspace/premium-chat-viewer-test.js +23 -17
- package/workspace/premium-core-doc-issue-test.js +2 -0
- package/workspace/premium-html-viewer-test.js +4 -2
- package/workspace/premium-phone-card-test.js +1 -0
- package/workspace/premium-phone-room-test.js +16 -11
- package/workspace/premium-report-read-test.js +1 -1
- package/workspace/premium-vw-backlog-test.js +2 -0
- package/workspace/premium-vw-cal-test.js +9 -4
- package/workspace/premium-vw-doc-test.js +1 -1
- package/workspace/premium-vw-item-test.js +1 -0
- package/workspace/premium-vw-jira-test.js +4 -1
- package/workspace/premium-vw-notes-test.js +2 -1
- package/workspace/premium-vw-rec-test.js +3 -2
- package/workspace/premium-vw-slides-test.js +2 -2
- package/workspace/premium-work-depth-test.js +7 -3
- package/workspace/public/pm/bd-span.js +120 -0
- package/workspace/public/pm/bd-stages.js +33 -0
- package/workspace/public/pm/cozy-board.css +373 -0
- package/workspace/public/pm/cozy-home.css +152 -0
- package/workspace/public/pm/cozy-home.js +170 -0
- package/workspace/public/pm/cozy-initiative.css +138 -0
- package/workspace/public/pm/cozy-insights.css +292 -0
- package/workspace/public/pm/cozy-nav.js +54 -0
- package/workspace/public/pm/cozy-viewer.css +143 -0
- package/workspace/public/pm/cozy.css +172 -0
- package/workspace/public/pm/lifecycle-lens-model.js +45 -27
- package/workspace/public/pm/lifecycle-lens.js +22 -11
- package/workspace/public/pm/premium-board.js +329 -67
- package/workspace/public/pm/premium-brief.js +1 -1
- package/workspace/public/pm/premium-chat.js +17 -10
- package/workspace/public/pm/premium-initiative-head.js +138 -0
- package/workspace/public/pm/premium-initiative.js +28 -4
- package/workspace/public/pm/premium-insights.js +530 -244
- package/workspace/public/pm/premium-shell.js +40 -10
- package/workspace/public/pm/premium-viewer.js +5 -0
- package/workspace/public/pm/premium-vw-jira-model.js +22 -5
- package/workspace/public/pm/premium-vw-jira.css +11 -0
- package/workspace/public/pm/premium-vw-jira.js +11 -4
- package/workspace/public/pm/premium-vw-rec.js +5 -2
- package/workspace/public/pm/premium-wide.css +30 -0
- package/workspace/public/pm/premium-work.js +18 -8
- package/workspace/public/pm/premium.js +19 -6
- package/workspace/public/premium-board.html +83 -47
- package/workspace/public/premium-chat.html +7 -32
- package/workspace/public/premium-initiative.html +16 -8
- package/workspace/public/premium-insights.html +83 -43
- package/workspace/public/premium-work.html +6 -71
- package/workspace/public/premium.html +62 -15
- package/workspace/public/vendor/nunito-var.woff2 +0 -0
- package/workspace/server.js +7 -0
- package/workspace/test-lists/premium-agreed-viewer.json +9 -0
- package/workspace/third-party/README.md +1 -0
|
@@ -4,19 +4,16 @@
|
|
|
4
4
|
* The real server with one product repository and a made-up morning brief written to <state>/briefs/<today>.json. Nothing here touches the PM's real briefs.
|
|
5
5
|
* S1/S8 no brief for today: the header says so S2/S5 the rows, each tagged Across products (the brief names no included initiative)
|
|
6
6
|
* S3 the dialog opens an https link and records nothing S7 the digests in Today S9 the writes refuse a source key; the agent answers
|
|
7
|
-
* S11 the source row and the digest
|
|
7
|
+
* S11 the source row and the digest are drawn in the Agreed design's tokens at 1280 and 390 px, light and dark; no sideways scroll
|
|
8
8
|
* Every wait polls the page; no fixed sleep stands in for a state. */
|
|
9
9
|
const fs = require('fs');
|
|
10
10
|
const os = require('os');
|
|
11
11
|
const path = require('path');
|
|
12
12
|
const { spawn, spawnSync } = require('child_process');
|
|
13
13
|
const { findBrowser } = require('./lib/find-browser');
|
|
14
|
-
const CT = require('./lib/premium-console-type'); // the mockup is read with the console's type (PM, 2026-10-19), as premium.css is
|
|
15
|
-
const CT_VENDOR = 'file://' + path.join(__dirname, 'public', 'vendor') + '/';
|
|
16
14
|
const T = require('./test-run').configure({ name: 'briefing-premium-sources' });
|
|
17
15
|
|
|
18
16
|
const BASE = T.BASE;
|
|
19
|
-
const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'briefing-artifact.html');
|
|
20
17
|
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
21
18
|
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); } };
|
|
22
19
|
const results = [];
|
|
@@ -157,33 +154,57 @@ const sh = (cwd, args) => spawnSync('git', args, { cwd, encoding: 'utf8' });
|
|
|
157
154
|
ok('S9 a message about a source row starts a Claude Code session', r3.status === 200 && r3.body.ok && r3.body.started === true, JSON.stringify(r3));
|
|
158
155
|
}
|
|
159
156
|
|
|
160
|
-
/* S11 fidelity: the source row
|
|
161
|
-
|
|
162
|
-
|
|
157
|
+
/* S11 fidelity: the source row and the digest are drawn in the Agreed design's own type and colours.
|
|
158
|
+
* Re-pointed for premium-agreed-design: the reference was the old mockup (prototype/premium-ux-concept/briefing-artifact.html: Space Grotesk,
|
|
159
|
+
* ember, a numbered rank). The Agreed design replaced that look on purpose, so each property is now pinned to the cozy token the design names
|
|
160
|
+
* (cozy.css, cozy-home.css), resolved in the page itself for the theme under test; the row and the digest still fill their column, and still
|
|
161
|
+
* nothing scrolls sideways. A source row that drifted off the design's tokens fails here as it failed against the mockup. */
|
|
162
|
+
{
|
|
163
163
|
const PAIRS = [['row', '#rank .rr:nth-child(2)'], ['number', '#rank .rr:nth-child(2) .rn'], ['title', '#rank .rr:nth-child(2) .rt'], ['subject', '#rank .rr:nth-child(2) .rs'], ['event', '#tl .ev:not(:first-of-type)'], ['eventTime', '#tl .ev:not(:first-of-type) time'], ['eventTitle', '#tl .ev:not(:first-of-type) b']];
|
|
164
|
-
const
|
|
165
|
-
|
|
164
|
+
const SANS = 'var(--cz-sans)';
|
|
165
|
+
/* The design's values, as the tokens name them (a value that starts var( is resolved in the page; anything else is literal) */
|
|
166
|
+
const WANT = {
|
|
167
|
+
row: { fontFamily: SANS, color: 'var(--cz-ink)', backgroundColor: 'transparent' },
|
|
168
|
+
number: { backgroundColor: 'var(--cz-blue)', borderRadius: '50%', width: '8px', height: '8px' }, // the rank is a blue dot, not a number
|
|
169
|
+
title: { fontFamily: SANS, fontSize: '14px', fontWeight: '700', color: 'var(--cz-ink)' },
|
|
170
|
+
subject: { fontFamily: SANS, fontSize: '12px', fontWeight: '500', color: 'var(--cz-blueink)' },
|
|
171
|
+
event: { fontFamily: SANS, color: 'var(--cz-ink)', borderTopColor: 'var(--hair)' },
|
|
172
|
+
eventTime: { color: 'var(--ink-2)' },
|
|
173
|
+
eventTitle: { fontFamily: SANS, color: 'var(--cz-ink)' },
|
|
174
|
+
};
|
|
175
|
+
const grab = (pg) => pg.evaluate(([pairs, want]) => {
|
|
176
|
+
const o = {};
|
|
177
|
+
const probe = document.createElement('div'); probe.style.position = 'absolute'; probe.style.visibility = 'hidden'; document.body.appendChild(probe);
|
|
178
|
+
const resolve = (k, v) => { if (!/^var\(/.test(v) && v !== 'transparent') return v; probe.removeAttribute('style'); probe.style.position = 'absolute'; probe.style.visibility = 'hidden'; probe.style.setProperty(k.replace(/[A-Z]/g, (c) => '-' + c.toLowerCase()), v); return getComputedStyle(probe)[k]; };
|
|
179
|
+
for (const [n, s] of pairs) {
|
|
180
|
+
const e = /^#tl/.test(s) && window.__ev ? window.__ev(s) : document.querySelector(s);
|
|
181
|
+
if (!e) { o[n] = null; continue; }
|
|
182
|
+
const cs = getComputedStyle(e), v = {};
|
|
183
|
+
for (const [k, w] of Object.entries(want[n])) v[k] = [resolve(k, w), cs[k]];
|
|
184
|
+
o[n] = v;
|
|
185
|
+
}
|
|
186
|
+
probe.remove();
|
|
187
|
+
const box = (s) => { const e = document.querySelector(s); return e ? Math.round(e.getBoundingClientRect().width) : null; };
|
|
188
|
+
const ev = window.__ev && window.__ev('#tl .ev');
|
|
189
|
+
o.fit = { row: [box('#rank'), box('#rank .rr:nth-child(2)')], event: [ev && ev.parentElement ? Math.round(ev.parentElement.getBoundingClientRect().width) : null, ev ? Math.round(ev.getBoundingClientRect().width) : null] };
|
|
190
|
+
return o;
|
|
191
|
+
}, [PAIRS, WANT]);
|
|
166
192
|
for (const [w, h] of [[1280, 900], [390, 844]]) for (const th of ['light', 'dark']) {
|
|
167
|
-
const m = await (await browser.newContext({ viewport: { width: w, height: h } })).newPage();
|
|
168
|
-
await m.goto('file://' + MOCKUP); await CT.applyToPage(m, CT_VENDOR);
|
|
169
|
-
await until(() => m.evaluate(() => document.querySelectorAll('#rank .rr').length > 1 && document.querySelectorAll('#tl .ev').length > 0));
|
|
170
|
-
await m.evaluate((t) => { document.documentElement.dataset.theme = t; }, th);
|
|
171
193
|
const R = await open({ w, h, theme: th });
|
|
172
194
|
if (w === 390) { await R.page.click('#todayCard .folds').catch(() => {}); await R.page.evaluate(() => scrollTo(0, 0)); } // the Calendar card starts hidden on a phone (premium-calendar-card); measure it open
|
|
173
195
|
await R.page.evaluate(() => { window.__ev = (s) => { const d = document.querySelector('#tl .ev.src-digest'); return !d ? null : / time$/.test(s) ? d.querySelector('time') : / b$/.test(s) ? d.querySelector('b') : d; }; });
|
|
174
196
|
await sleep(500);
|
|
175
|
-
const
|
|
197
|
+
const c = await grab(R.page, PAIRS), diffs = [];
|
|
176
198
|
for (const [n] of PAIRS) {
|
|
177
|
-
if (!
|
|
178
|
-
for (const k of Object.
|
|
179
|
-
if (k === 'left' || k === 'width') { if (['row', 'number', 'title', 'subject', 'event', 'eventTime', 'eventTitle'].includes(n) && (k === 'left' || n !== 'row' && n !== 'event' && n !== 'eventTime')) continue; }
|
|
180
|
-
if ((k === 'left' || k === 'width') ? Math.abs(a[n][k] - c[n][k]) > 2 : a[n][k] !== c[n][k]) diffs.push(`${n}.${k} ${a[n][k]} | ${c[n][k]}`);
|
|
181
|
-
}
|
|
199
|
+
if (!c[n]) { diffs.push(n + ' missing'); continue; }
|
|
200
|
+
for (const [k, [want, got]] of Object.entries(c[n])) if (want !== got) diffs.push(`${n}.${k} ${want} | ${got}`);
|
|
182
201
|
}
|
|
183
|
-
|
|
202
|
+
// the row fills its list; the digest fills its column plus the hover bleed premium.css gives every Today item (margin 0 -10px, width 100% + 20px)
|
|
203
|
+
for (const [n, [col, got]] of Object.entries(c.fit)) if (col == null || got == null || got < col - 2 || got > col + (n === 'event' ? 22 : 2)) diffs.push(`${n}.width fills ${col} | ${got}`);
|
|
204
|
+
ok(`S11 the source row and the digest look like the Agreed design's at ${w} px, ${th}`, diffs.length === 0, diffs.join(' ; '));
|
|
184
205
|
const ov = await R.page.evaluate(() => document.documentElement.scrollWidth - innerWidth);
|
|
185
206
|
ok(`S11 no sideways scroll at ${w} px, ${th}`, ov <= 0, String(ov));
|
|
186
|
-
await
|
|
207
|
+
await R.ctx.close();
|
|
187
208
|
}
|
|
188
209
|
}
|
|
189
210
|
return finish();
|