create-pmos 0.838.0 → 0.840.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.
Files changed (44) hide show
  1. package/package.json +94 -62
  2. package/payload/KIT-VERSION +1 -1
  3. package/payload/planning/evals/eval-calibration.md +1 -1
  4. package/payload/planning/okrs/health-budgets.md +1 -1
  5. package/payload/state/discoveries.md +1 -1
  6. package/workspace/changelog.json +93 -24
  7. package/workspace/guide/cli.md +26 -0
  8. package/workspace/guide/home.md +1 -0
  9. package/workspace/guide/layout.md +3 -1
  10. package/workspace/guide/programs.md +3 -0
  11. package/workspace/guide/reports.md +9 -1
  12. package/workspace/lib/app-versions.js +169 -0
  13. package/workspace/lib/features.json +2 -0
  14. package/workspace/lib/pmos-verbs.js +6 -0
  15. package/workspace/lib/report-translate.js +26 -1
  16. package/workspace/lib/report-variants.js +14 -1
  17. package/workspace/lib/roadmap-audiences.js +157 -0
  18. package/workspace/lib/roadmap-cli.js +68 -0
  19. package/workspace/lib/route-modules.js +2 -0
  20. package/workspace/lib/routes-app-versions.js +54 -0
  21. package/workspace/lib/routes-reports.js +20 -3
  22. package/workspace/lib/routes-roadmap-audiences.js +55 -0
  23. package/workspace/lib/routes-today.js +15 -1
  24. package/workspace/lib/tracker-digest.js +12 -1
  25. package/workspace/lib/versions-cli.js +112 -0
  26. package/workspace/package-lock.json +2 -2
  27. package/workspace/package.json +1 -1
  28. package/workspace/public/pm/app-versions.js +97 -0
  29. package/workspace/public/pm/bd-ds.css +6 -0
  30. package/workspace/public/pm/bd-work-ds.css +26 -0
  31. package/workspace/public/pm/cozy-pop-work.js +7 -3
  32. package/workspace/public/pm/cozy-today-app.js +19 -1
  33. package/workspace/public/pm/ini-detail.css +38 -0
  34. package/workspace/public/pm/ini-detail.js +117 -0
  35. package/workspace/public/pm/premium-board.js +28 -5
  36. package/workspace/public/pm/premium-report-read.js +61 -3
  37. package/workspace/public/pm/roadmap-audiences.js +72 -0
  38. package/workspace/public/pm/standup-line.js +37 -0
  39. package/workspace/public/pm/wk-sum.js +103 -0
  40. package/workspace/public/premium-board.html +3 -0
  41. package/workspace/test-lists/app-versions.json +9 -0
  42. package/workspace/test-lists/ini-detail.json +9 -0
  43. package/workspace/test-lists/roadmap-audiences.json +9 -0
  44. package/workspace/test-lists/surface-reports.json +9 -0
@@ -4,10 +4,12 @@
4
4
  * GET /api/report?ws= the report files of the repository, drafts and issued, of every cadence,
5
5
  * with the `sig` the page watches (public/pm/sig-watch.js, 10 s)
6
6
  * GET /api/report/draft?ws=&cadence=&slot= one report file as it is now: its markdown, its note texts, its blob sha, and `also`:
7
- * the translated copies beside it (lib/report-translate.js alsoOf)
7
+ * the translated copies beside it (lib/report-translate.js alsoOf), and `versions`: the
8
+ * versions for executives, engineers and customers (lib/report-variants.js versionsOf)
8
9
  * POST /api/report/draft { ws, cadence, slot?, redraft? } Draft now, and Redraft (the notes are kept)
9
10
  * POST /api/report/note { ws, cadence, slot, id, text } one note, by initiative id (or report.headline, report.asks, report.changelog)
10
11
  * POST /api/report/issue { ws, cadence, slot, sha } Issue: the PM's act (R25)
12
+ * POST /api/report/language { ws, cadence, language, off? } add (or with off, remove) one language on the definition (the ✦ on the draft)
11
13
  *
12
14
  * WHICH GUARD. A draft and a note are page writes, not PM-only acts: both call pm-guard.js requirePagePress. Issue is a
13
15
  * PM-only act (D86 point 2) and calls requirePmPress with act 'issue', then issues.appendFromUi with the guard's actor.
@@ -31,6 +33,9 @@ const RD = require('./report-draft.js');
31
33
  const issues = require('./issues.js');
32
34
  const RN = require('./report-needs.js');
33
35
  /** The translated copies beside a draft; none when the module is not installed. */
36
+ /** A language the report's readers name with no copy yet (the ✦ on the draft, initiative surface-reports); none without the module. */
37
+ const langHintOf = (root, cadence) => { try { return require('./report-translate.js').languageHint(root, cadence); } catch { return []; } };
38
+ const versionsOf = (root, rel) => { try { return require('./report-variants.js').versionsOf(root, rel); } catch { return []; } };
34
39
  const alsoOf = (root, rel) => { try { return require('./report-translate.js').alsoOf(root, rel); } catch { return []; } };
35
40
 
36
41
  const CADENCE_RE = /^[a-z][a-z0-9-]{0,39}$/;
