create-pmos 0.343.0 → 0.344.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-pmos",
3
- "version": "0.343.0",
3
+ "version": "0.344.0",
4
4
  "description": "Scaffold the PMOS portable kit — run the PMOS product-management workflow (initiative → lane-fit spec → contract → build → three gates, with work-type lanes for features, research, maintenance, incidents, and content) entirely inside your own repo, with all state as git-versioned files. Includes `workflow-sweep`, which audits the state every board derives from and separates real defects from work you simply have not done. `create-pmos workspace` also installs + launches the local Terminal Workspace GUI. No database, no network, no telemetry.",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -32,6 +32,18 @@
32
32
  "audit"
33
33
  ],
34
34
  "pmosChanges": [
35
+ {
36
+ "v": "0.344.0",
37
+ "at": "2026-10-20T05:29:13.194Z",
38
+ "f": 2,
39
+ "prs": [
40
+ {
41
+ "n": 940,
42
+ "t": "Replay takes the rich layout from the prototype",
43
+ "s": "Replay follows the rich layout from prototype PR 901."
44
+ }
45
+ ]
46
+ },
35
47
  {
36
48
  "v": "0.343.0",
37
49
  "at": "2026-10-20T05:20:19.894Z",
@@ -289,23 +301,6 @@
289
301
  "s": "The Briefing's Calendar card has a Notes button (in the header on a wide screen; under the day on a phone, where the header has no room beside the full-calendar and fold buttons)."
290
302
  }
291
303
  ]
292
- },
293
- {
294
- "v": "0.324.0",
295
- "at": "2026-10-19T22:31:07.298Z",
296
- "f": 2,
297
- "prs": [
298
- {
299
- "n": 914,
300
- "t": "Slide editor in the premium viewer",
301
- "s": "Read > Edit the slides (also on the report's document page) opens the same file as a Slides tab in the viewer."
302
- },
303
- {
304
- "n": 918,
305
- "t": "Presenter mode for the slide editor",
306
- "s": "Present opens the presenter view from the prototype's conversation shell."
307
- }
308
- ]
309
304
  }
310
305
  ]
311
306
  }
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@01d180ef
1
+ kernel-source: pmos@9547ca75
2
2
  assembled: 2026-10-20
3
3
  mode: vendor
@@ -2,7 +2,7 @@
2
2
  type: Reference
3
3
  title: "Eval calibration log"
4
4
  description: "Append-only record of every PM override of an evaluator verdict."
