create-pmos 0.283.0 → 0.284.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.283.0",
3
+ "version": "0.284.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": {
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@f4c3796
1
+ kernel-source: pmos@2b0068e
2
2
  assembled: 2026-10-19
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-19T02:39:02Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-19T02:48:46Z"}
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-19T02:39:02Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-19T02:48:46Z"}
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-19T02:39:02Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-19T02:48:46Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -118,7 +118,7 @@ const SUGGEST = { ok: true, suggested: [{ kind: 'pmos-doc', ref: 'planning/prd/p
118
118
  const p = A.page;
119
119
 
120
120
  /* M1 the sheet */
121
- ok('M2 each removable row has Remove, and the row says its scope', await p.evaluate(() => { const b = document.querySelector('.mtg-rm'); return !!b && /Roadmap/.test(b.getAttribute('aria-label')) && /document itself is not changed/.test(b.title) && /for this meeting/.test(b.closest('li').textContent); }));
121
+ ok('M2 each removable row has Remove, and the row says its scope', await p.evaluate(() => { const b = document.querySelector('.mtg-rm'); return !!b && /Roadmap/.test(b.getAttribute('aria-label')) && /document itself is not changed/.test(b.title) && /for this meeting/.test(b.closest('.mat').textContent); }));
122
122
  await p.click('#mmAdd');
123
123
  const sheet = await until(() => p.evaluate(() => { const s = document.querySelector('.mtg-sheet'); return s && /Premium UX PRD/.test(s.textContent) ? s.textContent : null; }));
124
124
  ok('M1 the sheet opens in the dialog with Suggested, Find in PMOS and Or paste a link', sheet && /Suggested for this meeting/.test(sheet) && /Find in PMOS/.test(sheet) && /Or paste a link/.test(sheet), String(sheet).slice(0, 200));
@@ -219,10 +219,11 @@ const SUGGEST = { ok: true, suggested: [{ kind: 'pmos-doc', ref: 'planning/prd/p
219
219
  const css = (page, sel) => page.evaluate((s) => { const e = document.querySelector(s); if (!e) return null; const c = getComputedStyle(e); return ['fontWeight', 'borderRadius'].map((k) => c[k]).join('|'); }, sel);
220
220
  const mk = await browser.newContext({ viewport: { width: 1280, height: 900 } }); const mp = await mk.newPage();
221
221
  await mp.setContent(MOCKUP); await mp.waitForTimeout(500);
222
- const ctaM = await mp.evaluate(() => { const b = document.createElement('button'); b.className = 'cta'; document.body.appendChild(b); const c = getComputedStyle(b); return c.fontWeight + '|' + c.borderRadius; }), F1 = await open(), addB = await css(F1.page, '#mmAdd');
222
+ const ctaM = await mp.evaluate(() => { const b = document.createElement('button'); b.className = 'cta'; document.body.appendChild(b); const c = getComputedStyle(b); return c.fontWeight + '|' + c.borderRadius; });
223
+ const addM = await mp.evaluate(() => { const b = document.createElement('button'); b.className = 'addb'; document.body.appendChild(b); const c = getComputedStyle(b); return c.fontWeight + '|' + c.borderRadius; }), F1 = await open(), addB = await css(F1.page, '#mmAdd');
223
224
  await F1.page.click('#mmAdd'); await until(() => F1.page.evaluate(() => /Premium UX PRD/.test(document.querySelector('#mmSug').textContent))); await F1.page.click('#mmSug [data-pick]');
224
225
  const doB = await css(F1.page, '#mmDo');
225
- ok('M7 fidelity: the buttons keep the mockup\'s pill radius and weight', ctaM && addB && addB === ctaM && doB === ctaM, ctaM + ' vs ' + addB + ' / ' + doB);
226
+ ok('M7 fidelity: the buttons keep the mockup\'s pill radius and weight', ctaM && addB && addB === addM && doB === ctaM, ctaM + ' / ' + addM + ' vs ' + addB + ' / ' + doB);
226
227
  const labM = await mp.evaluate(() => { const e = document.querySelector('.label'); return e ? getComputedStyle(e).fontSize + '|' + getComputedStyle(e).textTransform : null; });
227
228
  const labP = await F1.page.evaluate(() => { const e = document.querySelector('.mtg-sec .label'); return e ? getComputedStyle(e).fontSize + '|' + getComputedStyle(e).textTransform : null; });
228
229
  ok('M7 fidelity: a sheet section label uses the mockup\'s label type', labM && labP && labM === labP, labM + ' vs ' + labP);
@@ -266,3 +266,5 @@ The premium Briefing is the default page: `/` and `/index.html` open it. The con
266
266
  On a phone or tablet (under 1000 px) every dialog opens on **Detail**. A **Detail / Conversation** switch sits under the title, and **Open it** at the foot of Detail brings the conversation when an action waits there. The header holds only **Close**. A document sheet picks its view (**Read**, **Edit**, **Proposals**, **Edit log**, **Health**) from one button with a menu.
267
267
 
268
268
  A dialog's detail panel opens with the record's path, its heading and one lead line. A decision's evidence reads as a list. A measure's dialog draws the measure's chart above its facts and readings.
269
+
270
+ A calendar meeting's panel follows the mockup's Design review panel: the title with a status chip (when it starts, on now, or done), **Focus** and **Record**, **Prepared for you** (what it is about, people, material and the last meeting, each Ready only when PMOS holds that record), **Material** with **Add material**, **Previous meetings** and **Topics**. What Record and Focus do is one press away under **What Record does** and **What Focus reads**.
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.283.0",
3
+ "version": "0.284.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pmos-workspace",
9
- "version": "0.283.0",
9
+ "version": "0.284.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.283.0",
3
+ "version": "0.284.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",
@@ -43,7 +43,7 @@ export function weekView(r, today) {
43
43
  }
44
44
 
45
45
  /** The meeting dialog's sections. `row` is a weekView row; `replay` is { state:'none'|'ok'|'error', body }; `material` is { state, items }. Nothing here is invented. */
46
- export function meetingView(row, replay, material) {
46
+ export function meetingView(row, replay, material, extra) {
47
47
  const rep = replay && replay.state === 'ok' ? replay.body : null;
48
48
  const people = row.who && row.who.length ? row.who : (rep && rep.meeting && Array.isArray(rep.meeting.attendees) ? rep.meeting.attendees : []);
49
49
  const keys = rep && Array.isArray(rep.keys) ? rep.keys : [];
@@ -57,11 +57,43 @@ export function meetingView(row, replay, material) {
57
57
  notesLine: !replay ? 'Reading the notes.' : replay.state === 'error' ? 'The notes could not be read: ' + clip(replay.error, 120) : replay.state === 'none' ? 'No notes for this meeting.' : '',
58
58
  replay: rep && (rep.audio || heard) ? { minutes: heard, keyPoints: keys.length, lines: Array.isArray(rep.lines) ? rep.lines.length : 0 } : null,
59
59
  material: material && material.state === 'ok' ? (material.items || []).map((i, n) => ({ n, title: clip(i.title || i.ref || i.url, 120), kind: i.kind || '', topic: clip(i.topic, 80), scope: i.scope === 'series' ? 'every meeting of this series' : 'this meeting', removable: i.from === 'you' && (i.scope === 'series' || i.scope === 'meeting'), line: removeLine(i) })) : null,
60
+ ...prepOf(row, people, material, extra, aboutOf(row.level)),
60
61
  materialLine: !material ? 'Reading the material.' : material.state === 'error' ? 'The material could not be read: ' + clip(material.error, 120) : (material.items || []).length ? '' : 'No material is linked to this meeting.',
61
62
  row,
62
63
  };
63
64
  }
64
65
 
66
+ /** The meetings before this one in its series, from GET /api/notes/series: the date, what was decided and how many next steps it added. Newest first. */
67
+ export function prevOf(series, row) {
68
+ const ms = series && series.ok === true && series.series && Array.isArray(series.series.meetings) ? series.series.meetings : [];
69
+ const at = Date.parse(row.at);
70
+ return ms.filter((m) => m && Number.isFinite(Date.parse(m.at)) && Date.parse(m.at) < at - 60000).slice(0, 5)
71
+ .map((m) => ({ id: m.id, date: (() => { const t = new Date(m.at); return t.getDate() + ' ' + MON[t.getMonth()]; })(), decided: Number(m.decisions) || 0, steps: Number(m.new_actions) || 0, overview: clip(m.overview, 160) }));
72
+ }
73
+ /** The chips next to the title: when it starts, or that it is on or done. Only what the clock and the note say. */
74
+ export function statusChips(row, note, now = Date.now()) {
75
+ const out = [], at = Date.parse(row.at);
76
+ if (note && note.state === 'recording') return [{ text: 'Recording', kind: 'bad' }];
77
+ if (note && note.state === 'paused') return [{ text: 'Paused', kind: 'warn' }];
78
+ if (note && note.state === 'ended') return [{ text: 'Done', kind: 'ok' }];
79
+ if (!hasTime(row.at)) return out;
80
+ if (now < at) { const m = Math.max(1, Math.round((at - now) / 60000)); out.push({ text: 'Starts in ' + (m < 60 ? m + ' min' : Math.floor(m / 60) + ' h' + (m % 60 ? ' ' + (m % 60) + ' min' : '')), kind: m <= 60 ? 'warn' : '' }); }
81
+ else if (row.past || (Number.isFinite(Date.parse(row.end)) && now > Date.parse(row.end))) out.push({ text: 'Done', kind: 'ok' });
82
+ else out.push({ text: 'On now', kind: 'bad' });
83
+ return out;
84
+ }
85
+ /** "Prepared for you": one row per thing PMOS can say it holds for this meeting. A row is ready only when its record exists. */
86
+ function prepOf(row, people, material, extra, about) {
87
+ const mats = material && material.state === 'ok' ? material.items || [] : [], prev = (extra && extra.prev) || [];
88
+ const rows = [
89
+ { ic: 'link', l: 'What it is about', ok: !!about, text: about || (row.past ? 'The calendar answer holds no link for an earlier meeting.' : 'Not linked yet.'), about: true },
90
+ { ic: 'user', l: 'People', ok: people.length > 0, text: people.length ? '' : 'The calendar lists no other people.', people: people.slice(0, 12) },
91
+ { ic: 'doc', l: 'Material', ok: mats.length > 0, text: mats.length ? '' : !material ? 'Reading the material.' : 'No material is linked to this meeting.', chips: mats.slice(0, 3).map((i) => clip(i.title || i.ref || i.url, 40)) },
92
+ { ic: 'clock', l: 'Last time', ok: prev.length > 0, text: prev.length ? prev[0].date + ' · ' + prev[0].decided + ' decided' + (prev[0].overview ? ' · ' + prev[0].overview : '') : 'No earlier notes of this meeting are kept.' },
93
+ ];
94
+ return { prep: rows, prepReady: rows.filter((r) => r.ok).length, prev, planned: (extra && extra.topics) || [] };
95
+ }
96
+
65
97
  /** The body of POST /api/calendar-links for a choice made in the dialog: 'portfolio', 'none', 'board|<ws>|<id>' or 'initiative|<id>'. */
66
98
  export function linkBody(row, choice, boards) {
67
99
  const event = { title: row.title, ...(row.series ? { series: row.series } : {}) };
@@ -359,33 +391,45 @@ export function mountMeeting(d) {
359
391
  else if (st.mode === 'stale') h = `<div class="m3-row"><b>Marked recording</b>${b('resume', 'Resume')}${b('stop', 'Stop')}</div><p class="note">The server holds this meeting as recording, but this page is not capturing audio. Resume starts listening again.</p>`;
360
392
  else if (st.mode === 'paused') h = `<div class="m3-row"><b>Paused</b>${n && n.resume_until ? `<span class="note">Open until ${esc(hhmm(n.resume_until))}</span>` : ''}${b('resume', 'Resume')}${b('stop', 'Stop')}</div><p class="note">${esc(RESUME_LINE)}</p>`;
361
393
  else if (st.mode === 'ended') h = '<p class="note">The recording of this meeting has ended. A stopped meeting cannot be recorded again.</p>';
362
- else if (recordable(row)) h = `<div class="m3-row">${b('rec', 'Record', 'cta')}</div><p class="note">${esc(RECORD_LINE)}</p>`;
394
+ else if (recordable(row)) h = `<button class="addb pri" data-m3="rec" title="${esc(RECORD_LINE)}">${ic('mic')}Record</button><button class="whyb" data-m3="why" aria-expanded="false">What Record does</button><p class="note why" hidden>${esc(RECORD_LINE)}</p>`;
363
395
  return h + msg;
364
396
  }
365
- const actsHtml = (row, ui) => `<div class="m3-acts"><div id="m3Rec">${recBarHtml(row, ui)}</div><div class="m3-row"><button class="mtg-b" data-m3="focus">Focus</button></div><p class="note">${esc(FOCUS_LINE)}</p></div>`;
397
+ const actsHtml = (row, ui) => `<div class="acts2"><button class="addb" data-m3="focus" title="${esc(FOCUS_LINE)}">${ic('scale')}Focus</button><div id="m3Rec" class="m3r">${recBarHtml(row, ui)}</div><button class="whyb" data-m3="why" aria-expanded="false">What Focus reads</button><p class="note why" hidden>${esc(FOCUS_LINE)}</p></div>`;
366
398
 
367
399
  /* the dialog */
368
400
  const sec = (label, body) => `<div class="mtg-sec"><span class="label">${esc(label)}</span>${body}</div>`;
401
+ 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"/>' };
402
+ const ic = (n) => `<svg class="i" viewBox="0 0 24 24">${IC[n]}</svg>`;
403
+ const secH = (t, tag, extra) => `<h4 class="sh">${esc(t)}${tag ? ` <small>${esc(tag)}</small>` : ''}${extra || ''}</h4>`;
369
404
  const items = (L, task) => `<ul class="mtg-l">${L.map((x, i) => `<li>${esc(x.text)}${x.owner || x.due ? `<em>${esc([x.owner, x.due].filter(Boolean).join(' · '))}</em>` : ''}${task ? `<button class="mtg-b mtg-task" data-task="${i}"${task.done.has(i) ? ' disabled' : ''}>${task.done.has(i) ? 'Task made' : 'Make task'}</button>` : ''}</li>`).join('')}</ul>`;
370
405
  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>`;
371
406
 
372
407
  function detailHtml(v, boards, inis, saved, ui) {
373
- const r = v.row, lv = r.level;
408
+ const r = v.row, lv = r.level, note = noteOfRow(NR, r);
374
409
  const aboutNow = lv ? aboutOf(lv) : saved || '';
375
410
  const opts = [['', aboutNow ? 'Change what it is about' : 'Choose what it is about'], ['portfolio', 'Portfolio']].concat(boards.map((b) => ['board|' + b.ws + '|' + b.id, 'Board: ' + b.name]), inis.map((i) => ['initiative|' + i.id, 'Initiative: ' + i.name]), [['none', 'Remove the link']]);
376
- const about = `<p>${aboutNow ? 'It is about <b>' + esc(aboutNow) + '</b>.' + (lv && lv.why ? ' ' + esc(lv.why) + '.' : '') : (r.past ? 'The calendar answer holds no link for an earlier meeting.' : 'Not linked to anything yet.')}</p>
377
- <div class="mtg-link"><select id="mtgSel" aria-label="What this meeting is about">${opts.map(([val, t]) => `<option value="${esc(val)}">${esc(t)}</option>`).join('')}</select><button class="cta" id="mtgLink" disabled>Link it</button></div>
411
+ const link = `<div class="mtg-link"><select id="mtgSel" aria-label="What this meeting is about">${opts.map(([val, t]) => `<option value="${esc(val)}">${esc(t)}</option>`).join('')}</select><button class="addb pri" id="mtgLink" disabled>Link it</button></div>
378
412
  <p class="note" id="mtgMsg" role="status">The link applies to every occurrence of “${esc(r.title)}”. The calendar itself is never written.</p>`;
379
413
  const n = v.notes;
380
414
  const task = n && n.actions.length ? { done: ui.tasked } : null;
381
- const notes = v.notesLine ? `<p class="note">${esc(v.notesLine)}</p>` : [n.title ? `<p><b>${esc(n.title)}</b></p>` : '',
415
+ const notes = v.notesLine ? `<p class="mut">${esc(v.notesLine)}</p>` : [n.title ? `<p><b>${esc(n.title)}</b></p>` : '',
382
416
  n.decisions.length ? `<h4 class="mtg-h">Decisions ${n.decisions.length}</h4>${items(n.decisions)}` : '', n.actions.length ? `<h4 class="mtg-h">Next steps ${n.actions.length}</h4>${items(n.actions, task)}` : '',
383
- n.questions.length ? `<h4 class="mtg-h">Open questions ${n.questions.length}</h4>${items(n.questions)}` : '', (n.decisions.length + n.actions.length + n.questions.length) ? '' : '<p class="note">The note holds no decisions, next steps or questions yet.</p>'].join('');
384
- const mat = (v.materialLine ? `<p class="note">${esc(v.materialLine)}</p>` : `<ul class="mtg-l">${v.material.map((m) => `<li>${esc(m.title)}<em>${esc([m.kind, 'for ' + m.scope, m.topic ? 'on ' + m.topic : ''].filter(Boolean).join(' · '))}</em>${m.removable ? `<button class="mtg-b mtg-rm" data-rm="${m.n}" aria-label="Remove ${esc(m.title)}" title="${esc(m.line)}">Remove</button>` : ''}</li>`).join('')}</ul>`)
385
- + `<div class="mtg-foot"><button class="mtg-b" id="mmAdd">Add material</button><span class="note">Your calendar invite is not changed.</span></div>`;
386
- const rep = v.replay ? `<p>A recording is kept: ${v.replay.minutes ? v.replay.minutes + ' min, ' : ''}${v.replay.keyPoints} key ${v.replay.keyPoints === 1 ? 'point' : 'points'}.</p><div class="mtg-foot"><button class="cta" data-m3="replay">Replay</button><span class="note">Plays the note’s audio kept on this machine, with the transcript and the key points.</span></div>` : '';
417
+ n.questions.length ? `<h4 class="mtg-h">Open questions ${n.questions.length}</h4>${items(n.questions)}` : '', (n.decisions.length + n.actions.length + n.questions.length) ? '' : '<p class="mut">The note holds no decisions, next steps or questions yet.</p>'].join('');
418
+ const person = (nm) => `<span class="pp"><i class="av2">${esc(String(nm).trim().charAt(0).toUpperCase())}</i>${esc(clip(nm, 40))}</span>`;
419
+ const prow = (x) => `<div class="prow"><span class="pi${x.ok ? '' : ' w'}">${ic(x.ic)}</span><div><b>${esc(x.l)}</b><div class="pv">${x.about && aboutNow ? '<span>It is about <b>' + esc(aboutNow) + '</b>.' + (lv && lv.why ? ' ' + esc(lv.why) + '.' : '') + '</span>' : x.people ? x.people.map(person).join('') : x.chips && x.chips.length ? x.chips.map((c) => `<span class="chp sm">${ic('doc')}${esc(c)}</span>`).join('') : '<span>' + esc(x.text) + '</span>'}</div>${x.about ? link : ''}</div>${x.ok ? '<span class="chp ok sm"><i></i>Ready</span>' : '<span class="chp warn sm"><i></i>Not yet</span>'}</div>`;
420
+ const ready = v.prepReady;
421
+ const prep = secH('Prepared for you', ready === v.prep.length ? 'all ready' : ready + ' of ' + v.prep.length + ' ready') + `<div class="prows">${v.prep.map(prow).join('')}</div>`;
422
+ const mats = v.materialLine ? `<p class="mut">${esc(v.materialLine)}</p>` : `<div class="mats">${v.material.map((m) => `<div class="mat"><span class="kd">${esc(m.kind || 'link')}</span><div><b>${esc(m.title)}</b><small>${esc([m.topic, 'for ' + m.scope].filter(Boolean).join(' · '))}</small></div><span class="mb">${m.removable ? `<button class="ib2 mtg-rm" data-rm="${m.n}" aria-label="Remove ${esc(m.title)}" title="${esc(m.line)}">${ic('x')}</button>` : ''}</span></div>`).join('')}</div>`;
423
+ const mat = secH('Material', v.material && v.material.length ? v.material.length + ' linked' : '', `<button class="addb" id="mmAdd" title="Your calendar invite is not changed.">${ic('plus')}Add material</button>`) + mats;
424
+ const prev = secH('Previous meetings', v.prev.length ? v.prev.length + ' before this' : '') + (v.prev.length ? `<div class="prevs">${v.prev.map((p) => `<div class="pvx"><div class="pvh"><time>${esc(p.date)}</time><span>${p.decided} decided</span><span>${p.steps} new next ${p.steps === 1 ? 'step' : 'steps'}</span></div></div>`).join('')}</div>` : '<p class="mut">No earlier notes of this meeting are kept.</p>');
425
+ const tops = secH('Topics', v.planned.length ? 'planned' : '') + (v.planned.length ? `<div class="tops">${v.planned.map((t, i) => `<div class="tp plan"><i>${i + 1}</i><span>${esc(clip(t.text, 120))}</span><small>planned</small></div>`).join('')}</div>` : '<p class="mut">The meeting has no topics yet.</p>');
426
+ const rep = v.replay ? secH('Replay', 'kept on this machine') + `<p>A recording is kept: ${v.replay.minutes ? v.replay.minutes + ' min, ' : ''}${v.replay.keyPoints} key ${v.replay.keyPoints === 1 ? 'point' : 'points'}.</p><div class="mtg-foot"><button class="addb pri" data-m3="replay">Replay</button><span class="note">Plays the note’s audio kept on this machine, with the transcript and the key points.</span></div>` : '';
427
+ const out = secH('Notes', v.notesLine ? '' : 'from the meeting note') + notes;
428
+ const chips = statusChips(r, note).map((c) => `<span class="chp${c.kind ? ' ' + c.kind : ''}"><i></i>${esc(c.text)}</span>`).join('');
429
+ const done = !!(note && note.state === 'ended') || (r.past && !!v.replay);
387
430
  const status = ui.status ? `<p class="note mtg-status" id="mtgStatus" role="status">${esc(ui.status.text)}${ui.status.undo ? ' <button class="mtg-b" id="mtgUndo">Undo</button>' : ''}</p>` : '<p class="note mtg-status" id="mtgStatus" role="status" hidden></p>';
388
- return `<article class="paper doc mtg">${status}${d.kv([['When', r.day + ' · ' + r.time + (r.len ? ' · ' + r.len : '')], ['People', v.people.join(', ') || 'The calendar lists no other people.']])}${actsHtml(r, ui)}${sec('What it is about', about)}${sec('Notes', notes)}${sec('Material', mat)}${rep ? sec('Replay', rep) : ''}</article>`;
431
+ const hdr = `<div class="mh2"><div><h3 class="d1">${esc(r.title)}</h3><p class="mt">${esc(r.time)}${r.end && hasTime(r.end) ? ' to ' + esc(hhmm(r.end)) : ''}${r.len ? ' · ' + esc(r.len) : ''} · ${esc(r.day)}</p>${v.people.length ? `<p class="mt">With ${esc(v.people.join(', '))}</p>` : ''}</div><div class="chs">${chips}</div></div>`;
432
+ return `<article class="paper doc mtg">${status}${hdr}${actsHtml(r, ui)}${(done ? [out, rep, mat, prev, tops] : [prep, mat, prev, tops, out, rep]).join('')}</article>`;
389
433
  }
390
434
  function sheetHtml(row) {
391
435
  return `<article class="paper doc mtg mtg-sheet"><button class="mtg-b" id="mmBack">Back to the meeting</button>
@@ -395,10 +439,10 @@ export function mountMeeting(d) {
395
439
  }
396
440
 
397
441
  async function openRow(row, via) {
398
- let replay = null, material = null, boards = W ? W.boards : [], inis = W ? W.initiatives : [], saved = '';
442
+ let replay = null, material = null, extra = { prev: [], topics: [] }, boards = W ? W.boards : [], inis = W ? W.initiatives : [], saved = '';
399
443
  const ui = { view: 'detail', status: null, tasked: new Set() }, SH = { sug: null, found: [], pick: null, scope: 'meeting', q: '', link: '', token: 0, topics: [], topic: null };
400
444
  let stT = null, findT = null, undoFn = null;
401
- const view = () => meetingView(row, replay, material);
445
+ const view = () => meetingView(row, replay, material, extra);
402
446
  const say = (text, undo) => { clearTimeout(stT); undoFn = undo || null; ui.status = { text, undo: undo || null }; if (ui.view === 'detail') { paint(); stT = setTimeout(() => { ui.status = null; if (ui.view === 'detail') paint(); }, 9000); } else d.toast(text); };
403
447
  const paint = () => {
404
448
  const pane = $('#dOut'), top = pane ? pane.scrollTop : 0, same = ui.last === ui.view; ui.last = ui.view;
@@ -518,6 +562,7 @@ export function mountMeeting(d) {
518
562
  if (res.ok && ui.view === 'detail') d.toast('Recording started.');
519
563
  };
520
564
  switch (act) {
565
+ case 'why': { const n = t.nextElementSibling, on = n && n.hidden; if (n) { n.hidden = !on; t.setAttribute('aria-expanded', String(on)); } return; }
521
566
  case 'rec': if (!consented.has(k)) { ui.ask = 'consent'; paintRec(); const g = $('#m3Rec [data-m3="go"]'); if (g) g.focus(); return; } return started('rec');
522
567
  case 'go': consented.add(k); return started('rec');
523
568
  case 'no': ui.ask = null; paintRec(); { const b = $('#m3Rec [data-m3="rec"]'); if (b) b.focus(); } return;
@@ -562,7 +607,7 @@ export function mountMeeting(d) {
562
607
  material = mt && mt.ok === true ? { state: 'ok', items: mt.items || [] } : { state: 'error', error: (mt && mt.error) || 'no answer' };
563
608
  }
564
609
  const matPath = () => '/api/meeting-material?event=' + encodeURIComponent(row.id) + '&title=' + encodeURIComponent(row.title) + (row.series ? '&series=' + encodeURIComponent(row.series) : '') + '&date=' + row.day;
565
- d.openDlg({ eye: 'Calendar · real data', title: row.title, sub: [row.day, row.time, row.len].filter(Boolean).join(' · '), noteKey: via === 'today' ? 'ev:meeting:' + Date.parse(row.at) : null,
610
+ d.openDlg({ eye: 'Calendar · real data', title: row.title, sub: [row.day, row.time, row.len, row.who && row.who.length ? row.who.join(', ') : ''].filter(Boolean).join(' · '), noteKey: via === 'today' ? 'ev:meeting:' + Date.parse(row.at) : null,
566
611
  stream: d.turnA(d.ptx('This meeting is in the calendar PMOS holds. Its notes, material and recording appear here only if PMOS holds them.')), pane: detailHtml(meetingView(row, null, null), boards, inis, '', ui), label: 'Meeting' });
567
612
  if (via !== 'today') $('#askF').hidden = true;
568
613
  const [rp, mt] = await Promise.all([d.pmGet('/api/meeting-replay?event=' + encodeURIComponent(row.id) + '&date=' + row.day), d.pmGet(matPath())]);
@@ -572,6 +617,12 @@ export function mountMeeting(d) {
572
617
  await readNotes();
573
618
  if ($('#dTitle').textContent !== row.title) return;
574
619
  paint(); if (HOLD) tickClock(); mark();
620
+ {
621
+ const sk = (noteOfRow(NR, row) || {}).series, [sr, tp] = await Promise.all([sk && sk.key ? d.pmGet('/api/notes/series?key=' + encodeURIComponent(sk.key)) : null, d.pmGet(matPath() + '&topics=1')]);
622
+ if ($('#dTitle').textContent !== row.title) return;
623
+ extra = { prev: prevOf(sr, row), topics: tp && tp.ok && Array.isArray(tp.topics) ? tp.topics.filter((t) => t && t.text).slice(0, 8) : [] };
624
+ if (ui.view === 'detail') paint();
625
+ }
575
626
 
576
627
  const write = async (body) => { const res = await d.pmPost('/api/meeting-material', body); return res && res.ok === true ? res : { ok: false, error: (res && res.error) || 'The material was not saved.' }; };
577
628
  async function removeItem(item) {
@@ -1783,3 +1783,55 @@ button.wl-row[aria-pressed="true"] .wl-tog{background:var(--solid);color:var(--o
1783
1783
  .phstats b{font-size:var(--t-lead,20px);font-weight:700;color:var(--ink)}
1784
1784
  .phstats span{font-size:var(--t-small);color:var(--ink-3)}
1785
1785
  }
1786
+
1787
+ /* the meeting dialog, as the mockup draws it (briefing-artifact.html, meetCanvas): header chips, Focus and Record, Prepared for you, Material, Previous meetings, Topics */
1788
+ .mtg .mh2{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;flex-wrap:wrap}
1789
+ .mtg .mh2 .d1{font-size:28px;line-height:1.2;margin:0 0 2px;font-weight:700;letter-spacing:-.02em}
1790
+ @media (max-width:700px){.dlg .mtg .mh2 .d1{display:none}}
1791
+ .mtg p.mt{margin:2px 0 0;font-size:12.5px;color:var(--ink-3);line-height:1.4}
1792
+ .mtg .chs{display:flex;gap:6px;flex-wrap:wrap}
1793
+ .mtg .chp.sm{padding:3px 9px;font-size:12px;gap:6px}
1794
+ .mtg .chp svg{width:13px;height:13px}
1795
+ .mtg .mut{color:var(--ink-3);font-size:15px;margin:0}
1796
+ .mtg h4.sh{display:flex;align-items:center;gap:10px;font-size:15px;font-weight:650;letter-spacing:-.01em;margin:28px 0 10px;color:var(--ink)}
1797
+ .mtg h4.sh small{font-weight:500;color:var(--ink-3);font-size:12.5px}
1798
+ .mtg h4.sh .addb{margin-left:auto}
1799
+ .mtg .acts2{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0 4px;align-items:center}
1800
+ .mtg .acts2 .m3r{display:contents}
1801
+ .mtg .acts2 .m3r>div,.mtg .acts2 .m3r>p,.mtg .acts2>p{flex:1 1 100%;margin:0}
1802
+ .mtg .whyb{min-height:44px;padding:0 6px;font-size:12.5px;font-weight:500;color:var(--ink-3);text-decoration:underline;text-underline-offset:3px;border-radius:999px}
1803
+ .mtg .whyb:hover{color:var(--ink)}
1804
+ .mtg .addb{display:inline-flex;align-items:center;gap:7px;min-height:44px;padding:0 16px;border-radius:999px;background:var(--well);font-size:12.5px;font-weight:600;color:var(--ink)}
1805
+ .mtg .addb:hover{background:var(--b3)}
1806
+ .mtg .addb svg{width:14px;height:14px}
1807
+ .mtg .addb.pri{background:var(--solid);color:var(--on-solid)}
1808
+ .mtg .addb:disabled{opacity:.5}
1809
+ .mtg .ib2{width:44px;height:44px;border-radius:50%;background:var(--well);display:inline-grid;place-items:center;color:var(--ink-2);flex:none}
1810
+ .mtg .ib2:hover{background:var(--b3)}
1811
+ .mtg .ib2 svg{width:15px;height:15px}
1812
+ .mtg .prow{display:grid;grid-template-columns:34px minmax(0,1fr) auto;gap:12px;align-items:start;padding:12px 0;border-top:1px solid var(--hair)}
1813
+ @media (max-width:560px){.mtg .prow{grid-template-columns:34px minmax(0,1fr)}.mtg .prow>.chp{grid-column:2}}
1814
+ .mtg .prow:first-child{border-top:0}
1815
+ .mtg .pi{width:32px;height:32px;border-radius:50%;background:var(--well);display:grid;place-items:center;color:var(--ink-2)}
1816
+ .mtg .pi svg{width:16px;height:16px}
1817
+ .mtg .pi.w{background:color-mix(in oklab,var(--ember) 18%,var(--well));color:var(--ember-ink)}
1818
+ .mtg .prow b{font-size:15px;font-weight:600}
1819
+ .mtg .pv{display:flex;gap:6px;flex-wrap:wrap;margin-top:3px;font-size:15px;color:var(--ink-2);line-height:1.45}
1820
+ .mtg .pv b{font-weight:600;color:var(--ink)}
1821
+ .mtg .pp{display:inline-flex;align-items:center;gap:6px;margin-right:8px}
1822
+ .mtg .av2{width:22px;height:22px;border-radius:50%;background:var(--well);display:grid;place-items:center;font:600 11px var(--mono);font-style:normal;color:var(--ink-2);box-shadow:inset 0 0 0 1px var(--hair)}
1823
+ .mtg .mat{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:12px;align-items:center;padding:10px 0;border-top:1px solid var(--hair)}
1824
+ .mtg .mat:first-child{border-top:0}
1825
+ .mtg .mat b{font-size:15px;display:block}
1826
+ .mtg .mat small{color:var(--ink-3);font-size:12.5px}
1827
+ .mtg .kd{font:600 12.5px var(--mono);letter-spacing:.06em;text-transform:uppercase;padding:4px 8px;border-radius:8px;background:var(--well);color:var(--ink-3);white-space:nowrap}
1828
+ .mtg .mb{display:inline-flex;gap:6px}
1829
+ .mtg .pvx{border-top:1px solid var(--hair)}
1830
+ .mtg .pvx:first-child{border-top:0}
1831
+ .mtg .pvh{display:grid;grid-template-columns:62px 1fr 1fr;gap:10px;align-items:center;padding:11px 0;font-size:15px;color:var(--ink-2)}
1832
+ .mtg .pvh time{font:500 12.5px var(--mono);color:var(--ink-3)}
1833
+ .mtg .tp{display:grid;grid-template-columns:26px minmax(0,1fr) auto;gap:10px;align-items:center;padding:8px 0;border-top:1px solid var(--hair);font-size:15px}
1834
+ .mtg .tp:first-child{border-top:0}
1835
+ .mtg .tp i{width:24px;height:24px;border-radius:50%;display:grid;place-items:center;font:600 12.5px var(--mono);font-style:normal;box-shadow:inset 0 0 0 1.8px var(--ink-3);color:var(--ink-3)}
1836
+ .mtg .tp small{color:var(--ink-3);font-size:12.5px}
1837
+ .mtg .mtg-link{margin:8px 0 6px}