@@ -78,11 +83,11 @@ const cadenceSlot = (src) => {
78
83
 
79
84
  async function handle(req, res, url, ctx) {
80
85
  const p = url.pathname;
81
- if (p !== '/api/report' && p !== '/api/report/draft' && p !== '/api/report/note' && p !== '/api/report/issue') return refuse(ctx, res, 404, 'no such report route');
86
+ if (p !== '/api/report' && p !== '/api/report/draft' && p !== '/api/report/note' && p !== '/api/report/issue' && p !== '/api/report/language') return refuse(ctx, res, 404, 'no such report route');
82
87
 
83
88
  /* ── reads ─────────────────────────────────────────────────────────────────────────────────────────────────── */
84
89
  if (req.method === 'GET') {
85
- if (p === '/api/report/note' || p === '/api/report/issue') return refuse(ctx, res, 405, `${p} takes POST`);
90
+ if (p === '/api/report/note' || p === '/api/report/issue' || p === '/api/report/language') return refuse(ctx, res, 405, `${p} takes POST`);
86
91
  const w = wsFrom(ctx, url.searchParams.get('ws'));
87
92
  if (!w) return refuse(ctx, res, 404, 'no such workspace');
88
93
  let list;
@@ -101,6 +106,8 @@ async function handle(req, res, url, ctx) {
101
106
  ok: true, ws: w.id, sig: list.sig, cadence: cs.cadence, slot: cs.slot, exists: true, path: hit.path, status: hit.status,
102
107
  sha: RN.blobSha(file.buf), markdown: file.text, notes: RD.readNotes(file.text), issued: pageReport(hit).issued, edited: hit.edited, flags: pageFlags(list.flags),
103
108
  also: alsoOf(w.root, hit.path),
109
+ versions: versionsOf(w.root, hit.path),
110
+ langHint: langHintOf(w.root, cs.cadence),
104
111
  });
105
112
  return true;
106
113
  }
@@ -146,6 +153,16 @@ async function handle(req, res, url, ctx) {
146
153
  return done({ slot: draft.slot, path: r.path, sha: r.sha });
147
154
  }
148
155
 
156
+ // A language for the report's readers (the ✦ on the draft, initiative surface-reports): the definition's `languages:` line, through the
157
+ // one writer of lib/report-translate.js. off: true takes it out again (Undo). The next draft gets a copy; nothing runs or is sent here.
158
+ if (p === '/api/report/language') {
159
+ const lang = typeof body.language === 'string' ? body.language.trim().slice(0, 40) : '';
160
+ if (!lang) return refuse(ctx, res, 400, 'language is required, for example Indonesian');
161
+ let r; try { r = require('./report-translate.js').setLanguage(root, cs.cadence, lang, { off: body.off === true }); } catch (e) { r = { ok: false, error: String((e && e.message) || e).slice(0, 160) }; }
162
+ if (!r || !r.ok) return failed({ status: 400, error: (r && r.error) || 'the language was not saved' });
163
+ return done({ languages: r.languages.map((x) => x.language), path: r.path });
164
+ }
165
+
149
166
  if (p === '/api/report/note') {
150
167
  if (!cs.slot) return refuse(ctx, res, 400, 'slot must be a date, YYYY-MM-DD');
151
168
  const id = String(body.id || '');
@@ -0,0 +1,55 @@
1
+ 'use strict';
2
+ /* routes-roadmap-audiences.js — the roadmap for one audience over HTTP, for Work's Roadmap for others block (bet A88, initiative
3
+ * roadmap-audiences). The core is lib/roadmap-audiences.js; the verb is `pmos roadmap`.
4
+ *
5
+ * GET /api/roadmap-for?ws=<id>&for=exec|team|customer → { ok, audience, markdown, lines, offer } | { ok, pending: true }
6
+ * offer (customer only): up to OFFER live items not yet marked, [{ id, title }], for the ✓ beside each
7
+ * POST /api/roadmap-for/share { ws, id, on } → { ok, line } | 400 a page press only
8
+ *
9
+ * The rows come from the initiative cache (lib/initiative-rows.js rowsFor): while it derives, the GET answers { pending: true } and the
10
+ * block reads again. A GET that carries `pack=` (a published page) is refused with 403. Nothing is sent anywhere. */
11
+ const path = require('path');
12
+ const guard = require('./pm-guard.js');
13
+ const RA = require('./roadmap-audiences.js');
14
+ const { recordsDirFor } = require('./records-dir.js');
15
+
16
+ const OFFER = 5;
17
+ const CHECKOUT = path.join(__dirname, '..', '..');
18
+ function wsOf(ctx, ws) { try { return ctx && typeof ctx.getWs === 'function' ? ctx.getWs(ws || null) : null; } catch { return null; } }
19
+ const rootFor = (ctx, w) => (ctx && ctx.repoRoot) || (w && w.root) || CHECKOUT;
20
+
21
+ async function handle(req, res, url, ctx) {
22
+ if (url.pathname !== '/api/roadmap-for' && url.pathname !== '/api/roadmap-for/share') return false;
23
+ const send = (status, body) => { ctx.json(res, body, status); return true; };
24
+ const now = ctx.now ? ctx.now() : Date.now();
25
+ if (url.pathname === '/api/roadmap-for') {
26
+ if (req.method !== 'GET') return send(405, { ok: false, error: 'GET' });
27
+ if (url.searchParams.has('pack')) return send(403, { ok: false, error: 'the roadmap for others is never on a published page' });
28
+ const who = url.searchParams.get('for') || '';
29
+ if (!RA.AUDIENCES.includes(who)) return send(400, { ok: false, error: `for is one of ${RA.AUDIENCES.join(', ')}` });
30
+ const wsId = url.searchParams.get('ws') || null;
31
+ const w = wsOf(ctx, wsId), root = rootFor(ctx, w);
32
+ let rows = ctx.roadmapRows || null;
33
+ if (!rows) {
34
+ const r = require('./initiative-rows.js').rowsFor(root);
35
+ if (r.pending) return send(200, { ok: true, pending: true });
36
+ if (!r.ok) return send(200, { ok: false, error: r.error || 'the roadmap could not be read' });
37
+ rows = r.rows;
38
+ }
39
+ const list = RA.items({ root, rows, now, dir: recordsDirFor(ctx, wsId), tasks: ctx.roadmapTasks });
40
+ const lines = RA.lines(list, who);
41
+ (ctx.log || ((s) => console.log(s)))(`${RA.TAG} for ${who} · ${lines.length} items`);
42
+ const offer = who === 'customer' ? list.filter((x) => !x.shared).slice(0, OFFER).map((x) => ({ id: x.id, title: RA.outerTitle(x.title) })) : [];
43
+ return send(200, { ok: true, audience: who, markdown: RA.text(list, who, { product: (w && w.name) || path.basename(root) }), lines, offer });
44
+ }
45
+ if (req.method !== 'POST') return send(405, { ok: false, error: 'POST' });
46
+ const rd = await ctx.readJson(req);
47
+ if (!rd.ok) return send(400, { ok: false, error: 'the body is not JSON' });
48
+ const body = rd.body || {};
49
+ const g = guard.requirePagePress(req, body);
50
+ if (!g.ok) return send(g.status, { ok: false, error: g.error });
51
+ const r = RA.share(recordsDirFor(ctx, body.ws || null), body.id, body.on !== false, { by: (g.actor && g.actor.by) || 'pm', now });
52
+ return r.ok ? send(200, { ok: true, line: r.line }) : send(400, { ok: false, error: r.error });
53
+ }
54
+
55
+ module.exports = { prefixes: ['/api/roadmap-for'], handle, OFFER };
@@ -10,14 +10,28 @@
10
10
  *
11
11
  * `banner` holds the sources that could not be read. An unreadable source is said here and never turned into an empty
12
12
  * list. `sig` changes whenever the list changes.
13
+ *
14
+ * GET /api/standup?ws=<id> → { ok, ws, read, line, lines }: the standup digest of the stored Jira reads (lib/tracker-digest.js gather),
15
+ * its one sentence for Today's Overview (lineOf; null when nothing moved) and its lines for the reading view. Read-only.
13
16
  */
14
17
  const path = require('path');
15
18
  const today = require('./today.js');
16
19
 
17
20
  module.exports = {
18
- prefixes: ['/api/today', '/api/today-order'],
21
+ prefixes: ['/api/today', '/api/today-order', '/api/standup'],
19
22
  handle: async (req, res, url, ctx) => {
20
23
  if (url.pathname === '/api/today-order') return require('./today-order.js').handle(req, res, url, ctx);
24
+ // the standup from the stored Jira reads (initiative surface-reports): Today's Overview line before noon, and the digest it opens.
25
+ // Read-only: the moves file is written by `pmos jira sync`, never here.
26
+ if (url.pathname === '/api/standup') {
27
+ if (req.method !== 'GET') { ctx.json(res, { ok: false, error: 'GET only' }, 405); return true; }
28
+ const w = ctx.getWs(url.searchParams.get('ws'));
29
+ if (!w) { ctx.json(res, { ok: false, error: 'no workspace is registered' }, 404); return true; }
30
+ const TD = require('./tracker-digest.js');
31
+ let d; try { d = TD.gather(w.root, { now: Date.now() }); } catch (e) { ctx.json(res, { ok: false, error: String((e && e.message) || e).slice(0, 160) }, 500); return true; }
32
+ ctx.json(res, { ok: true, ws: w.id, read: !!(d && d.read), line: TD.lineOf(d), lines: d && d.read ? TD.render(d) : [] });
33
+ return true;
34
+ }
21
35
  if (url.pathname !== '/api/today') return false;
22
36
  if (req.method !== 'GET') { ctx.json(res, { ok: false, error: 'GET only' }, 405); return true; }
23
37
  const w = ctx.getWs(url.searchParams.get('ws'));
@@ -18,6 +18,7 @@
18
18
  * build({ moves, snapshots, sprints, known, titles, now, since }) PURE → the digest (see DIGEST)
19
19
  * gather(root, { now, since }) → build() over the stored reads of one workspace
20
20
  * render(digest) PURE → [line of text]
21
+ * lineOf(digest) PURE → one sentence for Today's Overview, or null (no read, nothing moved)
21
22
  *
22
23
  * DIGEST { since, now, read: false } when no Jira read is stored, else
23
24
  * { since, now, read: true, readAt, stale, moved: [{ key, summary, from, to, category, who, group, url, inPmos }],
@@ -230,6 +231,16 @@ function render(d) {
230
231
  return out;
231
232
  }
232
233
 
234
+ /** PURE. The digest in one sentence for Today's Overview (initiative surface-reports): "Since yesterday, 5 Jira tickets moved: 2 done, 1 not
235
+ * in PMOS yet." null when no Jira read is stored or nothing moved (zero is silence). On a Monday the window is the weekend, so it says so. */
236
+ function lineOf(d) {
237
+ if (!d || !d.read || !Array.isArray(d.moved) || !d.moved.length) return null;
238
+ const n = d.moved.length, done = d.moved.filter((m) => m.category === 'done').length, out = d.untracked ? d.untracked.count : 0;
239
+ const span = d.since && d.now && (Date.parse(d.now) - Date.parse(d.since)) > 30 * H ? 'Since Friday' : 'Since yesterday';
240
+ const parts = [done ? done + ' done' : '', out ? out + ' not in PMOS yet' : ''].filter(Boolean);
241
+ return `${span}, ${n} Jira ${n === 1 ? 'ticket' : 'tickets'} moved${parts.length ? ': ' + parts.join(', ') : ''}.`;
242
+ }
243
+
233
244
  /** The health number of standup-from-one-read: moves of tickets no initiative holds, kept in the last `days` days. */
234
245
  function untrackedCount(root, { days = 7, now = Date.now() } = {}) {
235
246
  const from = now - days * DAY;
@@ -247,4 +258,4 @@ function main(a) {
247
258
  }
248
259
  const ran = require.main === module ? main(process.argv.slice(2)) : null;
249
260
 
250
- module.exports = { FILE, STALE_MS, STUCK_DAYS, MAX_QUESTIONS, OTHER, fileOf, movesOf, append, readMoves, windowOf, build, gather, render };
261
+ module.exports = { FILE, STALE_MS, STUCK_DAYS, MAX_QUESTIONS, OTHER, fileOf, movesOf, append, readMoves, windowOf, build, gather, render, lineOf };
@@ -0,0 +1,112 @@
1
+ 'use strict';
2
+ /* versions-cli.js — `pmos versions`: which versions of the product's app are still in use, the open bugs their users hit, and the ✦ proposal
3
+ * of which version to force (idea A211, initiative app-versions). The store is lib/app-versions.js (app-versions.jsonl in the product's
4
+ * records folder); the Versions block on Work reads the same file, so what the chat writes here shows there.
5
+ *
6
+ * pmos versions list [--json] one row per version in use, newest first, and the ✦ proposal
7
+ * pmos versions set <version> --users <count|share%> --source "<where>" the users on a version, from the user's own source
8
+ * pmos versions gone <version> the version is no longer in use
9
+ * pmos versions bug --key <id> --title "<what>" --version <v> [--version <v>…] [--crash] --source "<where>" an open bug and the versions it hits
10
+ * pmos versions fixed <key> the bug is fixed
11
+ * pmos versions force <version> record the PM's decision to force the update (PMOS sends nothing)
12
+ * pmos versions leave <version> leave that version alone: no ✦ for it
13
+ * pmos versions undo take back the last force or leave
14
+ * every command: [--root <dir>] (default: this repository)
15
+ *
16
+ * Forcing an update is an outward change: `force` only records the PM's own decision, and inside a background run (PMOS_AI_RUN set)
17
+ * force, leave and undo refuse. Exit codes: 0 done, 1 refused, 2 usage. Nothing is sent. */
18
+ const path = require('path');
19
+ const fs = require('fs');
20
+ const AV = require('./app-versions.js');
21
+
22
+ const COMMANDS = { versions: ['list', 'set', 'gone', 'bug', 'fixed', 'force', 'leave', 'undo'] };
23
+ const USAGE = [
24
+ 'usage: pmos versions list|set|gone|bug|fixed|force|leave|undo — the app versions still in use and the open bugs their users hit',
25
+ ' pmos versions list [--json] one row per version in use, newest first, and the ✦ proposal',
26
+ ' pmos versions set 4.2 --users 710 --source "store console" the users on a version (a count, or a share: 7%)',
27
+ ' pmos versions gone 3.8 the version is no longer in use',
28
+ ' pmos versions bug --key PAY-12 --title "crash on pay" --version 3.9 --crash --source "Jira" an open bug its users hit',
29
+ ' pmos versions fixed PAY-12 the bug is fixed',
30
+ ' pmos versions force 3.9 record that you will force the update; PMOS sends nothing',
31
+ ' pmos versions leave 3.9 leave that version alone',
32
+ ' pmos versions undo take back the last force or leave',
33
+ 'Run it in the product\'s repository, or pass --root <dir>.',
34
+ ];
35
+ const ALLOWED = { list: ['json', 'root'], set: ['json', 'root', 'users', 'source'], gone: ['json', 'root'], bug: ['json', 'root', 'key', 'title', 'version', 'crash', 'source'],
36
+ fixed: ['json', 'root'], force: ['json', 'root'], leave: ['json', 'root'], undo: ['json', 'root'] };
37
+ const ONE_ARG = new Set(['set', 'gone', 'fixed', 'force', 'leave']);
38
+ const BOOL = new Set(['json', 'crash']);
39
+ const MULTI = new Set(['version']);
40
+
41
+ function parse(args) {
42
+ const pos = [], flags = {};
43
+ for (let i = 0; i < args.length; i++) {
44
+ const a = args[i];
45
+ if (!a.startsWith('--')) { pos.push(a); continue; }
46
+ const k = a.slice(2);
47
+ if (BOOL.has(k)) { flags[k] = true; continue; }
48
+ const v = args[i + 1] !== undefined && !String(args[i + 1]).startsWith('--') ? args[++i] : '';
49
+ if (MULTI.has(k)) (flags[k] = flags[k] || []).push(v); else flags[k] = v;
50
+ }
51
+ return { pos, flags };
52
+ }
53
+ /** The repository the command runs in: the nearest folder up from cwd that holds .git (a folder, or a file in a worktree). */
54
+ function repoRoot(cwd) {
55
+ let d = path.resolve(cwd);
56
+ for (;;) {
57
+ if (fs.existsSync(path.join(d, '.git'))) return d;
58
+ const up = path.dirname(d);
59
+ if (up === d) return path.resolve(cwd);
60
+ d = up;
61
+ }
62
+ }
63
+ function recordsDirOf(root) {
64
+ try { const { repoScript } = require('./repo-script.js'); return require(repoScript('signals/layout-paths.js')).pathsFor(root).recordsDir; } catch { return path.join(root, 'planning', 'records'); }
65
+ }
66
+
67
+ /** The rows as lines a person reads: "4.2 71 % of users —". */
68
+ function listLines(rs, p) {
69
+ if (!rs.length) return ['No app version is recorded. Record one: pmos versions set 4.2 --users 710 --source "store console"'];
70
+ const out = rs.map((r) => {
71
+ const b = r.bugs.length ? `${r.bugs.length} open bug${r.bugs.length === 1 ? '' : 's'}${r.crash ? ' · ' + r.bugs.find((x) => x.crash).title : ''} (${r.bugs.map((x) => x.key).join(', ')})` : '—';
72
+ return ` ${r.version.padEnd(10)} ${AV.usersWord(r).padEnd(18)} ${b}${r.forced ? ' you decided to force an update' : ''}`;
73
+ });
74
+ if (p) out.push(`✦ ${p.text} You decide: pmos versions force ${p.version} (PMOS sends nothing) or pmos versions leave ${p.version}`);
75
+ return out;
76
+ }
77
+
78
+ async function run(argv, { say = (s) => console.log(s), cwd = process.cwd(), env = process.env } = {}) {
79
+ const args = argv[0] === 'versions' ? argv.slice(1) : argv.slice();
80
+ const sub = args[0];
81
+ if (!sub || ['help', '--help', '-h'].includes(sub)) { for (const l of USAGE) say(l); return sub ? 0 : 1; }
82
+ if (!COMMANDS.versions.includes(sub)) { say(`unknown versions command "${sub}". Use one of: ${COMMANDS.versions.join(', ')}`); return 2; }
83
+ const { pos, flags } = parse(args.slice(1));
84
+ const fail = (error, code = 1) => { say(flags.json ? JSON.stringify({ ok: false, error }) : '✗ ' + error); return code; };
85
+ for (const k of Object.keys(flags)) if (!ALLOWED[sub].includes(k)) return fail(`--${k} is not an option of pmos versions ${sub}`, 2);
86
+ if (ONE_ARG.has(sub) ? pos.length !== 1 : pos.length) return fail(ONE_ARG.has(sub) ? `pmos versions ${sub} takes one ${sub === 'fixed' ? 'bug key' : 'version'}` : `pmos versions ${sub} takes options, not an argument`, 2);
87
+ if (['force', 'leave', 'undo'].includes(sub) && env.PMOS_AI_RUN) return fail('a background run never decides a forced update: the PM does');
88
+ const dir = recordsDirOf(path.resolve(flags.root || repoRoot(cwd)));
89
+
90
+ if (sub === 'list') {
91
+ const S = AV.read(dir), rs = AV.rows(S), p = AV.proposal(S, rs);
92
+ console.info(`[app-versions] cli versions=${rs.length} proposal=${p ? p.version : 'none'}`);
93
+ if (flags.json) { say(JSON.stringify({ ok: true, rows: rs, proposal: p })); return 0; }
94
+ for (const l of listLines(rs, p)) say(l);
95
+ return 0;
96
+ }
97
+ let r;
98
+ if (sub === 'set') r = AV.setUsers(dir, { version: pos[0], users: flags.users, source: flags.source });
99
+ else if (sub === 'gone') r = AV.gone(dir, pos[0]);
100
+ else if (sub === 'bug') r = AV.bug(dir, { key: flags.key, title: flags.title, versions: flags.version || [], crash: !!flags.crash, source: flags.source });
101
+ else if (sub === 'fixed') r = AV.fixed(dir, pos[0]);
102
+ else if (sub === 'undo') r = AV.undo(dir);
103
+ else r = AV.decide(dir, pos[0], sub);
104
+ if (!r.ok) return fail(r.error);
105
+ console.info(`[app-versions] ${sub} ${r.line.version || r.line.key || ''}`.trim());
106
+ const words = { set: `recorded ${pos[0]}`, gone: `${pos[0]} is no longer in use`, bug: `recorded bug ${flags.key}`, fixed: `${pos[0]} is fixed`, undo: 'took back the last decision',
107
+ force: `recorded: you will force an update from ${pos[0]}. PMOS sends nothing; turn it on where your app's updates are set`, leave: `left ${pos[0]} alone` };
108
+ say(flags.json ? JSON.stringify({ ok: true, line: r.line }) : words[sub]);
109
+ return 0;
110
+ }
111
+
112
+ module.exports = { run, COMMANDS, USAGE, listLines };
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.838.0",
3
+ "version": "0.840.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pmos-workspace",
9
- "version": "0.838.0",
9
+ "version": "0.840.0",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@anthropic-ai/sdk": "^1.3.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.838.0",
3
+ "version": "0.840.0",
4
4
  "private": true,
5
5
  "description": "PMOS Terminal Workspace — local companion hosting real PTYs beside the library and gates (D62)",
6
6
  "license": "MIT",
@@ -0,0 +1,97 @@
1
+ /* pm/app-versions.js — the product's app versions still in use, on its Work page (idea A211, initiative app-versions; board BatchReleaseDS
2
+ * panel 22). Below the principles, one product only.
3
+ *
4
+ * mount(host, { ws, single, say }) → draws the block into `host`; a Work page that shows several products at once shows none
5
+ *
6
+ * Built only from Komorebi parts: a Detail block (pm-block, its head), pm-table, pm-said with the ✦ star, pm-btn icon buttons. It reads and
7
+ * writes GET and POST /api/app-versions (lib/routes-app-versions.js) and nothing else; `pmos versions` writes the same store.
8
+ * · One row per version in use, newest first: its share of users and the open bugs its users hit (a crash in the alert colour).
9
+ * · At most one ✦ line: which version to force, with the reason; ✓ records the PM's decision to force it, ✕ leaves it. Forcing the
10
+ * update is an outward change PMOS never makes, so the ✓ only records it and says so, with Undo in the page's toast.
11
+ * · No version recorded, but the product's Jira readings name releases (seed): one ✦ line naming them and a users field per release,
12
+ * ✓ saves it (bdVersAdd). This is the way in without a typed ask (LINE.md Rule 12).
13
+ * · No version recorded and no release named: no block (zero is silence).
14
+ * The controls are named bdVersForce, bdVersLeave and bdVersAdd and each press notes that name in the local use log (noteUse): the health number. */
15
+ import { pmGet, pmPost } from './http.js';
16
+ import { noteUse } from './use-log.js';
17
+
18
+ const API = '/api/app-versions';
19
+ const esc = (s) => String(s == null ? '' : s).replace(/[&<>"']/g, (c) => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#39;' })[c]);
20
+ const SV = (d, cls = '') => `<svg class="pm-ic${cls}" width="16" height="16" viewBox="0 0 24 24" aria-hidden="true"><path d="${d}"/></svg>`;
21
+ const I = { phone: 'M8 3h8a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zM11 18h2', star: 'M12 3l1.8 5.4L19 10.2l-5.2 1.8L12 17.4l-1.8-5.4L5 10.2l5.2-1.8z',
22
+ ok: 'M5 12.5l4.5 4.5L19 7.5', x: 'M6 6l12 12M18 6L6 18' };
23
+
24
+ const usersCell = (r) => (r.share != null ? r.share + ' %' : r.users + (r.unit === '%' ? ' %' : ' users'));
25
+ function bugsCell(r) {
26
+ if (!r.bugs || !r.bugs.length) return '—';
27
+ const n = r.bugs.length, crash = r.bugs.find((b) => b.crash);
28
+ const tip = ` title="${esc(r.bugs.map((b) => b.key + ' ' + b.title).join(' · '))}"`;
29
+ return crash ? `<span class="bd-vers-crash"${tip}>${n} · ${esc(crash.title)}</span>` : `<span${tip}>${n}</span>`;
30
+ }
31
+
32
+ const HEAD = () => `<div class="head">${SV(I.phone)}<h3 class="pm-h-sm">Versions</h3></div>`;
33
+ const listWords = (vs) => (vs.length < 2 ? vs[0] : vs.slice(0, -1).join(', ') + ' and ' + vs[vs.length - 1]);
34
+ /** No version recorded, releases named in Jira: a ✦ line and one users field per release. */
35
+ function seedHtml(seed) {
36
+ const tr = (v) => `<tr data-version="${esc(v)}"><td>${esc(v)}</td><td><input class="pm-input" name="bdVersUsers" inputmode="decimal" autocomplete="off" placeholder="710 or 7%" aria-label="Users on ${esc(v)}"></td>`
37
+ + `<td><button type="button" class="pm-btn primary" name="bdVersAdd" value="${esc(v)}" aria-label="Save the users on ${esc(v)}" title="Save the users on ${esc(v)}">${SV(I.ok)}</button></td></tr>`;
38
+ return `<section class="pm-block bd-vers" aria-label="Versions">${HEAD()}`
39
+ + `<p class="pm-said">${SV(I.star, ' pm-star')}<span>Your Jira releases name ${esc(listWords(seed))}. Add the users still on each one, from your store console or analytics, and PMOS shows which version to force.</span></p>`
40
+ + `<table class="pm-table"><thead><tr><th scope="col">Version</th><th scope="col">Users</th><th scope="col" aria-label="Save"></th></tr></thead><tbody>${seed.map(tr).join('')}</tbody></table></section>`;
41
+ }
42
+
43
+ /** The block's markup. state = { rows, proposal, seed }. Pure, so the test reads it. '' when no version is recorded and no release is named. */
44
+ export function blockHtml(state) {
45
+ const rows = Array.isArray(state && state.rows) ? state.rows : [];
46
+ const seed = Array.isArray(state && state.seed) ? state.seed.filter(Boolean) : [];
47
+ if (!rows.length) return seed.length ? seedHtml(seed) : '';
48
+ const p = state.proposal || null;
49
+ const btn = (name, icon, label, kind) => `<button type="button" class="pm-btn${kind ? ' ' + kind : ''}" name="${name}" value="${esc(p.version)}" aria-label="${esc(label)}" title="${esc(label)}">${SV(icon)}</button>`;
50
+ const tr = (r) => `<tr data-version="${esc(r.version)}"><td>${esc(r.version)}</td><td>${esc(usersCell(r))}</td><td>${bugsCell(r)}${r.forced ? ' <span class="pm-meta">· you decided to force an update</span>' : ''}</td></tr>`;
51
+ const said = p ? `<p class="pm-said">${SV(I.star, ' pm-star')}<span>${esc(p.text)}</span>`
52
+ + `${btn('bdVersLeave', I.x, 'Leave this version alone', 'outline')}${btn('bdVersForce', I.ok, 'I will force this update (PMOS sends nothing)', 'primary')}</p>` : '';
53
+ return `<section class="pm-block bd-vers" aria-label="Versions">${HEAD()}`
54
+ + `<table class="pm-table"><thead><tr><th scope="col">Version</th><th scope="col">Users</th><th scope="col">Open bugs they hit</th></tr></thead><tbody>${rows.map(tr).join('')}</tbody></table>`
55
+ + said + '</section>';
56
+ }
57
+
58
+ /** Draw the block into `host` and wire its presses. */
59
+ export async function mount(host, opts = {}) {
60
+ if (!host) return;
61
+ const { ws = null, single = true, say = null } = opts;
62
+ if (!single) { host.hidden = true; host.innerHTML = ''; return; }
63
+ const r = await pmGet(API + (ws ? '?ws=' + encodeURIComponent(ws) : '')).catch(() => null);
64
+ if (!r || !r.ok) { host.hidden = true; return; } // the block is an extra: a failed read leaves Work as it was
65
+ const html = blockHtml(r);
66
+ host.hidden = !html; host.innerHTML = html;
67
+ const addUsers = async (b) => {
68
+ const field = b.closest('tr') && b.closest('tr').querySelector('input[name="bdVersUsers"]');
69
+ const users = field ? field.value.trim() : '';
70
+ if (!users) { if (field) field.focus(); return; }
71
+ noteUse(b.name);
72
+ b.disabled = true;
73
+ const res = await pmPost(API, { ws, act: 'users', version: b.value, users }).catch(() => null);
74
+ if (!res || !res.ok) { b.disabled = false; if (say) say((res && res.error) || 'Not saved.'); return; }
75
+ mount(host, opts);
76
+ };
77
+ host.onkeydown = (e) => {
78
+ if (e.key !== 'Enter' || !e.target.matches('input[name="bdVersUsers"]')) return;
79
+ const b = e.target.closest('tr').querySelector('button[name="bdVersAdd"]');
80
+ if (b) { e.preventDefault(); addUsers(b); }
81
+ };
82
+ host.onclick = async (e) => {
83
+ const add = e.target.closest('button[name="bdVersAdd"]'); if (add) { addUsers(add); return; }
84
+ const b = e.target.closest('button[name="bdVersForce"], button[name="bdVersLeave"]'); if (!b) return;
85
+ const act = b.name === 'bdVersForce' ? 'force' : 'leave', version = b.value;
86
+ noteUse(b.name);
87
+ b.disabled = true;
88
+ const res = await pmPost(API, { ws, act, version }).catch(() => null);
89
+ if (!res || !res.ok) { b.disabled = false; if (say) say((res && res.error) || 'Not saved.'); return; }
90
+ const words = act === 'force' ? `Recorded: you will force an update from ${version}. PMOS sends nothing; turn it on where your app's updates are set.` : `Left ${version} alone.`;
91
+ if (say) say(words, async () => { await pmPost(API, { ws, act: 'undo' }).catch(() => null); mount(host, opts); });
92
+ mount(host, opts);
93
+ };
94
+ }
95
+
96
+ /** Draw the block again after a read of the Work page. */
97
+ export const refresh = (host, opts) => mount(host, opts);
@@ -55,3 +55,9 @@ body.bd-page.pm-ds > :not(#czNav, .pv-scrim, .pv-ov) :focus-visible { outline: n
55
55
 
56
56
  /* Toast: ink on card, medium corners, lift, bottom centre (the system's Toast). */
57
57
  .bd-page.pm-ds .bd-toast { border-radius: var(--radius-md); box-shadow: var(--lift); font-size: var(--fs-meta); }
58
+
59
+ /* Versions (pm/app-versions.js, idea A211): the head's title takes the row, the ✦ line sits flush, a bug its users hit with a crash in the alert colour. */
60
+ .bd-page.pm-ds .bd-vers .head .pm-h-sm, .bd-page.pm-ds .bd-vers .pm-said > span { flex: 1; }
61
+ .bd-page.pm-ds .bd-vers .pm-said { margin: 0; align-items: center; }
62
+ .bd-page.pm-ds .bd-vers .bd-vers-crash { color: var(--alert); }
63
+ .bd-page.pm-ds .bd-vers .pm-input { width: 8em; max-width: 100%; }
@@ -221,3 +221,29 @@ body.bd-page.bk-on [id="bkBody"] { display: flex; flex-direction: column; gap: v
221
221
  @media (max-width: 760px) {
222
222
  .lb-m .lb-said span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
223
223
  }
224
+
225
+ /* Work › Initiatives (board TbInitiatives, slice 2, job 2038): the summary strip, the chips, and the list beside the Key results column 2 : 1.
226
+ Under 1100 px the column sits under the list and the strip takes two cells a row. */
227
+ .wk-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin: 0 0 var(--space-16); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--card); overflow: hidden; }
228
+ .wk-strip .wk-sc { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: var(--space-12) var(--space-16); border-left: 1px solid var(--line); }
229
+ .wk-strip .wk-sc:first-child { border-left: 0; }
230
+ .wk-strip .wk-sc b { font-size: var(--fs-section); font-weight: var(--fw-strong); color: var(--ink); }
231
+ .wk-strip .wk-sc.warn b { color: var(--alert); }
232
+ .wk-strip .wk-sc .nm { font-size: var(--fs-row); font-weight: var(--fw-strong); color: var(--ink); }
233
+ .wk-strip .wk-sc .pm-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
234
+ .wk-chips { display: flex; flex-wrap: wrap; gap: var(--space-8); margin: 0 0 var(--space-12); }
235
+ .wk-chips .wk-chip { gap: 6px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-size: var(--fs-meta); cursor: pointer; }
236
+ .wk-chips .wk-chip .k { color: var(--muted); }
237
+ .wk-chips .wk-chip.on { border-color: var(--ink); background: var(--ink); color: var(--card); }
238
+ .wk-chips .wk-chip.on .k { color: inherit; }
239
+ .wk-tb { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: var(--space-16); align-items: start; }
240
+ .wk-tbm { min-width: 0; }
241
+ .wk-krs ul { list-style: none; margin: 0; padding: 0; }
242
+ .wk-krs .wk-kr { display: block; padding: var(--space-8) 0; border-top: 1px solid var(--line); }
243
+ .wk-krs .wk-kr:first-child { border-top: 0; }
244
+ .wk-krs .wk-kr .pm-meta { display: block; }
245
+ @media (max-width: 1100px) {
246
+ .wk-tb { grid-template-columns: minmax(0, 1fr); }
247
+ .wk-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
248
+ .wk-strip .wk-sc { border-left: 0; border-top: 1px solid var(--line); }
249
+ }
@@ -43,6 +43,7 @@ import * as STMAP from './story-map.js'; // a new bet's story map with the Rel
43
43
  import * as TLY from './three-layouts.js'; // three layouts for a new screen, pick one (initiative three-layouts, A317)
44
44
  import * as PR from './print-pdf.js'; // Print or PDF under ⋯ (job #1911, A379)
45
45
  import * as SMAP from './stakeholder-map.js'; // the People block: who decides, must agree, needs to know (stakeholder-map, A371)
46
+ import * as ID from './ini-detail.js'; // the page in two columns: four numbers, Details with the Jira epics, a milestone's stage (job #2013, TbInitiative)
46
47
  import * as MST from './meeting-stance.js'; // before the meeting: the two questions for a contested decision, and where each stands (meeting-stance, A333)
47
48
  import * as PD from './bd-pop-ds.js'; // the popup on a computer, built from the design system's blocks (initiative work-ds-popup) // the Kind of a file and one row per kind (round 3 point 16), shared with the Library // the rename and its Undo, the same write as the old List (batch 18 item 16)
48
49
 
@@ -492,7 +493,7 @@ function dsHtml(r, v, o, W, S, C, mode) {
492
493
  toolbar: CAP.toolbarHtml(fourIds(), { picked: S.sel.size > 0, jiraPicked: epicSel }), line: S.act ? CAP.pickLineHtml(S.act, S.sel.size) : '' });
493
494
  const wbs = view === 'gantt'
494
495
  ? breakdownHtml(W, C, mode, false, S, true).replace('<h3>Work breakdown</h3>', head).replace('class="pw-sec"', 'class="pw-sec pm-block pwd-blk pwd-wbs"')
495
- : `<section class="pm-block pwd-blk pwd-wbs" aria-label="Work breakdown">${head}${PD.listHtml(stF, W, { looseN: W.looseN, epics, fix, ask, sel: S.sel, nested: st.some((x) => x.kids), drag: canDrag(), group, epicSel, capped: true })}</section>`;
496
+ : `<section class="pm-block pwd-blk pwd-wbs" aria-label="Work breakdown">${head}${PD.listHtml(ID.msLabel(stF), W, { looseN: W.looseN, epics, fix, ask, sel: S.sel, nested: st.some((x) => x.kids), drag: canDrag(), group, epicSel, capped: true })}</section>`;
496
497
  // the done test's acceptance criteria on the initiative's Jira tickets (jira-criteria-write): its ✦ above the breakdown, unless the PM said no
497
498
  const crit = S.sel.size || dropped().has('crit:' + id) ? '' : critSugHtml(CRIT.get(id));
498
499
  // Overview (Wawan, 2026-11-23): Where it stands, The case and its facts in one block across the top; folded or open is the person's choice
@@ -505,7 +506,10 @@ function dsHtml(r, v, o, W, S, C, mode) {
505
506
  const ppl = ppl0 + MST.blockFor(id, o.ws, () => { if (artRedraw) artRedraw(); });
506
507
  // the story map (A419): a new bet's journey and its Release 1 line, above the breakdown; nothing when there is no map and the bet has tasks
507
508
  const smap = STMAP.blockHtml({ id, ws: o.ws || '', title: W.title || '', tasks: stagesOf(r, v, { ...o, today: W.today, subAll: true }).filter((x) => x.kind === 'task').length });
508
- return `<div class="pw pwd">${PD.overviewHtml(W, r, { oid: id, dropped: dropped(), open: ovOpen() })}${ppl}<div class="pwd-main">${PD.stagesHtml(st, W)}${lay}${smap}${crit}${BVD.html(id, o.ws)}${wbs}</div></div>`;
509
+ // two columns (job #2013, TbInitiative on Exploring 3 page "balanced"): the four numbers, the Stages and the breakdown on the left; the
510
+ // Overview without its facts part, Details (with the Jira epics) and People on the right
511
+ const side = PD.overviewHtml({ ...W, facts: [] }, r, { oid: id, dropped: dropped(), open: ovOpen() }) + ID.detailsHtml(r, v, W, { rows: st, program: o.program }) + ppl;
512
+ return ID.pageHtml({ stats: ID.statsHtml(v, st, W.today), main: `${PD.stagesHtml(st, W)}${lay}${smap}${crit}${BVD.html(id, o.ws)}${wbs}`, side });
509
513
  }
510
514
 
511
515
  /** The grouping ✦ the PM said no to, for this initiative: 'group:<stage>'. */
@@ -1018,7 +1022,7 @@ export function wire(body, h0, x0) {
1018
1022
  if (d.pwSprint) { sprintMenu(b, d.pwSprint, c, h, x); return; }
1019
1023
  if (d.pwPrio) { prioMenu(b, d.pwPrio, c, h, x); return; }
1020
1024
  if ('pwAddty' in d) { S.msAdd = !S.msAdd; const f = b.closest('.pw-add'), k = f && f.querySelector('[data-pw-add]') && f.querySelector('[data-pw-add]').dataset.pwAdd; redraw(); if (k != null) setTimeout(() => { const i = body.querySelector(`[data-pw-add="${window.CSS.escape(k)}"]`); if (i) i.focus(); }, 0); return; }
1021
- if (d.pwFact) { fact(d.pwFact, b, c, h); return; }
1025
+ if (d.pwFact) { if ('idtEdit' in d) noteUse('iniDetailEdit'); fact(d.pwFact, b, c, h); return; }
1022
1026
  if (d.pwStatus) { statusMenu(b, d.pwStatus, h, c); return; }
1023
1027
  if (d.pwJstat) { jiraStatusMenu(b, d.pwJstat, h, c); return; }
1024
1028
  if (d.pwDate) { dateMenu(b, d.pwDate, c, h, x); return; }
@@ -19,6 +19,7 @@ import { productName, whenNames } from './scope-chip.js';
19
19
  import * as TP from './cozy-today-view.js';
20
20
  import * as OM from './mention-one-model.js'; // the one mention's title and the self check's proof line (Today round 3)
21
21
  import { wireSwipe } from './cozy-phone-swipe.js';
22
+ import * as SU from './standup-line.js'; // surface-reports: before noon, the standup from Jira in the Overview (GET /api/standup)
22
23
  let DG = null; // quiet-rows-digest: pm/digest-view.js, loaded on a Monday only (on other days Today loads nothing of the digest)
23
24
  import { noteUse } from './use-log.js'; // your-move (A468): each press on a Your move row is one ym-act line in the local use log (its health number)
24
25
  import * as QB from './quiet-batch.js'; // quiet-rows: Today's batch, the popup (Approve, Skip, Change it first; nothing sent without a press)
@@ -51,6 +52,7 @@ export function mountToday(ctx) {
51
52
  readMoments();
52
53
  readLine();
53
54
  readDigest();
55
+ readStandup();
54
56
  readSync();
55
57
  readPin();
56
58
  readCap();
@@ -313,6 +315,21 @@ export function mountToday(ctx) {
313
315
  console.info('[quiet-rows-digest] made=' + !!X.digest + (X.digestOff ? ' off' : ''));
314
316
  X.html = ''; draw();
315
317
  }
318
+ /* surface-reports (Rule 12): before noon, each product's standup from its stored Jira reads (GET /api/standup); none after noon */
319
+ async function readStandup() {
320
+ if (new Date(ctx.now()).getHours() >= SU.MORNING_END) return;
321
+ const P = ((ctx.S.M && ctx.S.M.products) || []).filter((p) => p && p.model);
322
+ const W = [...new Set((P.length ? P.map((p) => p.ws || ctx.boardWs() || '') : [ctx.boardWs() || '']))];
323
+ const got = await Promise.all(W.map((ws) => ctx.pmGet('/api/standup' + (ws ? '?ws=' + encodeURIComponent(ws) : '')).catch(() => null)));
324
+ X.standup = SU.standupParts(got);
325
+ if (X.standup.length) { X.html = ''; draw(); }
326
+ }
327
+ function openStandup() {
328
+ const VW = window.czViewer; if (!VW || !X.standup || !X.standup.length) return;
329
+ noteUse('standupOpen');
330
+ VW.open({ id: 'standup', kind: 'Standup', title: 'What moved in Jira', icon: 'M4 6h16M4 12h10M4 18h7', presses: [],
331
+ render: (body) => { body.innerHTML = SU.standupHtml(X.standup, productOf); } });
332
+ }
316
333
  /** The digest in the reading view (the Viewer), read only; its header's switch turns it off (digest.on, POST /api/settings). */
317
334
  function openDigest() {
318
335
  const VW = window.czViewer; if (!VW || !DG) return;
@@ -384,7 +401,7 @@ export function mountToday(ctx) {
384
401
  const lead = L.rows.find((r) => !r.done && r.src !== 'note' && r.src !== 'own' && r.src !== 'lab');
385
402
  const A = TM.agendaModel({ meetings: ctx.meetings(), own: X.log.entries, reports: X.reports || [], focus: lead ? { key: lead.key, title: lead.title } : null, now,
386
403
  iniOf: (m) => (m && (m.initiative || (m.level && m.level.kind === 'initiative' && m.level.id) || (m.about && m.about.kind === 'initiative' && m.about.id))) || null });
387
- const O = DG && X.digest ? DG.withDigest(TM.overviewModel(L, A), X.digest, now) : TM.overviewModel(L, A);
404
+ const O = SU.withStandup(DG && X.digest ? DG.withDigest(TM.overviewModel(L, A), X.digest, now) : TM.overviewModel(L, A), X.standup || [], now, productOf);
388
405
  O.suggest = O.suggest.filter((x) => !X.hide.has(x.key)).concat(TM.syncSuggest(X.sync || [], { nameOf: (ws) => productOf(ws), hidden: syncHidden(), open: X.syncOpen || new Set(), now }));
389
406
  return { L, A, O };
390
407
  }
@@ -830,6 +847,7 @@ export function mountToday(ctx) {
830
847
  ctx.VW.popNext({ keep: true, id: x.key, kind: 'meeting', title: x.title }); ctx.openMeeting(x.ref); return;
831
848
  }
832
849
  if (act === 'open' && key === 'digest') { openDigest(); return; }
850
+ if (act === 'open' && key === 'standup') { openStandup(); return; }
833
851
  const r = rowOf(key); if (!r) return;
834
852
  if (r.tier != null && (act === 'open' || act === 'done' || act === 'tomorrow' || /^(so|sb|sw|mo)-/.test(act))) noteUse('ym-act'); // your-move's health number
835
853
  if (act === 'q-remind') { remindQuestion(r.ref); return; }
@@ -0,0 +1,38 @@
1
+ /* pm/ini-detail.css — the initiative page in two columns (factory job 2013, board TbInitiative on Exploring 3, page "balanced"). It only places the
2
+ * parts pm/ini-detail.js draws; the look is the system's tokens. */
3
+ .idt-g { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: var(--space-16); align-items: start; min-width: 0; }
4
+ .idt-m { min-width: 0; }
5
+ .idt-s { display: flex; flex-direction: column; gap: var(--space-16); min-width: 0; }
6
+ /* the Overview in the side column: its parts stack, one under the other */
7
+ .idt-s .pwd-ovg { grid-template-columns: minmax(0, 1fr); }
8
+ .idt-s .pwd-ovp + .pwd-ovp { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: var(--space-12); }
9
+
10
+ /* the four numbers */
11
+ .idt-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; padding: 0; overflow: hidden; }
12
+ .idt-n { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-12) var(--space-16); min-width: 0; }
13
+ .idt-n + .idt-n { border-left: 1px solid var(--line); }
14
+ .idt-n > b { font-size: var(--fs-section); font-weight: var(--fw-strong); color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
15
+ .idt-n.warn > b { color: var(--alert); }
16
+ .idt-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
17
+
18
+ /* Details: a label and its value per row; a value that can change is a press */
19
+ .idt-dh { gap: var(--space-8); align-items: baseline; }
20
+ .idt-dh .pm-h-sm { margin: 0; }
21
+ .idt-dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--space-8) var(--space-16); margin: 0; font-size: var(--fs-row); }
22
+ .idt-dl dt { color: var(--muted); }
23
+ .idt-dl dd { margin: 0; min-width: 0; }
24
+ .idt-v { border: 0; background: none; padding: 0; font: inherit; color: var(--ink); text-align: left; border-radius: var(--radius-sm); }
25
+ button.idt-v { cursor: pointer; }
26
+ @media (hover: hover) { button.idt-v:hover > span:first-child { text-decoration: underline; text-underline-offset: 3px; } }
27
+ button.idt-v:focus-visible { outline: none; box-shadow: var(--glow); }
28
+ .idt-dl .warn { color: var(--alert); }
29
+ .idt-eps { display: flex; flex-wrap: wrap; gap: var(--space-4); }
30
+ .idt-ep { display: inline-flex; align-items: center; gap: var(--space-4); text-decoration: none; }
31
+
32
+ @media (max-width: 1100px) {
33
+ .idt-g { grid-template-columns: minmax(0, 1fr); }
34
+ .idt-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
35
+ .idt-n + .idt-n { border-left: 0; }
36
+ .idt-n:nth-child(n + 3) { border-top: 1px solid var(--line); }
37
+ .idt-n:nth-child(2n) { border-left: 1px solid var(--line); }
38
+ }