create-pmos 0.396.0 → 0.398.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 (177) hide show
  1. package/package.json +25 -25
  2. package/payload/KIT-VERSION +2 -2
  3. package/payload/planning/evals/eval-calibration.md +1 -1
  4. package/payload/planning/okrs/health-budgets.md +1 -1
  5. package/payload/scripts/nine-stages.js +49 -20
  6. package/payload/state/discoveries.md +1 -1
  7. package/payload/state/log.md +1 -1
  8. package/workspace/briefing-premium-adddoc-test.js +103 -74
  9. package/workspace/briefing-premium-board-test.js +316 -154
  10. package/workspace/briefing-premium-calendar-2-test.js +135 -195
  11. package/workspace/briefing-premium-calendar-3-test.js +143 -413
  12. package/workspace/briefing-premium-calendar-test.js +86 -185
  13. package/workspace/briefing-premium-doc-edit-test.js +95 -83
  14. package/workspace/briefing-premium-initiative-test.js +166 -294
  15. package/workspace/briefing-premium-insights-test.js +351 -214
  16. package/workspace/briefing-premium-metrics-test.js +53 -118
  17. package/workspace/briefing-premium-products-test.js +40 -27
  18. package/workspace/briefing-premium-sources-test.js +91 -52
  19. package/workspace/briefing-premium-test.js +150 -633
  20. package/workspace/briefing-premium-work-test.js +88 -269
  21. package/workspace/changelog.json +24 -0
  22. package/workspace/fixtures/board-premium-facts.js +2 -1
  23. package/workspace/fixtures/board-premium-jira.js +28 -0
  24. package/workspace/fixtures/board-premium-trail.js +32 -0
  25. package/workspace/fixtures/initiative-premium-facts.js +2 -1
  26. package/workspace/fixtures/initiatives-api/list.json +30 -42
  27. package/workspace/fixtures/initiatives-api/roadmap.json +40 -56
  28. package/workspace/fixtures/initiatives-api/sheet.json +10 -14
  29. package/workspace/fixtures/insights-premium-facts.js +11 -2
  30. package/workspace/fixtures/premium-viewer-fixtures.js +182 -0
  31. package/workspace/guide/briefing-premium.md +3 -1
  32. package/workspace/guide/home.md +47 -0
  33. package/workspace/guide/index.md +2 -0
  34. package/workspace/guide/lifecycle.md +51 -0
  35. package/workspace/home-shot.js +38 -0
  36. package/workspace/lib/agent-roles.js +71 -0
  37. package/workspace/lib/board-premium.js +160 -3
  38. package/workspace/lib/board-trail.js +223 -0
  39. package/workspace/lib/engine/boards.js +15 -14
  40. package/workspace/lib/engine/nine-stages.js +49 -20
  41. package/workspace/lib/engine/signals/detectors.js +13 -11
  42. package/workspace/lib/home-work-item.js +58 -0
  43. package/workspace/lib/insights-goals.js +196 -0
  44. package/workspace/lib/insights-premium.js +126 -1
  45. package/workspace/lib/insights-records.js +101 -0
  46. package/workspace/lib/jira-tickets.js +1 -1
  47. package/workspace/lib/route-modules.js +4 -0
  48. package/workspace/lib/routes-board-premium.js +3 -2
  49. package/workspace/lib/routes-board-trail.js +33 -0
  50. package/workspace/lib/routes-home-desk.js +176 -0
  51. package/workspace/lib/routes-initiatives.js +1 -1
  52. package/workspace/lib/routes-insights-premium.js +19 -3
  53. package/workspace/lib/routes-insights-records.js +129 -0
  54. package/workspace/lib/routes-notes.js +1 -0
  55. package/workspace/lib/routes-viewer.js +108 -0
  56. package/workspace/lib/transcript-steps.js +123 -0
  57. package/workspace/lib/vendor/scripts/nine-stages.js +49 -20
  58. package/workspace/lib/viewer-meeting.js +205 -0
  59. package/workspace/lib/viewer-report.js +89 -0
  60. package/workspace/package-lock.json +2 -2
  61. package/workspace/package.json +1 -1
  62. package/workspace/premium-agreed-viewer-shots.js +76 -0
  63. package/workspace/premium-board-actions-test.js +85 -73
  64. package/workspace/premium-briefing-depth-test.js +66 -53
  65. package/workspace/premium-chat-attach-test.js +54 -63
  66. package/workspace/premium-chat-chart-tab-test.js +35 -36
  67. package/workspace/premium-chat-context-test.js +22 -19
  68. package/workspace/premium-chat-goal-view-test.js +28 -26
  69. package/workspace/premium-chat-notes-test.js +29 -33
  70. package/workspace/premium-chat-report-tab-test.js +35 -25
  71. package/workspace/premium-chat-term-test.js +16 -14
  72. package/workspace/premium-chat-viewer-test.js +60 -53
  73. package/workspace/premium-core-doc-issue-test.js +50 -41
  74. package/workspace/premium-html-viewer-test.js +17 -18
  75. package/workspace/premium-phone-card-test.js +8 -2
  76. package/workspace/premium-phone-room-test.js +42 -31
  77. package/workspace/premium-report-read-test.js +115 -197
  78. package/workspace/premium-viewer-download-test.js +19 -22
  79. package/workspace/premium-viewer-flicker-test.js +11 -16
  80. package/workspace/premium-viewer-share-test.js +6 -9
  81. package/workspace/premium-viewer-test.js +41 -60
  82. package/workspace/premium-vw-backlog-test.js +53 -31
  83. package/workspace/premium-vw-cal-test.js +82 -123
  84. package/workspace/premium-vw-copy-test.js +17 -33
  85. package/workspace/premium-vw-doc-test.js +12 -11
  86. package/workspace/premium-vw-item-test.js +50 -48
  87. package/workspace/premium-vw-jira-test.js +55 -26
  88. package/workspace/premium-vw-meet-test.js +118 -187
  89. package/workspace/premium-vw-notes-test.js +85 -107
  90. package/workspace/premium-vw-rec-test.js +72 -193
  91. package/workspace/premium-vw-slides-test.js +46 -50
  92. package/workspace/premium-welcome-test.js +3 -2
  93. package/workspace/premium-work-depth-test.js +63 -51
  94. package/workspace/public/pm/bd-acts.js +305 -0
  95. package/workspace/public/pm/bd-span.js +224 -0
  96. package/workspace/public/pm/bd-stages.js +47 -0
  97. package/workspace/public/pm/c3-doc-sheet.js +1 -1
  98. package/workspace/public/pm/c3-md.js +3 -395
  99. package/workspace/public/pm/c3-phone-detail.js +1 -1
  100. package/workspace/public/pm/c3-phone-model.js +3 -68
  101. package/workspace/public/pm/chat-term.js +3 -3
  102. package/workspace/public/pm/cozy-board.css +640 -0
  103. package/workspace/public/pm/cozy-home.css +580 -0
  104. package/workspace/public/pm/cozy-home.js +172 -0
  105. package/workspace/public/pm/cozy-initiative.css +138 -0
  106. package/workspace/public/pm/cozy-insights.css +421 -0
  107. package/workspace/public/pm/cozy-md.js +396 -0
  108. package/workspace/public/pm/cozy-nav.js +65 -0
  109. package/workspace/public/pm/cozy-placeholder.js +26 -0
  110. package/workspace/public/pm/cozy-viewer.css +143 -0
  111. package/workspace/public/pm/cozy-viewer.js +144 -0
  112. package/workspace/public/pm/cozy-vw.css +485 -0
  113. package/workspace/public/pm/cozy.css +254 -0
  114. package/workspace/public/pm/home-adddoc.js +48 -0
  115. package/workspace/public/pm/home-app.js +905 -0
  116. package/workspace/public/pm/home-around.js +515 -0
  117. package/workspace/public/pm/home-chat.js +459 -0
  118. package/workspace/public/pm/home-data.js +312 -0
  119. package/workspace/public/pm/home-draft.js +68 -0
  120. package/workspace/public/pm/home-more.js +249 -0
  121. package/workspace/public/pm/home-phone-card.js +109 -0
  122. package/workspace/public/pm/home-work.js +519 -0
  123. package/workspace/public/pm/lifecycle-lens-model.js +45 -27
  124. package/workspace/public/pm/lifecycle-lens.js +22 -11
  125. package/workspace/public/pm/phone-moment.js +69 -0
  126. package/workspace/public/pm/pm-work-view.js +1 -1
  127. package/workspace/public/pm/premium-attach.js +4 -0
  128. package/workspace/public/pm/premium-board.js +544 -253
  129. package/workspace/public/pm/premium-brief.js +1 -1
  130. package/workspace/public/pm/premium-chart-tab.js +110 -62
  131. package/workspace/public/pm/premium-chat.js +17 -10
  132. package/workspace/public/pm/premium-deck.js +3 -3
  133. package/workspace/public/pm/premium-first.js +25 -21
  134. package/workspace/public/pm/premium-initiative-head.js +138 -0
  135. package/workspace/public/pm/premium-initiative.js +28 -4
  136. package/workspace/public/pm/premium-insights.js +950 -440
  137. package/workspace/public/pm/premium-meeting.js +61 -549
  138. package/workspace/public/pm/premium-notes.js +1 -1
  139. package/workspace/public/pm/premium-report-frame.css +20 -0
  140. package/workspace/public/pm/premium-report-read.js +509 -480
  141. package/workspace/public/pm/premium-report-tab.js +87 -63
  142. package/workspace/public/pm/premium-shell.js +107 -124
  143. package/workspace/public/pm/premium-viewer.js +27 -1
  144. package/workspace/public/pm/premium-vw-cal.js +187 -48
  145. package/workspace/public/pm/premium-vw-doc.css +6 -0
  146. package/workspace/public/pm/premium-vw-doc.js +40 -2
  147. package/workspace/public/pm/premium-vw-file.js +2 -2
  148. package/workspace/public/pm/premium-vw-jira-model.js +22 -5
  149. package/workspace/public/pm/premium-vw-jira.css +11 -0
  150. package/workspace/public/pm/premium-vw-jira.js +11 -4
  151. package/workspace/public/pm/premium-vw-meet.js +6 -83
  152. package/workspace/public/pm/premium-vw-mtg.js +731 -0
  153. package/workspace/public/pm/premium-vw-notes.js +56 -69
  154. package/workspace/public/pm/premium-vw-open.js +35 -0
  155. package/workspace/public/pm/premium-vw-page.js +16 -0
  156. package/workspace/public/pm/premium-vw-rec.js +11 -215
  157. package/workspace/public/pm/premium-vw-slides.css +5 -0
  158. package/workspace/public/pm/premium-vw-slides.js +44 -8
  159. package/workspace/public/pm/term-view.js +22 -0
  160. package/workspace/public/premium-board.html +57 -64
  161. package/workspace/public/premium-chat.html +7 -33
  162. package/workspace/public/premium-initiative.html +8 -41
  163. package/workspace/public/premium-insights.html +63 -62
  164. package/workspace/public/premium-viewer.html +20 -0
  165. package/workspace/public/premium-work.html +6 -72
  166. package/workspace/public/premium.html +21 -66
  167. package/workspace/public/vendor/nunito-var.woff2 +0 -0
  168. package/workspace/server.js +25 -3
  169. package/workspace/test-files.json +1 -0
  170. package/workspace/test-lists/home-libs.json +9 -0
  171. package/workspace/test-lists/premium-agreed-viewer.json +9 -0
  172. package/workspace/test-lists/premium-report-read.json +1 -1
  173. package/workspace/test-lists/premium-vw-agreed.json +9 -0
  174. package/workspace/test-lists/premium-vw-notes.json +1 -1
  175. package/workspace/third-party/README.md +1 -0
  176. package/workspace/public/pm/premium-work.js +0 -719
  177. package/workspace/public/pm/premium.js +0 -1133
