create-pmos 0.396.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 +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/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 +12 -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/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-work.js +18 -8
- package/workspace/public/pm/premium.js +19 -6
- package/workspace/public/premium-board.html +82 -47
- package/workspace/public/premium-chat.html +7 -33
- package/workspace/public/premium-initiative.html +15 -8
- package/workspace/public/premium-insights.html +82 -43
- package/workspace/public/premium-work.html +6 -72
- package/workspace/public/premium.html +61 -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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pmos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.397.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.397.0",
|
|
37
|
+
"at": "2026-10-22T20:10:19.514Z",
|
|
38
|
+
"f": 2,
|
|
39
|
+
"prs": [
|
|
40
|
+
{
|
|
41
|
+
"n": 1011,
|
|
42
|
+
"t": "The premium pages follow the Agreed design",
|
|
43
|
+
"s": "The premium pages follow the Agreed design"
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
},
|
|
35
47
|
{
|
|
36
48
|
"v": "0.396.0",
|
|
37
49
|
"at": "2026-10-22T10:57:02.235Z",
|
|
@@ -279,18 +291,6 @@
|
|
|
279
291
|
"s": "Chips for what an answer worked with, main one opens by itself"
|
|
280
292
|
}
|
|
281
293
|
]
|
|
282
|
-
},
|
|
283
|
-
{
|
|
284
|
-
"v": "0.377.0",
|
|
285
|
-
"at": "2026-10-21T07:27:29.956Z",
|
|
286
|
-
"f": 2,
|
|
287
|
-
"prs": [
|
|
288
|
-
{
|
|
289
|
-
"n": 986,
|
|
290
|
-
"t": "Attach files and photos to a premium chat message",
|
|
291
|
-
"s": "Attach files and photos to a premium chat message"
|
|
292
|
-
}
|
|
293
|
-
]
|
|
294
294
|
}
|
|
295
295
|
]
|
|
296
296
|
}
|
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-22T20:10: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-22T20:10:16Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -1,40 +1,63 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/*
|
|
3
|
-
* The
|
|
3
|
+
* The lifecycle label layer over the workflow engine's derived stage: six stages and two milestones
|
|
4
|
+
* (premium-agreed-design L1, PM decision 2026-10-22). The file keeps its old name and export names
|
|
5
|
+
* (`nineStages`, `STAGES`, `LABELS`, `LANE_STAGES`) so that every caller keeps working; the
|
|
6
|
+
* `nine_stages` field on a row keeps its name for the same reason. It now carries eight entries.
|
|
7
|
+
*
|
|
8
|
+
* Triage (BRD) → Discover (PRD) → Plan (scope, timeline, WBS; the PM's Commit pushes tickets to Jira)
|
|
9
|
+
* → Prioritize (ranked on the roadmap) → Build (features delivered, Jira) → ◆ Deliver (milestone:
|
|
10
|
+
* release shipped, PM sign-off) → Monitor (outcome report) → ◆ Evaluate (milestone: keep, iterate or stop)
|
|
4
11
|
*
|
|
5
12
|
* The engine derives one of six rungs (intake, spec, contract, build, eval, accepted) from the steps
|
|
6
|
-
* it found. This file names the
|
|
7
|
-
*
|
|
8
|
-
*
|
|
13
|
+
* it found. This file names the stages the PM sees and says which of them each lane uses. It never
|
|
14
|
+
* decides a stage itself: a stage is `done` only when a derived signal shows it, and a stage no record
|
|
15
|
+
* can yet show is `no-signal`, not guessed.
|
|
9
16
|
*
|
|
10
|
-
*
|
|
17
|
+
* Migration: the old nine had Ideate and Strategize. Stage is derived, never stored, so there is no
|
|
18
|
+
* stored stage to rewrite. Records that signalled Ideate (ideas, hypotheses) now count for Discover;
|
|
19
|
+
* records that signalled Strategize (decisions, bets) now count for Prioritize. `stageKey` maps an
|
|
20
|
+
* old key read from anywhere (a stored payload, a URL, a fixture) to its new key at read time.
|
|
11
21
|
*/
|
|
12
22
|
|
|
13
|
-
const STAGES = ['
|
|
23
|
+
const STAGES = ['triage', 'discover', 'plan', 'prioritize', 'build', 'deliver', 'monitor', 'evaluate'];
|
|
14
24
|
|
|
15
25
|
const LABELS = {
|
|
16
|
-
|
|
26
|
+
triage: 'Triage', discover: 'Discover', plan: 'Plan', prioritize: 'Prioritize',
|
|
17
27
|
build: 'Build', deliver: 'Deliver', monitor: 'Monitor', evaluate: 'Evaluate',
|
|
18
28
|
};
|
|
19
29
|
|
|
30
|
+
// What each stage produces (the PM's words on the Agreed design).
|
|
31
|
+
const OUTPUTS = {
|
|
32
|
+
triage: 'BRD', discover: 'PRD', plan: 'Scope, timeline and work breakdown', prioritize: 'Ranked on the roadmap',
|
|
33
|
+
build: 'Features delivered (Jira)', deliver: 'Release shipped, PM sign-off', monitor: 'Outcome report', evaluate: 'Keep, iterate or stop',
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
// Deliver and Evaluate are milestones (drawn as a diamond), not stages with duration.
|
|
37
|
+
const MILESTONES = new Set(['deliver', 'evaluate']);
|
|
38
|
+
|
|
39
|
+
// The removed keys and where they went. Read-time only: nothing stored is rewritten.
|
|
40
|
+
const LEGACY = { ideate: 'discover', strategize: 'prioritize' };
|
|
41
|
+
const stageKey = (k) => (k == null ? k : LEGACY[k] || k);
|
|
42
|
+
|
|
20
43
|
// Which stages each product-code lane uses. Stages not listed read `skipped`.
|
|
21
44
|
const LANE_STAGES = {
|
|
22
45
|
feature: STAGES,
|
|
23
|
-
discovery: ['
|
|
24
|
-
chore: ['plan', 'build', 'evaluate'],
|
|
46
|
+
discovery: ['triage', 'discover', 'prioritize', 'evaluate'],
|
|
47
|
+
chore: ['plan', 'build', 'deliver', 'evaluate'],
|
|
25
48
|
incident: ['build', 'deliver', 'monitor', 'evaluate'],
|
|
26
|
-
content: ['
|
|
27
|
-
prototype: ['
|
|
49
|
+
content: ['discover', 'plan', 'build', 'deliver'],
|
|
50
|
+
prototype: ['triage', 'discover', 'evaluate'],
|
|
28
51
|
};
|
|
29
52
|
|
|
30
53
|
// Stages that have a derived signal today. Every other stage reads `no-signal` until its record exists.
|
|
31
|
-
const SIGNALLED = new Set(['discover', 'plan', 'build', 'evaluate']);
|
|
54
|
+
const SIGNALLED = new Set(['triage', 'discover', 'plan', 'build', 'evaluate']);
|
|
32
55
|
|
|
33
56
|
const RANK = { intake: 0, spec: 1, contract: 2, build: 3, eval: 4, accepted: 5 };
|
|
34
57
|
|
|
35
58
|
// Stages that gain a signal only when the caller passes the records (scripts/records readAll plus optional `releases`).
|
|
36
|
-
// With no records the output is exactly the
|
|
37
|
-
const RECORD_SIGNALLED = new Set(['
|
|
59
|
+
// With no records the output is exactly the records-free output, so the lifecycle-lens mirror stays equal.
|
|
60
|
+
const RECORD_SIGNALLED = new Set(['discover', 'prioritize', 'monitor', 'deliver']);
|
|
38
61
|
|
|
39
62
|
// records: { initiative?, anchor?, ideas, hypotheses, decisions, bets, 'kr-metrics', releases } (every list optional).
|
|
40
63
|
// The initiative id and anchor come from `derived` (id, anchor) or from records.initiative / records.anchor.
|
|
@@ -43,10 +66,12 @@ function recordSignals(derived, records, buildDone) {
|
|
|
43
66
|
const anchor = (derived && derived.anchor) || records.anchor || null;
|
|
44
67
|
const mine = (list) => (list || []).filter((r) => id && r.initiative === id);
|
|
45
68
|
const kr = (records['kr-metrics'] || []).filter((m) => anchor && (m.rid === anchor || m.parent_kr === anchor || 'kr:' + m.rid === anchor));
|
|
69
|
+
const ranked = mine(records.bets).some((b) => ['now', 'next', 'later'].includes(b.horizon) && Number.isInteger(b.rank));
|
|
46
70
|
return {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
71
|
+
// was Ideate: an idea or hypothesis on the initiative
|
|
72
|
+
discover: mine(records.ideas).length + mine(records.hypotheses).length > 0,
|
|
73
|
+
// was Strategize (a decision or bet) or the old Prioritize (a ranked bet)
|
|
74
|
+
prioritize: ranked || mine(records.decisions).length + mine(records.bets).length > 0,
|
|
50
75
|
monitor: !!buildDone && kr.some((m) => (m.readings || []).length > 0),
|
|
51
76
|
deliver: mine(records.releases).length > 0,
|
|
52
77
|
};
|
|
@@ -57,6 +82,7 @@ function nineStages(lane, derived, records) {
|
|
|
57
82
|
const rank = RANK[derived && derived.stage] ?? 0;
|
|
58
83
|
const step = (key) => (derived && derived.steps || []).find((s) => s.key === key);
|
|
59
84
|
const done = {
|
|
85
|
+
triage: rank >= 1,
|
|
60
86
|
discover: rank >= 1,
|
|
61
87
|
plan: rank >= 2,
|
|
62
88
|
build: rank >= 3 || (step('build') && step('build').status === 'done'),
|
|
@@ -64,18 +90,21 @@ function nineStages(lane, derived, records) {
|
|
|
64
90
|
};
|
|
65
91
|
const accepted = rank >= 5;
|
|
66
92
|
const fromRecords = records && typeof records === 'object' ? recordSignals(derived, records, done.build) : null;
|
|
93
|
+
const signalled = (key) => SIGNALLED.has(key) || (fromRecords && RECORD_SIGNALLED.has(key) && (key !== 'deliver' || fromRecords.deliver));
|
|
67
94
|
const out = [];
|
|
68
95
|
let currentSet = false;
|
|
69
96
|
for (const key of STAGES) {
|
|
70
97
|
let status;
|
|
71
98
|
if (!laneSet.has(key)) status = 'skipped';
|
|
72
|
-
else if (!
|
|
99
|
+
else if (!signalled(key)) status = 'no-signal';
|
|
73
100
|
else if (done[key] || (fromRecords && fromRecords[key])) status = 'done';
|
|
74
101
|
else status = 'pending';
|
|
75
102
|
if (status === 'pending' && !currentSet) { status = 'current'; currentSet = true; }
|
|
76
|
-
|
|
103
|
+
const entry = { key, label: LABELS[key], status, accepted: key === 'evaluate' ? accepted : undefined };
|
|
104
|
+
if (MILESTONES.has(key)) entry.milestone = true;
|
|
105
|
+
out.push(entry);
|
|
77
106
|
}
|
|
78
107
|
return out;
|
|
79
108
|
}
|
|
80
109
|
|
|
81
|
-
module.exports = { STAGES, LABELS, LANE_STAGES, nineStages };
|
|
110
|
+
module.exports = { STAGES, LABELS, OUTPUTS, MILESTONES, LEGACY, LANE_STAGES, stageKey, nineStages, lifecycleStages: nineStages };
|
|
@@ -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-22T20:10:16Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -3,12 +3,9 @@
|
|
|
3
3
|
/* briefing-premium-adddoc-test.js — Add a document on the premium Board and initiative page (initiative briefing-premium-adddoc; planning/prd/briefing-premium-adddoc-prd.md A1 to A8).
|
|
4
4
|
* Serves the real pages from the real server. The model routes and the add route are answered from fixtures, so nothing is written to this repository; the real
|
|
5
5
|
* route is checked only for its refusals. A1 dialog · A3 the press · A4 messages · A5 rows · A7 labels · A8 floors and fidelity */
|
|
6
|
-
const fs = require('fs');
|
|
7
6
|
const path = require('path');
|
|
8
7
|
const { spawn } = require('child_process');
|
|
9
8
|
const { findBrowser } = require('./lib/find-browser');
|
|
10
|
-
const CT = require('./lib/premium-console-type'); // the mockup is read with the console's type (PM, 2026-10-19), as premium.css is
|
|
11
|
-
const CT_VENDOR = 'file://' + path.join(__dirname, 'public', 'vendor') + '/';
|
|
12
9
|
const T = require('./test-run').configure({ name: 'briefing-premium-adddoc' });
|
|
13
10
|
const BP = require('./lib/board-premium.js');
|
|
14
11
|
const IP = require('./lib/initiative-premium.js');
|
|
@@ -31,7 +28,6 @@ const finish = async (code) => {
|
|
|
31
28
|
};
|
|
32
29
|
process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
33
30
|
|
|
34
|
-
const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'briefing-artifact.html');
|
|
35
31
|
const CUSTOM = [
|
|
36
32
|
{ id: 'cd-1', scope: 'board:w1', title: 'UAT plan', writer: 'you', phase: null, link: null, at: '2026-10-18T09:00:00.000Z' },
|
|
37
33
|
{ id: 'cd-2', scope: 'board:w1', title: 'Contract', writer: 'drafts', phase: null, link: { kind: 'Confluence', url: 'https://example.atlassian.net/wiki/spaces/X/pages/1' }, at: '2026-10-18T09:05:00.000Z' },
|
|
@@ -62,6 +58,7 @@ const PAGES = {
|
|
|
62
58
|
await page.route('**/api/briefing-premium/**', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, turns: [], working: false }) }));
|
|
63
59
|
await page.goto(BASE + P.file + P.qs + theme);
|
|
64
60
|
const up = await until(() => page.evaluate((s) => !!document.querySelector(s), P.ready), 20000);
|
|
61
|
+
if (up && P.file === '/premium-board.html') await page.click('#tabDocs'); // the Agreed design shows the documents on the Documents tab (premium-agreed-design)
|
|
65
62
|
return { ctx, page, errors, posts, up, calls: () => calls, setCustom: (c) => { current = c; }, reply: (a) => { reply = a; } };
|
|
66
63
|
};
|
|
67
64
|
const txt = (p, s) => p.evaluate((q) => (document.querySelector(q) || {}).textContent || '', s);
|
|
@@ -94,7 +91,7 @@ const PAGES = {
|
|
|
94
91
|
ok(`${kind} A3 the press posts the entered fields to the one route, with the launch nonce and no writer field`, last && last.path === '/api/custom-docs/add' && JSON.stringify(Object.keys(last.body).sort()) === JSON.stringify(Object.keys(want).sort()) && Object.keys(want).every((k) => last.body[k] === want[k] || k === 'ws') && !!mint && last.headers['x-pmos-nonce'] === mint && !['by', 'via', 'at', 'actor', 'pm', 'nonce'].some((k) => k in last.body), JSON.stringify(last && last.body));
|
|
95
92
|
ok(`${kind} A3 nothing else was posted`, A.posts.every((x) => x.path === '/api/custom-docs/add'));
|
|
96
93
|
ok(`${kind} A1 the dialog closes, the page reads again and focus returns to the button`, A.calls() > calls0 && await p.evaluate(() => !document.querySelector('#dlg').classList.contains('on')) && await p.evaluate((s) => document.activeElement === document.querySelector(s), P.btn));
|
|
97
|
-
A.setCustom(CUSTOM.map((d) => Object.assign({}, d, { scope: P.scope }))); await p.reload(); await until(() => p.evaluate((s) => !!document.querySelector(s), P.ready), 20000); await sleep(400);
|
|
94
|
+
A.setCustom(CUSTOM.map((d) => Object.assign({}, d, { scope: P.scope }))); await p.reload(); await until(() => p.evaluate((s) => !!document.querySelector(s), P.ready), 20000); if (!ini) await p.click('#tabDocs'); await sleep(400);
|
|
98
95
|
const sel = ini ? '#cIniDoc' : '#cDocs';
|
|
99
96
|
const rows = await p.evaluate((s) => [...document.querySelectorAll(s + ' .dmr')].map((r) => ({ t: r.querySelector('b').textContent, s: r.querySelector('.dmm .s').textContent.trim(), small: r.querySelector('.dmn>small').textContent, meta: r.querySelector('.dmm').textContent, btn: r.querySelectorAll('.dmq button').length })), sel);
|
|
100
97
|
const uat = rows.find((r) => r.t === 'UAT plan'), con = rows.find((r) => r.t === 'Contract');
|
|
@@ -104,7 +101,7 @@ const PAGES = {
|
|
|
104
101
|
ok(`${kind} A5 the summary counts one linked and the total counts both`, /1\s*linked/.test(sum) && /up to date/.test(sum), sum);
|
|
105
102
|
ok(`${kind} A5 the filter chips keep their four and a linked document is under All only`, await p.evaluate((s) => { const b = [...document.querySelectorAll(s + ' #dmF button')]; return b.length === 4 && /Linked/.test(b.map((x) => x.textContent).join('')) === false; }, sel));
|
|
106
103
|
await p.click(P.btn); await sleep(250);
|
|
107
|
-
const floors = await p.evaluate(() => { const h = (s) => Math.round(document.querySelector(s).getBoundingClientRect().height); return { go: h('#adGo'), no: h('#adNo'), t: h('#adT'), k: h('#adK'), w: Math.round(document.querySelector('#adW button').getBoundingClientRect().height), add: h('.dmadd2') }; });
|
|
104
|
+
const floors = await p.evaluate((B) => { const h = (s) => Math.round(document.querySelector(s).getBoundingClientRect().height); return { go: h('#adGo'), no: h('#adNo'), t: h('#adT'), k: h('#adK'), w: Math.round(document.querySelector('#adW button').getBoundingClientRect().height), add: h(document.querySelector('.dmadd2') ? '.dmadd2' : B) }; }, P.btn); // the Board's Add a document is a chip in the Agreed design
|
|
108
105
|
ok(`${kind} A8 the buttons are at least 44 px (the fields and the switch keep the mockup's own size)`, [floors.go, floors.no, floors.add].every((v) => v >= 44), JSON.stringify(floors));
|
|
109
106
|
await p.keyboard.press('Escape'); await sleep(250);
|
|
110
107
|
ok(`${kind} A8 Escape closes the dialog`, await p.evaluate(() => !document.querySelector('#dlg').classList.contains('on')));
|
|
@@ -135,40 +132,23 @@ const PAGES = {
|
|
|
135
132
|
ok('A3 the add route takes POST only', wrong === 405);
|
|
136
133
|
}
|
|
137
134
|
|
|
138
|
-
/* A8 fidelity
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
const
|
|
142
|
-
const
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
const R = await open('initiative', { w, h, theme: th }); await sleep(400);
|
|
156
|
-
const rBtn = await R.page.evaluate(() => { const b = document.querySelector('[data-adddoc]'), cs = getComputedStyle(b), r = b.getBoundingClientRect(); return { fs: cs.fontSize, fw: cs.fontWeight, bg: cs.backgroundColor, c: cs.color, br: cs.borderRadius, h: Math.round(r.height) }; });
|
|
157
|
-
await R.page.click('[data-adddoc]'); await sleep(500);
|
|
158
|
-
const c = await grab(R.page), diffs = [];
|
|
159
|
-
for (const k of Object.keys(mBtn)) if (k !== 'h' && mBtn[k] !== rBtn[k]) diffs.push(`btn.${k} ${mBtn[k]} | ${rBtn[k]}`); // the height is the 44 px floor the earlier slices keep (the mockup draws 36)
|
|
160
|
-
for (const [n] of PAIRS) {
|
|
161
|
-
if (!a[n] || !c[n]) { diffs.push(n + ' missing'); continue; }
|
|
162
|
-
for (const k of Object.keys(a[n])) {
|
|
163
|
-
if (k === 'cw' || k === 'sh' || ((n === 'ttl' || n === 'pane' || n === 'paper') && (k === 'width' || k === 'height'))) continue; // the dialog's columns size to the conversation beside the form, which differs
|
|
164
|
-
if (w < 1000 && n === 'ttl' && (k === 'fontSize' || k === 'letterSpacing' || k === 'lineHeight')) continue; // on a phone every dialog has the compact head's smaller title (Wawan, 2026-10-20), which the mockup predates
|
|
165
|
-
const geom = k === 'width' || k === 'height';
|
|
166
|
-
if (geom ? Math.abs(a[n][k] - c[n][k]) > 14 : a[n][k] !== c[n][k]) diffs.push(`${n}.${k} ${a[n][k]} | ${c[n][k]}`);
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
ok(`A8 the button and the dialog match the mockup at ${w} px, ${th}`, diffs.length === 0, diffs.join(' ; '));
|
|
170
|
-
await m.context().close(); await R.ctx.close();
|
|
171
|
-
}
|
|
135
|
+
/* A8 fidelity: the initiative page and its dialog follow the Agreed design (premium-agreed-design), which replaces the old mockup's look.
|
|
136
|
+
* The dialog is one white cozy panel in Nunito: title 19 px at 800, the form's presses blue and white pills, the paper a soft rounded card. */
|
|
137
|
+
for (const [w, h] of [[1280, 900], [390, 844]]) for (const th of ['light', 'dark']) {
|
|
138
|
+
const R = await open('initiative', { w, h, theme: th }); await sleep(400);
|
|
139
|
+
const btn = await R.page.evaluate(() => { const cs = getComputedStyle(document.querySelector('[data-adddoc]')); return { ff: cs.fontFamily, fw: cs.fontWeight, br: cs.borderRadius }; });
|
|
140
|
+
await R.page.click('[data-adddoc]'); await sleep(500);
|
|
141
|
+
const g = await R.page.evaluate(() => { const cs = (s) => getComputedStyle(document.querySelector(s)); return { dlg: cs('#dlg').backgroundColor, dlgR: cs('#dlg').borderTopLeftRadius, blur: cs('#dlg').backdropFilter, ttl: [cs('#dTitle').fontFamily, cs('#dTitle').fontWeight, cs('#dTitle').fontSize], go: [cs('#adGo').backgroundColor, cs('#adGo').fontWeight, cs('#adGo').borderTopLeftRadius], no: cs('#adNo').backgroundColor, paper: cs('#oMain .paper').borderTopLeftRadius, fab: getComputedStyle(document.querySelector('#czNav')).display }; });
|
|
142
|
+
const dark = th === 'dark', d = [];
|
|
143
|
+
if (!/^Nunito/.test(btn.ff) || btn.fw !== '800' || btn.br !== '999px') d.push('button ' + JSON.stringify(btn));
|
|
144
|
+
if (g.dlg !== (dark ? 'rgb(36, 38, 43)' : 'rgb(255, 255, 255)') || g.dlgR !== '28px' || (g.blur && g.blur !== 'none')) d.push('dialog ' + [g.dlg, g.dlgR, g.blur].join(' '));
|
|
145
|
+
if (!/^Nunito/.test(g.ttl[0]) || g.ttl[1] !== '800' || (w >= 1000 && g.ttl[2] !== '19px')) d.push('title ' + g.ttl.join(' '));
|
|
146
|
+
if (g.go[0] !== (dark ? 'rgb(106, 170, 240)' : 'rgb(47, 95, 179)') || g.go[1] !== '800' || g.go[2] !== '999px') d.push('Add document ' + g.go.join(' '));
|
|
147
|
+
if (g.no !== (dark ? 'rgb(36, 38, 43)' : 'rgb(255, 255, 255)')) d.push('Cancel ' + g.no);
|
|
148
|
+
if (g.paper !== '16px' && w >= 1000) d.push('paper ' + g.paper);
|
|
149
|
+
if (g.fab !== 'none') d.push('the floating menu shows over the modal dialog');
|
|
150
|
+
ok(`A8 the button and the dialog follow the Agreed design at ${w} px, ${th}`, d.length === 0, d.join(' ; '));
|
|
151
|
+
await R.ctx.close();
|
|
172
152
|
}
|
|
173
153
|
return finish();
|
|
174
154
|
})().catch((e) => { console.error(e); finish(1); });
|