create-pmos 0.423.0 → 0.425.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 (97) hide show
  1. package/package.json +25 -25
  2. package/payload/KIT-VERSION +2 -2
  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/payload/state/log.md +1 -1
  7. package/workspace/board-programs-test.js +41 -26
  8. package/workspace/briefing-premium-board-test.js +7 -4
  9. package/workspace/briefing-premium-insights-test.js +31 -15
  10. package/workspace/briefing-premium-products-test.js +62 -46
  11. package/workspace/changelog.json +24 -0
  12. package/workspace/guide/briefing-premium.md +3 -2
  13. package/workspace/guide/claude-proposes.md +37 -0
  14. package/workspace/guide/home.md +2 -2
  15. package/workspace/guide/index.md +2 -0
  16. package/workspace/guide/notes.md +39 -1
  17. package/workspace/guide/present-in-a-meeting.md +57 -0
  18. package/workspace/guide/programs.md +2 -2
  19. package/workspace/home-pill-test.js +138 -0
  20. package/workspace/lib/briefing-premium-products.js +18 -4
  21. package/workspace/lib/headless.js +14 -1
  22. package/workspace/lib/meeting-focus.js +64 -14
  23. package/workspace/lib/pmos-verbs.js +3 -0
  24. package/workspace/lib/proposal-runs.js +148 -0
  25. package/workspace/lib/proposals.js +370 -0
  26. package/workspace/lib/propose-cli.js +96 -0
  27. package/workspace/lib/route-modules.js +1 -0
  28. package/workspace/lib/routes-board-premium.js +11 -0
  29. package/workspace/lib/routes-boards.js +1 -1
  30. package/workspace/lib/routes-briefing-premium.js +19 -0
  31. package/workspace/lib/routes-meeting-focus.js +28 -6
  32. package/workspace/lib/routes-proposals.js +325 -0
  33. package/workspace/lib/routes-task-links.js +35 -28
  34. package/workspace/lib/settings-store.js +2 -1
  35. package/workspace/package-lock.json +2 -2
  36. package/workspace/package.json +1 -1
  37. package/workspace/premium-board-actions-test.js +2 -2
  38. package/workspace/premium-briefing-depth-test.js +1 -1
  39. package/workspace/premium-rec-now-test.js +153 -0
  40. package/workspace/premium-rec-tab-test.js +167 -0
  41. package/workspace/public/pm/bd-asks.js +3 -0
  42. package/workspace/public/pm/cozy-aud.css +9 -0
  43. package/workspace/public/pm/cozy-aud.js +80 -0
  44. package/workspace/public/pm/cozy-live-pill.js +3 -0
  45. package/workspace/public/pm/cozy-pick.css +41 -0
  46. package/workspace/public/pm/cozy-pick.js +134 -0
  47. package/workspace/public/pm/cozy-rec-bridge.js +32 -0
  48. package/workspace/public/pm/cozy-rec-now.css +104 -0
  49. package/workspace/public/pm/cozy-rec-now.js +330 -0
  50. package/workspace/public/pm/cozy-rec-present.css +69 -0
  51. package/workspace/public/pm/cozy-rec-present.js +467 -0
  52. package/workspace/public/pm/cozy-rec-tab.css +90 -0
  53. package/workspace/public/pm/cozy-rec-tab.js +219 -0
  54. package/workspace/public/pm/cozy-settings.js +8 -2
  55. package/workspace/public/pm/cozy-today.css +23 -0
  56. package/workspace/public/pm/cozy-viewer.js +14 -3
  57. package/workspace/public/pm/cozy-vw-shell.css +8 -0
  58. package/workspace/public/pm/home-app.js +56 -27
  59. package/workspace/public/pm/home-list.js +17 -10
  60. package/workspace/public/pm/home-more.js +2 -31
  61. package/workspace/public/pm/home-task.js +2 -1
  62. package/workspace/public/pm/home-today.js +69 -19
  63. package/workspace/public/pm/ini-groups.js +30 -5
  64. package/workspace/public/pm/ini-links.js +6 -48
  65. package/workspace/public/pm/ini-props.js +218 -0
  66. package/workspace/public/pm/ini-view-model.js +6 -1
  67. package/workspace/public/pm/ini-view.css +47 -0
  68. package/workspace/public/pm/ini-view.js +23 -6
  69. package/workspace/public/pm/live-model.js +1 -1
  70. package/workspace/public/pm/premium-board.js +56 -25
  71. package/workspace/public/pm/premium-insights.js +42 -24
  72. package/workspace/public/pm/premium-meeting.js +17 -4
  73. package/workspace/public/pm/premium-mtg-present.js +4 -3
  74. package/workspace/public/pm/premium-report-read.js +2 -0
  75. package/workspace/public/pm/premium-vw-item.js +2 -1
  76. package/workspace/public/pm/premium-vw-mtg.js +15 -7
  77. package/workspace/public/pm/rec-state.js +13 -5
  78. package/workspace/public/pm/rec-tab-core.js +92 -0
  79. package/workspace/public/pm/task-card.css +13 -0
  80. package/workspace/public/pm/task-card.js +37 -2
  81. package/workspace/public/pm/view-notes.js +9 -0
  82. package/workspace/public/premium-aud.html +22 -0
  83. package/workspace/public/premium-board.html +1 -0
  84. package/workspace/public/premium-insights.html +2 -1
  85. package/workspace/public/premium-rec.html +30 -0
  86. package/workspace/public/premium.html +1 -0
  87. package/workspace/rec-present-test.js +229 -0
  88. package/workspace/server.js +46 -3
  89. package/workspace/skills/initiative-propose.skill +45 -0
  90. package/workspace/stage-card-test.js +1 -1
  91. package/workspace/task-links-test.js +26 -14
  92. package/workspace/test-lists/claude-proposes.json +5 -0
  93. package/workspace/test-lists/home-sessions-pill.json +6 -0
  94. package/workspace/test-lists/rec-now.json +6 -0
  95. package/workspace/test-lists/rec-present.json +13 -0
  96. package/workspace/test-lists/recording-tab.json +13 -0
  97. package/workspace/tk-tasks-test.js +13 -0