@@ -8,7 +8,7 @@
8
8
  * After Since the last one (each next step of the meeting before: Done, Raised again or Not mentioned, then the new ones),
9
9
  * the summary, Decision and Why, Next step with owner, due and Make task, open questions, the screenshots of the
10
10
  * shared screen and the folded transcript.
11
- * An earlier or later meeting of the series opens as a viewer tab (openNoteTab), with the same sheet.
11
+ * openNoteTab(d, id) opens the note as the Viewer's meeting card (premium-vw-mtg.js); the html builders below are kept for their suites.
12
12
  *
13
13
  * WHERE EACH PART COMES FROM. GET /api/notes/one?id= answers { note, recording, screen: { frames }, place } (lib/routes-notes.js).
14
14
  * The parts are read as the console reads them (dest-notes.js partsOf, c3-notes.js): the final notes after Stop, else what was
@@ -16,7 +16,7 @@
16
16
  * Not drawn, because no record or route backs them here: re-linking the note to another calendar event (the console's own
17
17
  * meeting picker), and Make task on a Since the last one row (the console has none either). */
18
18
  import { agendaHeard, peopleOf } from './notes-context.js';
19
- import { vwOpen, vwStyle } from './premium-viewer.js';
19
+ import './premium-vw-open.js'; // registers window.czViews (openMeeting, openCalendar, openNotes, openReport) for the pages that load this module
20
20
 
