create-pmos 0.362.0 → 0.364.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 (48) hide show
  1. package/package.json +35 -25
  2. package/payload/KIT-VERSION +1 -1
  3. package/payload/planning/evals/eval-calibration.md +1 -1
  4. package/payload/planning/okrs/health-budgets.md +1 -1
  5. package/payload/state/discoveries.md +1 -1
  6. package/workspace/briefing-premium-board-test.js +6 -6
  7. package/workspace/briefing-premium-calendar-2-test.js +3 -3
  8. package/workspace/briefing-premium-calendar-3-test.js +6 -5
  9. package/workspace/briefing-premium-calendar-test.js +3 -2
  10. package/workspace/briefing-premium-initiative-test.js +6 -5
  11. package/workspace/briefing-premium-insights-test.js +1 -1
  12. package/workspace/briefing-premium-test.js +65 -58
  13. package/workspace/briefing-premium-work-test.js +1 -1
  14. package/workspace/changelog.json +34 -0
  15. package/workspace/guide/briefing-premium.md +23 -19
  16. package/workspace/guide/data-freshness.md +15 -1
  17. package/workspace/lib/briefing-premium-agent.js +3 -1
  18. package/workspace/lib/freshness.js +17 -1
  19. package/workspace/lib/pmos-verbs.js +3 -0
  20. package/workspace/lib/source-cli.js +85 -0
  21. package/workspace/lib/source-reads.js +200 -0
  22. package/workspace/package-lock.json +2 -2
  23. package/workspace/package.json +1 -1
  24. package/workspace/premium-studio-test.js +8 -8
  25. package/workspace/premium-vw-item-test.js +3 -3
  26. package/workspace/premium-vw-meet-test.js +32 -21
  27. package/workspace/premium-vw-notes-test.js +5 -5
  28. package/workspace/premium-vw-rec-test.js +1 -1
  29. package/workspace/public/pm/premium-board.js +4 -3
  30. package/workspace/public/pm/premium-chat.js +9 -0
  31. package/workspace/public/pm/premium-initiative.js +4 -3
  32. package/workspace/public/pm/premium-insights.js +2 -2
  33. package/workspace/public/pm/premium-meeting.js +28 -29
  34. package/workspace/public/pm/premium-shell.js +55 -28
  35. package/workspace/public/pm/premium-vw-meet.css +27 -7
  36. package/workspace/public/pm/premium-vw-meet.js +31 -16
  37. package/workspace/public/pm/premium-work.js +2 -2
  38. package/workspace/public/pm/premium.css +34 -4
  39. package/workspace/public/pm/premium.js +2 -2
  40. package/workspace/public/premium-board.html +1 -0
  41. package/workspace/public/premium-chat.html +39 -0
  42. package/workspace/public/premium-initiative.html +1 -0
  43. package/workspace/public/premium-insights.html +1 -0
  44. package/workspace/public/premium-work.html +2 -1
  45. package/workspace/public/premium.html +2 -1
  46. package/workspace/server.js +4 -2
  47. package/workspace/skills/sources-read.skill +54 -0
  48. package/workspace/test-lists/briefing-source-flow.json +5 -0
@@ -28,21 +28,18 @@ export function flip() {
28
28
  theme(next); store.set(THEME_KEY, next); tbTheme();
29
29
  }
30
30
  { const t = new URLSearchParams(location.search).get('theme') || store.get(THEME_KEY); theme(t); }
31
- /* ── the top bar (initiative premium-topbar): where you are and Chat on the left; the Sources chip, the bell and one menu on the right.
32
- * The menu holds what left the bar: Search, Sessions, Console, Theme, Settings, and on Board how an initiative opens. Every item keeps
31
+ /* ── the top bar (initiative premium-topbar): where you are on the left; the Sources chip, the bell and one menu on the right. Chat is
32
+ * the rail's middle place (premium-chat-rail). The menu holds what left the bar: Search, Console, Theme, Settings, and on Board how an initiative opens. Every item keeps
33
33
  * the id the pages and the code below wire, so a press does what it did as a round button. ── */
34
- export const CHAT = '<svg class="i" viewBox="0 0 24 24"><path d="M4 5h16v11h-9l-5 4v-4H4z"/><path d="M12 7.6l.8 1.9 1.9.8-1.9.8-.8 1.9-.8-1.9-1.9-.8 1.9-.8z"/></svg>';
35
34
  const MORE = '<svg class="i" viewBox="0 0 24 24"><circle cx="6" cy="12" r="1.3"/><circle cx="12" cy="12" r="1.3"/><circle cx="18" cy="12" r="1.3"/></svg>';
36
35
  const TH = [['light', 'Light'], ['dark', 'Dark'], ['auto', 'Auto']];
37
36
  function tbMount() {
38
37
  const t = $('.tools-top'); if (!t || $('#tbMore')) return;
39
- const pc = $('#pgChat'); if (pc) pc.innerHTML = CHAT;
40
38
  t.insertAdjacentHTML('beforeend', `<button type="button" class="schip" id="srcChip" aria-haspopup="dialog" title="When each source was last read"><i class="sdot" id="srcDot" aria-hidden="true"></i>Sources</button>`
41
39
  + `<span class="mwrap" id="tbMore"><button type="button" class="glass round" id="moreBtn" aria-haspopup="menu" aria-expanded="false" aria-controls="moreMenu" aria-label="More" title="More">${MORE}<i class="mdot" id="moreDot" hidden></i></button>`
42
40
  + '<div class="crmenu tbmenu" id="moreMenu" role="menu" aria-label="More" hidden>'
43
41
  + '<button role="menuitem" id="pvSearch" aria-haspopup="dialog">Search<em>Ctrl K</em></button>'
44
42
  + '<button role="menuitem" id="srcItem" class="tbm-src" aria-haspopup="dialog">Sources</button>'
45
- + '<button role="menuitem" id="sessBtn" aria-haspopup="dialog" aria-label="Sessions">Sessions<em id="sessBdg" hidden></em></button>'
46
43
  + '<a role="menuitem" id="toConsole" href="/console.html" aria-label="Open the console">Console</a>'
47
44
  + '<div class="tbrow" id="modeRow" hidden><span>Open initiatives</span></div>'
48
45
  + `<div class="tbrow" role="group" aria-label="Theme"><span>Theme</span><span class="tbseg" id="tbTheme">${TH.map(([k, w]) => `<button role="menuitemradio" data-th="${k}" aria-checked="false">${w}</button>`).join('')}</span></div>`
@@ -74,7 +71,6 @@ function tbMount() {
74
71
  e.preventDefault(); L[(i + (e.key === 'ArrowDown' ? 1 : L.length - 1) + (i < 0 ? 1 : 0)) % L.length].focus();
75
72
  });
76
73
  $('#srcChip').onclick = () => openSources(); $('#srcItem').onclick = () => openSources();
77
- if (pc) pc.onclick = () => { if (PAGE_CHAT) PAGE_CHAT(); };
78
74
  tbReadSrc();
79
75
  setInterval(() => { if (!document.hidden) tbReadSrc(); }, 300000);
80
76
  }
@@ -82,9 +78,11 @@ function tbTheme() {
82
78
  const cur = document.documentElement.dataset.theme || 'auto';
83
79
  $$('#tbTheme [data-th]').forEach((b) => b.setAttribute('aria-checked', String(b.dataset.th === cur)));
84
80
  }
85
- let PAGE_CHAT = null;
86
- /** The page's Chat press: fn opens the page's conversation (the Briefing and My work), the board's or the initiative's, or the Studio. */
87
- export function onPageChat(fn) { PAGE_CHAT = fn; }
81
+ let ABOUT = null;
82
+ /** The page the rail's Chat brings along (premium-chat-page): the conversation key of this page and its name. The Chat page opens that conversation. */
83
+ export function chatAbout(key, label) { ABOUT = key ? { key, label: label || '' } : null; }
84
+ /** On the Chat page the dialog is the page: it never closes, Escape does nothing, and the rail stays live. */
85
+ const chatPage = () => document.body.classList.contains('chatpg');
88
86
 
