create-pmos 0.331.0 → 0.333.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.
@@ -20,8 +20,9 @@ Every premium page has the same top bar. On the left is where you are, then a ro
20
20
  - **The bell** counts the same things the Briefing lists under what you need to do, and a press opens the Briefing.
21
21
  - **The ⋯ menu** holds **Search** (Ctrl K), **Agent sessions** with a count, **Console**, **Theme** (Light, Dark or Auto) and **Settings**. On the Board it also holds **Open initiatives** as Page or Popup. An orange dot on ⋯ means a newer PMOS is ready, and **Settings** then shows the version.
22
22
  - **On a phone** the bar is one row: the page name, Chat, the bell and ⋯. Sources moves into the ⋯ menu.
23
+ - **Menus.** An option that is too long for one line wraps onto the next line, and its row grows to hold it.
23
24
 
24
- **Search** (Ctrl K, or `/`) opens the search over places, initiatives, documents and your running sessions; Enter opens the result. Search and the bell only read; neither changes a record. **Console** opens the console at `/console.html`, for the places premium does not have yet. In the console, the More menu has **Open premium**, which opens this page. **Settings** opens one dialog. **Updates** comes first: the PMOS version you have, the newest published version, **Check now** and, when a newer one is ready, **Update**. Update does what the console's Settings › Updates does: it updates the kit in each workspace that is behind, then PMOS itself, which stops for about a minute and reloads the page. PMOS that runs from a checkout says to use `git pull` instead. Each workspace is a row with its kit version. PMOS checks once a day while a page is open (the console's **Check for updates** setting turns this off). **What's new** lists each published kit, newest first and grouped by day: its version, when it published, and one line per pull request it carries. Each line is copied from the pull request's "After:" paragraph, or its title when it has none, when the kit is published. Kits newer than yours are tinted, and yours is marked. Five show per day; **Show more** opens the rest. Then come two choices. **Workspaces** lists the repositories PMOS works in, with Add (a folder path) and Remove; Remove forgets the address and never deletes the folder, and a refusal shows the server's reason. **Connectors** has an On/Off switch for each source the Briefing reads. Each press saves that one record. Every other setting runs on a default and stays in the console; the dialog links to it. Remove needs the page's launch nonce, so an agent session cannot call it.
25
+ **Search** (Ctrl K, or `/`) opens the search over places, initiatives, documents and your running sessions; Enter opens the result. Search and the bell only read; neither changes a record. **Console** opens the console at `/console.html`, for the places premium does not have yet. In the console, the More menu has **Open premium**, which opens this page. **Settings** opens one dialog. **Updates** comes first: the PMOS version you have, the newest published version, **Check now** and, when a newer one is ready, **Update**. Update does what the console's Settings › Updates does: it updates the kit in each workspace that is behind, then PMOS itself, which stops for about a minute and reloads the page. PMOS that runs from a checkout says to use `git pull` instead. Each workspace is a row with its kit version. PMOS checks once a day while a page is open (the console's **Check for updates** setting turns this off). **What's new** lists each published kit, newest first and grouped by day: its version, when it published, and one entry per pull request it carries: the pull request's title in bold, with its number, and under it the first sentence of its "After:" paragraph. Both are copied from the pull request when the kit is published; a parenthesis that holds code or a decision number is left out, and a pull request with no "After:" paragraph shows its title only. Kits newer than yours are tinted, and yours is marked. Five show per day; **Show more** opens the rest. Then come two choices. **Workspaces** lists the repositories PMOS works in, with Add (a folder path) and Remove; Remove forgets the address and never deletes the folder, and a refusal shows the server's reason. **Connectors** has an On/Off switch for each source the Briefing reads. Each press saves that one record. Every other setting runs on a default and stays in the console; the dialog links to it. Remove needs the page's launch nonce, so an agent session cannot call it.
25
26
 
26
27
  **Sources** is a dialog that lists each tracked source (Repository, Initiatives, Calendar, Jira status, My work and Tracker items) with its own state and the time it was last read. Each source except the repository has **Refresh**, and **Refresh all** reads them all again. Slack and email are read as part of My work, so they have no row of their own. A source PMOS does not track has no row: the dialog shows only what PMOS can say it read.
27
28
 
@@ -61,7 +62,8 @@ The list also shows what the Initiative Driver is waiting on you for, the same t
61
62
  - **Order.** A product whose agent is stopped on you comes after the repository rows and before mail, Jira and Confluence. Open drafts come after those, the oldest first. The list shows seven rows; the rest are counted under "more".
62
63
  - **The hero** says how many agent drafts wait on you, counting every one, shown or not. The dock counts them too.
63
64
  - **The dialog** shows only what the Driver's row holds: the cause, the draft count, the age, and the confidence, recommendation, reversibility and effort the agent stated when it filed. A fact nobody stated is left out. **Review the drafts** opens Around you's Agent proposals, where Keep, Send back and Drop are.
64
- - **Left out.** Core-document drafts open the console's Docs view.
65
+ - **Pressing a row** opens Around you's Agent proposals on the Briefing, with only that initiative's or Work item's drafts. **Show all proposals** lists every one. A row never opens the console.
66
+ - **Core-document drafts** open the initiative page or the Board page that holds the documents. Portfolio documents still open the console, because no premium page holds them yet.
65
67
 
66
68
  ## How long it takes to load
67
69
 
@@ -127,7 +129,7 @@ When the meeting is not linked, the dialog has a **Link it** press. You choose t
127
129
 
128
130
  In **Notes**, each next step has **Make task** when the note is linked to an initiative. It adds the step to the first stage of that initiative's breakdown, with its owner and due day when the step names them, and the status says where it went. **Undo** withdraws the task. A note with no initiative explains that it must be linked first, and writes nothing. Both writes need the page's launch nonce, so an agent session is refused. A refused write shows its reason and changes nothing on screen.