5
- generated: {by: process:create-pmos, at: "2026-10-20T05:20:17Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-20T05:29:11Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -2,7 +2,7 @@
2
2
  type: Reference
3
3
  title: "Health budgets"
4
4
  description: "Closed registry of health-budget anchors (D59), edited only by the PM."
5
- generated: {by: process:create-pmos, at: "2026-10-20T05:20:17Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-20T05:29:11Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -2,7 +2,7 @@
2
2
  type: Reference
3
3
  title: "Discoveries and friction log"
4
4
  description: "Append-only record of what runs discovered and where the process rubbed."
5
- generated: {by: process:create-pmos, at: "2026-10-20T05:20:17Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-20T05:29:11Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -125,6 +125,8 @@ const RECORDER = () => {
125
125
  await page.route('**/api/meeting-focus/topic', (r) => { S.topicPosts.push(JSON.parse(r.request().postData() || '{}')); return json(r, { ok: true }); });
126
126
  await page.route(/\/api\/meeting-focus(\?|$)/, (r) => { if (/[?&]brief=1(&|$)/.test(r.request().url())) S.briefGets++; else S.focusGets++; const a = typeof focus === 'function' ? focus() : focus; return json(r, a, a.ok === false ? 404 : 200); });
127
127
  await page.route('**/api/calendar-links', (r) => json(r, { ok: true }));
128
+ S.planPosts = [];
129
+ await page.route('**/api/plan-items*', (r) => { const req = r.request(); if (req.method() === 'POST') { S.planPosts.push(JSON.parse(req.postData() || '{}')); return json(r, { ok: true, written: [{ item: 'i' + S.planPosts.length }] }); } return json(r, { ok: true, stages: [{ id: 's1', label: 'Now' }] }); });
128
130
  if (stub) await page.addInitScript(RECORDER);
129
131
  await page.addInitScript(() => {
130
132
  const f = window.fetch;
@@ -312,6 +314,40 @@ const RECORDER = () => {
312
314
  ok('R7 at the end it stops by itself', await until(() => Ra.page.evaluate(() => document.querySelector('#rpPlay').textContent === 'Play' && /^0:04/.test(document.querySelector('#rpPos').textContent)), 8000), await Ra.page.evaluate(() => document.querySelector('#rpPos').textContent));
313
315
  await Ra.ctx.close();
314
316
 
317
+ /* R12 the rich Replay layout (prototype PR 901): a wide window, the time of day, marker lanes, PMOS notes, filters, key-point columns and Confirm all */
318
+ const RICH = { ...REPLAY, start_ms: new Date(2026, 9, 20, 10, 0, 0).getTime(), note: { id: 'n1', title: 'Live review notes', initiative: { id: 'premium-viewer', ws: 'w1', title: 'Premium viewer' } },
319
+ lines: REPLAY.lines.map((l) => (l.i === 1 ? { ...l, key: { k: 'decision', id: 'd1' } } : l)),
320
+ keys: [{ id: 'd1', k: 'decision', text: 'Plan with eight people', t: 61000, by: 'Priya', state: 'draft' }, { id: 'a1', k: 'action', text: 'Priya confirms the owner', t: 140000, owner: 'Priya', due: '2026-10-24', state: 'draft' }, { id: 'q1', k: 'question', text: 'Who signs off?', t: 200000, state: 'open' }],
321
+ notes: [{ t: 90000, cat: 'insight', body: 'The plan leans on one hire' }], gaps: [{ from_ms: 240000, to_ms: 260000 }] };
322
+ const Rw = await open({ replay: RICH });
323
+ await press(Rw.page, 'replay');
324
+ await until(() => Rw.page.evaluate(() => !!document.querySelector('#rpKeys')));
325
+ ok('R12 Replay opens full width with the conversation panel hidden', await Rw.page.evaluate(() => { const g = document.getElementById('dlg'); return g.classList.contains('full') && g.classList.contains('rpw') && g.dataset.mode === 'detail'; }));
326
+ ok('R12 the header shows the time of day from the recording start', await Rw.page.evaluate(() => document.querySelector('#rpClk').textContent.trim() === '10:00'), await Rw.page.evaluate(() => document.querySelector('#rpClk').textContent));
327
+ ok('R12 the marker lane has one marker per timed key point and PMOS note, and an open question carries the needs-you ring', await Rw.page.evaluate(() => document.querySelectorAll('#oMain .rp-mk').length === 4 && !!document.querySelector('#oMain .rp-mk.question.need') && !!document.querySelector('#oMain .rp-mk.pm') && !!document.querySelector('#oMain .rp-gap')));
328
+ ok('R12 a key-point line is tagged in the conversation', await Rw.page.evaluate(() => !!document.querySelector('#rl1 .rp-kt')));
329
+ ok('R12 the key points sit in three columns with counts', await Rw.page.evaluate(() => { const c = [...document.querySelectorAll('#rpKeys .rp-col')]; return c.length === 3 && c.every((x) => /1/.test(x.querySelector('h4').textContent)); }));
330
+ await Rw.page.click('#oMain .rp-mk.pm');
331
+ ok('R12 a PMOS marker seeks to its note', await until(() => Rw.page.evaluate(() => /^1:30 \/ 5:00/.test(document.querySelector('#rpPos').textContent))), await Rw.page.evaluate(() => document.querySelector('#rpPos').textContent));
332
+ await Rw.page.click('#oMain [data-rp="tab"][data-v="p"]');
333
+ ok('R12 the PMOS tab lists only PMOS notes', await Rw.page.evaluate(() => { const l = document.querySelector('#rpLines'); return /The plan leans on one hire/.test(l.textContent) && !/Welcome everyone/.test(l.textContent); }));
334
+ await Rw.page.click('#oMain [data-rp="tab"][data-v="k"]');
335
+ ok('R12 the Key points tab lists only key-point lines', await Rw.page.evaluate(() => { const l = document.querySelector('#rpLines'); return /We plan eight people/.test(l.textContent) && !/Welcome everyone/.test(l.textContent); }));
336
+ await Rw.page.click('#oMain [data-rp="tab"][data-v="a"]');
337
+ await Rw.page.fill('#rpQ', 'risks');
338
+ ok('R12 the search narrows the conversation', await until(() => Rw.page.evaluate(() => { const l = document.querySelector('#rpLines'); return /Next the risks/.test(l.textContent) && !/Welcome everyone/.test(l.textContent); })));
339
+ await Rw.page.click('#rpKeys [data-rp="confirm"]');
340
+ ok('R12 Confirm all adds each next step to the note\'s initiative and marks it', await until(() => Rw.page.evaluate(() => /task made/.test(document.querySelector('#rpKeys').textContent))) && Rw.planPosts.length === 1 && Rw.planPosts[0].events[0].initiative === 'premium-viewer' && Rw.planPosts[0].events[0].title === 'Priya confirms the owner' && Rw.planPosts[0].events[0].stage === 's1' && Rw.planPosts[0].events[0].due === '2026-10-24', JSON.stringify(Rw.planPosts));
341
+ await press(Rw.page, 'unreplay');
342
+ ok('R12 Back restores the dialog size and the conversation panel', await until(() => Rw.page.evaluate(() => { const g = document.getElementById('dlg'); return !g.classList.contains('full') && !g.classList.contains('rpw') && g.dataset.mode === 'split'; })));
343
+ await Rw.ctx.close();
344
+ const Rn = await open();
345
+ await press(Rn.page, 'replay');
346
+ await until(() => Rn.page.evaluate(() => !!document.querySelector('#rpKeys')));
347
+ await Rn.page.click('#rpKeys [data-rp="confirm"]');
348
+ ok('R12 with no initiative linked, Confirm all says so and writes nothing', await until(() => Rn.page.evaluate(() => /Link the note to an initiative first/.test(document.body.textContent))) && Rn.planPosts.length === 0);
349
+ await Rn.ctx.close();
350
+
315
351
  /* R8 Topic on material */
316
352
  const Tp = await open({ topics: ['Capacity', 'Risks'] });
317
353
  await reveal(Tp.page, '#mmAdd'); await Tp.page.click('#mmAdd'); await until(() => Tp.page.evaluate(() => /Roadmap/.test(document.querySelector('#mmSug').textContent)));
@@ -1,4 +1,16 @@
1
1
  [
2
+ {
3
+ "v": "0.344.0",
4
+ "at": "2026-10-20T05:29:13.194Z",
5
+ "f": 2,
6
+ "prs": [
7
+ {
8
+ "n": 940,
9
+ "t": "Replay takes the rich layout from the prototype",
10
+ "s": "Replay follows the rich layout from prototype PR 901."
11
+ }
12
+ ]
13
+ },
2
14
  {
3
15
  "v": "0.343.0",
4
16
  "at": "2026-10-20T05:20:19.894Z",
@@ -141,7 +141,7 @@ In **Notes**, each next step has **Make task** when the note is linked to an ini
141
141
 
142
142
  **Focus.** The dialog has a **Focus** press. Focus shows the meeting as it is now: the state (starts in, recording, paused, ended), a bar of the stretches by topic, the topic now (or the first topic before the start), the last lines of the talk with who said them, the topics, the material and the counts of decisions, next steps and questions. It reads the meeting every 3 seconds while it is open and stops when you leave it. While the note records, PMOS's companion, a read-only Claude run that sends nothing, may read the last minutes of the talk at most every 40 seconds and writes its own notes. The dialog says this before the first read. **Change** lists the topics. A press records one correction on the meeting through the console's route. If the companion is off, has not answered or has failed, Focus says so and shows only the talk. It shows no topic, line or count that the record does not hold.
143
143
 
144
- **Replay.** When a recording is kept, the Replay part has a **Replay** press. The player plays the note's audio, with Back 10 s and 1x, 1.5x or 2x. It shows a bar of the stretches by topic with a mark for each decision, next step and question, the topic being talked about, the key points and the transcript. A press on a stretch, a key point or a line plays from there, and the current line is marked. A key point with no time has no play press. If no audio was kept, the playhead keeps its own clock. A screen shot is shown only when the recording holds one for that time.
144
+ **Replay.** When a recording is kept, the Replay part has a **Replay** press. Replay opens wide and hides the conversation panel; **Back to the meeting** puts both back. The header shows the meeting's day, start and end, length, the number of people, and the position as m:ss and as the time of day. The player plays the note's audio, with Back 10 s and 1x, 1.5x or 2x. Under it is a bar of the stretches by topic and, above the bar, one marker for each decision, next step, question and PMOS note that has a time. A ring marks a point that needs you (a question still open, or a next step with no owner). A shaded part of the bar is a gap where the recording was off. The line under the bar shows the topic being talked about and the key points near the playhead. Below are two panels: **On screen**, with the screen shot kept for that time and a strip of all shots, and **Conversation**, with the transcript and PMOS's notes. Its tabs show all lines, only the key-point lines or only PMOS's notes, and a search box narrows the lines. The key points sit in three columns: decisions, questions and next steps. **Confirm all** makes a task of each next step in the note's initiative, under its first stage; when the note has no initiative, it says to link one first. A press on a marker, stretch, key point, line or shot plays from there, and the current line is marked. A key point with no time has no play press. If no audio was kept, the playhead keeps its own clock.
145
145
 
146
146
  In the **Add material** sheet, a **Topic** choice ties the item to one of the meeting's topics, so Focus can bring it up. It appears only when the meeting has topics.
147
147
 
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.343.0",
3
+ "version": "0.344.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pmos-workspace",
9
- "version": "0.343.0",
9
+ "version": "0.344.0",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@xterm/addon-fit": "^0.11.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.343.0",
3
+ "version": "0.344.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",
@@ -313,10 +313,22 @@ export function replayModel(rep) {
313
313
  if (!len && lines.length) len = lines[lines.length - 1].t;
314
314
  if (!(len > 0)) return null;
315
315
  const stretches = (Array.isArray(rep.runs) ? rep.runs : []).filter((x) => Number.isFinite(x.from_ms) && Number.isFinite(x.to_ms) && x.to_ms > x.from_ms).map((x) => { const t = topics.find((y) => y.id === x.topic); return { n: x.n || (t && t.n) || 0, text: t ? t.text : '', from: Math.max(0, x.from_ms), to: Math.min(len, x.to_ms) }; }).filter((x) => x.to > x.from);
316
- const keys = (Array.isArray(rep.keys) ? rep.keys : []).filter((k) => k && ['decision', 'action', 'question'].includes(k.k)).map((k) => ({ k: k.k, text: clip(k.text, 240), t: Number.isFinite(k.t) ? k.t : null, owner: k.owner || '', due: k.due || '' }));
316
+ const keys = (Array.isArray(rep.keys) ? rep.keys : []).filter((k) => k && ['decision', 'action', 'question'].includes(k.k)).map((k, i) => ({ id: k.id || 'k' + i, k: k.k, text: clip(k.text, 240), t: Number.isFinite(k.t) ? k.t : null, owner: clip(k.owner, 60), due: k.due || '', by: clip(k.by, 60), state: k.state || '',
317
+ need: !!k.warn || k.state === 'owner' || k.state === 'open' }));
317
318
  const shots = (Array.isArray(rep.shots) ? rep.shots : []).filter((x) => Number.isFinite(x.t)).map((x) => ({ t: x.t, why: clip(x.why, 120) })).sort((a, b) => a.t - b.t);
318
- return { len, audio: rep.audio && rep.audio.url ? { url: String(rep.audio.url) } : null, lines, keys, stretches, topics, shots, noteId: rep.note && rep.note.id ? rep.note.id : '', title: clip((rep.meeting && rep.meeting.title) || (rep.note && rep.note.title) || '', 120) };
319
+ /* PMOS's notes (the meeting companion's, from the Focus file), the gaps where the recording was off, and the line each key point was caught from */
320
+ const pmos = (Array.isArray(rep.notes) ? rep.notes : []).filter((x) => x && Number.isFinite(x.t) && String(x.body || '').trim()).map((x) => ({ t: Math.max(0, Math.min(len, x.t)), cat: clip(x.cat, 30), body: clip(x.body, 400) })).sort((a, b) => a.t - b.t);
321
+ const gaps = (Array.isArray(rep.gaps) ? rep.gaps : []).filter((g) => Number.isFinite(g.from_ms) && Number.isFinite(g.to_ms) && g.to_ms > g.from_ms).map((g) => ({ from: g.from_ms, to: Math.min(len, g.to_ms) }));
322
+ const keyOfLine = new Map((Array.isArray(rep.lines) ? rep.lines : []).filter((l) => l && l.key && l.key.k).map((l) => [l.t, l.key.k]));
323
+ lines.forEach((l) => { l.key = keyOfLine.get(l.t) || ''; });
324
+ const n = rep.note || {}, ini = n.initiative && n.initiative.id ? n.initiative : null, mt = rep.meeting || {};
325
+ return { len, audio: rep.audio && rep.audio.url ? { url: String(rep.audio.url) } : null, lines, keys, stretches, topics, shots, pmos, gaps,
326
+ start: Number.isFinite(rep.start_ms) ? rep.start_ms : null, at: mt.at || null, people: Array.isArray(mt.attendees) ? mt.attendees.length : 0, aside: Number(rep.aside_count) || 0,
327
+ noteId: n.id || '', title: clip(mt.title || n.title || '', 120),
328
+ note: n.id ? { id: n.id, title: clip(n.title, 120), initiative: ini ? { id: ini.id, ws: ini.ws || n.ws || '', name: clip(ini.name || ini.title || ini.id, 80) } : null } : null };
319
329
  }
330
+ /** The time of day at meeting time `ms` (10:05), or m:ss from the start when the recording's start is not known. */
331
+ export const wallOf = (m, ms) => { if (!m || m.start == null) return mmss(ms); const t = new Date(m.start + ms); return pad(t.getHours()) + ':' + pad(t.getMinutes()); };
320
332
  /** Where the playhead is: the current line, the stretch (topic) and the key points within 30 s. */
321
333
  export function replayAt(m, pos) {
322
334
  let line = -1; for (const l of m.lines) { if (l.t <= pos) line = l.i; else break; }
@@ -495,7 +507,10 @@ export function mountMeeting(d) {
495
507
 
496
508
  /* the dialog */
497
509
  const sec = (label, body) => `<div class="mtg-sec"><span class="label">${esc(label)}</span>${body}</div>`;
498
- const IC = { spark: '<path d="M12 3l1.8 4.7L18.5 9.5l-4.7 1.8L12 16l-1.8-4.7L5.5 9.5l4.7-1.8z"/>', clock: '<circle cx="12" cy="12" r="9"/><path d="M12 7v5l3 2"/>', scale: '<path d="M12 4v16M6 20h12M5 8h14M5 8l-2 6a3 3 0 0 0 4 0zM19 8l-2 6a3 3 0 0 0 4 0z"/>', doc: '<path d="M7 3h7l4 4v14H7zM14 3v4h4"/>', user: '<circle cx="12" cy="8" r="4"/><path d="M4 21c1-4 4-6 8-6s7 2 8 6"/>', link: '<path d="M10 14a4 4 0 0 0 5.7 0l3-3a4 4 0 0 0-5.7-5.7l-1 1M14 10a4 4 0 0 0-5.7 0l-3 3a4 4 0 0 0 5.7 5.7l1-1"/>', mic: '<rect x="9" y="3" width="6" height="11" rx="3"/><path d="M5 11a7 7 0 0 0 14 0M12 18v3"/>', plus: '<path d="M12 5v14M5 12h14"/>', x: '<path d="M6 6l12 12M18 6 6 18"/>', check: '<path d="M5 12.5l4.5 4.5L19 7.5"/>' };
510
+ const IC = { spark: '<path d="M12 3l1.8 4.7L18.5 9.5l-4.7 1.8L12 16l-1.8-4.7L5.5 9.5l4.7-1.8z"/>', clock: '<circle cx="12" cy="12" r="9"/><path d="M12 7v5l3 2"/>', scale: '<path d="M12 4v16M6 20h12M5 8h14M5 8l-2 6a3 3 0 0 0 4 0zM19 8l-2 6a3 3 0 0 0 4 0z"/>', doc: '<path d="M7 3h7l4 4v14H7zM14 3v4h4"/>', user: '<circle cx="12" cy="8" r="4"/><path d="M4 21c1-4 4-6 8-6s7 2 8 6"/>', link: '<path d="M10 14a4 4 0 0 0 5.7 0l3-3a4 4 0 0 0-5.7-5.7l-1 1M14 10a4 4 0 0 0-5.7 0l-3 3a4 4 0 0 0 5.7 5.7l1-1"/>', mic: '<rect x="9" y="3" width="6" height="11" rx="3"/><path d="M5 11a7 7 0 0 0 14 0M12 18v3"/>',
511
+ dec: '<path d="M6 4v8a4 4 0 0 0 4 4h9"/><path d="M15 12l4 4-4 4"/>', task: '<rect x="3" y="4" width="7" height="7" rx="1.5"/><path d="M4.8 7.6l1.4 1.3 2.3-2.6M14 7.5h7M14 17.5h7"/><rect x="3" y="14" width="7" height="7" rx="1.5"/>',
512
+ undo: '<path d="M9 14L4 9l5-5"/><path d="M4 9h11a5 5 0 0 1 0 10h-3"/>', play: '<path d="M7 5l12 7-12 7z"/>', pause: '<path d="M9 5v14M15 5v14"/>', lock: '<rect x="5" y="11" width="14" height="10" rx="2"/><path d="M8 11V8a4 4 0 0 1 8 0v3"/>',
513
+ xp: '<rect x="3" y="4" width="18" height="16" rx="2"/><path d="M9 10l3 3 3-3"/>', search: '<circle cx="11" cy="11" r="6.5"/><path d="M16 16l4 4"/>', back: '<path d="M15 6l-6 6 6 6"/>', plus: '<path d="M12 5v14M5 12h14"/>', x: '<path d="M6 6l12 12M18 6 6 18"/>', check: '<path d="M5 12.5l4.5 4.5L19 7.5"/>' };
499
514
  const ic = (n) => `<svg class="i" viewBox="0 0 24 24">${IC[n]}</svg>`;
500
515
  const secH = (t, tag, extra) => `<h4 class="sh">${esc(t)}${tag ? ` <small>${esc(tag)}</small>` : ''}${extra || ''}</h4>`;
501
516
  const pickLi = (it, key, on) => `<li class="mtg-pick"><span>${esc(clip(it.title, 120))}<em>${esc([it.kind, it.meta].filter(Boolean).join(' · '))}</em></span>${on ? '<span class="mtg-on">Picked</span>' : `<button class="mtg-b" data-pick="${esc(key)}">Pick</button>`}</li>`;
@@ -556,6 +571,7 @@ export function mountMeeting(d) {
556
571
 
557
572
  async function openRow(row, via) {
558
573
  delete $('#oMain').dataset.ready;
574
+ { const g = document.getElementById('dlg'); if (g) g.classList.remove('rpw'); } // a Replay left open when the dialog closed
559
575
  let replay = null, material = null, extra = { prev: [], topics: [] }, boards = W ? W.boards : [], inis = W ? W.initiatives : [], saved = '';
560
576
  const ui = { view: 'detail', status: null, tasked: new Set(), phase: 'before', picked: false }, SH = { sug: null, found: [], pick: null, scope: 'meeting', q: '', link: '', token: 0, topics: [], topic: null };
561
577
  let stT = null, findT = null, undoFn = null;
@@ -608,34 +624,86 @@ export function mountMeeting(d) {
608
624
  }
609
625
 
610
626
  /* Replay: the note's audio, the transcript and the key points on one track (GET /api/meeting-replay, GET /api/notes/recording) */
627
+ /* Replay, laid out as the prototype's replay (prototype/premium-conversation-shell, PR 901) and the console's (c3-replay.js), from GET /api/meeting-replay:
628
+ * the head with the player and the time of day, the topic track with a mark for each key point (ringed when it needs you) and each PMOS note,
629
+ * what was on screen beside the conversation (All, Key points, PMOS, search), and the key points in three columns with Confirm all. */
630
+ const RPK = { decision: ['dec', 'Decision', 'Decisions'], action: ['task', 'Next step', 'Next steps'], question: ['undo', 'Question', 'Questions'] };
611
631
  function replayHtml() {
612
- const head = `<div class="m3-fh"><button class="mtg-b" data-m3="unreplay">Back to the meeting</button><div class="m3-fti"><b>${esc(row.title)}</b><span class="note">Replay · ${esc(row.time)}</span></div></div>`;
613
- if (repM === undefined) return `<article class="paper doc mtg">${head}<p class="note" role="status">${esc(RP && RP.error ? 'Replay could not be read: ' + RP.error : 'Reading the recording.')}</p></article>`;
614
- if (!repM) return `<article class="paper doc mtg">${head}<p class="note">Reading the recording.</p></article>`;
615
- const m = repM, pct = (t) => Math.min(100, Math.max(0, t / m.len * 100)).toFixed(2);
616
- const track = m.stretches.length ? m.stretches.map((x) => `<button class="m3-stc" style="flex:${x.to - x.from}" data-m3="seek" data-t="${x.from}" data-from="${x.from}" data-to="${x.to}" aria-label="${esc(x.text || 'Topic ' + x.n)}">${x.n}</button>`).join('') : '';
617
- const marks = m.keys.filter((k) => k.t != null).map((k) => `<i class="m3-mk ${k.k}" style="left:${pct(k.t)}%" title="${k.k === 'action' ? 'Next step' : k.k === 'decision' ? 'Decision' : 'Question'}"></i>`).join('');
618
- let h = head + `<div class="m3-rctl"><button class="mtg-b" data-m3="back10" aria-label="Back 10 seconds">Back 10 s</button><button class="mtg-b cta" data-m3="play" id="rpPlay">Play</button><div class="seg2" role="group" aria-label="Speed">${[1, 1.5, 2].map((v) => `<button class="mtg-b" data-m3="spd" data-v="${v}" aria-pressed="${RP.spd === v}">${v}x</button>`).join('')}</div><span class="note m3-pos" id="rpPos"></span></div>`;
619
- h += `<div class="m3-trk" role="group" aria-label="The meeting by topic">${track}${marks}<b class="m3-ph" id="rpPh"></b></div>`;
620
- h += '<div class="m3-lgd"><span><i class="decision"></i>Decision</span><span><i class="action"></i>Next step</span><span><i class="question"></i>Question</span></div>';
621
- h += `<div class="m3-now"><span class="label">Topic</span><b id="rpTopic"></b><span class="note" id="rpNear"></span></div><div id="rpShot"></div>`;
622
- h += '<span class="label">Key points</span>' + (m.keys.length ? `<div class="m3-kps">${m.keys.map((k) => k.t != null ? `<button data-m3="seek" data-t="${k.t}"><span class="kd">${k.k === 'action' ? 'Next step' : k.k === 'decision' ? 'Decision' : 'Question'}</span><span>${esc(k.text)}</span><time>${mmss(k.t)}</time></button>` : `<div class="m3-kp0"><span class="kd">${k.k === 'action' ? 'Next step' : k.k === 'decision' ? 'Decision' : 'Question'}</span><span>${esc(k.text)}</span><em>No time</em></div>`).join('')}</div>` : '<p class="note">The note holds no decisions, next steps or questions.</p>');
623
- h += '<span class="label">Conversation</span>' + (m.lines.length ? `<div class="m3-ftr all" id="rpLines">${m.lines.map((l) => `<button class="m3-ln" id="rl${l.i}" data-m3="seek" data-t="${l.t}"><time>${mmss(l.t)}</time><b>${esc(l.who)}</b><span>${esc(l.text)}</span></button>`).join('')}</div>` : '<p class="note">The recording holds no transcript.</p>');
632
+ const back = `<button class="mtg-b" data-m3="unreplay">${ic('back')}Back to the meeting</button>`;
633
+ const head0 = `<div class="m3-fh">${back}<div class="m3-fti"><b>${esc(row.title)}</b><span class="note">Replay · ${esc(row.time)}</span></div></div>`;
634
+ if (repM === undefined) return `<article class="paper doc mtg">${head0}<p class="note" role="status">${esc(RP && RP.error ? 'Replay could not be read: ' + RP.error : 'Reading the recording.')}</p></article>`;
635
+ if (!repM) return `<article class="paper doc mtg">${head0}<p class="note">Reading the recording.</p></article>`;
636
+ const m = repM, pct = (t) => Math.min(100, Math.max(0, t / m.len * 100)).toFixed(2), w = (t) => wallOf(m, t);
637
+ const day = m.at && Number.isFinite(Date.parse(m.at)) ? new Date(m.at).toLocaleDateString(undefined, { weekday: 'short', day: 'numeric', month: 'short' }) : row.day;
638
+ const chips = [day, m.start != null ? w(0) + ' to ' + w(m.len) : '', Math.max(1, Math.round(m.len / 60000)) + ' min', m.people ? m.people + (m.people === 1 ? ' person' : ' people') : ''].filter(Boolean).join(' · ');
639
+ const kept = (m.audio ? 'audio' : 'no audio') + (m.shots.length ? ' and ' + m.shots.length + (m.shots.length === 1 ? ' screen shot' : ' screen shots') : '');
640
+ const need = m.keys.filter((k) => k.need).length;
641
+ let h = `<section class="rp-hd"><div class="m3-fh">${back}<div class="m3-fti"><b>${esc(m.title || row.title)}</b><span class="note">${esc(chips)} · ${ic('lock')}${esc(kept)}</span></div>
642
+ <div class="rp-clk"><b id="rpPos">${mmss(0)} / ${mmss(m.len)}</b><small id="rpClk">${esc(w(0))}</small></div></div>`;
643
+ h += `<div class="m3-rctl"><button class="mtg-b" data-m3="back10" aria-label="Back 10 seconds">${ic('undo')}Back 10 s</button><button class="mtg-b cta" data-m3="play" id="rpPlay">Play</button><div class="seg2" role="group" aria-label="Speed">${[1, 1.5, 2].map((v) => `<button class="mtg-b" data-m3="spd" data-v="${v}" aria-pressed="${RP.spd === v}">${v}x</button>`).join('')}</div></div>`;
644
+ const marks = m.keys.filter((k) => k.t != null).map((k) => `<button class="rp-mk ${k.k}${k.need ? ' need' : ''}" style="left:${pct(k.t)}%" data-rp="seek" data-t="${k.t}" aria-label="${RPK[k.k][1]} at ${esc(w(k.t))}: ${esc(k.text)}" title="${esc(RPK[k.k][1] + ' · ' + k.text)}"><span>${ic(RPK[k.k][0])}</span></button>`)
645
+ .concat(m.pmos.map((x) => `<button class="rp-mk pm" style="left:${pct(x.t)}%" data-rp="seek" data-t="${x.t}" aria-label="PMOS note at ${esc(w(x.t))}: ${esc(x.body)}" title="${esc('PMOS · ' + x.body)}"><span>${ic('spark')}</span></button>`)).join('');
646
+ const track = m.stretches.map((x) => `<button class="m3-stc" style="flex:${x.to - x.from}" data-m3="seek" data-t="${x.from}" data-from="${x.from}" data-to="${x.to}" aria-label="${esc((x.text || 'Topic ' + x.n) + ' from ' + w(x.from))}">${x.n}</button>`).join('');
647
+ const dots = m.keys.filter((k) => k.t != null).map((k) => `<i class="m3-mk ${k.k}" style="left:${pct(k.t)}%"></i>`).join('');
648
+ const gaps = m.gaps.map((g) => `<i class="rp-gap" style="left:${pct(g.from)}%;width:${(Math.max(0.6, (g.to - g.from) / m.len * 100)).toFixed(2)}%" title="Not recorded ${esc(w(g.from))} to ${esc(w(g.to))}"></i>`).join('');
649
+ const ticks = [0, 0.25, 0.5, 0.75, 1].map((f) => `<span>${esc(w(m.len * f))}</span>`).join('');
650
+ h += `<div class="rp-tl"><div class="rp-mks">${marks}</div><div class="m3-trk${track ? '' : ' none'}" role="group" aria-label="The meeting by topic">${track || `<button class="m3-stc" style="flex:1" data-m3="seek" data-t="0" aria-label="From the start">${m.topics.length ? '' : 'No topics were kept'}</button>`}${dots}${gaps}<b class="m3-ph" id="rpPh"></b></div><div class="rp-sc">${ticks}</div></div>`;
651
+ h += `<div class="m3-lgd"><span>${ic('dec')}Decisions</span><span>${ic('undo')}Questions</span><span>${ic('task')}Next steps</span><span>${ic('spark')}PMOS notes</span><span><i class="ring"></i>needs you</span></div></section>`;
652
+ h += `<div class="m3-now"><span class="label">Topic</span><b id="rpTopic"></b><span class="note" id="rpNear"></span>${m.shots.length ? `<span class="chp sm" id="rpShK">${ic('xp')}<span></span></span>` : ''}${m.keys.length ? `<button class="mtg-b" data-rp="keys">${ic('check')}${m.keys.length} key ${m.keys.length === 1 ? 'point' : 'points'}${need ? ' · ' + need + ' need you' : ''}</button>` : ''}</div>`;
653
+ const strip = m.shots.map((x) => `<button class="mtg-b" data-m3="seek" data-t="${x.t}" data-shot="${x.t}" title="${esc(x.why || 'The shared screen at ' + w(x.t))}">${esc(w(x.t))}</button>`).join('');
654
+ h += `<div class="rp-g"><section class="rp-box rp-st"><div class="rp-cap">${ic('xp')}<b>On screen</b><span class="note">Kept when the screen changed${m.aside ? ' · ' + m.aside + ' set aside' : ''}</span></div><div id="rpShot"></div>${strip ? `<div class="rp-ts" role="group" aria-label="Screen shots kept, by time">${strip}</div>` : ''}</section>
655
+ <section class="rp-box rp-cv"><div class="rp-cvh"><b>Conversation</b><div class="seg2" role="group" aria-label="Show">${[['a', 'All'], ['k', 'Key points'], ['p', 'PMOS']].map(([k, l]) => `<button class="mtg-b" data-rp="tab" data-v="${k}" aria-pressed="${RP.tab === k}">${l}</button>`).join('')}</div></div>
656
+ <div class="m3-ftr all" id="rpLines">${convHtml()}</div><label class="rp-q">${ic('search')}<input id="rpQ" type="search" placeholder="Search what was said" aria-label="Search what was said" value="${esc(RP.q)}" autocomplete="off"></label></section></div>`;
657
+ h += `<section class="rp-box" id="rpKeys"><div class="rp-cvh"><div class="rp-cap">${ic('check')}<b>Key points</b></div>${m.keys.some((k) => k.k === 'action') ? `<button class="mtg-b cta" data-rp="confirm" title="Make a task of each next step on the note’s initiative">${ic('check')}Confirm all</button>` : ''}</div>`
658
+ + (m.keys.length ? `<div class="m3-kps rp-kc">${['decision', 'action', 'question'].map((k) => { const l = m.keys.filter((x) => x.k === k); return `<div class="rp-col"><h4>${ic(RPK[k][0])}${RPK[k][2]}<small>${l.length}</small></h4>${l.length ? l.map(keyHtml).join('') : '<p class="note">None caught.</p>'}</div>`; }).join('')}</div><p class="note">Each one plays from the moment it was said. Confirm all makes a task of each next step on the note’s initiative.</p>` : '<p class="note">The note holds no decisions, next steps or questions.</p>') + '</section>';
624
659
  h += `<p class="note">${m.audio && !RP.noAudio ? 'Plays the note’s audio, kept on this machine.' : 'No audio is kept for this meeting, so the playhead keeps its own clock.'}</p>`;
625
- return `<article class="paper doc mtg">${h}</article>`;
660
+ return `<article class="paper doc mtg rpv">${h}</article>`;
661
+ }
662
+ function keyHtml(k) {
663
+ const meta = k.k === 'decision' ? (k.by || 'the group') : k.k === 'action' ? (k.owner ? [k.owner, k.due && 'due ' + k.due].filter(Boolean).join(' · ') : 'no owner') : k.state === 'answered' ? 'answered' : 'still open';
664
+ const tags = `<span class="rp-tg"><span class="${k.need ? 'warn' : ''}">${esc(meta)}</span>${k.k === 'question' ? '' : `<span>${RP.done.has(k.id) ? 'task made' : 'draft'}</span>`}</span>`;
665
+ const kind = `<span class="kd">${esc(RPK[k.k][1])}</span>`;
666
+ return k.t != null ? `<button data-m3="seek" data-t="${k.t}" class="${k.need ? 'need' : ''}">${kind}<span>${esc(k.text)}${tags}</span><time>${esc(wallOf(repM, k.t))}</time></button>`
667
+ : `<div class="m3-kp0${k.need ? ' need' : ''}">${kind}<span>${esc(k.text)}${tags}</span><em>No time</em></div>`;
668
+ }
669
+ function convHtml() {
670
+ const m = repM, q = RP.q.trim().toLowerCase();
671
+ const all = [...m.lines.map((l) => ({ t: l.t, l })), ...m.pmos.map((p) => ({ t: p.t, p }))].sort((a, b) => a.t - b.t || (a.p ? 1 : 0) - (b.p ? 1 : 0))
672
+ .filter((x) => RP.tab === 'a' || (RP.tab === 'k' ? x.l && x.l.key : x.p)).filter((x) => !q || (x.l ? x.l.who + ' ' + x.l.text : x.p.body).toLowerCase().includes(q));
673
+ if (!all.length) return `<p class="note">${q ? 'Nothing said matches “' + esc(RP.q) + '”.' : RP.tab === 'p' ? 'PMOS made no notes during this meeting.' : RP.tab === 'k' ? 'No line was caught as a key point.' : 'The recording holds no transcript.'}</p>`;
674
+ return all.map((x) => x.p ? `<button class="m3-ln pm" data-m3="seek" data-t="${x.t}"><time>${esc(wallOf(m, x.t))}</time><b>PMOS</b><span>${esc(x.p.body)}</span></button>`
675
+ : `<button class="m3-ln" id="rl${x.l.i}" data-m3="seek" data-t="${x.l.t}"><time>${esc(wallOf(m, x.l.t))}</time><b>${esc(x.l.who || 'You')}</b><span>${x.l.key && RPK[x.l.key] ? `<em class="rp-kt">${esc(RPK[x.l.key][1])}</em>` : ''}${esc(x.l.text)}</span></button>`).join('');
626
676
  }
627
677
  function replayPaint() {
628
678
  const m = repM; if (!m || !alive('replay')) return;
629
679
  const pos = RP.pos, at = replayAt(m, pos), $q = (id) => document.getElementById(id);
630
680
  if ($q('rpPos')) $q('rpPos').textContent = mmss(pos) + ' / ' + mmss(m.len);
681
+ if ($q('rpClk')) $q('rpClk').textContent = wallOf(m, pos);
631
682
  if ($q('rpPh')) $q('rpPh').style.left = Math.min(100, pos / m.len * 100).toFixed(2) + '%';
632
683
  if ($q('rpTopic')) $q('rpTopic').textContent = at.stretch ? (at.stretch.text || 'Topic ' + at.stretch.n) : m.stretches.length ? 'Between topics' : 'No topics were kept';
633
684
  if ($q('rpNear')) $q('rpNear').textContent = at.near ? at.near + (at.near === 1 ? ' key point near' : ' key points near') : '';
634
685
  if ($q('rpPlay')) $q('rpPlay').textContent = RP.play ? 'Pause' : 'Play';
635
686
  $$('#oMain .m3-stc[data-from]').forEach((b) => b.classList.toggle('on', pos >= +b.dataset.from && pos < +b.dataset.to));
636
687
  const prev = RP.line; RP.line = at.line;
637
- if (prev !== at.line) { if (prev >= 0 && $q('rl' + prev)) $q('rl' + prev).classList.remove('cur'); const c = at.line >= 0 ? $q('rl' + at.line) : null; if (c) { c.classList.add('cur'); if (RP.play) c.scrollIntoView({ block: 'nearest' }); } }
638
- const sh = $q('rpShot'); if (sh) { const want = at.shot >= 0 ? m.shots[at.shot] : null, have = sh.dataset.t || ''; if ((want ? String(want.t) : '') !== have) { sh.dataset.t = want ? want.t : ''; sh.innerHTML = want && m.noteId ? `<figure class="m3-shot"><img src="/api/notes/screen?id=${encodeURIComponent(m.noteId)}&t=${want.t}" alt="${esc(want.why || 'The shared screen at ' + mmss(want.t))}" loading="lazy"><figcaption class="note">${esc(want.why || 'The shared screen at ' + mmss(want.t))}</figcaption></figure>` : ''; } }
688
+ if (prev !== at.line) { if (prev >= 0 && $q('rl' + prev)) $q('rl' + prev).classList.remove('cur'); const c = at.line >= 0 ? $q('rl' + at.line) : null; if (c) { c.classList.add('cur'); if (RP.play) { const L = $q('rpLines'); if (L) L.scrollTop = Math.max(0, c.offsetTop - L.offsetTop - L.clientHeight / 3); } } }
689
+ $$('#oMain .m3-ln.pm').forEach((b) => b.classList.toggle('fut', +b.dataset.t > pos));
690
+ const want = at.shot >= 0 ? m.shots[at.shot] : null;
691
+ if ($q('rpShK')) $q('rpShK').lastChild.textContent = want ? 'Screen shot from ' + wallOf(m, want.t) : 'Nothing shared yet';
692
+ $$('#oMain [data-shot]').forEach((b) => b.setAttribute('aria-pressed', String(!!want && +b.dataset.shot === want.t)));
693
+ const sh = $q('rpShot'); if (sh) { const have = sh.dataset.t, key = want ? String(want.t) : 'none'; if (key !== have) { sh.dataset.t = key; sh.innerHTML = want && m.noteId ? `<figure class="m3-shot"><img src="/api/notes/screen?id=${encodeURIComponent(m.noteId)}&t=${want.t}" alt="${esc(want.why || 'The shared screen at ' + mmss(want.t))}" loading="lazy"><figcaption class="note">${esc(want.why || 'The shared screen at ' + mmss(want.t))} · ${esc(wallOf(m, want.t))}</figcaption></figure>` : `<p class="note rp-none">${m.shots.length ? 'Nothing was shared yet. The first screen shot is at ' + esc(wallOf(m, m.shots[0].t)) + '.' : 'No screen shots were kept for this meeting.'}</p>`; } }
694
+ }
695
+ /* Confirm all: each next step not yet made becomes a task of the note's initiative, as Make task does (POST /api/plan-items) */
696
+ async function confirmAll(btn) {
697
+ const m = repM, todo = m.keys.filter((k) => k.k === 'action' && !RP.done.has(k.id));
698
+ if (!todo.length) return say('Every next step is already a task.');
699
+ if (!m.note || !m.note.initiative) return say('Link the note to an initiative first. Confirm all adds each next step to its breakdown.');
700
+ if (btn) btn.disabled = true;
701
+ let made = 0, last = '';
702
+ for (const k of todo) { const res = await planTask(m.note, { text: k.text, owner: k.owner, due: k.due }); if (!res.ok) { last = res.text; break; } RP.done.add(k.id); made++; }
703
+ if (!alive('replay')) return;
704
+ const L = $('#rpKeys'); if (L) { const fresh = document.createElement('div'); fresh.innerHTML = replayHtml(); const k2 = fresh.querySelector('#rpKeys'); if (k2) L.replaceWith(k2); }
705
+ say(made ? `${made} next ${made === 1 ? 'step is' : 'steps are'} now ${made === 1 ? 'a task' : 'tasks'} in ${m.note.initiative.name}.${last ? ' ' + last : ''}` : last);
706
+ replayPaint();
639
707
  }
640
708
  function replayStop() { clearInterval(RP && RP.tm); if (RP && RP.aud) { try { RP.aud.pause(); } catch { /* gone */ } } if (RP) RP.play = false; }
641
709
  function replaySeek(ms, play) {
@@ -659,7 +727,8 @@ export function mountMeeting(d) {
659
727
  replayPaint();
660
728
  }
661
729
  async function openReplay() {
662
- ui.view = 'replay'; repM = null; RP = { pos: 0, play: false, spd: 1, aud: null, tm: null, line: -2, noAudio: false }; paint();
730
+ ui.view = 'replay'; repM = null; RP = { pos: 0, play: false, spd: 1, aud: null, tm: null, line: -2, noAudio: false, tab: 'a', q: '', done: new Set() };
731
+ wide(true); paint();
663
732
  const r = await d.pmGet('/api/meeting-replay?event=' + encodeURIComponent(row.id) + '&date=' + row.day);
664
733
  if (!alive('replay')) return;
665
734
  repM = replayModel(r);
@@ -667,7 +736,14 @@ export function mountMeeting(d) {
667
736
  if (repM.audio) { RP.aud = new Audio(repM.audio.url); RP.aud.preload = 'metadata'; RP.aud.addEventListener('error', () => { RP.aud = null; RP.noAudio = true; }); }
668
737
  paint(); $('#rpPlay') && $('#rpPlay').focus(); replayPaint();
669
738
  }
670
- const leave = (to) => { clearTimeout(fT); if (ui.view === 'replay') replayStop(); ui.view = to; ui.change = false; paint(); const b = $('#oMain [data-m3="' + (to === 'detail' ? (RP && repM ? 'replay' : 'focus') : '') + '"]'); if (b) b.focus(); };
739
+ /* Replay takes the whole window with the conversation hidden, as the prototype's replay does; leaving it puts the dialog back as it was */
740
+ let wasDlg = null;
741
+ function wide(on) {
742
+ const g = document.getElementById('dlg'); if (!g || !d.setFull || !d.setMode) return;
743
+ if (on) { if (!wasDlg) wasDlg = { full: g.classList.contains('full'), mode: g.dataset.mode || 'split' }; d.setFull(true); d.setMode('detail'); g.classList.add('rpw'); return; }
744
+ g.classList.remove('rpw'); if (wasDlg) { d.setFull(wasDlg.full); d.setMode(wasDlg.mode); wasDlg = null; }
745
+ }
746
+ const leave = (to) => { clearTimeout(fT); if (ui.view === 'replay') { replayStop(); wide(false); } ui.view = to; ui.change = false; paint(); const b = $('#oMain [data-m3="' + (to === 'detail' ? (RP && repM ? 'replay' : 'focus') : '') + '"]'); if (b) b.focus(); };
671
747
 
672
748
  /* the presses of the Record row, Focus and Replay */
673
749
  async function m3Press(act, t) {
@@ -700,7 +776,7 @@ export function mountMeeting(d) {
700
776
  if (res && res.ok === true) await readFocus(); paint(); if (ui.recMsg) d.toast(ui.recMsg); return;
701
777
  }
702
778
  case 'replay': return openReplay();
703
- case 'unreplay': replayStop(); ui.view = 'detail'; paint(); { const b = $('#oMain [data-m3="replay"]'); if (b) b.focus(); } return;
779
+ case 'unreplay': replayStop(); wide(false); ui.view = 'detail'; paint(); { const b = $('#oMain [data-m3="replay"]'); if (b) b.focus(); } return;
704
780
  case 'play': if (repM && RP) replayToggle(); return;
705
781
  case 'back10': if (repM && RP) replaySeek(RP.pos - 10000, false); return;
706
782
  case 'spd': if (RP) { RP.spd = +t.dataset.v; if (RP.aud) RP.aud.playbackRate = RP.spd; $$('#oMain [data-m3="spd"]').forEach((b) => b.setAttribute('aria-pressed', +b.dataset.v === RP.spd)); } return;
@@ -793,6 +869,7 @@ export function mountMeeting(d) {
793
869
  const pickOf = (key) => { const [k, i] = key.split(':'); return (k === 'sug' ? SH.sug : k === 'found' ? SH.found : [pasteOf(SH.link)])[+i] || null; };
794
870
 
795
871
  $('#oMain').oninput = (e) => {
872
+ if (e.target.id === 'rpQ' && repM && RP) { RP.q = e.target.value; $('#rpLines').innerHTML = convHtml(); RP.line = -2; replayPaint(); return; }
796
873
  if (e.target.id === 'mmLinkIn') { SH.link = e.target.value.trim(); const p = pasteOf(SH.link); if (p) SH.pick = p; else if (SH.pick && !SH.pick.ref) SH.pick = null; paintSheet(); }
797
874
  if (e.target.id === 'mmFind') {
798
875
  SH.q = e.target.value.trim(); SH.found = []; SH.foundBusy = SH.q.length >= 2; paintSheet(); clearTimeout(findT);
@@ -806,6 +883,14 @@ export function mountMeeting(d) {
806
883
  $('#oMain').onclick = async (e) => {
807
884
  const t = e.target.closest('button'); if (!t) return;
808
885
  if (t.dataset.m3) return m3Press(t.dataset.m3, t);
886
+ if (t.dataset.rp && repM && RP) { // the Replay's own presses: a mark on the track, the conversation tabs, the key points link and Confirm all
887
+ const k = t.dataset.rp;
888
+ if (k === 'seek') return replaySeek(+t.dataset.t, true);
889
+ if (k === 'tab') { RP.tab = t.dataset.v; $$('#oMain [data-rp="tab"]').forEach((b) => b.setAttribute('aria-pressed', String(b === t))); $('#rpLines').innerHTML = convHtml(); RP.line = -2; replayPaint(); return; }
890
+ if (k === 'keys') { const n = $('#rpKeys'); if (n) n.scrollIntoView({ behavior: 'smooth', block: 'start' }); return; }
891
+ if (k === 'confirm') return confirmAll(t);
892
+ return;
893
+ }
809
894
  if (t.dataset.ph) {
810
895
  ui.phase = t.dataset.ph; ui.picked = true;
811
896
  $$('#oMain .vm-ph [data-ph]').forEach((b) => b.setAttribute('aria-pressed', String(b === t)));
@@ -1668,6 +1668,45 @@ button.m3-stc{min-height:44px;margin:-7px 0}button.m3-stc:hover{background:var(-
1668
1668
  .m3-kps button:hover{background:var(--well)}.m3-kps time,.m3-kp0 em{font:500 var(--t-small) var(--mono);color:var(--ink-3);font-style:normal}.m3-kps .kd{font-size:var(--t-small);color:var(--ink-3)}
1669
1669
  .m3-ln{display:grid;grid-template-columns:44px 56px minmax(0,1fr);gap:10px;text-align:left;padding:8px 10px;border-radius:14px;font-size:var(--t-body);color:var(--ink-2);line-height:1.45;min-height:44px}.m3-ln time{font:500 var(--t-small) var(--mono);color:var(--ink-3)}.m3-ln b{color:var(--ink)}.m3-ln:hover{background:var(--well)}.m3-ln.cur{background:var(--well);color:var(--ink)}
1670
1670
  .m3-shot{margin:8px 0;display:grid;gap:6px}.m3-shot img{max-width:100%;border-radius:14px;border:1px solid var(--hair)}.m3-shot figcaption{margin:0}
1671
+ /* Replay, as the prototype's replay (prototype/premium-conversation-shell): the whole window, the conversation hidden, the player in the head */
1672
+ #dlg.rpw .dhead .dht,#dlg.rpw #dPane,#dlg.rpw #dExpand{display:none}#dlg.rpw .dhead{justify-content:flex-end}
1673
+ .rpv{max-width:1280px;margin:0 auto}
1674
+ .rpv .m3-fh .i,.rpv .m3-rctl .i,.rpv .m3-now .i,.rpv .m3-lgd .i,.rp-cap .i,.rp-col h4 .i,.rp-q .i{width:14px;height:14px;vertical-align:-2px;margin-right:5px;fill:none;stroke:currentColor;stroke-width:1.8}
1675
+ .rp-hd{padding:16px 18px;border-radius:14px;box-shadow:inset 0 0 0 1.5px var(--b3);margin-bottom:10px}
1676
+ .rp-hd .m3-fh{margin-bottom:10px}.rp-hd .m3-fti .note .i{margin:0 4px 0 2px}
1677
+ .rp-clk{display:grid;justify-items:end;font-family:var(--mono)}.rp-clk b{font-size:var(--t-title)}.rp-clk small{font-size:var(--t-small);color:var(--ink-3)}
1678
+ .rp-hd .m3-rctl{margin-bottom:4px}
1679
+ .rp-tl{position:relative;padding-top:46px}
1680
+ .rp-mks{position:absolute;left:0;right:0;top:0;height:44px}
1681
+ .rp-mk{position:absolute;top:0;width:44px;height:44px;margin-left:-22px;display:grid;place-items:center;border-radius:50%}
1682
+ .rp-mk>span{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:var(--card-solid);box-shadow:inset 0 0 0 1.5px var(--ink-2);color:var(--ink-2)}
1683
+ .rp-mk .i{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2}
1684
+ .rp-mk.action>span,.rp-mk.question>span{box-shadow:inset 0 0 0 1.5px var(--ember-ink);color:var(--ember-ink)}.rp-mk.pm>span{box-shadow:inset 0 0 0 1.5px var(--ink-3);color:var(--ink-3)}
1685
+ .rp-mk.need>span{outline:3px solid color-mix(in oklab,var(--ember) 35%,transparent)}
1686
+ .rp-mk:focus-visible{outline:2px solid var(--ink);outline-offset:-4px}
1687
+ .rp-tl .m3-trk{margin:0}.rp-tl .m3-trk.none .m3-stc{color:var(--ink-3);font-family:var(--sans)}
1688
+ .rp-gap{position:absolute;top:0;bottom:0;background:repeating-linear-gradient(135deg,var(--b3) 0 4px,transparent 4px 8px);border-radius:8px;pointer-events:none}
1689
+ .rp-sc{display:flex;justify-content:space-between;font:500 var(--t-micro) var(--mono);color:var(--ink-3);margin-top:6px}
1690
+ .rpv .m3-lgd .ring{width:11px;height:11px;border-radius:50%;background:none;box-shadow:inset 0 0 0 1.5px var(--ember-ink);vertical-align:-1px}
1691
+ .rpv .m3-now{margin:0 0 10px}.rpv .m3-now .chp{margin-left:auto}.rpv .m3-now .chp~.mtg-b{margin-left:0}
1692
+ .rp-g{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(280px,1fr);gap:10px;align-items:start;margin-bottom:10px}
1693
+ .rp-box{padding:14px 16px;border-radius:14px;box-shadow:inset 0 0 0 1.5px var(--b3);margin-bottom:10px;min-width:0}.rp-g .rp-box{margin-bottom:0}
1694
+ .rp-cap{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-bottom:8px}.rp-cap .note{margin:0 0 0 auto}
1695
+ .rp-none{padding:36px 12px;text-align:center;border-radius:14px;background:var(--well)}
1696
+ .rp-ts{display:flex;flex-wrap:wrap;gap:4px;margin-top:8px}.rp-ts .mtg-b{font-family:var(--mono)}.rp-ts .mtg-b[aria-pressed="true"]{box-shadow:inset 0 0 0 1.5px var(--ink);color:var(--ink)}
1697
+ .rp-cv{display:flex;flex-direction:column;max-height:620px}
1698
+ .rp-cvh .seg2 .mtg-b{min-width:44px;justify-content:center}.rp-cvh{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;padding-bottom:8px;border-bottom:1px solid var(--hair)}.rp-cvh .rp-cap{margin:0}
1699
+ .rp-cv .m3-ftr{flex:1;overflow:auto;min-height:160px;margin:6px 0}
1700
+ .rp-cv .m3-ln{grid-template-columns:48px 64px minmax(0,1fr)}.m3-ln.pm b{color:var(--ink-2)}.m3-ln.pm.fut,.rp-cv .m3-ln.fut{opacity:.55}
1701
+ .rp-kt{font-style:normal;font-size:var(--t-micro);font-weight:600;color:var(--ember-ink);margin-right:6px;text-transform:uppercase;letter-spacing:.04em}
1702
+ .rp-q{display:flex;align-items:center;gap:6px;min-height:44px;padding:0 12px;border-radius:12px;background:var(--well);color:var(--ink-3)}.rp-q input{flex:1;min-width:0;min-height:44px;border:0;background:none;color:var(--ink);font:inherit}.rp-q input:focus-visible{outline:none}.rp-q:focus-within{box-shadow:inset 0 0 0 2px var(--ink)}
1703
+ .rp-kc{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:10px}
1704
+ .rp-col{display:grid;align-content:start}.rp-col h4{display:flex;align-items:center;gap:2px;margin:0 0 6px;font-size:var(--t-small);color:var(--ink-2)}.rp-col h4 small{margin-left:6px;font-family:var(--mono);color:var(--ink-3)}
1705
+ .rp-kc button,.rp-kc .m3-kp0{grid-template-columns:minmax(0,1fr) auto}.rp-kc .kd{display:none}
1706
+ .rp-kc .need{box-shadow:inset 3px 0 0 var(--ember)}
1707
+ .rp-tg{display:flex;gap:8px;flex-wrap:wrap;margin-top:4px;font-size:var(--t-small);color:var(--ink-3)}.rp-tg .warn{color:var(--ember-ink)}
1708
+ @media (hover:hover){.rp-mk:hover>span{background:var(--well)}}
1709
+ @media (max-width:1000px){.rp-g,.rp-kc{grid-template-columns:minmax(0,1fr)}.rp-cv{max-height:none}.rp-cv .m3-ftr{max-height:420px}.rp-clk{justify-items:start}}
1671
1710
  @media (max-width:1000px){.m3-cap{grid-template-columns:1fr}.m3-kps button,.m3-kp0{grid-template-columns:70px minmax(0,1fr)}.m3-kps time,.m3-kp0 em{display:none}.m3-ln{grid-template-columns:40px 48px minmax(0,1fr)}}
1672
1711
 
1673
1712
  /* ---- the premium Welcome page and the first-Briefing card (initiative premium-welcome): the approved mockup's rules (prototype/premium-welcome) ---- */
@@ -12,7 +12,7 @@ import { lineItems, behindOf, refreshTargets, whenRead } from './freshness-words
12
12
  import { consoleReads, briefOf, needsListOf } from './premium-brief.js';
13
13
  import { mountDocSheet } from './premium-doc-sheet.js';
14
14
  import { momentOf, inText } from './c3-phone-model.js';
15
- import { $, $$, esc, store, THEME_KEY, RM, AI, S, theme, toast, kv, H, openDlg, closeDlg, setTab, setMode, CHECK, CHEV, ptx, turnA, turnU, H1, H2, P1, UL, logHtml, loadThread, onScroll, wireRail, pvFeed, setPageGaps, sourcesHook, onPageChat, openPageChat } from './premium-shell.js';
15
+ import { $, $$, esc, store, THEME_KEY, RM, AI, S, theme, toast, kv, H, openDlg, closeDlg, setTab, setMode, setFull, CHECK, CHEV, ptx, turnA, turnU, H1, H2, P1, UL, logHtml, loadThread, onScroll, wireRail, pvFeed, setPageGaps, sourcesHook, onPageChat, openPageChat } from './premium-shell.js';
16
16
  const ICON = {
17
17
  meeting: '<rect x="4" y="5" width="16" height="15" rx="3"/><path d="M4 10h16M9 3v4M15 3v4"/>',
18
18
  merge: '<circle cx="6" cy="6" r="2"/><circle cx="6" cy="18" r="2"/><circle cx="18" cy="9" r="2"/><path d="M6 8v8M18 11c0 4-6 3-12 5"/>',
@@ -25,7 +25,7 @@ const on = new Set(Object.keys(SRC));
25
25
  const pinned = new Set();
26
26
 
27
27
  wireRail('brief');
28
- const week = mountMeeting({ $, $$, esc, openDlg, toast, pmGet, pmPost, turnA, ptx, kv, H, ws: () => new URLSearchParams(location.search).get('ws'), redraw: () => { if (M) drawTl(); } });
28
+ const week = mountMeeting({ $, $$, esc, openDlg, toast, pmGet, pmPost, turnA, ptx, kv, H, setMode, setFull, ws: () => new URLSearchParams(location.search).get('ws'), redraw: () => { if (M) drawTl(); } });
29
29
  mountCalEntry($('#todayCard'), { $, esc, openDlg, setMode, turnA, ptx, pmGet, ws: () => new URLSearchParams(location.search).get('ws'), openRow: week.openRow }); // the full calendar: Day, Week and Month in the viewer
30
30
  mountNotes({ $, esc, openDlg, toast, pmGet, pmPost, task: week.task });
31
31