create-pmos 0.347.0 → 0.348.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-pmos",
3
- "version": "0.347.0",
3
+ "version": "0.348.0",
4
4
  "description": "Scaffold the PMOS portable kit — run the PMOS product-management workflow (initiative → lane-fit spec → contract → build → three gates, with work-type lanes for features, research, maintenance, incidents, and content) entirely inside your own repo, with all state as git-versioned files. Includes `workflow-sweep`, which audits the state every board derives from and separates real defects from work you simply have not done. `create-pmos workspace` also installs + launches the local Terminal Workspace GUI. No database, no network, no telemetry.",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -32,6 +32,23 @@
32
32
  "audit"
33
33
  ],
34
34
  "pmosChanges": [
35
+ {
36
+ "v": "0.348.0",
37
+ "at": "2026-10-20T06:24:40.333Z",
38
+ "f": 2,
39
+ "prs": [
40
+ {
41
+ "n": 948,
42
+ "t": "The Agent proposals dialog shows one card per proposal and one bottom bar",
43
+ "s": "Each proposal is one card with what it is, its target and the draft in two lines, plus Read more for the why and the sources."
44
+ },
45
+ {
46
+ "n": 950,
47
+ "t": "Premium explanations fold behind one info button",
48
+ "s": "Each of those sits behind one ⓘ, with the words unchanged."
49
+ }
50
+ ]
51
+ },
35
52
  {
36
53
  "v": "0.347.0",
37
54
  "at": "2026-10-20T06:13:15.916Z",
@@ -279,18 +296,6 @@
279
296
  "s": "The page opens with an insight: the strongest finding across the board's measures, the reason with its numbers, two more findings, and Ask PMOS why / See the chart."
280
297
  }
281
298
  ]
282
- },
283
- {
284
- "v": "0.328.0",
285
- "at": "2026-10-19T23:33:48.003Z",
286
- "f": 2,
287
- "prs": [
288
- {
289
- "n": 915,
290
- "t": "Confluence and Google Doc pages in the premium viewer, with Read it now",
291
- "s": "Both open as a tab in the premium viewer, showing only what PMOS holds."
292
- }
293
- ]
294
299
  }
295
300
  ]
296
301
  }
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@01fb46aa
1
+ kernel-source: pmos@d3097286
2
2
  assembled: 2026-10-20
3
3
  mode: vendor
@@ -2,7 +2,7 @@
2
2
  type: Reference
3
3
  title: "Eval calibration log"
4
4
  description: "Append-only record of every PM override of an evaluator verdict."