129
131
 
130
- **Record.** A meeting of today that ended less than 10 minutes ago, or has not started, has a **Record** press in the dialog. Before the first press, the dialog says "Tell everyone first" and what the press does: it makes the meeting's note, or uses the one it has, and starts to listen to your microphone and the sound of the meeting. The audio and the notes stay on this machine. The console's own sheet asks where the meeting's sound comes from. While it records, the dialog shows the clock, **Pause** and **Stop**. A paused meeting stays open for one hour and has **Resume**. **Stop** asks first, because a stopped meeting cannot be resumed, and offers **Pause instead**. A refusal shows the reason and changes nothing. What the dialog shows comes from the recorder and from the notes the server holds, not from the last press. Only one meeting records at a time. A row in Today or in the week shows **Recording** or **Paused** when its note is in that state.
132
+ **Record.** A meeting of today that ended less than 10 minutes ago, or has not started, has a **Record** press in the dialog. Before the first press, the dialog says "Tell everyone first" and what the press does: it makes the meeting's note, or uses the one it has, and starts to listen to your microphone and the sound of the meeting. The audio and the notes stay on this machine. The console's own sheet asks where the meeting's sound comes from. It looks as it does in the console, in the premium colours. While it records, the dialog shows the clock, **Pause** and **Stop**. A paused meeting stays open for one hour and has **Resume**. **Stop** asks first, because a stopped meeting cannot be resumed, and offers **Pause instead**. A refusal shows the reason and changes nothing. What the dialog shows comes from the recorder and from the notes the server holds, not from the last press. Only one meeting records at a time. A row in Today or in the week shows **Recording** or **Paused** when its note is in that state.
131
133
 
132
134
  **The Record control.** The Briefing's top bar has **Record**. A press starts an untitled note at once and listens to your microphone and the sound of the meeting. The arrow next to it lists today's meetings that have not ended more than 10 minutes ago, each with its time and **Now**, **Recording** or **Paused**, and **New note**. The first start on the page asks "Tell everyone first". The control hides while a note records, because only one note records at a time. The other premium pages have no Record control, because only the Briefing can hold the microphone.
133
135
 
@@ -5,7 +5,7 @@
5
5
  * status({ root, appVersion, appDir }) → { app: { version, fromCheckout }, kit, changes } local only, no network
6
6
  * source(env) → { kind:'npm' } | { kind:'local', path } | { kind:'local', path, error }
7
7
  * latest({ exec, source }) → Promise<{ ok, version, changes } | { ok:false, error }> npm view create-pmos version pmosChanges
8
- * readChanges(appDir) → [{ v, at, prs: [{ n, s }] }] the installed app's changelog.json, newest first
8
+ * readChanges(appDir) → [{ v, at, prs: [{ n, t?, s }] }] the installed app's changelog.json, newest first
9
9
  * readLastCheck(stateDir) · writeLastCheck(stateDir, { latest, changes }) the last check's answer, kept in the state folder
10
10
  * compare(st, latestVersion) → { appBehind, kitBehind }
11
11
  * updateKit(root, { version, exec }) → Promise<{ ok, output, kit } | { ok:false, error, output }>
@@ -122,11 +122,12 @@ const npxArgs = (src, version, rest) => (src && src.kind === 'local'
122
122
  ? ['-y', `--package=${src.path}`, '--', PKG_NAME, ...rest]
123
123
  : ['-y', `${PKG_NAME}@${version}`, ...rest]);
124
124
 
125
- /** One changelog entry as the page may show it, or null: a version, a time, and PRs with a number and a summary. */
125
+ /** One changelog entry as the page may show it, or null: a version, a time, and PRs with a number, a summary and, from
126
+ * kit-changelog format 2, a title. */
126
127
  function cleanEntry(e) {
127
128
  if (!e || !validVersion(e.v)) return null;
128
129
  const prs = (Array.isArray(e.prs) ? e.prs : []).filter((p) => p && typeof p.s === 'string' && p.s.trim())
129
- .map((p) => ({ n: Number.isInteger(p.n) ? p.n : null, s: p.s.trim().slice(0, 400) }));
130
+ .map((p) => ({ n: Number.isInteger(p.n) ? p.n : null, ...(typeof p.t === 'string' && p.t.trim() ? { t: p.t.trim().slice(0, 200) } : {}), s: p.s.trim().slice(0, 400) }));
130
131
  return { v: e.v, at: typeof e.at === 'string' && !Number.isNaN(Date.parse(e.at)) ? e.at : null, prs };
131
132
  }
132
133
  const cleanList = (list) => (Array.isArray(list) ? list.map(cleanEntry).filter(Boolean) : []);
@@ -4,6 +4,9 @@
4
4
  *
5
5
  * FILE checker.jsonl, beside driver.jsonl in the repository's state folder
6
6
  * due(state, checked, { now }) → [{ run, target, proposals: [p] }] ended Driver runs with open drafts and no check yet (3 days at most)
7
+ * share({ checkedToday, startedToday, dailyCap }) → { ok, reason } the Checker's share of the daily cap: SHARE_PER_DAY starts at most, and
8
+ * never the last half of the cap, so a backlog of drafts cannot spend the Driver's starts
9
+ * checkedToday(checks, { now }) → the Checker runs that answered today (local day), counted by run
7
10
  * promptFor({ target, proposals }) → the prompt. The drafts are quoted as data, never as instructions.
8
11
  * parse(text, ids) → [{ proposal, verdict: 'pass' | 'flag', reason }] | null one JSON object; an unknown id is dropped
9
12
  * readChecks(dir) · append(dir, line) → Map proposal → { verdict, reason, run, at } · one line
@@ -23,6 +26,7 @@ const DAY = 86400000;
23
26
  const DUE_DAYS = 3;