@@ -0,0 +1,90 @@
1
+ /* pm/cozy-rec-tab.css — the recording tab (batch 12 item 1; canvas In development, XrtA1Tab, XrtA7Room, XrtA6States, XrtA5PhoneRec).
2
+ * Every surface is a rounded card with a 12px gutter. The dark stage is only for a shared screen; in the room the page stays light.
3
+ * Token vars from cozy.css only. Motion: the red dot breathes while recording; nothing else moves but the clock. */
4
+ body.rt-page { height: 100vh; overflow: hidden; }
5
+ .rt { box-sizing: border-box; height: 100vh; padding: 12px; display: flex; gap: 12px; }
6
+ .rt-main { flex: 1; min-width: 0; display: flex; flex-direction: column; border-radius: 20px; background: var(--cz-card); box-shadow: var(--cz-vlift); padding: 14px 20px 18px; box-sizing: border-box; }
7
+ .rt-side { width: 400px; flex: none; border-radius: 20px; background: var(--cz-card); box-shadow: var(--cz-vlift); overflow: auto; }
8
+ .rt-side[hidden], .rt-ask[hidden], .rt-line[hidden], .rt-bar[hidden], .rt-msg[hidden], .rt-alert[hidden], .rt-past[hidden] { display: none; }
9
+
10
+ /* the dark stage: only while a screen is shared */
11
+ .rt[data-mode="screen"] .rt-main { background: var(--cz-c-1b1d21); color: var(--cz-c-eceef1); }
12
+
13
+ .rt-hd { display: flex; align-items: center; gap: 10px; min-height: 40px; }
14
+ .rt-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--cz-dot-q); flex: none; }
15
+ .rt[data-mode="screen"] .rt-dot, .rt[data-mode="room"] .rt-dot { background: var(--cz-dot-red); animation: rt-breathe 2.4s ease-in-out infinite; }
16
+ .rt-clock { font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--cz-ink3); }
17
+ .rt[data-mode="screen"] .rt-clock, .rt[data-mode="room"] .rt-clock { color: var(--cz-dot-red); }
18
+ .rt.late .rt-clock, .rt-past { color: var(--cz-dot-risk); }
19
+ .rt-title { margin: 0; font-size: 16px; font-weight: 800; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
20
+ .rt-past { font-size: 13px; font-weight: 700; }
21
+ @keyframes rt-breathe { 0%, 100% { opacity: 1 } 50% { opacity: .45 } }
22
+ @media (prefers-reduced-motion: reduce) { .rt-dot { animation: none !important; } }
23
+
24
+ .rt-alert { margin: 6px 0 0; display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px; border-radius: 14px; background: var(--cz-riskbg); color: var(--cz-risk); font-weight: 700; font-size: 14px; }
25
+ .rt-alert span { flex: 1; }
26
+
27
+ .rt-stage { flex: 1; min-height: 0; display: flex; flex-direction: column; margin-top: 10px; position: relative; }
28
+ .rt-own { flex: 1; min-height: 0; display: flex; }
29
+ .rt-own:empty { display: none; }
30
+ .rt-scr { flex: 1; min-height: 0; border-radius: 12px; background: var(--cz-c-17191c); display: flex; align-items: center; justify-content: center; overflow: hidden; }
31
+ .rt-scr video { max-width: 100%; max-height: 100%; display: block; }
32
+ .rt-scr.off { flex-direction: column; gap: 12px; background: var(--cz-c-2a2d33); }
33
+ .rt-scr.off p { margin: 0; font-size: 16px; font-weight: 800; color: var(--cz-c-9ea4ad); }
34
+ .rt-wait { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; }
35
+ .rt-wait h2 { margin: 0; font-size: 20px; font-weight: 800; }
36
+ .rt-wait p { margin: 0 0 8px; font-size: 14px; color: var(--cz-ink3); max-width: 420px; }
37
+
38
+ /* the meeting so far: one mark per highlight, a card with the moment on hover or focus */
39
+ .rt-line { position: relative; height: 28px; margin: 12px 4px 0; }
40
+ .rt-track { position: absolute; left: 0; right: 0; top: 13px; height: 3px; border-radius: 2px; background: var(--cz-hair); }
41
+ .rt-track::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: var(--rt-now, 0%); border-radius: 2px; background: color-mix(in srgb, var(--cz-blue) 70%, transparent); }
42
+ .rt-nowmark { position: absolute; left: var(--rt-now, 0%); top: 4px; width: 2px; height: 20px; border-radius: 1px; background: var(--cz-dot-red); }
43
+ .rt-mk { position: absolute; left: var(--rt-x); top: 0; transform: translateX(-50%); }
44
+ .rt-star { width: 28px; height: 28px; border: 0; padding: 0; border-radius: 50%; background: transparent; color: var(--cz-dot-risk); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
45
+ .rt-star svg { fill: currentColor; stroke: none; }
46
+ .rt-star:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 1px; }
47
+ .rt-hv { display: none; position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%); width: 240px; padding: 10px; border-radius: 14px; background: var(--cz-card); color: var(--cz-ink); box-shadow: var(--cz-sheet); font-size: 13px; z-index: 3; flex-direction: column; gap: 4px; }
48
+ .rt-hv b { font-size: 12px; color: var(--cz-ink3); }
49
+ .rt-hv img { width: 100%; border-radius: 8px; margin-top: 4px; display: block; }
50
+ .rt-mk:hover .rt-hv, .rt-mk:focus-within .rt-hv { display: flex; }
51
+
52
+ .rt-msg { margin: 8px 0 0; font-size: 13px; font-weight: 700; color: var(--cz-ink3); text-align: center; }
53
+ .rt[data-mode="screen"] .rt-msg { color: var(--cz-c-9ea4ad); }
54
+
55
+ /* the bar: icon only; Stop is the one red press */
56
+ .rt-bar { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 12px; }
57
+ .rt-slot { display: contents; }
58
+ .rt-b { width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--cz-hair); background: var(--cz-card); color: var(--cz-ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
59
+ .rt-b svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
60
+ .rt-b.on { background: var(--cz-ink); color: var(--cz-card); }
61
+ .rt-b.dark { background: var(--cz-ink); color: var(--cz-card); border-color: transparent; }
62
+ .rt-b.dark svg { fill: currentColor; }
63
+ .rt-b.red { width: 64px; border-radius: 26px; background: var(--cz-dot-red); color: var(--cz-onsolid); border-color: transparent; margin-left: 12px; }
64
+ .rt-b.red svg { fill: currentColor; stroke: none; }
65
+ .rt-b.big { width: 64px; height: 64px; border-radius: 50%; margin: 0; }
66
+ .rt-b:focus-visible, .rt-t:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 2px; }
67
+ .rt-b:disabled { opacity: .5; cursor: default; }
68
+ .rt[data-mode="screen"] .rt-b:not(.red):not(.on) { background: var(--cz-c-33363c); color: var(--cz-c-eceef1); border-color: transparent; }
69
+ .rt-alert .rt-b { width: 36px; height: 36px; background: transparent; border: 0; color: inherit; }
70
+ .rt-scr.off .rt-b { background: var(--cz-c-eceef1); color: var(--cz-c-17191c); }
71
+
72
+ /* Stop asks first; the next meeting asks once */
73
+ .rt-ask { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--cz-c-17191c) 35%, transparent); z-index: 5; }
74
+ .rt-askc { width: min(420px, calc(100vw - 32px)); box-sizing: border-box; padding: 20px; border-radius: 20px; background: var(--cz-card); color: var(--cz-ink); box-shadow: var(--cz-sheet); }
75
+ .rt-askc b { font-size: 16px; }
76
+ .rt-askc p { margin: 8px 0 0; font-size: 14px; color: var(--cz-ink2); }
77
+ .rt-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
78
+ .rt-t { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--cz-hair); background: var(--cz-card); color: var(--cz-ink); font: 700 14px var(--cz-sans); cursor: pointer; }
79
+ .rt-t.red { background: var(--cz-dot-red); color: var(--cz-onsolid); border-color: transparent; }
80
+ .rt-t.blue { background: var(--cz-solid); color: var(--cz-onsolid); border-color: transparent; }
81
+
82
+ /* a phone: the recording view in the same tab; the side card goes under the stage */
83
+ @media (max-width: 760px) {
84
+ body.rt-page { height: auto; overflow: auto; }
85
+ .rt { height: auto; min-height: 100vh; flex-direction: column; }
86
+ .rt-main { min-height: 70vh; padding: 12px 14px 14px; }
87
+ .rt-side { width: auto; }
88
+ .rt-bar { gap: 8px; }
89
+ .rt-b { width: 48px; height: 48px; }
90
+ }
@@ -0,0 +1,219 @@
1
+ /* pm/cozy-rec-tab.js — the recording tab, /premium-rec.html?note=<id>&ws=<ws>[&go=1] (batch 12 item 1, slice S1; canvas In development,
2
+ * XrtA1Tab, XrtA7Room, XrtA6States, XrtA5PhoneRec).
3
+ *
4
+ * A meeting records in its own tab, named 'pmos-rec' (rec-tab-core.js). The tab holds the recorder (premium-meeting.js recCore) and
5
+ * never navigates away: its links open in the other PMOS tab, so Home, Board, Insights or a chat never pause the meeting. Only this tab
6
+ * controls the meeting; every other page shows a snippet, and a press on it brings this tab forward.
7
+ *
8
+ * Drawn here:
9
+ * header red dot, the meeting clock, the title; amber "Past 10:30 end" once the calendar end has passed. The tab's title is the clock.
10
+ * stage with a shared screen, a dark stage with the picture live; "Sharing stopped" with Share again when it ends. In the room
11
+ * (microphone only) there is no dark stage: the light page, which slice S2 (cozy-rec-now.js) fills. Paused and not yet
12
+ * started each say so, with the one press that goes on.
13
+ * line the meeting so far, with a mark for each highlight; hover or focus a mark for the moment: its time, the line, the shot.
14
+ * bar icon only: Highlight, Pause or Resume, Pause the screenshots (only with a screen), the slots, and the red Stop.
15
+ * alert amber "Not hearing the meeting" with Share again, when the microphone is heard and the meeting is not.
16
+ * ask Stop asks first. Record on the next meeting, pressed on another page, asks here once: "Stop X and record Y?".
17
+ * Stop ends the meeting, and the tab then shows its notes (the Viewer, /premium-viewer.html?open=meeting).
18
+ *
19
+ * Slots: S2 and S3 load here if their files exist (a missing file is ignored):
20
+ * cozy-rec-now.js mountNow({ stage, side, bar }, ctx) ctx = { ws, note(), mode(), on(evt, fn), focus(), event, rec }
21
+ * cozy-rec-present.js mountPresent({ stage, side, bar }, ctx) ctx = { ws, note: { id, title }, event, focus() }
22
+ * bar holds [data-slot="now"] and [data-slot="present"] for their buttons.
23
+ * Reads: GET /api/notes (recCore), /api/notes/one, /api/meeting-focus. Writes only through the recorder's presses. */
24
+ import { pmGet, pmPost } from './http.js';
25
+ import { recCore, STOP_LINE } from './premium-meeting.js';
26
+ import { post, listen, tabUrl, clockOf, modeOf, endOf, marksOf } from './rec-tab-core.js';
27
+
28
+ const q = new URLSearchParams(location.search);
29
+ const ID = q.get('note') || '', WS = q.get('ws') || '';
30
+ const C = recCore({ pmGet, pmPost, ws: () => WS || null });
31
+ const $ = (id) => document.getElementById(id);
32
+ const esc = (v) => String(v == null ? '' : v).replace(/[&<>"']/g, (c) => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#39;' })[c]);
33
+ const clip = (s, n) => { const t = String(s == null ? '' : s).replace(/\s+/g, ' ').trim(); return t.length > n ? t.slice(0, n - 1).trimEnd() + '…' : t; };
34
+ const pad = (n) => String(n).padStart(2, '0');
35
+ const wall = (ms) => { const d = new Date(ms); return pad(d.getHours()) + ':' + pad(d.getMinutes()); };
36
+
37
+ const P = { star: '<path d="M12 3.8l2.5 5.2 5.7.8-4.1 4 1 5.7L12 16.8l-5.1 2.7 1-5.7-4.1-4 5.7-.8z"/>', pause: '<path d="M9 6v12M15 6v12"/>', play: '<path d="M8 5v14l11-7z"/>',
38
+ stop: '<rect x="7" y="7" width="10" height="10" rx="2"/>', eyeoff: '<path d="M3 3l18 18M10.6 6.1A9.8 9.8 0 0 1 12 6c5 0 9 6 9 6a15 15 0 0 1-3 3.5M6.6 6.7C4.3 8.2 3 12 3 12s4 6 9 6a8.6 8.6 0 0 0 4.3-1.1M9.9 9.9a3 3 0 0 0 4.2 4.2"/>',
39
+ eye: '<path d="M3 12s4-6 9-6 9 6 9 6-4 6-9 6-9-6-9-6z"/><circle cx="12" cy="12" r="3"/>', share: '<rect x="3" y="4" width="18" height="12" rx="2"/><path d="M12 13V7M9 10l3-3 3 3M8 20h8"/>',
40
+ rec: '<circle cx="12" cy="12" r="6"/>' };
41
+ const svg = (k, w = 18) => `<svg aria-hidden="true" width="${w}" height="${w}" viewBox="0 0 24 24">${P[k]}</svg>`;
42
+ const btn = (a, label, icon, cls = '') => `<button type="button" class="rt-b${cls ? ' ' + cls : ''}" data-a="${a}" aria-label="${esc(label)}" title="${esc(label)}">${svg(icon, a === 'stop' ? 20 : 18)}</button>`;
43
+
44
+ const S = { row: null, one: null, focus: null, readAt: Date.now(), mode: 'idle', ask: null, msg: '', busy: false, video: null, on: { note: new Set(), mode: new Set(), tick: new Set() } };
45
+ const fire = (k, v) => { for (const fn of S.on[k]) { try { fn(v); } catch { /* the slot's own */ } } };
46
+ const note = () => (S.one && S.one.note) || null;
47
+ const title = () => clip((S.row && ((S.row.meeting && S.row.meeting.title) || S.row.title)) || (note() && note().title) || 'Meeting', 120);
48
+ const held = () => { const h = C.holding(); return !!(h && h.id === ID); };
49
+ const elapsed = () => { const r = S.row; if (!r) return 0; const ms = Number(r.meeting_ms) || 0; return r.state === 'recording' ? ms + Math.max(0, Date.now() - S.readAt) : ms; };
50
+ const eventOf = () => { const n = note(); const m = n && n.meeting; return m && m.kind === 'event' ? { id: m.event_id || '', title: m.title || '', series: (n.series && n.series.key) || '', date: m.start ? String(m.start).slice(0, 10) : '' } : null; };
51
+
52
+ /* ── drawing ───────────────────────────────────────────────────────────────────────────────────────────── */
53
+ function drawHead() {
54
+ const t = title(), past = endOf(note());
55
+ $('rtTitle').textContent = t;
56
+ const late = past && S.mode !== 'stopped' && Date.now() > past;
57
+ $('rt').classList.toggle('late', !!late);
58
+ $('rtPast').hidden = !late; if (late) $('rtPast').textContent = 'Past ' + wall(past) + ' end';
59
+ tick();
60
+ }
61
+ function tick() {
62
+ const c = clockOf(elapsed());
63
+ $('rtClock').textContent = c;
64
+ document.title = (S.mode === 'paused' ? 'Paused · ' : '') + c + ' · ' + title();
65
+ fire('tick', elapsed());
66
+ }
67
+ function drawBar() {
68
+ const bar = $('rtBar'), keep = { now: bar.querySelector('[data-slot="now"]'), present: bar.querySelector('[data-slot="present"]') };
69
+ const live = S.mode === 'screen' || S.mode === 'room', scr = C.screen();
70
+ const parts = [];
71
+ if (live) parts.push(btn('hl', 'Highlight the last 30 seconds', 'star'), btn('pause', 'Pause', 'pause'));
72
+ else if (S.mode === 'paused') parts.push(btn('resume', 'Resume', 'play', 'dark'));
73
+ if (S.mode === 'screen') parts.push(scr.paused ? btn('shots', 'Keep screenshots again', 'eye', 'on') : btn('shots', 'Pause the screenshots (the sound goes on)', 'eyeoff'));
74
+ bar.innerHTML = parts.join('');
75
+ for (const k of ['now', 'present']) { const s = keep[k] || Object.assign(document.createElement('span'), { className: 'rt-slot' }); s.dataset.slot = k; bar.appendChild(s); }
76
+ if (live || S.mode === 'paused') bar.insertAdjacentHTML('beforeend', btn('stop', 'Stop the recording', 'stop', 'red'));
77
+ bar.hidden = !(live || S.mode === 'paused');
78
+ }
79
+ function drawStage() {
80
+ const st = $('rtStage');
81
+ const mine = st.querySelector(':scope > .rt-own');
82
+ const own = mine || Object.assign(document.createElement('div'), { className: 'rt-own' });
83
+ if (!mine) st.prepend(own);
84
+ $('rt').dataset.mode = S.mode;
85
+ const scr = C.screen();
86
+ if (S.mode === 'screen') {
87
+ if (scr.track) {
88
+ if (!S.video || S.video.dataset.track !== scr.track.id) {
89
+ own.innerHTML = '<div class="rt-scr"><video muted playsinline autoplay aria-label="The shared screen, live"></video></div>';
90
+ S.video = own.querySelector('video'); S.video.dataset.track = scr.track.id;
91
+ try { S.video.srcObject = new MediaStream([scr.track]); S.video.play().catch(() => {}); } catch { /* no picture */ }
92
+ }
93
+ } else { S.video = null; own.innerHTML = `<div class="rt-scr off"><p>Sharing stopped</p>${btn('share', 'Share again', 'share', 'dark')}</div>`; }
94
+ return;
95
+ }
96
+ S.video = null;
97
+ if (S.mode === 'room') { own.innerHTML = ''; return; }
98
+ if (S.mode === 'paused') {
99
+ const left = S.row && S.row.resume_until ? Math.max(1, Math.ceil((Date.parse(S.row.resume_until) - Date.now()) / 60000)) : null;
100
+ own.innerHTML = `<div class="rt-wait"><h2>Paused</h2><p>Nothing is kept until you resume${left ? '. ' + left + (left === 1 ? ' minute' : ' minutes') + ' left to resume' : ''}.</p></div>`; return;
101
+ }
102
+ if (S.mode === 'idle') { own.innerHTML = `<div class="rt-wait"><h2>${esc(title())}</h2><p>${esc(S.msg || (S.row && S.row.state === 'recording' ? 'Recording in another tab.' : 'Not recording yet.'))}</p>${S.row && S.row.state !== 'recording' ? btn('start', 'Start recording', 'rec', 'red big') : ''}</div>`; return; }
103
+ own.innerHTML = '<div class="rt-wait"><h2>Stopped</h2><p>The notes are being written.</p></div>';
104
+ }
105
+ function drawLine() {
106
+ const line = $('rtLine');
107
+ const len = Math.max(elapsed(), endOf(note()) && note().recorded_from ? endOf(note()) - Date.parse(note().recorded_from) : 0, 1);
108
+ const marks = marksOf(note(), S.one && S.one.screen && S.one.screen.frames, len);
109
+ const now = Math.min(1, elapsed() / len);
110
+ line.hidden = !(S.mode === 'screen' || S.mode === 'room' || S.mode === 'paused');
111
+ line.style.setProperty('--rt-now', (now * 100).toFixed(2) + '%');
112
+ line.innerHTML = '<span class="rt-track" aria-hidden="true"></span><span class="rt-nowmark" aria-hidden="true"></span>' + marks.map((m) => `<span class="rt-mk" style="--rt-x:${(m.x * 100).toFixed(2)}%">`
113
+ + `<button type="button" class="rt-star" aria-label="Highlight at ${esc(clockOf(m.t))}${m.text ? ': ' + esc(m.text) : ''}">${svg('star', 12)}</button>`
114
+ + `<span class="rt-hv" role="tooltip"><b>${esc(clockOf(m.t))}</b>${m.text ? `<span>${esc(m.text)}</span>` : ''}${m.shot != null ? `<img alt="" loading="lazy" src="/api/notes/screen?id=${encodeURIComponent(ID)}&amp;t=${m.shot}">` : ''}</span></span>`).join('');
115
+ }
116
+ function drawAlert() {
117
+ const scr = C.screen(), a = $('rtAlert');
118
+ const silent = (S.mode === 'screen' || S.mode === 'room') && scr.silent;
119
+ a.hidden = !silent;
120
+ if (silent) a.innerHTML = `<span>Not hearing the meeting</span>${btn('share', 'Share the meeting again', 'share')}`;
121
+ }
122
+ function drawAsk() {
123
+ const k = $('rtAsk');
124
+ if (!S.ask) { k.hidden = true; k.innerHTML = ''; return; }
125
+ k.hidden = false;
126
+ k.innerHTML = S.ask.kind === 'stop'
127
+ ? `<div class="rt-askc" role="alertdialog" aria-label="Stop the recording?"><b>Stop the recording?</b><p>${esc(STOP_LINE)}</p><div class="rt-acts"><button type="button" class="rt-t" data-a="askno">Keep recording</button><button type="button" class="rt-t red" data-a="stopgo">Stop</button></div></div>`
128
+ : `<div class="rt-askc" role="alertdialog" aria-label="Switch meetings?"><b>Stop ${esc(title())} and record ${esc(S.ask.title)}?</b><div class="rt-acts"><button type="button" class="rt-t" data-a="askno">Keep recording</button><button type="button" class="rt-t blue" data-a="switchgo">Switch</button></div></div>`;
129
+ const f = k.querySelector('[data-a="askno"]'); if (f) f.focus();
130
+ }
131
+ function draw() {
132
+ const m = modeOf(S.row, held(), C.screen());
133
+ if (m !== S.mode) { S.mode = m; fire('mode', m); }
134
+ if (S.mode === 'stopped' && !S.ask) { location.replace('/premium-viewer.html?open=meeting&note=' + encodeURIComponent(ID) + (WS ? '&ws=' + encodeURIComponent(WS) : '')); return; }
135
+ drawHead(); drawStage(); drawBar(); drawLine(); drawAlert();
136
+ const say = $('rtMsg'); say.textContent = S.msg && S.mode !== 'idle' ? S.msg : ''; say.hidden = !say.textContent;
137
+ beat();
138
+ }
139
+
140
+ /* ── the state other tabs read ─────────────────────────────────────────────────────────────────────────── */
141
+ let lastBeat = '';
142
+ function beat(force) {
143
+ const st = S.mode === 'paused' ? 'paused' : S.mode === 'screen' || S.mode === 'room' ? 'recording' : S.mode === 'stopped' ? 'ended' : 'idle';
144
+ const b = { id: ID, state: st, title: title(), elapsedMs: elapsed(), silent: !!C.screen().silent };
145
+ const key = b.state + '|' + b.title + '|' + b.silent;
146
+ if (force || key !== lastBeat) { lastBeat = key; post(b); }
147
+ }
148
+
149
+ /* ── reading ───────────────────────────────────────────────────────────────────────────────────────────── */
150
+ async function read() {
151
+ const [rows, one] = await Promise.all([C.refresh(), pmGet('/api/notes/one?id=' + encodeURIComponent(ID))]);
152
+ S.readAt = Date.now();
153
+ S.row = (rows || []).find((n) => n.id === ID) || (one && one.ok && one.note ? { ...one.note, id: ID } : null);
154
+ if (one && one.ok) S.one = one;
155
+ fire('note', S.one);
156
+ draw();
157
+ }
158
+ async function readFocus() {
159
+ const e = eventOf(), qs = e && e.id ? 'event=' + encodeURIComponent(e.id) + '&date=' + encodeURIComponent(e.date) : 'note=' + encodeURIComponent(ID);
160
+ const F = await pmGet('/api/meeting-focus?' + qs + (WS ? '&ws=' + encodeURIComponent(WS) : ''));
161
+ S.focus = F && F.ok !== false ? F : S.focus;
162
+ }
163
+
164
+ /* ── the presses ───────────────────────────────────────────────────────────────────────────────────────── */
165
+ async function act(a, t) {
166
+ if (S.busy && a !== 'askno') return;
167
+ const run = async (fn) => { S.busy = true; if (t) t.disabled = true; try { await fn(); } finally { S.busy = false; await read(); } };
168
+ switch (a) {
169
+ case 'hl': { const r = await C.highlight(); S.msg = r.ok ? 'Keeping the last 30 seconds and the next ones as a highlight.' : r.error; return draw(); }
170
+ case 'pause': return run(async () => { const r = await C.pause(); S.msg = r.ok ? '' : r.error; });
171
+ case 'resume': case 'start': return run(async () => { const r = await C.resume(ID); S.msg = r.ok ? '' : r.error; });
172
+ case 'share': return run(async () => { await C.pause(); const r = await C.resume(ID); S.msg = r.ok ? '' : r.error; });
173
+ case 'shots': { C.shots(!C.screen().paused); return draw(); }
174
+ case 'stop': S.ask = { kind: 'stop' }; return drawAsk();
175
+ case 'askno': S.ask = null; drawAsk(); return draw();
176
+ case 'stopgo': S.ask = null; drawAsk(); return run(async () => { const r = await C.stop(ID); S.msg = r.ok ? '' : r.error; });
177
+ case 'switchgo': {
178
+ const to = S.ask && S.ask.body; S.ask = null; drawAsk();
179
+ return run(async () => {
180
+ const r = await C.stop(ID); if (!r.ok) { S.msg = r.error; return; }
181
+ const made = await pmPost('/api/notes/new', to);
182
+ if (made && made.ok) location.replace(tabUrl(made.note.id, { ws: WS, go: true }));
183
+ else S.msg = (made && made.error) || 'The next meeting\'s note was not made.';
184
+ });
185
+ }
186
+ default:
187
+ }
188
+ }
189
+ document.addEventListener('click', (e) => { const t = e.target.closest('[data-a]'); if (t && !t.disabled && t.closest('#rt')) act(t.dataset.a, t); });
190
+ document.addEventListener('keydown', (e) => { if (e.key === 'Escape' && S.ask) { S.ask = null; drawAsk(); } });
191
+
192
+ /* Record on the next meeting, pressed on another page while this one records: ask here once (rec-tab-core.js asks over the channel) */
193
+ listen((d) => { if (d.id === ID && d.switchTo && d.switchTo.body) { S.ask = { kind: 'switch', title: clip(d.switchTo.title || 'the next meeting', 80), body: d.switchTo.body }; drawAsk(); } });
194
+
195
+ /* ── the slots: S2 (Now panel) and S3 (Present) mount here when their files are on the page ─────────────────── */
196
+ const slots = () => ({ stage: $('rtStage'), side: $('rtSide'), bar: $('rtBar') });
197
+ function mountSlots() {
198
+ drawBar();
199
+ import('./cozy-rec-now.js').then((M) => M.mountNow && M.mountNow(slots(), { ws: WS, note: () => S.one, mode: () => S.mode, on: (k, fn) => { if (S.on[k]) { S.on[k].add(fn); return () => S.on[k].delete(fn); } return () => {}; },
200
+ focus: () => S.focus, event: eventOf(), rec: C })).catch(() => {});
201
+ import('./cozy-rec-present.js').then((M) => M.mountPresent && M.mountPresent(slots(), { ws: WS, note: { id: ID, title: title() }, event: eventOf(), focus: () => S.focus })).catch(() => {});
202
+ }
203
+
204
+ if (!ID) { $('rtTitle').textContent = 'No meeting'; $('rtMsg').textContent = 'This tab names no meeting. Open a meeting and press Record.'; $('rtMsg').hidden = false; }
205
+ else {
206
+ window.addEventListener('premium-rec', () => { if (!S.busy) draw(); });
207
+ addEventListener('pagehide', () => post({ id: ID, state: 'paused', title: title(), elapsedMs: elapsed(), silent: false }));
208
+ read().then(async () => {
209
+ await readFocus(); mountSlots();
210
+ // opened by Record on another page: listen now; the Listen sheet's press here gives the share its permission
211
+ if (q.get('go') === '1') {
212
+ history.replaceState(null, '', tabUrl(ID, { ws: WS }));
213
+ if (S.row && S.row.state !== 'recording' && S.row.state !== 'ended') act('start');
214
+ }
215
+ });
216
+ setInterval(() => { if (!S.busy) { tick(); drawAlert(); drawLine(); beat(); } }, 1000); // beat(): a change (Not hearing the meeting) reaches the snippets within a second
217
+ setInterval(() => { if (!S.busy) read(); beat(true); }, 5000);
218
+ setInterval(readFocus, 15000);
219
+ }
@@ -46,7 +46,7 @@ function general() {
46
46
  const upd = ready() ? `<div class="ev-card ev-upd"><span class="ev-pill y">Update</span><p><b>PMOS ${esc(latest())} is ready.</b> <span class="ev-mut">${esc(firstLine())}</span></p><button type="button" class="ev-btn sm" data-ev-go="whatsnew">What's new</button><button type="button" class="ev-btn sm dark" data-ev-upd="update">${appBehind() ? 'Restart to update' : 'Update'}</button></div>` : '';
47
47
  return trow('Theme', 'Auto follows your computer', seg('Theme', 'theme', theme, [['light', 'Light'], ['dark', 'Dark'], ['auto', 'Auto']]))
48
48
  + trow('Viewer opens as', 'A column beside the chat, or a popup over it', seg('Viewer opens as', 'viewer', vw, [['column', 'Column'], ['popup', 'Popup']]))
49
- + trow('Product', 'Which products Home, Board and Insights read', `<button type="button" class="ev-pick" data-ev-products aria-haspopup="dialog">${esc(pname)} ${svg(ICON.down, 14)}</button>`)
49
+ + trow('Product', 'Which products Home, Board and Insights read', `<button type="button" class="ev-pick" data-ev-products aria-haspopup="menu">${esc(pname)} ${svg(ICON.down, 14)}</button>`)
50
50
  + trow('Your day', 'When the end-of-day card shows', `<label class="ev-vh" for="evDay">Your day ends at</label><select id="evDay" class="ev-inp" data-ev-day>${hours.map((h) => `<option value="${h}"${h === end ? ' selected' : ''}>${pad(h)}:00</option>`).join('')}</select>`)
51
51
  + trow('Agents write to Jira', 'Only after you press Commit. Never on their own.', '<span class="ev-pill ok">Fixed</span>')
52
52
  + upd;
@@ -122,7 +122,13 @@ async function press(e) {
122
122
  if (t.dataset.evGo) { T.sec = t.dataset.evGo; draw(); return; }
123
123
  if (t.dataset.evSeg === 'theme') { const M = await import('./cozy-nav.js'); M.setTheme(t.dataset.v); draw(); return; }
124
124
  if (t.dataset.evSeg === 'viewer') { store.set(VIEWER_KEY, t.dataset.v); document.body.classList.toggle('ev-vw-popup', t.dataset.v === 'popup'); draw(); return; }
125
- if ('evProducts' in t.dataset) { closeSettings(); import('./home-more.js').then((M) => M.openProducts()); return; }
125
+ // the one product pick (batch 12 item 5): the same list as the chip on Home, Board and Insights, under this row
126
+ if ('evProducts' in t.dataset) {
127
+ const PP = await import('./cozy-pick.js'), P = await PP.readPick();
128
+ if (!P) { T.msg = 'The products could not be read.'; draw(); return; }
129
+ PP.openPicker(t, { P, label: 'Products', onApply: async (on) => { const r = await PP.savePick(on); if (!r.ok) { T.msg = r.error; draw(); return; } T.prods = r.products; draw(); } });
130
+ return;
131
+ }
126
132
  if (T.busy) return;
127
133
  T.busy = true; T.msg = '';
128
134
  try {
@@ -365,6 +365,29 @@ body.cz-home .hv-r.two .hm-rt b { font-size: 15px; }
365
365
  .hv-r.two .hm-rt em { font-style: normal; display: block; font-size: 13px; color: var(--cz-ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
366
366
  .hv-r.two .hm-rt em svg { width: 13px; height: 13px; vertical-align: -2px; }
367
367
  .hv-r.two .hv-mk { align-self: center; }
368
+ /* what sits in an initiative: the pill on its row and the list behind it (batch 12 item 6, canvas HsA1Desk, HsA2Phone, HsA3Sheet) */
369
+ .hv-sp { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px 0 8px; margin: 0 2px 0 4px; border: 0; border-radius: 999px; background: var(--cz-well); color: var(--cz-ink2); font-family: var(--cz-sans); font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums; flex: none; cursor: pointer; }
370
+ .hv-sp svg { width: 13px; height: 13px; color: var(--cz-ink3); }
371
+ .hv-sp.needs, .hv-sp.blocked { color: var(--cz-blueink); }
372
+ .hv-sp.on { background: var(--cz-bluebg); box-shadow: inset 0 0 0 1.5px var(--cz-blue); }
373
+ .hv-sp:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 2px; }
374
+ @media (hover: hover) { .hv-sp:hover { background: var(--cz-well2); } .hv-sp.on:hover { background: var(--cz-bluebg); } }
375
+ .hv-pm { display: block; width: 7px; height: 7px; border-radius: 50%; background: var(--cz-c-a9aeb6); flex: none; }
376
+ .hv-pm.needs { width: 8px; height: 8px; background: var(--cz-blue); }
377
+ .hv-pm.blocked { width: 8px; height: 8px; background: var(--cz-dot-late); }
378
+ .hv-pm.working { width: 9px; height: 9px; background: transparent; box-shadow: inset 0 0 0 2px var(--cz-blue); box-sizing: border-box; }
379
+ .hv-tk { display: inline-flex; align-items: center; flex: none; align-self: stretch; padding: 0 10px 0 2px; border: 0; background: none; cursor: pointer; border-radius: 0 14px 14px 0; }
380
+ .hv-tk .hv-mt { margin-left: 2px; }
381
+ .hv-spp { position: absolute; z-index: 20; top: calc(100% - 4px); right: 8px; width: min(340px, calc(100% - 16px)); background: var(--cz-card); border-radius: 18px; padding: 6px; box-shadow: 0 24px 50px -20px rgba(42,46,53,.4), 0 0 0 1px var(--cz-hair); box-sizing: border-box; }
382
+ .hv-spp .hv-r::before, .hv-sps .hv-r::before { display: none; }
383
+ .hv-spf { display: flex; padding: 2px 2px 0; margin-top: 4px; border-top: 1px solid var(--cz-hair); }
384
+ body.cz-home .hv-r.sp-on { background: var(--cz-well2); z-index: 5; }
385
+ body.cz-home .hv-r.sp-on + .hv-r::before { display: none; }
386
+ .hv-sheet.hv-sps { top: auto; max-height: 72%; }
387
+ .hv-sps .hv-sbar { gap: 8px; }
388
+ .hv-sps .hv-sbar b { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
389
+ .hv-sps .hv-sc { padding-bottom: 16px; }
390
+ @media (max-width: 760px) { .hv-scrim:has(+ .hv-sps) { position: fixed; z-index: 60; border-radius: 0; } .hv-sheet.hv-sps { position: fixed; z-index: 61; } }
368
391
 
369
392
  /* motion = importance (cozy.css levels, Board v62): an info ripple on what waits on you, a warn ripple on what is late; nothing for running */
370
393
  .hv-d:not(.run), .hv-ck.late, .hv-lt, .hv-nd { position: relative; }
@@ -34,6 +34,8 @@
34
34
  * check { state: 'todo'|'prog'|'done'|'wont'|'arch', label, title?, disabled? }: a task's check box in the tile's place (canvas XetX1Rest);
35
35
  * a press runs onPress('check', button). setCheck(id, check) changes it while the item is shown.
36
36
  * sub one quiet line under the title: what the item is when the title is its parent's name (a program's "Charter", canvas MsBCharter)
37
+ * chip { n, label, on(button) }: the blue ✦ with its count right after the title (what Claude proposes on an initiative, batch 12
38
+ * items 2, 3 and 4, canvas In development PiA0/TpA1). Hidden at zero. setChip(id, chip) changes it while the item is shown.
37
39
  * presses [{ act, label, icon, text?, solid? }]: the item's own presses before ⋯ (a program's charter icon, canvas MsB0Entry; the
38
40
  * charter's Save, MsBCharter). text draws the word beside the icon (not on a phone); solid is the one dark primary.
39
41
  * onPress(act, button) runs them. setPresses(id, list) changes them while the item is shown (Save shows only after a change).
@@ -125,10 +127,11 @@ export function headHtml(it) {
125
127
  ? `<button type="button" class="cz-vw-pri${x.text && !phone ? '' : ' i'}" data-cz-vw="press" data-cz-vw-p="${esc(x.act)}" aria-label="${esc(x.label)}" title="${esc(x.label)}">${svg(path(x.icon), 15, 2.2)}${x.text && !phone ? `<span>${esc(x.text)}</span>` : ''}</button>`
126
128
  : `<button type="button" class="cz-vw-ib" data-cz-vw="press" data-cz-vw-p="${esc(x.act)}" aria-label="${esc(x.label)}" title="${esc(x.label)}">${svg(path(x.icon), 18)}</button>`).join('');
127
129
  const sub = o.sub ? `<p class="cz-vw-sub">${esc(o.sub)}</p>` : '';
130
+ const chip = o.chip && (o.chip.n > 0 || o.chip.looking) ? `<button type="button" class="cz-vw-chip${o.chip.looking ? ' live' : ''}" data-cz-vw="chip" aria-haspopup="dialog" aria-label="${esc(o.chip.label || 'Claude proposes ' + o.chip.n + '. Open')}" title="${esc(o.chip.label || 'Claude proposes')}">${svg(ICONS.spark, 13, 2)}${o.chip.n > 0 ? `<b>${esc(o.chip.n)}</b>` : ''}</button>` : '';
128
131
  return (o.canBack || phone ? ib('back', o.canBack ? 'Back' : 'Close the viewer', P.back) : '')
129
132
  + (o.check ? `<button type="button" class="cz-vw-tile cz-vw-chk s-${esc(o.check.state || 'todo')}" data-cz-vw="press" data-cz-vw-p="check" aria-label="${esc(o.check.label || 'Mark done')}" title="${esc(o.check.title || o.check.label || 'Mark done')}"${o.check.disabled ? ' disabled' : ''}><span class="bx"></span></button>`
130
133
  : `<span class="cz-vw-tile" aria-hidden="true">${svg(path(o.icon), 17)}</span>`)
131
- + (o.renaming ? renHtml(o) : `<div class="cz-vw-t">${kind}<h3 class="cz-vw-title" id="czVwTitle">${o.rename ? `<button type="button" class="cz-vw-rn" data-cz-vw-rn aria-label="${esc('Rename ' + (o.title || ''))}" title="Rename">${esc(o.title || '')}</button>` : esc(o.title || '')}</h3>${sub}</div>`)
134
+ + (o.renaming ? renHtml(o) : `<div class="cz-vw-t">${kind}<h3 class="cz-vw-title${chip ? ' has-chip' : ''}" id="czVwTitle">${o.rename ? `<button type="button" class="cz-vw-rn" data-cz-vw-rn aria-label="${esc('Rename ' + (o.title || ''))}" title="Rename">${esc(o.title || '')}</button>` : chip ? `<span class="cz-vw-tt">${esc(o.title || '')}</span>` : esc(o.title || '')}${chip}</h3>${sub}</div>`)
132
135
  + disc + own + add + more
133
136
  + (phone ? '' : ib('wide', o.isWide ? 'Back to the side' : 'Open wide', o.isWide ? P.side : P.wide, ` aria-pressed="${o.isWide ? 'true' : 'false'}"`))
134
137
  + (phone ? '' : `<button type="button" class="cz-vw-ib" data-cz-vw="close" aria-label="Close the viewer" title="Close">${svg(P.close, 18)}</button>`);
@@ -362,6 +365,7 @@ function mount() {
362
365
  else if (a === 'back') guarded(() => { if (V.stack.length) back(); else close(); }, b);
363
366
  else if (a === 'press') { if (V.cur && typeof V.cur.onPress === 'function') V.cur.onPress(b.dataset.czVwP, b); }
364
367
  else if (a === 'more') moreMenu(b);
368
+ else if (a === 'chip') { if (V.cur && V.cur.chip && typeof V.cur.chip.on === 'function') V.cur.chip.on(b); }
365
369
  else if (a === 'add') { if (V.cur && V.cur.add && typeof V.cur.add.on === 'function') V.cur.add.on(b); }
366
370
  else if (a === 'wide') wide();
367
371
  else if (a === 'discuss') discuss();
@@ -435,6 +439,13 @@ async function saveRename() {
435
439
  endRename(); emit();
436
440
  }
437
441
  /** The item's own presses change while it is shown (the charter's Save shows only after a change). */
442
+ export function setChip(id, chip) {
443
+ if (!V.cur || V.cur.id !== String(id)) return;
444
+ const was = V.cur.chip, on = !!(chip && (chip.n > 0 || chip.looking)), n = on ? chip.n || 0 : -1;
445
+ V.cur.chip = on ? chip : null;
446
+ if (V.cur.args) V.cur.args = { ...V.cur.args, chip: V.cur.chip };
447
+ if ((was ? was.n || 0 : -1) !== n || (was && chip && (was.label !== chip.label || !!was.looking !== !!chip.looking))) { if (!V.cur.renaming) redraw(); }
448
+ }
438
449
  export function setPresses(id, list) { if (V.cur && V.cur.id === String(id)) { V.cur.presses = list || null; if (V.cur.args) V.cur.args = { ...V.cur.args, presses: list || null }; if (!V.cur.renaming) redraw(); } }
439
450
  /** A task's check box changes while it is shown (a status move from the card, canvas XetX1Done). */
440
451
  export function setCheck(id, check) { if (V.cur && V.cur.id === String(id)) { V.cur.check = check || null; if (V.cur.args) V.cur.args = { ...V.cur.args, check: check || null }; if (!V.cur.renaming) redraw(); } }
@@ -457,7 +468,7 @@ export function open(it) {
457
468
  V.drill = false;
458
469
  const sameKind = V.cur && kindKey(V.cur.kind) === kindKey(o.kind);
459
470
  leave();
460
- V.cur = { id: o.id == null ? null : String(o.id), kind: o.kind || '', title: o.title || '', icon: o.icon, url: o.url || '', full: !!o.full, onClose: o.onClose, more: o.more, discuss: o.discuss, discussHome: !!o.discussHome, add: o.add || null, sub: o.sub || '', check: o.check || null, presses: o.presses || null, onPress: o.onPress, guard: o.guard, rename: o.rename && typeof o.rename.save === 'function' ? o.rename : null, args: o };
471
+ V.cur = { id: o.id == null ? null : String(o.id), kind: o.kind || '', title: o.title || '', icon: o.icon, url: o.url || '', full: !!o.full, onClose: o.onClose, more: o.more, discuss: o.discuss, discussHome: !!o.discussHome, add: o.add || null, sub: o.sub || '', check: o.check || null, presses: o.presses || null, chip: o.chip && (o.chip.n > 0 || o.chip.looking) ? o.chip : null, onPress: o.onPress, guard: o.guard, rename: o.rename && typeof o.rename.save === 'function' ? o.rename : null, args: o };
461
472
  el.setAttribute('aria-label', 'Viewer: ' + (o.kind || o.title || 'item'));
462
473
  redraw();
463
474
  const m = el.querySelector('.cz-vw-menu'); if (m) m.remove();
@@ -512,4 +523,4 @@ if (typeof window !== 'undefined' && typeof window.addEventListener === 'functio
512
523
  e.preventDefault(); e.stopImmediatePropagation(); guarded(close);
513
524
  }, true);
514
525
  }
515
- if (typeof window !== 'undefined') window.czViewer = { open, close, back, drill, setPresses, setCheck, isOpen, current, body, onChange, placeholder, retitle, czSummary, czSections, widthOf, setWidth, wide, railOn, ICONS };
526
+ if (typeof window !== 'undefined') window.czViewer = { open, close, back, drill, setPresses, setChip, setCheck, isOpen, current, body, onChange, placeholder, retitle, czSummary, czSections, widthOf, setWidth, wide, railOn, ICONS };
@@ -152,3 +152,11 @@ body.cz-vw-rail [data-cz-vw-list] > :not(.cz-vw-railbar), body.cz-vw-rail #hmLis
152
152
  .czs-ib { width: 44px; }
153
153
  }
154
154
  @media (prefers-reduced-motion: reduce) { .cz-vw * { transition: none !important; } }
155
+
156
+ /* the blue ✦ after an initiative's title: what Claude proposes (batch 12 items 2, 3 and 4, canvas PiA0/TpA1); hidden at zero */
157
+ .cz-vw-title.has-chip { display: flex; align-items: center; gap: 6px; min-width: 0; }
158
+ .cz-vw-title.has-chip > .cz-vw-tt, .cz-vw-title.has-chip > .cz-vw-rn { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
159
+ .cz-vw-chip { display: inline-flex; align-items: center; gap: 3px; height: 24px; padding: 0 8px 0 6px; border-radius: 999px; border: 0; background: var(--cz-bluebg); color: var(--cz-blueink); font: inherit; font-size: 12px; font-weight: 800; flex: none; cursor: pointer; }
160
+ .cz-vw-chip:not(:has(b)) { padding: 0 6px; }
161
+ .cz-vw-chip:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 1px; }
162
+ @media (max-width: 760px) { .cz-vw-chip { min-height: 32px; } }