create-pmos 0.553.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 +20 -14
- package/payload/KIT-VERSION +1 -1
- package/payload/planning/evals/eval-calibration.md +1 -1
- package/payload/planning/okrs/health-budgets.md +1 -1
- package/payload/state/discoveries.md +1 -1
- package/workspace/briefing-premium-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 +19 -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 +17 -17
- 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/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-next.js +10 -10
- package/workspace/public/pm/bd-prog-panel.js +5 -5
- package/workspace/public/pm/chat-ask.js +1 -1
- package/workspace/public/pm/chat-context.js +3 -3
- 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-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
|
@@ -123,7 +123,7 @@ export function goalModel(goal, conv, o = {}) {
|
|
|
123
123
|
const undo = (p) => Number.isFinite(at(p)) && (!Number.isFinite(round) || at(p) > round);
|
|
124
124
|
const all = pts.map((x, i) => {
|
|
125
125
|
const st = met.has(x) ? 'done' : skip.has(x) ? 'skip' : i === cur && run && !asking ? 'now' : 'next';
|
|
126
|
-
const sub = st === 'done' ? 'met' : st === 'skip' ? (undo(x) ? 'Skipped by you ·
|
|
126
|
+
const sub = st === 'done' ? 'met' : st === 'skip' ? (undo(x) ? 'Skipped by you · PMOS drops it after this step' : 'Skipped by you') : i === cur && !asking ? 'now · Stop or tell PMOS to skip it' : '';
|
|
127
127
|
const act = st === 'skip' && undo(x) ? { attr: `data-goal-unskip="${esc(x)}"`, icon: 'undo', label: 'Undo the skip' }
|
|
128
128
|
: st === 'next' && i !== cur && left > 1 ? { attr: `data-goal-skip="${esc(x)}"`, icon: 'x', label: 'Skip this point' } : null;
|
|
129
129
|
return { text: x, state: st, sub, act };
|
|
@@ -132,10 +132,10 @@ export function goalModel(goal, conv, o = {}) {
|
|
|
132
132
|
const nMet = pts.filter((x) => met.has(x)).length;
|
|
133
133
|
return {
|
|
134
134
|
kind: 'goal', icon: asking ? 'none' : 'spin', tone: asking ? 'you' : '',
|
|
135
|
-
text: asking ? '
|
|
135
|
+
text: asking ? 'PMOS asks before it goes on' : cur >= 0 ? pts[cur] : d.goal || 'Goal',
|
|
136
136
|
count: asking ? '' : `${nMet} of ${count} done`, clock: '',
|
|
137
137
|
title: d.goal || 'Goal',
|
|
138
|
-
head: `${nMet} of ${count} points met · round ${Math.max(1, (goal.rounds || 0) + 1)} of ${limit}${d.by ? ' · due ' + d.by : ''} ·
|
|
138
|
+
head: `${nMet} of ${count} points met · round ${Math.max(1, (goal.rounds || 0) + 1)} of ${limit}${d.by ? ' · due ' + d.by : ''} · PMOS checks its own points`,
|
|
139
139
|
items: w.items, more: w.more, now: run && !asking ? nowText(conv) : '', call: run ? nowCall(conv) : '', term: !!o.term,
|
|
140
140
|
open: !!o.open, on: !!o.on, frac: count ? nMet / count : 0,
|
|
141
141
|
};
|
|
@@ -151,7 +151,7 @@ export function sessionModel(conv, o = {}) {
|
|
|
151
151
|
if (!steps) {
|
|
152
152
|
// no to-do list: the turn's goal leads (Claude's newest status line), the clock sits at the end; with none, "Working · 3:12"
|
|
153
153
|
const goal = asking ? '' : turnGoal(conv);
|
|
154
|
-
return { kind: 'session', icon: asking ? 'none' : 'spin', tone: asking ? 'you' : '', text: asking ? '
|
|
154
|
+
return { kind: 'session', icon: asking ? 'none' : 'spin', tone: asking ? 'you' : '', text: asking ? 'PMOS asks before it goes on' : goal || 'Working', clock: asking ? '' : clock, count: '',
|
|
155
155
|
clockEnd: !!goal, title: o.title || 'Working', head: goal && clock ? 'Working · ' + clock : '', items: [], more: 0, now: '', call, term: !!o.term, open: !!o.open, on: !!o.on, frac: 0, plain: true };
|
|
156
156
|
}
|
|
157
157
|
const cur = steps.findIndex((s) => s.state === 'now');
|
|
@@ -160,7 +160,7 @@ export function sessionModel(conv, o = {}) {
|
|
|
160
160
|
const w = window5(all, cur, o.all);
|
|
161
161
|
return {
|
|
162
162
|
kind: 'session', icon: asking ? 'none' : 'spin', tone: asking ? 'you' : '',
|
|
163
|
-
text: asking ? '
|
|
163
|
+
text: asking ? 'PMOS asks before it goes on' : cur >= 0 ? steps[cur].text : 'Working',
|
|
164
164
|
count: asking ? '' : `${done} of ${steps.length} done`, clock: '',
|
|
165
165
|
title: o.title || 'Steps', head: `${done} of ${steps.length} done${clock ? ' · ' + clock : ''}`,
|
|
166
166
|
items: w.items, more: w.more, now: '', call: (cur >= 0 && steps[cur].call) || call, term: !!o.term,
|
|
@@ -210,9 +210,9 @@ const face = (m) => `<span class="mn-av" aria-hidden="true">${initials(peopleOf(
|
|
|
210
210
|
function draftHtml(m, o = {}) {
|
|
211
211
|
if (m.drafted) return `<p class="mn-sent">${svg(P.send, 12, 2.2)}<span>Sent from ${esc(srcName(m.source))}? I’ll see it at the next read.</span></p>`;
|
|
212
212
|
if (m.nodraft) return `<div class="mn-dr no"><p class="mn-drh">${svg(P.spark, 12, 2)}<span>I can’t draft this one</span></p><p>${esc(m.nodraft)}</p></div>`
|
|
213
|
-
+ (o.acts === false ? '' : `<div class="mn-acts">${ib(`data-mn="pen" data-id="${esc(m.id)}"`, 'Write it with
|
|
213
|
+
+ (o.acts === false ? '' : `<div class="mn-acts">${ib(`data-mn="pen" data-id="${esc(m.id)}"`, 'Write it with PMOS', P.pen, true)}</div>`);
|
|
214
214
|
if (m.draft) return `<div class="mn-dr"><p class="mn-drh">${svg(P.spark, 12, 2)}<span>I drafted your reply</span></p><p data-mn-draft>${esc(m.draft)}</p></div>`
|
|
215
|
-
+ (o.acts === false ? '' : `<div class="mn-acts">${ib(`data-mn="pen" data-id="${esc(m.id)}"`, 'Change it with
|
|
215
|
+
+ (o.acts === false ? '' : `<div class="mn-acts">${ib(`data-mn="pen" data-id="${esc(m.id)}"`, 'Change it with PMOS', P.pen)}${ib(`data-mn="send" data-id="${esc(m.id)}"`, 'Copy it and open ' + srcName(m.source) + '. PMOS never posts.', P.send, true)}</div>`);
|
|
216
216
|
return '';
|
|
217
217
|
}
|
|
218
218
|
const checkHtml = (m) => (m.check ? `<div class="hr-ck" role="group" aria-label="${esc('Did you answer ' + nameOf(m) + ' already?')}"><span>Did you answer this already?</span>`
|
|
@@ -463,8 +463,8 @@ export function convHtml(m, ctx, o = {}) {
|
|
|
463
463
|
if (m.waiting) {
|
|
464
464
|
const reply = m.drafted ? draftHtml(m) : m.draft ? `<div class="mn-dr in"><p class="mn-drh">${svg(P.spark, 12, 2)}<span>I drafted your reply</span></p><p data-mn-draft>${esc(m.draft)}</p></div>`
|
|
465
465
|
: m.nodraft ? `<div class="mn-dr no in"><p class="mn-drh">${svg(P.spark, 12, 2)}<span>I can’t draft this one</span></p><p>${esc(m.nodraft)}</p></div>` : '';
|
|
466
|
-
const right = m.draft && !m.drafted ? ib(`data-mn="pen" data-id="${esc(m.id)}"`, 'Change it with
|
|
467
|
-
: m.drafted ? '' : ib(`data-mn="pen" data-id="${esc(m.id)}"`, 'Write it with
|
|
466
|
+
const right = m.draft && !m.drafted ? ib(`data-mn="pen" data-id="${esc(m.id)}"`, 'Change it with PMOS', P.pen) + ib(`data-mn="send" data-id="${esc(m.id)}"`, 'Copy it and open ' + srcName(m.source) + '. PMOS never posts.', P.send, true)
|
|
467
|
+
: m.drafted ? '' : ib(`data-mn="pen" data-id="${esc(m.id)}"`, 'Write it with PMOS', P.pen, true);
|
|
468
468
|
top = `<div class="mn-ask"><p class="mn-ak${late(m.since, now) ? ' late' : ''}">Asks you · ${esc(age(m.since, now))}</p><p class="mn-aq">${esc(m.ask || gistOf(m))}</p>${reply}`
|
|
469
469
|
+ `<div class="mn-acts sp"><span class="mn-four">${four}</span><span>${right}</span></div>${checkHtml(m)}</div>`;
|
|
470
470
|
} else top = `<div class="mn-ask calm"><p class="mn-ak">${esc(statusLine(m))}</p><p class="mn-aq">${esc(gistOf(m))}</p></div>`;
|
|
@@ -37,5 +37,5 @@ export function momentIntro(m, { esc, pmPost, guide, done }) {
|
|
|
37
37
|
done();
|
|
38
38
|
return false;
|
|
39
39
|
};
|
|
40
|
-
return { role: { key: 'claude', name: '
|
|
40
|
+
return { role: { key: 'claude', name: 'PMOS', initial: 'P' }, mood: 'handled', text: '✦ ' + m.text, card: { html, press } };
|
|
41
41
|
}
|
|
@@ -133,7 +133,7 @@ export function needModel(r, ctx = {}) {
|
|
|
133
133
|
m.line = 'Blocked at ' + (STEP_AT[step] || 'the ' + step + ' step'); m.tone = 'warn';
|
|
134
134
|
m.offer = 'No next step is on record, so I can’t start one yet. Tell me what unblocks it, or let me look.';
|
|
135
135
|
m.primary = { act: 'find', label: 'Find the next step', icon: SPARK };
|
|
136
|
-
m.also = [{ act: 'talk', label: 'Tell
|
|
136
|
+
m.also = [{ act: 'talk', label: 'Tell PMOS in the chat', icon: CHAT }];
|
|
137
137
|
}
|
|
138
138
|
m.sections = [why, where];
|
|
139
139
|
return m;
|
|
@@ -58,7 +58,7 @@ export function mountPhoneCard(o) {
|
|
|
58
58
|
if (mo.kind === 'work') return `<span class="label">${mo.next ? 'Next: ' + esc(mo.next.title) + ' at ' + hm(mo.next.start) : 'No more meetings today'}</span>${big(fin.length ? 'Finished for you' : 'Nothing new from the agent')}${fin.length ? finRows(2) + S('Approving a draft waits for your computer.') : dayErr() || S('When the agent finishes a draft today, it shows here.')}${mo.fits.length ? fits(mo.fits) : ''}${mo.next ? `<div class="phacts">${open(mo.next)}</div>` : ''}`;
|
|
59
59
|
if (mo.kind === 'recap') { // Your day E (YdE3Evening): what today made possible, wins only; a real thank-you when one exists; no zero counts
|
|
60
60
|
const r = day && day.recap, one = mine[0], ty = thanks();
|
|
61
|
-
const KIND = { decision: 'Decided', done: 'Done', agent: '
|
|
61
|
+
const KIND = { decision: 'Decided', done: 'Done', agent: 'PMOS' };
|
|
62
62
|
const moved = r && (r.moved || []).length ? `<div class="phmv">${r.moved.map((x) => `<p><b>${esc(KIND[x.kind] || '')}</b><span>${esc(x.text)}</span>${x.sub ? `<em>${esc(x.sub)}</em>` : ''}</p>`).join('')}</div>` : dayErr();
|
|
63
63
|
const quote = ty ? `<div class="phty"><p class="phl">“${esc(ty.quote)}”</p><p class="phs">${esc([ty.who, ty.where].filter(Boolean).join(' on '))}${ty.at ? ' · ' + esc(ty.at) : ''}</p></div>` : '';
|
|
64
64
|
const conf = r && r.to_confirm ? `<p class="phs phq">${esc(num(r.to_confirm, 'decision', 'decisions'))} from today's notes ${r.to_confirm === 1 ? 'is' : 'are'} not confirmed yet, so ${r.to_confirm === 1 ? 'it does' : 'they do'} not count. Confirm them in the meeting's Replay.</p>` : '';
|
|
@@ -46,7 +46,7 @@ export function stepRows(h, o = {}) {
|
|
|
46
46
|
else wait.push({ state: 'wait', label: x.label, note: x.note });
|
|
47
47
|
}
|
|
48
48
|
// a session works on this initiative but no step names it: its own line, so the spinner is never invented and never hidden
|
|
49
|
-
if (o.run && !ran) run.push({ state: 'run', label: o.run.title || '
|
|
49
|
+
if (o.run && !ran) run.push({ state: 'run', label: o.run.title || 'PMOS works on it', note: runNote(), owner: { kind: 'claude', live: true }, node: adNode('thinking', 'run') });
|
|
50
50
|
const open = you.concat(run, risk, wait);
|
|
51
51
|
const shown = o.moreOpen ? open : open.slice(0, OPEN_MAX);
|
|
52
52
|
const done = ((h && h.done) || []).map((x) => ({ state: 'done', label: x.label }));
|
|
@@ -80,7 +80,7 @@ export function nextNote(h, mv) {
|
|
|
80
80
|
export function nextReason(h) {
|
|
81
81
|
const nx = (h && h.next) || {};
|
|
82
82
|
const w = nx.when || null, r = nx.reading || null;
|
|
83
|
-
if (w && w.mode === 'only') return 'Runs only when ' + String(w.text || 'its condition holds').replace(/\.$/, '') + '.' + (r && r.why ? ' ' + r.why.replace(/\.$/, '') + (r.runs === true ? ', so it runs.' : r.runs === false ? ', so it is skipped.' : '.') : '
|
|
83
|
+
if (w && w.mode === 'only') return 'Runs only when ' + String(w.text || 'its condition holds').replace(/\.$/, '') + '.' + (r && r.why ? ' ' + r.why.replace(/\.$/, '') + (r.runs === true ? ', so it runs.' : r.runs === false ? ', so it is skipped.' : '.') : ' PMOS has not read it yet.');
|
|
84
84
|
return (h && h.payoff) || '';
|
|
85
85
|
}
|
|
86
86
|
|
|
@@ -60,7 +60,7 @@ export function chaseModel(b, o = {}) {
|
|
|
60
60
|
});
|
|
61
61
|
const count = `${replied} of ${people.length} replied`;
|
|
62
62
|
return {
|
|
63
|
-
kind: 'chase', icon: 'clock', tone: o.asking ? 'you' : '', text: o.asking ? '
|
|
63
|
+
kind: 'chase', icon: 'clock', tone: o.asking ? 'you' : '', text: o.asking ? 'PMOS asks before it goes on' : what,
|
|
64
64
|
count: o.asking ? '' : count, clock: '', stopLabel: 'Stop chasing', title: what,
|
|
65
65
|
head: count + (next ? ' · next nudge ' + next : ''), items, more: 0, now: '', term: false,
|
|
66
66
|
open: !!o.open, on: !!o.on, frac: replied / people.length, what,
|
|
@@ -108,7 +108,7 @@ export function kidSub(k) {
|
|
|
108
108
|
/** What Claude proposes on one row of the list (canvas XcsA1Pill): a session idle and safe to close gets the ✦ in its line and one ✓. One ✦ a row. */
|
|
109
109
|
export function kidActHtml(k) {
|
|
110
110
|
if (!(k && k.kind === 'session' && k.close && k.close.safe && k.sid)) return '';
|
|
111
|
-
return `<button type="button" class="ut-ib hv-ib hm-cls" data-hm-close="${esc(k.sid)}" aria-label="Close this session;
|
|
111
|
+
return `<button type="button" class="ut-ib hv-ib hm-cls" data-hm-close="${esc(k.sid)}" aria-label="Close this session; PMOS says it is idle and safe" title="Close this session; PMOS says it is idle and safe">${svg(P.check, 16)}</button>`;
|
|
112
112
|
}
|
|
113
113
|
/** The pill's model: the most urgent state, the count and its accessible words. Nothing in the initiative: null (zero is silence). */
|
|
114
114
|
export function pillOf(r) {
|
|
@@ -262,7 +262,7 @@ function looseHtml(g, o) {
|
|
|
262
262
|
const sig = open ? '' : (S2.needs ? '<span class="hv-d sm" aria-hidden="true"></span>' : '') + (S2.late ? '<span class="hv-lt" aria-hidden="true"></span>' : '') + g.n;
|
|
263
263
|
// the blue ✦ and the number of rows Claude proposes to place (batch 13 item 3, XlcA1Desk): only when it has some (zero is silence)
|
|
264
264
|
const c = g.chip && g.chip.n ? g.chip : null;
|
|
265
|
-
const chip = c ? `<button type="button" class="lp-chip" data-lp-open aria-haspopup="dialog" aria-label="${esc(c.label)}" title="
|
|
265
|
+
const chip = c ? `<button type="button" class="lp-chip" data-lp-open aria-haspopup="dialog" aria-label="${esc(c.label)}" title="PMOS proposes a clean-up">${svg(SPARK, 13)}<b>${c.n}</b></button>` : '';
|
|
266
266
|
return `<section class="hm-pg hv-g loose" aria-label="${esc(g.name)}"><div class="hv-lhw${chip ? ' has-chip' : ''}"><button type="button" class="hv-lh" data-hm-pg="${esc(g.key)}" aria-expanded="${open}" aria-label="${esc(g.name)}: ${esc(say)}. ${open ? 'Close' : 'Open'}">${esc(g.name)}<span class="n"><span class="nl">${sig}</span>${svg(open ? P.chevD : P.chevR, 15)}</span></button>${chip}</div>`
|
|
267
267
|
+ (open ? `<div class="hv-card">${g.rows.map((r) => rowHtml(r, o)).join('')}</div>` : '') + '</section>';
|
|
268
268
|
}
|
|
@@ -134,12 +134,12 @@ export function aboutHtml(v, o, open) {
|
|
|
134
134
|
desc = para(id, own) + (d && d.state === 'ok' && saysMore(own, d.text) ? `<h5 class="ab-from">From the PRD</h5>${para(id + '|prd', d.text)}${openPrd}` : '');
|
|
135
135
|
} else if (d && d.state === 'ok') { fromPrd = true; desc = para(id, d.text) + openPrd; }
|
|
136
136
|
else if (prd && (!d || d.state === 'loading')) desc = '<p class="ab-p q">Reading the PRD…</p>';
|
|
137
|
-
else desc = `<p class="ab-p q">No description yet.</p><a class="ab-lk" href="${esc(homeHref(ws, id, 'Draft the description of ' + (v.title || id) + ' (' + id + ') from what you can read, and save it to the initiative once I keep it: '))}">${SVG(P.chat, 14)} Ask
|
|
137
|
+
else desc = `<p class="ab-p q">No description yet.</p><a class="ab-lk" href="${esc(homeHref(ws, id, 'Draft the description of ' + (v.title || id) + ' (' + id + ') from what you can read, and save it to the initiative once I keep it: '))}">${SVG(P.chat, 14)} Ask PMOS to draft it</a>`;
|
|
138
138
|
let met;
|
|
139
139
|
if (M && M.mode === 'open') met = MD.iniHtml(id, ws, v.title);
|
|
140
140
|
else if (M && M.mode === 'kept') met = `<div class="ab-ml">${M.rows.map((r) => rowHtml(r, o)).join('')}</div>`
|
|
141
141
|
+ MD.ib({ act: 'undo', scope: 'initiative', id, icon: P.undo, label: 'Undo: make the success measure a proposal again', title: 'Undo', busy: M.busy });
|
|
142
|
-
else met = `<p class="ab-p q">No success measure yet.</p><a class="ab-lk" href="${esc(homeHref(ws, id, 'Propose a success measure for ' + (v.title || id) + ': '))}">${SVG(P.chat, 14)} Ask
|
|
142
|
+
else met = `<p class="ab-p q">No success measure yet.</p><a class="ab-lk" href="${esc(homeHref(ws, id, 'Propose a success measure for ' + (v.title || id) + ': '))}">${SVG(P.chat, 14)} Ask PMOS to propose one</a>`;
|
|
143
143
|
const anchor = v.anchor ? `<span>Anchored to ${esc(v.anchor)}</span>` : '';
|
|
144
144
|
return `<section class="iv-ab" aria-label="About"><button type="button" class="iv-ab-h" data-iv-mc="ab" aria-expanded="${!!open}"><b>About</b>${sum}<span class="chev" aria-hidden="true">${SVG(P.down, 16, 2)}</span></button>`
|
|
145
145
|
+ (open ? `<div class="iv-ab-b"><div class="ab-d"><h4>Description${fromPrd ? ' <span>From the PRD</span>' : ''}</h4>${desc}</div><div class="ab-m"><h4>Success measure ${anchor}</h4>${met}</div></div>` : '') + '</section>';
|
|
@@ -23,7 +23,7 @@ const P = { undo: 'M9 14L4 9l5-5M4 9h10a6 6 0 0 1 0 12h-3', check: 'M5 12l5 5 9-
|
|
|
23
23
|
const MON = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
|
24
24
|
const dm = (iso) => { const m = /^(\d{4})-(\d{2})-(\d{2})/.exec(String(iso || '')); return m ? +m[3] + ' ' + MON[+m[2] - 1] : ''; };
|
|
25
25
|
const DAY = 864e5, SHOW = 3;
|
|
26
|
-
export const WHO = { factory: '
|
|
26
|
+
export const WHO = { factory: 'PMOS builds it (the factory).', team: 'The team builds it. PMOS writes the done test.', 'team-agents': 'The team’s agents build it. PMOS writes the done test.' };
|
|
27
27
|
|
|
28
28
|
const art = (A, key) => ((A && A.artefacts) || []).find((a) => a.key === key) || null;
|
|
29
29
|
const one = (a, f) => { const v = a && a.fields && a.fields[f]; return v && !Array.isArray(v) && v.text ? v : null; };
|
|
@@ -77,7 +77,7 @@ export function comingUp(v) {
|
|
|
77
77
|
return null;
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
const failLine = (F) => `<div class="ia-fl" role="status">${SVG(P.warn, 14, 2)}<span>${esc((F.n === 1 ? 'The ' + dm(F.at) + ' run' : F.n + ' runs') + ' ended with an error.' + (F.why ? ' ' + String(F.why).replace(/\.?$/, '.') : '') + '
|
|
80
|
+
const failLine = (F) => `<div class="ia-fl" role="status">${SVG(P.warn, 14, 2)}<span>${esc((F.n === 1 ? 'The ' + dm(F.at) + ' run' : F.n + ' runs') + ' ended with an error.' + (F.why ? ' ' + String(F.why).replace(/\.?$/, '.') : '') + ' PMOS runs ' + (F.n === 1 ? 'it' : 'them') + ' again on the next wake. Nothing ' + (F.n === 1 ? 'it' : 'they') + ' made was kept.')}</span></div>`;
|
|
81
81
|
|
|
82
82
|
export function expHtml(M) {
|
|
83
83
|
if (!M || !M.exp) return '';
|
|
@@ -86,8 +86,8 @@ export function expHtml(M) {
|
|
|
86
86
|
return r.edit ? `<button type="button" class="ia-xr" data-ia-edit="${esc(r.key)}" aria-label="${esc(r.label + ': ' + r.text + '. Edit')}" title="Edit"><b>${esc(r.label)}</b>${val}</button>`
|
|
87
87
|
: `<div class="ia-xr"><b>${esc(r.label)}</b>${val}</div>`;
|
|
88
88
|
};
|
|
89
|
-
return `<section class="ia-sec" aria-label="Experiment" data-ia-exp><div class="ia-th"><b>Experiment</b><span class="n">${esc('
|
|
90
|
-
+ `<div class="iv-folds">${M.exp.rows.map(rowHtml).join('')}<p class="ia-note">Press a line to edit it.
|
|
89
|
+
return `<section class="ia-sec" aria-label="Experiment" data-ia-exp><div class="ia-th"><b>Experiment</b><span class="n">${esc('PMOS keeps it' + (M.exp.at ? ' · ' + dm(M.exp.at) : ''))}</span></div>`
|
|
90
|
+
+ `<div class="iv-folds">${M.exp.rows.map(rowHtml).join('')}<p class="ia-note">Press a line to edit it. PMOS asks before it changes one you edited.</p></div></section>`;
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
export function workHtml(M, up, o = {}) {
|
|
@@ -99,7 +99,7 @@ export function workHtml(M, up, o = {}) {
|
|
|
99
99
|
+ (more > 0 ? `<button type="button" class="iv-fr" data-ia-more aria-expanded="false"><b>${more} more</b><span class="iv-cv" aria-hidden="true">${SVG(P.right, 14, 2)}</span></button>` : '') + '</div>' : '';
|
|
100
100
|
const cu = up ? `<p class="ia-cu">${SVG(P.clock, 14, 2)}<span><b>${esc('Coming up · ' + up.date + '.')}</b> ${esc(up.text)}</span></p>` : '';
|
|
101
101
|
const n = M.week ? M.week + ' this week' : M.work.length ? M.work.length + ' in 14 days' : '';
|
|
102
|
-
return `<section class="ia-sec" aria-label="
|
|
102
|
+
return `<section class="ia-sec" aria-label="PMOS’s work" data-ia-work><div class="ia-th"><b>PMOS’s work</b>${n ? `<span class="n">${esc(n)}</span>` : ''}</div>${list}${cu}</section>`;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
/** Both sections in one holder the page can swap when the reads arrive. */
|
|
@@ -88,7 +88,7 @@ export function headHtml(lk) {
|
|
|
88
88
|
if (!lk) return '';
|
|
89
89
|
let h = '';
|
|
90
90
|
const nm = lk.moved ? lk.moved.n : 0, na = (lk.asks || []).filter((a) => !a.sent).length;
|
|
91
|
-
if (nm || na) h += `<button type="button" class="lk-chip mv" data-lk-chip="moved" aria-haspopup="dialog" aria-expanded="false" aria-label="${esc((nm ? '
|
|
91
|
+
if (nm || na) h += `<button type="button" class="lk-chip mv" data-lk-chip="moved" aria-haspopup="dialog" aria-expanded="false" aria-label="${esc((nm ? 'PMOS moved ' + plural(nm, 'task', 'tasks') + ' to keep your links' : '') + (nm && na ? '; ' : '') + (na ? plural(na, 'thing waits', 'things wait') + ' on you' : '') + '. Open')}" title="Kept in line">${SVG(PL.spark, 14, 2)}${nm ? `<b>${nm}</b>` : ''}${na ? '<i class="lk-ask" aria-hidden="true"></i>' : ''}</button>`;
|
|
92
92
|
const nl = (lk.late || []).length;
|
|
93
93
|
if (nl) h += `<button type="button" class="lk-chip lt" data-lk-chip="late" aria-pressed="${!!(PIN && PIN.uid === '*late' && PIN.id === lk.id)}" aria-label="${esc(plural(nl, 'task waits', 'tasks wait') + ' on a late task. Show the chain')}" title="Waits on a late task"><i aria-hidden="true"></i><b>${nl}</b></button>`;
|
|
94
94
|
return h;
|
|
@@ -105,7 +105,7 @@ export function barExtra(x, lk, quick) {
|
|
|
105
105
|
const on = endsOf(lk, x.uid), late = (lk.late || []).includes(x.uid), mv = lk.moved && lk.moved.tasks.includes(x.uid);
|
|
106
106
|
const dot = (e) => `<span class="lk-dt ${e}${on.has(e) ? ' on' : ''}"${quick && !x.closed ? ` data-lk-dot="${e === 'l' ? 'start' : 'finish'}"` : ''} aria-hidden="true"></span>`;
|
|
107
107
|
return (quick && !x.closed ? dot('l') + dot('r') : (on.has('l') ? dot('l') : '') + (on.has('r') ? dot('r') : ''))
|
|
108
|
-
+ (late ? '<span class="lk-le" aria-hidden="true"></span>' : '') + (mv ? `<span class="lk-mv" role="img" aria-label="Moved by
|
|
108
|
+
+ (late ? '<span class="lk-le" aria-hidden="true"></span>' : '') + (mv ? `<span class="lk-mv" role="img" aria-label="Moved by PMOS to keep a link" title="Moved by PMOS to keep a link">${SVG(PL.spark, 10, 2.4)}</span>` : '');
|
|
109
109
|
}
|
|
110
110
|
/** What a bar says about its links, for its aria-label. */
|
|
111
111
|
export function barWords(x, lk) {
|
|
@@ -345,7 +345,7 @@ async function ownMove(H, id, uid, patch) {
|
|
|
345
345
|
const res = await write(H, '/move', { task: uid, ...patch });
|
|
346
346
|
if (!res || res.ok === false) return failed(H, res);
|
|
347
347
|
const lk = VIEWS.get(id);
|
|
348
|
-
say(H, res.pulled ? 'Dates saved: ' + clip(nameOf(lk, uid), 40) + '.
|
|
348
|
+
say(H, res.pulled ? 'Dates saved: ' + clip(nameOf(lk, uid), 40) + '. PMOS proposes pulling ' + plural(res.pulled, 'task', 'tasks') + ' in (✦).' : movedText(res, 'Dates saved: ' + clip(nameOf(lk, uid), 40)) + '.', undoBatch(H, res.batch));
|
|
349
349
|
CACHE.delete(id); await after(H);
|
|
350
350
|
return true;
|
|
351
351
|
}
|
|
@@ -367,7 +367,7 @@ function movedHtml(lk) {
|
|
|
367
367
|
h += `<div class="lk-pr">${ic}<span class="w"><b>${esc(t)}</b><small>${esc(a.text)}</small></span><button type="button" class="vs-ok" data-lk-ay="${esc(a.id)}" aria-label="${a.kind === 'jira' ? 'Put the comment in the outbox' : 'Move it'}" title="${a.kind === 'jira' ? 'Put the comment in the outbox' : 'Move it'}">${SVG(PL.check, 16, 2.4)}</button><button type="button" class="vs-ti" data-lk-an="${esc(a.id)}" aria-label="Keep the date" title="Keep the date">${SVG(PL.x, 15, 2)}</button></div>`;
|
|
368
368
|
}
|
|
369
369
|
}
|
|
370
|
-
h += `<hr><button type="button" class="o lk-q" role="menuitemcheckbox" aria-checked="${!!lk.quiet}" data-lk-quiet><span class="nn">Keep dates in line quietly<small>${lk.quiet ? '
|
|
370
|
+
h += `<hr><button type="button" class="o lk-q" role="menuitemcheckbox" aria-checked="${!!lk.quiet}" data-lk-quiet><span class="nn">Keep dates in line quietly<small>${lk.quiet ? 'PMOS moves what waits, and lists it here' : 'Off: every move is a proposal under the blue ✦'}</small></span><i class="lk-sw${lk.quiet ? ' on' : ''}" aria-hidden="true"></i></button>`;
|
|
371
371
|
return `<div class="tkc-pop lk-m" role="dialog" aria-label="Kept in line">${h}</div>`;
|
|
372
372
|
}
|
|
373
373
|
function openMoved(b, H, id) {
|
|
@@ -397,7 +397,7 @@ function openMoved(b, H, id) {
|
|
|
397
397
|
const res = await write(H, '/quiet', { initiative: id, on });
|
|
398
398
|
if (!res || res.ok === false) { failed(H, res); return; }
|
|
399
399
|
lk.quiet = on; if (POP) POP.el.innerHTML = movedHtml(lk);
|
|
400
|
-
say(H, on ? '
|
|
400
|
+
say(H, on ? 'PMOS keeps the dates in line quietly again.' : 'Quiet moves are off: PMOS proposes each move instead.');
|
|
401
401
|
CACHE.delete(id); await after(H);
|
|
402
402
|
}
|
|
403
403
|
}, { sheet: true });
|
|
@@ -40,14 +40,14 @@ const md = (iso) => { const m = DAY.exec(String(iso || '')); return m ? MON[+m[2
|
|
|
40
40
|
const span = (a, b) => (a && b && a !== b ? md(a) + ' – ' + md(b) : md(a || b));
|
|
41
41
|
const plural = (n, a, b) => n + ' ' + (n === 1 ? a : b);
|
|
42
42
|
const clip = (s, n) => { s = String(s || ''); return s.length > n ? s.slice(0, n - 1) + '…' : s; };
|
|
43
|
-
const GROUP = { description: 'Description', outcome: 'Expected outcome', prototyped: '
|
|
43
|
+
const GROUP = { description: 'Description', outcome: 'Expected outcome', prototyped: 'PMOS prototyped it', improved: 'PMOS improved it', scanned: 'PMOS scanned for it', found: 'Found elsewhere', dates: 'Dates', status: 'Looks done', names: 'Names', links: 'Links', grill: 'PMOS grilled it' };
|
|
44
44
|
|
|
45
45
|
/* ── the chip and the live look ── */
|
|
46
46
|
export function chipOf(p) {
|
|
47
47
|
if (!p) return null;
|
|
48
48
|
const looking = !!(p.look && !p.look.ended);
|
|
49
49
|
if (!p.n && !looking) return null;
|
|
50
|
-
return { n: p.n || 0, looking, label: p.n ? '
|
|
50
|
+
return { n: p.n || 0, looking, label: p.n ? 'PMOS proposes ' + p.n + (looking ? ', and is still looking' : '') + '. Open' : 'PMOS is looking for this initiative. Open' };
|
|
51
51
|
}
|
|
52
52
|
const POLL = new Map(); // initiative id → timer, while Claude looks
|
|
53
53
|
export function sync(v, H) {
|
|
@@ -59,7 +59,7 @@ export function sync(v, H) {
|
|
|
59
59
|
// chief-of-staff C4 (board CsF): the ✦ is one press for the whole initiative — it opens the commit-style summary (pm/batch-press.js), whose
|
|
60
60
|
// last line opens this full list; the ✦ carries no queue count (the UI grill's delete list: Your move is the one count)
|
|
61
61
|
const at = H && H.where ? H.where() : {};
|
|
62
|
-
VW.setChip(cur.id, c ? { ...c, quiet: true, label: c.looking ? c.label : 'What
|
|
62
|
+
VW.setChip(cur.id, c ? { ...c, quiet: true, label: c.looking ? c.label : 'What PMOS proposes on ' + (v.title || 'this initiative') + '. Open', on: () => import('./batch-press.js').then((B) => B.openBatch({ ws: at.ws, board: at.board, ini: v.id, title: v.title || v.id, props: v.props },
|
|
63
63
|
{ pmGet, pmPost, toast: (m) => H.toast && H.toast(m), toastUndo: (m, u) => H.toast && H.toast(m, u), reload: H.reload, full: () => open(v, H) })) } : null);
|
|
64
64
|
// while Claude looks, a quiet read every few seconds; a change reads the Board again
|
|
65
65
|
if (c && c.looking && !POLL.has(v.id)) {
|
|
@@ -87,7 +87,7 @@ async function write(H, route, body) {
|
|
|
87
87
|
}
|
|
88
88
|
export function lookHtml(v) {
|
|
89
89
|
if (!v || !v.props || !v.props.look || v.props.look.ended) return '';
|
|
90
|
-
return `<div class="pp-ph"><p>Documents, tasks and dates show here when
|
|
90
|
+
return `<div class="pp-ph"><p>Documents, tasks and dates show here when PMOS has looked everywhere. Nothing is kept until you say so.</p></div>`;
|
|
91
91
|
}
|
|
92
92
|
export function foundDocs(v) {
|
|
93
93
|
const f = v && v.found;
|
|
@@ -145,7 +145,7 @@ function grillHtml(p) {
|
|
|
145
145
|
function grillSec(g) {
|
|
146
146
|
const angles = [...new Set(g.props.map((p) => GW.findingOf(p).label))];
|
|
147
147
|
const r = S.run, cost = r ? GW.costWord(r.cost) : '';
|
|
148
|
-
const head = `<p class="pp-ghd">${angles.map((a) => `<em class="pp-ang">${esc(a)}</em>`).join('')}<span>${esc(r ? GW.runLine(r) : '
|
|
148
|
+
const head = `<p class="pp-ghd">${angles.map((a) => `<em class="pp-ang">${esc(a)}</em>`).join('')}<span>${esc(r ? GW.runLine(r) : 'PMOS chose these and ran them by itself')}${cost ? ' · ' + esc(cost) : ''}. Nothing changes until you keep one.</span></p>`;
|
|
149
149
|
const more = g.more ? `<div class="pp-gmore"><span>+${g.more} smaller ${g.more === 1 ? 'finding' : 'findings'}</span>${ib('data-pp-gall', 'Show the rest', 'M5 12h.01M12 12h.01M19 12h.01')}</div>` : '';
|
|
150
150
|
return head + `<div class="pp-gl">${g.props.map(grillHtml).join('')}</div>` + (g.props.length > 1 ? `<p class="pp-gsw">${g.props.length} findings · swipe for the next</p>` : '') + more;
|
|
151
151
|
}
|
|
@@ -174,7 +174,7 @@ function propHtml(p) {
|
|
|
174
174
|
function lookBlock(L) {
|
|
175
175
|
if (!L || L.ended) return '';
|
|
176
176
|
const rows = L.sources.map((s) => `<li class="${s.state === 'reading' ? 'on' : ''}"><b>${esc(s.name)}</b><span>${s.state === 'reading' ? 'Reading…' : esc(s.what || plural(s.n, 'find', 'finds'))}</span></li>`).join('');
|
|
177
|
-
return `<div class="pp-look"><div class="pp-lh">${SVG(I.spark, 14, 2)}<b>${L.why === 'check' ? '
|
|
177
|
+
return `<div class="pp-look"><div class="pp-lh">${SVG(I.spark, 14, 2)}<b>${L.why === 'check' ? 'PMOS is checking the late tasks' : 'PMOS is looking for this initiative'}</b>${ib('data-pp-stop', 'Stop looking', I.stop)}</div>`
|
|
178
178
|
+ (rows ? `<ul>${rows}</ul>` : '<p>It starts with your connected sources.</p>') + '</div>';
|
|
179
179
|
}
|
|
180
180
|
function bodyHtml(P) {
|
|
@@ -183,7 +183,7 @@ function bodyHtml(P) {
|
|
|
183
183
|
const secs = (P.groups || []).map((g) => ({ id: g.group, title: GROUP[g.group] || g.group, count: g.props.length + (g.more || 0), open: true, html: g.group === 'grill' ? grillSec(g) : g.props.map(propHtml).join('') }));
|
|
184
184
|
return `<div class="pp">${lookBlock(P.look)}${VW.czSections(secs, { key: 'props' })}</div>`;
|
|
185
185
|
}
|
|
186
|
-
function presses(P) { return P && P.sure ? [{ act: 'all', label: 'Keep all ' + P.sure + '
|
|
186
|
+
function presses(P) { return P && P.sure ? [{ act: 'all', label: 'Keep all ' + P.sure + ' PMOS is sure of', icon: I.check, solid: true }] : []; }
|
|
187
187
|
function draw() {
|
|
188
188
|
const VW = window.czViewer, b = VW.body(), cur = VW.current();
|
|
189
189
|
if (!b || !cur || cur.id !== 'pp:' + S.id) return;
|
|
@@ -191,7 +191,7 @@ function draw() {
|
|
|
191
191
|
b.innerHTML = bodyHtml(S.props);
|
|
192
192
|
b.scrollTop = top;
|
|
193
193
|
VW.setPresses(cur.id, presses(S.props));
|
|
194
|
-
const t = '
|
|
194
|
+
const t = 'PMOS proposes' + (S.props && S.props.n ? ' ' + S.props.n : '');
|
|
195
195
|
if (VW.retitle && cur.title !== t) VW.retitle(cur.id, t);
|
|
196
196
|
clearTimeout(S.timer);
|
|
197
197
|
if (S.props && S.props.look && !S.props.look.ended) S.timer = setTimeout(fresh, 4000);
|
|
@@ -246,8 +246,8 @@ async function onPress(e) {
|
|
|
246
246
|
if ('ppStop' in d) {
|
|
247
247
|
b.disabled = true;
|
|
248
248
|
const res = await write(S.H, '/api/proposals/stop', { initiative: S.id });
|
|
249
|
-
if (!res || res.ok === false) say((res && res.error) || '
|
|
250
|
-
else say('
|
|
249
|
+
if (!res || res.ok === false) say((res && res.error) || 'PMOS could not be stopped.');
|
|
250
|
+
else say('PMOS stopped looking. What it found so far stays here.');
|
|
251
251
|
await fresh(); after(); return;
|
|
252
252
|
}
|
|
253
253
|
if (d.ppAsk) {
|
|
@@ -262,7 +262,7 @@ export function open(v, H) {
|
|
|
262
262
|
S.id = v.id; S.props = v.props; S.H = H; S.open = new Set(); S.choices = {}; S.title = v.title; S.edit = null; S.all = false; S.run = null; S.why = null;
|
|
263
263
|
if (v.props && (v.props.groups || []).some((g) => g.group === 'grill')) readRun(H, v.id).then((r) => { if (S.id === v.id && r) { S.run = r; draw(); } });
|
|
264
264
|
VW.drill();
|
|
265
|
-
VW.open({ id: 'pp:' + v.id, kind: '
|
|
265
|
+
VW.open({ id: 'pp:' + v.id, kind: 'PMOS proposes', title: 'PMOS proposes' + (v.props && v.props.n ? ' ' + v.props.n : ''), sub: v.title, icon: I.spark,
|
|
266
266
|
presses: presses(v.props),
|
|
267
267
|
onPress: (act) => { if (act === 'all') keep([], true); },
|
|
268
268
|
render: (b) => { b.innerHTML = bodyHtml(S.props); if (!b.__pp) { b.__pp = true; } b.onclick = onPress; b.onkeydown = (e) => { if (e.key === 'Enter' && e.target.matches('[data-lab-reason]')) { e.preventDefault(); const x = e.target.closest('.pp-p').querySelector('[data-lab-drop]'); if (x) x.click(); return; } if (e.key !== 'Enter' || !e.target.matches('[data-pp-ned]')) return; e.preventDefault(); const k = e.target.closest('.pp-p').querySelector('[data-pp-keep]'); if (k) k.click(); }; draw(); if (!S.props || S.props.look) fresh(); },
|
|
@@ -414,7 +414,7 @@ export function groupSections(tasks, by, L, T) {
|
|
|
414
414
|
const own = (x) => !(x.jkey && linked.has(x.jkey));
|
|
415
415
|
out.push(sec('group', 'yours', 'Your tasks', all.filter(own), { archived: arch.filter(own), open: !G.length }));
|
|
416
416
|
const send = G.reduce((a, g) => a + g.send, 0), open = tasks.open || 0, meta = [open ? open + ' open' : '', 'grouped by epic'].filter(Boolean).join(' · ');
|
|
417
|
-
if (T && T.ok === true && T.pushing) sum = { line: 'Sending to Jira', tone: 'live', text: '
|
|
417
|
+
if (T && T.ok === true && T.pushing) sum = { line: 'Sending to Jira', tone: 'live', text: 'PMOS is creating the tickets with your Atlassian connection. Each task shows its Jira key when it is done.', meta };
|
|
418
418
|
else if (send) sum = { line: plural(send, 'ticket is', 'tickets are') + ' drafted, not in Jira', tone: 'you', text: 'Each PRD story is a task with its Jira ticket drafted. Nothing reaches Jira until you send it.', meta, primary: { act: 'sendall', label: 'Send to Jira' } };
|
|
419
419
|
}
|
|
420
420
|
if (jr.length || jt) out.push({ kind: 'group', key: 'jira', label: 'In Jira', sub: '', count: countOf(jr.length, 0, jd), warn: jr.some((k) => k.warn), open: false, top: [], groups: [], done: [], archived: [], jira: { open: jr, done: jd, total: jt, at: jat } });
|
|
@@ -183,7 +183,7 @@ function gatesHtml(v, o, pri, open) {
|
|
|
183
183
|
/* the grill findings on the header (workspace grill W3, WgW3Move): pm/grill-words.js headerFlags; not behind a pill, zero is silence */
|
|
184
184
|
function flagsHtml(v) {
|
|
185
185
|
const F = headerFlags(v && v.props); if (!F) return '';
|
|
186
|
-
return `<div class="iv-gf" role="group" aria-label="What
|
|
186
|
+
return `<div class="iv-gf" role="group" aria-label="What PMOS found when it grilled it">${F.rows.map((r) => `<p class="iv-gfr"><i class="iv-gfd${r.hot ? ' late' : ''}" aria-hidden="true"></i><span><b>${esc(r.title)}</b> <span class="iv-gfm">${esc([r.label, r.day].filter(Boolean).join(' · '))}</span></span></p>`).join('')}`
|
|
187
187
|
+ `<button type="button" class="iv-gfo" data-iv-gf aria-label="${esc('Open the ' + plural(F.n, 'finding', 'findings'))}" title="Open the findings">${SVG('M12 3l1.8 4.7L18.5 9.5l-4.7 1.8L12 16l-1.8-4.7L5.5 9.5l4.7-1.8z', 16, 2)}</button></div>`;
|
|
188
188
|
}
|
|
189
189
|
function ctrlHtml(v, o = {}) {
|
|
@@ -360,7 +360,7 @@ function tasksHtml(v0, o) {
|
|
|
360
360
|
}
|
|
361
361
|
if (T.empty) {
|
|
362
362
|
const sk = T.empty.stages.map((s) => `<span class="iv-sk"><span class="iv-no dash${s.ms ? ' ms' : ''}" aria-hidden="true">${s.ms ? '' : s.n}</span>${esc(s.name)}${s.now ? ' <i>· now</i>' : ''}</span>`).join('');
|
|
363
|
-
return head + `<div class="iv-empty">${sk}<p class="iv-q">
|
|
363
|
+
return head + `<div class="iv-empty">${sk}<p class="iv-q">PMOS drafts the breakdown, one section per stage. Nothing is saved until you keep it.</p>`
|
|
364
364
|
+ (o.draft ? `<button type="button" class="iv-pbtn" data-iv-draft>${SVG(P.draft, 16, 2)}Draft it</button>` : '') + '</div>';
|
|
365
365
|
}
|
|
366
366
|
SHOWN.set(v.id || v.key || '', v);
|
|
@@ -44,12 +44,12 @@ export function intentHtml(x, o = {}) {
|
|
|
44
44
|
if (!x || !x.intent) return '';
|
|
45
45
|
const F = x.intent.fields || {}, props = x.proposals || [];
|
|
46
46
|
const empty = FIELDS.every(([k]) => !linesOf(F[k]).length);
|
|
47
|
-
const head = `<div class="it-h"><h4>Intent</h4><small>Yours.
|
|
47
|
+
const head = `<div class="it-h"><h4>Intent</h4><small>Yours. PMOS works inside it.</small><span class="sp"></span>${o.edit ? '' : `<button type="button" class="it-ed" data-it-edit aria-label="Edit the intent" title="Edit">${SV(P.pen, 16)}</button>`}</div>`;
|
|
48
48
|
if (o.edit) {
|
|
49
49
|
const f = FIELDS.map(([k, label]) => `<label class="it-f"><span>${esc(label)}</span><textarea name="${k}" rows="${Math.max(2, linesOf(F[k]).length + 1)}" placeholder="One line each">${esc(linesOf(F[k]).join('\n'))}</textarea></label>`).join('');
|
|
50
50
|
return `<section class="pv-card it-card" aria-label="Intent">${head}<form class="it-form" data-it-form>${f}<div class="it-eb"><button type="button" data-it-cancel aria-label="Cancel" title="Cancel">${SV(P.x, 14, 2)}</button><button type="submit" class="ok" aria-label="Save" title="Save">${SV(P.check, 16, 2.4)}</button></div></form></section>`;
|
|
51
51
|
}
|
|
52
|
-
const dl = empty ? `<p class="it-none">Not written yet.
|
|
52
|
+
const dl = empty ? `<p class="it-none">Not written yet. PMOS proposes it from the strategy and the records, or write it with the pencil.</p>`
|
|
53
53
|
: `<dl>${FIELDS.map(([k, label]) => { const L = linesOf(F[k]); return L.length ? `<dt>${esc(label)}</dt><dd>${L.map((l) => `<p>${esc(l)}</p>`).join('')}</dd>` : ''; }).join('')}</dl>`;
|
|
54
54
|
return `<section class="pv-card it-card" aria-label="Intent">${head}${dl}${props.map(propHtml).join('')}</section>`;
|
|
55
55
|
}
|
|
@@ -70,7 +70,7 @@ export async function onIntentClick(e, root, o) {
|
|
|
70
70
|
const r = await pmPost('/api/driver/' + (keep ? 'keep' : 'drop'), { ws: o.ws() || undefined, proposal: id, ...(keep ? {} : { note: 'Not this, from the Intent card' }) }).catch(() => null);
|
|
71
71
|
busy.delete(id);
|
|
72
72
|
if (!r || !r.ok) { t.disabled = false; if (o.toast) o.toast((r && r.error) || 'Nothing changed. Try again.'); return true; }
|
|
73
|
-
if (o.toast) o.toast(keep ? 'Added to your intent.' : 'Declined.
|
|
73
|
+
if (o.toast) o.toast(keep ? 'Added to your intent.' : 'Declined. PMOS keeps the reason.');
|
|
74
74
|
await reload(o);
|
|
75
75
|
return true;
|
|
76
76
|
}
|
|
@@ -67,7 +67,7 @@ export async function sync(M, D, H) {
|
|
|
67
67
|
export function chipOf() {
|
|
68
68
|
const p = S.props;
|
|
69
69
|
if (!p || !p.n) return null;
|
|
70
|
-
return { n: p.n, label: '
|
|
70
|
+
return { n: p.n, label: 'PMOS proposes a clean-up of ' + plural(p.n, 'row', 'rows') + '. Open' };
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
/* ── the Viewer ── */
|
|
@@ -121,7 +121,7 @@ function pickHtml(p, x) {
|
|
|
121
121
|
const opt = (id, title, attr, mark) => `<button type="button" role="menuitemradio" aria-checked="${cur === id}" ${attr}><span class="lp-tl">${mark || esc(tileOf(title))}</span><span class="t">${esc(title)}</span>${cur === id ? SVG(I.check, 15, 2.4) : ''}</button>`;
|
|
122
122
|
const first = p.type === 'ini' ? opt(p.data.ini, p.data.title || p.data.ini, `data-lp-to="${esc(p.data.ini)}"`) : opt('start', p.data.title, 'data-lp-to=""');
|
|
123
123
|
const rest = S.inis.filter((i) => i.id !== (p.type === 'ini' ? p.data.ini : '')).map((i) => opt(i.id, i.title, `data-lp-to="${esc(i.id)}"`)).join('');
|
|
124
|
-
return `<div class="lp-pick" role="menu" data-esc-layer aria-label="Where ${esc(x.title)} goes"><p>
|
|
124
|
+
return `<div class="lp-pick" role="menu" data-esc-layer aria-label="Where ${esc(x.title)} goes"><p>PMOS’s pick</p>${first}${rest ? '<p>Your initiatives</p>' + rest : ''}`
|
|
125
125
|
+ `<button type="button" role="menuitemradio" aria-checked="${cur === 'new'}" data-lp-to="+new" class="nw"><span class="lp-tl">${SVG(I.plus, 14, 2.2)}</span><span class="t">New initiative from this row</span></button></div>`;
|
|
126
126
|
}
|
|
127
127
|
function propHtml(p) {
|
|
@@ -142,7 +142,7 @@ function histHtml() {
|
|
|
142
142
|
}
|
|
143
143
|
function bodyHtml() {
|
|
144
144
|
const P = S.props;
|
|
145
|
-
if (!P || !P.n) return `<div class="lp">${P && P.looking ? '<p class="lp-intro">
|
|
145
|
+
if (!P || !P.n) return `<div class="lp">${P && P.looking ? '<p class="lp-intro">PMOS is looking at the rows now. Its proposals show here.</p>' : '<p class="lp-intro">Nothing to clean up now.</p>'}${histHtml()}</div>`;
|
|
146
146
|
const total = Math.max(S.H && S.H.total ? S.H.total() : 0, P.total || 0, P.n), rest = total - P.n;
|
|
147
147
|
const intro = plural(total, 'row sits', 'rows sit') + ' outside an initiative. ' + (rest > 0 ? 'I can place ' + P.n + '; the other ' + rest + ' stay where they are.' : 'I can place ' + (P.n === 1 ? 'it' : 'all ' + P.n) + '.') + ' The tick at the top approves all.';
|
|
148
148
|
const secs = P.groups.map((g) => `<section class="lp-sec" aria-label="${esc(SECTION[g.group])}"><h4>${esc(SECTION[g.group])}</h4>${g.props.map(propHtml).join('')}</section>`).join('');
|
|
@@ -157,7 +157,7 @@ function draw() {
|
|
|
157
157
|
b.scrollTop = top;
|
|
158
158
|
if (histOpen) { const h = b.querySelector('.lp-hist'); if (h) h.open = true; }
|
|
159
159
|
v.setPresses(c.id, presses());
|
|
160
|
-
const t = '
|
|
160
|
+
const t = 'PMOS proposes' + (S.props && S.props.n ? ' ' + S.props.n : '');
|
|
161
161
|
if (c.title !== t && v.retitle) v.retitle(c.id, t);
|
|
162
162
|
}
|
|
163
163
|
const say = (m, undo) => { if (S.H && S.H.toast) S.H.toast(m, undo); };
|
|
@@ -255,7 +255,7 @@ export function open(H) {
|
|
|
255
255
|
// the first proposal opens, so its rows read at once (XlcA1Desk); the rest stay folded until pressed
|
|
256
256
|
const first = S.props && S.props.groups && S.props.groups[0] && S.props.groups[0].props[0];
|
|
257
257
|
S.open = new Set(first ? [first.id] : []);
|
|
258
|
-
v.open({ id: 'lp', kind: '
|
|
258
|
+
v.open({ id: 'lp', kind: 'PMOS proposes', title: 'PMOS proposes' + (S.props && S.props.n ? ' ' + S.props.n : ''), icon: I.spark, presses: presses(),
|
|
259
259
|
onPress: (act) => { if (act === 'all') keep([], true); },
|
|
260
260
|
render: (b) => { b.onclick = onPress; b.onkeydown = (e) => { if (e.key === 'Escape' && S.pick) { e.stopPropagation(); S.pick = null; draw(); } }; draw(); },
|
|
261
261
|
onClose: () => { S.out = new Set(); S.pick = null; if (S.H && S.H.redraw) S.H.redraw(); } });
|
|
@@ -99,7 +99,7 @@ function editRows(rows, label) {
|
|
|
99
99
|
+ field(r, 'source', r.source || '', 'Where ' + r.name + ' is measured', { ph: 'Measured by', max: 40 }) + '</span></div>').join('')}</div>`;
|
|
100
100
|
}
|
|
101
101
|
const editFoot = (scope, id, ask, busy) => `<div class="md-ft"><p class="md-why">Name, target and where it is measured. Anything else, ask me in Home.</p>`
|
|
102
|
-
+ ib({ href: ask, icon: I.ask, label: 'Ask
|
|
102
|
+
+ ib({ href: ask, icon: I.ask, label: 'Ask PMOS in Home to change something else', title: 'Ask in Home' })
|
|
103
103
|
+ ib({ act: 'cancel', scope, id, icon: I.x, label: 'Cancel the edit', title: 'Cancel', busy })
|
|
104
104
|
+ ib({ act: 'save', scope, id, icon: I.check, label: 'Save the edit', title: 'Save', solid: true, busy }) + '</div>';
|
|
105
105
|
|
|
@@ -79,11 +79,11 @@ export function firstHtml(p, L) {
|
|
|
79
79
|
const n = L.length, from = fromWords(L);
|
|
80
80
|
const all = L.length > 1 ? `<span class="msg-ends"><button type="button" class="msg-ok" data-ms-act="keepall" aria-label="Keep all ${n} suggestions" title="Keep all">${SV(I.check, 15, 2.4)}</button>`
|
|
81
81
|
+ `<button type="button" class="msg-ib" data-ms-act="dropall" aria-label="Drop all ${n} suggestions" title="Drop all">${SV(I.x, 15)}</button></span>` : '';
|
|
82
|
-
return `<div class="msg-box" role="group" aria-label="
|
|
83
|
-
+ `<span class="msg-ht"><b>
|
|
82
|
+
return `<div class="msg-box" role="group" aria-label="PMOS's suggested milestones"><div class="msg-hd"><span class="msg-mk ad" aria-hidden="true">${adler('needs-you', 28, { label: false })}</span>`
|
|
83
|
+
+ `<span class="msg-ht"><b>PMOS suggests ${n} ${plural(n, 'milestone', 'milestones')}</b>${from ? ' from ' + esc(from) : ''}</span>${all}</div>`
|
|
84
84
|
+ `<div role="list">${L.map((i) => rowHtml(p, i, 'first')).join('')}</div></div>`;
|
|
85
85
|
}
|
|
86
|
-
export function rowsHtml(p, L) { return L.length ? `<div class="msg-list" role="list" aria-label="
|
|
86
|
+
export function rowsHtml(p, L) { return L.length ? `<div class="msg-list" role="list" aria-label="PMOS's milestone changes">${L.map((i) => rowHtml(p, i, '')).join('')}</div>` : ''; }
|
|
87
87
|
export function homeSub(p) {
|
|
88
88
|
const L = openOf(p); if (!L.length) return '';
|
|
89
89
|
if (!((p && p.milestones) || []).length && L.every((i) => i.op === 'add')) return L.length + ' ' + plural(L.length, 'milestone', 'milestones') + ' suggested';
|
|
@@ -35,14 +35,14 @@ export function nextPromptUi({ el, host, box, redrawFoot }) {
|
|
|
35
35
|
function draw() {
|
|
36
36
|
let html = '';
|
|
37
37
|
if (N.mode === 'cards' && N.cards.length) {
|
|
38
|
-
html = `<div class="np-list" role="group" aria-label="Suggested next prompts">${N.cards.map((c, i) => `<button type="button" class="np-card${c.rec ? ' rec' : ''}" data-np-use="${i}" aria-label="Use this prompt: ${esc(c.text)}"${c.rec ? ' title="
|
|
38
|
+
html = `<div class="np-list" role="group" aria-label="Suggested next prompts">${N.cards.map((c, i) => `<button type="button" class="np-card${c.rec ? ' rec' : ''}" data-np-use="${i}" aria-label="Use this prompt: ${esc(c.text)}"${c.rec ? ' title="PMOS recommends this one"' : ''}>${STAR}<span class="np-t">${esc(c.text)}</span></button>`).join('')}</div>`;
|
|
39
39
|
} else if (N.mode === 'spin') {
|
|
40
40
|
html = `<div class="np-spin" role="status"><span class="np-sp">${ic(SPIN, 14)}</span><span>Sharpening…</span></div>`;
|
|
41
41
|
} else if (N.mode === 'sharp' && N.sharp) {
|
|
42
42
|
const P = N.prefs || {}, st = P.style || 'engineer';
|
|
43
43
|
const menu = N.menu ? `<div class="np-menu" role="menu" aria-label="Style of sharper prompts" data-esc-layer><p class="np-mh">Sharpen as</p>${STYLES.map(([k, l, d]) => `<button type="button" role="menuitemradio" aria-checked="${st === k}" class="np-mi" data-np-voice="${k}"><span class="np-ck">${st === k ? ic(CHECK) : ''}</span><span><b>${esc(l)}</b><em>${esc(k === 'own' && !P.rules ? 'Write your rules in Settings first' : d)}</em></span></button>`).join('')}`
|
|
44
44
|
+ `<span class="np-sep" role="separator"></span><button type="button" role="menuitemcheckbox" class="np-mi np-swr" aria-checked="${!!P.sharpen}" data-np-sw><b>Sharpen as I type</b><span class="np-sw${P.sharpen ? ' on' : ''}" aria-hidden="true"><i></i></span></button></div>` : '';
|
|
45
|
-
html = `<div class="np-card rec np-sh"><button type="button" class="np-use" data-np-sharp aria-label="Use the sharper prompt: ${esc(N.sharp)}" title="
|
|
45
|
+
html = `<div class="np-card rec np-sh"><button type="button" class="np-use" data-np-sharp aria-label="Use the sharper prompt: ${esc(N.sharp)}" title="PMOS sharpened your prompt">${STAR}<span class="np-t">${esc(N.sharp)}</span></button>`
|
|
46
46
|
+ `<button type="button" class="np-ib" data-np-menu aria-haspopup="menu" aria-expanded="${N.menu}" aria-label="Style of sharper prompts" title="Style of sharper prompts">${ic(SLIDERS)}</button>${menu}</div>`;
|
|
47
47
|
}
|
|
48
48
|
if (wrap.__h !== html) { wrap.__h = html; wrap.innerHTML = html; }
|
|
@@ -243,7 +243,7 @@ export function metricsHtml(L, view) {
|
|
|
243
243
|
/** "3 on their line · checkout sign-in is behind", one dot per goal. S = GET /api/goal-status → { on, behind, broken, dots, line }. */
|
|
244
244
|
export function productLine(S) {
|
|
245
245
|
if (!S || !Array.isArray(S.dots)) return null;
|
|
246
|
-
if (!S.dots.length) return { text: S.line || 'No goal yet ·
|
|
246
|
+
if (!S.dots.length) return { text: S.line || 'No goal yet · PMOS can draft them', dots: [] };
|
|
247
247
|
const low = (t) => String(t || '').replace(/^./, (c) => c.toLowerCase());
|
|
248
248
|
const bad = (S.broken || []).map((t) => low(t) + ' is over its limit').concat((S.behind || []).map((t) => low(t) + ' is behind'));
|
|
249
249
|
const none = S.dots.filter((d) => d.dot === 'none').length;
|
|
@@ -23,7 +23,7 @@ import * as VW from './cozy-viewer.js';
|
|
|
23
23
|
import { pmGet, pmPost, pmHeaders } from './http.js';
|
|
24
24
|
|
|
25
25
|
export const CHAT_ID = 'page-chat';
|
|
26
|
-
const CLAUDE = { key: 'claude', name: '
|
|
26
|
+
const CLAUDE = { key: 'claude', name: 'PMOS', initial: 'P' };
|
|
27
27
|
const CHAT_ICON = 'M5 6.5A2.5 2.5 0 0 1 7.5 4h9A2.5 2.5 0 0 1 19 6.5v7a2.5 2.5 0 0 1-2.5 2.5H11l-4 3.5V16h.5A2.5 2.5 0 0 1 5 13.5z';
|
|
28
28
|
const FLAG = 'M5 21V4h11l-2 4 2 4H5';
|
|
29
29
|
const SHEETS = ['./cozy-home.css', './home-line.css', './page-chat.css'];
|
|
@@ -41,7 +41,7 @@ export function keyOf(it) {
|
|
|
41
41
|
export function targetOf(it, ws) {
|
|
42
42
|
const title = String((it && it.title) || 'this').slice(0, 80);
|
|
43
43
|
return { key: keyOf(it), ws: ws || undefined, title, about: title, scope: { text: title, icon: FLAG }, role: CLAUDE, rich: false,
|
|
44
|
-
placeholder: 'Message
|
|
44
|
+
placeholder: 'Message PMOS about ' + title, empty: 'Ask about ' + title + '. PMOS reads its records and works in a real Claude Code session.' };
|
|
45
45
|
}
|
|
46
46
|
/** Home's own address for the same conversation (⋯ › Open in a new tab). */
|
|
47
47
|
const homeHref = (it, key) => '/premium.html?' + new URLSearchParams({ about: key, label: String(it.title || '').slice(0, 80) }).toString();
|
|
@@ -151,6 +151,6 @@ export function openAttachment(p) {
|
|
|
151
151
|
const name = shownName(p), url = fileUrl(p);
|
|
152
152
|
const view = IMG.test(name) ? `<img class="atview" alt="${esc(name)}" src="${esc(url)}">`
|
|
153
153
|
: PDF.test(name) ? `<iframe class="atpdf" title="${esc(name)}" src="${esc(url)}"></iframe>`
|
|
154
|
-
: `<div class="vwfnone" role="status"><b>${esc(name)}</b><p class="vwmut">PMOS does not show this kind of file here.
|
|
154
|
+
: `<div class="vwfnone" role="status"><b>${esc(name)}</b><p class="vwmut">PMOS does not show this kind of file here. PMOS can read it.</p><div class="vwrow"><a class="vwbtn pri" href="${esc(url)}" download="${esc(name)}">Download</a></div></div>`;
|
|
155
155
|
return vwOpen({ id: 'att:' + p, title: name, icon: 'doc', html: `<div class="vwdoc"><article class="cf vwfile atfile"><header class="cfh"><h1 class="cft">${esc(name)}</h1></header>${view}<footer class="cff"><span>Attached to your message · saved on this machine</span></footer></article></div>` });
|
|
156
156
|
}
|
|
@@ -220,5 +220,5 @@ export function headHtml(h, o = {}) {
|
|
|
220
220
|
const t = o.title || 'this initiative';
|
|
221
221
|
return `<div class="czi-box ${esc(h.turn)}"><div class="czi-row"><span class="czi-turn ${esc(h.turn)}"><i class="cz-dot ${dot}" aria-hidden="true"></i>${esc(h.turnLabel)}</span><span class="czi-sp"></span><span class="czi-stage">${esc(h.stage)}</span></div>`
|
|
222
222
|
+ ladder + (o.folded ? folded : list)
|
|
223
|
-
+ `<div class="czi-acts"><button type="button" class="czi-cta${h.primary ? '' : ' alt'}" data-czcta>${esc(h.cta)}</button><button type="button" class="czi-ov" data-czov aria-label="Overview of ${esc(t)} with
|
|
223
|
+
+ `<div class="czi-acts"><button type="button" class="czi-cta${h.primary ? '' : ' alt'}" data-czcta>${esc(h.cta)}</button><button type="button" class="czi-ov" data-czov aria-label="Overview of ${esc(t)} with PMOS" title="Overview of ${esc(t)} with PMOS"><span aria-hidden="true">P</span></button></div></div>`;
|
|
224
224
|
}
|