24
27
  const MIN_N = 10, MIN_KAPPA = 0.6, MIN_TNR = 0.5;
25
28
  const MAX_REASON = 300;
29
+ const SHARE_PER_DAY = 8; // Checker starts per local day at most (2026-10-20: a backlog of 40 ended runs spent the whole daily cap of 40 in 44 minutes)
26
30
  const msOf = (v) => { const t = Date.parse(v); return Number.isFinite(t) ? t : null; };
27
31
  const clip = (s, n) => { s = String(s == null ? '' : s).replace(/\s+/g, ' ').trim(); return s.length > n ? s.slice(0, n - 1).trimEnd() + '…' : s; };
28
32
 
@@ -49,9 +53,24 @@ function due(state, checked, { now = Date.now() } = {}) {
49
53
  if (!r.end || r.ok !== true) continue;
50
54
  const end = msOf(r.end); if (end == null || now - end > DUE_DAYS * DAY) continue;
51
55
  const proposals = [...state.proposals.values()].filter((p) => p.run === r.run && p.state === 'open' && !checked.has(p.id));
52
- if (proposals.length) out.push({ run: r.run, target: r.target, proposals });
56
+ if (proposals.length) out.push({ run: r.run, target: r.target, proposals, end });
53
57
  }
54
- return out;
58
+ return out.sort((a, b) => b.end - a.end); // newest first: the drafts the PM reads next are graded first
59
+ }
60
+
61
+ const localDay = (ms) => { const d = new Date(ms); return `${d.getFullYear()}-${d.getMonth() + 1}-${d.getDate()}`; };
62
+ function checkedToday(checks, { now = Date.now() } = {}) {
63
+ const runs = new Set();
64
+ for (const c of (checks && typeof checks.values === 'function' ? checks.values() : [])) {
65
+ const t = msOf(c.at);
66
+ if (t != null && c.run && localDay(t) === localDay(now)) runs.add(c.run);
67
+ }
68
+ return runs.size;
69
+ }
70
+ function share({ checkedToday: n = 0, startedToday = 0, dailyCap = 40 } = {}) {
71
+ if (n >= SHARE_PER_DAY) return { ok: false, reason: `the Checker has had its ${SHARE_PER_DAY} runs today` };
72
+ if (startedToday >= Math.floor(dailyCap / 2)) return { ok: false, reason: `half of today's ${dailyCap} starts are used; the rest are kept for the Driver and the other jobs` };
73
+ return { ok: true, reason: null };
55
74
  }
56
75
 
