create-pmos 0.773.0 → 0.774.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 +17 -25
- package/payload/AGENTS.md +3 -3
- 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 +2 -2
- package/workspace/briefing-premium-insights-test.js +3 -3
- package/workspace/changelog.json +28 -14
- package/workspace/guide/agent-capabilities.md +7 -7
- package/workspace/guide/backlog.md +2 -2
- package/workspace/guide/breakdown.md +1 -1
- package/workspace/guide/claude-proposes.md +13 -13
- package/workspace/guide/cli.md +19 -19
- package/workspace/guide/home.md +46 -46
- package/workspace/guide/index.md +13 -13
- package/workspace/guide/initiatives-and-next-steps.md +11 -11
- package/workspace/guide/intelligence-okr-goals.md +5 -5
- package/workspace/guide/jira.md +3 -3
- package/workspace/guide/layout.md +28 -28
- package/workspace/guide/notes.md +10 -10
- package/workspace/guide/positioning.md +1 -1
- package/workspace/guide/programs.md +46 -46
- package/workspace/guide/reports.md +6 -6
- package/workspace/guide/settings-and-switches.md +11 -11
- package/workspace/guide/statuses.md +7 -7
- package/workspace/intelligence-gaps-ui-test.js +2 -2
- package/workspace/lib/board-cli.js +2 -2
- package/workspace/lib/board-fold.js +1 -1
- package/workspace/lib/board-premium.js +1 -1
- package/workspace/lib/connector-directory.js +1 -1
- package/workspace/lib/cos-chat.js +1 -1
- package/workspace/lib/drift-cli.js +2 -2
- package/workspace/lib/drift.js +1 -1
- package/workspace/lib/event-relay.js +1 -1
- package/workspace/lib/goal-chat.js +1 -1
- package/workspace/lib/impact-cli.js +1 -1
- package/workspace/lib/initiative-chat.js +3 -3
- package/workspace/lib/initiative-cli.js +1 -1
- package/workspace/lib/initiative-premium.js +2 -2
- package/workspace/lib/insights-premium.js +1 -1
- package/workspace/lib/job-graph.js +6 -6
- package/workspace/lib/line.js +1 -1
- package/workspace/lib/loose-proposals.js +1 -1
- package/workspace/lib/mention-cli.js +1 -1
- package/workspace/lib/mobile-nav.js +1 -1
- package/workspace/lib/moments.js +4 -4
- package/workspace/lib/my-work-premium.js +1 -1
- package/workspace/lib/next-prompt.js +2 -2
- package/workspace/lib/pmos-verbs.js +2 -2
- package/workspace/lib/positioning-cli.js +1 -1
- package/workspace/lib/principles-cli.js +2 -2
- package/workspace/lib/program-chat.js +3 -3
- package/workspace/lib/program-cli.js +4 -4
- package/workspace/lib/propose-cli.js +1 -1
- package/workspace/lib/rehearse-read.js +1 -1
- package/workspace/lib/rehearse.js +1 -1
- package/workspace/lib/report-setups.js +1 -1
- package/workspace/lib/routes-board.js +3 -3
- package/workspace/lib/routes-c3-reports.js +1 -1
- package/workspace/lib/routes-loose.js +2 -2
- package/workspace/lib/routes-setup.js +1 -1
- package/workspace/lib/signal-cli.js +1 -1
- package/workspace/lib/task-cli.js +4 -4
- package/workspace/lib/today-cli.js +1 -1
- package/workspace/lib/workflow-cli.js +4 -4
- package/workspace/metric-drafts-ui-test.js +1 -1
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/premium-board-actions-test.js +1 -1
- package/workspace/program-order-test.js +1 -1
- package/workspace/public/pm/bd-acts.js +7 -7
- package/workspace/public/pm/bd-asks.js +1 -1
- package/workspace/public/pm/bd-backlog.js +1 -1
- package/workspace/public/pm/bd-pop.js +1 -1
- package/workspace/public/pm/bd-prog-panel.js +3 -3
- package/workspace/public/pm/bd-publish.js +2 -2
- package/workspace/public/pm/bd-shared.js +3 -3
- package/workspace/public/pm/bd-stages.js +1 -1
- package/workspace/public/pm/cozy-evmodel.js +2 -2
- package/workspace/public/pm/cozy-relay.js +1 -1
- package/workspace/public/pm/cozy-reveal.js +1 -1
- package/workspace/public/pm/cozy-settings.js +3 -3
- package/workspace/public/pm/cozy-viewer.js +1 -1
- package/workspace/public/pm/home-app.js +4 -4
- package/workspace/public/pm/home-data.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-today.js +2 -2
- package/workspace/public/pm/ini-more.js +2 -2
- package/workspace/public/pm/ini-tasks.js +1 -1
- package/workspace/public/pm/loose-props.js +2 -2
- package/workspace/public/pm/metric-drafts.js +3 -3
- package/workspace/public/pm/page-chat.js +1 -1
- package/workspace/public/pm/premium-board.js +4 -4
- package/workspace/public/pm/premium-insights.js +20 -20
- package/workspace/public/pm/premium-meeting.js +1 -1
- package/workspace/public/pm/premium-report-read.js +2 -2
- package/workspace/public/pm/premium-vw-meet.js +1 -1
- package/workspace/public/pm/premium-vw-mtg.js +2 -2
- package/workspace/public/pm/prog-order.js +1 -1
- package/workspace/public/pm/sort-order.js +1 -1
- package/workspace/public/pm/task-card.js +2 -2
- package/workspace/public/pm/wf-stage.js +2 -2
- package/workspace/public/premium-board.html +2 -2
- package/workspace/public/today.html +1 -1
- package/workspace/skills/impact-detect.skill +1 -1
- package/workspace/skills/loose-propose.skill +4 -4
- package/workspace/skills/morning-brief.skill +2 -2
- package/workspace/skills/principles-draft.skill +2 -2
- package/workspace/skills/sources-read.skill +1 -1
- package/workspace/sort-order-test.js +1 -1
- package/workspace/task-milestones-test.js +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmos-workspace",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.774.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pmos-workspace",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.774.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@anthropic-ai/sdk": "^1.3.0",
|
package/workspace/package.json
CHANGED
|
@@ -225,7 +225,7 @@ const everyPart = async (pg) => { await pg.waitForSelector('#czViewer .pw-ph', {
|
|
|
225
225
|
const { ORDER } = await import('./public/pm/ini-more.js');
|
|
226
226
|
const rank = (l) => ORDER.findIndex((o) => l === o || l.startsWith(o + ' '));
|
|
227
227
|
const inOrder = (L) => L.every((l, i) => rank(l) >= 0 && (i === 0 || rank(l) >= rank(L[i - 1])));
|
|
228
|
-
ok('X1 Home and the Board give the same ⋯ items in the same order (Home adds Open on the Board)', JSON.stringify(homeM.filter((l) => l !== 'Open on
|
|
228
|
+
ok('X1 Home and the Board give the same ⋯ items in the same order (Home adds Open on the Board)', JSON.stringify(homeM.filter((l) => l !== 'Open on Work')) === JSON.stringify(boardM) && homeM.includes('Open on Work'), JSON.stringify({ homeM, boardM }));
|
|
229
229
|
ok('X2 the order is the one menu\'s: split or merge, its program, look at it, then Delete, red and last', inOrder(homeM) && inOrder(boardM) && boardM[boardM.length - 1] === 'Delete' && !boardM.includes('Change workflow') && !boardM.includes('Cancel the initiative') && !boardM.includes('Open in full') && !boardM.includes('Move, hold, cancel or archive'), JSON.stringify(boardM));
|
|
230
230
|
}
|
|
231
231
|
await (async (pg) => { if (await pg.$('#czViewer [data-hi-view="stage"]')) await pg.click('#czViewer [data-hi-view="stage"]'); else await viaMore(pg, 'Stage'); })(ip);
|
|
@@ -88,7 +88,7 @@ const routePrograms = async (page) => {
|
|
|
88
88
|
await p.click('.po-pop [data-po-use]');
|
|
89
89
|
await until(async () => (await kids(p))[0] === 'descope-parity');
|
|
90
90
|
const toast = await p.evaluate(() => { const t = document.querySelector('#bdToast'); return t && !t.hidden ? t.textContent : ''; });
|
|
91
|
-
ok('B ✓ applies it: one write with the whole order, the rows move, the toast says where with Undo, and ✦ goes quiet', posts.length === 1 && posts[0].program === 'project-ascent' && posts[0].order[0] === 'descope-parity' && posts[0].order[1] === 'legacy-idp-sunset' && (await kids(p)).join() === 'descope-parity,legacy-idp-sunset' && /Ordered by dates ·
|
|
91
|
+
ok('B ✓ applies it: one write with the whole order, the rows move, the toast says where with Undo, and ✦ goes quiet', posts.length === 1 && posts[0].program === 'project-ascent' && posts[0].order[0] === 'descope-parity' && posts[0].order[1] === 'legacy-idp-sunset' && (await kids(p)).join() === 'descope-parity,legacy-idp-sunset' && /Ordered by dates · Work, program page and Today/.test(toast) && /Undo/.test(toast) && !(await sug(p)), JSON.stringify({ posts, toast, k: await kids(p) }));
|
|
92
92
|
await p.click('#bdToast .bd-undo');
|
|
93
93
|
await until(async () => (await kids(p))[0] === 'legacy-idp-sunset');
|
|
94
94
|
ok('B Undo writes the order before back', posts.length === 2 && posts[1].order.join() === 'legacy-idp-sunset,descope-parity' && (await kids(p)).join() === 'legacy-idp-sunset,descope-parity', JSON.stringify(posts));
|
|
@@ -118,7 +118,7 @@ async function runRow(r, k, btn) {
|
|
|
118
118
|
}
|
|
119
119
|
if (k === 'hold') {
|
|
120
120
|
const back = dayIso(30);
|
|
121
|
-
const res = await press(btn, null, () => life(r.id, 'on-hold', 'Held from
|
|
121
|
+
const res = await press(btn, null, () => life(r.id, 'on-hold', 'Held from Work', back)); if (!res) return;
|
|
122
122
|
await done(res, 'On hold · ' + r.title + ' · check back ' + dm(back), async () => { const u = await lifeBack(r, p); A.say(u && u.ok ? r.title + ' is back as it was.' : errOf(u)); await A.load(); });
|
|
123
123
|
return;
|
|
124
124
|
}
|
|
@@ -157,7 +157,7 @@ function openGone(from, seg) {
|
|
|
157
157
|
const rows = (k) => L[k].map((r) => `<div class="bd-gr"><span class="t"><b>${esc(r.title)}</b><small>${esc(sub(r, k))}</small></span><button type="button" class="bd-btn sm" data-rowact="${btn[k][0]}" data-id="${esc(r.key)}">${btn[k][1]}</button></div>`).join('');
|
|
158
158
|
const segH = `<div class="bd-seg bd-gseg" role="group" aria-label="Show">${[['all', 'All', all.length], ['hold', 'On hold', held.length], ['cancelled', 'Cancelled', G.cancelled.length], ['archived', 'Archived', G.archived.length]].map(([k, n, c]) => `<button type="button" data-gone="${k}" aria-pressed="${gone === k}">${n} ${c}</button>`).join('')}</div>`;
|
|
159
159
|
const body = (gone === 'all' ? ['hold', 'cancelled', 'archived'] : [gone]).map(rows).join('');
|
|
160
|
-
panel('Cancelled and archived', `<p class="bd-amut">Out of
|
|
160
|
+
panel('Cancelled and archived', `<p class="bd-amut">Out of Work, still searchable. Open one to Resume, Reopen or Restore.</p>${segH}<div class="bd-grs">${body || '<p class="bd-amut">Nothing here.</p>'}</div>${msg('goneM')}<div class="bd-box sm bd-pfoot">Cancel asks for a reason, the same chips as Decline. Archive needs none.</div>`, from, { cls: 'pk-wide' });
|
|
161
161
|
}
|
|
162
162
|
|
|
163
163
|
/* ── Find and Filter (BdFilter) ────────────────────────────────────────────────────────────────────────────────── */
|
|
@@ -172,12 +172,12 @@ function findHits(q) {
|
|
|
172
172
|
}
|
|
173
173
|
/** Search's scope on the Board: { name, hits(q) } (pm/cozy-search.js openSearch). An initiative opens on the Board, a work-item its ticket panel. */
|
|
174
174
|
export function findScope() {
|
|
175
|
-
return { name: '
|
|
175
|
+
return { name: 'Work', hits: (q) => {
|
|
176
176
|
if (!M()) return [];
|
|
177
177
|
const h = findHits(q);
|
|
178
178
|
return [
|
|
179
|
-
{ label: 'On
|
|
180
|
-
{ label: 'On
|
|
179
|
+
{ label: 'On Work · Initiatives', rows: h.ini.map((r) => { const s = V.statusLine(r); return { id: r.id || r.key, icon: 'flag', title: r.title, sub: [stageName(r) || r.stage, s.text].filter(Boolean).join(' · '), tag: 'Work', open: () => { const x = A.rowOf(r.key); if (x) A.openIni(x); } }; }) },
|
|
180
|
+
{ label: 'On Work · Work-items in Jira', rows: h.tk.map(({ k, r }) => ({ icon: 'jira', title: k.key + ' · ' + k.title, sub: [k.blocked ? 'Blocked' : k.status, k.assignee, r.title].filter(Boolean).join(' · '), tag: 'Jira', open: () => A.openTicket(r.key, k.key) })) },
|
|
181
181
|
].concat(((t) => (t && t.rows.length ? [t] : []))(findTasks(q)));
|
|
182
182
|
} };
|
|
183
183
|
}
|
|
@@ -246,7 +246,7 @@ function openRelease(i, from, tab) {
|
|
|
246
246
|
panel(r.name + (r.tag === 'Released' ? ' shipped ' : ' ships ') + r.at, `${tabs}`
|
|
247
247
|
+ (tk.length ? `<div class="bd-box"><div class="bd-boxh"><b>${dn} of ${tk.length} work-items done</b><span class="bd-amut">${esc(left)}</span></div>${V.barHtml({ pct: Math.round((dn / tk.length) * 100), count: true, label: dn + ' of ' + tk.length }, 'y')}</div>` : '')
|
|
248
248
|
+ `<div class="bd-th"><span>In this release</span><span>Status</span></div>${ini || '<p class="bd-amut">No initiative of this board rides on it.</p>'}`
|
|
249
|
-
+ (you ? `<div class="bd-need sm"><span class="bd-push0">Release notes ${esc(r.name)} wait on your sign-off.</span><a class="bd-btn sm solid" href="${esc(A.pageHref(you))}">Open
|
|
249
|
+
+ (you ? `<div class="bd-need sm"><span class="bd-push0">Release notes ${esc(r.name)} wait on your sign-off.</span><a class="bd-btn sm solid" href="${esc(A.pageHref(you))}">Open on Today</a></div>` : '')
|
|
250
250
|
+ `<p class="bd-lbl">Backlog preview · not in a sprint</p><div class="bd-bkw">${backlogTable(B, 3)}</div><p class="bd-amut bd-pfoot">Sprint moves are proposals. PMOS writes them to Jira only when you press.</p>`,
|
|
251
251
|
from, { eye: 'Release · Jira fix version', sub: you ? 'Sign-off by you' : r.type ? cap(r.type) + ' release' : '', cls: 'pk-wide' });
|
|
252
252
|
}
|
|
@@ -312,7 +312,7 @@ async function runHold(r, k, btn) {
|
|
|
312
312
|
}
|
|
313
313
|
async function setBack(r, input) {
|
|
314
314
|
const v = input.value; if (!/^\d{4}-\d{2}-\d{2}$/.test(v)) return;
|
|
315
|
-
const p = prevOf(r), res = await press(input, $('#holdM'), () => life(r.id, 'on-hold', (r.acts && r.acts.reason) || 'Held from
|
|
315
|
+
const p = prevOf(r), res = await press(input, $('#holdM'), () => life(r.id, 'on-hold', (r.acts && r.acts.reason) || 'Held from Work', v)); if (!res) return;
|
|
316
316
|
await done(res, 'On hold · ' + r.title + ' · back ' + md(day(v)), async () => { const u = await lifeBack(r, p); A.say(u && u.ok ? r.title + ' is back as it was.' : errOf(u)); await A.load(); });
|
|
317
317
|
}
|
|
318
318
|
|
|
@@ -109,7 +109,7 @@ document.addEventListener('click', async (e) => {
|
|
|
109
109
|
const there = M().board.all ? (M().board.products || []).find((x) => x.id === p.id || x.name === p.name) : null; // All products holds every product's board
|
|
110
110
|
if (there) { picked[a.id] = { name: there.name, why: 'you chose it', ws: there.ws, id: there.id }; redrawAsks(); }
|
|
111
111
|
else if (p.name === M().board.name || p.id === M().board.id) { picked[a.id] = { name: p.name, why: 'you chose it' }; redrawAsks(); }
|
|
112
|
-
else A.say('Open
|
|
112
|
+
else A.say('Open Work for ' + p.name + ' to accept it there. This view holds only ' + (M().board.name || 'its own') + ' work.');
|
|
113
113
|
return;
|
|
114
114
|
}
|
|
115
115
|
const b = e.target.closest('[data-askact]'); if (!b) return;
|
|
@@ -740,7 +740,7 @@ export function findTasks(q, max = 6) {
|
|
|
740
740
|
const all = DATA && Array.isArray(DATA.tasks) ? DATA.tasks : null;
|
|
741
741
|
if (!all) return null;
|
|
742
742
|
const hits = findRows(all, q, (t) => [t.title, t.key, t.epic, t.who], max);
|
|
743
|
-
return { label: 'On
|
|
743
|
+
return { label: 'On Work · Tasks', rows: hits.map((t) => ({ icon: t.src === 'jira' ? 'jira' : 'check', title: (t.key ? t.key + ' · ' : '') + t.title, sub: [t.who, t.due ? dueText(t.due) : ''].filter(Boolean).join(' · '), tag: 'Backlog', open: () => AP().openTask(t, null) })) };
|
|
744
744
|
}
|
|
745
745
|
export function listHtml(tasks, o = {}) {
|
|
746
746
|
const cols = colsOf(tasks || [], (Array.isArray(o.cols) ? o.cols : COLS).filter((c) => COL[c]));
|
|
@@ -37,7 +37,7 @@ export function open(html, btn, o = {}) {
|
|
|
37
37
|
host.className = 'bd-pp' + (o.cls ? ' ' + o.cls : '');
|
|
38
38
|
host.style.width = o.width ? o.width + 'px' : '';
|
|
39
39
|
host.dataset.align = o.align || 'left';
|
|
40
|
-
host.setAttribute('aria-label', o.label || '
|
|
40
|
+
host.setAttribute('aria-label', o.label || 'Work');
|
|
41
41
|
host.setAttribute('role', o.role || 'dialog');
|
|
42
42
|
host.innerHTML = (PHONE.matches ? '<div class="bd-grab" aria-hidden="true"></div>' : '') + html;
|
|
43
43
|
host.hidden = false; host.dataset.escLayer = '1'; from = btn || null; onClose = o.onClose || null; // a layer over the Viewer: Escape closes it first
|
|
@@ -221,7 +221,7 @@ const addHtml = () => (adding ? `<form class="pp-nd l2 pp-add" data-pp-form="tas
|
|
|
221
221
|
/** An open task of an initiative or an epic: a check box (a task), its title, where it sits, its day and its owner. It opens in Home. */
|
|
222
222
|
function iniTaskRow(p, t, where) {
|
|
223
223
|
const d = daysTo(t.due), late = d != null && d < 0;
|
|
224
|
-
return `<a class="pp-nd l2 pp-tk" role="treeitem" href="${esc(homeHref({ ws: t.ini.ws, ini: t.ini.id }))}" aria-label="Task: ${esc(t.title)}. Opens
|
|
224
|
+
return `<a class="pp-nd l2 pp-tk" role="treeitem" href="${esc(homeHref({ ws: t.ini.ws, ini: t.ini.id }))}" aria-label="Task: ${esc(t.title)}. Opens on Today"><span class="pp-ck${late ? ' late' : ''}" aria-hidden="true"></span><span class="x">${esc(t.title)}</span>${where ? `<span class="r">${esc(where)}</span>` : ''}${t.due ? `<span class="r${late ? ' late' : ''}">${esc(late ? lateBy(d) : shortDay(t.due))}</span>` : ''}${avHtml(p, t.owner)}</a>`;
|
|
225
225
|
}
|
|
226
226
|
const TREE_TASKS = 3; // an initiative shows its first 3 open tasks in the tree; the rest are one press away in "On its initiatives"
|
|
227
227
|
function iniNode(p, st, i, tasks) {
|
|
@@ -259,7 +259,7 @@ function treeHtml(p, st) {
|
|
|
259
259
|
function tasksHtml(p, st) {
|
|
260
260
|
const done = st.tasks.filter((t) => t.done), dk = 'd:' + p.id;
|
|
261
261
|
const add = adding ? addHtml() : `<button type="button" class="pp-nd pp-doc" data-pp="add">${SV(I.plus, 15)}<span class="x">Add a task</span></button>`;
|
|
262
|
-
if (!st.tasks.length && !adding) return `<div class="pp-tree"><div class="pp-nd q"><span class="x">No task on the program itself. Its initiatives keep their own tasks
|
|
262
|
+
if (!st.tasks.length && !adding) return `<div class="pp-tree"><div class="pp-nd q"><span class="x">No task on the program itself. Its initiatives keep their own tasks on Today.</span><button type="button" class="bd-ib pp-ibs" data-pp="add" aria-label="Add a task to the program" title="Add a task">${SV(I.plus, 15)}</button></div></div>`;
|
|
263
263
|
return `<div class="pp-tree" role="tree" aria-label="Tasks on the program">${st.openTasks.map((t) => taskRow(p, t)).join('')}${add}`
|
|
264
264
|
+ (done.length ? `<div class="pp-nd ini" role="treeitem" aria-expanded="${!fold.has(dk)}">${twHtml(dk)}<span class="x">Done on the program</span><span class="r">${done.length}</span></div>${fold.has(dk) ? '' : done.map((t) => taskRow(p, t)).join('')}` : '') + '</div>';
|
|
265
265
|
}
|
|
@@ -336,7 +336,7 @@ function summaryOf(p, st) {
|
|
|
336
336
|
}
|
|
337
337
|
function needsList(p, st) {
|
|
338
338
|
const L = needs(p, st);
|
|
339
|
-
return L.map((x) => `<a class="pp-nr" href="${esc(x.href)}" aria-label="${x.task ? 'Task' : 'Waits on you'}: ${esc(x.title)}. Opens
|
|
339
|
+
return L.map((x) => `<a class="pp-nr" href="${esc(x.href)}" aria-label="${x.task ? 'Task' : 'Waits on you'}: ${esc(x.title)}. Opens on Today"><span class="mk2">${x.task ? `<span class="pp-ck${x.late ? ' late' : ''}"></span>` : '<span class="pp-dt"></span>'}</span><span class="t"><b>${esc(x.title)}</b><span>${esc(x.sub)}</span></span><span class="go">${SV(I.out, 14)}</span></a>`).join('');
|
|
340
340
|
}
|
|
341
341
|
/* ── the one page (batch 21 item 2, RdProgL–RdProgP): the top, then four tabs; it replaced the Work | Dashboard pair ── */
|
|
342
342
|
const RO = typeof window !== 'undefined' && !!window.PMOS_READONLY; // a teammate's read-only copy (pm/readonly-boot.js): no proposals, no presses that write
|
|
@@ -60,7 +60,7 @@ export function publishHtml(S) {
|
|
|
60
60
|
if (S.phase === 'loading') return '<p class="bpnote">Reading your board…</p>';
|
|
61
61
|
if (!S.host) {
|
|
62
62
|
return `<div class="bphead"><span class="bptile">${HOST}</span><span class="bpg"><b>Add the board host</b><em>Nothing is sent before you do.</em></span></div>`
|
|
63
|
-
+ `<div class="bpfield"><div class="bpinp2"><input id="bpHost" type="url" inputmode="url" spellcheck="false" autocomplete="off" aria-label="
|
|
63
|
+
+ `<div class="bpfield"><div class="bpinp2"><input id="bpHost" type="url" inputmode="url" spellcheck="false" autocomplete="off" aria-label="Work host address" placeholder="The board host address" value="${esc(S.hostIn || '')}">${ib(OK, 'Save the host', 'data-bp="savehost"', 'pri sm')}</div></div>`
|
|
64
64
|
+ (S.err ? `<p class="bperr" role="alert">${esc(S.err)}</p>` : '');
|
|
65
65
|
}
|
|
66
66
|
// the open links are managed on the Shared tab: one row points there (zero is silence)
|
|
@@ -181,7 +181,7 @@ export function open(btn, ctx) {
|
|
|
181
181
|
const parts = partsOf(S, ctx); const several = S.sel.size > 1;
|
|
182
182
|
const r = await pmPost('/api/board-publish', { ws: ctx.ws, board: ctx.board || ctx.ws, parts, name: several ? S.name || '' : '', team: S.team.trim(), password: S.pw ? S.pass : '', days: S.days, view: ctx.view }).catch(() => null);
|
|
183
183
|
S.busy = false;
|
|
184
|
-
if (r && r.ok) { const l = (await pmGet('/api/board-publish').catch(() => null)) || {}; S.links = l.links || S.links; S.made = { url: r.url, pass: S.pw ? S.pass : '', ends: r.ends, team: S.team.trim(), name: r.name || (S.links.find((x) => x.id === r.id) || {}).name || '
|
|
184
|
+
if (r && r.ok) { const l = (await pmGet('/api/board-publish').catch(() => null)) || {}; S.links = l.links || S.links; S.made = { url: r.url, pass: S.pw ? S.pass : '', ends: r.ends, team: S.team.trim(), name: r.name || (S.links.find((x) => x.id === r.id) || {}).name || 'Work' }; S.pass = ''; S.err = ''; draw('[data-bp="copy"]'); return refreshCount(btn); }
|
|
185
185
|
S.err = (r && r.error) || 'The workspace did not answer. Try again.'; return draw();
|
|
186
186
|
}
|
|
187
187
|
};
|
|
@@ -73,7 +73,7 @@ function card(S, r) {
|
|
|
73
73
|
const why = !r.ended && !r.team ? ' title="Opens from a team. Publish with a team name to open it here."' : ''; // a copy with no team has no password this computer keeps
|
|
74
74
|
const nm = can ? `<button type="button" class="bdsh-nm bd-dlink" data-sh-open="${esc(r.id)}" data-sh-team="${esc(r.team)}">${esc(r.name)}</button>` : `<span class="bdsh-nm bdsh-plain"${why}>${esc(r.name)}</span>`;
|
|
75
75
|
const meta = sure ? '<span class="bdsh-meta bdsh-warn">Turn off this link? The copy is deleted from the host.</span>'
|
|
76
|
-
: `<span class="bdsh-meta">${[KIND[r.kind] || '
|
|
76
|
+
: `<span class="bdsh-meta">${[KIND[r.kind] || 'Work', r.mine ? '' : r.by, r.team, day(r.made), views(r.views)].filter(Boolean).map(esc).join(' · ')}</span>`;
|
|
77
77
|
const end = `<span class="bdsh-end${r.soon ? ' soon' : ''}">${r.soon ? '<i class="cz-dot risk m-warn"></i>' : ''}${esc(endText(r))}</span>`;
|
|
78
78
|
let act = '';
|
|
79
79
|
if (sure) act = ib('x', 'Keep it on', `data-sh-keep="${esc(r.id)}"`, 'gh') + ib('power', 'Sure, turn off', `data-sh-off="${esc(r.id)}"`, 'danger');
|
|
@@ -101,7 +101,7 @@ const field = (id, ph, v, type, bad) => `<input id="${id}" type="${type || 'text
|
|
|
101
101
|
function joinForm(J) {
|
|
102
102
|
const go = ib('go', J.busy ? 'Joining…' : 'Join', `data-sh="join"${J.busy ? ' disabled' : ''}`, 's pri');
|
|
103
103
|
const body = J.typed
|
|
104
|
-
? `<div class="bdsh-typed">${field('shHost', '
|
|
104
|
+
? `<div class="bdsh-typed">${field('shHost', 'Work host address', J.host)}${field('shTeam', 'Team name', J.team)}<div class="bdsh-fld">${field('shPass', 'Team password', J.password, 'password')}${go}</div></div>`
|
|
105
105
|
: `<div class="bdsh-fld${J.err ? ' bad' : ''}">${field('shInvite', 'Paste an invite link', J.invite)}${ib('key', 'Use team name and password', 'data-sh="typed"', 's gh')}${go}</div>`;
|
|
106
106
|
return body + (J.err ? `<p class="bdsh-err" role="alert"><i class="cz-dot red"></i>${esc(J.err)}</p>` : '')
|
|
107
107
|
+ (J.typed ? '<button type="button" class="bdsh-lk" data-sh="paste">Paste an invite link instead</button>' : '');
|
|
@@ -171,7 +171,7 @@ export function viewHtml(S) {
|
|
|
171
171
|
+ (leaving ? ib('x', 'Stay in the team', 'data-sh="stay"', 's gh') + ib('leave', 'Sure, leave ' + teamSel.team, `data-sh-leave="${esc(teamSel.team)}"`, 's danger')
|
|
172
172
|
: ib('key', 'Paste a new invite link', `data-sh="repaste" data-sh-team="${esc(teamSel.team)}"`, 's gh') + ib('leave', 'Leave team', `data-sh-leave="${esc(teamSel.team)}"`, 's gh')) + '</div>' : '';
|
|
173
173
|
const withYou = sel === 'all' || sel === 'with' ? withYouHtml(S) : '';
|
|
174
|
-
const empty = !live.length && !ended.length && !failing.length && !withYou ? `<p class="bdsh-meta bdsh-pad">${sel === 'all' ? 'Nothing is shared yet.' : sel === 'mine' ? 'You have no open links.' : 'Nobody has shared a board with ' + esc(sel) + ' yet. Press the share button on
|
|
174
|
+
const empty = !live.length && !ended.length && !failing.length && !withYou ? `<p class="bdsh-meta bdsh-pad">${sel === 'all' ? 'Nothing is shared yet.' : sel === 'mine' ? 'You have no open links.' : 'Nobody has shared a board with ' + esc(sel) + ' yet. Press the share button on Work to publish one.'}</p>` : '';
|
|
175
175
|
const fold = ended.length ? `<button type="button" class="bdsh-fold" data-sh="ended" aria-expanded="${!!S.endedOpen}">${svg(I.more, 16)}<span>${ended.length} ended</span></button>` + (S.endedOpen ? ended.map((r) => card(S, r)).join('') : '') : '';
|
|
176
176
|
const hosts = [...new Set(teams.filter((t) => t.ok).map((t) => t.host))];
|
|
177
177
|
const readLine = S.readAt ? `<p class="bdsh-meta bdsh-read"><i class="cz-dot ok"></i><span>Read${hosts.length ? ' from ' + hosts.map(esc).join(', ') : ''} ${agoText(S)}. Press a board to open its copy in a new tab.</span>${ib('refresh', 'Refresh', 'data-sh="refresh"', 's gh')}</p>` : '';
|
|
@@ -19,7 +19,7 @@ const row = (cells, cls = '') => `<div class="bd-tr${cls}" role="row">${cells.ma
|
|
|
19
19
|
/** AgBoardStages: what finishes each of the eight steps and where its count comes from. */
|
|
20
20
|
export function stepsHelpHtml() {
|
|
21
21
|
return `<div class="bd-help"><div class="bd-help-h"><h2 id="hSteps">What finishes each step</h2>${X}</div>`
|
|
22
|
-
+ '<p class="bd-help-p">Six stages and two milestones. Every initiative on
|
|
22
|
+
+ '<p class="bd-help-p">Six stages and two milestones. Every initiative on Work shows progress toward the output of the step it is in. A milestone is a checkpoint: the initiative waits there until its conditions are met.</p>'
|
|
23
23
|
+ `<div class="bd-tbl" role="table" aria-label="What finishes each step">${row(['Step', 'Type', 'Output that finishes it', 'How progress is counted', 'Where the count comes from'], ' th')}`
|
|
24
24
|
+ STEP_HELP.map(([n, ms, o, how, src]) => row([`<b>${ms ? '<i class="cz-ms" aria-hidden="true"></i>' : ''}${esc(n)}</b>`, `<em>${ms ? 'Milestone' : 'Stage'}</em>`, esc(o), esc(how), `<em>${esc(src)}</em>`])).join('') + '</div></div>';
|
|
25
25
|
}
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
const PLACE = { home: 'Today', board: 'Work', insights: 'Goals', library: 'Library', settings: 'Settings' }; // the places' names since slice 1 of the six places
|
|
22
22
|
const SRC_NAME = { repository: 'Repository', initiatives: 'Initiatives', calendar: 'Calendar', jira: 'Jira', 'my-work': 'Your tasks', tracker: 'Tracker items', tools: 'Mail, Slack and meeting notes' };
|
|
23
23
|
const SRC_SUB = { repository: 'This product\'s repository', initiatives: 'Read from the repository', calendar: 'Your calendar', jira: 'The Jira projects of your initiatives', 'my-work': 'The work assigned to you', tracker: 'The tracker items of your initiatives', tools: 'Mail, Slack, Confluence and Wispr Flow' };
|
|
24
|
-
const PARTS = { jira: '
|
|
24
|
+
const PARTS = { jira: 'Work and the Jira-linked initiatives', calendar: 'Today and your meetings', 'my-work': 'Your tasks', tracker: 'The tracker items on Work', tools: 'New for you and the digests', initiatives: 'Today and Work', repository: 'Today and Work' };
|
|
25
25
|
|
|
26
26
|
export function ago(iso, now = Date.now()) {
|
|
27
27
|
const t = Date.parse(iso || '');
|
|
@@ -236,7 +236,7 @@ export function resultSub(r) {
|
|
|
236
236
|
/** The word at a result's right (EvSearch: Open in Home, Viewer, Draft, Slides, Report, Artifact, File). */
|
|
237
237
|
export function resultTag(r) {
|
|
238
238
|
if (!r) return '';
|
|
239
|
-
if (r.kind === 'initiative') return 'Open
|
|
239
|
+
if (r.kind === 'initiative') return 'Open on Today';
|
|
240
240
|
if (r.kind === 'document') return r.draft ? 'Draft' : 'Viewer';
|
|
241
241
|
return { slides: 'Slides', report: 'Report', artifact: 'Artifact', file: 'File', session: 'Session' }[r.kind] || '';
|
|
242
242
|
}
|
|
@@ -54,7 +54,7 @@ export function relayHtml(R) {
|
|
|
54
54
|
}).join('');
|
|
55
55
|
const recent = (st.recent || []).slice(0, 5);
|
|
56
56
|
const ev = recent.length ? `<ul class="ev-rl-ev ev-small ev-mut" aria-label="Recent events">${recent.map((e) => `<li>${esc(LABEL[e.source] || e.source)} · ${esc(e.kind)}${e.key ? ' · ' + esc(e.key) : ''} · ${esc(ago(e.at))}</li>`).join('')}</ul>` : '';
|
|
57
|
-
const host = st.host ? '' : '<p class="ev-small ev-late">Listening needs the central host. Set its address in
|
|
57
|
+
const host = st.host ? '' : '<p class="ev-small ev-late">Listening needs the central host. Set its address in Work › Publish first.</p>';
|
|
58
58
|
return `<div data-relay>${head}<p class="ev-small ev-mut">A service that sends events is read within a minute of a change, even while this computer sleeps. An event only starts a read; it never changes your records.</p>${host}${rows}${ev}</div>`;
|
|
59
59
|
}
|
|
60
60
|
|
|
@@ -80,7 +80,7 @@ export function leftHtml(M) {
|
|
|
80
80
|
if (L.draft) rows.push(`<button type="button" class="rv-lrow rv-ldraft" data-rv-left="draft"><b>${SVG(I.spark, 12, 2)} ${esc(L.draft.title)}</b><span>Draft · ${esc(L.draft.stage)} · check ${esc(L.draft.check)}</span></button>`);
|
|
81
81
|
if (L.mywork) rows.push(`<div class="rv-lrow"><b>My work</b><span>${L.mywork.mine} ticket${L.mywork.mine === 1 ? '' : 's'} in ${esc(L.mywork.key)} ${L.mywork.mine === 1 ? 'is' : 'are'} yours${L.mywork.due_week ? ' · ' + L.mywork.due_week + ' due this week' : ''}</span></div>`);
|
|
82
82
|
if (!rows.length) return '';
|
|
83
|
-
return `<div class="rv-left" aria-label="Set up just now">${rows.join('')}<p class="rv-lnote">
|
|
83
|
+
return `<div class="rv-left" aria-label="Set up just now">${rows.join('')}<p class="rv-lnote">Work, Intelligence and reports appear as there is something to show.</p></div>`;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
export function mountReveal(host, { ws, model, send, openIni, changed } = {}) {
|
|
@@ -129,7 +129,7 @@ function general() {
|
|
|
129
129
|
+ trow('Ease check', 'How many presses and seconds each page’s main task takes you, from the use log', `<button type="button" class="ev-ib pm-btn" id="evEaseCheck" data-ev-sub="ease" aria-label="Ease check" title="Ease check">${svg(CHEV, 18)}</button>`);
|
|
130
130
|
}
|
|
131
131
|
/* General › Extras › Use log (bet A466): what lib/use-log.js keeps for the last 30 days (GET /api/use-log), and Clear (POST /api/use-log/clear) */
|
|
132
|
-
const UL_PAGE = { today: 'Today', premium: '
|
|
132
|
+
const UL_PAGE = { today: 'Today', premium: 'Today', 'premium-board': 'Work', 'premium-goals': 'Goals', 'premium-intelligence': 'Intelligence', 'premium-library': 'Library', 'premium-events': 'Events', 'premium-routine': 'Routine', 'premium-viewer': 'Viewer' };
|
|
133
133
|
const ulPage = (p) => UL_PAGE[p] || p;
|
|
134
134
|
async function loadUseLog() {
|
|
135
135
|
const [r, h] = await Promise.all([pmGet('/api/use-log'), pmGet('/api/use-log/hidden')]);
|
|
@@ -449,7 +449,7 @@ function kindSub(k, until) {
|
|
|
449
449
|
return (k.made ? made + ', ' + kept + '. ' : '') + how;
|
|
450
450
|
}
|
|
451
451
|
const ALWAYS = [['Start a new request', 'PMOS recommends. You decide.'], ['Say if it worked', 'The verdict on an outcome is yours.'], ['Send a message to people', 'PMOS drafts. Only you send.'],
|
|
452
|
-
['Move what the team reads', 'Stages and dates in Jira or on
|
|
452
|
+
['Move what the team reads', 'Stages and dates in Jira or on Work.'], ['Merge, delete or spend', '']];
|
|
453
453
|
function lessonRow(l) {
|
|
454
454
|
const [wrong, ...rest] = String(l.text || '').split(/\n+/); // a lesson's first line says what went wrong, the rest what changed
|
|
455
455
|
return `<div class="pm-li"><span class="txt"><span class="t">${esc(wrong)}</span>${rest.length ? `<span class="w">${esc(rest.join(' '))}</span>` : ''}</span><span class="pm-meta">${esc([dayOf(l.at), l.product].filter(Boolean).join(' · '))}</span></div>`;
|
|
@@ -834,7 +834,7 @@ async function readAgain(id) {
|
|
|
834
834
|
if (id) {
|
|
835
835
|
T.note[id] = r && r.ok ? (r.started === 'session' ? 'An agent session started to read it, with your own connection.' : 'Reading it again on this machine.') : 'It did not start: ' + ((r && r.error) || 'the server did not answer') + '.';
|
|
836
836
|
toast(r && r.ok ? 'Reading again.' : T.note[id]);
|
|
837
|
-
} else toast(r && r.ok ? (r.joined ? 'Every source is already being read.' : 'Reading every source, then
|
|
837
|
+
} else toast(r && r.ok ? (r.joined ? 'Every source is already being read.' : 'Reading every source, then Today\'s list.') : 'Read all again did not start: ' + ((r && r.error) || 'the server did not answer') + '.');
|
|
838
838
|
await readFresh(); setTimeout(readFresh, 4000);
|
|
839
839
|
}
|
|
840
840
|
async function load() {
|
|
@@ -838,7 +838,7 @@ function holdable(el, x) {
|
|
|
838
838
|
}
|
|
839
839
|
/** A hold that opened the trail list is not also a press. */
|
|
840
840
|
function held() { if (HOLD.fired && Date.now() - HOLD.fired < 800) { HOLD.fired = 0; return true; } return false; }
|
|
841
|
-
const PAGES = { '/': 'Today', '/today.html': 'Today', '/premium-board.html': '
|
|
841
|
+
const PAGES = { '/': 'Today', '/today.html': 'Today', '/premium-board.html': 'Work', '/premium-intelligence.html': 'Intelligence', '/premium-insights.html': 'Intelligence' };
|
|
842
842
|
function trailMenu(b, x) {
|
|
843
843
|
if (!V.cur || !V.el) return;
|
|
844
844
|
const old = V.el.querySelector('.cz-vw-trail'); if (old) old.remove();
|
|
@@ -1000,7 +1000,7 @@ const rowById = (id) => allRows().find((r) => r.id === id) || null;
|
|
|
1000
1000
|
let PH = null; // the phone chat's top bar (mountPhoneHead, below)
|
|
1001
1001
|
function drawTop() {
|
|
1002
1002
|
const n = H.needsOf(S.D).length;
|
|
1003
|
-
const cur = S.cur || { title: '
|
|
1003
|
+
const cur = S.cur || { title: 'Today', sub: '' };
|
|
1004
1004
|
// session names A: an open session shows its current name (Claude's or the PM's) and the name is the rename press; the phone's top bar
|
|
1005
1005
|
// is back + that name only, no second line (XmsNames, XcbOptions)
|
|
1006
1006
|
const ses = cur.ses ? S.D.sessions.find((x) => x.id === cur.ses) : null;
|
|
@@ -1010,7 +1010,7 @@ function drawTop() {
|
|
|
1010
1010
|
$('#hmTopSub').textContent = '';
|
|
1011
1011
|
$('#hmNeedsN').textContent = !S.ready ? 'Reading' : n ? n + (n === 1 ? ' next step' : ' next steps') : 'Today';
|
|
1012
1012
|
$('#hmNeeds').classList.toggle('loud', n > 0);
|
|
1013
|
-
document.title = 'PMOS · ' + (title || '
|
|
1013
|
+
document.title = 'PMOS · ' + (title || 'Today');
|
|
1014
1014
|
if (PH) PH.draw();
|
|
1015
1015
|
}
|
|
1016
1016
|
const SN = mountSesName({ esc, pmPost, toast, toastUndo: (m, u) => toastUndo(m, u), session: (sid) => S.D.sessions.find((x) => x.id === sid) || null, shown: (x) => H.nameOf(x),
|
|
@@ -1312,7 +1312,7 @@ function productPageHtml(x, ws, vid, name, g) {
|
|
|
1312
1312
|
// redesign R (RgR4Make): "Ready to send" only in a week with news (something at risk or waiting for a decision); a quiet week says so
|
|
1313
1313
|
const news = !!(U && U.draft); // workspace grill W2: something moved or a risk is open
|
|
1314
1314
|
const extra = own ? (R ? '' : row('data-hp="update"', '', 'Weekly update', sent ? 'Sent this week' : news ? 'Ready to send' : 'Nothing new this week · skipped'))
|
|
1315
|
-
: `<a class="pv-row" href="${esc(ownHome)}" target="_blank" rel="noopener"><span class="pv-rt"><b>Weekly update</b><small>In ${esc(name)}'s own
|
|
1315
|
+
: `<a class="pv-row" href="${esc(ownHome)}" target="_blank" rel="noopener"><span class="pv-rt"><b>Weekly update</b><small>In ${esc(name)}'s own Today, in a new tab</small></span></a>`;
|
|
1316
1316
|
const reps = ((d && d.reports) || []).filter((r) => r.kind !== 'heads-up');
|
|
1317
1317
|
const tabs = [
|
|
1318
1318
|
{ id: 'tasks', label: 'Tasks', n: T.length, sig: late.length ? 'late' : '', html: () => (T.length ? (late.length ? `<section class="pv-card" aria-label="Late"><div class="pv-ch"><h4>Late first</h4><small>${late.length > 3 ? '3 shown · ' + (late.length - 3) + ' more below' : ''}</small></div>${late.slice(0, 3).map(tRow).join('')}</section>` : '')
|
|
@@ -1722,7 +1722,7 @@ function pickLine(ws) {
|
|
|
1722
1722
|
}
|
|
1723
1723
|
function pickProduct(chip) {
|
|
1724
1724
|
if (!S.D.pick) return;
|
|
1725
|
-
PP.openPicker(chip, { P: S.D.pick, label: 'Products on
|
|
1725
|
+
PP.openPicker(chip, { P: S.D.pick, label: 'Products on Today', tones: pickTones(), lines: pickLine, onApply: async (on) => { const r = await PP.savePick(on); if (!r.ok) toast(r.error); } });
|
|
1726
1726
|
}
|
|
1727
1727
|
// a saved pick (from this chip or Settings): Home shows and reads the ticked products
|
|
1728
1728
|
addEventListener('pp:changed', (e) => { if (WS) { location.assign('/premium.html'); return; } pickGen++; S.D.pick = e.detail; drawList(); toast('Saved. Today, Work and Goals show the products you picked.'); load(); });
|
|
@@ -320,7 +320,7 @@ export function iniLayout(D, id) {
|
|
|
320
320
|
const other = needs.filter((r) => r.ini !== id);
|
|
321
321
|
const byIni = new Map(); for (const r of other) { const k = r.ini || ''; byIni.set(k, (byIni.get(k) || 0) + 1); }
|
|
322
322
|
const top = [...byIni.entries()].sort((a, b) => b[1] - a[1]);
|
|
323
|
-
const titleOf = (k) => { const b = boardRows(D).find((r) => r.id === k); return b ? b.title : k || '
|
|
323
|
+
const titleOf = (k) => { const b = boardRows(D).find((r) => r.id === k); return b ? b.title : k || 'Today'; };
|
|
324
324
|
const elsewhere = other.length ? { n: other.length, text: top.map(([k, n]) => (n === 1 ? 'Your turn in ' : n + ' next steps in ') + titleOf(k)).join(' · '), first: other[0] } : null;
|
|
325
325
|
return { groups, elsewhere };
|
|
326
326
|
}
|
|
@@ -241,7 +241,7 @@ export function openNeed(r, h, o = {}) {
|
|
|
241
241
|
const more = () => {
|
|
242
242
|
const out = [];
|
|
243
243
|
const rec = h.recordHref(r); if (rec) out.push({ label: 'Open the record', on: () => window.open(rec, '_blank', 'noopener') });
|
|
244
|
-
const bd = h.boardHref(r); if (bd) out.push({ label: 'Open on
|
|
244
|
+
const bd = h.boardHref(r); if (bd) out.push({ label: 'Open on Work', on: () => window.open(bd, '_blank', 'noopener') });
|
|
245
245
|
if (!shortOf(r)) out.push({ label: 'Copy link', on: async () => { try { await navigator.clipboard.writeText(h.linkOf(r)); h.toast('The link is copied.'); } catch { h.toast('The link could not be copied.'); } } });
|
|
246
246
|
return out;
|
|
247
247
|
};
|
|
@@ -68,7 +68,7 @@ export function mountPhoneCard(o) {
|
|
|
68
68
|
}
|
|
69
69
|
const r = day && day.recap, tm = day && day.tomorrow;
|
|
70
70
|
const today = r ? [r.meetings && num(r.meetings, 'meeting', 'meetings'), r.decided && num(r.decided, 'decision', 'decisions'), r.done && num(r.done, 'item done', 'items done')].filter(Boolean) : []; // zero is silence
|
|
71
|
-
return `<span class="label">End of day</span>${big(tm ? 'Tomorrow, ' + tm.label : 'Tomorrow, at a glance')}${today.length ? L('Today: ' + today.join(', ') + '.') : ''}${tm ? `<div class="phfit"><b class="phtt">${tm.meetings.length ? num(tm.meetings.length, 'meeting', 'meetings') : 'No meetings'}</b>${tm.meetings.slice(0, 5).map((x) => `<p class="phs">${hm(x.start)} · ${esc(x.title)}${who(x) ? ' · ' + esc(who(x)) : ''}</p>`).join('')}</div>` : dayErr()}${mine.length ? S('What’s still open
|
|
71
|
+
return `<span class="label">End of day</span>${big(tm ? 'Tomorrow, ' + tm.label : 'Tomorrow, at a glance')}${today.length ? L('Today: ' + today.join(', ') + '.') : ''}${tm ? `<div class="phfit"><b class="phtt">${tm.meetings.length ? num(tm.meetings.length, 'meeting', 'meetings') : 'No meetings'}</b>${tm.meetings.slice(0, 5).map((x) => `<p class="phs">${hm(x.start)} · ${esc(x.title)}${who(x) ? ' · ' + esc(who(x)) : ''}</p>`).join('')}</div>` : dayErr()}${mine.length ? S('What’s still open is on Today tomorrow.') : ''}`;
|
|
72
72
|
}
|
|
73
73
|
const momentNow = () => momentOf({ today: P.page.today || [], needs: own(), now: new Date() });
|
|
74
74
|
function draw(focus) {
|
|
@@ -329,7 +329,7 @@ export function listHtml(M, T, o) {
|
|
|
329
329
|
const face = own ? '' : AD.adler(o.err ? 'honest' : o.ready ? 'handled' : 'thinking', 36, { label: false, cls: 'hv-ad' });
|
|
330
330
|
const head = `<div class="hm-hd hv-bar">${own ? o.imFace : ''}<button type="button" class="hv-hi" ${o.ready ? 'data-hm-day' : 'aria-disabled="true"'} aria-expanded="${!!o.day}" aria-label="${esc(M.word || 'Today')}${nw}. Open your day">${face}<b>${esc(M.word || 'Today')}</b>${o.ready ? '' : LS.ringHtml()}${svg(P.chevD, 18)}</button><span class="hv-acts">`
|
|
331
331
|
// the product chip, always (it is also the way to add one): the ticked products' tiles, or All (canvas XhpA2States)
|
|
332
|
-
+ (o.pick ? chipHtml(o.pick, { id: 'hmPick', attrs: 'data-hm-pick', label: 'Products on
|
|
332
|
+
+ (o.pick ? chipHtml(o.pick, { id: 'hmPick', attrs: 'data-hm-pick', label: 'Products on Today', tones: o.tones }) : '')
|
|
333
333
|
+ (o.phone ? '' : `<button type="button" class="ut-ib hv-ib${flt ? ' on' : ''}" data-hm-flt aria-haspopup="menu" aria-label="Show: Today, Mine, Kept or Done${flt ? '. Now ' + esc(flt.label) : ''}" title="Show: Today, Mine, Kept or Done">${svg(P.filter, 18)}</button>`)
|
|
334
334
|
+ SO.btnHtml('ut-ib hv-ib' + (SO.layout().sort !== 'mine' ? ' on' : ''))
|
|
335
335
|
+ `<button type="button" class="ut-ib hv-ib" data-hm-new aria-haspopup="menu" aria-label="New" title="New">${svg(P.plus, 20)}</button>`
|
|
@@ -344,7 +344,7 @@ export function listHtml(M, T, o) {
|
|
|
344
344
|
// start-up (SpA, SpG): the list Home drew last, drawn at once and inert until the fresh read is in; with none kept, grey rows that claim
|
|
345
345
|
// nothing. o.top is Mentions (or its grey shape) on its own clock. Errors (canvas AdU6): Adler says a failure plainly
|
|
346
346
|
if (!o.ready) return head + card + `<p class="vh" role="status">Reading your work.</p><div class="hv-body">${o.top || ''}${o.last ? `<div class="ls-stale" inert>${o.last}</div>` : LS.listShapes()}</div>`;
|
|
347
|
-
const errLine = `<div class="hm-none hm-ad" role="status">${AD.adler('honest', 48, { label: false })}<p>
|
|
347
|
+
const errLine = `<div class="hm-none hm-ad" role="status">${AD.adler('honest', 48, { label: false })}<p>Today could not read the repository: ${esc(o.err)}.</p></div>`;
|
|
348
348
|
if (o.err && !M.groups.some((g) => (g.kind === 'product' && g.count) || (g.rows && g.rows.length))) return head + card + errLine;
|
|
349
349
|
// the repository's read failed but sessions or notes still answered: say so above what did come back, never an empty product as if calm
|
|
350
350
|
let body = o.err && !M.groups.some((g) => g.kind === 'product' && (g.count || g.flat.length)) ? errLine : '';
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* "Open in full" is not here: the header's expand already opens it wide (say it once). */
|
|
21
21
|
import { openPop, closePop } from './hi-pop.js';
|
|
22
22
|
|
|
23
|
-
export const ORDER = ['Split into a new initiative', 'Merge into', 'Program', 'Open on
|
|
23
|
+
export const ORDER = ['Split into a new initiative', 'Merge into', 'Program', 'Open on Work', 'Copy', 'The record', 'Delete'];
|
|
24
24
|
export const DELETE_MS = 8000; // the Delete toast's Undo stays 8 seconds (FmI3Deleted)
|
|
25
25
|
|
|
26
26
|
const esc = (s) => String(s == null ? '' : s).replace(/[&<>"']/g, (c) => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }[c]));
|
|
@@ -36,7 +36,7 @@ export function iniMore(c) {
|
|
|
36
36
|
const out = [];
|
|
37
37
|
// split or merge, then the one Program picker (batch 11 items 2 and 14; batch 16 item 5c)
|
|
38
38
|
out.push(...(c.sm || []), ...(c.pm || []).filter(Boolean));
|
|
39
|
-
if (c.board) out.push({ label: 'Open on
|
|
39
|
+
if (c.board) out.push({ label: 'Open on Work', icon: ICON.board, on: c.board });
|
|
40
40
|
if (c.link || c.text) {
|
|
41
41
|
const rows = [c.link ? { label: 'Link', icon: ICON.link, go: c.link } : null, c.text ? { label: 'Text', icon: ICON.text, go: c.text } : null].filter(Boolean);
|
|
42
42
|
out.push({ label: 'Copy', icon: ICON.copy, note: rows.map((x) => x.label).join(' · '), on: (b) => listMenu(b, 'Copy', rows) });
|
|
@@ -636,7 +636,7 @@ export function statusPopHtml(status, ms = null, del = false) {
|
|
|
636
636
|
export const deletable = (uid) => /^(?:task-|dt:)/.test(String(uid || '')) || /^[a-z0-9][a-z0-9-]*\.[0-9a-z]{10}$/.test(String(uid || ''));
|
|
637
637
|
/** The ◇ toggle: icon only, "◇ Milestone" while pressed; its tooltip says what it does. attr: the press's data attribute. */
|
|
638
638
|
export function msToggleHtml(on, attr) {
|
|
639
|
-
const tip = on ? 'A milestone. Press to make it a plain task' : 'Make it a milestone: its due date shows as ◇ on
|
|
639
|
+
const tip = on ? 'A milestone. Press to make it a plain task' : 'Make it a milestone: its due date shows as ◇ on Work and the timeline';
|
|
640
640
|
return `<button type="button" class="ivq-ms${on ? ' on' : ''}" ${attr} aria-pressed="${!!on}" aria-label="${esc(on ? 'Milestone' : 'Make it a milestone')}" title="${esc(tip)}">${SVG(P.dia, 15, 2)}${on ? 'Milestone' : ''}</button>`;
|
|
641
641
|
}
|
|
642
642
|
export function statusPop(anchor, uid, status, H) {
|
|
@@ -178,7 +178,7 @@ async function keep(ids, all) {
|
|
|
178
178
|
say(res.said + (res.warn ? '. ' + res.warn : ''), async () => {
|
|
179
179
|
const u = await pmPost('/api/loose-props/undo', { batch, today }).catch(() => null);
|
|
180
180
|
if (!u || u.ok === false) return { ok: false, error: (u && u.error) || 'The undo did not land.' };
|
|
181
|
-
if (u.kept) say(plural(u.kept, 'change was', 'changes were') + ' kept: a started initiative stays on
|
|
181
|
+
if (u.kept) say(plural(u.kept, 'change was', 'changes were') + ' kept: a started initiative stays on Work.');
|
|
182
182
|
await after(u);
|
|
183
183
|
return { ok: true };
|
|
184
184
|
});
|
|
@@ -237,7 +237,7 @@ async function onPress(e) {
|
|
|
237
237
|
b.disabled = true;
|
|
238
238
|
const r = await pmPost('/api/loose-props/undo', { batch: d.lpUndo, today: S.H && S.H.today ? S.H.today() : undefined }).catch(() => null);
|
|
239
239
|
if (!r || r.ok === false) { b.disabled = false; say((r && r.error) || 'The undo did not land.'); return; }
|
|
240
|
-
say(r.kept ? 'Undone. ' + plural(r.kept, 'change was', 'changes were') + ' kept: a started initiative stays on
|
|
240
|
+
say(r.kept ? 'Undone. ' + plural(r.kept, 'change was', 'changes were') + ' kept: a started initiative stays on Work.' : 'Undone.');
|
|
241
241
|
await after(r);
|
|
242
242
|
}
|
|
243
243
|
}
|
|
@@ -98,8 +98,8 @@ function editRows(rows, label) {
|
|
|
98
98
|
+ `<span class="md-ef">${r.type === 'Done or not' ? `<b class="md-to">${esc(r.targetTxt || 'Done')}</b>` : field(r, 'target', r.target == null ? '' : String(r.target), 'Target of ' + r.name, { num: true, cls: 'n', max: 20, ph: 'Target' })}`
|
|
99
99
|
+ field(r, 'source', r.source || '', 'Where ' + r.name + ' is measured', { ph: 'Measured by', max: 40 }) + '</span></div>').join('')}</div>`;
|
|
100
100
|
}
|
|
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
|
|
102
|
-
+ ib({ href: ask, icon: I.ask, label: 'Ask PMOS
|
|
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 on Today.</p>`
|
|
102
|
+
+ ib({ href: ask, icon: I.ask, label: 'Ask PMOS on Today to change something else', title: 'Ask on Today' })
|
|
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
|
|
|
@@ -129,7 +129,7 @@ export function progHtml(p, ws) {
|
|
|
129
129
|
return `<section class="md-card md-top${fade('program', p.id)}" aria-label="Proposed goal">${head('Proposed goal', P.d.src)}<p class="md-gl">${esc(line)}</p>`
|
|
130
130
|
+ (chips ? `<div class="md-cps">${chips}</div>` : '') + built
|
|
131
131
|
+ `<div class="md-ft"><p class="md-why">${esc(whyOf(P.d, goal))}</p>`
|
|
132
|
-
+ ib({ href: q('About the proposed goal for '), icon: I.ask, label: 'Discuss the proposed goal
|
|
132
|
+
+ ib({ href: q('About the proposed goal for '), icon: I.ask, label: 'Discuss the proposed goal on Today', title: 'Discuss on Today' })
|
|
133
133
|
+ ib({ act: 'edit', scope: 'program', id: p.id, icon: I.pen, label: 'Edit the proposed goal', title: 'Edit', busy: P.busy })
|
|
134
134
|
+ ib({ act: 'keep', scope: 'program', id: p.id, icon: I.check, label: 'Keep this goal', solid: true, busy: P.busy }) + '</div></section>';
|
|
135
135
|
}
|
|
@@ -93,7 +93,7 @@ function host() {
|
|
|
93
93
|
if (c && ((c.cos && c.here) || c.popAbout)) { Q.t = cosTarget('', c.ws); Q.chat.open(Q.t); }
|
|
94
94
|
},
|
|
95
95
|
onTo: () => {}, onLink: () => {},
|
|
96
|
-
workItem: () => toast('Make it a task from
|
|
96
|
+
workItem: () => toast('Make it a task from Today, in the initiative’s own chat.'),
|
|
97
97
|
viewerClosed: () => false, reopenViewer: () => {}, desk: () => true, head: () => '',
|
|
98
98
|
// a finished turn: the page reads its records again, so what Claude changed shows with no refresh (as Home, batch 25 item 3)
|
|
99
99
|
turnEnded: () => document.dispatchEvent(new CustomEvent('cz:chat-turn')),
|
|
@@ -200,7 +200,7 @@ function actsPanel(html, from, cls, o = {}) {
|
|
|
200
200
|
const more = tools.map((a) => ({ label: a.getAttribute('aria-label') || a.textContent.trim(), on: () => location.assign(a.getAttribute('href')) }));
|
|
201
201
|
const back = !!(from && from.closest && from.closest('.cz-vw')) && VW.isOpen();
|
|
202
202
|
const me = { id, onClose: o.onClose || null };
|
|
203
|
-
VW.open({ kind: eye || '
|
|
203
|
+
VW.open({ kind: eye || 'Work', title: title || eye, icon: 'flag', id, back, more: more.length ? more : undefined,
|
|
204
204
|
render: (body) => {
|
|
205
205
|
acts = me; peek = { kind: 'acts', key: null };
|
|
206
206
|
body.classList.add('bd-actsvw'); if (cls) body.classList.add(cls);
|
|
@@ -243,7 +243,7 @@ const dotsPick = (P) => (P ? { ...P, products: P.products.map((p) => ({ ...p, ne
|
|
|
243
243
|
function drawPick() {
|
|
244
244
|
const P = shownPick(), host = $('#crumbHost'); if (!host) return;
|
|
245
245
|
const desk = !matchMedia('(max-width: 760px)').matches;
|
|
246
|
-
host.innerHTML = (P ? PK.chipHtml(P, { id: 'bdPick', label: 'Products', names: desk }) + (desk ? SW.switcherHtml(dotsPick(P)) : '') : `<span class="crpg">${esc(M.board.name || '
|
|
246
|
+
host.innerHTML = (P ? PK.chipHtml(P, { id: 'bdPick', label: 'Products', names: desk }) + (desk ? SW.switcherHtml(dotsPick(P)) : '') : `<span class="crpg">${esc(M.board.name || 'Work')}</span>`) + '<span id="pvwHost" class="pvw-host"></span>';
|
|
247
247
|
drawPins();
|
|
248
248
|
host.onclick = (e) => { if (pinPress(e)) return; const b = e.target.closest('[data-psw]'); if (!b) return; e.stopPropagation(); SW.press(dotsPick(shownPick()), b.dataset.psw).then((r) => { if (!r.ok) say(r.error); }); };
|
|
249
249
|
if (P && desk && !DOTS) { DOTS = {}; SW.readDots().then((r) => { if (r) { DOTS = Object.fromEntries(r.products.map((p) => [p.ws, p.needs])); drawPick(); } }).catch(() => null); }
|
|
@@ -481,7 +481,7 @@ async function refreshJira(btn) {
|
|
|
481
481
|
const bad = R.filter((r) => !r || !r.ok), ok = R.length - bad.length;
|
|
482
482
|
if (!ok) { jiraReading = false; drawChips(); }
|
|
483
483
|
else if ((btn = $('#chJira'))) btn.disabled = false;
|
|
484
|
-
say(!bad.length ? 'Reading Jira again.
|
|
484
|
+
say(!bad.length ? 'Reading Jira again. Work shows it when the read lands.' : ok ? 'Reading Jira again for ' + ok + ' of ' + R.length + ' products. The others did not start: ' + ((bad[0] && bad[0].error) || 'the server did not answer') + '.' : 'Jira was not read again: ' + ((bad[0] && bad[0].error) || 'the server did not answer') + '.');
|
|
485
485
|
if (ok) setTimeout(load, 4000);
|
|
486
486
|
}
|
|
487
487
|
|
|
@@ -1420,7 +1420,7 @@ function taskOnce() {
|
|
|
1420
1420
|
taskDone = true;
|
|
1421
1421
|
for (const r of rows) { const k = (r.tasks || []).find((x) => x.uid === id); if (k) { openTask(r, k); return; } }
|
|
1422
1422
|
for (const r of rows) { const k = ((r.track && r.track.tickets) || []).find((x) => x.key === id); if (k) { BI.openTicket(r, k, null); return; } }
|
|
1423
|
-
say('That task is not on
|
|
1423
|
+
say('That task is not on Work. It may have moved to another product or been deleted.');
|
|
1424
1424
|
}
|
|
1425
1425
|
/* The address follows the initiative or program open in the Viewer (?focus=, ?program=), so Back from another page comes back to it
|
|
1426
1426
|
* (batch 14 item 7). The Viewer writes it once the history has settled on the entry the Board shows. */
|