create-pmos 0.616.0 → 0.618.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 +51 -45
- 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-initiative-test.js +2 -1
- package/workspace/changelog.json +92 -1941
- package/workspace/extension/README.md +13 -1
- package/workspace/extension/panel.js +7 -5
- package/workspace/guide/layout.md +9 -4
- package/workspace/guide/notes.md +17 -3
- package/workspace/lib/board-premium.js +1 -0
- package/workspace/lib/board-trail.js +3 -1
- package/workspace/lib/core-docs.js +1 -1
- package/workspace/lib/engine/boards.js +2 -2
- package/workspace/lib/meeting-focus.js +40 -8
- package/workspace/lib/okr-goals.js +2 -1
- package/workspace/lib/routes-boards.js +20 -4
- package/workspace/lib/routes-brief-page.js +6 -2
- package/workspace/lib/routes-meeting-focus.js +3 -1
- package/workspace/lib/status-when.js +15 -2
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/premium-board-actions-test.js +1 -0
- package/workspace/public/pm/bd-work.css +5 -4
- package/workspace/public/pm/buddy-core.js +166 -0
- package/workspace/public/pm/buddy-press.js +66 -0
- package/workspace/public/pm/cozy-buddy.css +52 -0
- package/workspace/public/pm/cozy-buddy.js +115 -0
- package/workspace/public/pm/cozy-day-pick.css +9 -8
- package/workspace/public/pm/cozy-home.css +54 -2
- package/workspace/public/pm/cozy-pop-work.css +29 -0
- package/workspace/public/pm/cozy-pop-work.js +151 -13
- package/workspace/public/pm/cozy-popup.css +6 -1
- package/workspace/public/pm/cozy-popup.js +26 -7
- package/workspace/public/pm/cozy-rec-now.js +35 -4
- package/workspace/public/pm/cozy-rec-tab.js +5 -1
- package/workspace/public/pm/cozy-status-when.js +17 -2
- package/workspace/public/pm/cozy-task-pop.css +34 -0
- package/workspace/public/pm/cozy-task-pop.js +199 -0
- package/workspace/public/pm/cozy-today-app.js +13 -1
- package/workspace/public/pm/cozy-today-model.js +5 -2
- package/workspace/public/pm/cozy-today-page.css +6 -0
- package/workspace/public/pm/cozy-today-view.js +7 -3
- package/workspace/public/pm/home-app.js +8 -2
- package/workspace/public/pm/home-chat.js +13 -7
- package/workspace/public/pm/home-data.js +31 -1
- package/workspace/public/pm/home-ini.js +7 -1
- package/workspace/public/pm/page-chat.js +1 -1
- package/workspace/public/pm/premium-board.js +18 -4
- package/workspace/public/pm/premium-meeting.js +2 -2
- package/workspace/public/pm/rec-tab-core.js +5 -2
- package/workspace/public/premium-buddy.html +27 -0
- package/workspace/server.js +1 -1
- package/workspace/test-lists/chat-turns.json +9 -0
- package/workspace/test-lists/meeting-buddy.json +9 -0
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/* pm/buddy-core.js — the meeting buddy, the pure half (initiative meeting-buddy; Exploring 2, page "Meeting buddy and one-press start",
|
|
2
|
+
* boards 1 · Where the buddy lives, 2 · What the buddy does, 4 · Consent).
|
|
3
|
+
*
|
|
4
|
+
* The buddy is PMOS in the meeting, seen only by the PM. It is quiet by default: it files what it hears (each with Undo), pulls up
|
|
5
|
+
* context when a topic comes up, answers a question the PM types, nudges once on time, and drafts a line for the call chat. It never
|
|
6
|
+
* speaks or posts to the room: every line for the room is a draft the PM copies and posts.
|
|
7
|
+
*
|
|
8
|
+
* buddyModel(F, o) → Model F = GET /api/meeting-focus's answer. o: { now?, toldAt?, nudgeOff? (Set of nudge keys), consentOff? }
|
|
9
|
+
* filedHtml(m) · nudgeHtml(m) · contextHtml(m) · draftsHtml(m) · consentHtml(m) · answerHtml(m) → string the parts, each '' at zero
|
|
10
|
+
* buddyHtml(m) → string the Meet panel's body: the topic, Now, the nudge, the consent line, Filed, Context, drafts, the answer
|
|
11
|
+
* headOf(m) → { text, tone } the panel's header line: "Listening · Topic 2 of 4", "Paused", "Not listening"; tone ok | warn | off
|
|
12
|
+
* CONSENT_LINE the line the PM may paste in the call chat to tell the room PMOS listens
|
|
13
|
+
* buddyKey(F) · marksOf(storage, F) · markIn(storage, F, patch) the PM's own marks on a meeting, kept in this browser
|
|
14
|
+
* heardHtml(m) → string the recording tab's card: the consent line, the nudge, Filed and the chat drafts
|
|
15
|
+
*
|
|
16
|
+
* Every press carries data-mb="…": undo (data-bid), redo (data-bid), nudge-x (data-key), copy (data-id: a chat draft, or "consent"),
|
|
17
|
+
* chat-x (data-id), consent-x. The page that mounts the buddy (cozy-buddy.js, cozy-rec-now.js) does the writing.
|
|
18
|
+
* The words name PMOS only. Text from records goes through esc(). Node imports this file (meeting-buddy.test.js). */
|
|
19
|
+
|
|
20
|
+
export const CONSENT_LINE = 'I am taking notes on this call with PMOS, an assistant that listens. Tell me if you would rather it did not.';
|
|
21
|
+
export const NUDGE_MIN = 10; // the nudge shows when this many minutes or fewer are left
|
|
22
|
+
const FILED_MAX = 4, CONTEXT_MAX = 2;
|
|
23
|
+
|
|
24
|
+
const esc = (v) => String(v == null ? '' : v).replace(/[&<>"']/g, (c) => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' })[c]);
|
|
25
|
+
const clip = (s, n) => { const t = String(s == null ? '' : s).replace(/\s+/g, ' ').trim(); return t.length > n ? t.slice(0, n - 1).trimEnd() + '…' : t; };
|
|
26
|
+
const pad = (n) => String(n).padStart(2, '0');
|
|
27
|
+
const hm = (ms) => { const d = new Date(ms); return pad(d.getHours()) + ':' + pad(d.getMinutes()); };
|
|
28
|
+
const P = {
|
|
29
|
+
undo: 'M9 7L4 12l5 5M4 12h10a6 6 0 0 1 0 12', x: 'M6 6l12 12M18 6L6 18', open: 'M14 4h6v6M20 4l-9 9M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5',
|
|
30
|
+
copy: 'M8 8h12v12H8zM16 8V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h2', spark: 'M12 3l1.9 5.1L19 10l-5.1 1.9L12 17l-1.9-5.1L5 10l5.1-1.9z',
|
|
31
|
+
};
|
|
32
|
+
const svg = (d, n = 16) => `<svg aria-hidden="true" width="${n}" height="${n}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="${d}"/></svg>`;
|
|
33
|
+
const ib = (act, label, d, attrs = '', cls = '') => `<button type="button" class="mb-ib${cls ? ' ' + cls : ''}" data-mb="${act}"${attrs} aria-label="${esc(label)}" title="${esc(label)}">${svg(d)}</button>`;
|
|
34
|
+
const KIND_WORD = { decision: 'decision', action: 'action', question: 'open question' };
|
|
35
|
+
const FROM_WORDS = { talk: 'the talk', screen: 'the screen', prep: 'the prep', last: 'last time' };
|
|
36
|
+
|
|
37
|
+
/** Where this browser keeps the PM's own marks on one meeting (the consent line copied, the nudges dismissed): one key per meeting and day. */
|
|
38
|
+
export const buddyKey = (F) => 'pmos.buddy.' + (F && F.event ? F.event.id + '|' + (F.date || String(F.event.at || '').slice(0, 10)) : '');
|
|
39
|
+
/** The PM's marks read from a Storage, wrapped: a blocked store gives none. → { toldAt, consentOff, nudgeOff: Set } */
|
|
40
|
+
export function marksOf(storage, F) {
|
|
41
|
+
let o = null; try { o = JSON.parse((storage && storage.getItem(buddyKey(F))) || 'null'); } catch { o = null; }
|
|
42
|
+
o = o && typeof o === 'object' ? o : {};
|
|
43
|
+
return { toldAt: Number.isFinite(o.toldAt) ? o.toldAt : null, consentOff: !!o.consentOff, nudgeOff: new Set(Array.isArray(o.nudgeOff) ? o.nudgeOff : []) };
|
|
44
|
+
}
|
|
45
|
+
/** Add to the marks; false when the store is blocked (the mark then lasts until the page reloads). */
|
|
46
|
+
export function markIn(storage, F, patch) {
|
|
47
|
+
try {
|
|
48
|
+
const k = buddyKey(F); const was = JSON.parse(storage.getItem(k) || 'null') || {};
|
|
49
|
+
const next = { ...was, ...patch };
|
|
50
|
+
if (patch.nudge) { next.nudgeOff = [...new Set([...(was.nudgeOff || []), patch.nudge])].slice(-20); delete next.nudge; }
|
|
51
|
+
storage.setItem(k, JSON.stringify(next)); return true;
|
|
52
|
+
} catch { return false; }
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/** Where a Context row opens: an initiative in Home, or an https link. null when it names nothing PMOS can open. */
|
|
56
|
+
export function hrefOf(x) {
|
|
57
|
+
if (!x) return null;
|
|
58
|
+
if (x.ref && x.ref.type === 'initiative' && x.ref.id) return '/premium.html?ini=' + encodeURIComponent(x.ref.id);
|
|
59
|
+
if (typeof x.url === 'string' && /^https:\/\//i.test(x.url)) return x.url;
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/** The nudge: once per topic, when NUDGE_MIN minutes or fewer are left and a topic the room has not reached is still to cover. */
|
|
64
|
+
export function nudgeOf(agenda, { off } = {}) {
|
|
65
|
+
const A = agenda || null;
|
|
66
|
+
if (!A || !Array.isArray(A.topics) || A.left == null || !(A.left > 0) || A.left > NUDGE_MIN) return null;
|
|
67
|
+
const open = A.topics.filter((t) => t && !t.now && t.mark === 'notyet');
|
|
68
|
+
if (!open.length) return null;
|
|
69
|
+
const key = 'nudge:' + String(open[0].title || '').toLowerCase().replace(/\s+/g, ' ').trim();
|
|
70
|
+
if (off && typeof off.has === 'function' && off.has(key)) return null;
|
|
71
|
+
const what = clip(open[0].title, 60) + (open.length > 1 ? ' and ' + (open.length - 1) + ' more are' : ' is');
|
|
72
|
+
return { key, text: A.left + ' min left. ' + what + ' not covered yet.' };
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/** The buddy's whole state, from the meeting focus read. Nothing is invented: a part with nothing behind it is empty. */
|
|
76
|
+
export function buddyModel(F, o = {}) {
|
|
77
|
+
const f = F && F.ok ? F : {};
|
|
78
|
+
const note = f.note || null;
|
|
79
|
+
const state = note ? note.state : null;
|
|
80
|
+
const listening = state === 'recording', paused = state === 'paused';
|
|
81
|
+
const A = f.agenda && Array.isArray(f.agenda.topics) && f.agenda.topics.length ? f.agenda : null;
|
|
82
|
+
const at = A ? A.topics.findIndex((t) => t.now) : -1;
|
|
83
|
+
const topic = at >= 0 ? { title: clip(A.topics[at].title, 80), n: at + 1, of: A.topics.length, left: A.left != null ? A.left : null } : null;
|
|
84
|
+
const cap = f.captured || {};
|
|
85
|
+
const filed = [];
|
|
86
|
+
for (const [kind, key] of [['decision', 'decisions'], ['action', 'actions'], ['question', 'questions']]) {
|
|
87
|
+
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) });
|
|
88
|
+
}
|
|
89
|
+
// newest last: a bullet id is b-<minute>-<k>, so the ids sort in meeting time
|
|
90
|
+
filed.sort((a, b) => a.bid.localeCompare(b.bid, 'en', { numeric: true }));
|
|
91
|
+
const context = [];
|
|
92
|
+
const notes = Array.isArray(f.notes) ? f.notes : [];
|
|
93
|
+
for (const n of notes.slice().reverse()) {
|
|
94
|
+
if (context.length >= CONTEXT_MAX || !n || n.cat !== 'Context' || n.ask) continue;
|
|
95
|
+
const act = (n.acts || []).find((a) => hrefOf(a));
|
|
96
|
+
context.push({ label: 'Context', text: clip(n.body, 160), href: act ? hrefOf(act) : null });
|
|
97
|
+
}
|
|
98
|
+
for (const c of Array.isArray(f.chips) ? f.chips : []) {
|
|
99
|
+
if (context.length >= CONTEXT_MAX) break;
|
|
100
|
+
const href = hrefOf(c); if (!href) continue;
|
|
101
|
+
context.push({ label: 'Context', text: clip(c.label + (c.sub ? ' · ' + c.sub : ''), 160), href });
|
|
102
|
+
}
|
|
103
|
+
const asks = Array.isArray(f.asks) ? f.asks : [];
|
|
104
|
+
const last = asks.length ? asks[asks.length - 1] : null;
|
|
105
|
+
let answer = null;
|
|
106
|
+
if (last) {
|
|
107
|
+
const a = notes.filter((x) => x && x.ask === last.id).pop() || null;
|
|
108
|
+
const from = a && Array.isArray(a.from) ? a.from.map((k) => FROM_WORDS[k]).filter(Boolean) : [];
|
|
109
|
+
answer = { id: last.id, question: clip(last.question, 300), state: a ? 'answered' : last.state === 'failed' ? 'failed' : 'working',
|
|
110
|
+
body: a ? clip(a.body, 700) : last.state === 'failed' ? (last.error || 'PMOS could not answer. Ask again.') : '', from: from.length ? 'From ' + from.join(' and ') : '' };
|
|
111
|
+
}
|
|
112
|
+
const drafts = (Array.isArray(f.raise) ? f.raise : []).filter((r) => r && r.kind === 'chat' && r.text).map((r) => ({ id: String(r.id), text: clip(r.text, 200) }));
|
|
113
|
+
const toldAt = Number.isFinite(o.toldAt) ? o.toldAt : null;
|
|
114
|
+
return {
|
|
115
|
+
eventId: f.event ? f.event.id : '', noteId: note ? note.id : '', title: f.event ? clip(f.event.title, 120) : '', call: (f.event && f.event.call) || null,
|
|
116
|
+
listening, paused, topic, gist: typeof f.gist === 'string' ? clip(f.gist, 400) : '',
|
|
117
|
+
nudge: listening ? nudgeOf(A, { off: o.nudgeOff }) : null,
|
|
118
|
+
filed: filed.slice(-FILED_MAX), filedMore: Math.max(0, filed.length - FILED_MAX), context, answer, drafts,
|
|
119
|
+
// the consent line shows while PMOS listens, until the PM copies it (or puts it away)
|
|
120
|
+
consent: { show: (listening || paused) && toldAt == null && !o.consentOff, toldAt },
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/** The panel's header line. */
|
|
125
|
+
export function headOf(m) {
|
|
126
|
+
if (m.paused) return { text: 'Paused', tone: 'warn' };
|
|
127
|
+
if (!m.listening) return { text: 'Not listening', tone: 'off' };
|
|
128
|
+
const sub = m.consent.show ? 'others not told yet' : m.topic ? 'Topic ' + m.topic.n + ' of ' + m.topic.of : m.consent.toldAt != null ? 'others told ' + hm(m.consent.toldAt) : '';
|
|
129
|
+
return { text: 'Listening' + (sub ? ' · ' + sub : ''), tone: m.consent.show ? 'warn' : 'ok' };
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
const row = (k, body, acts = '', cls = '') => `<div class="mb-r${cls ? ' ' + cls : ''}"><span class="t">${k ? `<small>${esc(k)}</small>` : ''}${body}</span>${acts}</div>`;
|
|
133
|
+
|
|
134
|
+
export const topicHtml = (m) => (m.topic ? `<div class="mb-r mb-top"><b class="t">${esc(m.topic.title)}</b>${m.topic.left != null ? `<span class="mb-sm">${esc(m.topic.left + ' min left')}</span>` : ''}</div>` : '');
|
|
135
|
+
export const nowHtml = (m) => (m.gist ? `<div class="mb-r"><span class="t"><small>Now</small>${esc(m.gist)}</span><span class="mb-spark">${svg(P.spark, 14)}</span></div>` : '');
|
|
136
|
+
export const nudgeHtml = (m) => (m.nudge ? `<div class="mb-r mb-nudge" role="status"><i class="mb-dot warn" aria-hidden="true"></i><span class="t">${esc(m.nudge.text)}</span>${ib('nudge-x', 'Dismiss', P.x, ` data-key="${esc(m.nudge.key)}"`)}</div>` : '');
|
|
137
|
+
export function filedHtml(m) {
|
|
138
|
+
if (!m.filed.length) return '';
|
|
139
|
+
return m.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('')
|
|
140
|
+
+ (m.filedMore ? `<div class="mb-r mb-more"><span class="mb-sm">${esc(m.filedMore + ' more filed in the notes')}</span></div>` : '');
|
|
141
|
+
}
|
|
142
|
+
export function contextHtml(m) {
|
|
143
|
+
return m.context.map((c) => row(c.label, esc(c.text), c.href ? `<a class="mb-ib" href="${esc(c.href)}" target="_blank" rel="noopener noreferrer" aria-label="Open it" title="Open it">${svg(P.open)}</a>` : '')).join('');
|
|
144
|
+
}
|
|
145
|
+
export function draftsHtml(m) {
|
|
146
|
+
return m.drafts.map((d) => `<div class="mb-r mb-draft" data-draft="${esc(d.id)}"><span class="t"><small>Draft for the call chat</small>${esc(d.text)}</span>`
|
|
147
|
+
+ ib('copy', 'Copy the line, then paste it in the call chat', P.copy, ` data-id="${esc(d.id)}"`, 'go') + ib('chat-x', 'Not now', P.x, ` data-id="${esc(d.id)}"`) + '</div>').join('');
|
|
148
|
+
}
|
|
149
|
+
export function consentHtml(m) {
|
|
150
|
+
if (!m.consent.show) return '';
|
|
151
|
+
return `<div class="mb-r mb-consent"><span class="t"><small>PMOS proposes</small>Tell the call you are taking notes with PMOS?<q class="mb-line">${esc(CONSENT_LINE)}</q></span>`
|
|
152
|
+
+ `<span class="mb-acts">${ib('copy', 'Copy the line, then paste it in the call chat', P.copy, ' data-id="consent"', 'go')}${ib('consent-x', 'Not now', P.x)}</span></div>`;
|
|
153
|
+
}
|
|
154
|
+
export function answerHtml(m) {
|
|
155
|
+
const a = m.answer; if (!a) return '';
|
|
156
|
+
return row('You asked', esc(a.question)) + (a.state === 'working'
|
|
157
|
+
? row('PMOS', '<span class="mb-sm" role="status">PMOS is answering…</span>')
|
|
158
|
+
: row('PMOS', esc(a.body) + (a.from ? `<span class="mb-src">${esc(a.from)}</span>` : ''), '', a.state === 'failed' ? 'bad' : ''));
|
|
159
|
+
}
|
|
160
|
+
/** The Meet panel's body, in the order of board 1. */
|
|
161
|
+
export const buddyHtml = (m) => topicHtml(m) + nowHtml(m) + nudgeHtml(m) + consentHtml(m) + filedHtml(m) + contextHtml(m) + draftsHtml(m) + answerHtml(m);
|
|
162
|
+
/** The recording tab's card (its Now panel already shows the topic, the gist and the answer). */
|
|
163
|
+
export function heardHtml(m) {
|
|
164
|
+
const h = consentHtml(m) + nudgeHtml(m) + filedHtml(m) + draftsHtml(m);
|
|
165
|
+
return h ? `<div class="mb-card">${h}</div>` : '';
|
|
166
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/* pm/buddy-press.js — the meeting buddy's presses (initiative meeting-buddy), shared by the Meet panel (cozy-buddy.js) and the recording
|
|
2
|
+
* tab's Now panel (cozy-rec-now.js). The rows are pm/buddy-core.js's; each press carries data-mb="…".
|
|
3
|
+
*
|
|
4
|
+
* press(btn, F, { pmPost, storage, mem }) → Promise<{ msg, undo?: bid, read: boolean } | null> null: not a buddy press
|
|
5
|
+
* undo / redo POST /api/notes/bullet { id, bullet, drop }: the filed item out of the notes, or back in
|
|
6
|
+
* copy the line on the clipboard. A chat draft is then marked raised (POST /api/meeting-focus/raise); the consent line is
|
|
7
|
+
* marked copied in this browser. Nothing is posted to the call or its chat: the PM pastes the line himself.
|
|
8
|
+
* chat-x the draft put away (POST /api/meeting-focus/raise, skip)
|
|
9
|
+
* nudge-x · consent-x kept in this browser (buddy-core.js markIn); mem keeps them when the store is blocked
|
|
10
|
+
*/
|
|
11
|
+
import { CONSENT_LINE, markIn } from './buddy-core.js';
|
|
12
|
+
|
|
13
|
+
export async function copyText(text) {
|
|
14
|
+
try { await navigator.clipboard.writeText(text); return true; } catch { /* the frame may not allow it */ }
|
|
15
|
+
try {
|
|
16
|
+
const t = document.createElement('textarea'); t.value = text; t.setAttribute('readonly', ''); t.className = 'mb-clip';
|
|
17
|
+
document.body.appendChild(t); t.select(); const ok = document.execCommand('copy'); t.remove(); return ok;
|
|
18
|
+
} catch { return false; }
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** The marks this view holds in memory, for a blocked store. */
|
|
22
|
+
export const newMem = () => ({ toldAt: null, consentOff: false, nudgeOff: new Set() });
|
|
23
|
+
/** The marks of the store and of memory together. */
|
|
24
|
+
export function mergeMarks(fromStore, mem) {
|
|
25
|
+
return { toldAt: fromStore.toldAt != null ? fromStore.toldAt : mem.toldAt, consentOff: fromStore.consentOff || mem.consentOff, nudgeOff: new Set([...fromStore.nudgeOff, ...mem.nudgeOff]) };
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export async function press(b, F, { pmPost, storage, mem }) {
|
|
29
|
+
const act = b && b.dataset ? b.dataset.mb : '';
|
|
30
|
+
const f = F || {};
|
|
31
|
+
const noteId = f.note ? f.note.id : '';
|
|
32
|
+
const where = noteId ? { note: noteId } : f.event ? { event: f.event.id, date: f.date } : {};
|
|
33
|
+
const mark = (patch) => {
|
|
34
|
+
if (patch.nudge) mem.nudgeOff.add(patch.nudge);
|
|
35
|
+
if (patch.toldAt) mem.toldAt = patch.toldAt;
|
|
36
|
+
if (patch.consentOff) mem.consentOff = true;
|
|
37
|
+
markIn(storage, f, patch);
|
|
38
|
+
};
|
|
39
|
+
switch (act) {
|
|
40
|
+
case 'nudge-x': mark({ nudge: b.dataset.key }); return { msg: '', read: false };
|
|
41
|
+
case 'consent-x': mark({ consentOff: true }); return { msg: '', read: false };
|
|
42
|
+
case 'copy': {
|
|
43
|
+
if (b.dataset.id === 'consent') {
|
|
44
|
+
if (!(await copyText(CONSENT_LINE))) return { msg: 'The line was not copied. Select it and copy it yourself.', read: false };
|
|
45
|
+
mark({ toldAt: Date.now() });
|
|
46
|
+
return { msg: 'Copied. Paste it in the call chat.', read: false };
|
|
47
|
+
}
|
|
48
|
+
const d = (f.raise || []).find((r) => r.id === b.dataset.id); if (!d) return null;
|
|
49
|
+
if (!(await copyText(d.text))) return { msg: 'The line was not copied.', read: false };
|
|
50
|
+
const r = await pmPost('/api/meeting-focus/raise', { ...where, id: d.id, action: 'raised' });
|
|
51
|
+
return { msg: r && r.ok ? 'Copied. Paste it in the call chat if you still want it.' : 'Copied, but not marked: ' + ((r && r.error) || 'no answer'), read: true };
|
|
52
|
+
}
|
|
53
|
+
case 'chat-x': {
|
|
54
|
+
const r = await pmPost('/api/meeting-focus/raise', { ...where, id: b.dataset.id, action: 'skip' });
|
|
55
|
+
return { msg: r && r.ok ? '' : 'Not saved: ' + ((r && r.error) || 'no answer'), read: true };
|
|
56
|
+
}
|
|
57
|
+
case 'undo': case 'redo': {
|
|
58
|
+
if (!noteId) return null;
|
|
59
|
+
const bid = b.dataset.bid;
|
|
60
|
+
const r = await pmPost('/api/notes/bullet', { id: noteId, bullet: bid, drop: act === 'undo' });
|
|
61
|
+
if (!r || !r.ok) return { msg: 'Not changed: ' + ((r && r.error) || 'no answer'), read: false };
|
|
62
|
+
return act === 'undo' ? { msg: 'Taken out of the notes.', undo: bid, read: true } : { msg: 'Back in the notes.', read: true };
|
|
63
|
+
}
|
|
64
|
+
default: return null;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/* cozy-buddy.css — the meeting buddy (initiative meeting-buddy; pm/buddy-core.js draws it, pm/cozy-buddy.js mounts the page).
|
|
2
|
+
* The page is the PMOS panel over a Meet call (a 360 × 520 frame), and the same rows sit in the recording tab's Now panel.
|
|
3
|
+
* Colours are the cozy tokens only, so the dark theme follows cozy.css. Every class starts with mb-. */
|
|
4
|
+
|
|
5
|
+
/* the rows, shared by the Meet panel and the recording tab */
|
|
6
|
+
.mb-r { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--cz-hair); font-size: var(--fs-label); line-height: var(--lh-label); color: var(--cz-ink); }
|
|
7
|
+
.mb-r .t { flex: 1; min-width: 0; line-height: 1.4; }
|
|
8
|
+
.mb-r .t small { display: block; font-size: var(--fs-label); font-weight: var(--fw-regular); color: var(--cz-ink3); }
|
|
9
|
+
.mb-r.bad .t { color: var(--cz-late); }
|
|
10
|
+
.mb-top { font-size: var(--fs-body); align-items: center; }
|
|
11
|
+
.mb-sm { font-size: var(--fs-label); color: var(--cz-ink3); }
|
|
12
|
+
.mb-src { display: block; font-size: var(--fs-label); color: var(--cz-ink3); margin-top: 2px; }
|
|
13
|
+
.mb-spark { color: var(--cz-blueink); flex: none; padding-top: 2px; }
|
|
14
|
+
.mb-nudge { background: var(--cz-riskbg); }
|
|
15
|
+
.mb-draft, .mb-consent { background: var(--cz-well); }
|
|
16
|
+
.mb-line { display: block; margin-top: 6px; padding: 8px 10px; border-radius: 8px; background: var(--cz-card); color: var(--cz-ink2); quotes: none; }
|
|
17
|
+
.mb-acts { display: flex; gap: 6px; flex: none; }
|
|
18
|
+
.mb-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--cz-ink3); flex: none; opacity: .6; }
|
|
19
|
+
.mb-dot.ok { background: var(--cz-ok); opacity: 1; }
|
|
20
|
+
.mb-dot.warn { background: var(--cz-risk); opacity: 1; }
|
|
21
|
+
.mb-r .mb-dot { margin-top: 4px; }
|
|
22
|
+
.mb-ib { width: 32px; height: 32px; border-radius: 6px; border: 1px solid var(--cz-hair); background: var(--cz-card); color: var(--cz-ink2); display: inline-flex; align-items: center; justify-content: center; padding: 0; flex: none; cursor: pointer; font: inherit; text-decoration: none; }
|
|
23
|
+
.mb-ib.go { background: var(--cz-solid); border-color: var(--cz-solid); color: var(--cz-onsolid); }
|
|
24
|
+
.mb-ib:disabled { opacity: .5; cursor: default; }
|
|
25
|
+
.mb-ib:focus-visible, .mb-pick:focus-visible, .mb-undo:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 2px; }
|
|
26
|
+
@media (hover: hover) { .mb-ib:hover { background: var(--cz-well); } .mb-ib.go:hover { background: var(--cz-blueink); } }
|
|
27
|
+
@media (pointer: coarse) { .mb-ib { width: 44px; height: 44px; } }
|
|
28
|
+
.mb-undo { border: 0; background: none; padding: 0; font: inherit; font-weight: var(--fw-strong); color: var(--cz-blueink); cursor: pointer; }
|
|
29
|
+
|
|
30
|
+
/* the page over the call */
|
|
31
|
+
.mb-page, .cz.mb-page { margin: 0; height: 100vh; overflow: hidden; background: var(--cz-card); }
|
|
32
|
+
.mb { height: 100%; display: flex; flex-direction: column; color: var(--cz-ink); }
|
|
33
|
+
.mb-h { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 14px; min-height: 44px; box-sizing: border-box; border-bottom: 1px solid var(--cz-hair); font-size: var(--fs-body); }
|
|
34
|
+
.mb-h .mb-sm { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
35
|
+
.mb-h .mb-ib { border: 0; background: none; }
|
|
36
|
+
.mb-b { flex: 1; min-height: 0; overflow-y: auto; }
|
|
37
|
+
.mb-b > :last-child { border-bottom: 0; }
|
|
38
|
+
.mb-msg { margin: 0; padding: 8px 14px; font-size: var(--fs-label); color: var(--cz-ink2); border-top: 1px solid var(--cz-hair); }
|
|
39
|
+
.mb-msg[hidden], .mb-ask[hidden] { display: none; }
|
|
40
|
+
.mb-ask { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--cz-hair); }
|
|
41
|
+
.mb-ask input { flex: 1; min-width: 0; height: 32px; border-radius: 6px; border: 0; background: var(--cz-well); padding: 0 12px; font: inherit; font-size: var(--fs-label); color: var(--cz-ink); }
|
|
42
|
+
.mb-ask input::placeholder { color: var(--cz-ink3); }
|
|
43
|
+
.mb-pick { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 8px 14px; border: 0; border-bottom: 1px solid var(--cz-hair); background: none; font: inherit; font-size: var(--fs-label); color: var(--cz-ink); text-align: left; cursor: pointer; }
|
|
44
|
+
.mb-pick b { flex: 1; min-width: 0; }
|
|
45
|
+
.mb-none { padding: 14px; margin: 0; }
|
|
46
|
+
.folded .mb-b, .folded .mb-msg { display: none; }
|
|
47
|
+
.folded .mb-h { border-bottom: 0; }
|
|
48
|
+
|
|
49
|
+
/* in the recording tab's Now panel: the rows sit in one card */
|
|
50
|
+
.mb-card { border-radius: 8px; background: var(--cz-card); box-shadow: 0 0 0 1px var(--cz-hair); overflow: hidden; }
|
|
51
|
+
.mb-card > :last-child { border-bottom: 0; }
|
|
52
|
+
.mb-clip { position: fixed; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; }
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/* pm/cozy-buddy.js — the meeting buddy page, /premium-buddy.html (initiative meeting-buddy; Exploring 2, "Meeting buddy and one-press start").
|
|
2
|
+
*
|
|
3
|
+
* The PMOS extension frames this page over a Google Meet call (extension/panel.js): ?meet=<abc-defg-hij>&mtitle=<tab title>. The page finds
|
|
4
|
+
* the meeting on the calendar (GET /api/meeting-focus/now), then reads it every 10 s (GET /api/meeting-focus), which also lets the read-only
|
|
5
|
+
* companion run while the meeting records. With no meeting that fits, it lists today's meetings to pick from.
|
|
6
|
+
*
|
|
7
|
+
* Drawn (pm/buddy-core.js): the header (Listening · Topic n of N, Paused, Not listening), the topic and its minutes, Now, the time nudge,
|
|
8
|
+
* the consent line, Filed rows with Undo, Context, drafts for the call chat, the last answer, and a line to ask PMOS quietly.
|
|
9
|
+
* Not listening: one play icon that starts listening to this meeting in the PMOS recording tab (Chrome then asks which tab to share).
|
|
10
|
+
*
|
|
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
|
+
* (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
|
+
* 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. */
|
|
15
|
+
import { pmGet, pmPost } from './http.js';
|
|
16
|
+
import { buddyModel, buddyHtml, headOf, marksOf } from './buddy-core.js';
|
|
17
|
+
import { press, newMem, mergeMarks } from './buddy-press.js';
|
|
18
|
+
import { recCore } from './premium-meeting.js';
|
|
19
|
+
|
|
20
|
+
const q = new URLSearchParams(location.search);
|
|
21
|
+
const $ = (id) => document.getElementById(id);
|
|
22
|
+
const esc = (v) => String(v == null ? '' : v).replace(/[&<>"']/g, (c) => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' })[c]);
|
|
23
|
+
const READ_MS = 10000, ASK_MS = 3000;
|
|
24
|
+
const S = { ev: null, date: '', F: null, html: '', folded: false, timer: null, busy: false };
|
|
25
|
+
|
|
26
|
+
const ls = () => { try { return window.localStorage; } catch { return null; } };
|
|
27
|
+
const MEM = newMem(); // the PM's marks when the store is blocked: this view only
|
|
28
|
+
const local = () => mergeMarks(marksOf(ls(), S.F), MEM);
|
|
29
|
+
|
|
30
|
+
function say(text) { const m = $('mbMsg'); m.textContent = text || ''; m.hidden = !text; }
|
|
31
|
+
function draw() {
|
|
32
|
+
const L = local();
|
|
33
|
+
const m = buddyModel(S.F, L);
|
|
34
|
+
const h = headOf(m);
|
|
35
|
+
$('mbDot').className = 'mb-dot ' + h.tone;
|
|
36
|
+
$('mbHead').textContent = (S.ev ? h.text : 'Looking for the meeting');
|
|
37
|
+
let body = buddyHtml(m);
|
|
38
|
+
if (!m.listening && !m.paused && S.ev) {
|
|
39
|
+
body = `<div class="mb-r mb-start"><span class="t"><small>${esc(m.title)}</small>PMOS is not listening to this meeting.</span>`
|
|
40
|
+
+ `<button type="button" class="mb-ib go" 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
|
+
}
|
|
42
|
+
if (body !== S.html) { S.html = body; $('mbBody').innerHTML = body; }
|
|
43
|
+
$('mbAsk').hidden = !S.ev || S.folded;
|
|
44
|
+
const working = m.answer && m.answer.state === 'working';
|
|
45
|
+
clearTimeout(S.timer); S.timer = setTimeout(read, working ? ASK_MS : READ_MS);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
async function read() {
|
|
49
|
+
if (!S.ev) return;
|
|
50
|
+
const F = await pmGet('/api/meeting-focus?event=' + encodeURIComponent(S.ev.id) + '&date=' + encodeURIComponent(S.date));
|
|
51
|
+
if (F && F.ok) { S.F = F; say(''); } else if (!S.F) say((F && F.error) || 'PMOS did not answer.');
|
|
52
|
+
draw();
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/** Which meeting this call is. With none that fits, today's meetings to pick from. */
|
|
56
|
+
async function find() {
|
|
57
|
+
if (q.get('event')) { S.ev = { id: q.get('event') }; S.date = q.get('date') || ''; return read(); }
|
|
58
|
+
const r = await pmGet('/api/meeting-focus/now?meet=' + encodeURIComponent(q.get('meet') || '') + '&title=' + encodeURIComponent(q.get('mtitle') || ''));
|
|
59
|
+
if (r && r.ok) { S.ev = r.event; S.date = r.date; return read(); }
|
|
60
|
+
const ch = (r && r.choices) || [];
|
|
61
|
+
$('mbHead').textContent = 'Which meeting is this?';
|
|
62
|
+
$('mbBody').innerHTML = ch.length
|
|
63
|
+
? ch.map((c, i) => `<button type="button" class="mb-pick" data-mb="pick" data-i="${i}"><b>${esc(c.title || 'Meeting')}</b><span class="mb-sm">${esc(String(c.at || '').slice(11, 16))}</span></button>`).join('')
|
|
64
|
+
: '<p class="mb-sm mb-none">No meeting on your PMOS calendar today.</p>';
|
|
65
|
+
S.choices = ch;
|
|
66
|
+
setTimeout(find, 30000); // a meeting added to the calendar later is found
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/** Start listening: the PMOS recording tab opens on this meeting's note and asks where the meeting is (Google Meet in Chrome). */
|
|
70
|
+
async function listen() {
|
|
71
|
+
const C = recCore({ pmGet, pmPost, ws: () => null });
|
|
72
|
+
const ev = (S.F && S.F.event) || S.ev;
|
|
73
|
+
const call = ev.call || null;
|
|
74
|
+
const res = await C.record({ id: ev.id, at: ev.at, end: ev.end, title: ev.title, app: call ? (call.app === 'teams' ? 'other' : call.app) : 'meet' });
|
|
75
|
+
say(res && res.ok ? 'The PMOS recording tab opened. Pick this call in Chrome\'s window and tick tab sound.' : (res && res.error) || 'Listening did not start.');
|
|
76
|
+
read();
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
document.addEventListener('click', async (e) => {
|
|
80
|
+
const b = e.target.closest('[data-mb]'); if (!b || b.disabled) return;
|
|
81
|
+
const act = b.dataset.mb;
|
|
82
|
+
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; }
|
|
83
|
+
if (act === 'listen') { b.disabled = true; try { await listen(); } finally { b.disabled = false; } return; }
|
|
84
|
+
b.disabled = true;
|
|
85
|
+
let r = null;
|
|
86
|
+
try { r = await press(b, S.F, { pmPost, storage: ls(), mem: MEM }); } finally { b.disabled = false; }
|
|
87
|
+
if (!r) return;
|
|
88
|
+
if (r.undo) { const m2 = $('mbMsg'); m2.hidden = false; m2.innerHTML = esc(r.msg) + ' <button type="button" class="mb-undo" data-mb="redo" data-bid="' + esc(r.undo) + '">Undo</button>'; }
|
|
89
|
+
else say(r.msg);
|
|
90
|
+
if (r.read) read(); else draw();
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
$('mbAsk').addEventListener('submit', async (e) => {
|
|
94
|
+
e.preventDefault();
|
|
95
|
+
const i = $('mbQ'), text = i.value.trim(); if (!text || !S.ev) return;
|
|
96
|
+
i.disabled = true;
|
|
97
|
+
const m = S.F || {};
|
|
98
|
+
const r = await pmPost('/api/meeting-focus/ask', { ...(m.note ? { note: m.note.id } : {}), event: S.ev.id, date: S.date, question: text });
|
|
99
|
+
i.disabled = false;
|
|
100
|
+
if (!r || !r.ok) { say('PMOS could not take the question: ' + ((r && r.error) || 'no answer')); return; }
|
|
101
|
+
i.value = ''; say(r.state === 'offered' ? 'PMOS offers to show it in the recording tab.' : '');
|
|
102
|
+
read();
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
$('mbFold').addEventListener('click', () => {
|
|
106
|
+
S.folded = !S.folded;
|
|
107
|
+
document.body.classList.toggle('folded', S.folded);
|
|
108
|
+
const b = $('mbFold'); b.setAttribute('aria-expanded', String(!S.folded));
|
|
109
|
+
b.setAttribute('aria-label', S.folded ? 'Open PMOS' : 'Fold PMOS'); b.title = b.getAttribute('aria-label');
|
|
110
|
+
// the panel (extension/panel.js) passes this on to the Meet page, which shrinks the frame to a pill. It carries no data.
|
|
111
|
+
if (window.parent !== window) window.parent.postMessage({ pmosFocus: S.folded ? 'fold' : 'open' }, '*');
|
|
112
|
+
draw();
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
find();
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
/* pm/day-pick.css — the app's own day field and its small calendar (pm/cozy-day-pick.js), and the "When did this happen?" line (pm/cozy-status-when.js)
|
|
1
|
+
/* pm/cozy-day-pick.css — the app's own day field and its small calendar (pm/cozy-day-pick.js), and the "When did this happen?" line (pm/cozy-status-when.js).
|
|
2
|
+
* Each button rule names its parent too, so a host's own button reset (task-card.css .tkc button) does not undo it. */
|
|
2
3
|
.dp { display: flex; flex-direction: column; gap: 4px; }
|
|
3
4
|
.dp-box { position: relative; display: block; }
|
|
4
5
|
.hi-field .dp-in { padding-right: 44px; }
|
|
5
6
|
.dp-box .dp-tg { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); }
|
|
6
|
-
.dp-tg, .dp-nav { display: inline-grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: 6px; background: none; color: var(--cz-ink2); cursor: pointer; }
|
|
7
|
-
.dp-tg:hover, .dp-nav:hover, .dp-tg[aria-expanded="true"] { background: var(--cz-well); color: var(--cz-ink); }
|
|
7
|
+
.dp .dp-tg, .dp-cal .dp-nav { display: inline-grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: 6px; background: none; color: var(--cz-ink2); cursor: pointer; }
|
|
8
|
+
.dp .dp-tg:hover, .dp-cal .dp-nav:hover, .dp .dp-tg[aria-expanded="true"] { background: var(--cz-well); color: var(--cz-ink); }
|
|
8
9
|
.dp-msg { margin: 2px 0 0; color: var(--cz-late); }
|
|
9
10
|
.dp-cal { margin-top: 6px; display: flex; flex-direction: column; gap: 2px; width: 224px; }
|
|
10
11
|
.dp-mh { display: flex; align-items: center; justify-content: space-between; font-size: var(--fs-meta); }
|
|
11
12
|
.dp-mh b { font-weight: var(--fw-strong); color: var(--cz-ink); }
|
|
12
13
|
.dp-wk, .dp-row { display: grid; grid-template-columns: repeat(7, 32px); }
|
|
13
14
|
.dp-wk i { font-style: normal; text-align: center; font-size: var(--fs-meta); color: var(--cz-ink3); padding: 2px 0; }
|
|
14
|
-
.dp-d { height: 28px; border: 0; border-radius: 6px; background: none; font: inherit; font-size: var(--fs-meta); color: var(--cz-ink); cursor: pointer; font-variant-numeric: tabular-nums; }
|
|
15
|
-
.dp-d:hover:not(:disabled) { background: var(--cz-well); }
|
|
15
|
+
.dp-row .dp-d { height: 28px; border: 0; border-radius: 6px; background: none; font: inherit; font-size: var(--fs-meta); color: var(--cz-ink); cursor: pointer; font-variant-numeric: tabular-nums; }
|
|
16
|
+
.dp-row .dp-d:hover:not(:disabled) { background: var(--cz-well); }
|
|
16
17
|
.dp-d.out { color: var(--cz-ink3); }
|
|
17
18
|
.dp-d.td { box-shadow: 0 0 0 1px var(--cz-blue) inset; }
|
|
18
19
|
.dp-d.on { background: var(--cz-blue); color: var(--cz-onsolid); font-weight: var(--fw-strong); }
|
|
@@ -20,8 +21,8 @@
|
|
|
20
21
|
.sw { margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--cz-hair); }
|
|
21
22
|
.sw-q { margin: 0 0 6px; font-size: var(--fs-meta); color: var(--cz-ink2); }
|
|
22
23
|
.sw-ch { display: flex; flex-wrap: wrap; gap: 6px; }
|
|
23
|
-
.sw-b { border: 0; border-radius: 999px; background: var(--cz-card); box-shadow: 0 0 0 1px var(--cz-hair) inset; font: inherit; font-size: var(--fs-meta); color: var(--cz-ink); padding: 4px 11px; cursor: pointer; white-space: nowrap; }
|
|
24
|
-
.sw-b:hover { background: var(--cz-well); }
|
|
25
|
-
.sw-b[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--cz-blue) inset; font-weight: var(--fw-strong); }
|
|
24
|
+
.sw .sw-b { border: 0; border-radius: 999px; background: var(--cz-card); box-shadow: 0 0 0 1px var(--cz-hair) inset; font: inherit; font-size: var(--fs-meta); color: var(--cz-ink); padding: 4px 11px; cursor: pointer; white-space: nowrap; }
|
|
25
|
+
.sw .sw-b:hover { background: var(--cz-well); }
|
|
26
|
+
.sw .sw-b[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--cz-blue) inset; font-weight: var(--fw-strong); }
|
|
26
27
|
.sw-day:not(:empty) { margin-top: 8px; }
|
|
27
28
|
.pw-dp + .pw-dp { margin-top: 8px; }
|
|
@@ -886,7 +886,6 @@ form.hm-box textarea { min-height: 48px; border: 0; background: none; resize: no
|
|
|
886
886
|
body.cz-home:not(.hm-plist):not(.hm-sheet) .cz-fabw:has(> .lv-tray:not([hidden])) { display: flex; }
|
|
887
887
|
body.cz-home:not(.hm-plist):not(.hm-sheet) .cz-fabw.cz-top { top: 52px; right: 16px; bottom: auto; left: auto; }
|
|
888
888
|
body.cz-home:not(.hm-plist):not(.hm-sheet) .cz-fabw > :is(.cz-fab, .cz-live, .ev-fd) { display: none; }
|
|
889
|
-
body.cz-home:not(.hm-plist) .hm-also, body.cz-home:not(.hm-plist) form#hmForm.hm-box .hm-chip { display: none; }
|
|
890
889
|
/* the sheet the context line opens: the initiative, its files, its pull requests, Sends to */
|
|
891
890
|
.hm-csc { position: fixed; inset: 0; z-index: 70; background: color-mix(in srgb, var(--cz-ink) 22%, transparent); }
|
|
892
891
|
.hm-cs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 71; max-height: 80vh; max-height: 80dvh; overflow-y: auto; box-sizing: border-box; padding: 8px 16px calc(20px + env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0; background: var(--cz-card); box-shadow: var(--cz-sheet); display: flex; flex-direction: column; }
|
|
@@ -902,6 +901,18 @@ form.hm-box textarea { min-height: 48px; border: 0; background: none; resize: no
|
|
|
902
901
|
.hm-csr > svg { flex: none; color: var(--cz-ink3); }
|
|
903
902
|
.hm-csr:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 2px; border-radius: 12px; }
|
|
904
903
|
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
/* The stream and the box of the phone chat, also in the popup's chat column (popup round 3 point 19: "simplify this chat panel on mobile, apply
|
|
907
|
+
* here as well"). ONE set of rules: they apply inside a chat container no wider than a phone. They apply on a phone (Home's
|
|
908
|
+
* conversation, not its list) and in the popup's chat column on any width (pm/cozy-popup.js .cz-pop-chat). The selectors keep the phone rules'
|
|
909
|
+
* weight, so nothing on a wide Home changes. */
|
|
910
|
+
.cz-pop-chat { container: hmchat / inline-size; }
|
|
911
|
+
/* the page is not a container on a phone: a container holds fixed children, and Home's top bar is fixed. So the same rules twice. */
|
|
912
|
+
@media (max-width: 760px) {
|
|
913
|
+
/* the In: chip and "also" leave the box: the context line says it */
|
|
914
|
+
body.cz-home:not(.hm-plist) .hm-also, body.cz-home:not(.hm-plist) form#hmForm.hm-box .hm-chip { display: none; }
|
|
915
|
+
|
|
905
916
|
/* the stream: messages only, from margin to margin. Adler stays on the empty chat's intro. */
|
|
906
917
|
body.cz-home:not(.hm-plist) .hm-log { gap: 0; padding: 12px 0 16px; }
|
|
907
918
|
body.cz-home:not(.hm-plist) .hm-log > * + * { margin-top: 24px; }
|
|
@@ -917,7 +928,7 @@ form.hm-box textarea { min-height: 48px; border: 0; background: none; resize: no
|
|
|
917
928
|
/* no name and time line and no "You · 12:09": still read out to a screen reader. The ask card keeps its name line. */
|
|
918
929
|
body.cz-home:not(.hm-plist) .hm-a:not(.ask):not(.hm-intro) .hm-ab > .hm-who:not(:has(.hm-say)),
|
|
919
930
|
body.cz-home:not(.hm-plist) .hm-u > .hm-you { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
|
|
920
|
-
/* Copy, Retry and Make a
|
|
931
|
+
/* Copy, Retry and Make it a task: on the newest message; an older one shows them on press and hold, or on focus */
|
|
921
932
|
body.cz-home:not(.hm-plist) .hm-tools { margin-top: 8px; }
|
|
922
933
|
body.cz-home:not(.hm-plist) .hm-a:not(.last):not(.held):not(:focus-within) .hm-tools { height: 0; margin: 0; overflow: hidden; opacity: 0; }
|
|
923
934
|
|
|
@@ -936,3 +947,44 @@ form.hm-box textarea { min-height: 48px; border: 0; background: none; resize: no
|
|
|
936
947
|
body.cz-home:not(.hm-plist) form#hmForm.hm-box :is(.hm-tool, .ut-mic, .hm-send) { flex: none; width: 44px; height: 44px; margin: 0; }
|
|
937
948
|
body.cz-home:not(.hm-plist) form#hmForm.hm-box > .hm-files { order: 9; flex-basis: 100%; padding: 4px 8px; box-sizing: border-box; }
|
|
938
949
|
}
|
|
950
|
+
@container hmchat (max-width: 760px) {
|
|
951
|
+
/* the In: chip and "also" leave the box: the context line says it */
|
|
952
|
+
.cz-pop-chat .hm-also, .cz-pop-chat form#hmForm.hm-box .hm-chip { display: none; }
|
|
953
|
+
|
|
954
|
+
/* the stream: messages only, from margin to margin. Adler stays on the empty chat's intro. */
|
|
955
|
+
.cz-pop-chat .hm-log { gap: 0; padding: 12px 0 16px; }
|
|
956
|
+
.cz-pop-chat .hm-log > * + * { margin-top: 24px; }
|
|
957
|
+
.cz-pop-chat .hm-log > .hm-worked + .hm-a { margin-top: 2px; }
|
|
958
|
+
.cz-pop-chat .hm-a:not(.hm-intro) > .hm-av { display: none; }
|
|
959
|
+
.cz-pop-chat .hm-a { gap: 0; }
|
|
960
|
+
.cz-pop-chat .hm-a.hm-intro { gap: 10px; }
|
|
961
|
+
.cz-pop-chat :is(.hm-worked, .hm-pills) { padding-left: 0; }
|
|
962
|
+
.cz-pop-chat .hm-wk { padding: 0; gap: 6px; min-height: 28px; }
|
|
963
|
+
.cz-pop-chat .hm-ab .md p { margin: 0 0 8px; }
|
|
964
|
+
.cz-pop-chat .hm-ab .md p:last-child { margin-bottom: 0; }
|
|
965
|
+
.cz-pop-chat .hm-bub { padding: 10px 16px; }
|
|
966
|
+
/* no name and time line and no "You · 12:09": still read out to a screen reader. The ask card keeps its name line. */
|
|
967
|
+
.cz-pop-chat .hm-a:not(.ask):not(.hm-intro) .hm-ab > .hm-who:not(:has(.hm-say)),
|
|
968
|
+
.cz-pop-chat .hm-u > .hm-you { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
|
|
969
|
+
/* Copy, Retry and Make it a task: on the newest message; an older one shows them on press and hold, or on focus */
|
|
970
|
+
.cz-pop-chat .hm-tools { margin-top: 8px; }
|
|
971
|
+
.cz-pop-chat .hm-a:not(.last):not(.held):not(:focus-within) .hm-tools { height: 0; margin: 0; overflow: hidden; opacity: 0; }
|
|
972
|
+
|
|
973
|
+
/* the foot: one box, + · input · mic · send, on the card with no fade over the stream */
|
|
974
|
+
.cz-pop-chat #hmFoot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--cz-card); }
|
|
975
|
+
.cz-pop-chat #hmFoot::before { content: none; }
|
|
976
|
+
.cz-pop-chat form#hmForm.hm-box { flex-direction: row; flex-wrap: wrap; align-items: flex-end; gap: 0; padding: 4px; border-radius: 26px; }
|
|
977
|
+
.cz-pop-chat form#hmForm.hm-box .hm-tb { display: contents; }
|
|
978
|
+
.cz-pop-chat form#hmForm.hm-box .hm-tb > :is(.sp, .hm-key) { display: none; }
|
|
979
|
+
.cz-pop-chat form#hmForm.hm-box > *, .cz-pop-chat form#hmForm.hm-box .hm-tb > * { order: 2; }
|
|
980
|
+
.cz-pop-chat form#hmForm.hm-box .hm-addw { order: 0; width: 44px; flex: none; margin: 0; }
|
|
981
|
+
.cz-pop-chat form#hmForm.hm-box textarea { order: 1; flex: 1; min-width: 0; box-sizing: border-box; min-height: 44px; margin: 0; padding: 11px 8px 11px 4px; line-height: 22px; }
|
|
982
|
+
.cz-pop-chat form#hmForm.hm-box textarea::placeholder { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* one row: a long placeholder ends in … */
|
|
983
|
+
.cz-pop-chat form#hmForm.hm-box .ut-mic { order: 3; }
|
|
984
|
+
.cz-pop-chat form#hmForm.hm-box .hm-send { order: 4; }
|
|
985
|
+
.cz-pop-chat form#hmForm.hm-box :is(.hm-tool, .ut-mic, .hm-send) { flex: none; width: 44px; height: 44px; margin: 0; }
|
|
986
|
+
.cz-pop-chat form#hmForm.hm-box > .hm-files { order: 9; flex-basis: 100%; padding: 4px 8px; box-sizing: border-box; }
|
|
987
|
+
}
|
|
988
|
+
/* the notes a turn's worked line folds (popup round 3 point 19c): quiet, above its steps */
|
|
989
|
+
.hm-notes { padding: 4px 0 2px 18px; }
|
|
990
|
+
.hm-notes p { margin: 0 0 4px; font-size: var(--fs-meta); color: var(--cz-ink2); }
|
|
@@ -225,3 +225,32 @@ button.pw-fv .grey { color: var(--cz-ink3); }
|
|
|
225
225
|
/* round 3 item 11b: the task a Today row opened, lit until another task is opened */
|
|
226
226
|
.pw-kr.lit { background: var(--cz-bluebg); box-shadow: inset 3px 0 0 var(--cz-blue); }
|
|
227
227
|
.pw-kr.lit .pw-tt { font-weight: var(--fw-strong); }
|
|
228
|
+
/* Work breakdown as one row of stages and one list of tasks (round 3 point 22): the stages are chips on the initiative's own bar; the tasks are
|
|
229
|
+
* the Backlog's own list (pm/bd-backlog.css), this initiative's only */
|
|
230
|
+
.pw-one .pw-stgs { min-height: 44px; }
|
|
231
|
+
.pw-one .pw-stgs .pw-it { overflow: visible; }
|
|
232
|
+
.pw-scs { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 0; }
|
|
233
|
+
.pw-sc { display: inline-flex; align-items: center; gap: 5px; border: 0; border-radius: 999px; background: var(--cz-well); padding: 3px 10px 3px 6px; font: inherit; font-size: var(--fs-meta); color: var(--cz-ink2); cursor: pointer; white-space: nowrap; }
|
|
234
|
+
.pw-sc .pw-n { min-width: 18px; height: 18px; display: inline-grid; place-items: center; border-radius: 999px; background: var(--cz-card); font-size: var(--fs-badge); color: var(--cz-ink3); }
|
|
235
|
+
.pw-sc:hover { color: var(--cz-ink); }
|
|
236
|
+
.pw-sc.dn { color: var(--cz-ink3); }
|
|
237
|
+
.pw-sc.now { background: var(--cz-blue-soft, var(--cz-well)); color: var(--cz-ink); font-weight: var(--fw-strong); box-shadow: 0 0 0 1px var(--cz-blue) inset; }
|
|
238
|
+
.pw-sc.late .pw-n { background: var(--cz-latebg); color: var(--cz-late); }
|
|
239
|
+
.pw-sc:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 1px; }
|
|
240
|
+
.pw-one .pw-tl { position: relative; min-height: 32px; }
|
|
241
|
+
.pw-tasks { margin-top: 14px; }
|
|
242
|
+
.pw-lh { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; }
|
|
243
|
+
.pw-lh h4 { margin: 0; flex: 1; font-size: var(--fs-row); font-weight: var(--fw-strong); color: var(--cz-ink); }
|
|
244
|
+
.pw-lh .pw-lk { display: inline-flex; align-items: center; gap: 2px; }
|
|
245
|
+
.pw-ltx { margin: 6px 2px; color: var(--cz-ink3); font-size: var(--fs-row); }
|
|
246
|
+
.pw-bk .bk-emb { border-radius: 14px; background: var(--cz-card); box-shadow: 0 0 0 1px var(--cz-hair); }
|
|
247
|
+
.hi-pop.pw-stc .hi-h3 { margin: 0 0 4px; }
|
|
248
|
+
.hi-pop.pw-stc .hi-small { margin: 0 0 2px; }
|
|
249
|
+
.hi-pop.pw-stc .warn { color: var(--cz-late); }
|
|
250
|
+
.pw-bk .bk-r.lit { background: var(--cz-bluebg); box-shadow: inset 3px 0 0 var(--cz-blue); }
|
|
251
|
+
.hi-pop .pw-stch { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 4px; }
|
|
252
|
+
.hi-pop .pw-stch .hi-h3 { margin: 0; }
|
|
253
|
+
.hi-pop .pw-stch .pw-ib.solid { width: 32px; height: 32px; }
|
|
254
|
+
.hi-pop .pw-stch .pw-ib.solid:disabled { opacity: .45; cursor: default; }
|
|
255
|
+
.hi-pop.pw-stc .pw-when { margin: 4px 0 8px; }
|
|
256
|
+
.pw-sc .pw-n svg { display: block; }
|