create-pmos 0.574.0 → 0.575.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 +14 -14
- package/payload/KIT-VERSION +1 -1
- package/payload/planning/evals/eval-calibration.md +1 -1
- package/payload/planning/okrs/health-budgets.md +1 -1
- package/payload/state/discoveries.md +1 -1
- package/workspace/briefing-premium-calendar-3-test.js +3 -10
- package/workspace/changelog.json +13 -0
- package/workspace/fixtures/agenda/invites.json +73 -0
- package/workspace/guide/notes.md +1 -1
- package/workspace/lib/agenda-topics.js +401 -0
- package/workspace/lib/meeting-focus.js +26 -13
- package/workspace/lib/routes-meeting-focus.js +79 -10
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/public/pm/agenda-live.css +44 -0
- package/workspace/public/pm/agenda-live.js +100 -0
- package/workspace/public/pm/cozy-rec-now.js +20 -2
- package/workspace/public/pm/premium-vw-mtg.js +20 -21
- package/workspace/test-lists/live-agenda-topics.json +7 -0
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
* WRITES (each a press): Record, Pause, Resume, Stop and Highlight through the page's recorder (premium-meeting.js recCore); POST
|
|
26
26
|
* /api/notes/save (Your notes), /api/notes/private, /api/notes/speaker (naming a speaker), /api/notes/series-member, /api/notes/link or
|
|
27
27
|
* /api/calendar-links (About), /api/viewer-meeting/agenda|capture|work-item, /api/plan-items (Make task), /api/meeting-material (Add material,
|
|
28
|
-
* Remove), /api/meeting-material/file (Upload a file), /api/meeting-focus/topic (
|
|
28
|
+
* Remove), /api/meeting-material/file (Upload a file), /api/meeting-focus/topic (Not this one) and /api/meeting-focus/agenda (Undo the merge) through pm/agenda-live.js, /api/meeting-points (Confirm, Not right),
|
|
29
29
|
* /api/meeting-points/edit (a correction, and what PMOS learns from it).
|
|
30
30
|
*
|
|
31
31
|
* meetModel(D, now) → the view model (pure; for the unit suite)
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
import * as IM from './impact.js'; // Your impact's meeting moment (batch 16 item 7)
|
|
37
37
|
import { open as vOpen, current as vCur, back as vBack, czSummary, czSections, wide as vWide } from './cozy-viewer.js';
|
|
38
38
|
import { pmGet, pmPost, pressFetch } from './http.js';
|
|
39
|
+
import { agendaHtml as mergedAgendaHtml, nowSummary, ensureCss as agendaCss, press as agendaPress } from './agenda-live.js'; // the agenda in 3 to 5 topics (live-agenda-topics)
|
|
39
40
|
import { ownTab, bring, tabUrl } from './rec-tab-core.js';
|
|
40
41
|
import { noteSheet, aboutChoices, aboutBody, aboutNow } from './premium-vw-meet.js';
|
|
41
42
|
import { weekView, noteOfRow, sameMeeting, recordable, prevOf, taskEvent, linkBody, mmss, focusView, replayModel, RECORD_LINE, FOCUS_LINE, STOP_LINE, CONSENT_LINE, recCore } from './premium-meeting.js';
|
|
@@ -214,7 +215,9 @@ export function meetModel(D, now = Date.now()) {
|
|
|
214
215
|
return { n: t.n || i + 1, text: t.text, k, used, plan, fill: plan ? Math.min(1, used / plan) : t.state === 'done' ? 1 : 0,
|
|
215
216
|
say: t.state === 'plan' ? (plan ? plan + ' min' : 'planned') : plan ? used + ' of ' + plan : used + ' min' };
|
|
216
217
|
});
|
|
217
|
-
|
|
218
|
+
// the agenda in 3 to 5 topics (lib/agenda-topics.js liveModel): one model with the recording tab's To cover
|
|
219
|
+
const A = F && F.agenda && Array.isArray(F.agenda.topics) && F.agenda.topics.length ? F.agenda : null;
|
|
220
|
+
const focus = { model: A, nowText: nowSummary(A), now: cur >= 0 ? topics[cur].text : '', nowLine: topics.length ? (cur >= 0 ? 'Now · topic ' + (cur + 1) + ' of ' + topics.length : plural(topics.length, 'topic') + ' planned') : 'No topics yet',
|
|
218
221
|
gist: fv && fv.state === 'ok' ? fv.gist : '', topics: topics.map((t) => ({ text: t.text, now: t.state === 'now' })), agenda: fAgenda,
|
|
219
222
|
agendaSub: ag.total ? ag.total + ' min' : '', material: mats, error: fv && fv.state !== 'ok' ? fv.reason : '' };
|
|
220
223
|
/* after */
|
|
@@ -336,7 +339,7 @@ export function summaryHtml(m, ui = {}) {
|
|
|
336
339
|
// a recording in its own tab (rec-tab-core.js) is live, not stale: this page shows it, and its one press brings that tab forward
|
|
337
340
|
const away = m.liveK === 'stale' && ownTab();
|
|
338
341
|
const line = m.liveK === 'rec' || away ? 'Recording · ' + mmss(m.liveMs || 0) : m.liveK === 'paused' ? 'Paused at ' + mmss(m.liveMs || 0) : 'Recording, but not on this page';
|
|
339
|
-
const now = Fo.now ? 'Now on: ' + Fo.now + (Fo.topics.length > 1 ? ', topic ' + (Fo.topics.findIndex((t) => t.now) + 1) + ' of ' + Fo.topics.length + '.' : '.')
|
|
342
|
+
const now = Fo.nowText ? 'Now on: ' + Fo.nowText + '.' : Fo.now ? 'Now on: ' + Fo.now + (Fo.topics.length > 1 ? ', topic ' + (Fo.topics.findIndex((t) => t.now) + 1) + ' of ' + Fo.topics.length + '.' : '.')
|
|
340
343
|
: Fo.error ? 'Focus could not read this meeting: ' + String(Fo.error).replace(/\.$/, '') + '.' : ''; // honest: a refused read says why
|
|
341
344
|
const text = m.liveK === 'paused' ? 'Nothing is kept while paused. ' + now : m.liveK === 'stale' && !away ? 'Nothing is kept until you resume here. ' + now : now;
|
|
342
345
|
const acts = away ? roundBtn('rectab', 'Go to the recording tab', 'tab', 'dark') : m.liveK === 'rec' ? roundBtn('stop', 'Stop the recording', 'stop', 'red') + roundBtn('hl', 'Highlight the last 30 seconds', 'star') + roundBtn('pause', 'Pause', 'pause')
|
|
@@ -384,11 +387,11 @@ function caughtHtml(m) {
|
|
|
384
387
|
if (L.topics.length) h.push(weightBar('vz-stretch', L.topics.map((t) => ({ w: +t.flex || 1, attrs: ` data-k="${t.k}"` }))));
|
|
385
388
|
return h.join('') || '<p class="vz-empty">What was said shows here while the note records.</p>';
|
|
386
389
|
}
|
|
387
|
-
|
|
390
|
+
/** The live Agenda: the 3 to 5 topics (pm/agenda-live.js) when the read has them. No Change topic: PMOS follows the talk, the PM says Not this one. */
|
|
391
|
+
function liveAgendaHtml(m) {
|
|
388
392
|
const Fo = m.focus;
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
return change + (Fo.agenda.length ? Fo.agenda.map((a) => `<div class="vzm-ag" data-k="${a.k}"><span>${a.k === 'now' || a.k === 'late' ? `<b>${a.n} ${esc(a.text)}</b>` : esc(a.n + ' ' + a.text)}</span>${fillBar(a.fill, a.k)}<small>${esc(a.say)}</small></div>`).join('') : '<p class="vz-empty">The invite lists no topics yet.</p>');
|
|
393
|
+
if (Fo.model) return mergedAgendaHtml(Fo.model);
|
|
394
|
+
return (Fo.agenda.length ? Fo.agenda.map((a) => `<div class="vzm-ag" data-k="${a.k}"><span>${a.k === 'now' || a.k === 'late' ? `<b>${a.n} ${esc(a.text)}</b>` : esc(a.n + ' ' + a.text)}</span>${fillBar(a.fill, a.k)}<small>${esc(a.say)}</small></div>`).join('') : '<p class="vz-empty">The invite lists no topics yet.</p>');
|
|
392
395
|
}
|
|
393
396
|
function transcriptHtml(m, ui, lines, seek) {
|
|
394
397
|
const W = m.notes && m.notes.replay ? m.notes.replay.W : null; // the word fixes (MvF) show in the transcript too
|
|
@@ -441,7 +444,8 @@ export function sectionsOf(m, ui = {}) {
|
|
|
441
444
|
const lastT = P.prev.length ? { id: 'last', title: 'Last time', count: P.prev[0].date, html: prevHtml(P) } : null;
|
|
442
445
|
if (m.mk === 'prep') {
|
|
443
446
|
return [
|
|
444
|
-
|
|
447
|
+
// a merged invite shows its topics before the meeting too, with Undo; else the lines with their minutes to change
|
|
448
|
+
Fo.model && Fo.model.merge ? { id: 'agenda', title: 'Agenda', count: Fo.model.sub, open: true, html: mergedAgendaHtml(Fo.model) } : { id: 'agenda', title: 'Agenda', count: P.agendaSub, open: true, html: agendaHtml(P) },
|
|
445
449
|
P.matters.length ? { id: 'matters', title: 'What matters today', count: P.matters.length, html: tagRows(P.matters) } : null,
|
|
446
450
|
{ id: 'ready', title: 'To be ready', count: P.ready.filter((r) => !r.ok).length || '', html: readyHtml(P) },
|
|
447
451
|
mat, lastT,
|
|
@@ -453,7 +457,7 @@ export function sectionsOf(m, ui = {}) {
|
|
|
453
457
|
{ id: 'caught', title: 'Caught so far', count: L.caught === 'nothing yet' ? '' : L.caught.replace(/, /g, ' · '), html: caughtHtml(m) },
|
|
454
458
|
mat,
|
|
455
459
|
L.hl.length ? { id: 'hl', title: 'Highlights', count: L.hl.length, html: hlHtml(L) } : null,
|
|
456
|
-
{ id: 'agenda', title: 'Agenda', count: L.nowSub, html: liveAgendaHtml(m
|
|
460
|
+
{ id: 'agenda', title: 'Agenda', count: Fo.model ? Fo.model.sub : L.nowSub, html: liveAgendaHtml(m) },
|
|
457
461
|
{ id: 'tr', title: 'Transcript', count: L.total ? 'live · ' + plural(L.total, 'line') : '', html: transcriptHtml(m, ui, N.lines, false) },
|
|
458
462
|
];
|
|
459
463
|
}
|
|
@@ -576,6 +580,7 @@ export async function openMeeting(ref, o = {}) {
|
|
|
576
580
|
me.vid = id;
|
|
577
581
|
vOpen({ id, kind: 'Meeting', title: R.title || 'Meeting', icon: CLOCK_ICON, url: meetingUrl({ ...R, ws: me.ws }), render: draw0, onClose: () => closed(me) });
|
|
578
582
|
widen('mtg');
|
|
583
|
+
agendaCss();
|
|
579
584
|
await load(me);
|
|
580
585
|
if (MT !== me) return;
|
|
581
586
|
if (o.about) await openAbout(me);
|
|
@@ -777,6 +782,11 @@ function tick(me) {
|
|
|
777
782
|
|
|
778
783
|
/* the presses */
|
|
779
784
|
async function press(me, e) {
|
|
785
|
+
if (e.target.closest('[data-ag]')) { // Undo the merge, Not this one (pm/agenda-live.js)
|
|
786
|
+
const r = await agendaPress(e.target, me.model && me.model.focus.model, { ws: me.ws });
|
|
787
|
+
if (r) { say(me, r.ok ? r.said : 'Not changed: ' + r.error, r.ok ? '' : 'bad'); return load(me, true); }
|
|
788
|
+
return;
|
|
789
|
+
}
|
|
780
790
|
const pa = e.target.closest('[data-czs-act]'); // the summary's one primary
|
|
781
791
|
const t = pa || e.target.closest('[data-a]');
|
|
782
792
|
if (me.ui.wpop && !e.target.closest('.vzr-wpop')) { me.ui.wpop = null; repaint(me); if (!t || t.dataset.a === 'psel') return; } // a press outside the word fix closes it
|
|
@@ -784,7 +794,7 @@ async function press(me, e) {
|
|
|
784
794
|
if (!t) { if (me.ui.pop && !e.target.closest('.vzm-pop')) { me.ui.pop = ''; repaint(me); } return; }
|
|
785
795
|
if (t.disabled) return;
|
|
786
796
|
const a = pa ? pa.dataset.czsAct : t.dataset.a, ui = me.ui, m = me.model, C = rec();
|
|
787
|
-
if (ui.pop && !t.closest('.vzm-pop') && !['addmat', 'm-about'
|
|
797
|
+
if (ui.pop && !t.closest('.vzm-pop') && !['addmat', 'm-about'].includes(a)) ui.pop = '';
|
|
788
798
|
switch (a) {
|
|
789
799
|
case 'popx': ui.pop = ''; return repaint(me);
|
|
790
800
|
case 'askno': ui.ask = null; return repaint(me);
|
|
@@ -823,8 +833,6 @@ async function press(me, e) {
|
|
|
823
833
|
case 'present': return presentIt(me, +t.dataset.i);
|
|
824
834
|
case 'addmat': if (ui.pop === 'mat') { ui.pop = ''; return repaint(me); } return openMat(me);
|
|
825
835
|
case 'matadd': { const P = me.mat; const it = P && (P.q ? P.found : P.sug)[+t.dataset.i]; if (it) return addMat(me, it.url && !it.ref ? { url: it.url, title: it.title } : { kind: it.kind, ref: it.ref, title: it.title, ...(it.ws ? { ws: it.ws } : {}) }); return; }
|
|
826
|
-
case 'topic': ui.pop = ui.pop === 'topic' ? '' : 'topic'; return repaint(me);
|
|
827
|
-
case 'topicgo': return changeTopic(me, m.focus.topics[+t.dataset.i]);
|
|
828
836
|
case 'maketask': return makeTask(me, +t.dataset.i);
|
|
829
837
|
case 'makewi': return makeWorkItem(me, +t.dataset.i);
|
|
830
838
|
case 'madeundo': { const md = ui.made[+t.dataset.i]; delete ui.made[+t.dataset.i]; repaint(me); if (md && md.undo) await md.undo(); return; }
|
|
@@ -1099,15 +1107,6 @@ async function setMin(me, i, v) {
|
|
|
1099
1107
|
if (!r || !r.ok) say(me, 'The minutes were not saved: ' + ((r && r.error) || 'no answer'), 'bad');
|
|
1100
1108
|
return load(me, true);
|
|
1101
1109
|
}
|
|
1102
|
-
/** Change topic (Focus): the topic now, for this meeting (POST /api/meeting-focus/topic). */
|
|
1103
|
-
async function changeTopic(me, tp) {
|
|
1104
|
-
me.ui.pop = '';
|
|
1105
|
-
const ev = me.row ? me.row.id : me.n && me.n.meeting && me.n.meeting.event_id;
|
|
1106
|
-
if (!tp || !ev) { say(me, 'The topic can be changed on a calendar meeting only.', 'bad'); return; }
|
|
1107
|
-
const r = await pmPost('/api/meeting-focus/topic', { event: ev, date: me.fq ? me.fq.date : '', action: 'set', topic: tp.text });
|
|
1108
|
-
say(me, r && r.ok ? 'The topic now is “' + clip(tp.text, 60) + '”.' : 'Not changed: ' + ((r && r.error) || 'no answer'), r && r.ok ? '' : 'bad');
|
|
1109
|
-
return load(me, true);
|
|
1110
|
-
}
|
|
1111
1110
|
/** Make task: the step goes into the first stage of the note's initiative (POST /api/plan-items); the made line has Undo, which withdraws it. */
|
|
1112
1111
|
async function makeTask(me, i, quiet) {
|
|
1113
1112
|
const S = me.D.S, step = S && S.actions[i]; if (!step) return { ok: false };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "Batch 30 item 3, initiative live-agenda-topics: a meeting's agenda as 3 to 5 topics. The merge (rules and the AI answer) on the 26-line sample and real invite shapes, Undo, lines added in the meeting, the one live model, the routes, and the html the Viewer's Agenda and the recording tab's To cover both draw (lib/agenda-topics.js, public/pm/agenda-live.js).",
|
|
3
|
+
"modules": [
|
|
4
|
+
"agenda-topics.test.js"
|
|
5
|
+
],
|
|
6
|
+
"seconds": { "agenda-topics.test.js": 2 }
|
|
7
|
+
}
|