create-pmos 0.552.0 → 0.554.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 +33 -27
- 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-board-test.js +4 -4
- package/workspace/briefing-premium-initiative-test.js +2 -2
- package/workspace/briefing-premium-test.js +1 -1
- package/workspace/changelog.json +32 -0
- package/workspace/chat-asks-test.js +5 -5
- package/workspace/ev-everywhere-test.js +2 -2
- package/workspace/goals-clear-ui-test.js +1 -1
- package/workspace/guide/agent-capabilities.md +31 -31
- package/workspace/guide/claude-proposes.md +68 -68
- package/workspace/guide/cli.md +22 -22
- package/workspace/guide/cloud.md +3 -3
- package/workspace/guide/home.md +38 -38
- package/workspace/guide/index.md +5 -5
- package/workspace/guide/intelligence-okr-goals.md +4 -4
- package/workspace/guide/layout.md +23 -23
- package/workspace/guide/notes.md +8 -8
- package/workspace/guide/programs.md +18 -18
- package/workspace/guide/reports.md +16 -16
- package/workspace/guide/settings-and-switches.md +37 -37
- package/workspace/guide/statuses.md +3 -3
- package/workspace/home-other-product-test.js +8 -8
- package/workspace/home-pill-test.js +3 -3
- package/workspace/home-rows-test.js +7 -7
- package/workspace/intel-report-ui-test.js +1 -1
- package/workspace/intelligence-gaps-ui-test.js +2 -2
- package/workspace/lib/agent-roles.js +1 -1
- package/workspace/lib/autonomy.js +1 -1
- package/workspace/lib/bg-queue.js +1 -1
- package/workspace/lib/board-pack-route.js +18 -2
- package/workspace/lib/briefing-premium-agent.js +2 -2
- package/workspace/lib/decision-memory.js +2 -2
- package/workspace/lib/driver-decide.js +2 -2
- package/workspace/lib/driver.js +6 -2
- package/workspace/lib/folder-needs.js +1 -1
- package/workspace/lib/goal-chat.js +5 -5
- package/workspace/lib/goal-watch.js +1 -1
- package/workspace/lib/grill-runs.js +5 -5
- package/workspace/lib/idle-lab.js +5 -5
- package/workspace/lib/impact-runs.js +2 -2
- package/workspace/lib/job-graph.js +2 -2
- package/workspace/lib/metric-draft-runs.js +4 -4
- package/workspace/lib/metric-read-runs.js +5 -5
- package/workspace/lib/news-for-you.js +1 -1
- package/workspace/lib/proposal-runs.js +6 -6
- package/workspace/lib/refresh.js +1 -1
- package/workspace/lib/routes-board-premium.js +1 -1
- package/workspace/lib/routes-goal-status.js +4 -4
- package/workspace/lib/routes-impact.js +1 -1
- package/workspace/lib/routes-insight-moves.js +1 -1
- package/workspace/lib/routes-loose.js +2 -2
- package/workspace/lib/routes-mentions.js +1 -1
- package/workspace/lib/routes-metric-drafts.js +9 -9
- package/workspace/lib/routes-proposals.js +8 -8
- package/workspace/lib/routes-ready-reports.js +1 -1
- package/workspace/lib/routes-slash.js +1 -1
- package/workspace/lib/source-heal.js +3 -3
- package/workspace/lib/state-root.js +22 -1
- package/workspace/lib/task-items.js +1 -1
- package/workspace/lib/task-links.js +2 -2
- package/workspace/lib/today.js +2 -2
- package/workspace/live-pill-round-test.js +1 -1
- package/workspace/metric-drafts-ui-test.js +1 -1
- package/workspace/milestone-suggest-test.js +5 -5
- package/workspace/news-viewers-test.js +3 -3
- package/workspace/okr-goals-ui-test.js +1 -1
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/premium-chat-chart-tab-test.js +1 -1
- package/workspace/premium-chat-context-test.js +4 -4
- package/workspace/premium-chat-goal-setup-test.js +3 -3
- package/workspace/premium-chat-goal-view-test.js +1 -1
- package/workspace/premium-chat-line-test.js +6 -6
- package/workspace/premium-chat-notes-test.js +4 -4
- package/workspace/premium-chat-report-tab-test.js +4 -4
- package/workspace/premium-rec-now-test.js +2 -2
- package/workspace/public/pm/batch-press.js +4 -4
- package/workspace/public/pm/bd-fc-card.js +1 -1
- package/workspace/public/pm/bd-goal.js +39 -2
- package/workspace/public/pm/bd-next.js +10 -10
- package/workspace/public/pm/bd-prog-panel.js +5 -5
- package/workspace/public/pm/bd-views.js +9 -4
- package/workspace/public/pm/chat-ask.js +1 -1
- package/workspace/public/pm/chat-context.js +3 -3
- package/workspace/public/pm/cozy-board.css +15 -0
- package/workspace/public/pm/cozy-evmodel.js +1 -1
- package/workspace/public/pm/cozy-home.css +1 -1
- package/workspace/public/pm/cozy-lab-ins.js +4 -4
- package/workspace/public/pm/cozy-lab.js +1 -1
- package/workspace/public/pm/cozy-news.js +2 -2
- package/workspace/public/pm/cozy-onboard.js +2 -2
- package/workspace/public/pm/cozy-rec-now.js +5 -5
- package/workspace/public/pm/cozy-rec-present.js +1 -1
- package/workspace/public/pm/cozy-reveal.js +2 -2
- package/workspace/public/pm/cozy-settings.js +19 -19
- package/workspace/public/pm/cozy-steps.js +2 -2
- package/workspace/public/pm/cozy-viewer.js +1 -1
- package/workspace/public/pm/ctx-wedge.js +1 -1
- package/workspace/public/pm/dash-view.js +1 -1
- package/workspace/public/pm/goal-chat.js +6 -6
- package/workspace/public/pm/good-morning.js +2 -2
- package/workspace/public/pm/grill-words.js +1 -1
- package/workspace/public/pm/home-app.js +19 -19
- package/workspace/public/pm/home-ask.js +1 -1
- package/workspace/public/pm/home-chat.js +6 -6
- package/workspace/public/pm/home-data.js +2 -2
- package/workspace/public/pm/home-day.js +3 -3
- package/workspace/public/pm/home-drift.js +1 -1
- package/workspace/public/pm/home-goal.js +1 -1
- package/workspace/public/pm/home-impact.js +1 -1
- package/workspace/public/pm/home-ini.js +1 -1
- package/workspace/public/pm/home-line.js +5 -5
- package/workspace/public/pm/home-mentions.js +4 -4
- package/workspace/public/pm/home-moment.js +1 -1
- package/workspace/public/pm/home-need.js +1 -1
- package/workspace/public/pm/home-phone-card.js +1 -1
- package/workspace/public/pm/home-stage-card.js +2 -2
- package/workspace/public/pm/home-sweep.js +1 -1
- package/workspace/public/pm/home-today.js +2 -2
- package/workspace/public/pm/ini-about.js +2 -2
- package/workspace/public/pm/ini-agent.js +5 -5
- package/workspace/public/pm/ini-links.js +5 -5
- package/workspace/public/pm/ini-props.js +11 -11
- package/workspace/public/pm/ini-view-model.js +1 -1
- package/workspace/public/pm/ini-view.js +2 -2
- package/workspace/public/pm/intent.js +3 -3
- package/workspace/public/pm/loose-props.js +5 -5
- package/workspace/public/pm/metric-drafts.js +1 -1
- package/workspace/public/pm/ms-suggest.js +3 -3
- package/workspace/public/pm/next-prompt-ui.js +2 -2
- package/workspace/public/pm/okr-list.js +1 -1
- package/workspace/public/pm/page-chat.js +2 -2
- package/workspace/public/pm/premium-attach.js +1 -1
- package/workspace/public/pm/premium-board.js +15 -8
- package/workspace/public/pm/premium-initiative-head.js +1 -1
- package/workspace/public/pm/premium-insights.js +3 -3
- package/workspace/public/pm/premium-meeting.js +1 -1
- package/workspace/public/pm/premium-mtg-replay.js +1 -1
- package/workspace/public/pm/premium-notes.js +2 -2
- package/workspace/public/pm/premium-report-read.js +6 -6
- package/workspace/public/pm/premium-report-tab.js +7 -7
- package/workspace/public/pm/premium-shell.js +18 -18
- package/workspace/public/pm/premium-vw-ctx.js +3 -3
- package/workspace/public/pm/premium-vw-jira.js +1 -1
- package/workspace/public/pm/premium-welcome.js +1 -1
- package/workspace/public/pm/prog-order.js +2 -2
- package/workspace/public/pm/program-charter.js +3 -3
- package/workspace/public/pm/program-model.js +1 -1
- package/workspace/public/pm/ready-lib.js +4 -4
- package/workspace/public/pm/report-flow.js +7 -7
- package/workspace/public/pm/report-orders-ui.js +2 -2
- package/workspace/public/pm/split-merge.js +5 -5
- package/workspace/public/pm/story.js +1 -1
- package/workspace/public/pm/task-card.js +1 -1
- package/workspace/public/pm/tk-draft.js +1 -1
- package/workspace/public/pm/tk-send.js +2 -2
- package/workspace/public/pm/wf-page.js +2 -2
- package/workspace/ready-dash-ui-test.js +1 -1
- package/workspace/rec-present-test.js +2 -2
- package/workspace/server.js +12 -8
- package/workspace/session-names-test.js +3 -3
- package/workspace/skills/doc-check.skill +2 -0
- package/workspace/skills/idle-lab-prototype.skill +2 -0
- package/workspace/skills/measure.skill +2 -0
- package/workspace/skills/metric-read.skill +2 -0
- package/workspace/skills/milestone-review.skill +2 -0
- package/workspace/skills/report-biweekly.skill +2 -0
- package/workspace/skills/report-daily.skill +2 -0
- package/workspace/skills/report-design.skill +2 -0
- package/workspace/skills/report-monthly.skill +2 -0
- package/workspace/skills/report-weekly.skill +2 -0
- package/workspace/split-merge-ui-test.js +3 -3
- package/workspace/stage-card-test.js +4 -4
- package/workspace/task-links-test.js +1 -1
- package/workspace/task-views-test.js +7 -7
- package/workspace/tk-tasks-test.js +2 -2
|
@@ -60,7 +60,7 @@ export function mountOnboard(host, { ws = '', done = false } = {}) {
|
|
|
60
60
|
|
|
61
61
|
async function load() { const r = await pmGet('/api/onboard/state'); if (r && r.ok) S.data = r; draw(); auto(); }
|
|
62
62
|
const P = () => (S.data && S.data.progress) || {};
|
|
63
|
-
const claudeTurn = (body, mood, latest) => `<div class="hm-a ob-turn">${latest ? `<span class="hm-av hm-adler" aria-hidden="true">${adler(mood, 36, { label: false, id: 'ob', dress: true })}</span>` : '<span class="hm-av t-C s28" aria-hidden="true">
|
|
63
|
+
const claudeTurn = (body, mood, latest) => `<div class="hm-a ob-turn">${latest ? `<span class="hm-av hm-adler" aria-hidden="true">${adler(mood, 36, { label: false, id: 'ob', dress: true })}</span>` : '<span class="hm-av t-C s28" aria-hidden="true">P</span>'}<div class="hm-ab"><p class="hm-who">PMOS</p>${body}</div></div>`;
|
|
64
64
|
const youTurn = (text) => `<div class="hm-u"><div class="hm-bub"><p>${esc(text)}</p></div><span class="hm-you">You</span></div>`;
|
|
65
65
|
const btn = (act, label, cls = '', extra = '') => `<button type="button" class="ut-btn ${cls}" data-ob="${act}"${S.busy ? ' disabled' : ''}${extra}>${esc(S.busy === act ? 'Working…' : label)}</button>`;
|
|
66
66
|
/** ✓ and ✕, icon-only (the PM's rule). */
|
|
@@ -199,7 +199,7 @@ export function mountOnboard(host, { ws = '', done = false } = {}) {
|
|
|
199
199
|
// the composer is open throughout (B1): it answers the product question, the ✕ "what should I change", and after setup goes to Home
|
|
200
200
|
const p = P(), asks = !done && !p.project && !S.queued;
|
|
201
201
|
const kept = foot.querySelector('textarea'); const typed = kept ? kept.value : '';
|
|
202
|
-
foot.innerHTML = `<form class="hm-box" data-ob-form="say"><textarea rows="1" aria-label="Message
|
|
202
|
+
foot.innerHTML = `<form class="hm-box" data-ob-form="say"><textarea rows="1" aria-label="Message PMOS" placeholder="${asks ? 'e.g. Checkout redesign, payments team, Jira PAY' : 'Message PMOS'}"${S.busy ? ' disabled' : ''}></textarea><div class="hm-tb"><span class="sp"></span><span class="hm-key">Enter sends · Shift+Enter for a new line</span><button type="submit" class="hm-send" aria-label="Send"${S.busy ? ' disabled' : ''}>${UP}</button></div></form>`;
|
|
203
203
|
const ta = foot.querySelector('textarea'); ta.value = typed;
|
|
204
204
|
if (asks || S.asking) ta.focus({ preventScroll: true });
|
|
205
205
|
log.scrollTop = log.scrollHeight;
|
|
@@ -31,7 +31,7 @@ const plural = (n, one, many) => n + ' ' + (n === 1 ? one : many);
|
|
|
31
31
|
const mmss = (ms) => { const s = Math.max(0, Math.floor((Number(ms) || 0) / 1000)); return Math.floor(s / 60) + ':' + String(s % 60).padStart(2, '0'); };
|
|
32
32
|
const FROM_WORDS = { talk: 'the talk', screen: 'the screen', prep: 'the prep', last: 'last time' };
|
|
33
33
|
const RAISE_LABEL = { check: 'Check', 'follow-up': 'Follow-up', 'no-owner': 'No owner yet' };
|
|
34
|
-
export const BOX_HINT = 'Note, or ask
|
|
34
|
+
export const BOX_HINT = 'Note, or ask PMOS…';
|
|
35
35
|
|
|
36
36
|
export const kindOf = (text) => (/\?\s*$/.test(String(text || '').trim()) ? 'ask' : 'note');
|
|
37
37
|
|
|
@@ -78,7 +78,7 @@ export function nowModel(F, one, { now = Date.now() } = {}) {
|
|
|
78
78
|
if (lastAsk) {
|
|
79
79
|
const a = (Array.isArray(f.notes) ? f.notes : []).filter((x) => x.ask === lastAsk.id).pop() || null;
|
|
80
80
|
answer = { id: lastAsk.id, question: lastAsk.question, state: a ? 'answered' : lastAsk.state === 'failed' ? 'failed' : 'working',
|
|
81
|
-
body: a ? a.body : lastAsk.state === 'failed' ? (lastAsk.error || '
|
|
81
|
+
body: a ? a.body : lastAsk.state === 'failed' ? (lastAsk.error || 'PMOS could not answer. Ask again.') : '', from: a ? fromLine(a) : '' };
|
|
82
82
|
}
|
|
83
83
|
return {
|
|
84
84
|
noteId: n ? n.id : (f.note && f.note.id) || '',
|
|
@@ -139,7 +139,7 @@ export function nowHtml(m, { room = false } = {}) {
|
|
|
139
139
|
const a = m.answer;
|
|
140
140
|
h += `<div class="rn-chx" aria-live="polite"><div class="q">${esc(a.question)}</div>`
|
|
141
141
|
+ `<div class="ca${a.state === 'failed' ? ' bad' : ''}" data-answer="${esc(a.id)}"><span class="sp" aria-hidden="true">${svg(P.spark, 14, 2)}</span>`
|
|
142
|
-
+ (a.state === 'working' ? '<span class="w"><span class="rn-dots" role="status" aria-label="
|
|
142
|
+
+ (a.state === 'working' ? '<span class="w"><span class="rn-dots" role="status" aria-label="PMOS is answering"><i></i><i></i><i></i></span></span>'
|
|
143
143
|
: `<span class="w">${esc(a.body)}${a.from ? `<span class="src">${esc(a.from)}</span>` : ''}</span>`)
|
|
144
144
|
+ (a.state === 'answered' ? `<button type="button" class="rn-ib" data-rn="keep" aria-label="Keep as a note" title="Keep as a note">${svg(P.plus)}</button>` : '')
|
|
145
145
|
+ '</div></div>';
|
|
@@ -298,7 +298,7 @@ export function mountNow(slots, ctx) {
|
|
|
298
298
|
|
|
299
299
|
ta.addEventListener('input', () => {
|
|
300
300
|
const ask = kindOf(ta.value) === 'ask';
|
|
301
|
-
send.setAttribute('aria-label', ask ? 'Ask
|
|
301
|
+
send.setAttribute('aria-label', ask ? 'Ask PMOS' : 'Keep the note'); send.title = ask ? 'Ask PMOS' : 'Keep the note';
|
|
302
302
|
ta.style.height = ''; if (ta.value) ta.style.height = Math.min(ta.scrollHeight, 120) + 'px';
|
|
303
303
|
});
|
|
304
304
|
ta.addEventListener('keydown', (e) => { if (e.key === 'Enter' && !e.shiftKey && !e.isComposing) { e.preventDefault(); box.requestSubmit(); } });
|
|
@@ -309,7 +309,7 @@ export function mountNow(slots, ctx) {
|
|
|
309
309
|
try {
|
|
310
310
|
if (kindOf(text) === 'ask') {
|
|
311
311
|
const r = await pmPost('/api/meeting-focus/ask', { note: noteId(), question: text, ws: ctx.ws });
|
|
312
|
-
if (!r || !r.ok) { say('
|
|
312
|
+
if (!r || !r.ok) { say('PMOS could not take the question: ' + ((r && r.error) || 'no answer')); return; }
|
|
313
313
|
// the question shows at once; the answer arrives on a later read
|
|
314
314
|
const f = focusNow() || { ok: true };
|
|
315
315
|
own = { ...f, now_ms: Number(f.now_ms) || 0, asks: [...(f.asks || []), { id: r.id, question: text, state: 'working' }] };
|
|
@@ -151,7 +151,7 @@ export function pickHtml(P) {
|
|
|
151
151
|
h.push(`<div class="rxp-in"><span class="rxp-fi">${ic('link', 16)}</span><input type="url" data-rxp="url" placeholder="Paste a link" aria-label="Paste a link to present"><button type="button" class="rxp-ib" data-rxp="upload" aria-label="Upload a file" title="Upload a file (PDF, slides, image)">${ic('upload', 16)}</button><input type="file" data-rxp="file" hidden accept=".pdf,.png,.jpg,.jpeg,.gif,.webp,.html,.htm,.pptx"></div>`);
|
|
152
152
|
if (P.link.err) h.push(`<p class="rxp-err" role="alert">${esc(P.link.err)}</p>`);
|
|
153
153
|
} else h.push(row('link', 'plus', 'File or link', 'PDF, slides, Google Docs, Slides, Sheets'));
|
|
154
|
-
h.push(row('screen', 'screen', 'A tab, a window or your screen', '
|
|
154
|
+
h.push(row('screen', 'screen', 'A tab, a window or your screen', 'PMOS follows it here'));
|
|
155
155
|
if (P.presenting) h.push('<hr>' + row('stop', 'x', 'Stop presenting', ''));
|
|
156
156
|
return `<div class="rxp-pick" role="menu" aria-label="Present">${h.join('')}</div>`;
|
|
157
157
|
}
|
|
@@ -90,7 +90,7 @@ export function mountReveal(host, { ws, model, send, openIni, changed } = {}) {
|
|
|
90
90
|
host.after(sec); host.hidden = true; document.body.classList.add('ob-on');
|
|
91
91
|
const log = sec.querySelector('.hm-log'), foot = sec.querySelector('.hm-foot');
|
|
92
92
|
const S = { M: model, busy: false, note: '', typed: '' };
|
|
93
|
-
const turn = (body, mood, latest) => `<div class="hm-a ob-turn">${latest ? `<span class="hm-av hm-adler" aria-hidden="true">${adler(mood, 36, { label: false, id: 'rv', dress: true })}</span>` : '<span class="hm-av t-C s28" aria-hidden="true">
|
|
93
|
+
const turn = (body, mood, latest) => `<div class="hm-a ob-turn">${latest ? `<span class="hm-av hm-adler" aria-hidden="true">${adler(mood, 36, { label: false, id: 'rv', dress: true })}</span>` : '<span class="hm-av t-C s28" aria-hidden="true">P</span>'}<div class="hm-ab"><p class="hm-who">PMOS</p>${body}</div></div>`;
|
|
94
94
|
|
|
95
95
|
function draw() {
|
|
96
96
|
const M = S.M, list = [];
|
|
@@ -100,7 +100,7 @@ export function mountReveal(host, { ws, model, send, openIni, changed } = {}) {
|
|
|
100
100
|
if (M.quiet) list.push({ mood: 'handled', body: `<p class="ob-sub">${esc(M.quiet)}</p>` });
|
|
101
101
|
log.innerHTML = list.map((t, i) => turn(t.body, t.mood, i === list.length - 1)).join('');
|
|
102
102
|
if (!foot.firstChild) {
|
|
103
|
-
foot.innerHTML = `<form class="hm-box" data-rv-form="say"><textarea rows="1" aria-label="Message
|
|
103
|
+
foot.innerHTML = `<form class="hm-box" data-rv-form="say"><textarea rows="1" aria-label="Message PMOS" placeholder="Message PMOS"></textarea><div class="hm-tb"><span class="sp"></span><span class="hm-key">Enter sends · Shift+Enter for a new line</span><button type="submit" class="hm-send" aria-label="Send">${SVG(I.up, 18, 2.4)}</button></div></form>`;
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
async function act(a) {
|
|
@@ -55,7 +55,7 @@ async function pmSend(method, path, body) {
|
|
|
55
55
|
try { const res = await pressFetch(path, { method, ...(body === undefined ? {} : { body: JSON.stringify(body) }) }); const out = await res.json(); if (out && typeof out === 'object' && !res.ok) out.status = res.status; return out; }
|
|
56
56
|
catch (e) { return { ok: false, error: 'could not reach the workspace server — ' + ((e && e.message) || String(e)) }; }
|
|
57
57
|
}
|
|
58
|
-
const SECTIONS = [['general', 'General'], ['claude', '
|
|
58
|
+
const SECTIONS = [['general', 'General'], ['claude', 'PMOS'], ['connectors', 'Connectors'], ['workspaces', 'Workspaces'], ['updates', 'Updates']];
|
|
59
59
|
const SUBS = { adler: 'Adler', jl: 'Jev and Laya', workflows: 'Workflows' }; // General › Extras and Workspaces › Workflows: each opens as a sub-panel of its section (U4, U1)
|
|
60
60
|
const SRC = { calendar: 'Calendar', wispr: 'Wispr Flow', mail: 'Mail', slack: 'Slack', jira: 'Jira', confluence: 'Confluence', github: 'GitHub', drive: 'Google Drive', figma: 'Figma', website: 'Your websites' };
|
|
61
61
|
const VIEWER_KEY = 'pmos.cz.viewer';
|
|
@@ -103,7 +103,7 @@ function general() {
|
|
|
103
103
|
+ trow('Agents write to Jira', 'Only after you press Commit. Never on their own.', (ready() ? '' : adFace('needs-you', 24)) + '<span class="ev-pill ok">Fixed</span>')
|
|
104
104
|
+ upd
|
|
105
105
|
+ '<h4>Extras</h4>'
|
|
106
|
-
+ trow('Adler', 'How much of
|
|
106
|
+
+ trow('Adler', 'How much of PMOS’s face shows, motion, celebrations, quiet hours and Dress for the day', subBtn('adler'))
|
|
107
107
|
+ trow('Jev and Laya', 'The TypeSafe key, Laya on this computer and the repositories it reads', subBtn('jl'));
|
|
108
108
|
}
|
|
109
109
|
/* General › Extras (U4): the row's › opens the sub-panel; its ‹ comes back to General */
|
|
@@ -125,8 +125,8 @@ async function saveDress(key, value, said = 'Saved.') {
|
|
|
125
125
|
/* Settings > Adler (AdM5): four choices, each saved for this computer the moment it is pressed */
|
|
126
126
|
function adlerSec() {
|
|
127
127
|
const P = AD.prefs();
|
|
128
|
-
return `<div class="ev-ad-hd">${AD.adler('handled', 48)}<p class="ev-small ev-mut">Adler is how
|
|
129
|
-
+ trow('How much Adler', 'Face only keeps his face where
|
|
128
|
+
return `<div class="ev-ad-hd">${AD.adler('handled', 48)}<p class="ev-small ev-mut">Adler is how PMOS shows its mood in PMOS. You choose how much of him you see.</p></div>`
|
|
129
|
+
+ trow('How much Adler', 'Face only keeps his face where PMOS speaks and drops the scenes. Off shows the plain mood dot.', seg('How much Adler', 'adler.amount', P['adler.amount'], [['full', 'Full'], ['face', 'Face only'], ['off', 'Off']]))
|
|
130
130
|
+ trow('Motion', 'Still stops every animation. Reduced motion on your computer always stops it.', seg('Motion', 'adler.motion', P['adler.motion'], [['system', 'Follow my computer'], ['still', 'Still']]))
|
|
131
131
|
+ trow('Celebrations', 'At most once a week, and only for a real event.', seg('Celebrations', 'adler.celebrate', P['adler.celebrate'], [['real', 'Real wins only'], ['never', 'Never']]))
|
|
132
132
|
+ trow('Quiet after', 'After this time, opening PMOS shows Adler asleep and nothing urgent.', seg('Quiet after', 'adler.quiet', P['adler.quiet'], [['22', '22:00'], ['never', 'Never']]))
|
|
@@ -295,11 +295,11 @@ const WAY = [['quiet', 'Quietly'], ['show', 'Show me'], ['ask', 'Ask first']];
|
|
|
295
295
|
const dayOf = (iso) => { const t = Date.parse(iso || ''); return Number.isFinite(t) ? new Date(t).toLocaleDateString('en-GB', { day: 'numeric', month: 'short' }) : ''; };
|
|
296
296
|
function kindSub(k, until) {
|
|
297
297
|
const made = k.made === 1 ? '1 made' : k.made + ' made', kept = k.kept === k.made ? (k.made === 1 ? 'you kept it' : 'you kept all') : k.kept ? 'you kept ' + k.kept : 'none kept yet';
|
|
298
|
-
const how = k.set ? 'You set this.' : k.auto === 'ask' ? 'Two Undos, so
|
|
299
|
-
: k.auto === 'quiet' ? '
|
|
298
|
+
const how = k.set ? 'You set this.' : k.auto === 'ask' ? 'Two Undos, so PMOS asks first' + (k.until ? ' until ' + dayOf(k.until) : '') + '.'
|
|
299
|
+
: k.auto === 'quiet' ? 'PMOS does these quietly.' : 'A new kind shows until you keep ' + until + '.';
|
|
300
300
|
return (k.made ? made + ', ' + kept + '. ' : '') + how;
|
|
301
301
|
}
|
|
302
|
-
const ALWAYS = [['Start a new request', '
|
|
302
|
+
const ALWAYS = [['Start a new request', 'PMOS recommends. You decide.'], ['Say if it worked', 'The verdict on an outcome is yours.'], ['Send a message to people', 'PMOS drafts. Only you send.'],
|
|
303
303
|
['Move what the team reads', 'Stages and dates in Jira or on the Board.'], ['Merge, delete or spend', '']];
|
|
304
304
|
function lessonRow(l) {
|
|
305
305
|
const [wrong, ...rest] = String(l.text || '').split(/\n+/); // a lesson's first line says what went wrong, the rest what changed
|
|
@@ -307,11 +307,11 @@ function lessonRow(l) {
|
|
|
307
307
|
}
|
|
308
308
|
function decidesSec() {
|
|
309
309
|
const K = T.ck;
|
|
310
|
-
const kinds = !K ? '<p class="ev-small ev-mut">Reading what
|
|
311
|
-
: !K.kinds.length ? '<p class="ev-small ev-mut">
|
|
310
|
+
const kinds = !K ? '<p class="ev-small ev-mut">Reading what PMOS did by itself.</p>' : K.ok === false ? `<p class="ev-small ev-mut">What PMOS did could not be read: ${esc(K.error || 'the server did not answer')}.</p>`
|
|
311
|
+
: !K.kinds.length ? '<p class="ev-small ev-mut">PMOS has not changed anything by itself yet. Each kind of change shows here once it has.</p>'
|
|
312
312
|
: K.kinds.map((k) => trow(k.label, kindSub(k, K.showUntil || 3), seg(k.label, 'claude.way:' + k.kind, k.way, WAY))).join('');
|
|
313
313
|
const L = T.ls && T.ls.ok ? T.ls.lessons || [] : [];
|
|
314
|
-
return '<h4>How
|
|
314
|
+
return '<h4>How PMOS decides</h4><p class="ev-small ev-mut ev-lead">PMOS picks for each kind of change from what you kept and undid. Two Undos on a kind and it asks first for 7 days. You can set any kind yourself.</p>'
|
|
315
315
|
+ kinds + '<h4>Always yours</h4>' + ALWAYS.map(([b, p]) => trow(b, p, '<span class="ev-pill">Always asks</span>')).join('')
|
|
316
316
|
+ (L.length ? '<h4>Lessons</h4>' + L.slice(0, 8).map(lessonRow).join('') : '');
|
|
317
317
|
}
|
|
@@ -323,7 +323,7 @@ async function saveWay(kind, v) {
|
|
|
323
323
|
if (v === k.auto) delete ways[kind]; else ways[kind] = v;
|
|
324
324
|
const r = await pmPost('/api/settings', { key: 'claude.ways', value: ways });
|
|
325
325
|
if (r && r.ok) { k.set = ways[kind] || null; k.way = v; }
|
|
326
|
-
T.msg = r && r.ok ? 'Saved. ' + k.label + ': ' + (v === 'ask' ? '
|
|
326
|
+
T.msg = r && r.ok ? 'Saved. ' + k.label + ': ' + (v === 'ask' ? 'PMOS asks you first.' : v === 'show' ? 'PMOS does them and shows them first in PMOS did.' : 'PMOS does them quietly.') : (r && r.error) || 'Not saved.';
|
|
327
327
|
draw();
|
|
328
328
|
}
|
|
329
329
|
/* Settings > Claude: which Claude profile PMOS starts Claude sessions with, and the API key for Claude's own runs (D101).
|
|
@@ -336,7 +336,7 @@ function claudeSec() {
|
|
|
336
336
|
const gone = pref && !ps.some((x) => x.id === pref);
|
|
337
337
|
const profSub = C.perr ? 'The profiles could not be read: ' + C.perr : !ps.length ? 'No profiles on this computer. PMOS starts Claude as you are signed in.' : gone ? 'The saved profile is no longer on this computer.' : pref ? 'New Claude sessions start with it.' : 'New Claude sessions start as you are signed in.';
|
|
338
338
|
const k = C.key || {};
|
|
339
|
-
const keySub = k.present ? (k.source === 'environment' ? 'Set in ANTHROPIC_API_KEY. A key saved here is used first.' : 'Saved on this computer only. PMOS never shows it again.') : 'Not set.
|
|
339
|
+
const keySub = k.present ? (k.source === 'environment' ? 'Set in ANTHROPIC_API_KEY. A key saved here is used first.' : 'Saved on this computer only. PMOS never shows it again.') : 'Not set. PMOS\u2019s own runs, such as Grill, use a Claude session instead.';
|
|
340
340
|
const keyRight = `<span class="ev-dr-pl"><label class="ev-vh" for="evKey">Anthropic API key</label><input id="evKey" class="ev-inp" type="password" autocomplete="off" spellcheck="false" placeholder="${k.present ? 'Replace the key' : 'sk-ant-\u2026'}" data-ev-key><button type="button" class="ev-btn sm pri" data-ev-keysave>Save</button>${k.source === 'settings' ? '<button type="button" class="ev-btn sm" data-ev-keyclear>Remove</button>' : ''}</span>`;
|
|
341
341
|
return decidesSec() + '<h4>Claude login and profile</h4><div data-claude-setup></div>'
|
|
342
342
|
+ trow('API key', keySub, keyRight)
|
|
@@ -354,7 +354,7 @@ function sharpenRows() {
|
|
|
354
354
|
const on = sh !== 'off' && !(T.np && T.np.sharpen === false && sh === 'auto');
|
|
355
355
|
const down = T.np && T.np.apiDown;
|
|
356
356
|
const shSub = !on ? (down && down.auth ? 'Off for now: your API key was refused. Replace it under API key above.' : 'Off. No spinner and no Sharper card.')
|
|
357
|
-
: 'When you pause on a rough prompt,
|
|
357
|
+
: 'When you pause on a rough prompt, PMOS writes a sharper version above the box. It runs in your Claude session and takes a few seconds.';
|
|
358
358
|
const styleSub = style === 'polish' ? 'Clearer and shorter, your meaning kept.' : style === 'own' ? (rules.trim() ? 'Your rules below.' : 'Write your rules below first.') : 'Builds the best prompt for the job.';
|
|
359
359
|
return '<h4>Sharpen prompts</h4>'
|
|
360
360
|
+ trow('Suggest the next prompt', 'After a reply, up to two prompts above the box. A tap puts one in the box. Nothing sends.', sw(next, 'data-ev-np="prompt.next"', 'Suggest the next prompt'))
|
|
@@ -377,13 +377,13 @@ const CAPS = [5, 10, 20, 50];
|
|
|
377
377
|
const usd = (n) => '$' + (Math.round(Number(n) * 100) % 100 ? Number(n).toFixed(2) : String(Math.round(Number(n))));
|
|
378
378
|
function checksSec() {
|
|
379
379
|
const C = T.gr;
|
|
380
|
-
if (!C) return '<p class="ev-small ev-mut">Reading
|
|
381
|
-
if (C.ok === false) return `<p class="ev-small ev-mut">
|
|
380
|
+
if (!C) return '<p class="ev-small ev-mut">Reading PMOS’s checks.</p>';
|
|
381
|
+
if (C.ok === false) return `<p class="ev-small ev-mut">PMOS’s checks could not be read: ${esc(C.error || 'the server did not answer')}.</p>`;
|
|
382
382
|
const caps = [...new Set(CAPS.concat(Number.isFinite(C.cap) ? [C.cap] : []))].sort((a, b) => a - b);
|
|
383
383
|
const modeSub = C.envOff ? 'Off: PMOS_GRILL is off in the environment.' : 'Before an initiative leaves a stage, when a forecast turns, when scope or dates move a lot, and once a month on running work that feels off. Findings wait under ✦.';
|
|
384
384
|
const used = Number.isFinite(C.cap) && C.cap > 0 ? Math.min(100, Math.round((C.spent / C.cap) * 100)) : 0;
|
|
385
385
|
return trow('Grill by itself', modeSub, C.envOff ? '<span class="ev-pill">Off</span>' : seg('Grill by itself', 'grill.mode', C.mode, [['full', 'Full'], ['exits', 'Only at stage exits'], ['off', 'Off']]))
|
|
386
|
-
+ trow('Monthly credit for checks', C.paused ? 'Paused at the limit this month.
|
|
386
|
+
+ trow('Monthly credit for checks', C.paused ? 'Paused at the limit this month. PMOS starts again next month, or when you raise it.' : 'At the limit PMOS pauses and says so once. It never charges beyond it.', seg('Monthly credit for checks', 'grill.cap', C.cap, caps.map((v) => [v, usd(v)])))
|
|
387
387
|
+ `<div class="ev-trow ev-gcap"><span class="ev-small"><b>${esc(usd(C.spent))}</b> of ${esc(usd(C.cap))} used this month</span><span class="ev-gbar" role="img" aria-label="${used}% of the monthly credit used"><i style="width:${used}%"></i></span></div>`;
|
|
388
388
|
}
|
|
389
389
|
const BODY = { general, claude: claudeSec, connectors, workspaces, updates };
|
|
@@ -482,11 +482,11 @@ async function press(e) {
|
|
|
482
482
|
const key = t.dataset.evSeg, value = key === 'grill.cap' ? Number(t.dataset.v) : t.dataset.v;
|
|
483
483
|
const r = await pmPost('/api/settings', { key, value });
|
|
484
484
|
if (r && r.ok) T.gr = { ...T.gr, [key === 'grill.cap' ? 'cap' : 'mode']: r.value !== undefined ? r.value : value, ...(key === 'grill.cap' ? { paused: T.gr.paused && Number(value) <= T.gr.spent } : {}) };
|
|
485
|
-
T.msg = r && r.ok ? (key === 'grill.mode' ? (value === 'off' ? 'Saved.
|
|
485
|
+
T.msg = r && r.ok ? (key === 'grill.mode' ? (value === 'off' ? 'Saved. PMOS no longer grills by itself.' : value === 'exits' ? 'Saved. PMOS grills only before a stage ends.' : 'Saved. PMOS grills by itself when it matters.') : 'Saved. PMOS’s checks spend at most ' + usd(value) + ' a month.') : (r && r.error) || 'Not saved.';
|
|
486
486
|
draw(); return;
|
|
487
487
|
}
|
|
488
488
|
if (t.dataset.evSeg === 'prompt.style') { await savePrompt('prompt.style', t.dataset.v, 'Saved. Sharper prompts follow this style.'); return; }
|
|
489
|
-
if (t.dataset.evNp === 'prompt.next') { const on = setVal('prompt.next', true) === false; await savePrompt('prompt.next', on, on ? 'Saved.
|
|
489
|
+
if (t.dataset.evNp === 'prompt.next') { const on = setVal('prompt.next', true) === false; await savePrompt('prompt.next', on, on ? 'Saved. PMOS suggests the next prompt after a reply.' : 'Saved. No suggestions after a reply.'); return; }
|
|
490
490
|
if (t.dataset.evNp === 'prompt.sharpen') { const sh = setVal('prompt.sharpen', 'auto'), was = sh !== 'off' && !(T.np && T.np.sharpen === false && sh === 'auto'); await savePrompt('prompt.sharpen', was ? 'off' : 'on', was ? 'Saved. Sharpen as I type is off.' : 'Saved. Sharpen as I type is on.'); return; }
|
|
491
491
|
if ('evRulesave' in t.dataset) { const ta = T.el.querySelector('#evRules'); await savePrompt('prompt.rules', ta ? ta.value.slice(0, 1000) : '', 'Saved. Your own rules are used when Sharpen as is Your own.'); return; }
|
|
492
492
|
if (t.dataset.evSeg && t.dataset.evSeg.startsWith('adler.')) { const r = await AD.savePref(pmPost, t.dataset.evSeg, t.dataset.v); T.msg = r && r.ok ? 'Saved.' : (r && r.error) || 'Not saved.'; draw(); return; }
|
|
@@ -520,7 +520,7 @@ async function press(e) {
|
|
|
520
520
|
const r = clear ? await pmSend('DELETE', '/api/anthropic/key') : await pmSend('PUT', '/api/anthropic/key', { key: val });
|
|
521
521
|
if (inp) inp.value = '';
|
|
522
522
|
if (r && r.ok) T.cl = { ...T.cl, key: r.key };
|
|
523
|
-
T.msg = r && r.ok ? (clear ? 'The saved key is removed.' : 'Saved on this computer.
|
|
523
|
+
T.msg = r && r.ok ? (clear ? 'The saved key is removed.' : 'Saved on this computer. PMOS\u2019s own runs use it from now on.') : (r && r.error) || 'Not saved.';
|
|
524
524
|
draw(); return;
|
|
525
525
|
}
|
|
526
526
|
if (await JL.press(t, draw, (m) => { T.msg = m; })) return;
|
|
@@ -48,8 +48,8 @@ export function nodeHtml(state, size = 22) {
|
|
|
48
48
|
function ownerHtml(o) {
|
|
49
49
|
if (!o) return '';
|
|
50
50
|
const k = o.kind === 'jira' ? 'j' : o.kind === 'claude' ? (o.live ? 'c' : 'cw') : 'p';
|
|
51
|
-
const t = o.kind === 'jira' ? 'J' : o.kind === 'claude' ? '
|
|
52
|
-
const name = o.name || (o.kind === 'jira' ? 'Jira' : o.kind === 'claude' ? '
|
|
51
|
+
const t = o.kind === 'jira' ? 'J' : o.kind === 'claude' ? 'P' : String(o.initials || '?').slice(0, 2);
|
|
52
|
+
const name = o.name || (o.kind === 'jira' ? 'Jira' : o.kind === 'claude' ? 'PMOS' : '');
|
|
53
53
|
return `<span class="cz-own ${k}" role="img" aria-label="${esc(name)}" title="${esc(name)}">${esc(t)}</span>`;
|
|
54
54
|
}
|
|
55
55
|
function jiraHtml(j) {
|
|
@@ -183,7 +183,7 @@ export function headHtml(it) {
|
|
|
183
183
|
? `<button type="button" class="cz-vw-pri${x.text && !phone ? '' : ' i'}${x.blue ? ' blue' : ''}" data-cz-vw="press" data-cz-vw-p="${esc(x.act)}" aria-label="${esc(x.label)}" title="${esc(x.label)}">${svg(path(x.icon), 15, 2.2)}${x.text && !phone ? `<span>${esc(x.text)}</span>` : ''}</button>`
|
|
184
184
|
: `<button type="button" class="cz-vw-ib" data-cz-vw="press" data-cz-vw-p="${esc(x.act)}" aria-label="${esc(x.label)}" title="${esc(x.label)}"${x.pressed != null ? ` aria-pressed="${x.pressed ? 'true' : 'false'}"` : ''}>${svg(path(x.icon), 18)}</button>`).join('');
|
|
185
185
|
const sub = o.sub ? `<p class="cz-vw-sub">${esc(o.sub)}</p>` : '';
|
|
186
|
-
const chip = o.chip && (o.chip.n > 0 || o.chip.looking) ? `<button type="button" class="cz-vw-chip${o.chip.looking ? ' live' : ''}" data-cz-vw="chip" aria-haspopup="dialog" aria-label="${esc(o.chip.label || '
|
|
186
|
+
const chip = o.chip && (o.chip.n > 0 || o.chip.looking) ? `<button type="button" class="cz-vw-chip${o.chip.looking ? ' live' : ''}" data-cz-vw="chip" aria-haspopup="dialog" aria-label="${esc(o.chip.label || 'PMOS proposes ' + o.chip.n + '. Open')}" title="${esc(o.chip.label || 'PMOS proposes')}">${svg(ICONS.spark, 13, 2)}${o.chip.n > 0 && !o.chip.quiet ? `<b>${esc(o.chip.n)}</b>` : ''}</button>` : '';
|
|
187
187
|
return (o.canBack || phone ? ib('back', o.canBack ? (o.backTo ? 'Back to ' + o.backTo : 'Back') : 'Close the viewer', P.back) : '')
|
|
188
188
|
+ (o.fwdTo ? ib('fwd', 'Forward to ' + o.fwdTo, P.fwd) : '')
|
|
189
189
|
+ (o.check ? `<button type="button" class="cz-vw-tile cz-vw-chk s-${esc(o.check.state || 'todo')}" data-cz-vw="press" data-cz-vw-p="check" aria-label="${esc(o.check.label || 'Mark done')}" title="${esc(o.check.title || o.check.label || 'Mark done')}"${o.check.disabled ? ' disabled' : ''}><span class="bx"></span></button>`
|
|
@@ -39,7 +39,7 @@ export function compactOffer(c, closes = false, sid = '') {
|
|
|
39
39
|
}
|
|
40
40
|
/** The ✓ that accepts it: types /compact into that session (POST /api/session/compact). */
|
|
41
41
|
export function compactBtnHtml(sid, pct) {
|
|
42
|
-
const say = `Compact this session;
|
|
42
|
+
const say = `Compact this session; PMOS says its context is ${pct}% full`;
|
|
43
43
|
// the same ✓ as item 7's close (.hm-cls): one look for "accept what Claude proposes" on a row
|
|
44
44
|
return `<button type="button" class="ut-ib hv-ib hm-cls" data-hm-compact="${esc(sid)}" aria-label="${esc(say)}" title="Compact this session (types /compact)"><svg 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="M5 12l5 5 9-10"/></svg></button>`;
|
|
45
45
|
}
|
|
@@ -258,7 +258,7 @@ export function wireDash(body, h0) {
|
|
|
258
258
|
if (a === 'needs') {
|
|
259
259
|
const n = need() || {}, w = { ws: h.ws || undefined, board: h.board || undefined, initiative: n.ini || undefined };
|
|
260
260
|
if (k === 'keep') return done(await post('/api/proposals/keep', { ...w, ids: (n.keep && n.keep.ids) || [] }), 'Kept your pick.');
|
|
261
|
-
return done(await post('/api/proposals/drop', { ...w, sig: n.drop && n.drop.sig }), 'Not now. It stays in
|
|
261
|
+
return done(await post('/api/proposals/drop', { ...w, sig: n.drop && n.drop.sig }), 'Not now. It stays in PMOS proposes.');
|
|
262
262
|
}
|
|
263
263
|
if (a === 'promise') { const p = (d.drafts && d.drafts.promise) || {}; return done(await post('/api/ready-reports/promise', { ...base, act: k, date: p.date }), k === 'keep' ? 'Kept. Reports say it is a guess until Jira has tickets.' : 'Not now.'); }
|
|
264
264
|
if (a === 'hold') { const [id, act] = k.split('|'), r = row(id) || {}; return done(await post('/api/ready-reports/hold', { ...base, kind: r.kind, act }), act === 'wait' ? 'It waits. It goes by itself once the source reads, if nothing changed.' : act === 'send-note' ? 'Sent, with the date of the last reading written on it.' : 'Skipped. The next issue covers both weeks.'); }
|
|
@@ -7,7 +7,7 @@ const esc = (s) => String(s == null ? '' : s).replace(/[&<>"']/g, (c) => ({ '&':
|
|
|
7
7
|
|
|
8
8
|
/** The `/` menu (G1): PMOS's /goal, then Claude Code's own commands. */
|
|
9
9
|
export const SLASH = [
|
|
10
|
-
{ cmd: '/goal', name: 'Give
|
|
10
|
+
{ cmd: '/goal', name: 'Give PMOS a goal', say: 'It picks a way to ask about the goal, asks a few questions, then works on it after you press Start.' },
|
|
11
11
|
{ cmd: '/compact', name: 'Compact the conversation', say: 'Claude Code summarises the conversation so far to free room.' },
|
|
12
12
|
{ cmd: '/clear', name: 'Clear the conversation', say: 'Claude Code starts again with an empty context in the same session.' },
|
|
13
13
|
];
|
|
@@ -162,7 +162,7 @@ export function goalBlockHtml(block, { live = false, state = 'grilling', menu =
|
|
|
162
162
|
}
|
|
163
163
|
if (block.step === 'progress') {
|
|
164
164
|
const met = Array.isArray(block.met) ? block.met.length : 0, open = Array.isArray(block.open) ? block.open.length : 0;
|
|
165
|
-
const word = block.state === 'done' ? 'Done, as
|
|
165
|
+
const word = block.state === 'done' ? 'Done, as PMOS sees it' : block.state === 'needs-you' ? 'Needs you' : 'Working';
|
|
166
166
|
return `<p class="gprog">${esc(word)} · ${met} of ${met + open} done points met · unverified</p>`;
|
|
167
167
|
}
|
|
168
168
|
return '';
|
|
@@ -235,17 +235,17 @@ export function goalProgressHtml(goal) {
|
|
|
235
235
|
const now = req.find((x) => !met.has(x)); // the point Claude is on: it cannot be skipped with ×
|
|
236
236
|
const limit = Number.isInteger(d.limit) ? d.limit : 12;
|
|
237
237
|
const pill = goal.state === 'started' ? 'Working · round ' + Math.max(1, (goal.rounds || 0) + 1) + ' of ' + limit
|
|
238
|
-
: goal.state === 'done' ? 'Done, as
|
|
238
|
+
: goal.state === 'done' ? 'Done, as PMOS reports it' : goal.state === 'waiting' ? 'Needs you' : 'Stopped';
|
|
239
239
|
const note = goal.state === 'stopped' ? (WHY[goal.reason] || 'It stopped.') + ' Send a message to go on, or /goal to set a new goal.'
|
|
240
|
-
: goal.state === 'waiting' ? '
|
|
241
|
-
: goal.state === 'done' ? 'Check the work before you rely on it.
|
|
240
|
+
: goal.state === 'waiting' ? 'PMOS needs your answer above. Your reply lets it go on.'
|
|
241
|
+
: goal.state === 'done' ? 'Check the work before you rely on it. PMOS checked its own points.' : 'PMOS keeps working until every point is met, the deadline, or ' + limit + ' rounds.';
|
|
242
242
|
// skip a point (XcbOptions B row 2): × on a point that has not started; struck through with Undo until Claude's next round
|
|
243
243
|
const act = (x) => {
|
|
244
244
|
if (!working || met.has(x)) return '';
|
|
245
245
|
if (skipped.has(x)) return undoable(goal, x) ? `<button type="button" class="rx" data-goal-unskip="${esc(x)}" aria-label="Undo the skip" title="Undo the skip">${P(ICON.undo, 15, 2.2)}</button>` : '';
|
|
246
246
|
return x !== now && req.length > 1 ? `<button type="button" class="rx" data-goal-skip="${esc(x)}" aria-label="Skip this point" title="Skip this point">${P(ICON.x, 14, 2.2)}</button>` : '';
|
|
247
247
|
};
|
|
248
|
-
const word = (x) => (skipped.has(x) ? (undoable(goal, x) ? 'Skipped by you ·
|
|
248
|
+
const word = (x) => (skipped.has(x) ? (undoable(goal, x) ? 'Skipped by you · PMOS drops it after this step' : 'Skipped by you') : met.has(x) ? 'met' : working && x === now ? 'now · Stop or tell PMOS to skip it' : 'open');
|
|
249
249
|
const pts = all.map((x) => `<li class="${met.has(x) ? 'm' : skipped.has(x) ? 'sk' : ''}"><i aria-hidden="true"></i><span>${skipped.has(x) ? `<s>${esc(x)}</s>` : esc(x)}</span><em>${esc(word(x))}</em>${act(x)}</li>`).join('');
|
|
250
250
|
const stop = goal.state === 'started' ? '<div class="chatopts"><button type="button" class="cta alt" data-goal="stop">Stop the goal</button></div>' : '';
|
|
251
251
|
const pen = working ? icb('data-goal="change"', 'Change the plan', ICON.pen) : '';
|
|
@@ -387,8 +387,8 @@ export function gmHtml(G, openHtml, o = {}) {
|
|
|
387
387
|
else if (quiet) a += `<div class="gm-more">${quiet}</div>`;
|
|
388
388
|
// Claude did (AwA): the amber line of a run that stopped, then the newest changes with their reasons and Undo; the rest fold
|
|
389
389
|
const dl = (G.did || []).slice(0, MOVE_CAP), dmore = (G.did || []).length - dl.length;
|
|
390
|
-
if (dl.length || G.failed) a += `<section class="gm-sec gm-didl"><h3 class="gm-sh">
|
|
391
|
-
+ (dmore > 0 ? `<div class="gm-more"><button type="button" data-yd="gm-fold" data-fold="done"><b>${dmore}</b> more
|
|
390
|
+
if (dl.length || G.failed) a += `<section class="gm-sec gm-didl"><h3 class="gm-sh">PMOS did${G.didN ? ` <span class="gm-n">${G.didN} since yesterday</span>` : ''}<button type="button" class="gm-lnk" data-yd="gm-claude">By product</button></h3>${failHtml(G.failed)}${dl.map(didRowHtml).join('')}`
|
|
391
|
+
+ (dmore > 0 ? `<div class="gm-more"><button type="button" data-yd="gm-fold" data-fold="done"><b>${dmore}</b> more PMOS did${svg(CHEV, 14, 2)}</button></div>` : '') + '</section>';
|
|
392
392
|
const b = G.since.length || G.newsN ? `<section class="gm-sec gm-since"><h3 class="gm-sh">Since yesterday${G.since.length ? `<button type="button" class="yd-all" data-yd="seen" aria-label="Mark all ${G.newsN} seen" title="Mark all seen">${svg(MARK2, 18, 1.9)}</button>` : ''}</h3>`
|
|
393
393
|
+ `<div class="gm-sl">${G.since.map((it) => `<button type="button" class="gm-si${it.rise ? ' hot' : ''}" data-yd="news" data-id="${esc(it.id)}"><i aria-hidden="true"></i><span>${esc(it.kind === 'task' ? String(it.title || '').replace(/^New task: /, '') : it.title)}</span>${it.at ? `<em>${esc(at(it.at))}</em>` : ''}</button>`).join('')}</div>`
|
|
394
394
|
+ `<button type="button" class="gm-lnk" data-yd="news-all">New for you · ${G.newsN}</button></section>` : '';
|
|
@@ -52,7 +52,7 @@ const WHY = { exit: 'before it leaves its stage', forecast: 'when its forecast t
|
|
|
52
52
|
export const whyWord = (r) => (r && WHY[r.why]) || '';
|
|
53
53
|
export function runLine(r, now = Date.now()) {
|
|
54
54
|
if (!r) return '';
|
|
55
|
-
return ['
|
|
55
|
+
return ['PMOS grilled it', whenWord(r.at, now)].filter(Boolean).join(' ') + (whyWord(r) ? ', ' + whyWord(r) : '');
|
|
56
56
|
}
|
|
57
57
|
export const turnWord = (to) => (to === 'will-miss' ? 'will miss' : to === 'at-risk' ? 'is at risk' : '');
|
|
58
58
|
|
|
@@ -96,7 +96,7 @@ const I = {
|
|
|
96
96
|
};
|
|
97
97
|
const ROW_ICON = { gate: I.gate, warn: I.warn, clock: I.clock, doc: I.doc, chat: I.chat, goal: I.flag, product: I.chart, routine: I.routine, person: I.person };
|
|
98
98
|
const COMMS = { key: 'comms', name: 'Communicator', initial: 'Co' };
|
|
99
|
-
const CLAUDE = { key: 'claude', name: '
|
|
99
|
+
const CLAUDE = { key: 'claude', name: 'PMOS', initial: 'P' };
|
|
100
100
|
const RET_REASONS = ['wrong facts', 'wrong scope', 'not now', 'too long'];
|
|
101
101
|
const RET_LABEL = { 'wrong facts': 'Facts are wrong', 'wrong scope': 'Wrong scope', 'not now': 'Not needed now', 'too long': 'Too long' };
|
|
102
102
|
const store = {
|
|
@@ -314,7 +314,7 @@ window.addEventListener('hm:mentions', () => { if (S.day) S.day = false; S.sel =
|
|
|
314
314
|
/* ── the list ── */
|
|
315
315
|
const dotCls = (st) => ({ needs: 'you', blocked: 'late', working: 'ok run' }[st] || 'none');
|
|
316
316
|
function tileHtml(r) {
|
|
317
|
-
if (r.kind === 'session' || r.kind === 'person') return avHtml(r.role || { initial: r.initial || '
|
|
317
|
+
if (r.kind === 'session' || r.kind === 'person') return avHtml(r.role || { initial: r.initial || 'P' }, 30, 'hm-tile');
|
|
318
318
|
if (r.kind === 'update') return `<span class="hm-tile">${SVG(I.doc, 14)}</span>`;
|
|
319
319
|
return `<span class="hm-tile">${SVG(ROW_ICON[r.icon] || I.chat, 14)}</span>`;
|
|
320
320
|
}
|
|
@@ -382,7 +382,7 @@ function rankIn() {
|
|
|
382
382
|
// the UI grill's delete list: Your impact's card and the ✦ chip on "Not in an initiative" are gone from Home; they land here instead
|
|
383
383
|
const extra = [];
|
|
384
384
|
if (S.impact && S.impact.c && !S.impact.c.looked) extra.push({ key: 'impact', go: 'impact', title: 'Your impact: ' + S.impact.c.label + ' is ready to check', sub: 'A thank-you and what really moved, from your records.' });
|
|
385
|
-
const lp = LPV.chipOf(); if (lp) extra.push({ key: 'loose', go: 'loose', title: 'Not in an initiative: ' + lp.n + (lp.n === 1 ? ' row' : ' rows') + ' to tidy', sub: '
|
|
385
|
+
const lp = LPV.chipOf(); if (lp) extra.push({ key: 'loose', go: 'loose', title: 'Not in an initiative: ' + lp.n + (lp.n === 1 ? ' row' : ' rows') + ' to tidy', sub: 'PMOS proposes where each one belongs.' });
|
|
386
386
|
for (const l of S.lab || []) extra.push({ key: 'lab:' + l.ws, go: 'lab', ws: l.ws, board: l.board, title: 'Lab: ' + l.n + (l.n === 1 ? ' finding fits' : ' findings fit') + ' no initiative', sub: l.say || 'Keep one to start an initiative, or let it go.' });
|
|
387
387
|
return { products, programs: S.D.programs || [], move: S.move || {}, mentions: MEN.mentionsOf(S.D).waiting, outbox: S.outbox || [], extra };
|
|
388
388
|
}
|
|
@@ -429,7 +429,7 @@ const insightsHref = (ws) => '/premium-intelligence.html' + (ws ? '?ws=' + encod
|
|
|
429
429
|
async function openProps(ws, board, id) {
|
|
430
430
|
await goIni(id);
|
|
431
431
|
const r = await pmGet('/api/proposals?ws=' + encodeURIComponent(ws || '') + '&board=' + encodeURIComponent(board || '') + '&initiative=' + encodeURIComponent(id) + '&grill=all').catch(() => null);
|
|
432
|
-
if (!r || r.ok === false) { toast((r && r.error) || 'What
|
|
432
|
+
if (!r || r.ok === false) { toast((r && r.error) || 'What PMOS proposes could not be read.'); return; }
|
|
433
433
|
const row = iniRowOf(id) || {};
|
|
434
434
|
const IP = await import('./ini-props.js');
|
|
435
435
|
IP.open({ id, title: row.title || id, props: r.props }, { where: () => ({ ws, board }), reload: () => load(), toast: (m, undo) => (undo ? toastUndo(m, undo) : toast(m)) });
|
|
@@ -464,7 +464,7 @@ async function movePress(b) {
|
|
|
464
464
|
let ok = true;
|
|
465
465
|
for (const x of r.props) for (const sig of x.sigs) { const res = await pmPost('/api/proposals/drop', { ws: x.ws, board: x.board, initiative: x.ini, sig }).catch(() => null); if (!res || !res.ok) ok = false; }
|
|
466
466
|
if (!ok) { b.disabled = false; toast('It could not be dropped. Nothing changed.'); return; }
|
|
467
|
-
done('Dropped.
|
|
467
|
+
done('Dropped. PMOS will not raise it again on the same evidence.'); return;
|
|
468
468
|
}
|
|
469
469
|
if (act !== 'mv-yes') { b.disabled = false; return; }
|
|
470
470
|
if (r.kind === 'verdict' && r.verdict) {
|
|
@@ -825,7 +825,7 @@ function cardHtml(id, o = {}) {
|
|
|
825
825
|
+ (then ? `<p class="hm-then"><b>Then:</b> ${esc(then)}</p>` : '')
|
|
826
826
|
+ (time ? `<p class="hm-time${over ? ' over' : ''}">${SVG(I.clock, 13)}${esc(time)}</p>` : ''))
|
|
827
827
|
+ `<div class="hm-acts"><button type="button" class="hm-cta${primary ? '' : ' alt'}" data-hm-cta>${esc(cta)}</button>`
|
|
828
|
-
+ `<button type="button" class="hm-ov" data-hm-ov aria-label="Overview of ${esc(title)} with
|
|
828
|
+
+ `<button type="button" class="hm-ov" data-hm-ov aria-label="Overview of ${esc(title)} with PMOS" title="Overview with PMOS">${avHtml(CLAUDE, 24)}</button></div></div></section>`;
|
|
829
829
|
}
|
|
830
830
|
function drawList() {
|
|
831
831
|
const el = $('#hmList');
|
|
@@ -1048,7 +1048,7 @@ function toItems(cur) {
|
|
|
1048
1048
|
const id = S.ini, at = cur && cur.key;
|
|
1049
1049
|
const ses = S.D.sessions.filter((s) => H.iniOfSession(s) === id && s.shown !== 'exited');
|
|
1050
1050
|
const main = iniTarget(id);
|
|
1051
|
-
return [{ label: 'The initiative’s chat', sub: '
|
|
1051
|
+
return [{ label: 'The initiative’s chat', sub: 'PMOS, with ' + iniTitle(id) + ' as its context', checked: at === main.key, go: () => openTarget(main) }]
|
|
1052
1052
|
.concat(ses.map((s) => { const r = H.roleOf(s, S.D.desk && S.D.desk.roles), st = sessionTarget(s); return { label: H.nameOf(s), sub: r.name + ' · another session of this initiative', checked: at === st.key, go: () => openTarget(st) }; }))
|
|
1053
1053
|
.concat([{ label: 'A new session', sub: 'A fresh conversation in ' + iniTitle(id), go: () => newIn(id) }]);
|
|
1054
1054
|
}
|
|
@@ -1088,8 +1088,8 @@ const scopeOf = (ini) => (ini ? { text: iniTitle(ini), icon: I.flag } : { text:
|
|
|
1088
1088
|
const rich = () => !!S.ini;
|
|
1089
1089
|
function iniTarget(id) {
|
|
1090
1090
|
const h = S.H || {};
|
|
1091
|
-
return { key: 'init:' + id, ini: id, ws: (otherIni(id) || {}).ws || WS || undefined, title: iniTitle(id), about: iniTitle(id), newChat: () => newIn(id), sub: (S.IMid === id && h.stage) || '', scope: scopeOf(id), rich: true, placeholder: 'Message
|
|
1092
|
-
empty: 'Ask about ' + iniTitle(id) + '.
|
|
1091
|
+
return { key: 'init:' + id, ini: id, ws: (otherIni(id) || {}).ws || WS || undefined, title: iniTitle(id), about: iniTitle(id), newChat: () => newIn(id), sub: (S.IMid === id && h.stage) || '', scope: scopeOf(id), rich: true, placeholder: 'Message PMOS about ' + iniTitle(id),
|
|
1092
|
+
empty: 'Ask about ' + iniTitle(id) + '. PMOS reads its records and works in a real Claude Code session.', also: alsoOf(id),
|
|
1093
1093
|
// the initiative's conversation opens on where it stands (AgInitYou), until it has messages of its own
|
|
1094
1094
|
intro: S.IMid === id && h.cur ? { role: CLAUDE, onlyEmpty: true, text: h.cur + '. ' + h.doneOf + '.' + (h.rest.length ? ' Waiting: ' + h.rest.map((x) => x.label).join(', ') + '.' : ''), pills: [{ label: h.cta, primary: true, go: () => cta() }, { label: 'Discuss', go: () => chat.focus() }] } : undefined, context: h.payoff ? 'Initiative ' + id + ': ' + (h.stage || '') + '. ' + (h.time || '') : undefined };
|
|
1095
1095
|
}
|
|
@@ -1136,7 +1136,7 @@ function updateTarget() {
|
|
|
1136
1136
|
return { key: H.UPDATE_KEY, ini: 'product', ws: WS || undefined, title: 'Weekly update', sub: 'Communicator · ' + (sent ? 'sent this week' : 'ready to send'), scope: scopeOf('product'), rich: rich(), role: COMMS, to: null,
|
|
1137
1137
|
intro: { role: COMMS, text: sent ? 'This week\'s update went out from your mail on ' + new Date(sent.at).toDateString() + '.' : text,
|
|
1138
1138
|
pills: sent ? [{ label: 'Read it', primary: true, go: () => openUpdateViewer() }] : [{ label: 'Send now', primary: true, go: () => sendUpdate() }, { label: 'Edit', go: () => { openUpdateViewer(); chat.focus(); } }] },
|
|
1139
|
-
context: (U.unconfirmed.length ? 'Read these first:
|
|
1139
|
+
context: (U.unconfirmed.length ? 'Read these first: PMOS proposed ' + U.unconfirmed.length + ' risks the PM has not confirmed (they are not in the mail): ' + U.unconfirmed.map((x) => x.title + ', ' + x.why).join('; ') + '.\n' : '')
|
|
1140
1140
|
+ 'The weekly update draft for ' + H.productName(S.D) + ':\n' + H.updateText(U, H.productName(S.D)) + '\nRecipients: ' + (U.to.join(', ') || 'none yet') + '. You can change the draft; the PM sends it from their own mail.',
|
|
1141
1141
|
placeholder: 'Tell Communicator what to change', also: null };
|
|
1142
1142
|
}
|
|
@@ -1144,7 +1144,7 @@ function updateTarget() {
|
|
|
1144
1144
|
function productTarget() {
|
|
1145
1145
|
const name = H.productName(S.D), C = H.productCard(S.D, S.D.now);
|
|
1146
1146
|
return { key: 'chat:product', ini: 'product', ws: WS || undefined, title: name, about: name, newChat: () => newProduct(productTarget()), sub: 'Product', scope: scopeOf('product'), rich: false, role: CLAUDE, to: null,
|
|
1147
|
-
placeholder: 'Message
|
|
1147
|
+
placeholder: 'Message PMOS about ' + name, empty: 'Ask about ' + name + '. PMOS reads its goals, its initiatives and this week\'s update.',
|
|
1148
1148
|
context: 'Product ' + name + '. ' + C.of + (C.items.length ? ': ' + C.items.map((x) => x.label).join('; ') : '') + '.', also: null };
|
|
1149
1149
|
}
|
|
1150
1150
|
/** The list's key of the board's own product group ('p:<key>'): its heading shows as selected while the product's page is open. */
|
|
@@ -1246,7 +1246,7 @@ function productPageHtml(x, ws, vid, name, g) {
|
|
|
1246
1246
|
const lead = story ? 'Your weekly update is this story.' : d && d.handled ? d.handled.lead : '';
|
|
1247
1247
|
const rest = story ? 'I keep it current from the records, and every line says where it came from.' : d && d.handled ? d.handled.rest : '';
|
|
1248
1248
|
return PV.pageHtml({ page: 'product:' + (ws || 'own'), line: { lead, rest, warn: !story && !!(d && d.handled && d.handled.tone === 'warn') }, goal: story + intent + goal, cards: progs + budgets, props, tabs,
|
|
1249
|
-
tail: isPhone() ? `<button type="button" class="hi-talk" data-hp="talk">Message
|
|
1249
|
+
tail: isPhone() ? `<button type="button" class="hi-talk" data-hp="talk">Message PMOS about ${esc(name)}</button>` : '' });
|
|
1250
1250
|
}
|
|
1251
1251
|
function productDash(b, ws, vid, name, g) {
|
|
1252
1252
|
const x = PDASH.get(ws) || { d: null, kr: null, open: new Set() }; PDASH.set(ws, x);
|
|
@@ -1327,8 +1327,8 @@ function programTarget(id, task) {
|
|
|
1327
1327
|
const pr = (S.D.programs || []).find((p) => p && p.id === id) || { id, title: (P.get('label') || '').slice(0, 80) || id };
|
|
1328
1328
|
const inis = (pr.members || []).map((m) => m && m.initiative).filter(Boolean);
|
|
1329
1329
|
return { key: 'chat:program:' + id, ws: WS || undefined, title: task ? task.name : pr.title, sub: task ? pr.title : 'Program', prog: { id, title: pr.title },
|
|
1330
|
-
scope: { text: pr.title, icon: TD.P.layers }, rich: false, role: CLAUDE, placeholder: 'Message
|
|
1331
|
-
empty: 'Ask about ' + pr.title + '.
|
|
1330
|
+
scope: { text: pr.title, icon: TD.P.layers }, rich: false, role: CLAUDE, placeholder: 'Message PMOS about ' + pr.title,
|
|
1331
|
+
empty: 'Ask about ' + pr.title + '. PMOS reads the program and its initiatives in a real Claude Code session.',
|
|
1332
1332
|
context: 'Program ' + pr.title + ' (' + id + ')' + (inis.length ? ', with the initiatives ' + inis.join(', ') : '') + '.' + (task ? ' The PM opened its task "' + task.name + '"' + (task.hint ? ' (' + task.hint + ')' : '') + '.' : ''), also: null };
|
|
1333
1333
|
}
|
|
1334
1334
|
/** A chat Intelligence asks for (?ask=insights|verdict): titled from the goal it names (?label), scoped to the product's goals, never "ins:insights"
|
|
@@ -1336,7 +1336,7 @@ function programTarget(id, task) {
|
|
|
1336
1336
|
function insTarget(key) {
|
|
1337
1337
|
const prod = (S.D && H.productName(S.D)) || 'Product', label = (P.get('label') || '').slice(0, 80) || prod + ' goals';
|
|
1338
1338
|
return { ...homeTarget(), key, title: label, sub: key === 'ins:verdict' ? 'Outcome check' : 'Goals', scope: { text: prod + ' goals', icon: I.chart },
|
|
1339
|
-
placeholder: 'Message
|
|
1339
|
+
placeholder: 'Message PMOS about ' + label, context: 'The PM asked from Intelligence about ' + label + ', one of the goals of ' + prod + '. Answer from that product\'s goals and readings.' };
|
|
1340
1340
|
}
|
|
1341
1341
|
function homeTarget() {
|
|
1342
1342
|
// chief-of-staff C1 (board CsA): Home's own chat is the one chat with no scope. Its chip reads Everything; reads run at once and show their source
|
|
@@ -1442,7 +1442,7 @@ function goOtherProduct(g) {
|
|
|
1442
1442
|
if (isPhone()) sheet(false);
|
|
1443
1443
|
syncUrl(); drawList();
|
|
1444
1444
|
const t = { key: 'chat:product:' + ws, ws, title: name, about: name, sub: 'Product', scope: { text: name + ' · product', icon: I.flag }, rich: false, role: CLAUDE, to: null,
|
|
1445
|
-
placeholder: 'Message
|
|
1445
|
+
placeholder: 'Message PMOS about ' + name, empty: 'Ask about ' + name + '. PMOS reads its goals, its initiatives and this week\'s update.',
|
|
1446
1446
|
context: 'Product ' + name + '. ' + C.of + (C.items.length ? ': ' + C.items.map((x) => x.label).join('; ') : '') + '.', also: null };
|
|
1447
1447
|
t.newChat = () => newProduct(t);
|
|
1448
1448
|
openTarget(t);
|
|
@@ -1542,7 +1542,7 @@ function openFinished(f) {
|
|
|
1542
1542
|
function finChat(f) {
|
|
1543
1543
|
S.phoneChat = isPhone();
|
|
1544
1544
|
openTarget({ ...homeTarget(), key: 'chat:fin-' + (f.id || f.title), title: f.title, sub: 'Drafted for you', scope: { text: f.title, icon: I.doc },
|
|
1545
|
-
intro: { role: CLAUDE, text: 'What should I change in ' + f.title + '?' }, placeholder: 'Tell
|
|
1545
|
+
intro: { role: CLAUDE, text: 'What should I change in ' + f.title + '?' }, placeholder: 'Tell PMOS what to change',
|
|
1546
1546
|
context: 'The PM wants to change a draft from today\'s prep run: "' + f.title + '".' + (f.summary ? ' Summary: ' + f.summary : '') + (f.body ? '\nThe draft:\n' + String(f.body).slice(0, 6000) : '') + '\nNothing is sent: write the changed draft here for the PM to read.' });
|
|
1547
1547
|
drawList();
|
|
1548
1548
|
if (isPhone()) VW.close();
|
|
@@ -1916,7 +1916,7 @@ function chatAbout(t) {
|
|
|
1916
1916
|
S.phoneChat = isPhone(); if (isPhone()) VW.close();
|
|
1917
1917
|
S.sel = null; // the conversation is about its own item, not the row picked in the list (its header named that row)
|
|
1918
1918
|
openTarget({ ...homeTarget(), key: t.key, title: t.title, scope: t.scope && t.scope.text ? { text: String(t.scope.text), icon: t.scope.icon || I.chat } : { text: 'Report · ' + t.title, icon: I.chat }, intro: t.intro ? { role: CLAUDE, text: t.intro } : undefined,
|
|
1919
|
-
placeholder: t.placeholder || 'Message
|
|
1919
|
+
placeholder: t.placeholder || 'Message PMOS', context: t.context });
|
|
1920
1920
|
drawList(); chat.focus();
|
|
1921
1921
|
}
|
|
1922
1922
|
addEventListener('pmos-chat-about', (e) => { const t = e.detail; if (!t || !/^pop:[A-Za-z0-9][A-Za-z0-9._:-]{0,100}$/.test(String(t.key)) || !t.context) return; e.preventDefault(); chatAbout(t); });
|
|
@@ -1986,7 +1986,7 @@ function newLoose() {
|
|
|
1986
1986
|
if (S.ini) { S.ini = null; drawList(); syncUrl(); }
|
|
1987
1987
|
S.sel = null;
|
|
1988
1988
|
S.phoneChat = isPhone(); drawList();
|
|
1989
|
-
openTarget({ key, ws: WS || undefined, title: 'New chat', scope: { text: 'Loose', icon: I.chat, loose: true }, rich: false, placeholder: 'Message
|
|
1989
|
+
openTarget({ key, ws: WS || undefined, title: 'New chat', scope: { text: 'Loose', icon: I.chat, loose: true }, rich: false, placeholder: 'Message PMOS', empty: 'A loose chat. Link it to an initiative when it turns into one.', onSent: () => setTimeout(load, 1500) });
|
|
1990
1990
|
chat.focus();
|
|
1991
1991
|
}
|
|
1992
1992
|
async function endRow(id) {
|
|
@@ -108,7 +108,7 @@ export function blockAsk(b) {
|
|
|
108
108
|
|
|
109
109
|
/** The card: the kind's label, what it asks, the before → after where the change holds both, then the answers. live: false draws the
|
|
110
110
|
* answers off (an ask that was answered stays readable). more: the prompt's other choices behind a quiet ⋯ (kept from the earlier card). */
|
|
111
|
-
export function askCardHtml(a, { live = true, role = '
|
|
111
|
+
export function askCardHtml(a, { live = true, role = 'PMOS' } = {}) {
|
|
112
112
|
if (!a) return '';
|
|
113
113
|
const ft = a.from || a.to ? `<p class="ft">${a.from ? `<s>${esc(a.from)}</s> → ` : ''}<b>${esc(a.to)}</b></p>` : '';
|
|
114
114
|
const more = live && a.more && a.more.length
|