create-pmos 0.760.0 → 0.762.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 +39 -33
- 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/changelog.json +38 -0
- package/workspace/guide/cli.md +7 -1
- package/workspace/guide/home.md +1 -1
- package/workspace/guide/notes.md +15 -0
- package/workspace/lib/actor.js +8 -3
- package/workspace/lib/contradictions.js +137 -0
- package/workspace/lib/jira-cli.js +7 -2
- package/workspace/lib/jira-tiers.js +75 -10
- package/workspace/lib/meeting-focus.js +14 -1
- package/workspace/lib/open-questions.js +23 -5
- package/workspace/lib/outcome-judge.js +1 -1
- package/workspace/lib/outcome-props.js +51 -5
- package/workspace/lib/outcomes-cli.js +49 -3
- package/workspace/lib/plan-baseline.js +106 -0
- package/workspace/lib/proposal-runs.js +1 -1
- package/workspace/lib/proposals.js +1 -1
- package/workspace/lib/propose-cli.js +16 -7
- package/workspace/lib/routes-drift.js +30 -0
- package/workspace/lib/routes-meeting-focus.js +6 -1
- package/workspace/lib/routes-open-questions.js +9 -2
- package/workspace/lib/tracker-digest.js +23 -3
- package/workspace/lib/week-moves.js +8 -2
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/premium-rec-tab-test.js +2 -1
- package/workspace/public/pm/buddy-core.js +162 -0
- package/workspace/public/pm/buddy-float.js +63 -0
- package/workspace/public/pm/cozy-buddy.css +26 -0
- package/workspace/public/pm/cozy-buddy.js +59 -7
- package/workspace/public/pm/cozy-rec-tab.js +10 -2
- package/workspace/public/pm/moves-view.js +11 -1
- package/workspace/public/pm/open-questions-view.js +1 -0
- package/workspace/public/premium-buddy.html +4 -0
- package/workspace/skills/initiative-propose.skill +2 -2
- package/workspace/skills/jira-sync.skill +1 -1
- package/workspace/test-lists/outcome-checks-finish.json +9 -0
- package/workspace/test-lists/slip-baseline-contradictions.json +9 -0
- package/workspace/test-lists/tracker-digest.json +7 -3
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmos-workspace",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.762.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pmos-workspace",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.762.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@anthropic-ai/sdk": "^1.3.0",
|
package/workspace/package.json
CHANGED
|
@@ -86,7 +86,8 @@ async function context(o = {}) {
|
|
|
86
86
|
ok('T1 in the room (no screen) the tab is the light page: no dark stage, no picture', await until(() => tab.evaluate(() => document.getElementById('rt').dataset.mode === 'room' && !document.querySelector('.rt-scr'))), await tab.evaluate(() => document.getElementById('rt').dataset.mode));
|
|
87
87
|
ok('T1 the header is the clock and the title; the browser tab says the clock', await until(() => tab.evaluate(() => /^\d+:\d{2}$/.test(document.getElementById('rtClock').textContent) && document.getElementById('rtTitle').textContent === 'Design crit' && /^\d+:\d{2} · Design crit$/.test(document.title))));
|
|
88
88
|
const bar = await tab.evaluate(() => [...document.querySelectorAll('#rtBar > .rt-b')].map((b) => [b.getAttribute('aria-label'), b.textContent.trim()]));
|
|
89
|
-
|
|
89
|
+
// meeting-float: Float PMOS over the call sits before Stop where the browser can float a page (Document Picture-in-Picture)
|
|
90
|
+
ok('T1 the bar is icon only: Highlight, Pause, Float where the browser can, then the red Stop (no screenshots toggle in the room)', JSON.stringify(bar.map((x) => x[0]).filter((l) => l !== 'Float PMOS over the call')) === JSON.stringify(['Highlight the last 30 seconds', 'Pause', 'Stop the recording']) && bar.every((x) => x[1] === ''), JSON.stringify(bar));
|
|
90
91
|
ok('T1 the slots for the Now panel and Present are in the bar', await tab.evaluate(() => !!document.querySelector('#rtBar [data-slot="now"]') && !!document.querySelector('#rtBar [data-slot="present"]')));
|
|
91
92
|
ok('T1 links in the recording tab open in the other PMOS tab', await tab.evaluate(() => document.querySelector('base').target === 'pmos-main') && await p.evaluate(() => window.name === 'pmos-main'));
|
|
92
93
|
|
|
@@ -164,3 +164,165 @@ export function heardHtml(m) {
|
|
|
164
164
|
const h = consentHtml(m) + nudgeHtml(m) + filedHtml(m) + draftsHtml(m);
|
|
165
165
|
return h ? `<div class="mb-card">${h}</div>` : '';
|
|
166
166
|
}
|
|
167
|
+
|
|
168
|
+
/* ── the float (initiative meeting-float; Exploring 3, page "Meeting companion floats over the call") ─────────────────────────────────────
|
|
169
|
+
* walkInModel(F, { now }) → { title, at, startsIn, rows } | null the walk-in card: 2 min before the start until PMOS listens
|
|
170
|
+
* walkInHtml(w) → string
|
|
171
|
+
* openModel(F, m) → { forTopic, people, filed } the wide view (the open size)
|
|
172
|
+
* openHtml(m, o) → string two columns: Now and For this topic · People, Filed, drafts
|
|
173
|
+
* roomModel(F, m) → { asked, table, agreed } room view: what the user shares on screen in the call
|
|
174
|
+
* roomHtml(m, r) → string no private row and no press: no drafts, consent, Undo, own asks, People */
|
|
175
|
+
export const WALK_BEFORE_MIN = 2, WALK_AFTER_MIN = 10;
|
|
176
|
+
const MINE = /^(me|i|you|myself|pm)$/i;
|
|
177
|
+
const OPEN_MAX = 6, ROOM_ASKED_MAX = 4;
|
|
178
|
+
const dayOf = (iso) => { const t = Date.parse(iso || ''); if (!Number.isFinite(t)) return ''; const d = new Date(t); return d.getDate() + ' ' + ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'][d.getMonth()]; };
|
|
179
|
+
const tokens = (s) => String(s == null ? '' : s).toLowerCase().split(/[^\p{L}\p{N}]+/u).filter(Boolean);
|
|
180
|
+
/** Which attendee an owner names: the attendee's full name, or a first name both share. null when none. */
|
|
181
|
+
export function attendeeOf(owner, attendees) {
|
|
182
|
+
const o = tokens(owner); if (!o.length) return null;
|
|
183
|
+
for (const a of attendees || []) {
|
|
184
|
+
const t = tokens(a); if (!t.length) continue;
|
|
185
|
+
if (t.join(' ') === o.join(' ') || t[0] === o[0]) return String(a);
|
|
186
|
+
}
|
|
187
|
+
return null;
|
|
188
|
+
}
|
|
189
|
+
const iniHref = (ini) => (ini && ini.id ? '/premium.html?ini=' + encodeURIComponent(ini.id) : null);
|
|
190
|
+
const goalText = (g) => (g && g.title ? clip(g.title, 90) : '');
|
|
191
|
+
/** What each side owes, from the last meeting's actions and the user's own late items. */
|
|
192
|
+
function owesOf(f) {
|
|
193
|
+
const b = f.brief || {}; const att = (f.event && f.event.attendees) || [];
|
|
194
|
+
const theirs = [], mine = [];
|
|
195
|
+
for (const a of (b.last && Array.isArray(b.last.actions) ? b.last.actions : [])) {
|
|
196
|
+
if (!a || !a.text) continue;
|
|
197
|
+
const text = clip(a.text, 140) + (a.due ? ', due ' + (dayOf(a.due) || a.due) : '');
|
|
198
|
+
if (a.owner && MINE.test(String(a.owner).trim())) mine.push({ who: '', text });
|
|
199
|
+
else { const who = attendeeOf(a.owner, att); if (who) theirs.push({ who, text }); }
|
|
200
|
+
}
|
|
201
|
+
for (const x of Array.isArray(b.matters) ? b.matters : []) if (x && /^yours\b/.test(String(x.meta || '')) && x.text) mine.push({ who: '', text: clip(x.text, 140) });
|
|
202
|
+
return { theirs, mine };
|
|
203
|
+
}
|
|
204
|
+
/** The one thing to settle: a blocked item, then a late one, then decisions from last time still to confirm. */
|
|
205
|
+
function settleOf(b) {
|
|
206
|
+
const M = Array.isArray(b.matters) ? b.matters : [];
|
|
207
|
+
const blocked = M.find((x) => x && x.tag === 'Blocked'); if (blocked) return clip(blocked.text, 160);
|
|
208
|
+
const late = M.find((x) => x && x.tag === 'Late'); if (late) return clip(late.text, 140) + ': late';
|
|
209
|
+
const n = b.last && b.last.to_confirm; if (n > 0) return n + (n === 1 ? ' decision' : ' decisions') + ' from last time to confirm';
|
|
210
|
+
return '';
|
|
211
|
+
}
|
|
212
|
+
function iniRow(b) {
|
|
213
|
+
const ini = b.initiative; if (!ini || !ini.title) return null;
|
|
214
|
+
const blocked = (Array.isArray(b.matters) ? b.matters : []).filter((x) => x && x.tag === 'Blocked').length;
|
|
215
|
+
return { label: 'Work', text: clip(ini.title, 100) + (ini.status ? ' · ' + ini.status : ''), tag: blocked ? blocked + ' blocked' : '', sub: goalText(ini.goal) ? 'Goal: ' + goalText(ini.goal) : '', href: iniHref(ini) };
|
|
216
|
+
}
|
|
217
|
+
function goalRow(b) {
|
|
218
|
+
const g = b.initiative && b.initiative.goal; if (!g || !g.title) return null;
|
|
219
|
+
return { label: 'Goal', text: goalText(g), sub: g.kind === 'health' ? 'Health budget' : g.kind === 'objective' ? 'Objective' : 'Key result' };
|
|
220
|
+
}
|
|
221
|
+
function lastDecisionRow(b) {
|
|
222
|
+
const d = b.last && Array.isArray(b.last.decisions) ? b.last.decisions[0] : null; if (!d) return null;
|
|
223
|
+
const on = dayOf(b.last.at);
|
|
224
|
+
return { label: 'Decided before' + (on ? ' · ' + on : ''), text: clip(d, 160), sub: b.last.title ? 'From the notes of ' + clip(b.last.title, 60) : '' };
|
|
225
|
+
}
|
|
226
|
+
function docRows(f) {
|
|
227
|
+
const out = []; const seen = new Set();
|
|
228
|
+
const call = f.event && f.event.call ? f.event.call.url : '';
|
|
229
|
+
for (const m of Array.isArray(f.material) ? f.material : []) {
|
|
230
|
+
const title = m && (m.title || m.url || m.ref); if (!title) continue;
|
|
231
|
+
const url = m.url && /^https:\/\//i.test(m.url) ? m.url : null;
|
|
232
|
+
const k = url || title; if (seen.has(k)) continue; seen.add(k);
|
|
233
|
+
out.push({ label: 'Document', text: clip(title, 100), sub: 'Linked to the meeting', href: url });
|
|
234
|
+
}
|
|
235
|
+
for (const l of f.event && Array.isArray(f.event.links) ? f.event.links : []) {
|
|
236
|
+
if (!l || !l.url || l.url === call || seen.has(l.url) || !/^https:\/\//i.test(l.url)) continue;
|
|
237
|
+
seen.add(l.url); out.push({ label: 'Document', text: clip(l.label || l.url, 100), sub: 'In the invite', href: l.url });
|
|
238
|
+
}
|
|
239
|
+
return out.slice(0, 3);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
export function walkInModel(F, { now = Date.now() } = {}) {
|
|
243
|
+
const f = F && F.ok ? F : {};
|
|
244
|
+
const ev = f.event; if (!ev || f.talk) return null;
|
|
245
|
+
const st = f.note ? f.note.state : null;
|
|
246
|
+
if (st === 'recording' || st === 'paused' || st === 'ended') return null;
|
|
247
|
+
const start = Date.parse(ev.at || ''); if (!Number.isFinite(start)) return null;
|
|
248
|
+
if (now < start - WALK_BEFORE_MIN * 60000 || now >= start + WALK_AFTER_MIN * 60000) return null;
|
|
249
|
+
const b = f.brief || {};
|
|
250
|
+
const rows = [];
|
|
251
|
+
if (b.initiative && b.initiative.title) rows.push({ label: 'For', text: clip(b.initiative.title, 100) + (goalText(b.initiative.goal) ? ' · ' + goalText(b.initiative.goal) : ''), href: iniHref(b.initiative) });
|
|
252
|
+
const o = owesOf(f);
|
|
253
|
+
for (const x of o.theirs.slice(0, 2)) rows.push({ label: 'Owed to you', who: x.who.split(/\s+/)[0], text: x.text });
|
|
254
|
+
for (const x of o.mine.slice(0, 2)) rows.push({ label: 'You owe', text: x.text });
|
|
255
|
+
const d = lastDecisionRow(b); if (d) rows.push({ label: d.label.replace('Decided before', 'Last decision'), text: d.text });
|
|
256
|
+
const s = settleOf(b); if (s) rows.push({ label: 'Settle today', text: s, settle: true });
|
|
257
|
+
if (!rows.length) return null;
|
|
258
|
+
return { title: clip(ev.title, 120), at: hm(start), startsIn: Math.round((start - now) / 60000), rows };
|
|
259
|
+
}
|
|
260
|
+
export function walkInHtml(w) {
|
|
261
|
+
if (!w) return '';
|
|
262
|
+
const when = w.startsIn > 0 ? 'Starts in ' + w.startsIn + ' min · ' + w.at : w.startsIn === 0 ? 'Starts now · ' + w.at : 'Started ' + -w.startsIn + ' min ago · ' + w.at;
|
|
263
|
+
return `<section class="mb-walk" aria-label="Before the meeting"><div class="mb-wh"><small>${esc(when)}</small><b>${esc(w.title)}</b></div>`
|
|
264
|
+
+ w.rows.map((r) => `<div class="mb-r${r.settle ? ' mb-settle' : ''}"><span class="t"><small>${esc(r.label)}</small>${r.who ? '<b>' + esc(r.who) + '</b> · ' : ''}${esc(r.text)}</span>`
|
|
265
|
+
+ (r.href ? `<a class="mb-ib pm-btn" href="${esc(r.href)}" target="_blank" rel="noopener noreferrer" aria-label="Open it" title="Open it">${svg(P.open)}</a>` : r.settle ? `<span class="mb-spark">${svg(P.spark, 14)}</span>` : '') + '</div>').join('')
|
|
266
|
+
+ '</section>';
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
export function openModel(F, m) {
|
|
270
|
+
const f = F && F.ok ? F : {}; const b = f.brief || {};
|
|
271
|
+
const forTopic = [];
|
|
272
|
+
const notes = Array.isArray(f.notes) ? f.notes : [];
|
|
273
|
+
for (const n of notes.slice().reverse()) {
|
|
274
|
+
if (forTopic.length >= 3 || !n || n.ask || !['Context', 'Fact check', 'Decision', 'Follow-up'].includes(n.cat)) continue;
|
|
275
|
+
const act = (n.acts || []).find((a) => hrefOf(a));
|
|
276
|
+
forTopic.push({ label: n.cat === 'Context' ? 'Context' : n.cat, text: clip(n.body, 200), sub: n.src ? clip(n.src, 80) : '', href: act ? hrefOf(act) : null });
|
|
277
|
+
}
|
|
278
|
+
for (const c of Array.isArray(f.chips) ? f.chips : []) {
|
|
279
|
+
if (forTopic.length >= 4) break;
|
|
280
|
+
const href = hrefOf(c); if (!href) continue;
|
|
281
|
+
forTopic.push({ label: 'Context', text: clip(c.label + (c.sub ? ' · ' + c.sub : ''), 160), sub: '', href });
|
|
282
|
+
}
|
|
283
|
+
for (const r of [iniRow(b), lastDecisionRow(b), ...docRows(f)]) if (r && forTopic.length < OPEN_MAX + 2) forTopic.push(r);
|
|
284
|
+
const o = owesOf(f);
|
|
285
|
+
const people = ((f.event && f.event.attendees) || []).slice(0, 8).map((name) => {
|
|
286
|
+
const theirs = o.theirs.filter((x) => x.who === name).map((x) => 'Owes you ' + x.text);
|
|
287
|
+
return { name: clip(name, 60), initials: tokens(name).slice(0, 2).map((t) => t[0].toUpperCase()).join(''), sub: theirs[0] || '' };
|
|
288
|
+
});
|
|
289
|
+
const cap = f.captured || {};
|
|
290
|
+
const filed = [];
|
|
291
|
+
for (const [kind, key] of [['decision', 'decisions'], ['action', 'actions'], ['question', 'questions']]) {
|
|
292
|
+
for (const x of Array.isArray(cap[key]) ? cap[key] : []) if (x && x.bid && x.text) filed.push({ kind, label: 'Filed · ' + KIND_WORD[kind], text: clip(x.text, 200), bid: String(x.bid) });
|
|
293
|
+
}
|
|
294
|
+
filed.sort((a, b2) => a.bid.localeCompare(b2.bid, 'en', { numeric: true }));
|
|
295
|
+
return { forTopic, people, filed, youOwe: o.mine.slice(0, 3) };
|
|
296
|
+
}
|
|
297
|
+
const listRow = (r) => `<div class="mb-r"><span class="t"><small>${esc(r.label)}</small>${esc(r.text)}${r.tag ? ` <span class="mb-tag">${esc(r.tag)}</span>` : ''}${r.sub ? `<span class="mb-src">${esc(r.sub)}</span>` : ''}</span>`
|
|
298
|
+
+ (r.href ? `<a class="mb-ib pm-btn" href="${esc(r.href)}" target="_blank" rel="noopener noreferrer" aria-label="Open it" title="Open it">${svg(P.open)}</a>` : '') + '</div>';
|
|
299
|
+
const sec = (t, n) => `<div class="mb-sec">${esc(t)}${n != null ? ` <span>${esc(n)}</span>` : ''}</div>`;
|
|
300
|
+
export function openHtml(m, o) {
|
|
301
|
+
const left = topicHtml(m) + nowHtml(m) + nudgeHtml(m) + consentHtml(m)
|
|
302
|
+
+ (o.forTopic.length ? `<div class="mb-sec"><span class="mb-spark">${svg(P.spark, 12)}</span>For this topic</div>` + o.forTopic.map(listRow).join('') : '') + answerHtml(m);
|
|
303
|
+
const people = o.people.length ? sec('People', o.people.length + ' in the invite') + o.people.map((p) => `<div class="mb-r mb-person"><span class="mb-av" aria-hidden="true">${esc(p.initials)}</span><span class="t">${esc(p.name)}${p.sub ? `<span class="mb-src">${esc(p.sub)}</span>` : ''}</span></div>`).join('') : '';
|
|
304
|
+
const owe = o.youOwe.length ? sec('You owe') + o.youOwe.map((x) => `<div class="mb-r"><span class="t">${esc(x.text)}</span></div>`).join('') : '';
|
|
305
|
+
const filed = o.filed.length ? sec('Filed', o.filed.length) + o.filed.map((x) => row(x.label, esc(x.text), ib('undo', 'Undo: take it out of the notes', P.undo, ` data-bid="${esc(x.bid)}"`))).join('') : '';
|
|
306
|
+
const right = people + owe + filed + draftsHtml(m);
|
|
307
|
+
return `<div class="mb-wide"><div class="mb-col">${left}</div>${right ? `<div class="mb-col">${right}</div>` : ''}</div>`;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
export function roomModel(F, m) {
|
|
311
|
+
const f = F && F.ok ? F : {}; const b = f.brief || {};
|
|
312
|
+
const notes = Array.isArray(f.notes) ? f.notes : [];
|
|
313
|
+
const asked = notes.filter((n) => n && !n.ask && n.heard && (n.cat === 'Answer' || n.cat === 'Fact check')).slice(-ROOM_ASKED_MAX)
|
|
314
|
+
.map((n) => ({ heard: clip(n.heard, 200), body: clip(n.body, 400), src: n.from && n.from.length ? 'From ' + n.from.map((k) => FROM_WORDS[k]).filter(Boolean).join(' and ') : n.src ? clip(n.src, 80) : '' }));
|
|
315
|
+
const table = [goalRow(b), iniRow(b), ...docRows(f)].filter(Boolean).map((r) => ({ ...r, href: null, sub: r.label === 'Work' ? '' : r.sub }));
|
|
316
|
+
const cap = f.captured || {};
|
|
317
|
+
const agreed = [...(cap.decisions || []).map((x) => ({ label: 'Decision', text: x && x.text })), ...(cap.actions || []).map((x) => ({ label: 'Action', text: x && x.text }))]
|
|
318
|
+
.filter((x) => x.text).slice(-6).map((x) => ({ label: x.label, text: clip(x.text, 200) }));
|
|
319
|
+
return { asked, table, agreed };
|
|
320
|
+
}
|
|
321
|
+
export function roomHtml(m, r) {
|
|
322
|
+
const asked = r.asked.map((a) => `<div class="mb-r mb-heard"><span class="t"><small>Asked in the room</small>${esc(a.heard)}</span></div>`
|
|
323
|
+
+ `<div class="mb-r"><span class="t"><small>PMOS</small>${esc(a.body)}${a.src ? `<span class="mb-src">${esc(a.src)}</span>` : ''}</span><span class="mb-spark">${svg(P.spark, 14)}</span></div>`).join('');
|
|
324
|
+
const left = topicHtml(m) + nowHtml(m) + (asked || '<div class="mb-r mb-quiet"><span class="t mb-sm">Ask PMOS out loud: a number, a date, what was decided. The answer shows here.</span></div>');
|
|
325
|
+
const right = (r.table.length ? `<div class="mb-sec"><span class="mb-spark">${svg(P.spark, 12)}</span>On the table</div>` + r.table.map(listRow).join('') : '')
|
|
326
|
+
+ (r.agreed.length ? sec('Agreed so far') + r.agreed.map((x) => row(x.label, esc(x.text))).join('') : '');
|
|
327
|
+
return `<div class="mb-wide mb-room"><div class="mb-col">${left}</div>${right ? `<div class="mb-col">${right}</div>` : ''}</div>`;
|
|
328
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/* pm/buddy-float.js — the meeting buddy as a window that stays on top of the call app (initiative meeting-float; Exploring 3, page
|
|
2
|
+
* "Meeting companion floats over the call", boards Float starts here, Three sizes).
|
|
3
|
+
*
|
|
4
|
+
* Chrome's Document Picture-in-Picture: a small window the operating system keeps above every other window, Zoom and Teams desktop
|
|
5
|
+
* included. No install and no permission. The window frames the buddy page (/premium-buddy.html?float=1…), so every press is the
|
|
6
|
+
* buddy's own. The page that opens it must stay open (the recording tab, which never navigates away while it records).
|
|
7
|
+
*
|
|
8
|
+
* SIZES · sizeOf(name) → { w, h } pill 300 × 72, card 360 × 480, open 780 × 720; anything else is the card
|
|
9
|
+
* floatUrl({ event, date, note, ws }) → the framed page's address
|
|
10
|
+
* floatable(win) → bool the browser can float a page (Chrome or Edge on a computer)
|
|
11
|
+
* openFloat({ url, size, win }) → Promise<Window | null> opens it, or brings an open one forward; null when it cannot
|
|
12
|
+
* The framed page asks for another size with postMessage({ pmosFloat: 'size', size }); the window remembers the last size in this browser.
|
|
13
|
+
* Every open is one use-log line (control meetFloatOpen): local only, the health number of meeting-float. */
|
|
14
|
+
export const SIZES = Object.freeze({ pill: Object.freeze({ w: 300, h: 72 }), card: Object.freeze({ w: 360, h: 480 }), open: Object.freeze({ w: 780, h: 720 }) });
|
|
15
|
+
export const sizeOf = (name) => SIZES[Object.prototype.hasOwnProperty.call(SIZES, name) ? name : 'card'];
|
|
16
|
+
const KEY = 'pmos.float.size';
|
|
17
|
+
export function floatUrl({ event = '', date = '', note = '', ws = '' } = {}) {
|
|
18
|
+
const q = new URLSearchParams({ float: '1' });
|
|
19
|
+
if (event) q.set('event', event);
|
|
20
|
+
if (date) q.set('date', date);
|
|
21
|
+
if (note) q.set('note', note);
|
|
22
|
+
if (ws) q.set('ws', ws);
|
|
23
|
+
return '/premium-buddy.html?' + q.toString();
|
|
24
|
+
}
|
|
25
|
+
export function floatable(win = typeof window !== 'undefined' ? window : null) {
|
|
26
|
+
if (!win || !win.documentPictureInPicture || typeof win.documentPictureInPicture.requestWindow !== 'function') return false;
|
|
27
|
+
try { if (typeof win.matchMedia === 'function' && win.matchMedia('(max-width: 760px)').matches) return false; } catch { /* no media query: a computer */ }
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
const lastSize = (win) => { try { const s = win.localStorage.getItem(KEY); return SIZES[s] ? s : 'card'; } catch { return 'card'; } };
|
|
31
|
+
const keepSize = (win, s) => { try { win.localStorage.setItem(KEY, s); } catch { /* a blocked store: the next float opens as a card */ } };
|
|
32
|
+
|
|
33
|
+
export async function openFloat({ url, size, win = window } = {}) {
|
|
34
|
+
if (!floatable(win)) return null;
|
|
35
|
+
const D = win.documentPictureInPicture;
|
|
36
|
+
if (D.window && !D.window.closed) {
|
|
37
|
+
const fr = D.window.document.querySelector('iframe');
|
|
38
|
+
if (fr && url && fr.dataset.src !== url) { fr.src = url; fr.dataset.src = url; }
|
|
39
|
+
try { D.window.focus(); } catch { /* the system keeps the focus */ }
|
|
40
|
+
return D.window;
|
|
41
|
+
}
|
|
42
|
+
const name = size || lastSize(win);
|
|
43
|
+
const s = sizeOf(name);
|
|
44
|
+
let pip = null;
|
|
45
|
+
try { pip = await D.requestWindow({ width: s.w, height: s.h }); } catch { return null; }
|
|
46
|
+
const doc = pip.document;
|
|
47
|
+
doc.title = 'PMOS';
|
|
48
|
+
const st = doc.createElement('style');
|
|
49
|
+
st.textContent = 'html,body{margin:0;height:100%;overflow:hidden}iframe{border:0;width:100%;height:100%;display:block}';
|
|
50
|
+
doc.head.appendChild(st);
|
|
51
|
+
const fr = doc.createElement('iframe');
|
|
52
|
+
fr.title = 'PMOS'; fr.src = url; fr.dataset.src = url; fr.allow = 'clipboard-write';
|
|
53
|
+
doc.body.appendChild(fr);
|
|
54
|
+
pip.addEventListener('message', (e) => {
|
|
55
|
+
const d = e && e.data;
|
|
56
|
+
if (!d || d.pmosFloat !== 'size' || !SIZES[d.size] || e.source !== fr.contentWindow) return;
|
|
57
|
+
const z = sizeOf(d.size);
|
|
58
|
+
try { pip.resizeTo(z.w, z.h); } catch { /* the window keeps its size; the page still lays out for the new one */ }
|
|
59
|
+
keepSize(win, d.size);
|
|
60
|
+
});
|
|
61
|
+
try { const U = await import('./use-log.js'); if (U && typeof U.noteUse === 'function') U.noteUse('meetFloatOpen'); } catch { /* the log is optional */ }
|
|
62
|
+
return pip;
|
|
63
|
+
}
|
|
@@ -49,3 +49,29 @@ body.pm-ds.mb-page { margin: 0; height: 100vh; overflow: hidden; background: var
|
|
|
49
49
|
.mb-card { border-radius: var(--radius-card); background: var(--card); border: 1px solid var(--line); box-shadow: var(--raise); overflow: hidden; }
|
|
50
50
|
.mb-card > :last-child { border-bottom: 0; }
|
|
51
51
|
.mb-clip { position: fixed; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; }
|
|
52
|
+
|
|
53
|
+
/* the float (initiative meeting-float): the same page in a window on top of the call app. pill · card · open; room view to share */
|
|
54
|
+
.mb-fl[hidden] { display: none; }
|
|
55
|
+
.mb-fl.on { color: var(--blue); }
|
|
56
|
+
body.mb-pill .mb-b, body.mb-pill .mb-msg, body.mb-pill .mb-ask { display: none; }
|
|
57
|
+
body.mb-pill .mb-h { border-bottom: 0; }
|
|
58
|
+
.mb-wide { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
|
|
59
|
+
.mb-wide > .mb-col + .mb-col { border-left: 1px solid var(--line); }
|
|
60
|
+
.mb-col > :last-child { border-bottom: 0; }
|
|
61
|
+
.mb-sec { display: flex; align-items: center; gap: 6px; padding: 10px 14px 2px; font-size: var(--fs-meta); font-weight: var(--fw-strong); color: var(--muted); }
|
|
62
|
+
.mb-sec span { font-weight: var(--fw-regular); }
|
|
63
|
+
.mb-sec .mb-spark { padding-top: 0; }
|
|
64
|
+
.mb-tag { display: inline-block; padding: 0 6px; border-radius: var(--radius-sm); background: var(--alert-tint); color: var(--alert); font-size: var(--fs-meta); }
|
|
65
|
+
.mb-person { align-items: center; }
|
|
66
|
+
.mb-av { width: 28px; height: 28px; border-radius: var(--radius-pill); background: var(--well); color: var(--muted); font-size: var(--fs-meta); font-weight: var(--fw-strong); display: inline-flex; align-items: center; justify-content: center; flex: none; }
|
|
67
|
+
.mb-heard { background: var(--leaf-tint); }
|
|
68
|
+
.mb-room .mb-r { font-size: var(--fs-body); }
|
|
69
|
+
.mb-quiet { border-bottom: 0; }
|
|
70
|
+
/* the walk-in card: 2 minutes before the meeting */
|
|
71
|
+
.mb-walk { border-bottom: 1px solid var(--line); }
|
|
72
|
+
.mb-wh { padding: 12px 14px 4px; }
|
|
73
|
+
.mb-wh small { display: block; font-size: var(--fs-meta); color: var(--muted); }
|
|
74
|
+
.mb-wh b { font-size: var(--fs-body); }
|
|
75
|
+
.mb-walk .mb-r:last-child { border-bottom: 0; }
|
|
76
|
+
.mb-settle { background: var(--blue-tint); }
|
|
77
|
+
@media (max-width: 560px) { .mb-wide { grid-template-columns: minmax(0, 1fr); } .mb-wide > .mb-col + .mb-col { border-left: 0; border-top: 1px solid var(--line); } }
|
|
@@ -11,9 +11,17 @@
|
|
|
11
11
|
* Writes, each on a press: POST /api/notes/bullet (Undo: drop the filed bullet; Undo again: take it back), POST /api/meeting-focus/raise
|
|
12
12
|
* (a chat draft copied or put away), POST /api/meeting-focus/ask (a question). Copy puts a line on the clipboard; nothing here posts to the
|
|
13
13
|
* call or its chat. The consent line's copy and the nudge's dismiss are kept in this browser only (buddy-core.js marksOf, per meeting).
|
|
14
|
-
* Fold sends { pmosFocus: 'fold' | 'open' } to the panel, which shrinks to a pill.
|
|
14
|
+
* Fold sends { pmosFocus: 'fold' | 'open' } to the panel, which shrinks to a pill.
|
|
15
|
+
*
|
|
16
|
+
* The float (initiative meeting-float, ?float=1): the page in a window on top of the call app (pm/buddy-float.js frames it). Fold makes a
|
|
17
|
+
* pill, Open wide shows two columns (For this topic · People, Filed), Room view is what the user shares on screen: answers to what the
|
|
18
|
+
* room asked, what is on the table and what was agreed, with no private row. Each size change asks the window for its size
|
|
19
|
+
* ({ pmosFloat: 'size', size }). From 2 minutes before the meeting until PMOS listens, the walk-in card leads the page (buddy-core.js
|
|
20
|
+
* walkInModel); a pill opens to a card for it once per meeting. A float that named no meeting finds the next one when this one is over.
|
|
21
|
+
* Opened in a tab of its own (not framed), the page offers the Float icon itself. */
|
|
15
22
|
import { pmGet, pmPost } from './http.js';
|
|
16
|
-
import { buddyModel, buddyHtml, headOf, marksOf } from './buddy-core.js';
|
|
23
|
+
import { buddyModel, buddyHtml, headOf, marksOf, walkInModel, walkInHtml, openModel, openHtml, roomModel, roomHtml } from './buddy-core.js';
|
|
24
|
+
import { floatable, openFloat, floatUrl, SIZES } from './buddy-float.js';
|
|
17
25
|
import { press, newMem, mergeMarks } from './buddy-press.js';
|
|
18
26
|
import { recCore } from './premium-meeting.js';
|
|
19
27
|
|
|
@@ -21,7 +29,10 @@ const q = new URLSearchParams(location.search);
|
|
|
21
29
|
const $ = (id) => document.getElementById(id);
|
|
22
30
|
const esc = (v) => String(v == null ? '' : v).replace(/[&<>"']/g, (c) => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' })[c]);
|
|
23
31
|
const READ_MS = 10000, ASK_MS = 3000;
|
|
24
|
-
const S = { ev: null, date: '', F: null, html: '', folded: false, timer: null, busy: false };
|
|
32
|
+
const S = { ev: null, date: '', F: null, html: '', folded: false, timer: null, busy: false, size: 'card', room: false, popped: new Set() };
|
|
33
|
+
const FLOAT = q.get('float') === '1';
|
|
34
|
+
const FRAMED = window.parent !== window;
|
|
35
|
+
const useLog = (c) => { import('./use-log.js').then((U) => { if (U.startUseLog) U.startUseLog(); if (U.noteUse) U.noteUse(c); }).catch(() => {}); }; // meeting-float's health number, local only
|
|
25
36
|
|
|
26
37
|
const ls = () => { try { return window.localStorage; } catch { return null; } };
|
|
27
38
|
const MEM = newMem(); // the PM's marks when the store is blocked: this view only
|
|
@@ -33,22 +44,29 @@ function draw() {
|
|
|
33
44
|
const m = buddyModel(S.F, L);
|
|
34
45
|
const h = headOf(m);
|
|
35
46
|
$('mbDot').className = 'mb-dot ' + h.tone;
|
|
36
|
-
$('mbHead').textContent =
|
|
37
|
-
|
|
47
|
+
$('mbHead').textContent = !S.ev ? 'Looking for the meeting' : FLOAT && S.room ? (m.listening ? 'Room view · listening to the room' : 'Room view') : h.text;
|
|
48
|
+
const w = walkInModel(S.F, { now: Date.now() });
|
|
49
|
+
// the walk-in card opens a pill once per meeting (meeting-float, board Walk-in card)
|
|
50
|
+
if (w && FLOAT && S.size === 'pill' && m.eventId && !S.popped.has(m.eventId)) { S.popped.add(m.eventId); setSize('card'); }
|
|
51
|
+
let body = FLOAT && S.room ? roomHtml(m, roomModel(S.F, m)) : FLOAT && S.size === 'open' ? openHtml(m, openModel(S.F, m)) : buddyHtml(m);
|
|
38
52
|
if (!m.listening && !m.paused && S.ev) {
|
|
39
53
|
body = `<div class="mb-r mb-start"><span class="t"><small>${esc(m.title)}</small>PMOS is not listening to this meeting.</span>`
|
|
40
54
|
+ `<button type="button" class="mb-ib pm-btn go primary" data-mb="listen" aria-label="Start listening in PMOS" title="Start listening in PMOS"><svg aria-hidden="true" width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="M8 5v14l11-7z"/></svg></button></div>` + body;
|
|
41
55
|
}
|
|
56
|
+
if (w && !(FLOAT && S.room)) body = walkInHtml(w) + body; // the walk-in card leads, above the play icon
|
|
42
57
|
if (body !== S.html) { S.html = body; $('mbBody').innerHTML = body; }
|
|
43
|
-
$('mbAsk').hidden = !S.ev || S.folded;
|
|
58
|
+
$('mbAsk').hidden = !S.ev || S.folded || (FLOAT && S.room);
|
|
44
59
|
const working = m.answer && m.answer.state === 'working';
|
|
45
60
|
clearTimeout(S.timer); S.timer = setTimeout(read, working ? ASK_MS : READ_MS);
|
|
46
61
|
}
|
|
47
62
|
|
|
48
63
|
async function read() {
|
|
49
64
|
if (!S.ev) return;
|
|
50
|
-
const F = await pmGet('/api/meeting-focus?event=' + encodeURIComponent(S.ev.id) + '&date=' + encodeURIComponent(S.date));
|
|
65
|
+
const F = await pmGet('/api/meeting-focus?event=' + encodeURIComponent(S.ev.id) + '&date=' + encodeURIComponent(S.date) + (q.get('ws') ? '&ws=' + encodeURIComponent(q.get('ws')) : ''));
|
|
51
66
|
if (F && F.ok) { S.F = F; say(''); } else if (!S.F) say((F && F.error) || 'PMOS did not answer.');
|
|
67
|
+
// a float that named no meeting moves on to the next one 10 minutes after this one ends
|
|
68
|
+
const end = F && F.ok && F.event ? Date.parse(F.event.end || '') : NaN;
|
|
69
|
+
if (FLOAT && !q.get('event') && Number.isFinite(end) && Date.now() > end + 600000 && !(F.note && F.note.state === 'recording')) { S.ev = null; S.F = null; S.html = ''; return find(); }
|
|
52
70
|
draw();
|
|
53
71
|
}
|
|
54
72
|
|
|
@@ -82,6 +100,7 @@ document.addEventListener('click', async (e) => {
|
|
|
82
100
|
const b = e.target.closest('[data-mb]'); if (!b || b.disabled) return;
|
|
83
101
|
const act = b.dataset.mb;
|
|
84
102
|
if (act === 'pick') { const c = S.choices[+b.dataset.i]; if (c) { S.ev = c; S.date = String(c.at || '').slice(0, 10); read(); } return; }
|
|
103
|
+
if (FLOAT) useLog('meetFloatAct');
|
|
85
104
|
if (act === 'listen') { b.disabled = true; try { await listen(); } finally { b.disabled = false; } return; }
|
|
86
105
|
b.disabled = true;
|
|
87
106
|
let r = null;
|
|
@@ -104,7 +123,40 @@ $('mbAsk').addEventListener('submit', async (e) => {
|
|
|
104
123
|
read();
|
|
105
124
|
});
|
|
106
125
|
|
|
126
|
+
/* the float's sizes (meeting-float): the window takes the size; the page lays out for it */
|
|
127
|
+
function setSize(size) {
|
|
128
|
+
if (!SIZES[size]) return;
|
|
129
|
+
S.size = size; S.folded = size === 'pill';
|
|
130
|
+
document.body.classList.toggle('mb-pill', size === 'pill'); document.body.classList.toggle('mb-open', size === 'open');
|
|
131
|
+
const g = $('mbGrow'); const wide = size === 'open';
|
|
132
|
+
g.setAttribute('aria-label', wide ? 'Back to a card' : 'Open wide'); g.title = g.getAttribute('aria-label');
|
|
133
|
+
g.innerHTML = g.innerHTML.replace(/d="[^"]*"/, wide ? 'd="M10 4v6H4M14 20v-6h6M4 10l6-6M20 14l-6 6"' : 'd="M4 14v6h6M20 10V4h-6M4 20l7-7M20 4l-7 7"');
|
|
134
|
+
const f = $('mbFold'); f.setAttribute('aria-expanded', String(size !== 'pill'));
|
|
135
|
+
f.setAttribute('aria-label', size === 'pill' ? 'Open PMOS' : 'Fold to a pill'); f.title = f.getAttribute('aria-label');
|
|
136
|
+
if (FRAMED) window.parent.postMessage({ pmosFloat: 'size', size }, location.origin);
|
|
137
|
+
S.html = ''; draw();
|
|
138
|
+
}
|
|
139
|
+
if (FLOAT) {
|
|
140
|
+
document.body.classList.add('mb-float');
|
|
141
|
+
$('mbGrow').hidden = false; $('mbRoom').hidden = false;
|
|
142
|
+
let s0 = 'card'; try { const s = localStorage.getItem('pmos.float.size'); if (SIZES[s]) s0 = s; } catch { /* a card */ }
|
|
143
|
+
if (s0 !== 'card') setSize(s0);
|
|
144
|
+
useLog('meetFloatShown');
|
|
145
|
+
$('mbGrow').addEventListener('click', () => setSize(S.size === 'open' ? 'card' : 'open'));
|
|
146
|
+
$('mbRoom').addEventListener('click', () => {
|
|
147
|
+
S.room = !S.room; const r = $('mbRoom'); r.classList.toggle('on', S.room); r.setAttribute('aria-pressed', String(S.room));
|
|
148
|
+
r.setAttribute('aria-label', S.room ? 'Back to your own view' : 'Room view: share this window in the call'); r.title = r.getAttribute('aria-label');
|
|
149
|
+
document.body.classList.toggle('mb-roomview', S.room);
|
|
150
|
+
if (S.room && S.size !== 'open') setSize('open'); else { S.html = ''; draw(); }
|
|
151
|
+
});
|
|
152
|
+
} else if (!FRAMED && floatable()) {
|
|
153
|
+
// a buddy tab of its own: it can float itself (it stays open, so the float lives as long as this tab)
|
|
154
|
+
$('mbFloat').hidden = false;
|
|
155
|
+
$('mbFloat').addEventListener('click', () => { openFloat({ url: floatUrl({ event: S.ev ? S.ev.id : '', date: S.date }) }); });
|
|
156
|
+
}
|
|
157
|
+
|
|
107
158
|
$('mbFold').addEventListener('click', () => {
|
|
159
|
+
if (FLOAT) { setSize(S.size === 'pill' ? 'card' : 'pill'); return; }
|
|
108
160
|
S.folded = !S.folded;
|
|
109
161
|
document.body.classList.toggle('folded', S.folded);
|
|
110
162
|
const b = $('mbFold'); b.setAttribute('aria-expanded', String(!S.folded));
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
* (microphone only) there is no dark stage: the light page, which slice S2 (cozy-rec-now.js) fills. Paused and not yet
|
|
12
12
|
* started each say so, with the one press that goes on.
|
|
13
13
|
* line the meeting so far, with a mark for each highlight; hover or focus a mark for the moment: its time, the line, the shot.
|
|
14
|
-
* bar icon only: Highlight, Pause or Resume, Pause the screenshots (only with a screen),
|
|
14
|
+
* bar icon only: Highlight, Pause or Resume, Pause the screenshots (only with a screen), Float PMOS over the call (meeting-float:
|
|
15
|
+
* the meeting buddy in a window on top of the call app, where the browser can), the slots, and the red Stop.
|
|
15
16
|
* alert amber "Not hearing the meeting" with Share again, when the microphone is heard and the meeting is not.
|
|
16
17
|
* ask Stop asks first. Record on the next meeting, pressed on another page, asks here once: "Stop X and record Y?".
|
|
17
18
|
* Stop ends the meeting, and the tab then shows its notes (the Viewer, /premium-viewer.html?open=meeting).
|
|
@@ -31,6 +32,7 @@ import { recCore, STOP_LINE } from './premium-meeting.js';
|
|
|
31
32
|
import { post, listen, tabUrl, clockOf, modeOf, endOf, marksOf } from './rec-tab-core.js';
|
|
32
33
|
import { adler } from './cozy-adler.js';
|
|
33
34
|
import { recall, remember } from './listen-sources.js';
|
|
35
|
+
import { floatable, openFloat, floatUrl } from './buddy-float.js';
|
|
34
36
|
|
|
35
37
|
const q = new URLSearchParams(location.search);
|
|
36
38
|
const ID = q.get('note') || '', WS = q.get('ws') || '';
|
|
@@ -44,7 +46,7 @@ const wall = (ms) => { const d = new Date(ms); return pad(d.getHours()) + ':' +
|
|
|
44
46
|
const P = { star: '<path d="M12 3.8l2.5 5.2 5.7.8-4.1 4 1 5.7L12 16.8l-5.1 2.7 1-5.7-4.1-4 5.7-.8z"/>', pause: '<path d="M9 6v12M15 6v12"/>', play: '<path d="M8 5v14l11-7z"/>',
|
|
45
47
|
stop: '<rect x="7" y="7" width="10" height="10" rx="2"/>', eyeoff: '<path d="M3 3l18 18M10.6 6.1A9.8 9.8 0 0 1 12 6c5 0 9 6 9 6a15 15 0 0 1-3 3.5M6.6 6.7C4.3 8.2 3 12 3 12s4 6 9 6a8.6 8.6 0 0 0 4.3-1.1M9.9 9.9a3 3 0 0 0 4.2 4.2"/>',
|
|
46
48
|
eye: '<path d="M3 12s4-6 9-6 9 6 9 6-4 6-9 6-9-6-9-6z"/><circle cx="12" cy="12" r="3"/>', share: '<rect x="3" y="4" width="18" height="12" rx="2"/><path d="M12 13V7M9 10l3-3 3 3M8 20h8"/>',
|
|
47
|
-
rec: '<circle cx="12" cy="12" r="6"/>' };
|
|
49
|
+
rec: '<circle cx="12" cy="12" r="6"/>', float: '<rect x="4" y="5" width="16" height="11" rx="1.5"/><rect x="12" y="11" width="6" height="5" rx="1"/>' };
|
|
48
50
|
const svg = (k, w = 18) => `<svg aria-hidden="true" width="${w}" height="${w}" viewBox="0 0 24 24">${P[k]}</svg>`;
|
|
49
51
|
const btn = (a, label, icon, cls = '') => `<button type="button" class="rt-b${cls ? ' ' + cls : ''}" data-a="${a}" aria-label="${esc(label)}" title="${esc(label)}">${svg(icon, a === 'stop' ? 20 : 18)}</button>`;
|
|
50
52
|
|
|
@@ -93,6 +95,7 @@ function drawBar() {
|
|
|
93
95
|
const parts = [];
|
|
94
96
|
if (live) parts.push(btn('hl', 'Highlight the last 30 seconds', 'star'), btn('pause', 'Pause', 'pause'));
|
|
95
97
|
else if (S.mode === 'paused') parts.push(btn('resume', 'Resume', 'play', 'dark'));
|
|
98
|
+
if ((live || S.mode === 'paused') && floatable()) parts.push(btn('float', 'Float PMOS over the call', 'float'));
|
|
96
99
|
if (S.mode === 'screen') parts.push(scr.paused ? btn('shots', 'Keep screenshots again', 'eye', 'on') : btn('shots', 'Pause the screenshots (the sound goes on)', 'eyeoff'));
|
|
97
100
|
bar.innerHTML = parts.join('');
|
|
98
101
|
for (const k of ['now', 'present']) { const s = keep[k] || Object.assign(document.createElement('span'), { className: 'rt-slot' }); s.dataset.slot = k; bar.appendChild(s); }
|
|
@@ -203,6 +206,11 @@ async function act(a, t) {
|
|
|
203
206
|
case 'resume': case 'start': return run(async () => { const r = await C.resume(ID); S.msg = r.ok ? '' : r.error; });
|
|
204
207
|
case 'share': return run(async () => { await C.pause(); const r = await C.resume(ID); S.msg = r.ok ? '' : r.error; });
|
|
205
208
|
case 'shots': { C.shots(!C.screen().paused); return draw(); }
|
|
209
|
+
case 'float': { // meeting-float: requestWindow needs this press, so nothing is awaited before it
|
|
210
|
+
const e = eventOf();
|
|
211
|
+
openFloat({ url: floatUrl({ event: e && e.id ? e.id : '', date: e ? e.date : '', ws: WS }) }).then((w) => { if (!w) { S.msg = 'This browser cannot float PMOS. Use Chrome or Edge on a computer.'; draw(); } });
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
206
214
|
case 'stop': S.ask = { kind: 'stop' }; return drawAsk();
|
|
207
215
|
case 'askno': S.ask = null; drawAsk(); return draw();
|
|
208
216
|
case 'stopgo': S.ask = null; drawAsk(); return run(async () => { const r = await C.stop(ID); S.msg = r.ok ? '' : r.error; if (r.ok) post({ id: ID, state: 'ended', title: title(), elapsedMs: elapsed(), silent: false }); });
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* rowOf(lists, { looked }) → the Your move row ({ key, go, title, sub }) or null: null in a quiet week (zero is silence) and once the
|
|
5
5
|
* PM opened this week's list. lists: each product's GET /api/drift/moves answer.
|
|
6
|
+
* behindWords(row) → "40 days behind the first plan (due 5 Nov)" on a date row behind its baseline, else ''
|
|
6
7
|
* listHtml(lists, { esc }) → the list, one section per product, the moves with no source first; each says its source, or
|
|
7
8
|
* "No source · ask <owner>"
|
|
8
9
|
* openMoves(lists, H) the list in the Viewer. H: { toast }
|
|
@@ -32,10 +33,19 @@ export function rowOf(lists, { looked = '' } = {}) {
|
|
|
32
33
|
sub: unsourced ? unsourced + ' with no source. See who to ask.' : 'Each one has a source.' };
|
|
33
34
|
}
|
|
34
35
|
|
|
36
|
+
const MON = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
|
37
|
+
const dayWords = (s) => { const m = /^(\d{4})-(\d{2})-(\d{2})/.exec(String(s || '')); return m ? +m[3] + ' ' + MON[+m[2] - 1] + (+m[1] !== new Date().getFullYear() ? ' ' + m[1] : '') : ''; };
|
|
38
|
+
/** How far a moved date is from the task's first plan (initiative slip-baseline-contradictions), or '' when it is not behind. */
|
|
39
|
+
export function behindWords(m) {
|
|
40
|
+
if (!m || m.kind !== 'date' || !(Number(m.behind) > 0) || !m.baseline) return '';
|
|
41
|
+
return plural(Number(m.behind), 'day', 'days') + ' behind the first plan (due ' + dayWords(m.baseline) + ')';
|
|
42
|
+
}
|
|
43
|
+
|
|
35
44
|
function moveHtml(m, esc) {
|
|
36
45
|
const what = m.n > 1 ? m.titles.join(', ') + (m.n > m.titles.length ? ', …' : '') : m.title;
|
|
37
46
|
const src = m.sourced ? esc(m.source) : `<strong>No source</strong> · ${m.toPm ? 'yours to check' : 'ask ' + esc(m.owner)}`;
|
|
38
|
-
|
|
47
|
+
const behind = behindWords(m);
|
|
48
|
+
return `<li class="mv-row${m.sourced ? '' : ' mv-flag'}"><span class="mv-say">${esc(m.say)}</span> · ${esc(what)}${behind ? ' · ' + esc(behind) : ''}`
|
|
39
49
|
+ `<br><span class="yd-exp">${esc(m.iniTitle)} · ${src}${m.by && m.by !== 'you' && m.sourced ? ' · by ' + esc(m.by) : ''}</span></li>`;
|
|
40
50
|
}
|
|
41
51
|
|
|
@@ -36,6 +36,7 @@ function kindWords(l) {
|
|
|
36
36
|
if (k.change) out.push(k.change === 1 ? 'PMOS holds a change with no source' : 'PMOS holds ' + k.change + ' changes with no source');
|
|
37
37
|
if (k.ask) out.push(k.ask === 1 ? 'a sign-off or a ticket question' : k.ask + ' sign-offs or ticket questions');
|
|
38
38
|
if (k.draft) out.push(k.draft === 1 ? 'PMOS drafted it' : 'PMOS drafted them');
|
|
39
|
+
if (k.record) out.push('the records disagree');
|
|
39
40
|
return out.join(', ');
|
|
40
41
|
}
|
|
41
42
|
const underOf = (l) => (l.default && l.default.say ? l.default.say : 'No default: ' + String(l.waits || 'it waits for an answer.').replace(/^./, (c) => c.toLowerCase()));
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
<title>PMOS · Meeting buddy</title>
|
|
9
9
|
<!-- The meeting buddy (initiative meeting-buddy; Exploring 2, "Meeting buddy and one-press start", boards 1, 2 and 4). The PMOS extension frames
|
|
10
10
|
it over a Google Meet call: /premium-buddy.html?meet=<abc-defg-hij>&mtitle=<tab title>. It can also name its meeting: ?event=<id>&date=YYYY-MM-DD.
|
|
11
|
+
?float=1: the same page in a window on top of the call app (initiative meeting-float, pm/buddy-float.js): Fold, Open wide and Room view.
|
|
11
12
|
Only the PM sees it. Its links open in a new tab, so the call never navigates away. pm/cozy-buddy.js draws it. It is on the PMOS design system (design-system-meeting-pages): pm-ds, the Summary block
|
|
12
13
|
in a single column, pm-btn buttons and a pm-input ask line. -->
|
|
13
14
|
<base target="_blank" />
|
|
@@ -22,6 +23,9 @@
|
|
|
22
23
|
<body class="cz pm-ds mb-page">
|
|
23
24
|
<main class="mb" id="mb">
|
|
24
25
|
<header class="mb-h"><i class="mb-dot" id="mbDot" aria-hidden="true"></i><b>PMOS</b><span class="mb-sm" id="mbHead">Looking for the meeting</span>
|
|
26
|
+
<button type="button" class="mb-ib pm-btn mb-fl" id="mbRoom" hidden aria-pressed="false" aria-label="Room view: share this window in the call" title="Room view: share this window in the call"><svg class="pm-ic" aria-hidden="true" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M3 12s4-6 9-6 9 6 9 6-4 6-9 6-9-6-9-6zM12 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6"/></svg></button>
|
|
27
|
+
<button type="button" class="mb-ib pm-btn mb-fl" id="mbGrow" hidden aria-label="Open wide" title="Open wide"><svg class="pm-ic" aria-hidden="true" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M4 14v6h6M20 10V4h-6M4 20l7-7M20 4l-7 7"/></svg></button>
|
|
28
|
+
<button type="button" class="mb-ib pm-btn mb-fl" id="mbFloat" hidden aria-label="Float PMOS over the call" title="Float PMOS over the call"><svg class="pm-ic" aria-hidden="true" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M4 5h16v11H4zM12 11h6v5h-6z"/></svg></button>
|
|
25
29
|
<button type="button" class="mb-ib pm-btn" id="mbFold" aria-expanded="true" aria-label="Fold PMOS" title="Fold PMOS"><svg class="pm-ic" aria-hidden="true" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M6 9l6 6 6-6"/></svg></button></header>
|
|
26
30
|
<section class="mb-b" id="mbBody" aria-live="polite"></section>
|
|
27
31
|
<p class="mb-msg" id="mbMsg" role="status" hidden></p>
|
|
@@ -41,8 +41,8 @@ Procedure when the run is `check` (the morning check: tasks are late or at risk)
|
|
|
41
41
|
|
|
42
42
|
Procedure when the run is `outcome` (the check date of its expected outcome has passed, and its goal's own reading did not decide it):
|
|
43
43
|
1. Read the lines below: the expected outcome, the check date, the anchor, the record and why the reading did not decide it. Read the record, its PRD and done test if it names them, and the product's own ledgers and files the outcome is about (for example a ledger that should keep filling, a bench that should have run, a feedback ledger with or without a repeat complaint). Read the stored reads first (`pmos source show <source>`).
|
|
44
|
-
2. Decide only from what you read: `worked` when the evidence shows the expected outcome happened, `didnt-work` when it shows it did not. "Nobody complained" is not evidence it worked. When you cannot tell, file `
|
|
45
|
-
3. File once with `pmos propose verdict --json -`: `{ "disposition": "worked" | "didnt-work" | "cant-tell", "evidence": "<one line: what you found, with the number>", "claims": [{ "text": "<one fact>", "sources": [{ "label": "<what it is>", "ref": "<path:line, from the repository root>", "quote": "<the text on that line, at least 12 characters>" }] }] }`. Each quote is checked against its line; a claim that does not match is refused, and so is the verdict.
|
|
44
|
+
2. Decide only from what you read: `worked` when the evidence shows the expected outcome happened, `didnt-work` when it shows it did not. "Nobody complained" is not evidence it worked. When you cannot tell, file `cant-tell` with evidence that says what you read and what was missing (for example "Read IDPF-3113 and IDPF-3115 (both Done) and 4 docs; no number for sign-in errors after 10 Aug"). PMOS records it with Undo, and that is the right answer: it is never a guess.
|
|
45
|
+
3. File once with `pmos propose verdict --json -`: `{ "disposition": "worked" | "didnt-work" | "cant-tell", "evidence": "<one line: what you found, with the number>", "claims": [{ "text": "<one fact>", "sources": [{ "label": "<what it is>", "ref": "<path:line, from the repository root>", "quote": "<the text on that line, at least 12 characters>" }] }] }`. Each quote is checked against its line; a claim that does not match is refused, and so is the verdict. Claims are optional for `cant-tell`. When `worked` or `didnt-work` is refused because the evidence is only in a connector (not on a line in the repository), file `cant-tell` and name that evidence: do not end the run with nothing filed.
|
|
46
46
|
4. Do not record the check yourself: the server records your verdict with Undo.
|
|
47
47
|
|
|
48
48
|
Output contract: produce EXACTLY these sections in your final message:
|
|
@@ -23,7 +23,7 @@ Rules that always hold:
|
|
|
23
23
|
|
|
24
24
|
Procedure:
|
|
25
25
|
0. Ask what changed first, when the task names no initiative. Run `pmos jira query --changed`. It prints the searches of this refresh. Each search covers every ticket PMOS tracks, in every tier, so a backlog ticket pulled into the sprint or a done ticket reopened is seen now.
|
|
26
|
-
- Each `search` line is one Jira search for the tracked tickets that changed since the last check. Run each one with the fields of step 2, at most 50 issues per page, and fetch every page. Save the pages in the scratch folder as in step 3, or give the saved files as they are. Then run `pmos jira sync --changed --from <page 1>,<page 2>,…` once, with the pages of every search. If no search returned an issue, write `{"issues": []}` to a scratch file and give that file. It patches the returned tickets into each initiative. A ticket that was not returned keeps its reading.
|
|
26
|
+
- Each `search` line is one Jira search for the tracked tickets that changed since the last check. Run each one with the fields of step 2, at most 50 issues per page, and fetch every page. Save the pages in the scratch folder as in step 3, or give the saved files as they are. Then run `pmos jira sync --changed --from <page 1>,<page 2>,…` once, with the pages of every search. If no search returned an issue, write `{"issues": []}` to a scratch file and give that file. It patches the returned tickets into each initiative. A ticket that was not returned keeps its reading. The search after the `standup` line asks for every status change in the projects PMOS reads, also for tickets no initiative names. Run it like the others and give its pages in the same `--from`. `pmos` keeps those moves for the standup digest.
|
|
27
27
|
- Each `full` line is an initiative due a full read (a new link, or the weekly full read): the initiative id, a tab, the search. Do steps 2 to 4 for that initiative with that search.
|
|
28
28
|
- If there was no `full` line and `pmos jira sync --changed` printed "no tracked ticket changed", run `pmos refresh same jira`, finish with "Checked: no change in Jira since the last check", and stop.
|
|
29
29
|
- Otherwise skip step 1 and go to step 4a.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "Outcome checks finish by themselves (initiative outcome-checks-finish, done test F1-F6): the auto apply's actor writes records, can't tell is a verdict, a silent run still ends in one, and pmos outcomes rate. No connector, model or network.",
|
|
3
|
+
"modules": [
|
|
4
|
+
"outcome-checks-finish.test.js"
|
|
5
|
+
],
|
|
6
|
+
"seconds": {
|
|
7
|
+
"outcome-checks-finish.test.js": 3
|
|
8
|
+
}
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "Every slip against a baseline, and records that disagree (initiative slip-baseline-contradictions, done test B1-B4, C1-C5): pure checks, ledger files in a scratch folder and the drift routes in process. No connector, model or network.",
|
|
3
|
+
"modules": [
|
|
4
|
+
"plan-truth.test.js"
|
|
5
|
+
],
|
|
6
|
+
"seconds": {
|
|
7
|
+
"plan-truth.test.js": 5
|
|
8
|
+
}
|
|
9
|
+
}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
"_comment": "daily-digest-from-tracker: the status moves each Jira read keeps (lib/jira-status.js
|
|
3
|
-
"modules": [
|
|
4
|
-
|
|
2
|
+
"_comment": "daily-digest-from-tracker: the status moves each Jira read keeps (lib/jira-status.js \u2192 <state>/tracker/jira/_moves.jsonl) and the standup digest folded from them and the stored reads (lib/tracker-digest.js, `pmos jira digest`), on a synthetic repository with no network. Also standup-from-one-read (SU1 to SU9): the daily read's standup search (lib/jira-tiers.js) keeps the status moves of tickets no initiative holds.",
|
|
3
|
+
"modules": [
|
|
4
|
+
"tracker-digest.test.js"
|
|
5
|
+
],
|
|
6
|
+
"seconds": {
|
|
7
|
+
"tracker-digest.test.js": 3
|
|
8
|
+
}
|
|
5
9
|
}
|