create-pmos 0.493.0 → 0.494.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/package.json +62 -14
  2. package/payload/KIT-VERSION +1 -1
  3. package/payload/planning/evals/eval-calibration.md +1 -1
  4. package/payload/planning/okrs/health-budgets.md +1 -1
  5. package/payload/state/discoveries.md +1 -1
  6. package/workspace/briefing-premium-initiative-test.js +2 -1
  7. package/workspace/changelog.json +61 -0
  8. package/workspace/guide/briefing-premium.md +2 -0
  9. package/workspace/guide/claude-proposes.md +2 -2
  10. package/workspace/guide/data-freshness.md +3 -1
  11. package/workspace/guide/initiatives-screen.md +2 -0
  12. package/workspace/guide/report-slides.md +14 -1
  13. package/workspace/guide/reports.md +2 -0
  14. package/workspace/guide/your-impact.md +6 -7
  15. package/workspace/lib/board-trail.js +30 -3
  16. package/workspace/lib/git-shape.js +21 -0
  17. package/workspace/lib/grill-runs.js +21 -6
  18. package/workspace/lib/grill.js +1 -1
  19. package/workspace/lib/impact.js +29 -16
  20. package/workspace/lib/page-warm.js +68 -0
  21. package/workspace/lib/report-design.js +6 -1
  22. package/workspace/lib/report-export.js +148 -9
  23. package/workspace/lib/report-pyramid.js +434 -0
  24. package/workspace/lib/report-structure.js +5 -1
  25. package/workspace/lib/report-templates.js +81 -20
  26. package/workspace/lib/routes-boards.js +1 -1
  27. package/workspace/lib/routes-brief-page.js +20 -3
  28. package/workspace/lib/routes-grill.js +10 -4
  29. package/workspace/lib/routes-impact.js +12 -4
  30. package/workspace/lib/routes-programs.js +6 -4
  31. package/workspace/lib/routes-report-design.js +15 -0
  32. package/workspace/lib/routes-report-flow.js +106 -17
  33. package/workspace/lib/routes-report-setups.js +2 -1
  34. package/workspace/lib/routes-report-structure.js +3 -0
  35. package/workspace/lib/wf-bridge.js +5 -3
  36. package/workspace/package-lock.json +2 -2
  37. package/workspace/package.json +1 -1
  38. package/workspace/premium-chat-report-tab-test.js +5 -1
  39. package/workspace/public/pm/cozy-vw-rp.css +12 -0
  40. package/workspace/public/pm/fetch-share.js +38 -0
  41. package/workspace/public/pm/home-app.js +21 -3
  42. package/workspace/public/pm/home-chat.js +5 -4
  43. package/workspace/public/pm/home-impact.css +23 -13
  44. package/workspace/public/pm/home-impact.js +49 -32
  45. package/workspace/public/pm/home-ini.css +2 -0
  46. package/workspace/public/pm/ini-view.css +55 -0
  47. package/workspace/public/pm/ini-view.js +5 -2
  48. package/workspace/public/pm/premium-board.js +1 -0
  49. package/workspace/public/pm/premium-insights.js +1 -0
  50. package/workspace/public/pm/premium-report-read.js +25 -6
  51. package/workspace/public/pm/premium-report-tab.js +69 -14
  52. package/workspace/public/pm/report-flow.js +93 -10
  53. package/workspace/server.js +24 -3
  54. package/workspace/skills/report-template.skill +8 -0
  55. package/workspace/test-lists/page-open-speed.json +5 -0
  56. package/workspace/test-lists/report-pyramid.json +9 -0
@@ -42,6 +42,7 @@ const path = require('path');
42
42
  const os = require('os');
43
43
  const guard = require('./pm-guard.js');
44
44
  const S = require('./report-structure.js');
45
+ const RT = require('./report-templates.js');
45
46
  const CS = require('./charts-store.js');
46
47
  const RS = require('./report-setups.js');
47
48
  const RDraft = require('./report-draft.js');
@@ -775,7 +776,9 @@ async function handle(req, res, url, ctx) {
775
776
  c.chart = r.chart.id; written.push(r.chart.id);
776
777
  }
777
778
  if (written.length) S.rewriteVersion(root, id, n, next);
779
+ const tw = RT.followBefore(root, id, setup);
778
780
  S.append(root, id, { ev: 'accept', n, charts: written }, { actor: g.actor });
781
+ RT.followAfter(root, id, { structure: n }, tw); // the template follows the saved sections as T<n+1> (canvas TplA)
779
782
  const b = S.writeBrief(root, id, setup);
780
783
  if (!b.ok) return fail(b);
781
784
  return send({ status: 200, body: { ok: true, structure: answerOf(root, id), brief: b.path, charts: written } });
