create-pmos 0.328.0 → 0.330.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 +227 -1
- 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-insights-test.js +56 -25
- package/workspace/briefing-premium-test.js +3 -1
- package/workspace/changelog.json +672 -0
- package/workspace/guide/briefing-premium.md +10 -8
- package/workspace/lib/insights-premium.js +111 -26
- package/workspace/lib/kit-update.js +57 -8
- package/workspace/lib/premium-dashboards.js +25 -5
- package/workspace/lib/routes-insights-premium.js +19 -4
- package/workspace/lib/routes-premium-dashboards.js +12 -1
- package/workspace/lib/settings-store.js +3 -1
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/premium-report-read-test.js +4 -2
- package/workspace/premium-studio-chart-test.js +3 -3
- package/workspace/premium-studio-report-test.js +1 -1
- package/workspace/premium-studio-test.js +4 -4
- package/workspace/premium-vw-cal-test.js +3 -1
- package/workspace/premium-vw-slides-test.js +8 -4
- package/workspace/public/pm/c3-settings.js +1 -1
- package/workspace/public/pm/premium-insights.css +52 -0
- package/workspace/public/pm/premium-insights.js +129 -50
- package/workspace/public/pm/premium-shell.js +137 -3
- package/workspace/public/pm/premium-vw-cal.css +66 -42
- package/workspace/public/pm/premium-vw-cal.js +38 -17
- package/workspace/public/pm/premium.css +22 -0
- package/workspace/public/pm/premium.js +1 -1
- package/workspace/public/premium-insights.html +29 -19
- package/workspace/server.js +7 -2
- package/workspace/test-run.js +2 -0
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<meta name="pmos-nonce" content="" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
|
|
7
7
|
<title>PMOS · Insights</title>
|
|
8
|
-
<!-- The premium Insights (initiative briefing-premium-insights, slice 9). The fourth place on the rail, in the Briefing's shell. It reads GET /api/insights-premium, built from the KR metric records and the report files the console's Reports tab reads, and GET /api/board-metrics-premium for the Board measures card, whose one press sets a target (POST /api/board-metric-targets/save). -->
|
|
8
|
+
<!-- The premium Insights (initiative briefing-premium-insights, slice 9; insights-one-list puts the insight first, the pinned dashboard on top and one paged list below). The fourth place on the rail, in the Briefing's shell. It reads GET /api/insights-premium, built from the KR metric records and the report files the console's Reports tab reads, and GET /api/board-metrics-premium for the Board measures card, whose one press sets a target (POST /api/board-metric-targets/save). -->
|
|
9
9
|
<link rel="preload" href="/vendor/geist-var.woff2" as="font" type="font/woff2" crossorigin />
|
|
10
10
|
<link rel="stylesheet" href="/pm/premium.css" />
|
|
11
11
|
<link rel="stylesheet" href="/pm/premium-insights.css" />
|
|
@@ -36,29 +36,39 @@
|
|
|
36
36
|
<h1 class="vh">Insights</h1><div id="crumbHost"></div>
|
|
37
37
|
<div class="tools tools-top"><span class="vh" id="snap">Reading the records</span></div>
|
|
38
38
|
</header>
|
|
39
|
-
<section class="hero hero
|
|
40
|
-
|
|
39
|
+
<section class="hero ins-hero rise" style="--d:2" id="insHero" aria-label="Insight">
|
|
40
|
+
<p class="ieye" id="insEye"></p>
|
|
41
|
+
<p class="brief ihead" id="brief" aria-live="polite"></p>
|
|
42
|
+
<p class="iwhy" id="insWhy"></p>
|
|
43
|
+
<ul class="imore" id="insMore"></ul>
|
|
44
|
+
<div class="iact" id="insAct"></div>
|
|
45
|
+
<p class="note inote" id="insNote"></p>
|
|
46
|
+
</section>
|
|
47
|
+
<section class="card pdcard rise" style="--d:5" id="cDash" aria-labelledby="hDash">
|
|
48
|
+
<div class="ch"><span class="ic"><svg class="i" viewBox="0 0 24 24"><path d="M4 20V10M10 20V4M16 20v-8M22 20H2"/></svg></span><h2 id="hDash">Dashboard</h2><i class="ptag" id="dashTag"></i><small id="dashCap"></small></div>
|
|
49
|
+
<div class="nact pdbar" id="dashBar" hidden></div>
|
|
50
|
+
<div id="dashBody"></div>
|
|
51
|
+
</section>
|
|
52
|
+
<section class="card nrep rise" style="--d:6" id="cRep" aria-labelledby="hRep">
|
|
53
|
+
<div class="ch"><span class="ic"><svg class="i" viewBox="0 0 24 24"><path d="M4 6h16M4 12h16M4 18h10"/></svg></span><h2 id="hRep">Dashboards and reports</h2><small id="repCap"></small></div>
|
|
54
|
+
<div class="seg" id="listSeg" role="group" aria-label="Show"><i class="pill"></i></div>
|
|
55
|
+
<div class="lbar">
|
|
56
|
+
<span class="newm"><button class="dmcta" id="listNew" aria-haspopup="menu" aria-expanded="false" aria-controls="listMenu">New ▾</button>
|
|
57
|
+
<span class="lmenu" id="listMenu" role="menu" hidden><button role="menuitem" id="pdNew">Dashboard</button><button role="menuitem" id="repNew">Report</button></span></span>
|
|
58
|
+
<form class="nask" id="repAsk"><input id="repAskIn" maxlength="500" autocomplete="off" placeholder="Ask PMOS to set up a report" aria-label="Ask PMOS to set up a report"><button class="dmcta" id="repAskGo" type="submit">Ask</button></form>
|
|
59
|
+
</div>
|
|
60
|
+
<p class="note nask-n">Ask starts a background run that only proposes a report. Nothing is set up until you press Set it up.</p>
|
|
61
|
+
<p class="mhint">A report is a file in the repository. PMOS drafts it, you read it. <b>Nothing is sent from here.</b> The pin puts one dashboard at the top of this page. It shows nowhere else.</p>
|
|
62
|
+
<div id="repBody"></div>
|
|
63
|
+
<div class="lpager" id="listPager"></div>
|
|
64
|
+
<p class="nsch"><button class="lk" id="repOpen">Open the Reports tab</button> to edit or issue a document.</p>
|
|
65
|
+
</section>
|
|
66
|
+
<section class="card rise" style="--d:7" id="cBm" aria-labelledby="hBm" hidden>
|
|
41
67
|
<div class="ch"><span class="ic"><svg class="i" viewBox="0 0 24 24"><path d="M4 20V10M10 20V4M16 20v-8M22 20H2"/></svg></span><h2 id="hBm">Board measures</h2><small id="bmCap"></small><div class="seg mper" id="bmRange" role="group" aria-label="Range"><i class="pill"></i><button data-w="8" aria-pressed="true">8 weeks</button><button data-w="26" aria-pressed="false">26 weeks</button><button data-w="52" aria-pressed="false">52 weeks</button></div></div>
|
|
42
68
|
<p class="mhint" id="bmHint"></p>
|
|
43
69
|
<div class="bt2 ibt" id="bmBody"></div>
|
|
44
70
|
<p class="note" id="bmNote"></p>
|
|
45
71
|
</section>
|
|
46
|
-
<div class="nl">
|
|
47
|
-
<div class="nlc">
|
|
48
|
-
<section class="card rise" style="--d:5" id="cDash" aria-labelledby="hDash">
|
|
49
|
-
<div class="ch"><span class="ic"><svg class="i" viewBox="0 0 24 24"><path d="M4 20V10M10 20V4M16 20v-8M22 20H2"/></svg></span><h2 id="hDash">Dashboards</h2><small id="dashCap"></small></div>
|
|
50
|
-
<div class="seg" id="dashTabs" role="group" aria-label="Dashboard" hidden><i class="pill"></i></div>
|
|
51
|
-
<div class="nact pdbar" id="dashBar" hidden></div>
|
|
52
|
-
<div id="dashBody"></div>
|
|
53
|
-
</section>
|
|
54
|
-
</div>
|
|
55
|
-
<aside class="nlr" aria-label="Reports">
|
|
56
|
-
<section class="card nrep rise" style="--d:6" id="cRep" aria-labelledby="hRep">
|
|
57
|
-
<div class="ch"><span class="ic"><svg class="i" viewBox="0 0 24 24"><path d="M6 3h9l4 4v14H6z"/><path d="M14 3v5h5M9 13h6M9 17h4"/></svg></span><h2 id="hRep">Reports</h2><small id="repCap"></small></div>
|
|
58
|
-
<div id="repBody"></div>
|
|
59
|
-
</section>
|
|
60
|
-
</aside>
|
|
61
|
-
</div>
|
|
62
72
|
<p class="foot" id="foot">Charts read the KR metric records of this workspace and never invent a number. A press here records only what it says: a dashboard or a chart in the workspace's state folder, a report setup, request or dismissal in the report ledger, or a report's look in its design folder. The Board measures card counts the Board's four measures from the repository, over 8, 26 or 52 weeks; a target set there is saved in the workspace's state folder and drawn on the Board too. Left out: any measure no record holds. Nothing is sent from this page.</p>
|
|
63
73
|
</main>
|
|
64
74
|
<noscript>This page needs JavaScript.</noscript>
|
package/workspace/server.js
CHANGED
|
@@ -8197,7 +8197,11 @@ async function handleRequest(req, res) {
|
|
|
8197
8197
|
if (p === '/api/kit/status' && req.method === 'GET') {
|
|
8198
8198
|
const w = getWs(url.searchParams.get('ws'));
|
|
8199
8199
|
if (!w) return json(res, { ok: false, error: 'no workspace' }, 400);
|
|
8200
|
-
|
|
8200
|
+
// premium-updates: the last check's answer (kept in the state folder) and whether an open page checks once a day.
|
|
8201
|
+
const lastCheck = kitUpdate.readLastCheck(STATE);
|
|
8202
|
+
const now = kitUpdate.status({ root: w.root, appVersion: APP_VERSION, appDir: __dirname });
|
|
8203
|
+
return json(res, { ok: true, ws: w.id, name: w.name, busy: kitBusy, ...now, lastCheck, ...(lastCheck ? kitUpdate.compare(now, lastCheck.latest) : {}),
|
|
8204
|
+
checkDaily: require('./lib/settings-store.js').get(STATE, 'upd.check') === 'daily' && String(process.env.PMOS_UPDATE_CHECK || '').toLowerCase() !== 'press' });
|
|
8201
8205
|
}
|
|
8202
8206
|
if ((p === '/api/kit/check' || p === '/api/kit/update' || p === '/api/kit/upgrade-app') && req.method === 'POST') {
|
|
8203
8207
|
let body = {};
|
|
@@ -8214,7 +8218,8 @@ async function handleRequest(req, res) {
|
|
|
8214
8218
|
const r = await kitUpdate.latest({ source: kitUpdate.source() });
|
|
8215
8219
|
const now = st();
|
|
8216
8220
|
if (!r.ok) return json(res, { ok: false, error: r.error, ws: w.id, ...now }, 502);
|
|
8217
|
-
|
|
8221
|
+
const lastCheck = kitUpdate.writeLastCheck(STATE, { latest: r.version, changes: r.changes });
|
|
8222
|
+
return json(res, { ok: true, ws: w.id, ...now, latest: r.version, latestChanges: r.changes || [], lastCheck, source: r.source || 'registry', ...kitUpdate.compare(now, r.version) });
|
|
8218
8223
|
}
|
|
8219
8224
|
if (kitBusy) return json(res, { ok: false, error: kitBusy === 'app' ? 'The workspace is already updating' : 'A kit update is already running' }, 409);
|
|
8220
8225
|
if (p === '/api/kit/update') {
|
package/workspace/test-run.js
CHANGED
|
@@ -101,6 +101,8 @@ function configure({ name = 'run', port = null } = {}) {
|
|
|
101
101
|
// remembered at hundreds of call sites is a convention that will be forgotten at one of them,
|
|
102
102
|
// which is exactly how this class of defect got in.
|
|
103
103
|
process.env.PMOS_STATE_DIR = stateDir;
|
|
104
|
+
// No suite's page asks the npm registry by itself: the once-a-day update check (premium-updates) waits for a press.
|
|
105
|
+
process.env.PMOS_UPDATE_CHECK = 'press';
|
|
104
106
|
// A private tmux socket, never the PM's own ('pmos'), so a suite cannot reach their sessions.
|
|
105
107
|
const tmuxSock = `pmos-${name}-${process.pid}`;
|
|
106
108
|
process.env.PMOS_TMUX_SOCK = tmuxSock;
|