21
21
  const clip = (s, n) => { const t = String(s == null ? '' : s).replace(/\s+/g, ' ').trim(); return t.length > n ? t.slice(0, n - 1) + '…' : t; };
22
22
  const pad = (n) => String(n).padStart(2, '0');
@@ -278,85 +278,8 @@ export function aboutBody(id, v, choices) {
278
278
  const c = (choices || []).find((x) => x.v === v);
279
279
  return c ? { id, ...c.body } : null;
280
280
  }
281
- const aboutPickHtml = (choices, cur, esc) => choices ? `<div class="mtg-link vm-nabout"><select aria-label="What this note is about">${[['', 'Choose what it is about'], ...choices.map((c) => [c.v, c.label]), ...(cur ? [['none', 'Not linked']] : [])].map(([v, l]) => `<option value="${esc(v)}"${v && v === cur ? ' selected' : ''}>${esc(l)}</option>`).join('')}</select><button type="button" class="addb pri" data-vm="nsave">Save</button></div>` : '<p class="note vm-nabout" role="status">Reading the boards.</p>';
282
281
 
283
- /* ── the viewer tab: a meeting of the series, opened beside the dialog's own meeting ─────────────────────────────── */
284
-
285
- /** Loads this view's stylesheet once (the frame keeps one link per view). */
286
- export const vmStyle = () => { if (typeof document !== 'undefined') vwStyle('meet'); };
287
-
288
- /** Opens a note in the viewer: one tab that pages through its series. The Notes list (premium-vw-notes.js) and the meeting dialog's
289
- * series line open it. deps: { pmGet, pmPost, esc, toast, task(sheet, step) → Promise<{ ok, text }>, changed?() after a write } */
290
- export async function openNoteTab(d, id) {
291
- vmStyle();
292
- const st = { id, note: null, sheet: null, error: '', phase: 'after', open: {}, tasked: new Set(), say: '', about: false, choices: null };
293
- const ctx = () => ({ esc: d.esc, tasked: st.tasked, replayBtn: false, where: 'tab', id: st.id, reread: () => read(st.id) });
294
- const html = () => {
295
- const S = st.sheet;
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>`;
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>`;
299
- };
300
- let el = null;
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()); };
302
- const paint = () => { if (el && el.isConnected) { partKeep(el, st.open); el.innerHTML = html(); wireParts(); } };
303
- async function read(noteId) {
304
- const fresh = noteId !== st.id || !st.sheet;
305
- st.id = noteId; if (fresh) { st.sheet = null; st.tasked = new Set(); st.about = false; st.open = {}; } st.error = ''; st.say = ''; paint();
306
- const one = await d.pmGet('/api/notes/one?id=' + encodeURIComponent(noteId));
307
- if (st.id !== noteId) return;
308
- const was = st.sheet;
309
- st.sheet = noteSheet(one); st.note = st.sheet ? one.note : null; st.error = st.sheet ? '' : (one && one.error) || 'no answer';
310
- if (st.sheet && (fresh || !was)) st.phase = phaseOf({ noteState: st.sheet.state, hasNotes: !!(st.sheet.overview || st.sheet.decisions.length || st.sheet.actions.length) });
311
- el = vwOpen({ id: 'meet-note', title: st.sheet ? st.sheet.title : 'Meeting note', icon: 'notes', html: html(), wire });
312
- wireParts();
313
- }
314
- async function boards() {
315
- const r = await d.pmGet('/api/boards');
316
- const list = r && r.ok && Array.isArray(r.boards) ? r.boards.filter((b) => b && b.id && !b.error) : [];
317
- await Promise.all(list.map(async (b) => {
318
- const x = await d.pmGet('/api/boards/backlog?ws=' + encodeURIComponent(b.ws || '') + '&board=' + encodeURIComponent(b.id) + '&limit=100');
319
- b.inis = x && x.ok && Array.isArray(x.rows) ? x.rows : [];
320
- }));
321
- return aboutChoices(list);
322
- }
323
- function wire(pane) {
324
- el = pane;
325
- pane.onclick = async (e) => {
326
- if (partToggle(e, st.open)) return;
327
- const b = e.target.closest('button'); if (!b || !st.sheet) return;
328
- if ((b.dataset.vm === 'prev' || b.dataset.vm === 'next') && b.dataset.id) return read(b.dataset.id);
329
- if (b.dataset.vm === 'nabout') {
330
- st.about = !st.about; paint();
331
- if (st.about && !st.choices) { st.choices = await boards(); if (st.about) paint(); }
332
- const sel = el.querySelector('.vm-nabout select'); if (sel) sel.focus();
333
- return;
334
- }
335
- if (b.dataset.vm === 'nsave') {
336
- const sel = el.querySelector('.vm-nabout select'), body = sel && aboutBody(st.sheet.id, sel.value, st.choices);
337
- if (!body) { d.toast('Choose what the note is about first.'); return; }
338
- b.disabled = true;
339
- const r = await d.pmPost('/api/notes/link', body);
340
- if (!r || !r.ok) { b.disabled = false; d.toast('Not saved' + (r && r.error ? ': ' + r.error : '.')); return; }
341
- d.toast(sel.value === 'none' ? 'Not linked to the Portfolio, a board or an initiative.' : 'Saved. The note moved into its group.');
342
- st.about = false; if (d.changed) d.changed();
343
- return read(st.sheet.id);
344
- }
345
- if (b.dataset.vm === 'serout' || b.dataset.vm === 'serback') {
346
- const r = await d.pmPost('/api/notes/series-member', { id: st.sheet.id, key: b.dataset.vm === 'serout' ? 'off' : null });
347
- d.toast(r && r.ok ? (b.dataset.vm === 'serout' ? 'Taken out of the series.' : 'Back in its series.') : 'Not saved' + (r && r.error ? ': ' + r.error : '.'));
348
- if (r && r.ok) { if (d.changed) d.changed(); read(st.sheet.id); }
349
- return;
350
- }
351
- if (b.dataset.task !== undefined) {
352
- const i = +b.dataset.task, step = st.sheet.actions[i]; if (!step) return;
353
- b.disabled = true;
354
- const res = await d.task(st.sheet, step);
355
- if (res.ok) st.tasked.add(i);
356
- st.say = res.text; paint();
357
- }
358
- };
359
- }
360
- el = vwOpen({ id: 'meet-note', title: 'Meeting note', icon: 'notes', html: html(), wire });
361
- await read(id);
362
- }
282
+ /* ── the old viewer tab is gone (Agreed design): a note opens as the Viewer's meeting card (premium-vw-mtg.js) ── */
283
+ export const vmStyle = () => {};
284
+ /** Opens a note in the Viewer card. d is ignored; kept so the old callers work. */
285
+ export async function openNoteTab(d, id) { const M = await import('./premium-vw-mtg.js'); return M.openMeeting({ note: id }); }