57
76
  function promptFor({ target, proposals }) {
@@ -113,4 +132,4 @@ function summary(proposals, checks, cal) {
113
132
  return { pass, flag, label: (cal && cal.label) || 'checked: unverified' };
114
133
  }
115
134
 
116
- module.exports = { FILE, due, promptFor, parse, readChecks, append, calibration, summary, MIN_N, MIN_KAPPA, MIN_TNR };
135
+ module.exports = { FILE, SHARE_PER_DAY, due, share, checkedToday, promptFor, parse, readChecks, append, calibration, summary, MIN_N, MIN_KAPPA, MIN_TNR };
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.331.0",
3
+ "version": "0.333.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pmos-workspace",
9
- "version": "0.331.0",
9
+ "version": "0.333.0",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@xterm/addon-fit": "^0.11.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.331.0",
3
+ "version": "0.333.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,106 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+ /* premium-menu-rows-test.js — a premium menu row grows with its text (bug report 2026-10-20: the initiative switcher and the
4
+ * row's More menu drew a wrapped title over the next row, and the title and description of an action collided).
5
+ * The cause was a fixed row height (height:38px / 42px / 44px) on the menu buttons: a label that wraps to a second line ran
6
+ * out of its row. Every premium menu class is drawn here with long labels, on the real stylesheets, at 390 and 1280 in light
7
+ * and dark. No server: the page is built in the browser and the stylesheets and fonts are served from public/ by a route.
8
+ * R1 each row holds all of its text · R2 no row overlaps the next · R3 a one-line row keeps its old height (no visual drift)
9
+ * The same report named two more: C1 a console sheet on a premium page (the Listen sheet) has the console's colour tokens and plain
10
+ * body text, and H1 a recording highlight keeps its tag ("decision") on one line. */
11
+ const fs = require('fs');
12
+ const path = require('path');
13
+ const { findBrowser } = require('./lib/find-browser');
14
+ const results = [];
15
+ const ok = (name, cond, extra = '') => { results.push({ name, cond: !!cond }); console.log(`${cond ? '✓' : '✗'} ${name}${!cond && extra !== '' ? ' — ' + String(extra).slice(0, 600) : ''}`); };
16
+ const PUB = path.join(__dirname, 'public');
17
+ const ORIGIN = 'http://pmos-menus.test';
18
+ const TYPES = { '.css': 'text/css', '.woff2': 'font/woff2', '.html': 'text/html', '.svg': 'image/svg+xml' };
19
+ const SHEETS = ['pm/premium.css', 'pm/premium-insights.css', 'pm/premium-vw-doc.css', 'pm/premium-vw-rec.css'];
20
+
21
+ const LONG = ['Migration off Okta (tender, award, migration), incl. the Okta CIS renewal runway', 'Inline login for eShop onsite checkout',
22
+ 'MAGW migration to auth-service (Java to Go) — Phase 1 and Phase 2', 'Email OTP'];
23
+ const ACTS = [['Put on hold', 'Pause it; keeps its stage and work'], ['Cancel', 'Stop it for good, with a reason'], ['Archive', 'Out of every list; restore any time']];
24
+ const btns = (L) => L.map((t) => `<button type="button" role="menuitem">${t}</button>`).join('');
25
+ /* each menu as its page draws it (premium-shell.js, premium-acts.js, premium-doc-sheet.js, premium-report-read.js, premium.html,
26
+ * premium-insights.html, premium-vw-doc.js, premium-vw-rec.js) */
27
+ const MENUS = {
28
+ 'crumb switcher (.crmenu)': `<nav class="crumb" style="position:relative;width:120px"><div class="crmenu" role="menu">${btns(LONG)}</div></nav>`,
29
+ 'header More (.crmenu.tbmenu)': `<div style="position:relative;width:120px"><div class="crmenu tbmenu" role="menu" style="left:0;right:auto">${btns(LONG)}</div></div>`,
30
+ 'product picker (.crmenu.pkmenu)': `<span class="pkw" style="position:relative;display:block;width:120px"><div class="crmenu pkmenu" role="menu" style="left:0;right:auto">${LONG.map((t) => `<button type="button" role="menuitemcheckbox" aria-checked="false"><span class="bx"></span>${t}</button>`).join('')}</div></span>`,
31
+ 'row More (.dsmn.bam2)': `<div style="position:relative;width:120px"><div class="dsmn bam2" role="menu" style="left:0;right:auto">${ACTS.map(([l, s]) => `<button type="button" role="menuitem"><span><b>${l}</b><small>${s}</small></span></button>`).join('')}</div></div>`,
32
+ 'document menu (.dsmn)': `<div class="dsvw" style="width:120px"><div class="dsmn" role="menu">${btns(LONG)}</div></div>`,
33
+ 'report menu (.dsmn.rpm)': `<div class="dsvw" style="width:120px"><div class="dsmn rpm" role="menu">${LONG.map((t) => `<button type="button" role="menuitem"><span>${t}<small>${t}</small></span></button>`).join('')}</div></div>`,
34
+ 'insights list (.lmenu)': `<div style="position:relative;width:120px"><div class="lmenu" role="menu">${btns(LONG)}</div></div>`,
35
+ 'viewer popover (.vwpop)': `<div style="position:relative;width:120px"><div class="vwpop" role="menu" style="max-height:none">${LONG.map((t) => `<button type="button" role="menuitem"><span class="ki">D</span><span>${t}</span><kbd>⏎</kbd></button>`).join('')}</div></div>`,
36
+ 'record menu (.recm)': `<div style="position:relative;width:120px"><div class="recm" role="menu" style="left:0;right:auto">${LONG.map((t) => `<button type="button" role="menuitem"><b>${t}</b><small>10:30</small></button>`).join('')}</div></div>`,
37
+ };
38
+ /* the one-line row height each menu had before the fix; a short label must still draw at it */
39
+ const ONE = { '.crmenu': 42, '.crmenu.tbmenu': 44, '.dsmn': 44 };
40
+
41
+ (async () => {
42
+ const exe = findBrowser();
43
+ if (!exe) { console.log('✗ no Chrome/Chromium on this machine — the suite cannot run'); process.exit(1); }
44
+ const { chromium } = require('playwright-core');
45
+ const browser = await chromium.launch({ executablePath: exe });
46
+ const page0 = (menu, theme, extra = []) => `<!doctype html><html data-theme="${theme}"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">${[...SHEETS, ...extra].map((s) => `<link rel="stylesheet" href="/${s}">`).join('')}</head><body><main style="padding:16px;min-height:1400px">${menu}</main></body></html>`;
47
+ try {
48
+ for (const [w, h] of [[390, 844], [1280, 900]]) for (const theme of ['light', 'dark']) {
49
+ const ctx = await browser.newContext({ viewport: { width: w, height: h } });
50
+ await ctx.route(ORIGIN + '/**', (r) => {
51
+ const u = new URL(r.request().url()), f = path.join(PUB, decodeURIComponent(u.pathname));
52
+ if (u.pathname === '/menu.html') return r.fulfill({ status: 200, contentType: 'text/html', body: ctx._html });
53
+ if (!f.startsWith(PUB) || !fs.existsSync(f)) return r.fulfill({ status: 404, body: '' });
54
+ return r.fulfill({ status: 200, contentType: TYPES[path.extname(f)] || 'application/octet-stream', body: fs.readFileSync(f) });
55
+ });
56
+ const page = await ctx.newPage();
57
+ for (const [name, html] of Object.entries(MENUS)) {
58
+ ctx._html = page0(html, theme);
59
+ await page.goto(ORIGIN + '/menu.html');
60
+ await page.evaluate(() => document.fonts.ready);
61
+ const m = await page.evaluate(() => {
62
+ const menu = document.querySelector('[role="menu"]'), rows = [...menu.children].filter((e) => /^(BUTTON|A)$/.test(e.tagName));
63
+ const out = rows.map((b) => {
64
+ const r = b.getBoundingClientRect();
65
+ // every text line inside the row: a range over the row's text gives the line boxes
66
+ const rg = document.createRange(); rg.selectNodeContents(b);
67
+ const lines = [...rg.getClientRects()].filter((x) => x.height > 0);
68
+ const lo = Math.min(...lines.map((x) => x.top)), hi = Math.max(...lines.map((x) => x.bottom));
69
+ return { top: r.top, bottom: r.bottom, h: r.height, lo, hi, n: new Set(lines.map((x) => Math.round(x.top))).size };
70
+ });
71
+ return { rows: out, cls: '.' + menu.className.trim().split(/\s+/).join('.') };
72
+ });
73
+ const tag = `${name} at ${w} ${theme}`;
74
+ const spill = m.rows.filter((r) => r.lo < r.top - 0.5 || r.hi > r.bottom + 0.5);
75
+ ok(`R1 ${tag}: each row holds all of its text`, m.rows.length && !spill.length, JSON.stringify(spill));
76
+ const over = m.rows.slice(1).filter((r, i) => r.top < m.rows[i].bottom - 0.5);
77
+ ok(`R2 ${tag}: no row overlaps the next`, !over.length, JSON.stringify(over));
78
+ }
79
+ // R3: one short label keeps the row height the menu had before
80
+ for (const [cls, px] of Object.entries(ONE)) {
81
+ const k = cls.slice(1).split('.').join(' ');
82
+ ctx._html = page0(`<div class="dsvw" style="position:relative;width:120px"><div class="${k}" role="menu" style="left:0;right:auto"><button type="button" role="menuitem">Short</button></div></div>`, theme);
83
+ await page.goto(ORIGIN + '/menu.html');
84
+ await page.evaluate(() => document.fonts.ready);
85
+ const hh = await page.evaluate(() => document.querySelector('[role="menuitem"]').getBoundingClientRect().height);
86
+ ok(`R3 ${cls} at ${w} ${theme}: a one-line row is still ${px}px tall`, Math.abs(hh - px) < 0.6, hh);
87
+ }
88
+ // C1: a console sheet (c3-sheet.js draws div.c3.c3e.c3pop > .sheet > .sb > .brief.sbb) reads the console tokens and plain text
89
+ ctx._html = page0('<div class="c3 c3e c3pop"><div class="sheet bs"><div class="sb"><div class="brief sbb"><p class="lsn-help">Pick the meeting window.</p><span class="tag">only this window</span></div></div></div></div>', theme, ['pm/console3.css']);
90
+ await page.goto(ORIGIN + '/menu.html');
91
+ const c1 = await page.evaluate(() => { const t = getComputedStyle(document.querySelector('.tag')), p = getComputedStyle(document.querySelector('.lsn-help')), c = getComputedStyle(document.querySelector('.c3'));
92
+ return { tag: t.backgroundColor, fs: p.fontSize, muted: c.getPropertyValue('--muted').trim(), fg: c.getPropertyValue('--foreground').trim() }; });
93
+ ok(`C1 a console sheet at ${w} ${theme}: its tokens are set, a tag has a fill and the body is 14px text`, c1.muted && c1.fg && !/rgba\(0, 0, 0, 0\)|transparent/.test(c1.tag) && c1.fs === '14px', JSON.stringify(c1));
94
+ // H1: a long highlight keeps its tag on one line
95
+ ctx._html = page0(`<section class="rvsec" style="overflow-wrap:anywhere;max-width:${Math.min(w - 32, 560)}px"><ul class="rvhl"><li><time>0:00</time><span>${LONG.join(' ').repeat(3)}</span><em>decision</em></li></ul></section>`, theme);
96
+ await page.goto(ORIGIN + '/menu.html');
97
+ await page.evaluate(() => document.fonts.ready);
98
+ const h1 = await page.evaluate(() => { const e = document.querySelector('.rvhl em'), rg = document.createRange(); rg.selectNodeContents(e); return new Set([...rg.getClientRects()].map((r) => Math.round(r.top))).size; });
99
+ ok(`H1 a long highlight at ${w} ${theme} keeps its tag on one line`, h1 === 1, h1 + ' lines');
100
+ await ctx.close();
101
+ }
102
+ } finally { await browser.close().catch(() => {}); }
103
+ const bad = results.filter((x) => !x.cond).length;
104
+ console.log(`\n${results.length - bad}/${results.length} premium-menu-rows assertions passed`);
105
+ process.exit(bad ? 1 : 0);
106
+ })().catch((e) => { console.error(e); process.exit(1); });
@@ -12,7 +12,7 @@
12
12
  import { el } from './dom.js';
13
13
  import { button } from './primitives.js';
14
14
  import { openSheet, closeSheet } from './c3-sheet.js';
15
- import { icon, sect, pbtn, plural } from './c3-ini-ui.js';
15
+ import { icon, sect, pbtn, plural, ensureIniCss } from './c3-ini-ui.js';
16
16
  import { APPS, planListen, rowsOf, recall, remember } from './listen-sources.js';
17
17
  import { ensureListenCss } from './notes-shots.js';
18
18
 
@@ -27,7 +27,7 @@ function row(r, act) {
27
27
  }
28
28
 
29
29
  export function askListen({ shots = true } = {}) {
30
- ensureListenCss();
30
+ ensureListenCss(); ensureIniCss(); // its buttons and rows are the console's (components.css, c3-initiatives.css), which a premium page does not load on its own
31
31
  return new Promise((resolve) => {
32
32
  const c = recall(store());
33
33
  if (!shots) c.shots = false;
@@ -74,7 +74,7 @@ export function askListen({ shots = true } = {}) {
74
74
 
75
75
  /** The second share. The button makes the browser call itself, because that call needs a press of its own. */
76
76
  export function askWindow(getStream) {
77
- ensureListenCss();
77
+ ensureListenCss(); ensureIniCss(); // its buttons and rows are the console's (components.css, c3-initiatives.css), which a premium page does not load on its own
78
78
  return new Promise((resolve) => {
79
79
  let done = false;
80
80
  const finish = (v) => { if (done) return; done = true; resolve(v); };
@@ -41,10 +41,17 @@ export function briefNeeds(b, page, agent) {
41
41
  return { decisions, own, agentN: ordered.filter((x) => x.src === 'agent').length, ordered };
42
42
  }
43
43
 
44
+ /** The driver target a drafts row is about, from its run id (lib/driver-needs.js: driver-needs:<drafts|blocked>:<kind>:<ws>:<id>). null when it does not parse. */
45
+ export function propTarget(r) {
46
+ const m = /:(?:drafts|blocked):(initiative|work):([^:]*):(.+)$/.exec(String((r && r.run_id) || ''));
47
+ if (m) return { kind: m[1], ws: m[2] || null, id: m[3] };
48
+ return r && r.initiative_id ? { kind: 'initiative', ws: r.ws || null, id: r.initiative_id } : null;
49
+ }
44
50
  const lateWord = (d) => (d === 1 ? '1 day late' : d + ' days late');
45
51
  const factText = (f) => (f && typeof f === 'object' ? f.text : f);
46
52
  /** One row of "What you need to do" from one row of the console's Needs you. A row says only what the console row's own data says:
47
- * no "If you skip" line (no record holds one). go: where a press goes, the item's own page; null opens the Briefing's dialog. */
53
+ * no "If you skip" line (no record holds one). go: where a press goes, the item's own page; null opens the Briefing's dialog.
54
+ * prop: on a driver drafts row, the target whose proposals the Briefing's Agent proposals dialog shows. */
48
55
  export function needsRowOf(x, ws) {
49
56
  const r = x.raw, q = (k, v) => k + '=' + encodeURIComponent(v);
50
57
  if (x.src === 'own') {
@@ -54,10 +61,15 @@ export function needsRowOf(x, ws) {
54
61
  go: r.id ? '/premium-work.html?' + [q('item', r.id), ws ? q('ws', ws) : ''].filter(Boolean).join('&') : null };
55
62
  }
56
63
  if (x.src === 'agent') {
57
- const blocked = r.kind === 'driver-blocked', ini = r.initiative_id || '';
58
- return { key: 'agent:' + r.run_id, src: 'agent', title: r.question || '', subject: ['From the agent', blocked ? 'waiting on you' : 'drafts to review', ini].filter(Boolean).join(' · '),
59
- prepared: blocked ? 'The agent will not go on until you decide.' : r.kind === 'core-doc-drafts' ? 'Review each draft, then issue it.' : 'Keep, send back or drop each draft.',
60
- go: ini ? '/premium-initiative.html?' + [q('id', ini), r.ws ? q('ws', r.ws) : ''].filter(Boolean).join('&') : '/console.html' };
64
+ const blocked = r.kind === 'driver-blocked', docs = r.kind === 'core-doc-drafts', ini = r.initiative_id || '';
65
+ const row = { key: 'agent:' + r.run_id, src: 'agent', title: r.question || '', subject: ['From the agent', blocked ? 'waiting on you' : 'drafts to review', ini].filter(Boolean).join(' · '),
66
+ prepared: blocked ? 'The agent will not go on until you decide.' : docs ? 'Review each draft, then issue it.' : 'Keep, send back or drop each draft.', go: null };
67
+ if (!docs) return { ...row, prop: propTarget(r) }; // the driver's drafts open the Briefing's own Agent proposals dialog, that target's only
68
+ const wsQ = r.ws || ws;
69
+ row.go = ini ? '/premium-initiative.html?' + [q('id', ini), wsQ ? q('ws', wsQ) : ''].filter(Boolean).join('&')
70
+ : r.board ? '/premium-board.html?' + [wsQ ? q('ws', wsQ) : '', q('board', r.board)].filter(Boolean).join('&')
71
+ : '/console.html'; // portfolio documents: no premium page holds them yet
72
+ return row;
61
73
  }
62
74
  const v = r.view || null;
63
75
  const facts = v ? v.facts : (r.facts || []).map(factText).filter(Boolean);
@@ -569,7 +569,9 @@ function updWhatsNew(U) {
569
569
  const open = U.open.has(g.k) || (i === 0 && !U.shut.has(g.k)), full = U.full.has(g.k);
570
570
  const rows = open ? g.e.slice(0, full ? g.e.length : 5).map((e) => {
571
571
  const newer = mine && cmpVer(e.v, mine) > 0, yours = mine && e.v === mine;
572
- const lines = e.prs.length ? e.prs.map((p) => `<p>${esc(p.s)}${p.n ? ` <em>#${esc(p.n)}</em>` : ''}</p>`).join('') : '<p class="note">No summary was recorded for this kit.</p>';
572
+ const lines = e.prs.length ? e.prs.map((p) => (p.t && p.t !== p.s
573
+ ? `<p><b>${esc(p.t)}</b>${p.n ? ` <em>#${esc(p.n)}</em>` : ''}<span class="ks">${esc(p.s)}</span></p>`
574
+ : `<p>${esc(p.s)}${p.n ? ` <em>#${esc(p.n)}</em>` : ''}</p>`)).join('') : '<p class="note">No summary was recorded for this kit.</p>';
573
575
  return `<li class="kver${newer ? ' new' : ''}"><span class="kv"><b>${esc(e.v)}</b>${yours ? '<i>yours</i>' : newer ? '<i class="nw">newer</i>' : ''}<em>${esc(updTime(e.at))}</em></span><div class="kp">${lines}</div></li>`;
574
576
  }).join('') : '';
575
577
  const more = open && !full && g.e.length > 5 ? `<button type="button" class="kmore" data-kfull="${esc(g.k)}">Show ${g.e.length - 5} more from ${esc(g.k.split(',')[0])}</button>` : '';
@@ -73,3 +73,6 @@
73
73
  .fvst b{display:block;font-weight:600;font-size:var(--fs-2);overflow-wrap:anywhere}
74
74
  .fvst small{font-size:var(--fs-1);color:var(--ink-3)}
75
75
  @media (max-width:700px){.fvg{grid-template-columns:1fr}.recb span{display:none}}
76
+ /* a long highlight keeps its tag on one line (bug 2026-10-20: "decision" broke one letter per line) */
77
+ .rvhl li>span{flex:1 1 auto;min-width:0}
78
+ .rvhl em{flex:none;white-space:nowrap}
@@ -2104,6 +2104,24 @@ button.wl-row[aria-pressed="true"] .wl-tog{background:var(--solid);color:var(--o
2104
2104
  .kv i{justify-self:start;font:600 var(--fs-1) var(--mono);font-style:normal;padding:0 7px;border-radius:999px;border:1px solid var(--hair);color:var(--ink-2)}
2105
2105
  .kv i.nw{border-color:transparent;background:var(--spot);color:var(--ember-ink)}
2106
2106
  .kv em{font:500 var(--fs-2) var(--mono);font-style:normal;color:var(--ink-3)}
2107
- .kp{display:grid;gap:6px;min-width:0;overflow-wrap:anywhere}.doc .kp p{margin:0;color:var(--ink);max-width:none;line-height:1.5}.kp p em{font:500 var(--fs-2) var(--mono);font-style:normal;color:var(--ink-3)}
2107
+ .kp{display:grid;gap:6px;min-width:0;overflow-wrap:anywhere}.doc .kp p{margin:0;color:var(--ink);max-width:none;line-height:1.5}.kp p em{font:500 var(--fs-2) var(--mono);font-style:normal;color:var(--ink-3)}.kp p b{font-weight:600}.kp .ks{display:block;color:var(--ink-2)}
2108
2108
  .kmore{min-height:44px;font-weight:600;color:var(--ink-2)}
2109
2109
  @media (max-width:640px){.doc .kver{grid-template-columns:minmax(0,1fr)}.kv{grid-auto-flow:column;justify-content:start;align-items:center;gap:8px}}
2110
+
2111
+ /* ── menu rows grow with their text (bug 2026-10-20). A fixed row height (38, 42 or 44px) let a label that wraps run over the next
2112
+ * row, and the title and description of an action collide. The one-line height stays as the row's minimum. premium-menu-rows-test.js ── */
2113
+ .crmenu>button,.crmenu>a{height:auto;min-height:42px;padding-top:8px;padding-bottom:8px;line-height:1.35}
2114
+ .crmenu.tbmenu>button,.crmenu.tbmenu>a{height:auto;min-height:44px}
2115
+ .dsmn>button,.dsmn>a{height:auto;padding-top:9px;padding-bottom:9px;line-height:1.35}
2116
+ .dsmn.bam2>button{padding:8px 12px}
2117
+ .lmenu>button{padding-top:8px;padding-bottom:8px;line-height:1.35}
2118
+
2119
+ /* ── a console part on a premium page (the Listen sheet, any .c3 sheet): the console stylesheets read the console's colour tokens
2120
+ * (tokens.css), which a premium page does not load, so its chips, tags and buttons drew with no colour. Map them onto the premium tokens. ── */
2121
+ :root .c3{--background:var(--card-solid);--foreground:var(--ink);--card:var(--card-solid);--secondary:var(--well);--muted:var(--well);--muted-foreground:var(--ink-3);
2122
+ --accent:var(--well);--border:color-mix(in oklab,var(--ink) 12%,transparent);--input:color-mix(in oklab,var(--ink) 14%,transparent);--ring:var(--ink-3);--sidebar:var(--well);
2123
+ --primary:var(--solid);--primary-foreground:var(--on-solid);--on-accent:var(--on-solid);--brand-mark:var(--ink);--brand:var(--ink);
2124
+ --brand-wash:color-mix(in oklab,var(--ink) 8%,transparent);--success:var(--ok);--good:var(--ok);--warning:var(--ember-ink);--destructive:var(--bad);
2125
+ --acc:var(--ink);--accw:var(--well);--sh1:var(--card-shadow);--sh2:var(--card-shadow);--sh3:var(--card-shadow);--hi:none}
2126
+ /* the console sheet's body is .brief, which is the premium hero sentence here: give it back the console's plain text */
2127
+ :root .c3 .brief{margin-top:0;max-width:none;font-size:inherit;line-height:inherit;font-weight:inherit;letter-spacing:normal;color:inherit;text-wrap:wrap;transform:none;will-change:auto}
@@ -101,7 +101,8 @@ $('#rank').addEventListener('click', (e) => {
101
101
  const h = e.target.closest('.rhd');
102
102
  if (!h) return;
103
103
  const r = LIST().rows.find((x) => x.key === h.closest('.rr').dataset.key);
104
- if (r && r.go) { location.assign(r.go); return; } // a console row opens its item on its own page: My work, the initiative, or the console
104
+ if (r && r.prop) { openPropsDlg(r.prop); return; } // the agent's drafts: the Agent proposals dialog, that target's proposals only
105
+ if (r && r.go) { location.assign(r.go); return; } // a console row opens its item on its own page: My work, the initiative or the board
105
106
  openRow(r);
106
107
  });
107
108
 
@@ -592,14 +593,20 @@ function propItem(it) {
592
593
  } else act = bdActs(bdBtn('Keep', 'pkeep', id), bdBtn('Send back', 'pnote', id, true), bdBtn('Drop', 'pdrop', id, true)) + `<p class="bd-why">${esc(pKeep(p))} Drop counts as a correction. None of the three can be undone.</p>` + bdFail(id, PERR);
593
594
  return `<div class="bd-it${d ? ' decided' : ''}" data-id="${esc(id)}"><div class="bd-h">${bdChip(pWhat(p))}${it.pname ? bdChip(it.pname, 'mono') : ''}</div><span class="bd-t">${esc(targetOf(it))}</span>${text ? `<p class="bd-q">${esc(text)}</p>` : ''}${p.why ? `<p class="bd-why">Why: ${esc(p.why)}</p>` : ''}${src ? `<p class="bd-why">Sources: ${src}</p>` : ''}${act}</div>`;
594
595
  }
596
+ /* PFOCUS: the one target a "What you need to do" row opened the dialog on ({ kind, ws, id }), or null for every proposal. Show all clears it. */
597
+ let PFOCUS = null;
598
+ const inFocus = (it) => !PFOCUS || (it.kind === PFOCUS.kind && it.tid === PFOCUS.id && (!PFOCUS.ws || it.ws === PFOCUS.ws));
595
599
  function propsHtml() {
596
600
  const a = A.prop; if (!a.ok) return `<p class="nodef err" role="alert">Agent proposals ${esc(said(a))}</p>`;
597
- const L = a.items.concat([...DEC.values()].map((d) => d.item).filter((it) => !a.items.some((o) => o.id === it.id)));
598
- return (L.length ? `<p class="bd-top">${a.items.length ? pl(a.items.length, 'proposal waits', 'proposals wait') + ' for you.' : 'All decided.'} The agent drafts and asks you. Nothing it wrote has changed a record until you keep it.</p><div class="bd-list">${L.map(propItem).join('')}</div>` : `<p class="empty3">${CHECK}No agent proposals wait.</p>`)
601
+ const all = a.items.concat([...DEC.values()].map((d) => d.item).filter((it) => !a.items.some((o) => o.id === it.id)));
602
+ const L = all.filter(inFocus), open = a.items.filter(inFocus).length, rest = PFOCUS ? a.items.length - open : 0;
603
+ const more = PFOCUS ? bdActs(bdBtn('Show all proposals', 'pall', null, true)) + (rest ? `<p class="bd-why">${pl(rest, 'more proposal waits', 'more proposals wait')} on other work.</p>` : '') : '';
604
+ return (L.length ? `<p class="bd-top">${open ? pl(open, 'proposal waits', 'proposals wait') + ' for you.' : 'All decided.'} The agent drafts and asks you. Nothing it wrote has changed a record until you keep it.</p><div class="bd-list">${L.map(propItem).join('')}</div>` : `<p class="empty3">${CHECK}${PFOCUS ? 'No proposal waits on this one. It may have been decided since the list was read.' : 'No agent proposals wait.'}</p>`) + more
599
605
  + (a.errs.length ? `<p class="note">Not read: ${esc(a.errs[0])}</p>` : '') + '<p class="note">The agent mode (Off, Shadow, Approve) stays in the console. This list shows a kind only when its mode is Approve.</p>';
600
606
  }
601
607
  async function propPress(e, redraw) {
602
608
  const b = e.target.closest('[data-bda]'); if (!b || BUSY) return;
609
+ if (b.dataset.bda === 'pall') { PFOCUS = null; redraw(); return; }
603
610
  const act = b.dataset.bda, id = b.dataset.id, it = openProps().find((x) => x.id === id);
604
611
  if (!it) return;
605
612
  if (act === 'pnote') { PBACK.add(id); redraw(`[data-bdn="${CSS.escape(id)}"]`); return; }
@@ -615,8 +622,10 @@ async function propPress(e, redraw) {
615
622
  toast(act === 'pkeep' ? 'Kept.' : act === 'pback' ? 'Sent back with your note.' : 'Dropped. It counts as a correction.');
616
623
  await readAll(['prop']); redraw(`.bd-it[data-id="${CSS.escape(id)}"] .bd-done`);
617
624
  }
618
- const openPropsDlg = () => {
619
- const n = openProps().length;
625
+ const openPropsDlg = async (focus) => {
626
+ PFOCUS = focus && focus.kind && focus.id ? focus : null;
627
+ if (PFOCUS && !A.prop) await readAll(['prop']); // pressed before Around you has read: read the proposals first
628
+ const n = openProps().filter(inFocus).length;
620
629
  bdDlg('prop', 'Agent proposals · real data', 'Agent proposals', 'The Initiative Driver, read from each product\'s ledger',
621
630
  A.prop && A.prop.ok ? (n ? pl(n, 'proposal waits', 'proposals wait') + ' for you. Keep one to record it, send it back with a note, or drop it.' : 'No proposal waits for you.') : 'The proposals could not be read.', propsHtml, propPress,
622
631
  (e) => { const t = e.target.closest('[data-bdn]'); if (!t) return; PNOTE[t.dataset.bdn] = t.value; const k = $(`[data-bda="pback"][data-id="${CSS.escape(t.dataset.bdn)}"]`, $('#oMain')); if (k) k.disabled = !t.value.trim(); });
@@ -2640,7 +2640,9 @@ const orchCheckTick = () => {
2640
2640
  for (const w of workspaces.values()) {
2641
2641
  let dir; try { dir = D.stateDirOf(w.root); } catch { dir = null; }
2642
2642
  if (!dir) continue;
2643
- let todo; try { todo = C.due(D.fold(D.readLines(D.ledgerFile(dir))), C.readChecks(dir)); } catch (e) { warnWriteFail('checker read', e); continue; }
2643
+ let todo, checks; try { checks = C.readChecks(dir); todo = C.due(D.fold(D.readLines(D.ledgerFile(dir))), checks); } catch (e) { warnWriteFail('checker read', e); continue; }
2644
+ // the Checker's share of the daily cap (lib/orchestrator-checker.js share): it never spends the starts the Driver and the jobs need
2645
+ if (todo.length) { const st = orchGate.status({}); if (!C.share({ checkedToday: C.checkedToday(checks) + orchChecking.size, startedToday: st.startedToday, dailyCap: (st.settings && st.settings.dailyCap) || 40 }).ok) return; }
2644
2646
  const job = todo.find((j) => !orchChecking.has(j.run));
2645
2647
  if (!job) continue;
2646
2648
  const ids = job.proposals.map((p) => p.id);
@@ -0,0 +1,9 @@
1
+ {
2
+ "_comment": "Bug 2026-10-20 (broken UI): premium menu rows grow with their text, a console sheet on a premium page has the console's colours, and a recording highlight keeps its tag on one line. No server: built in the browser on the real stylesheets.",
3
+ "panels": [
4
+ "premium-menu-rows-test.js"
5
+ ],
6
+ "seconds": {
7
+ "premium-menu-rows-test.js": 20
8
+ }
9
+ }