5
- generated: {by: process:create-pmos, at: "2026-10-20T06:13:12Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-20T06:24:37Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -2,7 +2,7 @@
2
2
  type: Reference
3
3
  title: "Health budgets"
4
4
  description: "Closed registry of health-budget anchors (D59), edited only by the PM."
5
- generated: {by: process:create-pmos, at: "2026-10-20T06:13:12Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-20T06:24:37Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -2,7 +2,7 @@
2
2
  type: Reference
3
3
  title: "Discoveries and friction log"
4
4
  description: "Append-only record of what runs discovered and where the process rubbed."
5
- generated: {by: process:create-pmos, at: "2026-10-20T06:13:12Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-20T06:24:37Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -545,7 +545,7 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
545
545
  await cp.locator('#pvList .ib-bun').first().click();
546
546
  await until(() => cp.evaluate(() => document.querySelector('#dlg').classList.contains('on') && document.querySelectorAll('#oMain .bd-it').length > 0));
547
547
  const pd = await cp.evaluate(() => ({ path: location.pathname, title: document.querySelector('#dTitle').textContent, ids: [...document.querySelectorAll('#oMain .bd-it')].map((x) => x.dataset.id), keep: !!document.querySelector('#oMain [data-bda="pkeep"]'), all: !!document.querySelector('#oMain [data-bda="pall"]') }));
548
- ok('C8 a piece of work in the bell opens Agent proposals on the Briefing with that initiative\'s drafts only', pd.path === '/premium.html' && pd.title === 'Agent proposals' && pd.ids.join() === 'p1,p2' && pd.keep && pd.all, JSON.stringify(pd));
548
+ ok('C8 a piece of work in the bell opens Agent proposals on the Briefing with that initiative\'s drafts only', pd.path === '/premium.html' && pd.title === '2 wait for you' && pd.ids.join() === 'p1,p2' && pd.keep && pd.all, JSON.stringify(pd));
549
549
  await cp.locator('#oMain [data-bda="pall"]').click();
550
550
  ok('C9 Show all proposals lists every proposal', await until(() => cp.evaluate(() => [...document.querySelectorAll('#oMain .bd-it')].map((x) => x.dataset.id).sort().join() === 'p1,p2,p3')));
551
551
  await cp.keyboard.press('Escape');
@@ -1,4 +1,21 @@
1
1
  [
2
+ {
3
+ "v": "0.348.0",
4
+ "at": "2026-10-20T06:24:40.333Z",
5
+ "f": 2,
6
+ "prs": [
7
+ {
8
+ "n": 948,
9
+ "t": "The Agent proposals dialog shows one card per proposal and one bottom bar",
10
+ "s": "Each proposal is one card with what it is, its target and the draft in two lines, plus Read more for the why and the sources."
11
+ },
12
+ {
13
+ "n": 950,
14
+ "t": "Premium explanations fold behind one info button",
15
+ "s": "Each of those sits behind one ⓘ, with the words unchanged."
16
+ }
17
+ ]
18
+ },
2
19
  {
3
20
  "v": "0.347.0",
4
21
  "at": "2026-10-20T06:13:15.916Z",
@@ -74,7 +74,7 @@ The bell reads `GET /api/inbox`. The only thing it writes is your seen marks, in
74
74
  The Initiative Driver's rows ("Agent has 4 drafts on <initiative>" and "<initiative> is waiting on you: the drafts are 6 days old") are read from each included product's Driver ledger. They are in the bell, and a Session press opens one. Nothing is recorded from these rows.
75
75
 
76
76
  - **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.
77
- - **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.
77
+ - **Pressing a row** opens Around you's Agent proposals on the Briefing, with only that initiative's or Work item's drafts. The **more on other work** row lists every one. A row never opens the console.
78
78
  - **Core-document drafts** open the initiative page or the Board page that holds the documents. Portfolio drafts open in the document sheet on the Briefing, with **Issue it** and **Draft it again**, the same sheet the Board page uses.
79
79
 
80
80
  ## How long it takes to load
@@ -167,7 +167,7 @@ Not built in premium: translation, Present and the slides stage, Ask PMOS quietl
167
167
 
168
168
  Under Today, the **Around you** card holds what the agents and the outside world have left for you. It has six rows. A row opens a dialog and states what it found in one line. The caption says how many rows wait on you, or "quiet". If a source cannot be read, its row says so and gives the reason. It never reads as empty.
169
169
 
170
- - **Agent proposals.** Every open draft of the Initiative Driver, for initiatives and for Work items, when the agent mode for that kind is Approve. **Keep** records that you accept it and applies it (a problem statement, a stage move, a next step). **Send back** needs a note and starts a new run. **Drop** counts as a correction. None of the three can be undone. A decided proposal stays in the list and says what was recorded.
170
+ - **Agent proposals.** Every open draft of the Initiative Driver, for initiatives and for Work items, when the agent mode for that kind is Approve. Each draft is one card: what it is, its target, and the draft in two lines, with **Read more** for the why and the sources. Press a card to choose it. The bar at the bottom acts on the chosen card. **Keep** is the main press, and **Send back** and **Drop** sit next to it. The notes about undo and the agent mode are behind the ⓘ line. **Keep** records that you accept it and applies it (a problem statement, a stage move, a next step). **Send back** needs a note and starts a new run. **Drop** counts as a correction. None of the three can be undone. A decided proposal stays in the list and says what was recorded.
171
171
  - **Mentions.** The people who named you in Slack, Jira, Confluence or mail, from today's morning brief. The row names who waits on a reply. **Make it a task** adds one Work item. **Mark read** hides the mention, and **Mark unread** brings it back. **Open in Slack** (or Jira, Confluence, mail) opens the original in a new tab. Nothing here replies, reacts or posts. The Mentions dialog has no question box, because a mention has no agent thread.
172
172
  - **Portfolio pulse.** How many initiatives are late or at risk, by the Calendar's own status: the promised date against the forecast, or the Jira read. It is read only and it is not a forecast of its own. **Open the initiative** goes to its page.
173
173
  - **Horizon scan.** When the scan last ran, when it runs next, its reports and their proposals. Each proposal says what **Approve** does before you press it. **Dismiss** asks for a reason and counts as a correction, and **Undo** takes a dismissal back. **Scan now** starts an agent that reads the public web and the repository, and says how many manual scans are left. The row on the card says it too, before you open the dialog. A scan that is switched off says so and the button stays off.
@@ -364,6 +364,8 @@ The premium Briefing is the default page: `/` and `/index.html` open it. The con
364
364
 
365
365
  On a phone or tablet (under 1000 px) every dialog opens on **Detail**. On a touch screen every text field, the reply box included, uses 16 px type, so typing in one does not zoom the page. A card's label and value rows (for example **Blocked at** and **Initiative** in "The way through") stay as two columns, one row per label. A **Detail / Conversation** switch sits under the title, and **Open it** at the foot of Detail brings the conversation when an action waits there. The header holds only **Close**. A document sheet picks its view (**Read**, **Edit**, **Proposals**, **Edit log**, **Health**, **Relations**) from one button with a menu.
366
366
 
367
+ **ⓘ explanations.** The text that says what a page or card reads and records sits behind one ⓘ button, with the same words. Each premium page (Briefing, My work, Board, Initiative, Insights) ends with **ⓘ About this page**. The Board's **Metrics** card and the Insights **Board measures** card show only their need-a-look count, for example "2 of 4 need a look.", with an ⓘ next to the heading. If the measures cannot be read, the reason stays in view. On Insights, the Ask line and the chart count have their own ⓘ. Press ⓘ again to fold the text away.
368
+
367
369
  A dialog's detail panel opens with the record's path, its heading and one lead line. A decision's evidence reads as a list. A measure's dialog draws the measure's chart above its facts and readings.
368
370
 
369
371
  A calendar meeting's panel follows the mockup's Design review panel: the title with a status chip (when it starts, on now, or done), **Focus** and **Record**, **Prepared for you** (what it is about, people, material and the last meeting, each Ready only when PMOS holds that record), **Material** with **Add material**, **Previous meetings** and **Topics**. What Record and Focus do is one press away under **What Record does** and **What Focus reads**.
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.347.0",
3
+ "version": "0.348.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pmos-workspace",
9
- "version": "0.347.0",
9
+ "version": "0.348.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.347.0",
3
+ "version": "0.348.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",
@@ -118,13 +118,22 @@ const GANTT = [
118
118
  const ptxt = await body();
119
119
  ok('A1 the dialog shows what each proposal is, its target, its draft and its why', /Problem statement/.test(ptxt) && /Move to Plan/.test(ptxt) && /Next step/.test(ptxt) && /Initiative · Partner API onboarding/.test(ptxt) && /Work · Send the partner onboarding list to Lina/.test(ptxt) && /New partners wait 9 days/.test(ptxt) && /Why: first draft from the Jira threads/.test(ptxt), ptxt);
120
120
  await shot('props-1280-light');
121
- await click(`.bd-it[data-id="${P1}"] [data-bda="pkeep"]`);
121
+ const pq = await p.evaluate(() => ({ title: document.querySelector('#dTitle').textContent, cards: document.querySelectorAll('#oMain .pcard').length, prim: [...document.querySelectorAll('#oMain .pc-bar .pc-p')].map((b) => b.textContent), quiet: [...document.querySelectorAll('#oMain .pc-bar .pc-q')].map((b) => b.textContent), on: (document.querySelector('#oMain .pcard.on') || {}).dataset?.id, notes: document.querySelector('#pcNotes').hidden, keepIn: !!document.querySelector('#oMain .pcard [data-bda="pkeep"]') }));
122
+ ok('A1b one card per proposal, the title counts them, and the bottom bar holds Keep as the only primary with Send back and Drop quiet', pq.title === '3 wait for you' && pq.cards === 3 && pq.prim.join() === 'Keep' && pq.quiet.join() === 'Send back,Drop' && pq.on === P1 && !pq.keepIn, JSON.stringify(pq));
123
+ ok('A1c the undo and mode notes sit behind the ⓘ line', pq.notes === true && /Nothing changes a record until you keep it/.test(ptxt));
124
+ await click('#oMain [data-bda="pinfo"]');
125
+ ok('A1d the ⓘ line opens the notes', await until(() => p.evaluate(() => !document.querySelector('#pcNotes').hidden && /None of the three can be undone/.test(document.querySelector('#pcNotes').textContent) && /agent mode/.test(document.querySelector('#pcNotes').textContent))));
126
+ await click(`#oMain .pcard[data-id="${P3}"]`);
127
+ ok('A1e pressing a card chooses it for the bottom bar', await until(() => p.evaluate((id) => document.querySelector('#oMain .pcard.on').dataset.id === id && document.querySelector('#oMain .pc-bar [data-bda="pkeep"]').dataset.id === id, P3)));
128
+ await click(`#oMain .pcard[data-id="${P1}"] [data-bda="psel"]`);
129
+ await click(`.pc-bar [data-bda="pkeep"][data-id="${P1}"]`);
122
130
  await until(() => posts.some((x) => x.path === '/api/driver/keep'));
123
131
  const keep = posts.find((x) => x.path === '/api/driver/keep');
124
132
  ok('A2 Keep posts one keep for that proposal and the ledger holds it', keep && keep.body.proposal === P1 && keep.body.ws === ws, JSON.stringify(keep));
125
133
  await until(() => p.evaluate((id) => /Kept\./.test((document.querySelector(`.bd-it[data-id="${id}"] .bd-done`) || {}).textContent || ''), P1));
126
134
  ok('A3 the proposal stays, marked Kept, and says what was recorded', /Kept\. /.test(await p.evaluate((id) => document.querySelector(`.bd-it[data-id="${id}"]`).textContent, P1)));
127
- await click(`.bd-it[data-id="${P2}"] [data-bda="pnote"]`);
135
+ await click(`#oMain .pcard[data-id="${P2}"]`);
136
+ await click(`.pc-bar [data-bda="pnote"][data-id="${P2}"]`);
128
137
  const backBtn = () => p.evaluate((id) => { const b = document.querySelector(`[data-bda="pback"][data-id="${id}"]`); return b ? b.disabled : null; }, P2);
129
138
  ok('A4 Send back opens a note box and the press is off until there is a note', await backBtn() === true);
130
139
  const before = posts.length;
@@ -137,7 +146,8 @@ const GANTT = [
137
146
  await until(() => posts.some((x) => x.path === '/api/driver/return'));
138
147
  const ret = posts.find((x) => x.path === '/api/driver/return');
139
148
  ok('A7 Send back posts return with the note', ret && ret.body.proposal === P2 && ret.body.note === 'Wait until the evidence is in.', JSON.stringify(ret));
140
- await click(`.bd-it[data-id="${P3}"] [data-bda="pdrop"]`);
149
+ await click(`#oMain .pcard[data-id="${P3}"]`);
150
+ await click(`.pc-bar [data-bda="pdrop"][data-id="${P3}"]`);
141
151
  await until(() => posts.some((x) => x.path === '/api/driver/drop'));
142
152
  ok('A8 Drop posts drop and says it counts as a correction', posts.some((x) => x.path === '/api/driver/drop' && x.body.proposal === P3) && await until(() => body().then((t) => /Dropped\. It counts as a correction/.test(t))), await body());
143
153
  const open1 = (await (await fetch(`${F.BASE}/api/driver/open?target_kind=initiative&ws=${ws}`)).json()).targets || {};
@@ -352,6 +362,30 @@ const GANTT = [
352
362
  ok('L4 in the dark theme the card has a background of its own', raw[0] !== 'rgba(0, 0, 0, 0)' && raw[0] !== raw[1] || raw[0] !== '', raw.join());
353
363
  const focus = await p.evaluate(() => { const b = document.querySelector('#aroundBody [data-bd]'); b.focus(); const c = getComputedStyle(b); return [c.outlineStyle, c.outlineWidth, c.boxShadow]; });
354
364
  ok('L5 a row shows a focus ring', focus[0] !== 'none' || focus[2] !== 'none', focus.join());
365
+ /* K: the simple Agent proposals dialog at 390, light and dark, and with the phone keyboard open */
366
+ const P4 = 'p-bbbbbbbb04', P5 = 'p-bbbbbbbb05';
367
+ prop(P4, tI, 'problem', { text: 'Partners wait on a manual key handover that takes three days and two emails between support and the partner engineer, which is longer than the whole sandbox setup.' }, 'a second draft after the call', Date.now() - 60000);
368
+ prop(P5, tI, 'move', { to: 'Build' }, 'the plan is agreed', Date.now() - 30000);
369
+ for (const [w, h, dark] of [[1280, 900, true], [390, 844, false], [390, 844, true]]) {
370
+ await p.emulateMedia({ colorScheme: dark ? 'dark' : 'light' }); await p.setViewportSize({ width: w, height: h });
371
+ await p.goto(`${F.BASE}/premium.html?ws=${encodeURIComponent(ws)}`);
372
+ await until(() => p.evaluate(() => document.querySelector('#aroundCap') && document.querySelector('#aroundCap').textContent !== 'Reading' && !/Reading…/.test(document.querySelector('#aroundBody').textContent)), 30000);
373
+ await open('prop'); await until(() => p.$('#oMain .pc-bar')); await sleep(800);
374
+ if (w === 390) {
375
+ const k = await p.evaluate(() => { const d = document.querySelector('#oMain'), bar = document.querySelector('#oMain .pc-bar').getBoundingClientRect(); return { side: [document.documentElement.scrollWidth - innerWidth, d.scrollWidth - d.clientWidth], bar: [Math.round(bar.left), Math.round(bar.right), Math.round(bar.bottom)], small: [...document.querySelectorAll('#oMain .pc-bar button')].filter((b) => b.getBoundingClientRect().height < 44).length }; });
376
+ ok(`K1 ${dark ? 'dark' : 'light'} at 390 the proposals dialog does not scroll sideways, its bar fits and its buttons are 44 px tall`, k.side[0] <= 0 && k.side[1] <= 1 && k.bar[0] >= 0 && k.bar[1] <= 390 && k.bar[2] <= 844 && k.small === 0, JSON.stringify(k));
377
+ }
378
+ await shot(`props-${w}-${dark ? 'dark' : 'light'}`);
379
+ await close();
380
+ }
381
+ await open('prop'); await click(`.pc-bar [data-bda="pnote"][data-id="${P4}"]`);
382
+ await until(() => p.$(`[data-bdn="${P4}"]`)); await p.focus(`[data-bdn="${P4}"]`); await p.keyboard.type('Name the key owner');
383
+ await p.setViewportSize({ width: 390, height: 430 }); await sleep(400); // the phone keyboard takes the lower half of the screen
384
+ await p.evaluate((id) => document.querySelector(`[data-bdn="${id}"]`).scrollIntoView({ block: 'nearest' }), P4); await sleep(200);
385
+ const kb = await p.evaluate((id) => { const t = document.querySelector(`[data-bdn="${id}"]`).getBoundingClientRect(), b = document.querySelector('.pc-bar [data-bda="pback"]'), r = b.getBoundingClientRect(); return { t: [Math.round(t.top), Math.round(t.bottom)], b: [Math.round(r.top), Math.round(r.bottom)], on: !b.disabled, focus: document.activeElement && document.activeElement.dataset.bdn === id, inBar: !!document.querySelector(`.pc-bar [data-bdn="${id}"]`), side: document.documentElement.scrollWidth - innerWidth }; }, P4);
386
+ ok('K2 with the keyboard open the note box and the Send back press are both on screen, and typing keeps the focus', kb.t[0] >= 0 && kb.t[1] <= kb.b[0] + 1 && kb.inBar && kb.b[1] <= 430 && kb.on && kb.focus && kb.side <= 0, JSON.stringify(kb));
387
+ await shot('props-390-keyboard');
388
+ await close(); await p.setViewportSize({ width: 1280, height: 900 });
355
389
  ok('L6 no script error', errs.length === 0, errs.join(' | '));
356
390
  return finish();
357
391
  })().catch((e) => { console.error(e); finish(1); });
@@ -262,6 +262,7 @@ function metDraw() {
262
262
  $('#metBody').style.gridTemplateColumns = 'repeat(' + Math.min(4, MM.tiles.length) + ',minmax(0,1fr))';
263
263
  $('#metBody').innerHTML = MM.tiles.map(MT.tileHtml).join('');
264
264
  $('#metNote').textContent = MM.note;
265
+ $('#metLead').hidden = !MM.lead; $('#metLead').textContent = MM.lead || ''; // the one line left in view; ⓘ opens the hint and the note
265
266
  pillOf($('#perTabs'));
266
267
  }
267
268
 
@@ -285,7 +286,7 @@ async function startMetrics(ws) {
285
286
  let r = null;
286
287
  try { const res = await fetch('/api/board-metrics-premium?ws=' + encodeURIComponent(ws || ''), { credentials: 'same-origin' }); r = await res.json(); } catch { r = null; }
287
288
  if (!r || !r.ok || r.state !== 'ready') {
288
- MM = null; metDraw(); $('#cMet').hidden = false; $('#metCap').textContent = 'not read'; $('#metHint').textContent = 'The metrics could not be read, so none is shown.' + (r && r.error ? ' The reason: ' + r.error : ''); $('#metBody').innerHTML = ''; $('#metNote').textContent = '';
289
+ MM = null; metDraw(); $('#cMet').hidden = false; $('#metCap').textContent = 'not read'; $('#metHint').textContent = 'The metrics could not be read, so none is shown.' + (r && r.error ? ' The reason: ' + r.error : ''); $('#metLead').hidden = false; $('#metLead').textContent = $('#metHint').textContent; $('#metBody').innerHTML = ''; $('#metNote').textContent = '';
289
290
  return;
290
291
  }
291
292
  MM = r.model; metDraw();
@@ -7,7 +7,7 @@
7
7
  * adds New report and Shape it in the Studio, whose presses are POST /api/report-setups/setup | from-dashboard and POST /api/report-structure/turn | remove |
8
8
  * revert | accept (PRD R5 to R8). insights-one-list puts the insight first, the pinned dashboard on top and one paged list of dashboards and reports below
9
9
  * (PRD L1 to L6); its one new press is Pin, POST /api/premium-dashboards/pin. Nothing else posts, and nothing is sent outward. */
10
- import { $, $$, esc, openDlg, closeDlg, toast, loadThread, onScroll, wireRail, logHtml, turnA, ptx, pillOf, crumbHtml, wireCrumb, kv, setPageGaps } from './premium-shell.js';
10
+ import { $, $$, esc, openDlg, closeDlg, toast, loadThread, onScroll, wireRail, logHtml, turnA, ptx, pillOf, crumbHtml, wireCrumb, kv, setPageGaps, infoBtn } from './premium-shell.js';
11
11
  import { pmPost, pmGet } from './http.js';
12
12
  import { openStudio } from './premium-studio.js';
13
13
  import { openReport } from './premium-report-read.js';
@@ -158,7 +158,7 @@ function drawDash() {
158
158
  const off = D.off, tot = L.length;
159
159
  $('#dashBody').innerHTML = `<div class="mprog" role="progressbar" aria-label="Measures on their line" aria-valuemin="0" aria-valuemax="${tot}" aria-valuenow="${tot - off}"><b style="width:${(tot - off) / tot * 100}%"></b></div>`
160
160
  + findingsHtml(D)
161
- + `<p class="mhint" style="margin-top:6px"><b>${tot - off} of ${tot}</b> on their line${off ? `. <b class="mflag">${off} ${off === 1 ? 'is' : 'are'} behind it.</b>` : '.'} Each chart is one KR metric, drawn at the dates of its readings. A gap between readings is left as a gap. The dashed line is the target.</p>`
161
+ + `<p class="mhint" style="margin-top:6px"><b>${tot - off} of ${tot}</b> on their line${off ? `. <b class="mflag">${off} ${off === 1 ? 'is' : 'are'} behind it.</b>` : '.'} ${infoBtn('dashFold', 'About these charts')}</p><div class="ifold" id="dashFold" hidden><p class="mhint">Each chart is one KR metric, drawn at the dates of its readings. A gap between readings is left as a gap. The dashed line is the target.</p></div>`
162
162
  + `<div class="ngrid">${L.map((c) => tileWrap(c)).join('')}</div>` + (D.id === 'all' ? mineHtml() + noSeriesHtml() : '');
163
163
  }
164
164
  /* The bar under the heading: Pin or Unpin, Back to the pinned one, a saved dashboard's purpose and Edit, and New chart. Hidden with no board to save on. */
@@ -178,7 +178,7 @@ function drawSaved(D, L) {
178
178
  const checks = D.checks.length ? `<p class="note pdck">${D.checks.map(esc).join(' ')}</p>` : '';
179
179
  $('#dashBody').innerHTML = (tot ? `<div class="mprog" role="progressbar" aria-label="Measures on their line" aria-valuemin="0" aria-valuemax="${tot}" aria-valuenow="${tot - off}"><b style="width:${(tot - off) / tot * 100}%"></b></div>`
180
180
  + findingsHtml(D)
181
- + `<p class="mhint" style="margin-top:6px"><b>${tot - off} of ${tot}</b> on their line${off ? `. <b class="mflag">${off} ${off === 1 ? 'is' : 'are'} behind it.</b>` : '.'} The charts are drawn in the order you saved. The dashed line is the target.</p>`
181
+ + `<p class="mhint" style="margin-top:6px"><b>${tot - off} of ${tot}</b> on their line${off ? `. <b class="mflag">${off} ${off === 1 ? 'is' : 'are'} behind it.</b>` : '.'} ${infoBtn('dashFold', 'About these charts')}</p><div class="ifold" id="dashFold" hidden><p class="mhint">The charts are drawn in the order you saved. The dashed line is the target.</p></div>`
182
182
  + `<div class="ngrid">${L.map((c) => tileWrap(c)).join('')}</div>`
183
183
  : `<div class="nempty" style="margin-top:14px"><p><b>This dashboard draws no chart yet.</b> Press Edit to add a measure with a series.</p></div>`) + checks + gone;
184
184
  }
@@ -457,13 +457,14 @@ function bmDraw() {
457
457
  $('#bmBody').style.gridTemplateColumns = 'repeat(' + Math.min(4, BM.tiles.length) + ',minmax(0,1fr))';
458
458
  $('#bmBody').innerHTML = BM.tiles.map(MT.tileHtml).join('');
459
459
  $('#bmNote').textContent = BM.note;
460
+ $('#bmLead').hidden = !BM.lead; $('#bmLead').textContent = BM.lead || ''; // the one line left in view; ⓘ opens the hint and the note
460
461
  }
461
462
  async function bmLoad() {
462
463
  clearTimeout(bmTimer);
463
464
  if (!M || !M.board || !M.board.ws) { $('#cBm').hidden = true; return; }
464
465
  let r = null;
465
466
  try { const res = await fetch('/api/board-metrics-premium?ws=' + encodeURIComponent(M.board.ws) + '&weeks=' + bmWeeks, { credentials: 'same-origin' }); r = await res.json(); } catch { r = null; }
466
- if (!r || !r.ok || r.state !== 'ready') { BM = null; bmDraw(); $('#bmCap').textContent = 'not read'; $('#bmHint').textContent = 'The Board measures could not be read, so none is shown.' + (r && r.error ? ' The reason: ' + r.error : ''); $('#bmBody').innerHTML = ''; $('#bmNote').textContent = ''; return; }
467
+ if (!r || !r.ok || r.state !== 'ready') { BM = null; bmDraw(); $('#bmCap').textContent = 'not read'; $('#bmHint').textContent = 'The Board measures could not be read, so none is shown.' + (r && r.error ? ' The reason: ' + r.error : ''); $('#bmLead').hidden = false; $('#bmLead').textContent = $('#bmHint').textContent; $('#bmBody').innerHTML = ''; $('#bmNote').textContent = ''; return; }
467
468
  BM = r.model; bmDraw();
468
469
  if (BM.pending) bmTimer = setTimeout(bmLoad, 4000); // the workflow engine is still deriving Blocked and Idle
469
470
  }
@@ -172,6 +172,16 @@ export function toast(msg, act) {
172
172
  tt = setTimeout(() => t.classList.remove('on'), act ? 9000 : 4200);
173
173
  }
174
174
 
175
+ /* ── ⓘ: a card's explanation folded behind one button (simple-UI plan #4) ─────────────────────────────────
176
+ * The words are unchanged; they stay in the page in a .ifold that starts hidden. A .infob opens and shuts the fold its aria-controls names.
177
+ * The static pages write the same markup by hand; a card drawn by script uses infoBtn. */
178
+ export const infoBtn = (fold, label = 'About this card', text = '') => `<button type="button" class="infob${text ? ' wide' : ''}" aria-controls="${esc(fold)}" aria-expanded="false" aria-label="${esc(label)}" title="${esc(label)}"><i aria-hidden="true">i</i>${text ? `<span>${esc(text)}</span>` : ''}</button>`;
179
+ document.addEventListener('click', (e) => {
180
+ const b = e.target.closest('.infob'); const f = b && document.getElementById(b.getAttribute('aria-controls'));
181
+ if (!f) return;
182
+ f.hidden = !f.hidden; b.setAttribute('aria-expanded', String(!f.hidden));
183
+ });
184
+
175
185
  /* ── the standard dialog: detail first, the conversation beside it (Detail tab first on a phone) ─────────── */
176
186
  export const kv = (rows) => `<div class="kv2">${rows.filter((r) => r && r[1]).map(([k, v]) => `<span>${esc(k)}</span><span>${esc(v)}</span>`).join('')}</div>`;
177
187
  export const H = (t) => `<h3 class="h2">${esc(t)}</h3>`;
@@ -2262,7 +2262,48 @@ button.wl-row[aria-pressed="true"] .wl-tog{background:var(--solid);color:var(--o
2262
2262
  .ub{white-space:normal}
2263
2263
  .toolline{display:block;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font:400 var(--fs-1) var(--mono);color:var(--ink-3);opacity:.85}
2264
2264
  .toolline::before{content:"";display:inline-block;vertical-align:middle;margin:0 8px 2px 0;width:6px;height:6px;border-radius:50%;background:var(--ink-3);opacity:.6}
2265
+ /* Agent proposals, the simple dialog (premium-simple-ui #2): one card per proposal, a bottom bar with Keep as the only primary, the notes behind one ⓘ */
2266
+ .pc-list{gap:12px}
2267
+ .bd-it.pcard,.bd-list>.bd-it.pcard:first-child{padding:14px 18px;border:1px solid var(--hair);border-radius:16px;background:var(--card-solid);cursor:pointer;transition:box-shadow .2s}
2268
+ .bd-it.pcard.on{box-shadow:inset 0 0 0 1.5px var(--ink);border-color:transparent}
2269
+ .bd-it.pcard.decided{cursor:default;background:transparent}
2270
+ .pc-k{display:block;font:500 var(--fs-2)/1.3 var(--mono);color:var(--ink-3)}
2271
+ .pc-pick{display:block;width:100%;margin-top:4px;padding:0;border:0;background:none;text-align:left;font:inherit;font-size:var(--fs-4);font-weight:600;line-height:1.3;color:var(--ink);cursor:pointer}
2272
+ .pcard>span.bd-t{margin-top:4px;font-size:var(--fs-4)}
2273
+ .pc-line{display:flex;gap:6px;align-items:flex-end;margin:4px 0 0;font-size:var(--fs-3);color:var(--ink-2)}
2274
+ .pc-line span{min-width:0;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow-wrap:anywhere}
2275
+ .pc-line.open span{display:block}
2276
+ .pc-more{flex:none;min-height:24px;padding:0;border:0;background:none;font:inherit;font-size:var(--fs-3);font-weight:600;color:var(--ink);text-decoration:underline;text-underline-offset:3px;cursor:pointer;white-space:nowrap}
2277
+ .pc-x{margin-top:6px}
2278
+ .pc-all{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:56px;margin-top:12px;padding:12px 18px;border:1px solid var(--hair);border-radius:16px;background:var(--card-solid);font:inherit;font-size:var(--fs-4);color:var(--ink);cursor:pointer;text-align:left}
2279
+ .pc-all b{font-weight:500}.pc-all svg{width:20px;height:20px;flex:none;color:var(--ink-2)}
2280
+ .pc-info{margin:14px 2px 0}
2281
+ .pc-info>button{display:flex;align-items:center;gap:8px;min-height:44px;padding:0;border:0;background:none;font:inherit;font-size:var(--fs-3);color:var(--ink-3);cursor:pointer;text-align:left}
2282
+ .pc-i{display:inline-grid;place-items:center;width:18px;height:18px;flex:none;border-radius:50%;border:1.4px solid var(--ink-3);font:600 var(--fs-1)/1 var(--sans);font-style:normal}
2283
+ .pc-info>div{padding:0 0 4px 26px}
2284
+ .pc-bar{position:sticky;bottom:0;z-index:2;display:grid;gap:8px;margin:14px 0 0;padding:12px 0 6px;border-top:1px solid var(--hair);background:var(--card-solid)}
2285
+ .pc-row{display:flex;align-items:center;gap:8px}
2286
+ .pc-q{height:44px;padding:0 16px;border:0;border-radius:999px;background:var(--well);color:var(--ink);font:inherit;font-size:var(--fs-3);font-weight:600;white-space:nowrap;cursor:pointer}
2287
+ .pc-p{flex:1;min-width:0;height:52px;padding:0 16px;border:0;border-radius:999px;background:var(--solid);color:var(--on-solid);font:inherit;font-size:var(--fs-4);font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center;cursor:pointer}
2288
+ .pc-p[disabled]{opacity:.4;cursor:default}
2289
+ .pc-fine{margin:0;text-align:center;font-size:var(--fs-1);color:var(--ink-3)}
2290
+ .pc-bar .bd-l{margin-top:0}.pc-bar textarea{min-height:64px;margin-top:0} /* the note box sits in the bar, so it and Send back stay on screen with the phone keyboard open */
2291
+ @media (max-width:700px){.bd-it.pcard,.bd-list>.bd-it.pcard:first-child{padding:12px 14px}.pc-q{padding:0 12px}.pc-bar{padding-bottom:max(6px,env(safe-area-inset-bottom))}}
2265
2292
 
2266
2293
  /* phone: iOS zooms the whole page in when a text field under 16px gets focus, and leaves it zoomed (send button off the right edge, sheets at
2267
2294
  * three quarters of the screen). Every text field is 16px on a touch screen, so focus never zooms. */
2268
2295
  @media (pointer:coarse){input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=button]):not([type=submit]):not([type=reset]):not([type=file]):not([type=color]):not([type=image]),textarea,select{font-size:var(--fs-4)!important}}
2296
+ /* ── ⓘ: explanations folded behind one button (simple-UI plan #4). The words are unchanged; the card keeps one line in view. ── */
2297
+ .infob{display:inline-flex;align-items:center;justify-content:center;gap:8px;flex:none;min-width:44px;min-height:44px;margin:-12px;padding:0;border:0;background:none;color:var(--ink-3);font:500 var(--fs-2)/1 var(--sans);cursor:pointer;vertical-align:middle}
2298
+ .infob.wide{justify-content:flex-start;margin:0}
2299
+ .infob i{display:inline-grid;place-items:center;width:20px;height:20px;border-radius:50%;border:1.4px solid currentColor;font:600 var(--fs-1)/1 var(--sans);font-style:normal}
2300
+ .infob:hover,.infob[aria-expanded="true"]{color:var(--ink)}
2301
+ .infob[aria-expanded="true"] i{background:var(--solid);border-color:var(--solid);color:var(--on-solid)}
2302
+ .infob:focus-visible{outline:2px solid var(--ember);outline-offset:-4px;border-radius:999px}
2303
+ .ch .infob{margin:0 0 0 -16px}
2304
+ .ifold{margin:10px 0 14px;padding:14px 16px;border-radius:16px;background:var(--well);border:1px solid var(--hair)}
2305
+ .ifold[hidden],.ilead[hidden]{display:none}
2306
+ .ifold>:last-child{margin-bottom:0}
2307
+ .ilead{margin:6px 0 14px;font-size:var(--fs-3);font-weight:600;color:var(--ember-ink)}
2308
+ .footi{margin-top:28px;display:flex;align-items:center}
2309
+ .ifold .foot{margin:0;max-width:90ch}
@@ -596,17 +596,20 @@ const bdChip = (t, c) => `<span class="bd-chip${c ? ' ' + c : ''}">${esc(t)}</sp
596
596
  const bdLink = (href) => (/^https:\/\/\S+$/i.test(String(href || '')) ? href : '');
597
597
  const bdFail = (id, e) => (e[id] ? `<p class="nodef err" role="alert">${esc(e[id])}</p>` : '');
598
598
 
599
- /* ── agent proposals ── */
600
- function propItem(it) {
601
- const p = it.p, d = DEC.get(it.id), id = it.id, text = pText(p);
599
+ /* ── agent proposals: one card per proposal, one bottom bar for the chosen card (Keep is the only primary), the notes behind one ⓘ ── */
600
+ const PMORE = new Set(); // the cards whose Read more is open
601
+ let PSEL = '', PINFO = false; // the card the bottom bar acts on; the ⓘ notes open
602
+ function propItem(it, sel) {
603
+ const p = it.p, d = DEC.get(it.id), id = it.id, text = pText(p), more = PMORE.has(id), on = !d && id === sel;
602
604
  const src = (p.sources || []).filter((s) => s && s.ref).map((s) => (bdLink(s.ref) ? `<a href="${esc(bdLink(s.ref))}" target="_blank" rel="noopener noreferrer">${esc(s.label || s.ref)}</a>` : esc((s.label ? s.label + ': ' : '') + s.ref))).join(' · ');
603
- let act;
605
+ const line = text || (p.why ? 'Why: ' + p.why : ''), extra = (text && p.why) || src;
606
+ let act = '';
604
607
  if (d) act = d.st === 'kept' ? bdDone(true, 'Kept. ' + pWrote(d.wrote) + (d.warnings.length ? ' ' + d.warnings.join(' ') : '')) : d.st === 'back' ? bdDone(true, 'Sent back with your note: “' + d.note + '”. The note starts a new run.') : bdDone(false, 'Dropped. It counts as a correction.');
605
- else if (PBACK.has(id)) {
606
- act = `<label class="bd-l" for="bdn-${esc(id)}">What should the agent change? A note is required.</label><textarea id="bdn-${esc(id)}" data-bdn="${esc(id)}" maxlength="500" rows="3">${esc(PNOTE[id] || '')}</textarea>${bdFail(id, PERR)}`
607
- + bdActs(bdBtn('Send back with the note', 'pback', id, false, (PNOTE[id] || '').trim() ? '' : ' disabled'), bdBtn('Cancel', 'pcancel', id, true)) + '<p class="bd-why">Send back starts a new run with your note. It cannot be undone.</p>';
608
- } 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);
609
- 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>`;
608
+ else if (on && !PBACK.has(id)) act = bdFail(id, PERR);
609
+ const pick = d ? `<span class="bd-t">${esc(targetOf(it))}</span>` : `<button type="button" class="bd-t pc-pick" data-bda="psel" data-id="${esc(id)}" aria-pressed="${on}">${esc(targetOf(it))}</button>`;
610
+ return `<div class="bd-it pcard${d ? ' decided' : ''}${on ? ' on' : ''}" data-id="${esc(id)}"${d ? '' : ` data-bda="psel"`}><small class="pc-k">${esc(pWhat(p))}${it.pname ? ' · ' + esc(it.pname) : ''}</small>${pick}`
611
+ + (line ? `<p class="pc-line${more ? ' open' : ''}"><span>${esc(line)}</span>${extra ? `<button type="button" class="pc-more" data-bda="pmore" data-id="${esc(id)}" aria-expanded="${more}">${more ? 'Less' : 'Read more'}</button>` : ''}</p>` : '')
612
+ + (extra ? `<div class="pc-x"${more ? '' : ' hidden'}>${text && p.why ? `<p class="bd-why">Why: ${esc(p.why)}</p>` : ''}${src ? `<p class="bd-why">Sources: ${src}</p>` : ''}</div>` : '') + act + '</div>';
610
613
  }
611
614
  /* ── portfolio documents: the shared document sheet (premium-doc-sheet.js) over GET /api/core-docs?level=portfolio, on the Briefing ── */
612
615
  const CDS = { missing: 'Not started', draft: 'Draft', ok: 'Up to date', stale: 'Stale', due: 'Due' };
@@ -639,21 +642,34 @@ function rowTarget(r) {
639
642
  }
640
643
  /** The agent's drafts rows and goal rows (in model.agent since premium-agent-inbox) and the list's rows: a deep link opens one by its key. */
641
644
  const anyRow = (key) => [].concat(M && M.agent ? M.agent.rows || [] : [], M && M.agent ? M.agent.goals || [] : [], M ? M.list.rows : [], CL || []).find((r) => r.key === key) || null;
645
+ const propSel = (L) => { const w = L.filter((it) => !DEC.has(it.id)); return (w.find((it) => it.id === PSEL) || w[0] || {}).id || ''; };
642
646
  function propsHtml() {
643
647
  const a = A.prop; if (!a.ok) return `<p class="nodef err" role="alert">Agent proposals ${esc(said(a))}</p>`;
644
648
  const all = a.items.concat([...DEC.values()].map((d) => d.item).filter((it) => !a.items.some((o) => o.id === it.id)));
645
- const L = all.filter(inFocus), open = a.items.filter(inFocus).length, rest = PFOCUS ? a.items.length - open : 0;
646
- const more = PFOCUS ? bdActs(bdBtn('Show all proposals', 'pall', null, true), PFOCUS.session && anyRow(PFOCUS.session) ? bdBtn('Talk to the agent', 'psess', null, true) : '', PFOCUS.bell ? bdBtn('Back to Needs you', 'pbell', null, true) : '') + (rest ? `<p class="bd-why">${pl(rest, 'more proposal waits', 'more proposals wait')} on other work.</p>` : '') : '';
647
- 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
648
- + (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>';
649
- }
649
+ const L = all.filter(inFocus), rest = PFOCUS ? a.items.length - a.items.filter(inFocus).length : 0, sel = propSel(L), it = L.find((x) => x.id === sel);
650
+ const extra = PFOCUS ? [PFOCUS.session && anyRow(PFOCUS.session) ? bdBtn('Talk to the agent', 'psess', null, true) : '', PFOCUS.bell ? bdBtn('Back to Needs you', 'pbell', null, true) : ''].filter(Boolean) : [];
651
+ const more = PFOCUS ? `<button type="button" class="pc-all" data-bda="pall"><b>${rest ? pl(rest, 'more', 'more') + ' on other work' : 'Show all proposals'}</b>${CHEV}</button>` + (extra.length ? bdActs(...extra) : '') : '';
652
+ const notes = [it ? pKeep(it.p) + ' Drop counts as a correction. Send back starts a new run with your note. None of the three can be undone.' : '', 'The agent mode (Off, Shadow, Approve) stays in the console. This list shows a kind only when its mode is Approve.', a.errs.length ? 'Not read: ' + a.errs[0] : ''].filter(Boolean);
653
+ const info = `<div class="pc-info"><button type="button" data-bda="pinfo" aria-expanded="${PINFO}" aria-controls="pcNotes"><i class="pc-i" aria-hidden="true">i</i>Nothing changes a record until you keep it</button><div id="pcNotes"${PINFO ? '' : ' hidden'}>${notes.map((t) => `<p class="bd-why">${esc(t)}</p>`).join('')}</div></div>`;
654
+ const back = it && PBACK.has(it.id), id = it ? esc(it.id) : '';
655
+ const note = back ? `<label class="bd-l" for="bdn-${id}">What should the agent change?</label><textarea id="bdn-${id}" data-bdn="${id}" maxlength="500" rows="2">${esc(PNOTE[it.id] || '')}</textarea>${bdFail(it.id, PERR)}` : '';
656
+ const bar = !it ? '' : `<div class="pc-bar">${note}<div class="pc-row">${back
657
+ ? `<button type="button" class="pc-q" data-bda="pcancel" data-id="${id}">Cancel</button><button type="button" class="pc-p" data-bda="pback" data-id="${id}"${(PNOTE[it.id] || '').trim() ? '' : ' disabled'}>Send back</button>`
658
+ : `<button type="button" class="pc-q" data-bda="pnote" data-id="${id}">Send back</button><button type="button" class="pc-q" data-bda="pdrop" data-id="${id}">Drop</button><button type="button" class="pc-p" data-bda="pkeep" data-id="${id}">Keep</button>`}</div><p class="pc-fine">${L.filter((x) => !DEC.has(x.id)).length > 1 ? 'For the chosen card · ' : ''}Can’t be undone</p></div>`;
659
+ return (L.length ? `<div class="bd-list pc-list">${L.map((x) => propItem(x, sel)).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 + info + bar;
660
+ }
661
+ const propTitle = () => { const a = A.prop; if (!a || !a.ok) return 'Agent proposals'; const n = a.items.filter(inFocus).length; return n ? n + (n === 1 ? ' waits' : ' wait') + ' for you' : 'All decided'; };
650
662
  async function propPress(e, redraw) {
651
663
  const b = e.target.closest('[data-bda]'); if (!b || BUSY) return;
652
664
  if (b.dataset.bda === 'pall') { PFOCUS = null; redraw(); return; }
653
665
  if (b.dataset.bda === 'psess') { const r = anyRow(PFOCUS && PFOCUS.session); closeDlg(); if (r) openRow(r); return; } // the target's drafts row: its conversation is the agent's session
654
666
  if (b.dataset.bda === 'pbell') { closeDlg(); pvOpenBell(); return; }
655
- const act = b.dataset.bda, id = b.dataset.id, it = openProps().find((x) => x.id === id);
667
+ if (b.dataset.bda === 'pinfo') { PINFO = !PINFO; redraw('[data-bda="pinfo"]'); return; }
668
+ const act = b.dataset.bda, id = b.dataset.id;
669
+ if (act === 'pmore') { if (PMORE.has(id)) PMORE.delete(id); else PMORE.add(id); redraw(`[data-bda="pmore"][data-id="${CSS.escape(id)}"]`); return; }
670
+ const it = openProps().find((x) => x.id === id);
656
671
  if (!it) return;
672
+ if (act === 'psel') { const was = b.closest('.pcard.on'); PSEL = id; if (!was) { redraw(`[data-bda="psel"][data-id="${CSS.escape(id)}"]`); } return; }
657
673
  if (act === 'pnote') { PBACK.add(id); redraw(`[data-bdn="${CSS.escape(id)}"]`); return; }
658
674
  if (act === 'pcancel') { PBACK.delete(id); delete PERR[id]; redraw(`[data-bda="pnote"][data-id="${CSS.escape(id)}"]`); return; }
659
675
  const note = (PNOTE[id] || '').trim();
@@ -665,7 +681,7 @@ async function propPress(e, redraw) {
665
681
  delete PERR[id]; PBACK.delete(id);
666
682
  DEC.set(id, { item: it, st: act === 'pkeep' ? 'kept' : act === 'pback' ? 'back' : 'dropped', note, wrote: r.wrote, warnings: r.warnings || [] });
667
683
  toast(act === 'pkeep' ? 'Kept.' : act === 'pback' ? 'Sent back with your note.' : 'Dropped. It counts as a correction.');
668
- await readAll(['prop']); redraw(`.bd-it[data-id="${CSS.escape(id)}"] .bd-done`);
684
+ await readAll(['prop']); redraw('.pc-bar .pc-p:not([disabled])');
669
685
  }
670
686
  /** ?open= (premium-agent-inbox): the bell's deep link. prop:<id> opens the Agent proposals dialog on that one proposal, target:<kind>:<id> on that target's,
671
687
  * row:<key> a drafts or goal row's dialog, whose conversation is the session. pws names the product. On this page the bell opens it in place ('pmos:open'). */
@@ -700,10 +716,11 @@ function openAroundParam() {
700
716
  const openPropsDlg = async (focus) => {
701
717
  PFOCUS = focus && ((focus.kind && focus.id) || focus.proposal) ? focus : null;
702
718
  if (PFOCUS && !A.prop) await readAll(['prop']); // pressed before Around you has read: read the proposals first
703
- const n = openProps().filter(inFocus).length;
704
- bdDlg('prop', 'Agent proposals · real data', 'Agent proposals', 'The Initiative Driver, read from each product\'s ledger',
705
- 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,
719
+ const n = openProps().filter(inFocus).length; PSEL = ''; PINFO = false;
720
+ bdDlg('prop', 'Agent proposals', propTitle(), '',
721
+ 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.', () => { $('#dTitle').textContent = propTitle(); return propsHtml(); }, propPress,
706
722
  (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(); });
723
+ $('#oLab').textContent = 'Agent proposals';
707
724
  };
708
725
 
709
726
  /* ── mentions ── */
@@ -38,10 +38,10 @@
38
38
  </header>
39
39
  <section class="hero hero-slim"><p class="brief rise" style="--d:2" id="brief" aria-live="polite"></p></section>
40
40
  <section class="card rise" style="--d:4" id="cMet" aria-labelledby="hMet" hidden>
41
- <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="hMet">Metrics</h2><small id="metCap"></small><div class="seg mper" id="perTabs" role="group" aria-label="Period"><i class="pill"></i><button data-per="day" aria-pressed="false" aria-disabled="true" title="PMOS counts runs and merges by week only">Day</button><button data-per="week" aria-pressed="true">Week</button><button data-per="month" aria-pressed="false" aria-disabled="true" title="PMOS counts runs and merges by week only">Month</button></div></div>
42
- <p class="mhint" id="metHint"></p>
41
+ <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="hMet">Metrics</h2><button type="button" class="infob" aria-controls="metFold" aria-expanded="false" aria-label="About the metrics" title="About the metrics"><i aria-hidden="true">i</i></button><small id="metCap"></small><div class="seg mper" id="perTabs" role="group" aria-label="Period"><i class="pill"></i><button data-per="day" aria-pressed="false" aria-disabled="true" title="PMOS counts runs and merges by week only">Day</button><button data-per="week" aria-pressed="true">Week</button><button data-per="month" aria-pressed="false" aria-disabled="true" title="PMOS counts runs and merges by week only">Month</button></div></div>
42
+ <p class="ilead" id="metLead" hidden></p>
43
+ <div class="ifold" id="metFold" hidden><p class="mhint" id="metHint"></p><p class="note" id="metNote"></p></div>
43
44
  <div class="bt2 ibt" id="metBody"></div>
44
- <p class="note" id="metNote"></p>
45
45
  </section>
46
46
  <div class="bcols">
47
47
  <div>
@@ -71,7 +71,8 @@
71
71
  <div class="dmg two" id="docBody" role="list"></div>
72
72
  <p class="note" id="docNote" style="margin-top:12px"></p>
73
73
  </section>
74
- <p class="foot" id="foot">This page reads the board's own records, the same ones the Initiatives page reads. Its presses are Draft it on a core document, which starts the existing read-only run that writes a draft and sends nothing, Add a document, which saves a document on the board's record, and the board's own presses: accept or decline a new ask, New initiative, and move, hold, cancel or archive an initiative, each through the console's route and each with Undo. Issue and Drop are not built here. The Metrics charts are not drawn, because PMOS holds no metric series for a board. A sprint appears only when a session has read Jira.</p>
74
+ <div class="footi"><button type="button" class="infob wide" aria-controls="footFold" aria-expanded="false" aria-label="About this page" title="About this page"><i aria-hidden="true">i</i><span>About this page</span></button></div>
75
+ <div class="ifold" id="footFold" hidden><p class="foot" id="foot">This page reads the board's own records, the same ones the Initiatives page reads. Its presses are Draft it on a core document, which starts the existing read-only run that writes a draft and sends nothing, Add a document, which saves a document on the board's record, and the board's own presses: accept or decline a new ask, New initiative, and move, hold, cancel or archive an initiative, each through the console's route and each with Undo. Issue and Drop are not built here. The Metrics charts are not drawn, because PMOS holds no metric series for a board. A sprint appears only when a session has read Jira.</p></div>
75
76
  </main>
76
77
  <noscript>This page needs JavaScript.</noscript>
77
78
  <script type="module" src="/pm/premium-board.js"></script>
@@ -37,7 +37,8 @@
37
37
  </header>
38
38
  <section class="hero hero-slim"><p class="brief rise" style="--d:2" id="brief" aria-live="polite"></p></section>
39
39
  <div id="iMain"><p class="empty3 plain" id="iRead">The initiative is read from its records. This page shows nothing until it has read, rather than guess.</p></div>
40
- <p class="foot" id="foot">This page reads the initiative's own records, the same ones the Initiatives sheet reads. Its presses are Draft it on a core document, which starts the existing read-only run that writes a draft and sends nothing, Add a task, Add a document, which saves a document on the initiative's record, and the bar under the stages: move it, put it on hold, cancel or archive it, each through the console's route and each with Undo. Opening a document only reads it. Issue and Drop are not built on this page.</p>
40
+ <div class="footi"><button type="button" class="infob wide" aria-controls="footFold" aria-expanded="false" aria-label="About this page" title="About this page"><i aria-hidden="true">i</i><span>About this page</span></button></div>
41
+ <div class="ifold" id="footFold" hidden><p class="foot" id="foot">This page reads the initiative's own records, the same ones the Initiatives sheet reads. Its presses are Draft it on a core document, which starts the existing read-only run that writes a draft and sends nothing, Add a task, Add a document, which saves a document on the initiative's record, and the bar under the stages: move it, put it on hold, cancel or archive it, each through the console's route and each with Undo. Opening a document only reads it. Issue and Drop are not built on this page.</p></div>
41
42
  </main>
42
43
  <noscript>This page needs JavaScript.</noscript>
43
44
  <script type="module" src="/pm/premium-initiative.js"></script>
@@ -57,19 +57,20 @@
57
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
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
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>
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. <button type="button" class="infob" aria-controls="repFold" aria-expanded="false" aria-label="About reports and the pin" title="About reports and the pin"><i aria-hidden="true">i</i></button></p>
61
+ <div class="ifold" id="repFold" hidden><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></div>
62
62
  <div id="repBody"></div>
63
63
  <div class="lpager" id="listPager"></div>
64
64
  <p class="nsch">Open a report to read it, edit its words or issue a draft.</p>
65
65
  </section>
66
66
  <section class="card rise" style="--d:7" id="cBm" aria-labelledby="hBm" hidden>
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>
68
- <p class="mhint" id="bmHint"></p>
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><button type="button" class="infob" aria-controls="bmFold" aria-expanded="false" aria-label="About the Board measures" title="About the Board measures"><i aria-hidden="true">i</i></button><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>
68
+ <p class="ilead" id="bmLead" hidden></p>
69
+ <div class="ifold" id="bmFold" hidden><p class="mhint" id="bmHint"></p><p class="note" id="bmNote"></p></div>
69
70
  <div class="bt2 ibt" id="bmBody"></div>
70
- <p class="note" id="bmNote"></p>
71
71
  </section>
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>
72
+ <div class="footi"><button type="button" class="infob wide" aria-controls="footFold" aria-expanded="false" aria-label="About this page" title="About this page"><i aria-hidden="true">i</i><span>About this page</span></button></div>
73
+ <div class="ifold" id="footFold" hidden><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></div>
73
74
  </main>
74
75
  <noscript>This page needs JavaScript.</noscript>
75
76
  <script type="module" src="/pm/premium-insights.js"></script>
@@ -70,7 +70,8 @@
70
70
  </section>
71
71
  </div>
72
72
  </div>
73
- <p class="foot" id="foot">This page reads your list, the same one the Work page reads. It writes only when you press a button that says what it does, and each press uses the Work page's own route. Starting an agent from a list is not built here. The Kept and Done tabs show only your own items. Answers, ideas and reports an agent files on its own, effort figures and review timing need records PMOS does not hold yet. Jira and Slack items appear only when an agent session has read them.</p>
73
+ <div class="footi"><button type="button" class="infob wide" aria-controls="footFold" aria-expanded="false" aria-label="About this page" title="About this page"><i aria-hidden="true">i</i><span>About this page</span></button></div>
74
+ <div class="ifold" id="footFold" hidden><p class="foot" id="foot">This page reads your list, the same one the Work page reads. It writes only when you press a button that says what it does, and each press uses the Work page's own route. Starting an agent from a list is not built here. The Kept and Done tabs show only your own items. Answers, ideas and reports an agent files on its own, effort figures and review timing need records PMOS does not hold yet. Jira and Slack items appear only when an agent session has read them.</p></div>
74
75
  </main>
75
76
  <noscript>This page needs JavaScript.</noscript>
76
77
  <script type="module" src="/pm/premium-work.js"></script>
@@ -71,7 +71,8 @@
71
71
  </section>
72
72
  </div>
73
73
  </div>
74
- <p class="foot" id="foot">This page reads the repository's records. It writes only when you press a button that says it records: a decision goes to pm-decisions.md, a returned run to the corrections ledger, a put-off row and a note to the workspace's state folder. It keeps its last answer in the workspace's state folder, so a reload is quick. Counts come from derived state at the time shown above.</p>
74
+ <div class="footi"><button type="button" class="infob wide" aria-controls="footFold" aria-expanded="false" aria-label="About this page" title="About this page"><i aria-hidden="true">i</i><span>About this page</span></button></div>
75
+ <div class="ifold" id="footFold" hidden><p class="foot" id="foot">This page reads the repository's records. It writes only when you press a button that says it records: a decision goes to pm-decisions.md, a returned run to the corrections ledger, a put-off row and a note to the workspace's state folder. It keeps its last answer in the workspace's state folder, so a reload is quick. Counts come from derived state at the time shown above.</p></div>
75
76
  </main>
76
77
  <noscript>This page needs JavaScript.</noscript>
77
78
  <script type="module" src="/pm/premium.js"></script>