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
|
@@ -76,7 +76,7 @@ export async function openTicket(o) {
|
|
|
76
76
|
const R = await TV.readTicket({ ws, board, ini: initiative, ref });
|
|
77
77
|
if (!R.model.ok) {
|
|
78
78
|
el.innerHTML = ticketHtml(R.model);
|
|
79
|
-
const rd = el.querySelector('[data-jread]'); if (rd) rd.onclick = async () => { rd.disabled = true; toast(await askHere(readAsk(ref)) ? '
|
|
79
|
+
const rd = el.querySelector('[data-jread]'); if (rd) rd.onclick = async () => { rd.disabled = true; toast(await askHere(readAsk(ref)) ? 'PMOS is reading ' + ref + ' in this popup\'s chat.' : 'Open the ticket from its popup to read it.'); };
|
|
80
80
|
return;
|
|
81
81
|
}
|
|
82
82
|
// the header names the ticket by its key and its title, not the key alone (batch 14 item 12: "MSD-4329" alone said nothing)
|
|
@@ -175,7 +175,7 @@ function viewFound() {
|
|
|
175
175
|
}
|
|
176
176
|
if (S.review !== 'sources' && (S.item || S.setup.item)) {
|
|
177
177
|
const item = S.item || S.setup.item;
|
|
178
|
-
return `<h1 id="wlH" tabindex="-1">Your first task is ready</h1><p class="wl-lede">${esc(item.title)}</p><p>${item.due ? 'Due ' + esc(item.due) : 'Added to Today'}</p><p>Open it on Home to set a date, mark it done, or brief
|
|
178
|
+
return `<h1 id="wlH" tabindex="-1">Your first task is ready</h1><p class="wl-lede">${esc(item.title)}</p><p>${item.due ? 'Due ' + esc(item.due) : 'Added to Today'}</p><p>Open it on Home to set a date, mark it done, or brief PMOS when connected.</p>${err()}${foot(btn('back', 'Add more work', { alt: true }), btn('finish', 'Open Home'))}`;
|
|
179
179
|
}
|
|
180
180
|
return `<h1 id="wlH" tabindex="-1">Here’s what PMOS found</h1>${readSummary()}${S.readItems.length ? '<ul class="wl-list">' + S.readItems.map(i => '<li>' + esc(i.title || i.key || 'Work item') + '</li>').join('') + '</ul>' : '<p>A completed read may contain no open items in this scope. Review your sources on Home or add a task.</p>'}${err()}${foot(btn('back', 'Add or change work', { alt: true }), btn('finish', 'Use these reads and open Home'))}`;
|
|
181
181
|
}
|
|
@@ -37,7 +37,7 @@ export function sugHtml(p, st) {
|
|
|
37
37
|
const S = suggestOrder(st, p);
|
|
38
38
|
if (!S.differs) return '';
|
|
39
39
|
const dot = notNow()[p.id] !== S.sig;
|
|
40
|
-
return `<button type="button" class="po-sug" data-po-sug="${esc(p.id)}" aria-haspopup="dialog" aria-label="
|
|
40
|
+
return `<button type="button" class="po-sug" data-po-sug="${esc(p.id)}" aria-haspopup="dialog" aria-label="PMOS suggests an order from the dates${dot ? '. The dates disagree with the order' : ''}" title="PMOS suggests an order from the dates">${SV(SPARK, 1.8)}${dot ? '<span class="po-nd" aria-hidden="true"></span>' : ''}</button>`;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
let O = null;
|
|
@@ -115,7 +115,7 @@ function openPop(btn) {
|
|
|
115
115
|
+ S.rows.map((r) => `<div class="po-so${r.moved ? ' mv' : ''}${r.none ? ' nod' : ''}"><span class="n">${r.n}</span><b>${esc(r.title)}</b>`
|
|
116
116
|
+ (r.none ? `<button type="button" class="po-adb" data-po-dates="${esc(r.id)}" aria-label="Add dates to ${esc(r.title)}" title="Add dates">${SV(CAL, 1.8)}</button>` : `<span class="dt">${esc(r.range)}</span>`)
|
|
117
117
|
+ `<span class="r">${esc(r.reason)}</span></div>`).join('')
|
|
118
|
-
+ `<div class="po-acts"><button type="button" class="po-ib soft" data-po-no aria-label="Not now.
|
|
118
|
+
+ `<div class="po-acts"><button type="button" class="po-ib soft" data-po-no aria-label="Not now. PMOS asks again only when a date changes" title="Not now">${SV(X, 1.8)}</button>`
|
|
119
119
|
+ `<button type="button" class="po-ib ok" data-po-use aria-label="Use this order" title="Use this order">${SV(OK, 2)}</button></div>`;
|
|
120
120
|
document.body.appendChild(el);
|
|
121
121
|
const b = btn.getBoundingClientRect(), w = Math.min(420, window.innerWidth - 24);
|
|
@@ -198,7 +198,7 @@ function rowHtml(m, P) {
|
|
|
198
198
|
: `<button type="button" class="pc-ib del" data-pc="del" data-m="${esc(m.id)}" aria-label="${esc('Delete ' + (m.name || 'this milestone'))}" title="Delete">${SV(I.del, 15)}</button>`;
|
|
199
199
|
const late = !gone.length && lateOf(m, C.st.inis);
|
|
200
200
|
// Claude's change, filled in from the pencil (canvas XmsgB): what it was, and what Save does
|
|
201
|
-
const chg = m.sug ? `<p class="msg-chg">${SV(I.spark, 13)}<span>
|
|
201
|
+
const chg = m.sug ? `<p class="msg-chg">${SV(I.spark, 13)}<span>PMOS's change${m.was ? ', was ' + esc(m.was) : ''}, ready to save. Edit it, then Save.</span></p>` : '';
|
|
202
202
|
const risk = m.risk && !m.done && !m.fixed ? `<p class="msg-risk"><i class="pc-wdot" aria-hidden="true"></i><span>At risk: ${esc(m.risk)}</span><button type="button" class="pc-ib" data-pc="unrisk" data-m="${esc(m.id)}" aria-label="${esc('No longer at risk: ' + (m.name || 'this milestone'))}" title="No longer at risk">${SV(I.x, 14)}</button></p>` : '';
|
|
203
203
|
const warn = gone.length ? `${esc(C.o.nameOf(gone[0].ini) || gone[0].ini)} left the program. Pick another initiative, or tick it yourself.`
|
|
204
204
|
: late ? `${esc(late.title)} is set to ${late.label === 'Deliver' ? 'deliver' : 'pass ' + esc(late.label)} on ${esc(shortDay(late.date))}, after this date.` : '';
|
|
@@ -222,14 +222,14 @@ function msHtml(D, P) {
|
|
|
222
222
|
}
|
|
223
223
|
h += open.map((m) => rowHtml(m, P)).join('');
|
|
224
224
|
if (!full) h += `<button type="button" class="pc-ln addl" data-pc="add">${SV(I.plus, 15, 2)}Add a milestone</button>`;
|
|
225
|
-
return `<section class="pc-ms" id="pcMs" aria-label="Milestones"><div class="pc-lbl">Milestones${lim}</div>${checkedHtml()}${C.dropped ? `<p class="msg-chg">${SV(I.spark, 13)}<span>
|
|
225
|
+
return `<section class="pc-ms" id="pcMs" aria-label="Milestones"><div class="pc-lbl">Milestones${lim}</div>${checkedHtml()}${C.dropped ? `<p class="msg-chg">${SV(I.spark, 13)}<span>PMOS's change: ${esc(C.dropped)} is dropped. Save to keep the change, or Discard.</span></p>` : ''}<div class="pc-ml" role="list">${h}</div></section>`;
|
|
226
226
|
}
|
|
227
227
|
/** When Claude last checked the milestones, and Check now (canvas XmsgB): the line lives here, so the PM can see the checks run. */
|
|
228
228
|
function checkedHtml() {
|
|
229
229
|
if (!C.o.review) return '';
|
|
230
230
|
const R = C.o.review() || {}, run = !!(R.running || C.checking);
|
|
231
231
|
const when = R.checked ? lastWhen(R.checked) : '';
|
|
232
|
-
const line = run ? '
|
|
232
|
+
const line = run ? 'PMOS is checking the milestones now.' : 'PMOS checks every Monday and when a date, Jira or a meeting changes.' + (when ? ' Last checked ' + when + '.' : '');
|
|
233
233
|
return `<div class="msg-chk">${faceOr(run ? 'thinking' : 'handled', 's', SV('M12 7v5l3 2M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0', 14), { label: false })}<span>${esc(line)}</span>${C.o.checkNow ? `<button type="button" class="msg-ib${run ? ' on' : ''}" data-pc="checknow" aria-label="Check now" title="Check now"${run ? ' disabled' : ''}>${SV('M20 11a8 8 0 1 0-2.3 5.7M20 4v7h-7', 15)}</button>` : ''}</div>`;
|
|
234
234
|
}
|
|
235
235
|
/** "today, 09:12", "yesterday, 17:40" or "Oct 21". */
|
|
@@ -305,7 +305,7 @@ export function suggestOrder(st, p) {
|
|
|
305
305
|
const { d } = x, prev = k ? seq[k - 1].i.title : '';
|
|
306
306
|
const range = d.start && d.end ? shortDay(d.start) + ' – ' + shortDay(d.end) : d.start ? 'from ' + shortDay(d.start) : d.end ? 'to ' + shortDay(d.end) : d.ms ? '◆ ' + shortDay(d.ms.date) : '';
|
|
307
307
|
let reason;
|
|
308
|
-
if (!x.key) reason = 'No dates yet, so it goes last. Add dates and
|
|
308
|
+
if (!x.key) reason = 'No dates yet, so it goes last. Add dates and PMOS checks again.';
|
|
309
309
|
else if (d.start) reason = k === 0 ? 'Starts first, on ' + shortDay(d.start) + '.' : seq[k - 1].d.start === d.start ? 'Starts the same day as ' + prev + ' and finishes later.' : 'Starts ' + shortDay(d.start) + ', after ' + prev + '.';
|
|
310
310
|
else if (d.ms) reason = 'No start date. Its ◆ ' + d.ms.name + ' is ' + shortDay(d.ms.date) + '.';
|
|
311
311
|
else reason = 'No start date. It finishes ' + shortDay(d.end) + '.';
|
|
@@ -27,14 +27,14 @@ export async function readLib(ws) {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
const sw = (scope, r) => `<button type="button" class="rl-sw${r.on ? ' on' : ''}" role="switch" aria-checked="${!!r.on}" aria-label="${esc((r.on ? 'Stop drafting ' : 'Draft ') + r.name)}" data-rl="switch" data-scope="${esc(scope)}" data-kind="${esc(r.kind)}"><i></i></button>`;
|
|
30
|
-
const row = (scope, r) => `<div class="rl-row"><span class="rl-t"><b>${r.pick ? '<span class="rl-pk" aria-label="
|
|
30
|
+
const row = (scope, r) => `<div class="rl-row"><span class="rl-t"><b>${r.pick ? '<span class="rl-pk" aria-label="PMOS\'s pick">✦</span> ' : ''}${esc(r.name)}</b>${r.sub ? `<small>${esc(r.sub)}</small>` : ''}</span>${sw(scope, r)}</div>`;
|
|
31
31
|
|
|
32
32
|
/** The library's ready-made part, as html. Zero is silence: no group draws nothing. */
|
|
33
33
|
export function libHtml(L, o = {}) {
|
|
34
34
|
if (!L || !(L.groups || []).length) return '';
|
|
35
35
|
const open = o.open || new Set();
|
|
36
36
|
const lead = L.lead && L.lead.text ? `<div class="rl-lead"><span class="rl-sp">${SV(I.spark, 16)}</span><p><b>${esc(L.lead.text)}</b>${L.lead.rest ? ' ' + esc(L.lead.rest) : ''}</p>`
|
|
37
|
-
+ `<button type="button" class="rl-ok" data-rl="picks" aria-label="Keep
|
|
37
|
+
+ `<button type="button" class="rl-ok" data-rl="picks" aria-label="Keep PMOS's picks" title="Keep PMOS's picks">${SV(I.chk, 18, 2.4)}</button></div>` : '';
|
|
38
38
|
const ov = L.overlap && L.overlap.lead ? `<div class="rl-lead"><span class="rl-sp">${SV(I.spark, 16)}</span><p><b>${esc(L.overlap.lead)}</b>${L.overlap.rest ? ' ' + esc(L.overlap.rest) : ''}</p>`
|
|
39
39
|
+ `<button type="button" class="rl-ok" data-rl="overlap" aria-label="Send one update that carries the others" title="Send one update that carries the others">${SV(I.merge, 18, 2.2)}</button></div>`
|
|
40
40
|
+ ((L.overlap.people || []).length ? `<h4 class="rl-h">${esc(L.overlap.title || 'Who gets what')}</h4><div class="rl-card">${L.overlap.people.map((p) => `<div class="rl-row"><span class="rl-av">${SV(I.people, 16)}</span><span class="rl-t"><b>${esc(p.who)}</b>${p.sub ? `<small>${esc(p.sub)}</small>` : ''}</span></div>`).join('')}</div>` : '') : '';
|
|
@@ -54,8 +54,8 @@ export function wireLib(el, h) {
|
|
|
54
54
|
if (a === 'fold') { const k = b.dataset.k; if (h.open.has(k)) h.open.delete(k); else h.open.add(k); h.redraw(); return; }
|
|
55
55
|
b.disabled = true;
|
|
56
56
|
const done = async (r, ok) => { if (!r || r.ok === false) { b.disabled = false; h.toast((r && r.error) || 'Nothing was changed. The server did not say why.'); return; } h.toast(ok); await h.reload(); };
|
|
57
|
-
if (a === 'switch') { const on = b.getAttribute('aria-checked') !== 'true'; return done(await Promise.resolve(pmPost('/api/ready-reports/switch', { ws: h.ws || undefined, scope: b.dataset.scope, kind: b.dataset.kind, on })).catch(() => null), on ? 'On.
|
|
58
|
-
if (a === 'picks') return done(await Promise.resolve(pmPost('/api/ready-reports/picks', { ws: h.ws || undefined })).catch(() => null), 'Kept. Only
|
|
57
|
+
if (a === 'switch') { const on = b.getAttribute('aria-checked') !== 'true'; return done(await Promise.resolve(pmPost('/api/ready-reports/switch', { ws: h.ws || undefined, scope: b.dataset.scope, kind: b.dataset.kind, on })).catch(() => null), on ? 'On. PMOS drafts it at its moment; nothing goes out until you approve it.' : 'Off. PMOS no longer drafts it.'); }
|
|
58
|
+
if (a === 'picks') return done(await Promise.resolve(pmPost('/api/ready-reports/picks', { ws: h.ws || undefined })).catch(() => null), 'Kept. Only PMOS\'s picks are scheduled; the rest draft at their moment.');
|
|
59
59
|
if (a === 'overlap') return done(await Promise.resolve(pmPost('/api/ready-reports/overlap', { ws: h.ws || undefined })).catch(() => null), 'One update each. The wider one carries the others as sections.');
|
|
60
60
|
b.disabled = false;
|
|
61
61
|
});
|
|
@@ -128,10 +128,10 @@ function goesHtml(q, ch, a) {
|
|
|
128
128
|
+ (q.cadence === 'monthly' ? sel('dom', Array.from({ length: 28 }, (_, i) => [i + 1, 'Day ' + (i + 1)]), q.dayOfMonth, 'Day of the month') : '')
|
|
129
129
|
+ sel('time', TIMES.concat(TIMES.includes(q.time) ? [] : [q.time]).sort().map((t) => [t, t]), q.time, 'Time') + '</div>' : '';
|
|
130
130
|
return `<fieldset class="rf-q"><legend>Goes out${ch.includes('schedule') ? ' ' + tag('changed', 'ch') : ''}</legend><div class="rf-row" role="radiogroup" aria-label="Goes out">${opt(false, 'Once')}${opt(true, 'Repeats')}</div>${more}`
|
|
131
|
-
+ `<p class="vz-note">${q.repeat ? '
|
|
131
|
+
+ `<p class="vz-note">${q.repeat ? 'PMOS drafts each cycle on its day. ' : ''}You approve each issue; nothing goes out by itself.</p></fieldset>`;
|
|
132
132
|
}
|
|
133
133
|
function lookHtml(o) {
|
|
134
|
-
const words = o.look ? `<p class="vz-note">Your words: “${esc(o.look)}”.
|
|
134
|
+
const words = o.look ? `<p class="vz-note">Your words: “${esc(o.look)}”. PMOS makes this look after the first draft; until then it uses the standard look.</p>` : '';
|
|
135
135
|
return `<fieldset class="rf-q"><legend>Look</legend><p class="rf-fix"><b>Standard PMOS look</b><span>Nunito, navy title slides, 16:9</span></p>${words}</fieldset>`;
|
|
136
136
|
}
|
|
137
137
|
/* ── the template's sections and look (canvas TplA) ── */
|
|
@@ -154,7 +154,7 @@ function tplLookHtml(T, name, o) {
|
|
|
154
154
|
const words = next ? next.words : L.words;
|
|
155
155
|
const std = next ? next.n == null : L.saved == null;
|
|
156
156
|
const fol = !std && (L.follows || []).length ? `<small>Follows ${esc(L.follows.join(', '))}</small>` : std ? '<small>Nunito, navy title slides, 16:9</small>' : '';
|
|
157
|
-
const making = o && o.making ? `<p class="vz-note" role="status">
|
|
157
|
+
const making = o && o.making ? `<p class="vz-note" role="status">PMOS is making the look you asked for: “${esc(o.making)}”. It shows here to approve when it is ready.</p>` : '';
|
|
158
158
|
return `<fieldset class="rf-q"><legend>Look${next ? ' ' + tag('changed', 'ch') : ''}</legend><div class="rf-lk"><span class="rf-mini" data-k="${std ? 'std' : 'own'}" aria-hidden="true"><b>${esc(name || '')}</b></span>`
|
|
159
159
|
+ `<p class="rf-fix"><b>${esc(words || 'Standard PMOS look')}</b>${fol}</p></div>${making}</fieldset>`;
|
|
160
160
|
}
|
|
@@ -186,7 +186,7 @@ function proposalHtml(T, words, a, o) {
|
|
|
186
186
|
function sourcesHtml(o) {
|
|
187
187
|
const L = (o.sources || []).filter(Boolean);
|
|
188
188
|
if (!L.length) return '';
|
|
189
|
-
return `<fieldset class="rf-q"><legend>Sources</legend><ul class="rf-src">${L.map((x) => `<li>${esc(x)}</li>`).join('')}</ul><p class="vz-note">
|
|
189
|
+
return `<fieldset class="rf-q"><legend>Sources</legend><ul class="rf-src">${L.map((x) => `<li>${esc(x)}</li>`).join('')}</ul><p class="vz-note">PMOS reads these for the draft. Each slide names what it read, and what it could not reach.</p></fieldset>`;
|
|
190
190
|
}
|
|
191
191
|
/** Template history (RfH3): newest first; each one that is not the current one has Go back. */
|
|
192
192
|
export function historyHtml(versions = [], a = 'data-rt', o = {}) {
|
|
@@ -218,7 +218,7 @@ export function questionsHtml(q, o = {}, a = 'data-rt') {
|
|
|
218
218
|
const words = all;
|
|
219
219
|
const fx = proposalHtml(T, words, a, o);
|
|
220
220
|
const note = words.length && !fx ? `<p class="rf-chg">${tag('changed', 'ch')} ${esc(words.join('; '))}. This makes a different template. The current one keeps its draft and its cycles.</p>` : '';
|
|
221
|
-
const ask = tpl && !fx ? `<p class="vz-note">To change the look or the sections, ask in the chat.
|
|
221
|
+
const ask = tpl && !fx ? `<p class="vz-note">To change the look or the sections, ask in the chat. PMOS proposes; you approve.</p>` : '';
|
|
222
222
|
return `<div class="rf-qs">${head}${body}${fx}${note}${ask}${historyHtml(T.versions, a, { pending: words.length ? words.join('; ') : '', busy: o.busy })}${msg}`
|
|
223
223
|
+ `<div class="rf-foot"><button type="button" class="rf-ib vz-hv" ${a}="keep" aria-label="Keep the current template" title="Keep the current template">${SV(ICON.back)}</button>`
|
|
224
224
|
+ `<button type="button" class="rf-ib pri vz-hv" ${a}="maketpl" aria-label="Make a different template" title="Make a different template"${o.busy || !words.length || !q.audience.trim() ? ' disabled' : ''}>${SV(ICON.check, 18)}</button></div></div>`;
|
|
@@ -229,7 +229,7 @@ export function waitHtml(F = {}, face = '') {
|
|
|
229
229
|
const d = F.drafting;
|
|
230
230
|
if (d && d.state === 'held') return `<div class="rf-wait">${face}<p><b>The draft waits for a check of ${esc((d.sources || []).join(', '))}.</b><span>It starts by itself when the check passes.</span></p></div>`;
|
|
231
231
|
if (d && d.state === 'ended') return `<div class="rf-wait" data-k="bad">${face}<p><b>The drafting session ended before a draft was written.</b><span>${esc(d.reason || '')}</span></p><button type="button" class="rf-ib pri vz-hv" data-rt="redraft" aria-label="Draft it again" title="Draft it again">${SV(ICON.go)}</button></div>`;
|
|
232
|
-
if (d && d.state === 'drafting') return `<div class="rf-wait" role="status">${face}<p><b>The report's own session is drafting it.</b><span>It opens here when it lands. Keep talking to
|
|
232
|
+
if (d && d.state === 'drafting') return `<div class="rf-wait" role="status">${face}<p><b>The report's own session is drafting it.</b><span>It opens here when it lands. Keep talking to PMOS in the chat.</span></p></div>`;
|
|
233
233
|
// an open session is not a draft being written (Wawan, 2026-11-04: "drafting it" stayed after the session declined): say what it is doing
|
|
234
234
|
if (F.asking) return `<div class="rf-wait" role="status">${face}<p><b>Your change is with the report's session.</b><span>Its answer shows here when it is done.</span></p></div>`;
|
|
235
235
|
if (F.answer) return `<div class="rf-wait">${face}<p><b>${esc(F.answer.text)}</b><span>No draft is open. Draft it now, or it drafts on its day.</span></p><button type="button" class="rf-ib pri vz-hv" data-rt="redraft" aria-label="Draft it now" title="Draft it now">${SV(ICON.go)}</button></div>`;
|
|
@@ -252,5 +252,5 @@ export function reviewHtml(rv, o = {}, a = 'data-r') {
|
|
|
252
252
|
: `<button type="button" class="rf-ib vz-hv" ${a}="rv-no|${esc(f.id)}" aria-label="Not now" title="Not now">${SV(ICON.x)}</button><button type="button" class="rf-ib pri vz-hv" ${a}="rv-do|${esc(f.id)}" aria-label="Do it" title="Do it"${o.busy ? ' disabled' : ''}>${SV(ICON.go)}</button>`) + '</div>').join('');
|
|
253
253
|
const P = rv.passed || [];
|
|
254
254
|
const pass = P.length ? `<p class="rf-pass"><b>${P.length} other ${P.length === 1 ? 'check' : 'checks'} found nothing</b><span>${esc(P.join(' · '))}</span></p>` : '';
|
|
255
|
-
return `<section class="rf-rv" aria-label="
|
|
255
|
+
return `<section class="rf-rv" aria-label="PMOS's review"><div class="rf-rvh">${o.face || ''}<b>${esc(line)}</b>${all}</div>${rows}${pass}</section>`;
|
|
256
256
|
}
|
|
@@ -51,7 +51,7 @@ export function assHtml(S, o) {
|
|
|
51
51
|
if (S.pick && !h.has(keyOf(S, 'pick'))) {
|
|
52
52
|
const ord = (S.orders || []).find((x) => x.id === S.pick.id);
|
|
53
53
|
if (!ord) return '';
|
|
54
|
-
return `<div class="ro-ass" role="group" aria-label="
|
|
54
|
+
return `<div class="ro-ass" role="group" aria-label="PMOS's pick"><p><b class="ro-st" aria-hidden="true">✦</b> The ${e(ord.name)} order fits this report's question.</p>`
|
|
55
55
|
+ `<p class="ro-pts">${parts(o, ord.parts, S.pick.adds)}${(S.pick.drops || []).map((x) => `<span class="ro-pt cut">${e(x)}</span>`).join('')}</p>`
|
|
56
56
|
+ `<p class="ro-note">Blue is added${(S.pick.drops || []).length ? ', struck through is dropped' : ''}. Every reading stays.</p>`
|
|
57
57
|
+ `<div class="ro-acts">${btn(o, 'ord|hide|pick', 'x', 'Not now')}${btn(o, 'ord|open|' + ord.id, 'grid', 'See it with the other orders')}${btn(o, 'ord|apply|' + ord.id, 'check', 'Redraft in this order', ' rp-pri')}</div></div>`;
|
|
@@ -73,7 +73,7 @@ function pics(o, L, n = 4) {
|
|
|
73
73
|
}
|
|
74
74
|
const more = (n) => n + (n === 1 ? ' slide' : ' slides') + (n > 4 ? ' · +' + (n - 4) + ' more' : '');
|
|
75
75
|
function cardHtml(S, o, c) {
|
|
76
|
-
const e = o.esc, mark = c.now ? '<span class="ro-tag">Now</span>' : c.mine ? '<span class="ro-tag">Mine</span>' : S.pick && S.pick.id === c.id ? '<span class="ro-tag ro-star" aria-label="
|
|
76
|
+
const e = o.esc, mark = c.now ? '<span class="ro-tag">Now</span>' : c.mine ? '<span class="ro-tag">Mine</span>' : S.pick && S.pick.id === c.id ? '<span class="ro-tag ro-star" aria-label="PMOS\'s pick">✦</span>' : '';
|
|
77
77
|
return `<button type="button" class="ro-card${c.now ? ' now' : ''}" data-r="ord|open|${e(c.id)}"${c.now ? ' aria-current="true"' : ''}>${pics(o, c.now ? o.now : o.pics(c.id))}`
|
|
78
78
|
+ `<span class="ro-cn">${mark}<b>${e(c.name)}</b></span><small>${more(c.n)}</small></button>`;
|
|
79
79
|
}
|
|
@@ -45,7 +45,7 @@ const md = (iso) => (/^\d{4}-\d{2}-\d{2}/.test(String(iso || '')) ? MON[+iso.sli
|
|
|
45
45
|
/* ── the dot and the card ── */
|
|
46
46
|
export function dotHtml(r) {
|
|
47
47
|
const sg = r && r.suggest; if (!sg) return '';
|
|
48
|
-
return `<i class="sm-dot" role="img" aria-label="${esc('
|
|
48
|
+
return `<i class="sm-dot" role="img" aria-label="${esc('PMOS suggests: ' + sg.title)}" title="${esc('PMOS suggests: ' + sg.title)}"></i>`;
|
|
49
49
|
}
|
|
50
50
|
/** The row's name with the dot: the name clips and the dot stays in view. Without a suggestion, the name alone. */
|
|
51
51
|
export function nameHtml(r, title) {
|
|
@@ -59,7 +59,7 @@ export function cardHtml(sg, title) {
|
|
|
59
59
|
? [[ICON.scissors, sg.name, countText(sg.counts || {})], [ICON.stay, 'Stays here', sg.stays || '']]
|
|
60
60
|
: [[ICON.stay, sg.intoTitle + ' stays', sg.reason ? 'Because ' + sg.reason : ''], [ICON.merge, (title || 'This one') + ' closes', 'Its work moves; its chats, run log and history stay']];
|
|
61
61
|
const ok = split ? 'Split as suggested' : 'Merge as suggested';
|
|
62
|
-
return `<section class="sm-card" role="region" aria-label="${esc('
|
|
62
|
+
return `<section class="sm-card" role="region" aria-label="${esc('PMOS suggests: ' + sg.title)}"><div class="sm-h">${adler('needs-you', 36, { label: false })}<b>${esc(sg.title)}</b></div>`
|
|
63
63
|
+ (sg.why ? `<p class="sm-why">${esc(sg.why)}</p>` : '')
|
|
64
64
|
+ lines.map(([d, b, t]) => `<div class="sm-pl">${SVG(d, 15)}<span><b>${esc(b)}</b>${t ? ' · ' + esc(t) : ''}</span></div>`).join('')
|
|
65
65
|
+ `<div class="sm-acts"><button type="button" class="sm-ib" data-sm="no" aria-label="Not now" title="Not now">${SVG(ICON.x, 16)}</button>`
|
|
@@ -101,7 +101,7 @@ export async function press(c, act) {
|
|
|
101
101
|
const facts = sg.kind === 'merge' ? { into: sg.into } : { moves: [...(sg.tasks || []), ...(sg.tickets || [])] };
|
|
102
102
|
const x = await c.pmPost('/api/initiatives/suggest', { ws: c.ws, id: r.id, of: sg.kind, fp: sg.fp, ...facts }).catch(() => null);
|
|
103
103
|
if (!x || !x.ok) { c.say((x && x.error) || 'It is still shown. The server did not say why.'); return; }
|
|
104
|
-
c.say(sg.kind === 'merge' ? 'Not now.
|
|
104
|
+
c.say(sg.kind === 'merge' ? 'Not now. PMOS will not suggest this merge again.' : 'Not now. PMOS will not suggest this split again.');
|
|
105
105
|
await c.reload();
|
|
106
106
|
return;
|
|
107
107
|
}
|
|
@@ -175,7 +175,7 @@ export function splitHtml(c, S) {
|
|
|
175
175
|
const can = !!(S.name.trim() && (k.tasks || k.tickets || k.docs));
|
|
176
176
|
const stageSel = S.stages.length ? `<label class="sm-st">starts at <select data-sm-stage aria-label="The stage it starts at">${S.stages.map((s) => `<option value="${esc(s.key)}"${st && st.key === s.key ? ' selected' : ''}>${esc(s.name)}</option>`).join('')}</select>${SVG(ICON.down, 13)}</label>` : '';
|
|
177
177
|
return `<div class="sm-v" data-sm-v="split"><div class="sm-nf">${SVG(ICON.scissors, 17)}<input id="smName" type="text" maxlength="120" aria-label="Name of the new initiative" placeholder="Name the new initiative" value="${esc(S.name)}">`
|
|
178
|
-
+ (S.claude && S.name ? `<span class="sm-sg" title="
|
|
178
|
+
+ (S.claude && S.name ? `<span class="sm-sg" title="PMOS named it from the picked tasks">${SVG(ICON.spark, 15)}</span>` : '') + '</div>'
|
|
179
179
|
+ `<p class="sm-keep">${keep.length ? 'Keeps ' + keep.map(esc).join(' · ') + (stageSel ? ' · ' : '') : ''}${stageSel}</p>`
|
|
180
180
|
+ `<div class="sm-list">${groupHtml('Tasks', S.tasks, S, null)}${groupHtml('Jira tickets', S.tickets, S, ICON.jira)}${S.docs == null ? '<p class="sm-q">Reading the documents…</p>' : groupHtml('Documents', S.docs, S, ICON.doc)}`
|
|
181
181
|
+ (!S.tasks.length && !S.tickets.length && S.docs && !S.docs.length ? '<p class="sm-q">It has no tasks, tickets or documents to move yet.</p>' : '') + '</div>'
|
|
@@ -233,7 +233,7 @@ export function mergeHtml(c, S) {
|
|
|
233
233
|
const lbl = (r) => (r.kr && r.kr.label) || r.anchor || 'No anchor';
|
|
234
234
|
const diffs = [];
|
|
235
235
|
if ((a.anchor || '') !== (b.anchor || '') && a.anchor) {
|
|
236
|
-
const opt = (r) => `<button type="button" role="radio" aria-checked="${S.anchor === (r.anchor || '')}" data-sm-anchor="${esc(r.anchor || '')}">${esc(lbl(r))}${r === b ? `<span class="sm-sg2" title="
|
|
236
|
+
const opt = (r) => `<button type="button" role="radio" aria-checked="${S.anchor === (r.anchor || '')}" data-sm-anchor="${esc(r.anchor || '')}">${esc(lbl(r))}${r === b ? `<span class="sm-sg2" title="PMOS’s pick">${SVG(ICON.spark, 12)}</span>` : ''}</button>`;
|
|
237
237
|
diffs.push(`<div class="sm-df"><span class="sm-dl">Anchor</span><div class="sm-seg" role="radiogroup" aria-label="Anchor">${opt(a)}${opt(b)}</div></div>`);
|
|
238
238
|
}
|
|
239
239
|
const prd = hasPrd(a) && hasPrd(b) ? `<p class="sm-dn">${SVG(ICON.doc, 15)}Both have a PRD. ${esc(b.title)}’s stays the PRD; the other joins its documents.</p>`
|
|
@@ -29,7 +29,7 @@ export function storyHtml(story, o = {}) {
|
|
|
29
29
|
const L = lines(story); if (!L.length) return '';
|
|
30
30
|
const chip = (x) => `<span class="st-src" title="${esc(x.ref || x.label)}">${esc(x.label)}</span>`;
|
|
31
31
|
const p = L.map((l) => `<p>${bold(l.text)}${o.sources && Array.isArray(l.sources) ? l.sources.filter((x) => x && x.label).map(chip).join('') : ''}</p>`).join('');
|
|
32
|
-
const sub = o.sub != null ? o.sub : ['
|
|
32
|
+
const sub = o.sub != null ? o.sub : ['PMOS keeps it current', when(story.at)].filter(Boolean).join(' · ');
|
|
33
33
|
return `<section class="${o.cls || 'pv-card'} st-story" aria-label="The story so far"><div class="st-h"><h4>${esc(o.label || 'The story so far')}</h4>${sub ? `<small>${esc(sub)}</small>` : ''}</div>${p}</section>`;
|
|
34
34
|
}
|
|
35
35
|
export function storyText(story) { return lines(story).map((l) => plain(l.text)).join('\n\n'); }
|
|
@@ -203,7 +203,7 @@ export function historyHtml(hist, open, now = Date.now()) {
|
|
|
203
203
|
const rows = L.map((x) => {
|
|
204
204
|
const recent = now - (Date.parse(x.at) || 0) < 7 * 864e5;
|
|
205
205
|
const what = x.field === 'add' ? 'Added from ' + (x.source || 'your sources') : (FIELD[x.field] || x.field) + ': ' + valOf(x.field, x.from) + ' → ' + valOf(x.field, x.to);
|
|
206
|
-
return `<li><span class="w"><b>${esc(what)}</b><small>${esc(['
|
|
206
|
+
return `<li><span class="w"><b>${esc(what)}</b><small>${esc(['PMOS, kept by you ' + short(String(x.at).slice(0, 10)), x.why, x.field !== 'add' && x.source ? x.source : ''].filter(Boolean).join(' · '))}</small></span>`
|
|
207
207
|
+ (recent && x.batch ? `<button type="button" class="tkc-hu" data-tkc-hundo="${esc(x.batch)}" aria-label="Undo this change" title="Undo">${ico('<path d="M9 14L4 9l5-5M4 9h10a6 6 0 0 1 0 12h-3"/>', 15)}</button>` : '') + '</li>';
|
|
208
208
|
}).join('');
|
|
209
209
|
return `<div class="ovb tkc-h"><button type="button" class="tkc-hh" data-tkc-hist aria-expanded="${!!open}"><b>History</b><span class="n">${L.length}</span>${ico(open ? '<path d="M6 9l6 6 6-6"/>' : I.chev, 14)}</button>${open ? `<ul>${rows}</ul>` : ''}</div>`;
|
|
@@ -71,7 +71,7 @@ export async function openDraft(o) {
|
|
|
71
71
|
const d0 = D();
|
|
72
72
|
const more = [
|
|
73
73
|
{ label: 'Edit the title', on: (b) => o.ui.ask(b, 'Title', (D() || d0 || {}).title || '', (v) => save({ summary: v }, 'Title changed.'), { max: 250 }) },
|
|
74
|
-
{ label: 'Edit with
|
|
74
|
+
{ label: 'Edit with PMOS', on: () => {
|
|
75
75
|
const ta = document.getElementById('hmIn'); if (!ta) { if (o.toast) o.toast('The chat is not on this page.'); return; }
|
|
76
76
|
ta.value = `Edit the drafted Jira ticket ${o.id} of the initiative ${o.initiative} (pmos jira show ${o.initiative}). Change: `;
|
|
77
77
|
ta.dispatchEvent(new Event('input', { bubbles: true })); ta.focus(); ta.setSelectionRange(ta.value.length, ta.value.length);
|
|
@@ -33,7 +33,7 @@ export function closeSend() {
|
|
|
33
33
|
function sheetHtml(M, st) {
|
|
34
34
|
const where = `<div class="tk-wr"><span class="tk-wl">Project</span>${st.projects.length > 1 && M.projectFrom !== 'epic'
|
|
35
35
|
? `<select class="tk-sel" data-tk-project aria-label="Jira project">${st.projects.map((p) => `<option${p === st.project ? ' selected' : ''}>${esc(p)}</option>`).join('')}</select>`
|
|
36
|
-
: M.project ? `<span class="tk-wv">${esc(M.project)}</span>` : '<span class="tk-wv mut">
|
|
36
|
+
: M.project ? `<span class="tk-wv">${esc(M.project)}</span>` : '<span class="tk-wv mut">PMOS asks you before it creates anything</span>'}</div>`;
|
|
37
37
|
const sec = M.sections.map((s) => {
|
|
38
38
|
const ch = st.change === s.id;
|
|
39
39
|
const epic = `<div class="tk-wr"><span class="tk-wl">Epic</span><span class="tk-wv">${esc(s.epic.label)}</span>`
|
|
@@ -110,7 +110,7 @@ export async function openSend(o = {}) {
|
|
|
110
110
|
st.busy = false;
|
|
111
111
|
if (!r || r.ok === false) { st.msg = (r && r.error) || 'Nothing was sent.'; draw(); return; }
|
|
112
112
|
closeSend();
|
|
113
|
-
if (o.toast) o.toast(`Sending ${ids.length === 1 ? 'the ticket' : ids.length + ' tickets'} to Jira.
|
|
113
|
+
if (o.toast) o.toast(`Sending ${ids.length === 1 ? 'the ticket' : ids.length + ' tickets'} to Jira. PMOS creates ${ids.length === 1 ? 'it' : 'them'} with your Atlassian connection, then reads ${ids.length === 1 ? 'it' : 'them'} back.`);
|
|
114
114
|
if (o.onDone) o.onDone(r);
|
|
115
115
|
}
|
|
116
116
|
});
|
|
@@ -141,7 +141,7 @@ function bridgeHtml(wf, ro) {
|
|
|
141
141
|
if (!wf.bridge && from.stages.every((x) => keys.has(x.key))) return '';
|
|
142
142
|
const map = mapOf(from, wf);
|
|
143
143
|
const rows = from.stages.map((st) => `<label class="wf-brr"><span>${esc(st.name)}</span>${svg('M5 12h14M13 6l6 6-6 6', 18)}<select data-wf-br="${esc(st.key)}" aria-label="${esc('Where ' + st.name + ' goes')}"${S.busy ? ' disabled' : ''}>${wf.stages.map((t) => `<option value="${esc(t.key)}"${t.key === map[st.key] ? ' selected' : ''}>${esc(t.name)}</option>`).join('')}</select></label>`).join('');
|
|
144
|
-
return `<section class="wf-box wf-br" aria-label="${esc('Replaces ' + from.name)}"><div class="wf-brh"><b>Replaces ${esc(from.name)}</b><span class="wf-small wf-mut">${wf.bridge && wf.bridge.from === from.id ? 'saved once, used every time' : '
|
|
144
|
+
return `<section class="wf-box wf-br" aria-label="${esc('Replaces ' + from.name)}"><div class="wf-brh"><b>Replaces ${esc(from.name)}</b><span class="wf-small wf-mut">${wf.bridge && wf.bridge.from === from.id ? 'saved once, used every time' : 'PMOS’s proposal'}</span></div>${rows}`
|
|
145
145
|
+ `<p class="wf-small wf-mut">Any initiative that switches from ${esc(from.name)} to ${esc(wf.name)} uses this bridge. Its stage and tasks move together. New initiatives start in ${esc(wf.stages[0].name)} as usual.</p></section>`;
|
|
146
146
|
}
|
|
147
147
|
async function saveBridge(wf, key, to) {
|
|
@@ -316,7 +316,7 @@ function openNew() {
|
|
|
316
316
|
function newHtml() {
|
|
317
317
|
const d = S.draft, n = d && d.stages ? d.stages.length : 0;
|
|
318
318
|
const head = `<div class="wf-head">${isPhone() ? `<button type="button" class="ib sm" data-wf-back aria-label="All workflows" title="All workflows">${svg(ICON.back, 18)}</button>` : ''}<h1 class="wf-h1">${esc((d && d.name) || 'New workflow')}</h1>${d ? `<span class="wf-small wf-mut">${n} stage${n === 1 ? '' : 's'} · a draft</span>` : ''}</div>`;
|
|
319
|
-
return head + `<div class="wf-box wf-small wf-newb"><p>${d ? '
|
|
319
|
+
return head + `<div class="wf-box wf-small wf-newb"><p>${d ? 'PMOS drafted it in the chat. It shows in the Viewer: Create workflow, or Edit by hand.' : 'PMOS drafts it in the chat while you describe it. The draft shows here.'}</p>`
|
|
320
320
|
+ '<div class="wf-acts"><button type="button" class="wf-btn dark sm" data-wf-new>Continue in the chat</button></div></div>';
|
|
321
321
|
}
|
|
322
322
|
function draftHtml(d) {
|
|
@@ -120,7 +120,7 @@ const SPONSORS = '# Inline login slips to early December unless passkeys move to
|
|
|
120
120
|
await p.click('#czViewer [data-pv="props"]');
|
|
121
121
|
await p.click('#czViewer .db-need [data-db="needs"][data-k="keep"]');
|
|
122
122
|
const kp = await until(() => X.posts.find((x) => x.path === '/api/proposals/keep'));
|
|
123
|
-
ok('N ✓ keeps
|
|
123
|
+
ok('N ✓ keeps PMOS\'s pick: POST /api/proposals/keep with the proposal ids and the initiative', !!kp && kp.body.ids.join() === 'p-dates-1' && kp.body.initiative === 'descope-parity' && kp.body.ws === 'idpf', JSON.stringify(kp));
|
|
124
124
|
ok('N the dashboard is read again after the press', (await until(() => X.gets.filter((g) => g.scope === 'program:project-ascent').length >= 2, 3000)));
|
|
125
125
|
|
|
126
126
|
/* ── R: the Reports tab: a report row, and its two cuts ── */
|
|
@@ -122,7 +122,7 @@ const OTHER = `<!doctype html><html><head><meta charset="utf-8"></head><body><bu
|
|
|
122
122
|
ok('P2 the stage becomes the presenter: They see this, 1 of 3, time on this slide', await until(async () => { const t = await text(); return /They see this/.test(t) && /1 of 3/.test(t) && /\d:\d\d on this slide/.test(t); }), await text());
|
|
123
123
|
ok('P2 the shared screen is put away while presenting, not removed', await p.evaluate(() => { const o = document.querySelector('#rtStage > .rt-own'); return o.hidden && getComputedStyle(o).display === 'none'; }));
|
|
124
124
|
ok('P2 Next shows the next slide drawn small, and the slide they see is drawn', await until(() => p.evaluate(() => !!document.querySelector('[data-rxp-slide="next"] .sl-it') && !!document.querySelector('[data-rxp-slide="cur"] .sl-it'))));
|
|
125
|
-
ok('P2 with no speaker notes, the notes are
|
|
125
|
+
ok('P2 with no speaker notes, the notes are PMOS\'s points from the prep', /From the prep/.test(await text()) && /Ask Ana about the print view/.test(await text()));
|
|
126
126
|
ok('P2 the audience tab draws the same slide and says 1 / 3', await until(async () => aud && (await aud.evaluate(() => !!document.querySelector('#aud .vzx-box .sl-it') && document.getElementById('audFt').innerText.includes('1 / 3')))), aud && await aud.evaluate(() => document.body.innerHTML.slice(0, 300)));
|
|
127
127
|
ok('P2 the audience tab is named after the material', aud && await until(async () => (await aud.title()) === 'Release deck · audience'));
|
|
128
128
|
ok('P2 the audience tab has no controls', aud && await aud.evaluate(() => !document.querySelector('button, input, a')));
|
|
@@ -159,7 +159,7 @@ const OTHER = `<!doctype html><html><head><meta charset="utf-8"></head><body><bu
|
|
|
159
159
|
await until(() => p.$('.rxp-pop [data-rxp="screen"]'));
|
|
160
160
|
await p.click('.rxp-pop [data-rxp="screen"]');
|
|
161
161
|
ok('P5 a window: They see this · your Jira window, live', await until(async () => /They see this · your Jira window/.test(await text()) && await p.evaluate(() => { const v = document.querySelector('[data-rxp-video]'); return !!v && !!v.srcObject; })), await text());
|
|
162
|
-
ok('P5
|
|
162
|
+
ok('P5 PMOS\'s points for this screen, from the prep', /For this screen/.test(await text()) && /PSLE-212/.test(await text()));
|
|
163
163
|
ok('P5 no Previous or Next: the PM moves through it in that window', !(await p.$('[data-rxp="next"]')) && /on this screen/.test(await text()));
|
|
164
164
|
ok('P5 a shot is kept when the picture changes', await until(() => p.evaluate(() => document.querySelectorAll('.rxp-shots img').length >= 1), 12000));
|
|
165
165
|
await shot(p, 'present-window');
|
package/workspace/server.js
CHANGED
|
@@ -3318,7 +3318,7 @@ bgQueue = require('./lib/bg-queue.js').create({
|
|
|
3318
3318
|
running: () => orchSpawn.running(),
|
|
3319
3319
|
offOf: (id) => require('./lib/ai-guard.js').off(id, { settingsDir: STATE }),
|
|
3320
3320
|
spend: (now) => { const G = require('./lib/grill.js'); let cap = 10; try { const c = Number(require('./lib/settings-store.js').get(STATE, 'grill.cap')); if (Number.isFinite(c) && c >= 0) cap = c; } catch { /* the default cap */ }
|
|
3321
|
-
const b = G.budgetFor(G.read(STATE), { cap, now }); return b.ok ? { atCap: false } : { atCap: true, why: `this month's spend is at the $${cap} limit in Settings ›
|
|
3321
|
+
const b = G.budgetFor(G.read(STATE), { cap, now }); return b.ok ? { atCap: false } : { atCap: true, why: `this month's spend is at the $${cap} limit in Settings › PMOS's checks` }; },
|
|
3322
3322
|
workEnd: () => { const d = (proSettings() || {}).dayCheck; return d && d.end ? d.end : '18:00'; },
|
|
3323
3323
|
sessions: () => [...sessions.values()],
|
|
3324
3324
|
warn: (what, e) => warnWriteFail(what, e),
|
|
@@ -3388,7 +3388,7 @@ const idleLab = require('./lib/idle-lab-engine.js').create({
|
|
|
3388
3388
|
const G = require('./lib/grill.js'), E = require('./lib/idle-lab-engine.js');
|
|
3389
3389
|
let cap = 10; try { const c = Number(require('./lib/settings-store.js').get(STATE, 'grill.cap')); if (Number.isFinite(c) && c >= 0) cap = c; } catch { /* the default cap */ }
|
|
3390
3390
|
const b = G.budgetFor(G.read(STATE), { cap: cap - E.spentIn(STATE, E.monthOf(now)), now });
|
|
3391
|
-
return b.ok ? { ok: true, budget: b.budget } : { ok: false, why: `this month's spend is at the $${cap} limit in Settings ›
|
|
3391
|
+
return b.ok ? { ok: true, budget: b.budget } : { ok: false, why: `this month's spend is at the $${cap} limit in Settings › PMOS's checks` };
|
|
3392
3392
|
},
|
|
3393
3393
|
promptFor: (skillId) => { const h = homeWorkspace(); const t = taskById(skillId, h ? h.root : SELF_ROOT); return t && t.prompt ? t.prompt : null; },
|
|
3394
3394
|
spawn: (spec) => orchSpawn.spawn({ name: spec.name, agent: 'claude', ws: spec.ws, origin: spec.origin, initialInput: spec.initialInput, initiative: spec.initiative, extraEnv: spec.env,
|
|
@@ -6098,11 +6098,15 @@ function stateDirFor(w, { create = false } = {}) {
|
|
|
6098
6098
|
const d = path.join(w.root, ...rel);
|
|
6099
6099
|
if (isDir(d)) return d;
|
|
6100
6100
|
}
|
|
6101
|
-
// pmos-self with no pmos/state/ yet: the checkout's
|
|
6102
|
-
//
|
|
6103
|
-
//
|
|
6104
|
-
// tenant home — that writes to its OWN repo below.)
|
|
6105
|
-
if (EMBEDDED_SELF && w.root === SELF_ROOT)
|
|
6101
|
+
// pmos-self with no pmos/state/ yet: lib/state-root.js#selfRecordsDir. It keeps the checkout's own
|
|
6102
|
+
// state/ only where that already holds records; a fresh clone (a cloud session, CI) gets the
|
|
6103
|
+
// per-user folder, so machine events are never written into the app folder and committed.
|
|
6104
|
+
// (Never a tenant home — that writes to its OWN repo below.)
|
|
6105
|
+
if (EMBEDDED_SELF && w.root === SELF_ROOT) {
|
|
6106
|
+
const d = stateRoot.selfRecordsDir({ legacy: LEGACY_STATE });
|
|
6107
|
+
try { fs.mkdirSync(d, { recursive: true }); } catch {}
|
|
6108
|
+
return d;
|
|
6109
|
+
}
|
|
6106
6110
|
// A PMOS-shaped repo with no state dir yet gets the kit's own layout on first write. Never
|
|
6107
6111
|
// invented for a plain repo — there we fall back and SAY SO rather than write somewhere wrong.
|
|
6108
6112
|
if (create && wsShape(w.root) === 'pmos') {
|
|
@@ -7452,7 +7456,7 @@ async function handleRequest(req, res) {
|
|
|
7452
7456
|
touchSession(sess);
|
|
7453
7457
|
if (p === '/api/session/say') {
|
|
7454
7458
|
const t = String(body.text == null ? '' : body.text).trim();
|
|
7455
|
-
if (!t) return json(res, { ok: false, error: 'Write a message for
|
|
7459
|
+
if (!t) return json(res, { ok: false, error: 'Write a message for PMOS.' }, 400);
|
|
7456
7460
|
if (t.length > 8000) return json(res, { ok: false, error: 'The message is too long (8000 characters at most).' }, 400);
|
|
7457
7461
|
return chatSessions.type(sess.id, t) ? json(res, { ok: true, session: sess.id }) : json(res, { ok: false, error: 'The message did not reach the session.' }, 409);
|
|
7458
7462
|
}
|
|
@@ -78,10 +78,10 @@ const json = (r, body, status = 200) => r.fulfill({ status, contentType: 'applic
|
|
|
78
78
|
const page = await ctx.newPage(); await setup(page, cur, posts);
|
|
79
79
|
await page.goto(BASE + '/premium.html?theme=light');
|
|
80
80
|
const opened = await openRow(page, CLI);
|
|
81
|
-
ok('A1 before
|
|
81
|
+
ok('A1 before PMOS has named it, the row and the header show the CLI\'s opening title', opened && ((await headOf(page)) || {}).name === CLI, JSON.stringify(await headOf(page)));
|
|
82
82
|
cur.s = { ...cur.s, auto_name: AUTO, hx: { title: CLI, turns: 2 } }; // Claude named it after its first real answer
|
|
83
83
|
const named = await until(async () => { const h = await headOf(page); return h && h.name === AUTO && (await rowText(page)).includes(AUTO) ? h : null; }, 15000);
|
|
84
|
-
ok('A1 once
|
|
84
|
+
ok('A1 once PMOS names it, the Home row and the chat header show PMOS\'s name, without a reload', !!named && !(await rowText(page)).includes(CLI), await rowText(page));
|
|
85
85
|
let h = await headOf(page);
|
|
86
86
|
ok('R1 the name is the rename press: a text cursor, no pencil button', h && h.cursor === 'text' && !h.pencil, JSON.stringify(h));
|
|
87
87
|
await page.click('#hmCh [data-hm-rn]');
|
|
@@ -102,7 +102,7 @@ const json = (r, body, status = 200) => r.fulfill({ status, contentType: 'applic
|
|
|
102
102
|
ok('R3 the toast says Renamed with Undo', /^Renamed\s*Undo$/.test(toast), toast);
|
|
103
103
|
await page.click('#toast .undo');
|
|
104
104
|
h = await until(async () => { const x = await headOf(page); return x && x.name === AUTO ? x : null; });
|
|
105
|
-
ok('R4 Undo gives back
|
|
105
|
+
ok('R4 Undo gives back PMOS\'s name and unlocks its naming (release)', !!h && posts.length === 2 && posts[1].release === true && cur.s.name_by === null, JSON.stringify(posts));
|
|
106
106
|
// the PM names it again; later the server reports a newer auto name, which must not show
|
|
107
107
|
await page.click('#hmCh [data-hm-rn]');
|
|
108
108
|
await until(async () => ((await headOf(page)) || {}).field != null);
|
|
@@ -33,6 +33,8 @@ Procedure:
|
|
|
33
33
|
4. Run `pmos docs check-finish <run> --summary "<n> same, <n> ahead or behind, <n> edited in both, <n> could not check"`.
|
|
34
34
|
5. Run `pmos docs list` and report it in the output sections below.
|
|
35
35
|
|
|
36
|
+
Read before you judge: [output eval](/okf/core/concepts/output-eval.md).
|
|
37
|
+
|
|
36
38
|
Output contract — produce EXACTLY these sections, the same shape every run, one short line per document and copy:
|
|
37
39
|
- Same
|
|
38
40
|
- Ahead or behind
|
|
@@ -30,6 +30,8 @@ Procedure:
|
|
|
30
30
|
File a new round: `pmos lab file improved --json -` with `{ "why": "<what changed and why, one line>", "base": "A", "changed": "<the one thing that changed>", "file": "a-round2.html", "basis": [ … ] }`.
|
|
31
31
|
5. A refusal says what is wrong: fix it and file again.
|
|
32
32
|
|
|
33
|
+
Read before you judge: [design principles](/okf/products/pmos/references/design-principles.md), [output eval](/okf/core/concepts/output-eval.md).
|
|
34
|
+
|
|
33
35
|
Output contract: produce EXACTLY these sections in your final message:
|
|
34
36
|
- Filed (the specimens and what each lets the PM judge, or "nothing" and why)
|
|
35
37
|
- Left out (what you chose not to make, and why)
|
|
@@ -35,6 +35,8 @@ Procedure (each step ends with a check that shows it is done):
|
|
|
35
35
|
4. Check the result with `pmos measure list --json`.
|
|
36
36
|
Done when: each value you recorded is in the list.
|
|
37
37
|
|
|
38
|
+
Read before you judge: [anti-optimism](/okf/core/concepts/okr-anti-optimism.md), [output eval](/okf/core/concepts/output-eval.md).
|
|
39
|
+
|
|
38
40
|
Output sections:
|
|
39
41
|
- **Recorded** — one line per value: anchor, value, target, as_of, source.
|
|
40
42
|
- **Not recorded** — one line per anchor with no value, and why.
|
|
@@ -29,6 +29,8 @@ Procedure:
|
|
|
29
29
|
6. A COMPARE run (the line says the PM's number differs from yours): read the goal your way and the PM's likely way, find why they differ, and file once: `pmos metrics reading <rid> --why "<why, one or two sentences>" --suggest mine|yours --suggest-text "<which to keep and why, one line>" --yours-what "<how the PM counts it, one sentence>" --yours-query "<a query that counts it that way>"`. File no value in a compare run.
|
|
30
30
|
7. Stop when every goal of the run is read or said.
|
|
31
31
|
|
|
32
|
+
Read before you judge: [anti-optimism](/okf/core/concepts/okr-anti-optimism.md), [output eval](/okf/core/concepts/output-eval.md).
|
|
33
|
+
|
|
32
34
|
Output contract: produce EXACTLY these sections in your final message:
|
|
33
35
|
- Read (each goal, its value and its source; say a held value as held)
|
|
34
36
|
- Not read (each goal you could not read, why, and the fix you drafted)
|
|
@@ -47,6 +47,8 @@ The shape of one filing. Every text is one line:
|
|
|
47
47
|
- `name`: for add and rename. `date`: YYYY-MM-DD, for add and move. `waits`: for add, the initiative ids it waits on (empty: a check the PM ticks).
|
|
48
48
|
- `why`: up to 240 characters, what you read that makes the change. `src.kind`: deliver, jira, meeting, task, target, member or charter. `src.label`: the source in a few words, for example "Steering, Oct 22" or "2 initiatives".
|
|
49
49
|
|
|
50
|
+
Read before you judge: [watermelon flag](/okf/core/concepts/watermelon-flag.md), [anti-optimism](/okf/core/concepts/okr-anti-optimism.md).
|
|
51
|
+
|
|
50
52
|
Output contract. End with these three lines and nothing after them:
|
|
51
53
|
Filed: <n suggestions, or none>
|
|
52
54
|
No change: <the milestones you checked that still hold, or none>
|
|
@@ -52,6 +52,8 @@ Procedure:
|
|
|
52
52
|
|
|
53
53
|
Default shape, used ONLY when proposing a definition: the report frame of D78 as amended by D86 point 3. A Headline, a Timeline, one block for each initiative active in the window, New since last report, Decided this cycle, Needs your call, and Sources reached and not reached.
|
|
54
54
|
|
|
55
|
+
Read before you judge: [watermelon flag](/okf/core/concepts/watermelon-flag.md), [anti-optimism](/okf/core/concepts/okr-anti-optimism.md).
|
|
56
|
+
|
|
55
57
|
Output contract — produce EXACTLY these sections, the same shape every run:
|
|
56
58
|
- Headline
|
|
57
59
|
- Sections from the definition
|
|
@@ -54,6 +54,8 @@ Procedure:
|
|
|
54
54
|
|
|
55
55
|
Default shape, used ONLY when proposing a definition: a one-page end-of-day report: what moved, what is blocked, what needs the PM tomorrow. Use the report frame of D78: a Headline, then What moved, Risks and Metrics, then Needs your call and Sources reached and not reached.
|
|
56
56
|
|
|
57
|
+
Read before you judge: [watermelon flag](/okf/core/concepts/watermelon-flag.md), [anti-optimism](/okf/core/concepts/okr-anti-optimism.md).
|
|
58
|
+
|
|
57
59
|
Output contract — produce EXACTLY these sections, the same shape every run:
|
|
58
60
|
- Headline
|
|
59
61
|
- Sections from the definition
|
|
@@ -10,6 +10,8 @@ output:
|
|
|
10
10
|
|
|
11
11
|
/report-design: make ONE HTML render of a report and stop. The lines after this procedure name the mode, the files and the output path.
|
|
12
12
|
|
|
13
|
+
Read before you design: [design principles](/okf/products/pmos/references/design-principles.md).
|
|
14
|
+
|
|
13
15
|
Rules that always hold:
|
|
14
16
|
1. ONE WRITE. Write the render to the output path named below, with the Write tool, and write nothing else. You have no Bash and no web tool. Do not change a repository file.
|
|
15
17
|
2. NOTHING IS SENT. You send no mail, no message and no comment. Use a connector only to read, and only when the PM's settings allow it.
|
|
@@ -54,6 +54,8 @@ Procedure:
|
|
|
54
54
|
|
|
55
55
|
Default shape, used ONLY when proposing a definition: a monthly review: outcomes against goals, decisions, risks, learning, next month. Use the report frame of D78: a Headline, then What moved, Risks and Metrics, then Needs your call and Sources reached and not reached.
|
|
56
56
|
|
|
57
|
+
Read before you judge: [watermelon flag](/okf/core/concepts/watermelon-flag.md), [anti-optimism](/okf/core/concepts/okr-anti-optimism.md).
|
|
58
|
+
|
|
57
59
|
Output contract — produce EXACTLY these sections, the same shape every run:
|
|
58
60
|
- Headline
|
|
59
61
|
- Sections from the definition
|
|
@@ -55,6 +55,8 @@ Procedure:
|
|
|
55
55
|
|
|
56
56
|
Default shape, used ONLY when proposing a definition: a weekly report: progress against initiatives, decisions made, risks, what is next. Use the report frame of D78: a Headline, then What moved, Risks and Metrics, then Needs your call and Sources reached and not reached.
|
|
57
57
|
|
|
58
|
+
Read before you judge: [watermelon flag](/okf/core/concepts/watermelon-flag.md), [anti-optimism](/okf/core/concepts/okr-anti-optimism.md).
|
|
59
|
+
|
|
58
60
|
Output contract — produce EXACTLY these sections, the same shape every run:
|
|
59
61
|
- Headline
|
|
60
62
|
- Sections from the definition
|
|
@@ -86,7 +86,7 @@ const shot = (p, name) => (SHOTS ? p.screenshot({ path: path.join(SHOTS, name) }
|
|
|
86
86
|
/* B — the Board */
|
|
87
87
|
{
|
|
88
88
|
const { ctx, page: p, errors } = await open();
|
|
89
|
-
ok('B the purple dot after the name of the one
|
|
89
|
+
ok('B the purple dot after the name of the one PMOS has a suggestion for', await p.evaluate(() => { const r = [...document.querySelectorAll('#ibBody [data-key]')].find((x) => /Decommission/.test(x.textContent)); return !!(r && r.querySelector('.sm-dot')); }), await p.evaluate(() => [...document.querySelectorAll('#ibBody [data-key]')].slice(0, 8).map((x) => x.className + ':' + x.textContent.slice(0, 50)).join(' / ')));
|
|
90
90
|
if (!(await p.evaluate(() => !!document.querySelector('#ibBody .sm-dot')))) return finish(1);
|
|
91
91
|
const key = await p.evaluate(() => { const d = document.querySelector('#ibBody .sm-dot'); const b = d && d.closest('[data-key]'); return b ? b.dataset.key : null; });
|
|
92
92
|
await p.click(`#ibBody [data-key="${key}"]`);
|
|
@@ -95,7 +95,7 @@ const shot = (p, name) => (SHOTS ? p.screenshot({ path: path.join(SHOTS, name) }
|
|
|
95
95
|
await shot(p, 'board-suggest.png');
|
|
96
96
|
await p.click('#czViewer [data-sm="edit"]');
|
|
97
97
|
const ed = await until(() => p.evaluate(() => { const v = document.querySelector('#czViewer [data-sm-v="split"]'); if (!v) return null; const docs = !v.querySelector('.sm-q'); return docs && { name: v.querySelector('#smName').value, on: [...v.querySelectorAll('.sm-pk.on .sm-t b')].map((b) => b.textContent), keep: v.querySelector('.sm-keep').textContent, cnt: v.querySelector('.sm-cnt').textContent }; }));
|
|
98
|
-
ok('B ✎ opens the split editor with
|
|
98
|
+
ok('B ✎ opens the split editor with PMOS\'s picks ticked: the cutover\'s two tasks, its name, what it keeps', ed && ed.on.length === 2 && ed.on.every((t) => /cutover|traffic/i.test(t)) && ed.name && /starts at/.test(ed.keep) && /2 tasks/.test(ed.cnt), JSON.stringify(ed));
|
|
99
99
|
await shot(p, 'board-split-editor.png');
|
|
100
100
|
await p.click('#czViewer [data-sm-x]');
|
|
101
101
|
ok('B ✕ in the editor goes back to the initiative', await until(() => p.evaluate(() => !!document.querySelector('#czViewer .sm-card'))));
|
|
@@ -167,7 +167,7 @@ const shot = (p, name) => (SHOTS ? p.screenshot({ path: path.join(SHOTS, name) }
|
|
|
167
167
|
await shot(p, 'phone-suggest.png');
|
|
168
168
|
await p.click('#czViewer [data-sm="no"]');
|
|
169
169
|
const t = await until(async () => { const x = await toast(p); return /^Not now/.test(x) ? x : null; });
|
|
170
|
-
ok('P ✕ Not now: the toast says
|
|
170
|
+
ok('P ✕ Not now: the toast says PMOS will not suggest it again', /^Not now/.test(t || ''), t);
|
|
171
171
|
ok('P ✕ Not now hides the card and the dot', await until(() => p.evaluate(() => !document.querySelector('#czViewer .sm-card') && !document.querySelector('#ibBody .sm-dot')), 20000));
|
|
172
172
|
ok('P no page error', !errors.length, errors.join(' | '));
|
|
173
173
|
await ctx.close();
|