@@ -69,12 +69,14 @@ function proposals(ctx) {
69
69
  const dir = home && ctx.stateDirFor ? ctx.stateDirFor(home) : null;
70
70
  if (!dir) return [];
71
71
  const lib = WS.library(dir);
72
+ // Most libraries replace nothing: then no workspace's initiatives are read at all (page-open-speed: New for you read every workspace's
73
+ // board frame on each Home open, ~100 ms on the thread every answer waits for, to find there was no ✦ to show).
74
+ const pairs = [...lib.byId.values()].map((wf) => [wf, replacesOf(lib, wf)]).filter(([, from]) => from);
75
+ if (!pairs.length) return [];
72
76
  const all = [];
73
77
  for (const w of workspaces(ctx)) { const st = standing(ctx, w); if (st) all.push(...st); }
74
78
  const out = [];
75
- for (const wf of lib.byId.values()) {
76
- const from = replacesOf(lib, wf);
77
- if (!from) continue;
79
+ for (const [wf, from] of pairs) {
78
80
  const mine = all.filter((x) => movable(x, from.id));
79
81
  if (!mine.length) continue;
80
82
  const map = WF.mapOf(from, wf);
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.493.0",
3
+ "version": "0.494.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pmos-workspace",
9
- "version": "0.493.0",
9
+ "version": "0.494.0",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@anthropic-ai/sdk": "^1.3.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.493.0",
3
+ "version": "0.494.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",
@@ -46,7 +46,7 @@ const ANSWER = { role: 'assistant', text: 'Signups from the lightbox rose to 1,2
46
46
  const look = () => {
47
47
  const vw = document.querySelector('#czViewer:not([hidden])'), pane = vw ? vw.querySelector('.vz[data-vw^="report:"]') : null;
48
48
  return { shut: !pane, title: vw ? ((vw.querySelector('.cz-vw-title') || {}).textContent || '') : '', reader: !!(vw && vw.querySelector('.vz-rp0')), review: vw && vw.querySelector('.rf-rv') ? vw.querySelector('.rf-rv').textContent : null,
49
- tpl: !!(vw && vw.querySelector('[data-cz-vw-p="template"]')), layer: false, chip: (document.querySelector('#hmLog [data-report-open]') || {}).textContent || null,
49
+ tpl: !!(vw && vw.querySelector('[data-cz-vw-p="template"]')) && !!(vw && vw.querySelector('[data-cz-vw-p="chat"]')), layer: false, chip: (document.querySelector('#hmLog [data-report-open]') || {}).textContent || null,
50
50
  json: /pmos-report|"kind"/.test((document.querySelector('#hmLog') || {}).textContent || ''), user: [...document.querySelectorAll('#hmLog .hm-u .hm-bub')].map((u) => u.textContent.trim()),
51
51
  tabs: pane ? [(vw.querySelector('.cz-vw-kind') || {}).textContent || ''] : [], pane: pane ? pane.textContent.replace(/\s+/g, ' ').trim() : null,
52
52
  secs: pane ? (pane.querySelector('.vz-dkt') ? pane.querySelectorAll('.vz-dkt button').length - 1 : pane.querySelectorAll('.vz-secs li').length) : 0,
@@ -100,6 +100,10 @@ const look = () => {
100
100
  ok('R4 Draft it records the report, pauses it (Once) and records T1', !!setup && setup.output === 'google-slides' && setup.audience === 'Growth leads' && L.some((l) => l.ev === 'pause' && l.id === setup.id) && T1 && T1.current === 1, JSON.stringify([L.map((l) => l.ev), T1]));
101
101
  ok('R4 the report\'s current state opens: its first draft in the reader, Claude\'s review under it (RfH2), the template icon in the header', s3.reader && /I read it as your readers would/.test(s3.review || '') && s3.tpl, JSON.stringify(s3).slice(0, 600));
102
102
  if (shots) await p.screenshot({ path: `${shots}/draft-1280-light.png` });
103
+ // the chat icon (Wawan, 2026-11-02): the report's own conversation opens in Home's chat, the report stays beside it
104
+ await p.click('#czViewer [data-cz-vw-p="chat"]');
105
+ const ch = await until(() => p.evaluate(() => { const i = document.getElementById('hmIn'); return i && i.placeholder === 'Change the report' ? { ph: i.placeholder, log: (document.getElementById('hmLog') || {}).textContent || '', reader: !!document.querySelector('#czViewer .vz-slide, #czViewer .vz-rp0') } : null; }), 8000);
106
+ ok('R4 the chat icon opens the report\'s own conversation beside it: Claude asks what to change, the report stays open', !!ch && /Tell me what to change in/.test(ch.log) && ch.reader, JSON.stringify(ch));
103
107
  await p.click('#czViewer [data-cz-vw-p="template"]');
104
108
  await until(() => p.evaluate(() => !!document.querySelector('#czViewer .vz[data-panel="template"] [data-rt="fmt|google-doc"]')));
105
109
  await p.click('#czViewer [data-rt="fmt|google-doc"]');
@@ -298,3 +298,15 @@ button.rp-cc { cursor: pointer; }
298
298
  .rp-rfh .rp-bar { justify-content: flex-end; }
299
299
  .rp-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: auto; padding-top: 4px; }
300
300
  .rp-foot .rp-pri { width: 40px; height: 40px; margin: 0; }
301
+
302
+ /* a template's sections and look (canvas TplA, brief 3; public/pm/report-flow.js): chips in order, a small title slide and one line */
303
+ .rf-cps { display: flex; flex-wrap: wrap; gap: 6px; }
304
+ .rf-cp { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 99px; border: 1px solid var(--cz-hair); background: var(--cz-card); color: var(--cz-ink2); font-size: var(--fs-2); }
305
+ .rf-cp[data-k="new"] { border-color: color-mix(in oklab, var(--cz-blue) 55%, transparent); background: var(--cz-bluebg); color: var(--cz-blueink); }
306
+ .rf-cp[data-k="gone"] { border-style: dashed; color: var(--cz-ink3); }
307
+ .rf-lk { display: flex; align-items: center; gap: 12px; }
308
+ .rf-mini { width: 96px; height: 54px; flex: none; border-radius: 7px; display: flex; align-items: flex-end; padding: 6px 7px; box-sizing: border-box; background: linear-gradient(135deg, var(--cz-c-2546b8), var(--cz-c-1b3a9e)); color: var(--cz-c-ffffff); font-size: var(--fs-1); line-height: 1.2; overflow: hidden; }
309
+ .rf-mini[data-k="own"] { background: var(--cz-well2); color: var(--cz-ink); border: 1px solid var(--cz-hair); }
310
+ .rf-lk .rf-fix small { color: var(--cz-ink3); font-size: var(--fs-2); }
311
+ .rf-tplx { padding: 10px 12px; border: 1px solid var(--cz-hair); border-radius: 14px; background: var(--cz-bluebg); }
312
+ .rf-hv em.rf-rest { color: var(--cz-ink2); }
@@ -0,0 +1,38 @@
1
+ /* pm/fetch-share.js — one request for the same answer while it is on its way (page-open-speed).
2
+ *
3
+ * Imported FIRST by the page entries (home-app.js, premium-board.js, premium-insights.js). Parts of a page ask for the same GET on their
4
+ * own, so Home asked for /api/notes three times and /api/settings twice in its opening burst, and the Board asked for /api/board-premium,
5
+ * /api/board-publish, /api/sources and /api/settings twice each (bench 2026-11-02). Every one of them waits on the server's one thread.
6
+ *
7
+ * The rule: a GET to /api/ with the same address as one that is still on its way gets a copy of that one's answer instead of a second
8
+ * request. Nothing is kept once the answer is in, so a later read always asks the server again. Any other method (a press) first drops
9
+ * what is on its way, so a read made after a write never gets an answer that was asked for before it. Only plain same-origin GETs with no
10
+ * body, signal or cache option are shared; everything else goes to fetch as before. */
11
+ const KEY = '__pmosFetchShare';
12
+ if (typeof window !== 'undefined' && typeof window.fetch === 'function' && !window[KEY]) {
13
+ const real = window.fetch.bind(window);
14
+ const flying = new Map(); // url → Promise<Response>
15
+ window[KEY] = { flying };
16
+ window.fetch = function shared(input, init) {
17
+ let url = null, method = 'GET';
18
+ try {
19
+ url = typeof input === 'string' ? input : (typeof URL !== 'undefined' && input instanceof URL ? input.href : null);
20
+ method = String((init && init.method) || (input && typeof input === 'object' && input.method) || 'GET').toUpperCase();
21
+ } catch { url = null; }
22
+ if (method !== 'GET' && method !== 'HEAD') { flying.clear(); return real(input, init); }
23
+ if (!url || method !== 'GET') return real(input, init); // a Request object or a HEAD goes to fetch as before
24
+ if (init && (init.body != null || init.signal || init.cache || init.keepalive)) return real(input, init);
25
+ let abs;
26
+ try { abs = new URL(url, location.href); } catch { return real(input, init); }
27
+ if (abs.origin !== location.origin || !abs.pathname.startsWith('/api/')) return real(input, init);
28
+ const key = abs.href;
29
+ const hit = flying.get(key);
30
+ if (hit) return hit.then((r) => r.clone());
31
+ const p = real(input, init);
32
+ flying.set(key, p);
33
+ const done = () => { if (flying.get(key) === p) flying.delete(key); };
34
+ p.then(done, done);
35
+ return p.then((r) => r.clone());
36
+ };
37
+ }
38
+ export {};
@@ -14,6 +14,7 @@
14
14
  *
15
15
  * The models are in home-data.js and home-list.js (pure). This file reads the routes, draws, and wires the presses. Every write is the PM's
16
16
  * press (pmPost). Nothing here opens the old dialog or links to the console. */
17
+ import './fetch-share.js'; // first: identical GETs in flight are asked once (page-open-speed)
17
18
  import { mountNav } from './cozy-nav.js';
18
19
  import { mountSetupChecklist } from './setup-checklist.js';
19
20
  import { mountOnboard } from './cozy-onboard.js';
@@ -222,7 +223,8 @@ async function load() {
222
223
  // an initiative of another product opened before its board was read (a link, a quick press): read it again from its own board
223
224
  if (S.ini && !S.IM && otherIni(S.ini)) goIni(S.ini, { page: VW.isOpen() });
224
225
  }
225
- /* ── Home's one line (canvas FcPhone, Home: "only when something changed"): the newest grill this week that left findings, from GET /api/grill.
226
+ /* ── Home's one line (canvas FcPhone, Home: "only when something changed"): the newest grill this week that left findings, from GET /api/grill,
227
+ * and how many other initiatives were grilled with it ("I grilled Inline login and 5 more this week: 21 findings.").
226
228
  * "Checkout v2 will miss its date. I grilled it overnight: 3 findings." ✦ opens them on the initiative. Nothing to say is silence. ── */
227
229
  async function loadGrillNews() {
228
230
  const b0 = (S.D.board && S.D.board.board) || {};
@@ -236,6 +238,7 @@ function grillNews() {
236
238
  const row = H.boardRows(S.D).find((r) => r.id === n.ini), title = (row && row.title) || n.ini;
237
239
  const t = n.turn && GW.turnWord(n.turn.to), when = GW.whenWord(n.at), f = n.n + (n.n === 1 ? ' finding' : ' findings');
238
240
  const text = t ? (n.turn.scope === 'goal' ? 'A goal ' + title + ' moves ' + t + '. I grilled it ' + when + ': ' + f + '.' : title + ' ' + t + (t === 'will miss' ? ' its date' : '') + '. I grilled it ' + when + ': ' + f + '.')
241
+ : n.more > 0 ? 'I grilled ' + title + ' and ' + n.more + ' more this week: ' + n.total + ' findings.'
239
242
  : 'I grilled ' + title + ' ' + when + (GW.whyWord(n) ? ', ' + GW.whyWord(n) : '') + ': ' + f + '.';
240
243
  return { id: n.ini, title, text, n: n.n };
241
244
  }
@@ -1052,12 +1055,12 @@ function homeTarget() {
1052
1055
  empty: 'Ask anything about your work. Claude reads your repositories and works in a real Claude Code session.', also: alsoOf(null),
1053
1056
  intro: S.impact ? S.impact.intro : undefined };
1054
1057
  }
1055
- /* Your impact (batch 16 item 7): when a finished week has items not checked yet, Home's own chat opens on Claude's check (GmP1Ledger).
1058
+ /* Your impact (batch 16 item 7; batch 23 item 4, IcA): while last week's check is open, Home's own chat opens on Claude's thank-you card.
1056
1059
  * Off in Settings, or nothing to check: no card. Read after the list is drawn, so it never holds Home up. */
1057
1060
  async function loadImpact() {
1058
1061
  const c = await IMP.readCheck(pmGet).catch(() => null);
1059
1062
  const was = !!S.impact;
1060
- S.impact = c ? { c, intro: IMP.checkIntro(c, { esc, pmPost, done: () => { S.impact = null; drawList(); } }) } : null;
1063
+ S.impact = c ? { c, intro: IMP.checkIntro(c, { esc, pmPost }) } : null;
1061
1064
  const cur = chat.current && chat.current();
1062
1065
  if ((was || S.impact) && cur && cur.key === 'chat:main') { chat.open(homeTarget()); }
1063
1066
  if (was || S.impact) drawList();
@@ -1583,6 +1586,19 @@ function menCtx() {
1583
1586
  drawList(); chat.focus();
1584
1587
  } };
1585
1588
  }
1589
+ /* A conversation about one item that names its own context (a report's chat icon, report-flow.js chatOf): Home's chat opens on it, the Viewer
1590
+ * stays beside it (on a phone the chat takes the page). Another page hands it over through sessionStorage with ?about=<its key>. */
1591
+ function chatAbout(t) {
1592
+ S.phoneChat = isPhone(); if (isPhone()) VW.close();
1593
+ openTarget({ ...homeTarget(), key: t.key, title: t.title, scope: { text: 'Report · ' + t.title, icon: I.chat }, intro: t.intro ? { role: CLAUDE, text: t.intro } : undefined,
1594
+ placeholder: t.placeholder || 'Message Claude', context: t.context });
1595
+ drawList(); chat.focus();
1596
+ }
1597
+ addEventListener('pmos-chat-about', (e) => { const t = e.detail; if (!t || !/^pop:[A-Za-z0-9][A-Za-z0-9._:-]{0,100}$/.test(String(t.key)) || !t.context) return; e.preventDefault(); chatAbout(t); });
1598
+ function aboutHanded(key) {
1599
+ let t = null; try { t = JSON.parse(sessionStorage.getItem('pmos-chat-about') || 'null'); sessionStorage.removeItem('pmos-chat-about'); } catch { return null; }
1600
+ return t && t.key === key && t.context ? t : null;
1601
+ }
1586
1602
  function recLive() {
1587
1603
  if (!REC) return null;
1588
1604
  const h = REC.holding && REC.holding();
@@ -1949,6 +1965,7 @@ load().then(() => {
1949
1965
  const say = (P.get('say') || P.get('q') || '').slice(0, 500);
1950
1966
  const asked = !ask ? '' : /^board:/.test(ask) ? ask : /^(insights|verdict)$/.test(ask) ? 'ins:' + ask : 'init:' + ask;
1951
1967
  const about = KEY.test(P.get('about') || '') ? P.get('about') : KEY.test(asked) ? asked : null;
1968
+ const handed = about && /^pop:/.test(about) ? aboutHanded(about) : null;
1952
1969
  if (isPhone() && ((open && !blockOpen) || sid || about)) { S.phoneChat = true; drawList(); } // the conversation the address names, not the list
1953
1970
  if (open && !blockOpen) {
1954
1971
  // ?item=pt:<program>:<key> (the program panel's link to a program task) names the row by its id; Home lists no task, so the chat opens
@@ -1960,6 +1977,7 @@ load().then(() => {
1960
1977
  else if (about && /^init:/.test(about) && iniRowOf(P.get('vid') || about.slice(5))) { const id = iniRowOf(P.get('vid')) ? P.get('vid') : about.slice(5); goIni(id).then(() => { if (P.get('vk') && S.ini === id && !isPhone()) iniOverview(); }); }
1961
1978
  // the Board's program panel Discuss in chat names board:program:<id>: the program's own conversation, the one its tasks open (bug 2026-10-24)
1962
1979
  else if (about && /^board:program:[A-Za-z0-9][A-Za-z0-9._-]{0,100}$/.test(about)) openTarget(programTarget(about.slice(14)));
1980
+ else if (handed) chatAbout(handed); // a report's chat icon on another page
1963
1981
  else if (about) { openTarget({ ...homeTarget(), key: about, title: (P.get('label') || '').slice(0, 80) || about }); discussed(about, P.get('vid'), P.get('label')); }
1964
1982
  else if (P.get('view') === 'metrics') openMetrics(P.get('ws') || ''); // ?view=metrics: an old link lands on Intelligence › Delivery trends
1965
1983
  else if (S.ini) goIni(S.ini);
@@ -15,7 +15,7 @@
15
15
  * started, POST /ask and /press) or a session with no chat key (GET /api/sessions/conversation?id=, POST /api/session/say and /keys).
16
16
  * A loose session the host can place (host.suggestLink(target, firstText) → { id, title }) shows one chip: Link it (host.linkTo) or × (host.dismissLink).
17
17
  * Every write is the PM's press. mountChat(el, host) returns { open(target), refresh(), focus(), send(text) }.
18
- * target: { key?, sid?, title, scope: { text, icon, loose }, role: { name, initial }, intro?: { role, text, at, pills: [{ label, primary, go }] },
18
+ * target: { key?, sid?, title, scope: { text, icon, loose }, role: { name, initial }, intro?: { role, text, at, mood? (Adler as the avatar while the log is empty), pills: [{ label, primary, go }] },
19
19
  * ini?, rich, also?: { text, go } }
20
20
  * host: { esc, toast, pmGet, pmPost, roles(), seen(key), markSeen(key), onScope(btn), onLink(btn), onTo(btn), workItem(text, target),
21
21
  * viewerClosed(), reopenViewer(), head(target), touch(sid) (the PM opened, typed in or answered that session: the Live pill) } */
@@ -138,11 +138,12 @@ export function mountChat(el, host) {
138
138
  if (a.kind === 'reach' && R.stop && R.stop.reach && it.mi === R.lastMsg) return '';
139
139
  return kindCardHtml(a, { live, role: R.role.name });
140
140
  }
141
- function introHtml(o) {
141
+ /** alone: nothing else in the log yet, so an intro with a mood shows Adler as Claude's avatar (one Adler: a reply takes him over). */
142
+ function introHtml(o, alone = true) {
142
143
  if (!o) return '';
143
144
  const r = o.role || { name: 'Claude', initial: 'C' };
144
145
  const card = o.card && typeof o.card.html === 'function' ? o.card.html() : '';
145
- return `<div class="hm-a">${avHtml(r)}<div class="hm-ab"><p class="hm-who"><b>${esc(r.name)}</b> <span class="hm-say">${esc(o.text)}</span></p>${card ? `<div class="hm-icard">${card}</div>` : ''}</div></div>`
146
+ return `<div class="hm-a">${o.mood && alone && isClaude(r) ? adlerAvHtml(o.mood) : avHtml(r)}<div class="hm-ab"><p class="hm-who"><b>${esc(r.name)}</b> <span class="hm-say">${esc(o.text)}</span></p>${card ? `<div class="hm-icard">${card}</div>` : ''}</div></div>`
146
147
  + (o.pills && o.pills.length ? `<div class="hm-pills">${o.pills.map((p, i) => `<button type="button" class="${p.primary ? 'pri' : ''}" data-hm-pill="${i}"${p.disabled ? ' disabled' : ''}>${esc(p.label)}</button>`).join('')}</div>` : '');
147
148
  }
148
149
  /** Claude's question card (AskUserQuestion), answerable until the PM writes again. */
@@ -204,7 +205,7 @@ export function mountChat(el, host) {
204
205
  const goal = C.th && C.th.goal;
205
206
  const parts = items.map((it, i) => msgHtml(it, i, R));
206
207
  placeDivider(parts, items, goal);
207
- let html = (t.intro && !(t.intro.onlyEmpty && items.length) ? introHtml(t.intro) : '') + parts.join('') + askHtml(R) + (R.stop && R.lastAgent < 0 ? dividerHtml(R.stop) : '') + queuedHtml();
208
+ let html = (t.intro && !(t.intro.onlyEmpty && items.length) ? introHtml(t.intro, !items.length) : '') + parts.join('') + askHtml(R) + (R.stop && R.lastAgent < 0 ? dividerHtml(R.stop) : '') + queuedHtml();
208
209
  html += GU.choiceHtml(); // /goal while a goal works here: In a new chat, or Here instead
209
210
  if (C.th && C.th.working) html += `<p class="hm-note" role="status">The agent is answering. You can write again when it has.</p>`;
210
211
  if (C.conv && C.conv.state === 'ended') html += '<p class="hm-note">This session has ended. Your conversation is kept here, and your next message picks it up.</p>';
@@ -1,16 +1,26 @@
1
- /* pm/home-impact.css — the weekly check of Your impact in Home's chat (feedback batch 16 item 7, canvas GmP1Ledger). pm/home-impact.js. */
2
- .im-card { clear: both; margin-top: 8px; padding: 4px 14px 8px; } /* under Claude's line, never beside it (the line floats on a desk) */
3
- .im-list { list-style: none; margin: 0; padding: 0; }
4
- .im-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--cz-hair); }
5
- .im-row:first-child { border-top: 0; }
6
- .im-row.im-off .im-t { color: var(--cz-ink3); text-decoration: line-through; }
7
- .im-k { width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; flex: none; background: var(--cz-well); color: var(--cz-ink2); }
8
- .im-k.im-thanks { background: var(--cz-bluebg); color: var(--cz-blueink); }
1
+ /* pm/home-impact.css — the weekly check of Your impact in Home's chat (batch 16 item 7; batch 23 item 4, canvas IcA). pm/home-impact.js. */
2
+ .im-card { clear: both; margin-top: 10px; max-width: 600px; } /* under Claude's line, never beside it (the line floats on a desk) */
3
+ .im-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
4
+ .im-q { position: relative; display: flex; align-items: flex-start; gap: 10px; padding: 12px 8px 12px 16px; border-radius: 18px; background: var(--cz-bluebg); }
5
+ .im-k { flex: none; display: inline-flex; margin-top: 2px; color: var(--cz-blueink); }
9
6
  .im-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
10
- .im-t { font-size: var(--fs-4); overflow-wrap: anywhere; }
11
- .im-src { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
7
+ .im-t { font-size: var(--fs-4); font-weight: 700; line-height: 1.35; color: var(--cz-ink); overflow-wrap: anywhere; }
8
+ .im-w { font-size: var(--fs-3); color: var(--cz-ink2); overflow-wrap: anywhere; }
9
+ .im-src { display: inline-flex; align-items: center; gap: 4px; margin-top: 2px; font-size: var(--fs-2); color: var(--cz-ink3); text-decoration: none; }
12
10
  .im-src:hover { text-decoration: underline; }
13
11
  .im-src svg, .im-lock svg { flex: none; }
14
- .im-foot { display: flex; align-items: center; gap: 8px; padding-top: 8px; }
15
- .im-lock { flex: 1; display: inline-flex; align-items: center; gap: 6px; }
16
- @media (prefers-reduced-motion: no-preference) { .im-row { transition: opacity .2s ease; } }
12
+ .im-mw { position: relative; flex: none; }
13
+ .im-more { width: 28px; height: 28px; color: var(--cz-ink2); }
14
+ .ut-ib.im-more svg { stroke-width: 3.2; }
15
+ .im-pop { position: absolute; right: 0; top: 32px; z-index: 5; padding: 4px; border-radius: 14px; background: var(--cz-card); box-shadow: 0 14px 34px -14px rgba(42, 46, 53, .4), 0 0 0 1px var(--cz-hair); }
16
+ .im-pop button { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border: 0; border-radius: 10px; background: none; color: var(--cz-ink); font: inherit; font-size: var(--fs-3); font-weight: 600; white-space: nowrap; cursor: pointer; }
17
+ .im-pop button:hover, .im-pop button:focus-visible { background: var(--cz-well); }
18
+ .im-pop svg { width: 15px; height: 15px; }
19
+ .im-q.im-gone { align-items: center; padding: 8px 8px 8px 16px; background: var(--cz-well); color: var(--cz-ink3); font-size: var(--fs-3); }
20
+ .im-gt { flex: 1; min-width: 0; overflow-wrap: anywhere; }
21
+ .im-undo { flex: none; height: 32px; padding: 0 12px; border: 0; border-radius: 999px; background: none; color: var(--cz-blueink); font: inherit; font-size: var(--fs-3); font-weight: 700; cursor: pointer; }
22
+ .im-undo:hover { background: var(--cz-card); }
23
+ .im-lock { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; font-size: var(--fs-2); color: var(--cz-ink3); }
24
+ .im-msg { margin: 4px 0 0; font-size: var(--fs-2); color: var(--cz-ink3); }
25
+ .im-msg:empty { display: none; }
26
+ @media (prefers-reduced-motion: no-preference) { .im-q { transition: background-color .2s ease; } }
@@ -1,12 +1,14 @@
1
- /* pm/home-impact.js — the weekly check of "Your impact" in Home's chat (feedback batch 16 item 7, Phase 1; canvas In development GmP1Ledger).
2
- * After a week ends, Claude lists that week's items and asks whether each is real: ✕ or ✓ on each row, ✓✓ for every row not checked yet.
3
- * Only ✓ items count. Each row links to its source. No number is shown. The card is Home's own chat intro while the check is due; it goes
4
- * when every row is checked.
1
+ /* pm/home-impact.js — the weekly check of "Your impact" in Home's chat (feedback batch 16 item 7; rebuilt batch 23 item 4, canvas IcA).
2
+ * After a week ends, Claude shows that week's items as thank-you bubbles: the quote in bold, who and what, the source link. They count by
3
+ * default: nothing needs a ✓. One quiet ⋯ per row holds "Not right, drop it"; a dropped row says so with Undo. The lock line is a quiet
4
+ * footer. No number is shown. The card is Home's own chat intro for the whole week after (lib/impact.js: when it ends, rows nobody dropped
5
+ * are real); the first time it is drawn, the page says so (looked), and the row under Mentions goes.
5
6
  *
6
7
  * readCheck(pmGet) → the GET /api/impact/check body when a check is due, else null
7
- * checkIntro(c, { esc, pmPost, done }) → the intro of Home's chat: { role, text, card: { html, press } }
8
- * rowHtml(c, { esc, sel }) → the one row under Mentions while the check is due: a tap opens Home's chat on it (on a phone too). No count.
9
- * Writes: POST /api/impact/verdict { id, real }, /verdict-all { week }, /undo { id } (page presses). Nothing leaves PMOS. */
8
+ * partsOf(item) → { quote, what }: the bold line (the words in quotes, else the item's sentence) and the who/what line
9
+ * checkIntro(c, { esc, pmPost }) → the intro of Home's chat: { role, mood, text, card: { html, press } }
10
+ * rowHtml(c, { esc, sel }) → the one row under Mentions until the card is seen: a tap opens Home's chat on it (on a phone too). No count.
11
+ * Writes: POST /api/impact/verdict { id, real: false }, /undo { id }, /looked { week }. Nothing leaves PMOS. */
10
12
 
11
13
  const SV = (d, w = 18) => `<svg aria-hidden="true" width="${w}" height="${w}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="${d}"/></svg>`;
12
14
  const P = {
@@ -14,7 +16,7 @@ const P = {
14
16
  unblock: 'M7 11V8a5 5 0 0 1 9.6-2M5 11h14v9H5z',
15
17
  used: 'M12 3l8 9-8 9-8-9z',
16
18
  kr: 'M4 17l6-6 4 4 6-7M15 8h5v5',
17
- no: 'M6 6l12 12M18 6L6 18', yes: 'M5 12l5 5 9-10', all: 'M18 6L7 17l-5-5M22 10l-7.5 7.5L13 16',
19
+ no: 'M6 6l12 12M18 6L6 18', yes: 'M5 12l5 5 9-10', dots: 'M5 12h.01M12 12h.01M19 12h.01',
18
20
  lock: 'M7 11V8a5 5 0 0 1 10 0v3M5 11h14v9H5z', open: 'M14 4h6v6M20 4l-9 9M18 14v6H4V6h6',
19
21
  };
20
22
  const DAYS = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
@@ -26,47 +28,62 @@ export async function readCheck(pmGet) {
26
28
  }
27
29
 
28
30
  export function rowHtml(c, { esc, sel }) {
29
- if (!c) return '';
31
+ if (!c || c.looked) return '';
30
32
  return `<div class="hv-card hr-card hr-men-card"><div class="hm-r hv-r hr-men${sel ? ' sel' : ''}" data-id="impact">`
31
33
  + `<button type="button" class="hm-rm" data-hr-impact${sel ? ' aria-current="true"' : ''} aria-label="Your impact: ${esc(c.label.toLowerCase())} is ready to check">`
32
34
  + `<span class="hv-mk hr-at" aria-hidden="true">${SV(P.yes, 16)}</span><span class="hm-rt"><b>Your impact</b><small class="hr-sub">${esc(c.label)} is ready to check</small></span>`
33
35
  + '<span class="hv-xc" aria-hidden="true"></span></button></div></div>';
34
36
  }
35
37
 
36
- export function checkIntro(c, { esc, pmPost, done }) {
37
- const st = { c, msg: '' };
38
- const left = () => st.c.items.filter((x) => x.real === null);
38
+ const QUOTE = /[“"]([^”"]{2,})[”"]/;
39
+ /** The bold line is the thanks in the person's own words when the item quotes them; the line under it says who and what. */
40
+ export function partsOf(x) {
41
+ const t = String((x && x.text) || ''), who = String((x && x.who) || ''), m = QUOTE.exec(t);
42
+ if (!m) return { quote: t, what: who };
43
+ const rest = t.replace(m[0], ' ').replace(/^[\s:—–-]+|[\s:—–-]+$/g, '').replace(/\s+/g, ' ').trim();
44
+ return { quote: `“${m[1].trim()}”`, what: rest && rest !== who ? rest : who };
45
+ }
46
+
47
+ export function checkIntro(c, { esc, pmPost }) {
48
+ const st = { c, msg: '', menu: null, told: !!c.looked };
39
49
  const row = (x) => {
40
- const mark = x.real === null
41
- ? `<button type="button" class="ut-ib lg" data-im-v="no" data-im-id="${esc(x.id)}" aria-label="Not real, drop it" title="Not real, drop it">${SV(P.no)}</button>`
42
- + `<button type="button" class="ut-ib pri" data-im-v="yes" data-im-id="${esc(x.id)}" aria-label="Real, keep it" title="Real, keep it">${SV(P.yes)}</button>`
43
- : `<button type="button" class="ut-ib lg on" data-im-undo="${esc(x.id)}" aria-pressed="true" aria-label="${x.real ? 'Kept as real. Undo' : 'Dropped. Undo'}" title="${x.real ? 'Kept as real. Undo' : 'Dropped. Undo'}">${SV(x.real ? P.yes : P.no)}</button>`;
44
- return `<li class="im-row${x.real === false ? ' im-off' : ''}"><span class="im-k im-${esc(x.kind)}" aria-hidden="true">${SV(P[x.kind] || P.used)}</span>`
45
- + `<span class="im-tx"><span class="im-t">${esc(x.text)}</span><a class="ut-small ut-mut im-src" href="${esc(x.source.url)}" target="_blank" rel="noopener noreferrer">${esc(x.source.label)} · ${esc(dayName(x.at))} ${SV(P.open, 12)}</a></span>${mark}</li>`;
50
+ const { quote, what } = partsOf(x);
51
+ const src = `<a class="im-src" href="${esc(x.source.url)}" target="_blank" rel="noopener noreferrer">${esc(x.source.label)} · ${esc(dayName(x.at))} ${SV(P.open, 11)}</a>`;
52
+ if (x.real === false) {
53
+ return `<li class="im-q im-gone"><span class="im-gt">Dropped, not counted: ${esc(quote)}</span>`
54
+ + `<button type="button" class="im-undo" data-im-undo="${esc(x.id)}">Undo</button></li>`;
55
+ }
56
+ const open = st.menu === x.id;
57
+ return `<li class="im-q"><span class="im-k im-${esc(x.kind)}" aria-hidden="true">${SV(P[x.kind] || P.used)}</span>`
58
+ + `<span class="im-tx"><span class="im-t">${esc(quote)}</span>${what ? `<span class="im-w">${esc(what)}</span>` : ''}${src}</span>`
59
+ + `<span class="im-mw"><button type="button" class="ut-ib im-more" data-im-more="${esc(x.id)}" aria-haspopup="menu" aria-expanded="${open}" aria-label="More" title="More">${SV(P.dots, 16)}</button>`
60
+ + (open ? `<span class="im-pop" role="menu"><button type="button" role="menuitem" data-im-drop="${esc(x.id)}">${SV(P.no, 15)} Not right, drop it</button></span>` : '')
61
+ + '</span></li>';
46
62
  };
47
63
  const html = () => {
48
- const open = left();
49
- return `<div class="ut-card im-card" role="group" aria-label="Your impact, ${esc(st.c.label.toLowerCase())}">`
64
+ if (!st.told) { st.told = true; st.c.looked = true; Promise.resolve(pmPost('/api/impact/looked', { week: st.c.week })).catch(() => {}); }
65
+ return `<div class="im-card" role="group" aria-label="Your impact, ${esc(st.c.label.toLowerCase())}">`
50
66
  + `<ul class="im-list">${st.c.items.map(row).join('')}</ul>`
51
- + `<div class="im-foot"><span class="ut-small ut-mut im-lock">${SV(P.lock, 14)} Only you see this. Nothing leaves PMOS.</span>`
52
- + (open.length > 1 ? `<button type="button" class="ut-ib pri" data-im-all aria-label="All real, keep them all" title="All real, keep them all">${SV(P.all)}</button>` : '')
53
- + `</div><p class="ut-small ut-mut" role="status">${esc(st.msg)}</p></div>`;
67
+ + `<p class="im-lock">${SV(P.lock, 13)} Only you see this. Nothing leaves PMOS.</p>`
68
+ + `<p class="im-msg" role="status">${esc(st.msg)}</p></div>`;
54
69
  };
55
70
  const press = async (b) => {
56
71
  const d = b.dataset;
72
+ if (d.imMore) { st.menu = st.menu === d.imMore ? null : d.imMore; return true; }
57
73
  let r = null;
58
- if (d.imV) r = await pmPost('/api/impact/verdict', { id: d.imId, real: d.imV === 'yes' });
74
+ if (d.imDrop) r = await pmPost('/api/impact/verdict', { id: d.imDrop, real: false });
59
75
  else if (d.imUndo) r = await pmPost('/api/impact/undo', { id: d.imUndo });
60
- else if ('imAll' in d) r = await pmPost('/api/impact/verdict-all', { week: st.c.week });
61
76
  else return false;
77
+ st.menu = null;
62
78
  if (!r || !r.ok) { st.msg = (r && r.error) || 'Not saved.'; return true; }
63
- if (d.imV) { const x = st.c.items.find((y) => y.id === d.imId); if (x) x.real = d.imV === 'yes'; }
64
- else if (d.imUndo) { const x = st.c.items.find((y) => y.id === d.imUndo); if (x) x.real = null; }
65
- else for (const x of st.c.items) if (x.real === null) x.real = true;
66
- st.msg = left().length ? '' : 'Thank you. This week is checked.';
67
- if (!left().length && done) done();
79
+ const x = st.c.items.find((y) => y.id === (d.imDrop || d.imUndo));
80
+ if (x) x.real = d.imDrop ? false : null;
81
+ st.msg = '';
68
82
  return true;
69
83
  };
70
- const short = c.gate === 'short' ? ' Too many of these were not real, so I keep your sprout and your log hidden for now.' : '';
71
- return { role: { key: 'claude', name: 'Claude', initial: 'C' }, text: `Here’s what I’d count as your impact ${c.label === 'Last week' ? 'last week' : c.label.replace(/^Week of/, 'the week of')}. Is each one real? I read these from your sources. I don’t post anything anywhere.${short}`, card: { html, press } };
84
+ const thanks = c.items.some((x) => x.kind === 'thanks');
85
+ const when = c.label === 'Last week' ? 'last week' : c.label.replace(/^Week of/, 'the week of');
86
+ const short = c.gate === 'short' ? ' Too many of these were not right, so I keep your sprout and your log hidden for now.' : '';
87
+ return { role: { key: 'claude', name: 'Claude', initial: 'C' }, mood: 'handled',
88
+ text: `${thanks ? 'People thanked you' : 'Your work moved things'} ${when}. I read these from your sources and counted them in your impact.${short}`, card: { html, press } };
72
89
  }
@@ -126,6 +126,8 @@ button.hi-pill { cursor: pointer; }
126
126
  /* ── the initiative's page in the Viewer (canvas HbCDesk, HbCNew, HbCPhone): the stage card, three tasks, the documents that need a look ── */
127
127
  .hi-page { display: flex; flex-direction: column; gap: 14px; }
128
128
  .hi-page .hm-pcard { margin: 0; }
129
+ /* a phone (batch 23 item 5, canvas PmA): the Viewer's own 16 px is the page's one inset */
130
+ @media (max-width: 760px) { .hi-v.hi-page { padding-left: 0; padding-right: 0; } }
129
131
  .hi-pg { display: flex; flex-direction: column; gap: 2px; }
130
132
  .hi-pgh { display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 4px; }
131
133
  .hi-pgh b { font-size: var(--fs-3); font-weight: 800; color: var(--cz-ink); }
@@ -1060,6 +1060,61 @@ button.iv-mt.iv-wf { padding: 0 !important; margin: 0 !important; }
1060
1060
  .shut-mc .iv-tel { min-height: 0; }
1061
1061
  .ab-sum .nm { display: none; }
1062
1062
  }
1063
+ /* ── a phone (batch 23 item 5, canvas PmA, agreed 2026-11-02): one 16 px inset and no beige wrapper; a shorter mission; the way to finish and About
1064
+ * as one white card of 48 px rows (the next stage with its round →, which opens the Move sheet; the people and the program; About); 36 px pills in
1065
+ * the Tasks header; task rows 12 px in, and a stage's late and open counts on its dates line. A desktop is unchanged. ── */
1066
+ .iv-gx-t .tx.ph, .iv-ws .n-in { display: none; }
1067
+ @media (max-width: 760px) {
1068
+ .iv-mc { background: transparent; padding: 0; border-radius: 0; gap: 0; }
1069
+ .iv-mc-row { display: contents; }
1070
+ .iv-mc > .iv-mc-top { margin-bottom: 12px; border: 1px solid var(--cz-hair); }
1071
+ .iv-mc .iv-tel { min-height: 128px; border-radius: 22px; }
1072
+ .iv-mc:not(.shut-mc) .iv-tel { margin-bottom: 12px; }
1073
+ .iv-mc .iv-tel-ct { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0 12px; padding: 12px 56px 12px 16px; }
1074
+ .iv-mc .iv-tel-t { display: contents; }
1075
+ .iv-mc .iv-tel-ct .iv-shn { flex-basis: 100%; min-height: 36px; }
1076
+ .iv-tel .iv-dtc { min-height: 24px; font-size: var(--fs-2); }
1077
+ .iv-tel .iv-setd { min-height: 36px; }
1078
+ .iv-ro { gap: 16px; padding-top: 0; }
1079
+ .iv-ro > div { flex-direction: row; align-items: baseline; gap: 4px; }
1080
+ .iv-ro small { font-size: var(--fs-2); font-weight: 700; letter-spacing: 0; }
1081
+ .iv-ro b { font-size: var(--fs-3); }
1082
+ .iv-ro b i { font-size: var(--fs-2); }
1083
+ /* the readouts on the dates line say where today is; the art's own Today label would sit on them */
1084
+ .iv-tel .mi-tx.now { display: none; }
1085
+ /* the one card: the way to finish on top, About under it */
1086
+ .iv-gx, .iv-ab { border: 1px solid var(--cz-hair); }
1087
+ .iv-gx { border-radius: 22px 22px 0 0; border-bottom: 0; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "t a" "l l" "f f"; }
1088
+ .iv-ab { border-radius: 0 0 22px 22px; }
1089
+ .iv-gx-t { padding: 4px 0 4px 10px !important; min-height: 56px; gap: 6px; }
1090
+ .iv-gx-t .chev { width: 16px; }
1091
+ .iv-gx[data-ph] .iv-gx-t .tx.dk, .iv-gx[data-ph] .iv-gx-c { display: none; }
1092
+ .iv-gx-t .tx.ph { display: flex; }
1093
+ .iv-gx-t .tx b { font-size: var(--fs-3); overflow: hidden; text-overflow: ellipsis; }
1094
+ .iv-gx-c { grid-area: a; }
1095
+ .iv-gx-a { padding: 0 8px 0 4px; }
1096
+ .iv-gx[data-ph] .iv-gx-a .iv-scgo { flex: none; width: 40px; height: 40px; padding: 0 !important; justify-content: center !important; }
1097
+ .iv-gx[data-ph] .iv-gx-a .iv-scgn { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
1098
+ .iv-gx-ft { padding: 0 8px; min-height: 48px; display: flex; align-items: center; }
1099
+ .iv-gx .iv-meta { flex: 1; }
1100
+ .iv-gx .iv-prog { margin-left: auto !important; }
1101
+ .iv-ab-h { min-height: 48px; padding: 0 14px !important; }
1102
+ /* Tasks: 36 px pills (a 44 px press under each), rows 12 px in, the counts on the dates line */
1103
+ .hi-v .iv-th button { min-height: 36px; height: 36px; position: relative; }
1104
+ .hi-v .iv-th button::after { content: ""; position: absolute; left: 0; right: 0; top: -4px; bottom: -4px; }
1105
+ .iv-ws { padding-left: 12px !important; }
1106
+ .iv-ws.in { padding-left: 12px !important; }
1107
+ .iv-ws > .n { display: none; }
1108
+ .iv-ws .n-in { display: inline; }
1109
+ .iv-ws .n-in.w { color: var(--cz-risk); font-weight: 700; }
1110
+ .iv-ws.pl > .iv-cv { margin-left: 40px; }
1111
+ .iv-wbs > .iv-ws + .iv-ws::before, .iv-wbs > .iv-wl + .iv-ws::before, .iv-wl > .iv-ws + .iv-ws::before, .iv-wl > .iv-wl + .iv-ws::before, .iv-wbs > * + :is(.iv-wsw, .ig-dz)::before, .iv-wbs > :is(.iv-wsw, .ig-dz) + .iv-ws::before { left: 12px; }
1112
+ .iv-wl { padding: 0 12px 6px 12px; }
1113
+ .iv-wl > .iv-ws.in { margin-left: -12px; width: calc(100% + 24px); }
1114
+ .iv-tr.iv-ed { margin: 0 -12px; padding: 10px 12px 12px !important; width: calc(100% + 24px); }
1115
+ .iv-addin { margin: 0 -12px; padding: 10px 12px 4px; }
1116
+ .iv-addd { margin: 0 -12px; padding: 4px 12px 12px; }
1117
+ }
1063
1118
  html.ad-still .iv-mc-top.adl, html.ad-still .iv-mc-top.adl .iv-ask .ad-svg { animation: none !important; }
1064
1119
  @media (prefers-reduced-motion: reduce) { .iv-mc-top.adl, .iv-mc-top.adl .iv-ask .ad-svg { animation: none !important; } }
1065
1120
 
@@ -165,7 +165,10 @@ function gatesHtml(v, o, pri, open) {
165
165
  const rows = G.open.length ? `<div class="iv-gx-l" role="list">${G.open.slice(0, 3).map(row).join('')}${G.open.length > 3 ? `<p class="iv-gx-dn">${G.open.length - 3} more in Tasks</p>` : ''}${G.done ? `<p class="iv-gx-dn">${plural(G.done, 'milestone', 'milestones')} done</p>` : ''}</div>`
166
166
  : G.done ? `<div class="iv-gx-l"><p class="iv-gx-dn">${plural(G.done, 'milestone', 'milestones')} done</p></div>` : '';
167
167
  const title = st.line && st.line.finished ? 'This stage is done' : 'To finish this stage';
168
- return `<section class="iv-gx" aria-label="${esc(title)}"><button type="button" class="iv-gx-t" data-iv-mc="gx" aria-expanded="${!!open}"><span class="chev" aria-hidden="true">${SVG(CHEV, 16, 2)}</span><span class="tx"><b>${title}</b>${sub ? `<span class="s">${esc(sub)}</span>` : ''}</span></button>`
168
+ // a phone (batch 23 item 5, canvas PmA) reads the row as the next stage and the count, with the round → beside it; the text above is the desktop's
169
+ const cnt = st.nTotal ? st.doneOf || st.nDone + ' of ' + st.nTotal + ' done' : '';
170
+ const ph = st.next ? `<span class="tx ph"><b>${esc('Next: ' + (st.next.ms ? '◆ ' : '') + st.next.name)}</b>${cnt ? `<span class="s">${esc(cnt)}</span>` : ''}</span>` : '';
171
+ return `<section class="iv-gx"${ph ? ' data-ph' : ''} aria-label="${esc(title)}"><button type="button" class="iv-gx-t" data-iv-mc="gx" aria-expanded="${!!open}"><span class="chev" aria-hidden="true">${SVG(CHEV, 16, 2)}</span><span class="tx dk"><b>${title}</b>${sub ? `<span class="s">${esc(sub)}</span>` : ''}</span>${ph}</button>`
169
172
  + `${st.nTotal ? `<span class="iv-gx-c">${pipsOf(st)}<small>${esc(st.doneOf || st.nDone + ' of ' + st.nTotal + ' done')}</small></span>` : ''}<div class="iv-gx-a">${nextHtml(st, o, pri)}</div>${open ? rows : ''}<div class="iv-gx-ft">${metaHtml(s, o)}</div></section>`;
170
173
  }
171
174
  function ctrlHtml(v, o = {}) {
@@ -305,7 +308,7 @@ function sectionHtml(v, sec, o, inner) {
305
308
  const name = sec.label || sec.name;
306
309
  const plus = st && op && has ? ED.plusHtml(sec, v.id || v.key || '', o) : '';
307
310
  const row = `<button type="button" class="iv-ws${sec.kind === 'past' || sec.kind === 'later' ? ' mut' : ''}${inner ? ' in' : ''}${plus ? ' pl' : ''}"${st ? ` data-iv-sec="${sk}"` : ''} ${has ? `data-iv-fold="${esc(key)}" aria-expanded="${op}"` : 'disabled'}>${markOf(sec)}`
308
- + `<span class="w"><b>${esc(name)}</b>${sec.sub ? `<small class="${sec.subWarn ? 'w' : ''}">${esc(sec.sub)}</small>` : ''}</span>${sec.epicKey ? `<span class="ig-key">${esc(sec.epicKey)}</span>` : ''}${sec.count ? `<span class="n${sec.warn ? ' w' : ''}">${esc(sec.count)}</span>` : ''}${has ? chev(op) : ''}</button>`;
311
+ + `<span class="w"><b>${esc(name)}</b>${sec.sub || sec.count ? `<small class="${sec.subWarn ? 'w' : ''}">${esc(sec.sub || '')}${sec.count ? `<span class="n-in${sec.warn ? ' w' : ''}">${sec.sub ? ' · ' : ''}${esc(sec.count)}</span>` : ''}</small>` : ''}</span>${sec.epicKey ? `<span class="ig-key">${esc(sec.epicKey)}</span>` : ''}${sec.count ? `<span class="n${sec.warn ? ' w' : ''}">${esc(sec.count)}</span>` : ''}${has ? chev(op) : ''}</button>`;
309
312
  // a group's own presses sit beside its fold: ⋯ on the PM's own group, the send icon on an epic (batch 11 item 20)
310
313
  const tools = G.toolsHtml(sec) + plus, head = tools ? `<div class="iv-wsw">${row}${tools}</div>` : row;
311
314
  // the PM's own groups and Not in a group take a dragged task
@@ -17,6 +17,7 @@
17
17
  * Workflows (D99, workflows-per-initiative: WfABoard WfABoardOne WfATrack WfAElse WfAPhone; pm/bd-wf.js): every initiative is on one workflow. The
18
18
  * chip row picks one (its own stages become the columns and the track's header) or All (the three categories, each row its own stages).
19
19
  * Where no record holds a value for an initiative, the element says so: nothing is invented. */
20
+ import './fetch-share.js'; // first: identical GETs in flight are asked once (page-open-speed)
20
21
  import { pmPost } from './http.js';
21
22
  import { followDoc } from './doc-follow.js';
22
23
  import { $, $$, esc, store, chatAbout, setPageGaps } from './premium-shell.js';
@@ -28,6 +28,7 @@
28
28
  * IsPhone the goal detail full screen with Readings, Moved by and Dashboards; a report setup as a sheet.
29
29
  * window.czViewer is feature-detected, with this page's side panel as the fallback. A report file opens in the report reader
30
30
  * (pm/premium-report-read.js), the report panel in the Viewer card. The page has no #dlg. */
31
+ import './fetch-share.js'; // first: identical GETs in flight are asked once (page-open-speed)
31
32
  import { $, $$, esc, toast, wireRail, setPageGaps } from './premium-shell.js';
32
33
  import { pmPost, pmGet } from './http.js';
33
34
  import * as GW from './grill-words.js'; // Grill and Forecast screens (canvas FcIntel): the goal that will miss, and what Claude's grill found