89
87
  /* ── Sources: when each source was last read, and a Refresh for each (GET /api/sources, POST /api/sources/refresh, as Data freshness) ──
90
88
  * The chip says no time: each source is read on its own schedule, so only the dialog's rows carry times. Its dot is orange when a source is
@@ -160,12 +158,18 @@ export async function openSources() {
160
158
  await tbReadSrc(); draw(); poll(8);
161
159
  }
162
160
 
163
- /* ── Chat on the Briefing and My work: the standard dialog, read-only, about the page as a whole (key src:this-page or work:this-page) ── */
164
- export function openPageChat(key, page) {
165
- const lead = (($('#brief') && $('#brief').textContent) || '').replace(/\s+/g, ' ').trim();
166
- const say = 'Talk to Claude about this page. It works in a real Claude Code session: it can read, change files, run commands and take slash commands.';
167
- openDlg({ eye: page, title: 'Ask about ' + page, say, stream: turnA(ptx(say)), noteKey: key, pane: `<article class="paper doc"><h3 class="d2">What the page says</h3><p>${esc(lead || 'The page has not read its records yet.')}</p></article>`, label: page });
168
- $('#askIn').placeholder = 'Message Claude about this page';
161
+ /* ── the Chat page (initiative premium-chat-page): the standard dialog held open as the page, beside the rail ───────────────────────────
162
+ * key: the conversation (the page the PM came from, or their own chat:main). The session list shows beside it on a desktop; on a phone its chip
163
+ * opens the list. Nothing here writes: a message goes through the same ask route as every other conversation. */
164
+ export function openChatPage(key, label) {
165
+ const say = label
166
+ ? 'Talk to Claude about ' + label + '. It works in a real Claude Code session: it can read, change files, run commands and take slash commands.'
167
+ : 'Talk to Claude. It works in a real Claude Code session: it can read, change files, run commands and take slash commands. Pick another session from the list.';
168
+ openDlg({ eye: label ? 'Chat · ' + label : 'Chat', title: label ? 'Ask about ' + label : 'Chat', say, stream: turnA(ptx(say)), noteKey: key, pane: `<article class="paper doc"><p class="note">${esc(label ? 'This conversation is about ' + label + '. Files Claude opens show here.' : 'Files Claude opens show here.')}</p></article>`, label: label || 'Chat', sessions: true });
169
+ $$('.rail').forEach((x) => { x.inert = false; }); document.documentElement.style.overflow = '';
170
+ $('#veil').classList.remove('on');
171
+ $('#askIn').placeholder = label ? 'Message Claude about ' + label : 'Message Claude, or type /';
172
+ if (desk()) setFull(true); else setTab('chat');
169
173
  loadThread(key);
170
174
  }
171
175
  tbMount(); // the top bar first: the menu holds the Settings, Sessions, Console and Search items the code below wires
@@ -206,13 +210,22 @@ export function openDlg(o) {
206
210
  $('#oMain').innerHTML = o.pane || `<article class="paper doc">${o.html}</article>`; $('#oLab').textContent = o.label || 'Detail'; vwReset(); // extra viewer tabs belong to the dialog that opened them
207
211
  $('#dBody').innerHTML = `<div class="stream" role="log">${o.stream || turnA(ptx(o.say))}</div><form class="askbar" id="askF"><div class="slashm" id="slashM" role="listbox" aria-label="Commands" hidden></div>${padMarkup()}<textarea id="askIn" rows="1" placeholder="Message Claude, or type /" maxlength="8000" autocomplete="off" enterkeyhint="send" aria-label="A message for Claude" aria-controls="slashM"></textarea><button type="submit" data-act="ask" id="askGo" aria-label="Send to Claude" title="Send to Claude"><svg class="i" viewBox="0 0 24 24"><path d="M5 12h14M13 6l6 6-6 6"/></svg></button></form><div class="askfoot"><p class="fine2" id="askNote">${CHAT_NOTE}</p>${padChipMarkup()}</div>`;
208
212
  mountPad({ key: S.key, ws: new URLSearchParams(location.search).get('ws'), input: $('#askIn') });
213
+ $('#dlg').classList.toggle('cmp', !!o.compact); $('#dlg').classList.remove('shrunk'); // compact: a short head on a phone that shrinks as the detail scrolls
209
214
  $('#dlg').classList.remove('full'); setMode('split'); setTab('out'); // on a phone the dialog opens on the Detail tab and the Detail / Conversation switch brings the conversation, as the mockup draws it
210
215
  $('#veil').classList.add('on'); $('#dlg').classList.add('on');
211
216
  $$('#dGrid .pane').forEach((p) => { p.scrollTop = 0; });
212
217
  railOnOpen(o);
213
218
  setTimeout(() => $('#dlg').focus(), 60);
214
219
  }
220
+ /* A compact dialog on a phone: once the detail scrolls, the head keeps only the title and the tools, so the detail gets the screen.
221
+ * It shrinks only when the detail is much taller than its pane, so the smaller head cannot end the scroll and grow back. */
222
+ $('#dOut').addEventListener('scroll', () => {
223
+ const g = $('#dlg'), p = $('#dOut'); if (!g.classList.contains('cmp') || innerWidth >= 1000) return;
224
+ if (p.scrollTop > 48 && p.scrollHeight - p.clientHeight > 200) g.classList.add('shrunk');
225
+ else if (p.scrollTop < 8) g.classList.remove('shrunk');
226
+ }, { passive: true });
215
227
  export function closeDlg() {
228
+ if (chatPage()) return;
216
229
  clearTimeout(threadTimer); S.key = null; flushPad(); railOnClose();
217
230
  park();
218
231
  $('#veil').classList.remove('on'); $$('.rail,main.stage,#dock').forEach((x) => { x.inert = false; });
@@ -236,7 +249,7 @@ $('#dExpand').onclick = () => setFull(!$('#dlg').classList.contains('full'));
236
249
  $('#dTabs').addEventListener('click', (e) => { const b = e.target.closest('[data-t]'); if (b) setTab(b.dataset.t); });
237
250
  addEventListener('keydown', (e) => {
238
251
  if (e.key !== 'Escape' || !$('#dlg').classList.contains('on')) return;
239
- if (document.querySelector('[data-esc-layer]')) return; // a layer open over the dialog (a viewer menu, Present) closes itself first
252
+ if (document.querySelector('[data-esc-layer]') || chatPage()) return; // a layer open over the dialog (a viewer menu, Present) closes itself first
240
253
  if ($('#dlg').classList.contains('full')) { setFull(false); e.stopImmediatePropagation(); return; }
241
254
  closeDlg();
242
255
  }, true);
@@ -453,7 +466,7 @@ if (window.visualViewport) {
453
466
  }
454
467
 
455
468
  /* ── the rail: Briefing, My work, Board and Insights are premium pages ── */
456
- const GO = { brief: '/premium.html', work: '/premium-work.html', init: '/premium-board.html', rep: '/premium-insights.html' };
469
+ const GO = { brief: '/premium.html', work: '/premium-work.html', chat: '/premium-chat.html', init: '/premium-board.html', rep: '/premium-insights.html' };
457
470
  /* ── the recording chip: while a note records or is paused, every premium page says so and can stop it (initiative briefing-premium-calendar, slice 3) ───────────────
458
471
  * It reads GET /api/notes. Only the Briefing holds a recorder; the other pages show what the server holds, and Stop there ends the meeting through POST /api/notes/stop. */
459
472
  function mountRecChip(here) {
@@ -496,11 +509,23 @@ function mountRecChip(here) {
496
509
  export function wireRail(here) {
497
510
  mountRecChip(here);
498
511
  const rail = $('.rail');
499
- rail.style.setProperty('--pi', String(['brief', 'work', 'init', 'rep'].indexOf(here)));
500
- $$('.rail [data-go]').forEach((b) => { b.onclick = () => { if (b.dataset.go !== here) location.assign(GO[b.dataset.go]); }; });
512
+ // premium-chat-rail: five places with Chat in the middle. The phone bar slides by whole places (--pi); the desktop rail's Chat is taller, so
513
+ // the indicator there is placed at the current place's own top (--py).
514
+ const cur = $(`.rail [data-go="${here}"]`), all = $$('.rail .pl');
515
+ rail.style.setProperty('--pi', String(all.indexOf(cur)));
516
+ const place = () => { if (cur) rail.style.setProperty('--py', (cur.offsetTop - all[0].offsetTop) + 'px'); };
517
+ place(); addEventListener('resize', place);
518
+ $$('.rail [data-go]').forEach((b) => { b.onclick = () => { if (b.dataset.go !== here) location.assign(b.dataset.go === 'chat' ? chatHref() : GO[b.dataset.go]); }; });
519
+ }
520
+ /** The Chat page's address: the workspace the PM is in, and the page they came from as the conversation it opens (premium-chat-page). */
521
+ function chatHref() {
522
+ const q = new URLSearchParams(), ws = new URLSearchParams(location.search).get('ws');
523
+ if (ws) q.set('ws', ws);
524
+ if (ABOUT) { q.set('about', ABOUT.key); if (ABOUT.label) q.set('label', ABOUT.label); }
525
+ const s = q.toString(); return GO.chat + (s ? '?' + s : '');
501
526
  }
502
527
 
503
- /* ── the crumb: where you are, a menu to switch board or initiative, and Chat, which opens the read-only agent ──────────────────── */
528
+ /* ── the crumb: where you are and a menu to switch board or initiative. Its Chat moved to the rail (premium-chat-rail) ──────────── */
504
529
  export function crumbHtml(o) {
505
530
  const chev = (id, label, show) => `<button id="${id}" class="cri" aria-haspopup="menu" aria-expanded="false" aria-label="${esc(label)}"${show ? '' : ' hidden'}>${CHEV}</button>`;
506
531
  const menu = '<div id="crMenu" class="crmenu" role="menu" hidden></div>';
@@ -508,9 +533,9 @@ export function crumbHtml(o) {
508
533
  const left = o.ini
509
534
  ? `<button id="crBoard" class="glass round crback" aria-label="Back to ${esc(o.board)}" title="Back to ${esc(o.board)}"><svg class="i" viewBox="0 0 24 24"><path d="m14 6-6 6 6 6"/></svg></button><nav class="crumb" aria-label="Where you are"><span id="crIni" aria-current="page">${esc(o.ini)}</span>${chev('crSw2', 'Switch initiative', o.siblings && o.siblings.length > 1)}${menu}</nav>`
510
535
  : `<nav class="crumb" aria-label="Where you are">${o.page ? `<span class="crpg">${esc(o.page)}</span>` : ''}<button id="crBoard" aria-current="page" disabled>${esc(o.board)}</button>${chev('crSw', 'Switch board', o.boards && o.boards.length > 1)}${menu}</nav>`;
511
- return `<div class="where">${left}<button id="crAsk" class="round tbchat" aria-haspopup="dialog" aria-label="${esc(o.ask)}" title="${esc(o.ask)}">${CHAT}</button></div>`;
536
+ return `<div class="where">${left}</div>`;
512
537
  }
513
- /** o: { boards: [{ws,id,name}], board: id, siblings: [{id,title}], ini: id, goBoard(ws, id), goIni(id), ask() }. Escape and a click outside close the menu; the arrows move in it. */
538
+ /** o: { boards: [{ws,id,name}], board: id, siblings: [{id,title}], ini: id, goBoard(ws, id), goIni(id) }. Escape and a click outside close the menu; the arrows move in it. */
514
539
  export function wireCrumb(o) {
515
540
  const menu = $('#crMenu'); if (!menu) return;
516
541
  const close = () => { menu.hidden = true; $$('#crSw,#crSw2').forEach((b) => b.setAttribute('aria-expanded', 'false')); };
@@ -536,7 +561,6 @@ export function wireCrumb(o) {
536
561
  if (e.key === 'Escape') { const k = menu.dataset.k === 'b' ? b1 : b2; close(); if (k) k.focus(); }
537
562
  if (e.key === 'ArrowDown' || e.key === 'ArrowUp') { e.preventDefault(); const L = $$('button', menu), i = L.indexOf(document.activeElement); L[(i + (e.key === 'ArrowDown' ? 1 : L.length - 1)) % L.length].focus(); }
538
563
  });
539
- $('#crAsk').onclick = () => o.ask && o.ask();
540
564
  }
541
565
 
542
566
  /* ── Add a document: the dialog the Board and the initiative page share (initiative briefing-premium-adddoc) ──────────────────────────────────
@@ -1067,16 +1091,19 @@ $('#oMain').addEventListener('click', async (e) => {
1067
1091
  cardDraw(r);
1068
1092
  }
1069
1093
  });
1070
- function sessBadge(n) { const b = $('#sessBdg'); if (!b) return; b.textContent = String(n || ''); b.hidden = !n; const a = $('#sessBtn'); if (a) a.setAttribute('aria-label', 'Sessions, ' + (n ? n + ' need you' : 'none need you')); }
1094
+ /* The rail's Chat carries the count the ⋯ menu's Sessions used to: a dot when a session is Ready or Maybe blocked (premium-chat-rail C5). */
1095
+ function sessBadge(n) {
1096
+ const a = $('.rail [data-go="chat"]'); if (!a) return;
1097
+ const d = $('.cdot', a); if (d) d.hidden = !n;
1098
+ a.setAttribute('aria-label', n ? 'Chat, ' + n + (n === 1 ? ' session needs you' : ' sessions need you') : 'Chat');
1099
+ }
1071
1100
  {
1072
- const b = $('#sessBtn');
1073
- if (b) {
1074
- b.onclick = () => openSessions();
1101
+ if ($('.rail [data-go="chat"]')) {
1075
1102
  const poll = async () => { if (document.hidden || railShowing()) return; const s = await pmGet('/api/sessions').catch(() => null); if (s && Array.isArray(s.sessions)) { R.rows = s.sessions; sessBadge(menuCount(R.rows)); } };
1076
1103
  poll(); setInterval(poll, BADGE_POLL);
1077
1104
  }
1078
1105
  }
1079
- /** The ⋯ menu's Sessions: the chat panel, full screen with the list (the list itself on a phone), on the session that needs you most. */
1106
+ /** The session list on its own (the rail's Chat on a page with no conversation): the chat panel, full screen with the list (the list itself on a phone), on the session that needs you most. */
1080
1107
  export async function openSessions() {
1081
1108
  openDlg({ eye: 'Sessions', title: 'Sessions', say: 'Pick a session from the list.', stream: turnA(ptx('Pick a session from the list. A dot shows its state: Ready, Running or Maybe blocked.')), noteKey: null, sessions: true, pane: '<article class="paper doc"><p class="note">Pick a session from the list.</p></article>', label: 'Session' });
1082
1109
  $('#askF').hidden = true;
@@ -18,11 +18,31 @@
18
18
  .vm .vm-ib .i{width:16px;height:16px}
19
19
  .vm .vm-lk{min-height:36px;padding:0 8px;border-radius:6px;font-size:var(--fs-2);font-weight:500;color:var(--ink-3);text-decoration:underline;text-underline-offset:3px}
20
20
  @media (hover:hover){.vm .vm-lk:hover{color:var(--ink)}}
21
- .vm .vm-ph{display:flex;gap:6px;flex-wrap:wrap;margin:18px 0 14px;padding:4px;border-radius:6px;background:var(--well);width:max-content;max-width:100%}
22
- .vm .vm-ph button{min-height:36px;padding:0 16px;border-radius:6px;font-size:var(--fs-2);font-weight:600;color:var(--ink-2)}
23
- .vm .vm-ph button[aria-pressed="true"]{background:var(--solid);color:var(--on-solid)}
24
- .vm .vm-ph button:focus-visible,.vm .vm-ib:focus-visible,.vm .vm-lk:focus-visible{outline:2px solid var(--ember);outline-offset:2px}
25
- .vm .vm-body[hidden]{display:none}
21
+ .vm .vm-sh:focus-visible,.vm .vm-menu>summary:focus-visible,.vm .vm-mn button:focus-visible,.vm .vm-ib:focus-visible,.vm .vm-lk:focus-visible{outline:2px solid var(--ember);outline-offset:2px}
22
+ /* the parts as one scroll: each part a fold with a plain head (no Before, During and After switch) */
23
+ .vm .vm-part{margin:14px 0 0;border-top:1px solid var(--hair)}
24
+ .vm .vm-part>summary.vm-sh{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:48px;cursor:pointer;font-size:var(--fs-3);font-weight:600;color:var(--ink);border-radius:6px}
25
+ .vm .vm-part>summary::-webkit-details-marker{display:none}
26
+ .vm .vm-part>summary::after{content:"";flex:none;width:8px;height:8px;margin:0 6px 4px 0;border-right:1.6px solid var(--ink-3);border-bottom:1.6px solid var(--ink-3);transform:rotate(45deg);transition:transform .2s}
27
+ .vm .vm-part[open]>summary::after{margin-bottom:-4px;transform:rotate(-135deg)}
28
+ .vm .vm-part[open]{padding-bottom:6px}
29
+ /* the head: the state chip and the people folded to a count */
30
+ .vm .vm-st2{margin-top:2px}
31
+ .vm .vm-ppb{display:inline-flex;align-items:center;gap:6px}
32
+ .vm .vm-ppb .i{width:15px;height:15px}
33
+ .vm .vm-ppl{margin:8px 0 2px}
34
+ .vm .vm-ppl[hidden]{display:none}
35
+ /* More: Focus, the link and the explanations behind one menu */
36
+ .vm .vm-menu{position:relative}
37
+ .vm .vm-menu>summary{list-style:none;cursor:pointer}
38
+ .vm .vm-menu>summary::-webkit-details-marker{display:none}
39
+ .vm .vm-mn{position:absolute;z-index:6;top:calc(100% + 6px);left:0;min-width:250px;display:flex;flex-direction:column;gap:2px;padding:6px;border-radius:8px;background:var(--card-solid,var(--card));box-shadow:inset 0 0 0 1px var(--hair),0 18px 40px -18px rgba(20,24,60,.45)}
40
+ .vm .vm-mn button{display:flex;align-items:center;gap:10px;min-height:44px;padding:0 12px;border-radius:6px;text-align:left;font-size:var(--fs-3);color:var(--ink)}
41
+ .vm .vm-mn button .i{width:16px;height:16px;color:var(--ink-3)}
42
+ @media (hover:hover){.vm .vm-mn button:hover{background:var(--well)}}
43
+ .vm .acts2>.why{flex:1 1 100%}
44
+ .vm .acts2>.why p{margin:0 0 6px}
45
+ .vm .acts2>.why[hidden]{display:none}
26
46
  .vm .vm-bx{background:var(--card-solid,var(--card));border:1px solid var(--hair);border-radius:8px;box-shadow:var(--card-shadow);padding:14px 18px;margin:0 0 12px;font-size:var(--fs-3);line-height:1.5}
27
47
  .vm .vm-cap{display:flex;align-items:center;gap:8px;font:600 var(--fs-1) var(--mono);letter-spacing:.08em;text-transform:uppercase;color:var(--ink-3);padding:0 0 10px;margin:0 0 6px;border-bottom:1px solid var(--hair)}
28
48
  .vm .vm-cap .i{width:14px;height:14px}
@@ -77,9 +97,9 @@
77
97
  .vm .vm-fold{margin-top:14px;border-top:1px solid var(--hair);padding-top:10px}
78
98
  .vm .vm-fold summary{cursor:pointer;min-height:36px;display:flex;align-items:center;font-size:var(--fs-2);font-weight:600;color:var(--ink-2)}
79
99
  @media (max-width:700px){
80
- .vm .vm-ph button,.vm .vm-ib,.vm .vm-lk,.vm .vm-pill,.vm .vm-fold summary{min-height:44px}
100
+ .vm .vm-ib,.vm .vm-lk,.vm .vm-pill,.vm .vm-fold summary{min-height:44px}
81
101
  .vm .vm-ib{width:44px;height:44px}
82
- .vm .vm-ph{width:100%}.vm .vm-ph button{flex:1}
102
+
83
103
  .vm .vm-tb thead{display:none}
84
104
  .vm .vm-tb tr{display:grid;grid-template-columns:1fr auto;gap:2px 10px;padding:8px 0;border-bottom:1px solid var(--hair)}
85
105
  .vm .vm-tb td{border:0;padding:0}
@@ -130,15 +130,35 @@ export function wireStage(k, el, S, ctx) { const w = STAGES[k] && STAGES[k].wire
130
130
  const ICP = { cal: '<rect x="4" y="5" width="16" height="15" rx="3"/><path d="M4 10h16M9 3v4M15 3v4"/>', lay: '<rect x="4" y="4" width="16" height="16" rx="3"/><path d="M4 10h16M10 10v10"/>', notes: '<path d="M7 3h7l4 4v14H7zM14 3v4h4M10 12h5M10 16h4"/>', prev: '<path d="M15 6l-6 6 6 6"/>', next: '<path d="M9 6l6 6-6 6"/>', check: '<path d="M5 12.5l4.5 4.5L19 7.5"/>', 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"/>', plus: '<path d="M12 5v14M5 12h14"/>', todo: '<circle cx="12" cy="12" r="8"/>' };
131
131
  const ic = (k) => `<svg class="i" viewBox="0 0 24 24">${ICP[k]}</svg>`;
132
132
 
133
- /** The Before, During and After switch. */
134
- export const phaseHtml = (on, esc) => `<div class="vm-ph" role="group" aria-label="Meeting stage">${PHASES.map(([k, l]) => `<button type="button" data-ph="${k}" aria-pressed="${on === k}">${esc(l)}</button>`).join('')}</div>`;
133
+ /** The parts as one scroll, with no Before, During and After switch (PM, 2026-10-20). The part that fits the meeting's state comes
134
+ * first and open; the others follow, folded. `html` is { before, during, after }; a part with no html is left out. `open` is
135
+ * { part: true | false } for the parts the PM opened or closed. */
136
+ export const PART_LABEL = { before: 'Prep and material', during: 'Transcript and live notes', after: 'Notes and next steps' };
137
+ export function partsHtml(first, html, open, esc) {
138
+ const order = [first, ...PHASES.map(([k]) => k).filter((k) => k !== first)];
139
+ return order.filter((k) => html[k]).map((k) => {
140
+ const on = open && typeof open[k] === 'boolean' ? open[k] : k === first;
141
+ return `<details class="vm-body vm-part" data-part="${k}" data-o="${on ? 1 : 0}"${on ? ' open' : ''}><summary class="vm-sh">${esc(PART_LABEL[k])}</summary>${html[k]}</details>`;
142
+ }).join('');
143
+ }
144
+ /** Before a redraw: a part the PM opened or folded (its state differs from how it was drawn) keeps that state. `root` holds the parts. */
145
+ export function partKeep(root, open) {
146
+ if (root) root.querySelectorAll('details.vm-part').forEach((x) => { if (x.open !== (x.dataset.o === '1')) open[x.dataset.part] = x.open; });
147
+ }
148
+ /** Keeps a part's fold open or closed across a redraw: call it from the pane's click with the event. True when the click was on a part's head. */
149
+ export function partToggle(e, open) {
150
+ const sm = e.target.closest('summary.vm-sh'), d = sm && sm.parentElement;
151
+ if (!d || !d.dataset.part) return false;
152
+ open[d.dataset.part] = !d.open;
153
+ return true;
154
+ }
135
155
 
136
- /** The series line: the meeting before, "Title · N of M", the meeting after, and Not part of this series. */
137
- export function seriesHtml(S, esc) {
156
+ /** The series line: the meeting before, "Title · N of M", the meeting after, and Not part of this series (left out with opts.noOut, when a menu holds it). */
157
+ export function seriesHtml(S, esc, opts = {}) {
138
158
  if (!S) return '';
139
159
  if (S.series) {
140
160
  const s = S.series, go = (x, k, label) => `<button type="button" class="vm-ib" data-vm="${k}"${x ? ` data-id="${esc(x.id)}" title="${esc(label + ', ' + x.day)}"` : ' disabled'} aria-label="${esc(label)}">${ic(k)}</button>`;
141
- return `<div class="vm-ser">${go(s.prev, 'prev', 'The meeting before')}<span>${ic('notes')}${esc(s.title)} · ${s.pos} of ${s.count}</span>${go(s.next, 'next', 'The meeting after')}<button type="button" class="vm-lk" data-vm="serout">Not part of this series</button></div>`;
161
+ return `<div class="vm-ser">${go(s.prev, 'prev', 'The meeting before')}<span>${ic('notes')}${esc(s.title)} · ${s.pos} of ${s.count}</span>${go(s.next, 'next', 'The meeting after')}${opts.noOut ? '' : '<button type="button" class="vm-lk" data-vm="serout">Not part of this series</button>'}</div>`;
142
162
  }
143
163
  if (S.seriesOff) return `<div class="vm-ser"><span>${ic('notes')}Taken out of its series</span><button type="button" class="vm-lk" data-vm="serback">Put it back</button></div>`;
144
164
  return '';
@@ -269,20 +289,20 @@ export const vmStyle = () => { if (typeof document !== 'undefined') vwStyle('mee
269
289
  * series line open it. deps: { pmGet, pmPost, esc, toast, task(sheet, step) → Promise<{ ok, text }>, changed?() after a write } */
270
290
  export async function openNoteTab(d, id) {
271
291
  vmStyle();
272
- const st = { id, note: null, sheet: null, error: '', phase: 'after', tasked: new Set(), say: '', about: false, choices: null };
292
+ const st = { id, note: null, sheet: null, error: '', phase: 'after', open: {}, tasked: new Set(), say: '', about: false, choices: null };
273
293
  const ctx = () => ({ esc: d.esc, tasked: st.tasked, replayBtn: false, where: 'tab', id: st.id, reread: () => read(st.id) });
274
294
  const html = () => {
275
295
  const S = st.sheet;
276
296
  if (!S) return `<article class="paper doc mtg vm"><p class="note" role="status">${st.error ? 'The note could not be read: ' + d.esc(st.error) : 'Reading the note.'}</p></article>`;
277
- const part = (k) => `<div class="vm-body" data-part="${k}"${st.phase === k ? '' : ' hidden'}>${stageHtml(k, S, ctx())}</div>`;
278
- return `<article class="paper doc mtg vm"><p class="note mtg-status" role="status"${st.say ? '' : ' hidden'}>${d.esc(st.say)}</p><div class="mh2"><div><h3 class="d1">${d.esc(S.title)}</h3><p class="mt">${d.esc([S.day, S.minutes ? S.minutes + ' min' : ''].filter(Boolean).join(' · '))}</p></div></div>${linksHtml(S, d.esc, { change: true, open: st.about })}${st.about ? aboutPickHtml(st.choices, aboutNow(st.note), d.esc) : ''}${seriesHtml(S, d.esc)}${phaseHtml(st.phase, d.esc)}${PHASES.map(([k]) => part(k)).join('')}</article>`;
297
+ const parts = Object.fromEntries(PHASES.map(([k]) => [k, stageHtml(k, S, ctx())]));
298
+ return `<article class="paper doc mtg vm"><p class="note mtg-status" role="status"${st.say ? '' : ' hidden'}>${d.esc(st.say)}</p><div class="mh2"><div><h3 class="d1">${d.esc(S.title)}</h3><p class="mt">${d.esc([S.day, S.minutes ? S.minutes + ' min' : ''].filter(Boolean).join(' · '))}</p></div></div>${linksHtml(S, d.esc, { change: true, open: st.about })}${st.about ? aboutPickHtml(st.choices, aboutNow(st.note), d.esc) : ''}${seriesHtml(S, d.esc)}${partsHtml(st.phase, parts, st.open, d.esc)}</article>`;
279
299
  };
280
300
  let el = null;
281
301
  const wireParts = () => { if (!el || !st.sheet) return; for (const [k] of PHASES) wireStage(k, el.querySelector(`.vm-body[data-part="${k}"]`), st.sheet, ctx()); };
282
- const paint = () => { if (el && el.isConnected) { el.innerHTML = html(); wireParts(); } };
302
+ const paint = () => { if (el && el.isConnected) { partKeep(el, st.open); el.innerHTML = html(); wireParts(); } };
283
303
  async function read(noteId) {
284
304
  const fresh = noteId !== st.id || !st.sheet;
285
- st.id = noteId; if (fresh) { st.sheet = null; st.tasked = new Set(); st.about = false; } st.error = ''; st.say = ''; paint();
305
+ st.id = noteId; if (fresh) { st.sheet = null; st.tasked = new Set(); st.about = false; st.open = {}; } st.error = ''; st.say = ''; paint();
286
306
  const one = await d.pmGet('/api/notes/one?id=' + encodeURIComponent(noteId));
287
307
  if (st.id !== noteId) return;
288
308
  const was = st.sheet;
@@ -303,13 +323,8 @@ export async function openNoteTab(d, id) {
303
323
  function wire(pane) {
304
324
  el = pane;
305
325
  pane.onclick = async (e) => {
326
+ if (partToggle(e, st.open)) return;
306
327
  const b = e.target.closest('button'); if (!b || !st.sheet) return;
307
- if (b.dataset.ph) {
308
- st.phase = b.dataset.ph;
309
- el.querySelectorAll('.vm-ph [data-ph]').forEach((x) => x.setAttribute('aria-pressed', String(x === b)));
310
- el.querySelectorAll('.vm-body[data-part]').forEach((x) => { x.hidden = x.dataset.part !== st.phase; });
311
- return;
312
- }
313
328
  if ((b.dataset.vm === 'prev' || b.dataset.vm === 'next') && b.dataset.id) return read(b.dataset.id);
314
329
  if (b.dataset.vm === 'nabout') {
315
330
  st.about = !st.about; paint();
@@ -5,7 +5,7 @@
5
5
  * (draft, stop, edit, post after a confirm, send back, try again), and keys and swipe on the rows. */
6
6
  import { pmPost } from './http.js';
7
7
  import { mdRender } from './markdown.js';
8
- import { $, $$, esc, openDlg, closeDlg, setMode, toast, loadThread, onScroll, wireRail, logHtml, turnA, turnU, ptx, CHECK, RM, S, setPageGaps, onPageChat, openPageChat } from './premium-shell.js';
8
+ import { $, $$, esc, openDlg, closeDlg, setMode, toast, loadThread, onScroll, wireRail, logHtml, turnA, turnU, ptx, CHECK, RM, S, setPageGaps, chatAbout } from './premium-shell.js';
9
9
 
10
10
  let M = null; // the model
11
11
  let openR = null; // the row whose dialog is open
@@ -653,6 +653,6 @@ async function load() {
653
653
  if (mine && dlgKind === 'item') refreshOpen(); else if (mine) drawFocusDlg();
654
654
  }
655
655
  setInterval(() => { if (M && M.agents && M.agents.counts.running > 0 && !document.hidden) load(); }, 15000); // an agent's state changes without a press
656
- onPageChat(() => openPageChat('work:this-page', 'My work')); // Chat in the top bar: the page as a whole (initiative premium-topbar)
656
+ chatAbout('work:this-page', 'My work'); // the rail's Chat opens the Chat page on this page's conversation (premium-chat-page)
657
657
  $('#brief').textContent = 'Reading your list.';
658
658
  load();
@@ -396,7 +396,7 @@ a.round{color:inherit;text-decoration:none}
396
396
  @media (max-width:700px){.ch{position:relative;top:0}
397
397
  .fchip,.seg2 button,.dlg .seg button,.dx2,.seg button{min-height:44px}
398
398
  .dx2,.round,.fbtn{min-width:44px;min-height:44px}}
399
- .rail .ind{transform:translateY(calc(var(--pi,0)*72px));transition:transform .55s var(--spring)}
399
+ .rail .ind{transform:translateY(var(--py,calc(var(--pi,0)*72px)));transition:transform .55s var(--spring)}
400
400
  .stage[hidden]{display:none}
401
401
  .mv2{display:flex;gap:6px;flex-wrap:wrap;align-items:center;font-size:var(--fs-2);color:var(--ink-3)}
402
402
  .mv2 .seg2{margin-left:2px}
@@ -453,7 +453,7 @@ a.round{color:inherit;text-decoration:none}
453
453
  .cols2>div{display:grid;gap:24px;min-width:0}
454
454
  @media (max-width:1000px){.cols2{grid-template-columns:minmax(0,1fr)}}
455
455
  @media (max-width:999px){.rail{left:50%;top:auto;bottom:max(12px,env(safe-area-inset-bottom,0px));transform:translateX(-50%);width:min(400px,calc(100% - 32px));display:flex;border-radius:28px;padding:6px}
456
- .rail .ind{top:6px;bottom:6px;height:auto;left:6px;width:calc((100% - 12px)/4)}
456
+ .rail .ind{top:6px;bottom:6px;height:auto;left:6px;width:calc((100% - 12px)/5)}
457
457
  .pl{flex:1;height:56px}
458
458
  .stage{padding-block-end:120px}
459
459
  .snap{display:none}
@@ -2112,8 +2112,6 @@ button.wl-row[aria-pressed="true"] .wl-tog{background:var(--solid);color:var(--o
2112
2112
  .top{flex-wrap:nowrap}
2113
2113
  .where{display:flex;align-items:center;gap:10px;min-width:0}
2114
2114
  .where .crumb{max-width:none;min-width:0}
2115
- .tbchat{flex:none;background:var(--solid);color:var(--on-solid);border:0;box-shadow:0 10px 30px -10px rgba(20,22,31,.45)}
2116
- .tbchat svg{width:19px;height:19px}
2117
2115
  #crBoard.crback{flex:none;width:44px;height:44px;padding:0;border-radius:50%;display:grid;place-items:center;background:var(--card);border:1px solid var(--hair);color:var(--ink);cursor:pointer}
2118
2116
  #crBoard.crback:hover{text-decoration:none;background:var(--well)}
2119
2117
  #crBoard.crback svg{width:20px;height:20px}
@@ -2501,3 +2499,35 @@ button.wl-row[aria-pressed="true"] .wl-tog{background:var(--solid);color:var(--o
2501
2499
  .askbar .spad-f .cta{width:auto;height:34px;min-height:34px;padding:0 14px;border-radius:var(--r-chip);display:inline-flex;font-size:var(--fs-2);background:var(--card);color:var(--ink)}
2502
2500
  .askbar .spad-f .cta:disabled{opacity:.5;cursor:not-allowed}
2503
2501
  @media (max-width:700px){.spad-h span{display:none}.askbar .spad textarea{font-size:var(--fs-4)}.padt{min-height:44px}}
2502
+ /* a compact dialog (the meeting detail) on a phone: a short head, and once the detail scrolls only the title and the tools stay (PM, 2026-10-20) */
2503
+ @media (max-width:999px){.dlg.cmp #dEye{display:none}
2504
+ .dlg.cmp .dhead{align-items:center}
2505
+ .dlg.cmp #dTitle{margin-top:0;font-size:var(--fs-4);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
2506
+ .dlg.cmp .dsub{margin-top:2px;font-size:var(--fs-2);line-height:1.35}
2507
+ .dlg.cmp .dtabs{margin-top:10px}
2508
+ .dlg.cmp .dgrid{margin-top:8px}
2509
+ .dlg.cmp.shrunk .dsub,.dlg.cmp.shrunk .dtabs{display:none}
2510
+ .dlg.cmp.shrunk .dgrid{margin-top:4px}}
2511
+
2512
+ /* ── premium-chat-rail: Chat is the rail's middle place, a solid round button bigger than the others. On a phone it rises above the bar. ── */
2513
+ .pl.pchat{height:96px;color:var(--ink)}
2514
+ .pchat .orb{position:relative;width:60px;height:60px;border-radius:50%;display:grid;place-items:center;background:var(--solid);color:var(--on-solid);box-shadow:0 12px 28px -10px rgba(20,22,31,.55),0 0 0 4px color-mix(in oklab,var(--solid) 14%,transparent);transition:transform .35s var(--spring)}
2515
+ .pchat .orb svg{width:26px;height:26px}
2516
+ .pl.pchat:hover svg{transform:none}
2517
+ .pl.pchat:hover .orb{transform:translateY(-2px)}
2518
+ .pchat .cdot{position:absolute;top:2px;right:2px;width:12px;height:12px;border-radius:50%;background:var(--ember);box-shadow:0 0 0 2px var(--card-solid)}
2519
+ .pchat .cdot[hidden]{display:none}
2520
+ .pl.pchat:focus-visible{outline:none}
2521
+ .pl.pchat:focus-visible .orb{outline:2px solid var(--ink);outline-offset:3px}
2522
+ @media (max-width:999px){
2523
+ .pl.pchat{height:56px;align-content:end;padding-bottom:6px}
2524
+ .pchat .orb{position:absolute;left:50%;top:-30px;transform:translateX(-50%);width:60px;height:60px;box-shadow:0 10px 24px -8px rgba(0,0,0,.6),0 0 0 5px var(--card-solid)}
2525
+ .pl.pchat:hover .orb{transform:translateX(-50%)}
2526
+ }
2527
+ @media (prefers-reduced-motion:reduce){.pchat .orb{transition:none}}
2528
+
2529
+ /* ── premium-chat-page: the Chat page is the chat dialog held open beside the rail. No veil, no close, no full-screen toggle: it is the page. ── */
2530
+ .chatpg .veil{display:none}
2531
+ .chatpg #dClose,.chatpg #dExpand,.chatpg .dlg .grab{display:none}
2532
+ @media (min-width:1000px){.chatpg .dlg.on{left:128px;top:16px;transform:none;width:calc(100% - 144px);height:calc(100% - 32px);max-height:none!important;border-radius:28px;padding:26px 34px 18px}}
2533
+ @media (max-width:999px){.chatpg .dlg.on{left:0;top:0;transform:none;width:100%;height:calc(100% - 118px - env(safe-area-inset-bottom,0px));max-height:none!important;border-radius:0 0 28px 28px;padding:16px 18px 14px}}
@@ -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, setFull, CHECK, CHEV, ptx, turnA, turnU, H1, H2, P1, UL, logHtml, loadThread, onScroll, wireRail, pvFeed, setPageGaps, sourcesHook, onPageChat, openPageChat, pvOpenBell, ibState } 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, chatAbout, pvOpenBell, ibState } 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"/>',
@@ -1091,7 +1091,7 @@ async function refreshRepos() {
1091
1091
  let RTIMER = null;
1092
1092
  $('#pkw').dataset.park = 'pkPark';
1093
1093
  sourcesHook({ html: sourcesHtml, mount: () => { const slot = $('#pkSlot'), w = $('#pkw'); if (slot && w) slot.appendChild(w); }, refresh: refreshRepos });
1094
- onPageChat(() => openPageChat('src:this-page', 'the Briefing'));
1094
+ chatAbout('src:this-page', 'the Briefing');
1095
1095
  $('#brief').textContent = 'Reading the repository.';
1096
1096
  load();
1097
1097
  mountFirst(); // the "Your first Briefing" card, only when the page was opened with first=<import id> (initiative premium-welcome)
@@ -15,6 +15,7 @@
15
15
  <i class="ind"></i>
16
16
  <button class="pl" data-go="brief"><svg class="i" viewBox="0 0 24 24"><circle cx="12" cy="12" r="4"/><path d="M12 2v2M12 20v2M2 12h2M20 12h2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4"/></svg>Briefing</button>
17
17
  <button class="pl" data-go="work"><svg class="i" viewBox="0 0 24 24"><rect x="4" y="4" width="16" height="16" rx="3"/><path d="m8.5 12 2.5 2.5 4.5-5"/></svg>My work</button>
18
+ <button class="pl pchat" data-go="chat" aria-label="Chat" title="Chat"><span class="orb"><svg class="i" viewBox="0 0 24 24"><path d="M4 5h16v11h-9l-5 4v-4H4z"/><path d="M12 7.6l.8 1.9 1.9.8-1.9.8-.8 1.9-.8-1.9-1.9-.8 1.9-.8z"/></svg><i class="cdot" hidden></i></span>Chat</button>
18
19
  <button class="pl" data-go="init" aria-current="page"><svg class="i" viewBox="0 0 24 24"><path d="M12 3 3 8l9 5 9-5z"/><path d="m3 13 9 5 9-5"/></svg>Board</button>
19
20
  <button class="pl" data-go="rep"><svg class="i" viewBox="0 0 24 24"><path d="M4 20V10M10 20V4M16 20v-8M22 20H2"/></svg>Insights</button>
20
21
  </nav>
@@ -0,0 +1,39 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="pmos-nonce" content="" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
7
+ <title>PMOS · Chat</title>
8
+ <!-- The premium Chat page (initiative premium-chat-page). The rail's middle place: the session list, the conversation and the viewer as a page of
9
+ its own, not a popup. It is the chat dialog of the other premium pages, held open and placed beside the rail. ?about=<key>&label=<name> opens
10
+ the conversation of the page the PM came from; without it, the PM's own chat (chat:main). -->
11
+ <link rel="preload" href="/vendor/geist-var.woff2" as="font" type="font/woff2" crossorigin />
12
+ <link rel="stylesheet" href="/pm/premium.css" />
13
+ </head>
14
+ <body class="chatpg">
15
+ <div class="sky"><i class="a"></i><i class="b"></i><i class="c"></i></div>
16
+ <nav class="rail glass" aria-label="Places">
17
+ <i class="ind"></i>
18
+ <button class="pl" data-go="brief"><svg class="i" viewBox="0 0 24 24"><circle cx="12" cy="12" r="4"/><path d="M12 2v2M12 20v2M2 12h2M20 12h2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4"/></svg>Briefing</button>
19
+ <button class="pl" data-go="work"><svg class="i" viewBox="0 0 24 24"><rect x="4" y="4" width="16" height="16" rx="3"/><path d="m8.5 12 2.5 2.5 4.5-5"/></svg>My work</button>
20
+ <button class="pl pchat" data-go="chat" aria-current="page" aria-label="Chat" title="Chat"><span class="orb"><svg class="i" viewBox="0 0 24 24"><path d="M4 5h16v11h-9l-5 4v-4H4z"/><path d="M12 7.6l.8 1.9 1.9.8-1.9.8-.8 1.9-.8-1.9-1.9-.8 1.9-.8z"/></svg><i class="cdot" hidden></i></span>Chat</button>
21
+ <button class="pl" data-go="init"><svg class="i" viewBox="0 0 24 24"><path d="M12 3 3 8l9 5 9-5z"/><path d="m3 13 9 5 9-5"/></svg>Board</button>
22
+ <button class="pl" data-go="rep"><svg class="i" viewBox="0 0 24 24"><path d="M4 20V10M10 20V4M16 20v-8M22 20H2"/></svg>Insights</button>
23
+ </nav>
24
+
25
+ <h1 class="vh">Chat</h1>
26
+ <div class="veil" id="veil"></div>
27
+ <div class="dlg" id="dlg" role="dialog" aria-modal="true" aria-labelledby="dTitle" tabindex="-1" data-mode="split" inert>
28
+ <div class="grab"></div>
29
+ <div class="dhead"><div class="dht"><p class="label" id="dEye"></p><h2 id="dTitle"></h2><p class="dsub" id="dSub"></p></div>
30
+ <div class="dtools"><button class="round dx2" id="dPane" aria-label="Hide the conversation" aria-pressed="true" title="Hide the conversation"><svg class="i" viewBox="0 0 24 24"><rect x="3" y="4" width="18" height="16" rx="3"/><path d="M9 4v16"/></svg></button><button class="round dx2" id="dExpand" aria-label="Full screen" aria-pressed="false" title="Full screen"><svg class="i" viewBox="0 0 24 24"><path id="dExpP" d="M14 4h6v6M10 20H4v-6M20 4l-7 7M4 20l7-7"/></svg></button><button class="round dx2" id="dClose" aria-label="Close"><svg class="i" viewBox="0 0 24 24"><path d="M6 6l12 12M18 6 6 18"/></svg></button></div></div>
31
+ <div class="dtabs" id="dTabs"><div class="seg" role="group" aria-label="Sections"><i class="pill"></i><button data-t="out" aria-pressed="true">Detail</button><button data-t="chat" aria-pressed="false">Conversation</button></div></div>
32
+ <div class="dgrid" id="dGrid" data-tab="out"><section class="pane p-work" id="dBody" aria-label="Conversation"></section>
33
+ <section class="pane p-out" id="dOut" aria-label="Detail"><div class="otop"><span class="ol" id="oLab">Detail</span></div><div class="obody" id="oMain"></div><div class="tabhint"><span>The action is on the Conversation tab.</span><button type="button" id="tabGo">Open it</button></div></section></div>
34
+ </div>
35
+ <div class="toast glass" id="toast" role="status"></div>
36
+ <noscript>This page needs JavaScript.</noscript>
37
+ <script type="module" src="/pm/premium-chat.js"></script>
38
+ </body>
39
+ </html>
@@ -15,6 +15,7 @@
15
15
  <i class="ind"></i>
16
16
  <button class="pl" data-go="brief"><svg class="i" viewBox="0 0 24 24"><circle cx="12" cy="12" r="4"/><path d="M12 2v2M12 20v2M2 12h2M20 12h2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4"/></svg>Briefing</button>
17
17
  <button class="pl" data-go="work"><svg class="i" viewBox="0 0 24 24"><rect x="4" y="4" width="16" height="16" rx="3"/><path d="m8.5 12 2.5 2.5 4.5-5"/></svg>My work</button>
18
+ <button class="pl pchat" data-go="chat" aria-label="Chat" title="Chat"><span class="orb"><svg class="i" viewBox="0 0 24 24"><path d="M4 5h16v11h-9l-5 4v-4H4z"/><path d="M12 7.6l.8 1.9 1.9.8-1.9.8-.8 1.9-.8-1.9-1.9-.8 1.9-.8z"/></svg><i class="cdot" hidden></i></span>Chat</button>
18
19
  <button class="pl" data-go="init" aria-current="page"><svg class="i" viewBox="0 0 24 24"><path d="M12 3 3 8l9 5 9-5z"/><path d="m3 13 9 5 9-5"/></svg>Board</button>
19
20
  <button class="pl" data-go="rep"><svg class="i" viewBox="0 0 24 24"><path d="M4 20V10M10 20V4M16 20v-8M22 20H2"/></svg>Insights</button>
20
21
  </nav>
@@ -16,6 +16,7 @@
16
16
  <i class="ind"></i>
17
17
  <button class="pl" data-go="brief"><svg class="i" viewBox="0 0 24 24"><circle cx="12" cy="12" r="4"/><path d="M12 2v2M12 20v2M2 12h2M20 12h2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4"/></svg>Briefing</button>
18
18
  <button class="pl" data-go="work"><svg class="i" viewBox="0 0 24 24"><rect x="4" y="4" width="16" height="16" rx="3"/><path d="m8.5 12 2.5 2.5 4.5-5"/></svg>My work</button>
19
+ <button class="pl pchat" data-go="chat" aria-label="Chat" title="Chat"><span class="orb"><svg class="i" viewBox="0 0 24 24"><path d="M4 5h16v11h-9l-5 4v-4H4z"/><path d="M12 7.6l.8 1.9 1.9.8-1.9.8-.8 1.9-.8-1.9-1.9-.8 1.9-.8z"/></svg><i class="cdot" hidden></i></span>Chat</button>
19
20
  <button class="pl" data-go="init"><svg class="i" viewBox="0 0 24 24"><path d="M12 3 3 8l9 5 9-5z"/><path d="m3 13 9 5 9-5"/></svg>Board</button>
20
21
  <button class="pl" data-go="rep" aria-current="page"><svg class="i" viewBox="0 0 24 24"><path d="M4 20V10M10 20V4M16 20v-8M22 20H2"/></svg>Insights</button>
21
22
  </nav>
@@ -15,6 +15,7 @@
15
15
  <i class="ind"></i>
16
16
  <button class="pl" data-go="brief"><svg class="i" viewBox="0 0 24 24"><circle cx="12" cy="12" r="4"/><path d="M12 2v2M12 20v2M2 12h2M20 12h2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4"/></svg>Briefing</button>
17
17
  <button class="pl" data-go="work" aria-current="page"><svg class="i" viewBox="0 0 24 24"><rect x="4" y="4" width="16" height="16" rx="3"/><path d="m8.5 12 2.5 2.5 4.5-5"/></svg>My work</button>
18
+ <button class="pl pchat" data-go="chat" aria-label="Chat" title="Chat"><span class="orb"><svg class="i" viewBox="0 0 24 24"><path d="M4 5h16v11h-9l-5 4v-4H4z"/><path d="M12 7.6l.8 1.9 1.9.8-1.9.8-.8 1.9-.8-1.9-1.9-.8 1.9-.8z"/></svg><i class="cdot" hidden></i></span>Chat</button>
18
19
  <button class="pl" data-go="init"><svg class="i" viewBox="0 0 24 24"><path d="M12 3 3 8l9 5 9-5z"/><path d="m3 13 9 5 9-5"/></svg>Board</button>
19
20
  <button class="pl" data-go="rep"><svg class="i" viewBox="0 0 24 24"><path d="M4 20V10M10 20V4M16 20v-8M22 20H2"/></svg>Insights</button>
20
21
  </nav>
@@ -32,7 +33,7 @@
32
33
  <div class="toast glass" id="toast" role="status"></div>
33
34
  <main class="stage" id="stage">
34
35
  <header class="top rise" style="--d:0">
35
- <h1 class="vh">My work</h1><div class="where"><span class="glass name" aria-hidden="true">My work</span><button class="round tbchat" id="pgChat" aria-haspopup="dialog" aria-label="Ask about this page" title="Ask about this page"></button></div>
36
+ <h1 class="vh">My work</h1><div class="where"><span class="glass name" aria-hidden="true">My work</span></div>
36
37
  <div class="tools tools-top"><span class="vh" id="snap">Reading your list</span></div>
37
38
  </header>
38
39
  <section class="hero">
@@ -25,6 +25,7 @@
25
25
  <i class="ind"></i>
26
26
  <button class="pl" data-go="brief" aria-current="page"><svg class="i" viewBox="0 0 24 24"><circle cx="12" cy="12" r="4"/><path d="M12 2v2M12 20v2M2 12h2M20 12h2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4"/></svg>Briefing</button>
27
27
  <button class="pl" data-go="work"><svg class="i" viewBox="0 0 24 24"><rect x="4" y="4" width="16" height="16" rx="3"/><path d="m8.5 12 2.5 2.5 4.5-5"/></svg>My work</button>
28
+ <button class="pl pchat" data-go="chat" aria-label="Chat" title="Chat"><span class="orb"><svg class="i" viewBox="0 0 24 24"><path d="M4 5h16v11h-9l-5 4v-4H4z"/><path d="M12 7.6l.8 1.9 1.9.8-1.9.8-.8 1.9-.8-1.9-1.9-.8 1.9-.8z"/></svg><i class="cdot" hidden></i></span>Chat</button>
28
29
  <button class="pl" data-go="init"><svg class="i" viewBox="0 0 24 24"><path d="M12 3 3 8l9 5 9-5z"/><path d="m3 13 9 5 9-5"/></svg>Board</button>
29
30
  <button class="pl" data-go="rep"><svg class="i" viewBox="0 0 24 24"><path d="M4 20V10M10 20V4M16 20v-8M22 20H2"/></svg>Insights</button>
30
31
  </nav>
@@ -42,7 +43,7 @@
42
43
  <div class="toast glass" id="toast" role="status"></div>
43
44
  <main class="stage" id="stage">
44
45
  <header class="top rise" style="--d:0">
45
- <h1 class="vh">Briefing</h1><div class="where"><span class="glass name" aria-hidden="true">Briefing</span><button class="round tbchat" id="pgChat" aria-haspopup="dialog" aria-label="Ask about this page" title="Ask about this page"></button></div>
46
+ <h1 class="vh">Briefing</h1><div class="where"><span class="glass name" aria-hidden="true">Briefing</span></div>
46
47
  <div class="tools tools-top"><span class="vh" id="snap">Reading the repository</span>
47
48
  <span id="pkPark" hidden><span class="pkw" id="pkw" hidden><button class="fchip" id="pick" aria-haspopup="menu" aria-expanded="false" aria-controls="pickMenu">Products<em id="pickN"></em></button><div class="crmenu pkmenu" id="pickMenu" role="menu" hidden></div></span></span></div>
48
49
  </header>
@@ -1986,6 +1986,8 @@ const freshness = require('./lib/freshness.js').create({
1986
1986
  workspaces: () => [...workspaces.values()],
1987
1987
  schedules: () => readSchedules(),
1988
1988
  factsStatus: (root) => factsAsync.status(root),
1989
+ // briefing-source-flow: the tools the Briefing reads, as switched on in Settings (calendar has its own row)
1990
+ toolsOn: () => { const b = proSettings().briefSources || {}; return Object.keys(b).filter((k) => b[k] === true && k !== 'calendar'); },
1989
1991
  onChange: (w) => {
1990
1992
  // data-refresh-settings: the repository source is the rebuild on change; switched off in Data refresh, a change rebuilds nothing.
1991
1993
  if (refreshRun && !refreshRun.jobGate('repo').ok) return;
@@ -6308,12 +6310,12 @@ async function handleRequest(req, res) {
6308
6310
  res.writeHead(302, { Location: (url.search ? '/console.html' : '/premium.html') + url.search, 'Cache-Control': 'no-store' });
6309
6311
  return res.end();
6310
6312
  }
6311
- if (p === '/' || p === '/index.html' || p === '/console' || p === '/console.html' || p === '/classic' || p === '/classic.html' || p === '/welcome' || p === '/welcome.html' || p === '/premium' || p === '/premium.html' || p === '/premium-work' || p === '/premium-work.html' || p === '/premium-board' || p === '/premium-board.html' || p === '/premium-initiative' || p === '/premium-initiative.html' || p === '/premium-insights' || p === '/premium-insights.html' || p === '/premium-welcome' || p === '/premium-welcome.html') {
6313
+ if (p === '/' || p === '/index.html' || p === '/console' || p === '/console.html' || p === '/classic' || p === '/classic.html' || p === '/welcome' || p === '/welcome.html' || p === '/premium' || p === '/premium.html' || p === '/premium-work' || p === '/premium-work.html' || p === '/premium-board' || p === '/premium-board.html' || p === '/premium-initiative' || p === '/premium-initiative.html' || p === '/premium-insights' || p === '/premium-insights.html' || p === '/premium-welcome' || p === '/premium-welcome.html' || p === '/premium-chat' || p === '/premium-chat.html') {
6312
6314
  // pm-os-absorb Run 2 (R25, X11): the per-launch nonce goes into the base meta line, nowhere else. no-store, so a
6313
6315
  // restarted server never answers a press from a page that holds the previous launch's value. The page code is
6314
6316
  // referenced under this launch's build prefix.
6315
6317
  const n = pmGuard.launchNonce();
6316
- return fs.readFile(path.join(PUB, (p === '/classic' || p === '/classic.html') ? 'index.html' : (p === '/welcome' || p === '/welcome.html') ? 'welcome.html' : (p === '/premium' || p === '/premium.html') ? 'premium.html' : (p === '/premium-work' || p === '/premium-work.html') ? 'premium-work.html' : (p === '/premium-board' || p === '/premium-board.html') ? 'premium-board.html' : (p === '/premium-initiative' || p === '/premium-initiative.html') ? 'premium-initiative.html' : (p === '/premium-insights' || p === '/premium-insights.html') ? 'premium-insights.html' : (p === '/premium-welcome' || p === '/premium-welcome.html') ? 'premium-welcome.html' : (p === '/console' || p === '/console.html') ? 'c3.html' : 'premium.html'), 'utf8', (err, html) => {
6318
+ return fs.readFile(path.join(PUB, (p === '/classic' || p === '/classic.html') ? 'index.html' : (p === '/welcome' || p === '/welcome.html') ? 'welcome.html' : (p === '/premium' || p === '/premium.html') ? 'premium.html' : (p === '/premium-work' || p === '/premium-work.html') ? 'premium-work.html' : (p === '/premium-board' || p === '/premium-board.html') ? 'premium-board.html' : (p === '/premium-initiative' || p === '/premium-initiative.html') ? 'premium-initiative.html' : (p === '/premium-insights' || p === '/premium-insights.html') ? 'premium-insights.html' : (p === '/premium-welcome' || p === '/premium-welcome.html') ? 'premium-welcome.html' : (p === '/premium-chat' || p === '/premium-chat.html') ? 'premium-chat.html' : (p === '/console' || p === '/console.html') ? 'c3.html' : 'premium.html'), 'utf8', (err, html) => {
6317
6319
  if (err) { res.writeHead(404); res.end('not found'); return; }
6318
6320
  let out = withBuild(html);
6319
6321
  if (n) out = out.replace('<meta name="' + pmGuard.NONCE_META + '" content="" />', '<meta name="' + pmGuard.NONCE_META + '" content="' + n + '" />');