create-pmos 0.475.0 → 0.477.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 -33
- 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/board-publish-ui-test.js +11 -16
- package/workspace/board-shared-ui-test.js +34 -33
- package/workspace/changelog.json +32 -0
- package/workspace/guide/briefing-premium.md +2 -2
- package/workspace/guide/claude-proposes.md +8 -2
- package/workspace/guide/forecast.md +16 -3
- package/workspace/guide/home.md +2 -2
- package/workspace/guide/settings.md +9 -0
- package/workspace/guide/workflows.md +13 -2
- package/workspace/home-railcard-test.js +4 -4
- package/workspace/home-rows-test.js +15 -4
- package/workspace/ini-workflow-test.js +1 -1
- package/workspace/lib/board-pack.js +20 -1
- package/workspace/lib/board-trail.js +17 -1
- package/workspace/lib/boards-host.js +22 -2
- package/workspace/lib/briefing-premium-agent.js +2 -2
- package/workspace/lib/engine/boards.js +15 -3
- package/workspace/lib/engine/workflows.js +79 -10
- package/workspace/lib/forecast-offer.js +57 -0
- package/workspace/lib/grill-runs.js +1 -0
- package/workspace/lib/grill.js +1 -1
- package/workspace/lib/insight-moves.js +8 -6
- package/workspace/lib/news-for-you.js +6 -4
- package/workspace/lib/proposals.js +4 -3
- package/workspace/lib/report-chat.js +2 -0
- package/workspace/lib/route-modules.js +1 -0
- package/workspace/lib/routes-board-publish.js +7 -2
- package/workspace/lib/routes-boards.js +18 -5
- package/workspace/lib/routes-briefing-premium.js +16 -2
- package/workspace/lib/routes-forecast.js +8 -1
- package/workspace/lib/routes-grill.js +70 -0
- package/workspace/lib/routes-insight-moves.js +7 -5
- package/workspace/lib/routes-news.js +3 -1
- package/workspace/lib/routes-proposals.js +8 -6
- package/workspace/lib/routes-workflows.js +13 -0
- package/workspace/lib/wf-bridge.js +165 -0
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/panels-test.js +1 -2
- package/workspace/public/pm/bd-fc-card.js +45 -0
- package/workspace/public/pm/bd-next.js +1 -1
- package/workspace/public/pm/bd-publish.css +22 -18
- package/workspace/public/pm/bd-publish.js +57 -48
- package/workspace/public/pm/bd-shared.css +92 -30
- package/workspace/public/pm/bd-shared.js +143 -55
- package/workspace/public/pm/bd-span.js +27 -7
- package/workspace/public/pm/cozy-board.css +15 -0
- package/workspace/public/pm/cozy-ev.css +52 -0
- package/workspace/public/pm/cozy-home.css +4 -4
- package/workspace/public/pm/cozy-insights.css +23 -0
- package/workspace/public/pm/cozy-jl.js +158 -0
- package/workspace/public/pm/cozy-news.js +56 -2
- package/workspace/public/pm/cozy-panels.js +3 -2
- package/workspace/public/pm/cozy-settings.js +35 -7
- package/workspace/public/pm/cozy-today.css +6 -0
- package/workspace/public/pm/cozy-viewer.js +19 -3
- package/workspace/public/pm/goal-forecast.js +101 -0
- package/workspace/public/pm/grill-words.js +53 -0
- package/workspace/public/pm/hi-pop.css +16 -0
- package/workspace/public/pm/home-app.js +42 -5
- package/workspace/public/pm/home-day.js +5 -3
- package/workspace/public/pm/home-list.js +14 -4
- package/workspace/public/pm/home-mentions.js +5 -0
- package/workspace/public/pm/home-task.js +1 -1
- package/workspace/public/pm/home-today.js +14 -5
- package/workspace/public/pm/ini-props.js +41 -8
- package/workspace/public/pm/ini-view-model.js +27 -14
- package/workspace/public/pm/ini-view.css +62 -37
- package/workspace/public/pm/ini-view.js +1 -1
- package/workspace/public/pm/ini-wf-model.js +76 -19
- package/workspace/public/pm/ini-wf.js +69 -18
- package/workspace/public/pm/metric-drafts.css +9 -0
- package/workspace/public/pm/metric-drafts.js +2 -2
- package/workspace/public/pm/premium-board.js +13 -3
- package/workspace/public/pm/premium-insights.js +86 -11
- package/workspace/public/pm/premium-report-tab.js +13 -3
- package/workspace/public/pm/premium-vw-item.js +1 -1
- package/workspace/public/pm/readonly.js +1 -0
- package/workspace/public/pm/report-chat.js +2 -1
- package/workspace/public/pm/task-card.js +4 -3
- package/workspace/public/pm/wf-page.css +9 -0
- package/workspace/public/pm/wf-page.js +30 -1
- package/workspace/run-tests.js +10 -2
- package/workspace/server.js +5 -2
- package/workspace/test-lists/forecast-board.json +5 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/* pm/grill-words.js — the words and marks every page uses for Claude's checks (Grill and Forecast screens; canvas GrillResult, GrillLenses,
|
|
2
|
+
* FcIntel, FcPhone). Pure: Node can import it.
|
|
3
|
+
*
|
|
4
|
+
* ANGLE { [angle]: { label, icon (a 24-unit path) } }: premortem · redteam · voices · reframe · scope · whatif
|
|
5
|
+
* findingOf(p) a grill proposal (lib/grill.js finding) → { angle, label, icon, title, why, next, simulated }
|
|
6
|
+
* the title and why without the angle prefix and the "Next:" tail lib/grill.js writes into them
|
|
7
|
+
* whenWord(iso, now) 'overnight' · 'today' · 'yesterday' · 'on Oct 30'
|
|
8
|
+
* costWord(usd) '38¢' · '$1.20' · '' (unknown)
|
|
9
|
+
* whyWord(run) 'before it leaves its stage' · 'when its forecast turned' · 'after its scope or dates moved' · 'in the monthly look'
|
|
10
|
+
* runLine(run, now) "Claude grilled it overnight, when its forecast turned" (no cost; the page adds it quietly)
|
|
11
|
+
* turnWord(to) 'will miss' · 'is at risk' · '' */
|
|
12
|
+
export const ANGLE = Object.freeze({
|
|
13
|
+
premortem: { label: 'Premortem', icon: 'M12 3l9 16H3zM12 10v4M12 17v.5' },
|
|
14
|
+
redteam: { label: 'Red team', icon: 'M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8' },
|
|
15
|
+
voices: { label: 'Voices', icon: 'M4 5h12v8H9l-4 3v-3H4zM19 9v7h-1v3l-3-3h-4' },
|
|
16
|
+
reframe: { label: 'Reframe', icon: 'M4 8V4h4M20 8V4h-4M4 16v4h4M20 16v4h-4M9 9h6v6H9z' },
|
|
17
|
+
scope: { label: 'Scope', icon: 'M4 6h16M7 12h10M10 18h4' },
|
|
18
|
+
whatif: { label: 'What-if', icon: 'M4 18c4 0 4-12 8-12s4 12 8 12M4 12c4 0 4-6 8-6' },
|
|
19
|
+
});
|
|
20
|
+
const MON = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
|
21
|
+
|
|
22
|
+
export function findingOf(p) {
|
|
23
|
+
const d = (p && p.data) || {}, angle = ANGLE[d.angle] ? d.angle : ANGLE[p && p.type] ? p.type : 'premortem';
|
|
24
|
+
const A = ANGLE[angle];
|
|
25
|
+
// lib/grill.js writes "Premortem (Simulated, not evidence): the finding" and "the evidence Next: the step"; the page shows them apart
|
|
26
|
+
const title = String((p && p.title) || '').replace(/^[^:]{1,60}:\s*/, '');
|
|
27
|
+
const next = String(d.next || '');
|
|
28
|
+
let why = String((p && p.why) || '');
|
|
29
|
+
if (next && why.endsWith(' Next: ' + next)) why = why.slice(0, -(' Next: ' + next).length);
|
|
30
|
+
return { angle, label: A.label, icon: A.icon, title: title || A.label, why, next, simulated: d.simulated || '' };
|
|
31
|
+
}
|
|
32
|
+
const dayKey = (t) => { const d = new Date(t); return d.getFullYear() * 400 + d.getMonth() * 32 + d.getDate(); };
|
|
33
|
+
export function whenWord(iso, now = Date.now()) {
|
|
34
|
+
const t = Date.parse(iso || '');
|
|
35
|
+
if (!Number.isFinite(t)) return '';
|
|
36
|
+
const h = new Date(t).getHours(), ago = now - t;
|
|
37
|
+
if (ago >= 0 && ago < 20 * 36e5 && (h >= 21 || h < 7)) return 'overnight';
|
|
38
|
+
if (dayKey(t) === dayKey(now)) return 'today';
|
|
39
|
+
if (dayKey(t) === dayKey(now - 864e5)) return 'yesterday';
|
|
40
|
+
const d = new Date(t); return 'on ' + MON[d.getMonth()] + ' ' + d.getDate();
|
|
41
|
+
}
|
|
42
|
+
export function costWord(usd) {
|
|
43
|
+
const n = Number(usd);
|
|
44
|
+
if (usd == null || !Number.isFinite(n)) return '';
|
|
45
|
+
return n < 1 ? Math.max(1, Math.round(n * 100)) + '¢' : '$' + n.toFixed(2);
|
|
46
|
+
}
|
|
47
|
+
const WHY = { exit: 'before it leaves its stage', forecast: 'when its forecast turned', move: 'after its scope or dates moved', monthly: 'in the monthly look' };
|
|
48
|
+
export const whyWord = (r) => (r && WHY[r.why]) || '';
|
|
49
|
+
export function runLine(r, now = Date.now()) {
|
|
50
|
+
if (!r) return '';
|
|
51
|
+
return ['Claude grilled it', whenWord(r.at, now)].filter(Boolean).join(' ') + (whyWord(r) ? ', ' + whyWord(r) : '');
|
|
52
|
+
}
|
|
53
|
+
export const turnWord = (to) => (to === 'will-miss' ? 'will miss' : to === 'at-risk' ? 'is at risk' : '');
|
|
@@ -68,12 +68,28 @@
|
|
|
68
68
|
.hi-wfland { display: flex; align-items: center; gap: 8px; }
|
|
69
69
|
.hi-wfland span { flex: 1; }
|
|
70
70
|
.hi-wfland select { font: inherit; font-size: var(--fs-2); font-weight: 700; color: var(--cz-ink); background: var(--cz-well); border: 0; border-radius: 10px; padding: 6px 10px; max-width: 60%; }
|
|
71
|
+
/* A's bridge (batch 20 item 3, canvas WmB): old stages grouped into each new stage, the scope, one picker per old stage, ✕ and ✓ as icons */
|
|
72
|
+
.hi-wfrow.hi-wfgrp { grid-template-columns: minmax(0, 1fr) 14px minmax(0, 150px); }
|
|
73
|
+
.hi-wfgrp i { font-style: normal; color: var(--cz-ink3); }
|
|
74
|
+
.hi-wfgrp em { display: inline; margin-left: 4px; }
|
|
75
|
+
.hi-wfseg { display: inline-flex; align-self: flex-start; background: var(--cz-well); border-radius: 14px; padding: 3px; }
|
|
76
|
+
.hi-wfsegb { min-height: 32px; padding: 0 12px; border: 0; border-radius: 11px; background: none; color: var(--cz-ink2); font: inherit; font-size: var(--fs-2); font-weight: 800; cursor: pointer; }
|
|
77
|
+
.hi-wfsegb.on { background: var(--cz-card); color: var(--cz-ink); box-shadow: 0 1px 2px rgba(20,24,40,.15); }
|
|
78
|
+
.hi-wfmore summary { cursor: pointer; color: var(--cz-ink2); }
|
|
79
|
+
.hi-wfmaps { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; padding-top: 8px; }
|
|
80
|
+
.hi-wfmap { display: flex; align-items: center; gap: 8px; }
|
|
81
|
+
.hi-wfmap span { flex: 1; min-width: 0; }
|
|
82
|
+
.hi-wfmap select { font: inherit; font-size: var(--fs-2); font-weight: 700; color: var(--cz-ink); background: var(--cz-well); border: 0; border-radius: 10px; padding: 6px 8px; max-width: 60%; }
|
|
83
|
+
.hi-actsi { justify-content: flex-end; }
|
|
84
|
+
.hi-actsi .hi-ib { width: 44px; height: 44px; background: var(--cz-well); }
|
|
85
|
+
.hi-actsi .hi-ib.pri { background: var(--cz-solid); color: var(--cz-onsolid); }
|
|
71
86
|
.hi-end { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; background: var(--cz-well); font-size: var(--fs-3); }
|
|
72
87
|
.hi-end p { margin: 0; flex: 1; min-width: 0; color: var(--cz-ink2); }
|
|
73
88
|
.hi-endi { display: inline-flex; color: var(--cz-ink3); }
|
|
74
89
|
@media (max-width: 760px) {
|
|
75
90
|
.hi-wfrow { grid-template-columns: minmax(0, 1fr) 14px minmax(0, 1fr); }
|
|
76
91
|
.hi-wfrow > .hi-small { grid-column: 1 / -1; }
|
|
92
|
+
.hi-wfmaps { grid-template-columns: 1fr; }
|
|
77
93
|
.hi-end { flex-wrap: wrap; }
|
|
78
94
|
}
|
|
79
95
|
.hi-pop .wfi { display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: 6px; background: var(--cz-well); color: var(--cz-ink2); }
|
|
@@ -41,6 +41,7 @@ import { mountPhoneCard } from './home-phone-card.js';
|
|
|
41
41
|
import { mountFirst } from './premium-first.js';
|
|
42
42
|
import * as L from './home-list.js';
|
|
43
43
|
import * as TD from './home-today.js';
|
|
44
|
+
import * as GW from './grill-words.js'; // Home's one line when Claude grilled something by itself (canvas FcPhone, Home)
|
|
44
45
|
import * as YD from './home-day.js';
|
|
45
46
|
import * as AD from './cozy-adler.js'; // Adler, Claude's face (batch 16 item 2)
|
|
46
47
|
import * as OKL from './okr-list.js'; // the product page's Goals line (batch 16 item 6, GsProduct)
|
|
@@ -210,6 +211,7 @@ async function load() {
|
|
|
210
211
|
NEED.refresh(); // an open ask: its agent finished, or it left Home while it was open
|
|
211
212
|
loadImpact();
|
|
212
213
|
readImpact();
|
|
214
|
+
loadGrillNews();
|
|
213
215
|
// the boards of the other products Home reads, each its own closed group: read after the list is drawn, so a slow one never holds it up
|
|
214
216
|
const others = await Promise.all(otherProducts(D).map((a) => getRetry('/api/board-premium?ws=' + encodeURIComponent(a.ws), 4).then((r) => (r && r.ok && r.model ? { ws: a.ws, name: a.name, model: r.model } : null))));
|
|
215
217
|
const got = others.filter(Boolean);
|
|
@@ -219,6 +221,33 @@ async function load() {
|
|
|
219
221
|
// an initiative of another product opened before its board was read (a link, a quick press): read it again from its own board
|
|
220
222
|
if (S.ini && !S.IM && otherIni(S.ini)) goIni(S.ini, { page: VW.isOpen() });
|
|
221
223
|
}
|
|
224
|
+
/* ── Home's one line (canvas FcPhone, Home: "only when something changed"): the newest grill this week that left findings, from GET /api/grill.
|
|
225
|
+
* "Checkout v2 will miss its date. I grilled it overnight: 3 findings." ✦ opens them on the initiative. Nothing to say is silence. ── */
|
|
226
|
+
async function loadGrillNews() {
|
|
227
|
+
const b0 = (S.D.board && S.D.board.board) || {};
|
|
228
|
+
const r = await pmGet('/api/grill' + (b0.ws ? '?ws=' + encodeURIComponent(b0.ws) : wsQ())).catch(() => null);
|
|
229
|
+
const n = r && r.ok && r.news ? r.news : null;
|
|
230
|
+
if (JSON.stringify(n) === JSON.stringify(S.gn || null)) return;
|
|
231
|
+
S.gn = n; drawList();
|
|
232
|
+
}
|
|
233
|
+
function grillNews() {
|
|
234
|
+
const n = S.gn; if (!n || !n.n) return null;
|
|
235
|
+
const row = H.boardRows(S.D).find((r) => r.id === n.ini), title = (row && row.title) || n.ini;
|
|
236
|
+
const t = n.turn && GW.turnWord(n.turn.to), when = GW.whenWord(n.at), f = n.n + (n.n === 1 ? ' finding' : ' findings');
|
|
237
|
+
const text = t ? (n.turn.scope === 'goal' ? 'A goal ' + title + ' moves ' + t + '. I grilled it ' + when + ': ' + f + '.' : title + ' ' + t + (t === 'will miss' ? ' its date' : '') + '. I grilled it ' + when + ': ' + f + '.')
|
|
238
|
+
: 'I grilled ' + title + ' ' + when + (GW.whyWord(n) ? ', ' + GW.whyWord(n) : '') + ': ' + f + '.';
|
|
239
|
+
return { id: n.ini, title, text, n: n.n };
|
|
240
|
+
}
|
|
241
|
+
/** ✦ on Home's grill line: the initiative opens, and its findings over it in the Viewer (pm/ini-props.js). */
|
|
242
|
+
async function openGrillNews(id) {
|
|
243
|
+
const g = grillNews(); if (!g || g.id !== id) return;
|
|
244
|
+
const b0 = (S.D.board && S.D.board.board) || {};
|
|
245
|
+
await goIni(id);
|
|
246
|
+
const r = await pmGet('/api/proposals?ws=' + encodeURIComponent(b0.ws || WS || '') + '&board=' + encodeURIComponent(b0.id || '') + '&initiative=' + encodeURIComponent(id)).catch(() => null);
|
|
247
|
+
if (!r || r.ok === false) { toast((r && r.error) || 'The findings could not be read.'); return; }
|
|
248
|
+
const IP = await import('./ini-props.js');
|
|
249
|
+
IP.open({ id, title: g.title, props: r.props }, { where: () => ({ ws: b0.ws || WS, board: b0.id }), reload: () => load(), toast: (m, undo) => (undo ? toastUndo(m, undo) : toast(m)) });
|
|
250
|
+
}
|
|
222
251
|
/** The products Home reads (Products, on) other than the board's own: each is a group of the list, read from its own board. At most four. */
|
|
223
252
|
function otherProducts(D) {
|
|
224
253
|
const av = (D.brief && D.brief.products && D.brief.products.available) || [];
|
|
@@ -313,7 +342,7 @@ function homeListHtml() {
|
|
|
313
342
|
return TD.listHtml(M, todayModel(), {
|
|
314
343
|
sel, selHead: S.head, ses: S.ses, pOpen, here: isPhone() ? null : TD.groupOfOpen(M, sel) || S.head, restOpen: (k) => S.rest.has(k), cap: S.cap, pin: S.pin, avHtml, ready: S.ready, err: S.D.err.length ? S.D.err[0] : '',
|
|
315
344
|
pick: S.D.pick, tones: pickTones(), review: R, mic: canDictate(), phone: isPhone(), day: S.day, news: S.news && S.news.ok ? S.news.count : 0, top: S.ready ? RECROW.html() + MEN.rowHtml(S.D, { sel: S.sel }) + (S.impact ? IMP.rowHtml(S.impact.c, { esc, sel: S.sel === 'impact' }) : '') : '',
|
|
316
|
-
imFace: IM.faceHtml(S.im, { joy: S.imJoy }),
|
|
345
|
+
imFace: IM.faceHtml(S.im, { joy: S.imJoy }), grill: S.ready ? grillNews() : null,
|
|
317
346
|
});
|
|
318
347
|
}
|
|
319
348
|
/** Your day (XvAPhDay): "Good morning" opens it in the Viewer on a phone and a desktop alike (batch 16, Wawan: the same press must lead to
|
|
@@ -598,6 +627,11 @@ function drawList() {
|
|
|
598
627
|
drawRailCard();
|
|
599
628
|
drawRecTop();
|
|
600
629
|
}
|
|
630
|
+
/** The list's own fold (batch 20 item 6): kept on this computer, the one thing that folds or unfolds the list. With a Viewer open it is the rail. */
|
|
631
|
+
function setFold(on) {
|
|
632
|
+
S.folded = !!on; store.set('pmos.home.fold', on ? '1' : null); drawList();
|
|
633
|
+
if (VW.isOpen() && VW.panels) VW.panels.relayout();
|
|
634
|
+
}
|
|
601
635
|
/* ── the folded rail's card (batch 18 item 14, FlA1–FlA5) ──
|
|
602
636
|
* With the Viewer wide, Home's list folds to a rail of group tiles (cozy-viewer.js). A tile's press opens a card beside it with that group's
|
|
603
637
|
* rows, Home's own (iniHtml): a row opens as on Home and the card closes, the rail and the Viewer's width stay; the pill lists the sessions
|
|
@@ -1736,12 +1770,14 @@ $('#hmList').onclick = (e) => { // delegated: every press on the list is a <bu
|
|
|
1736
1770
|
if (d.hmSes) { sesPill(d.hmSes === S.ses ? null : d.hmSes); return; } // an initiative's pill: what sits in it, under it (a sheet on a phone)
|
|
1737
1771
|
if ('hmSesx' in d) { sesPill(null); return; }
|
|
1738
1772
|
if (d.hmSesnew) { sesPill(null, false); newIn(d.hmSesnew); return; }
|
|
1773
|
+
if (d.hmProdnew) { sesPill(null, false); const g = ((S.M && S.M.groups) || []).find((x) => x.key === d.hmProdnew); if (g && !g.primary && g.product && g.product.ws) goOtherProduct(g); else goIni('product'); { const c = chat.current(); if (c && c.newChat) c.newChat(); } return; }
|
|
1739
1774
|
if (d.hmCompact) { compact(d.hmCompact); return; } // ✓ on Claude's ✦ Compact (batch 13 item 8): the pill's list stays open
|
|
1740
1775
|
if (S.ses && !b.closest('.hv-spp, .hv-sps, .hv-rcs')) sesPill(null, false); // a press anywhere else in the list closes it
|
|
1741
1776
|
if (d.hmSel) { if (S.ses) sesPill(null, false); if (S.day) S.day = false; select(d.hmSel); return; }
|
|
1742
1777
|
if ('hrImpact' in d) { if (S.day) S.day = false; S.sel = 'impact'; if (isPhone()) S.phoneChat = true; openTarget(homeTarget()); drawList(); return; } // Your impact: Home's own chat, on the weekly check
|
|
1743
1778
|
if ('hrMentions' in d) { if (S.day) S.day = false; S.sel = 'mentions'; drawList(); MEN.openMentions(menCtx()); return; }
|
|
1744
1779
|
if ('hmImpact' in d) { if (S.day) day(false); IM.openWeek(); return; }
|
|
1780
|
+
if (d.hmGn) { openGrillNews(d.hmGn); return; }
|
|
1745
1781
|
if ('hmDay' in d) { day(!S.day); return; }
|
|
1746
1782
|
if ('hmDayx' in d) { day(false); return; }
|
|
1747
1783
|
if ('hmFlt' in d) { filterMenu(b); return; }
|
|
@@ -1766,9 +1802,9 @@ $('#hmList').onclick = (e) => { // delegated: every press on the list is a <bu
|
|
|
1766
1802
|
if (d.hmGroup) { if (S.shut.has(d.hmGroup)) S.shut.delete(d.hmGroup); else S.shut.add(d.hmGroup); store.set('pmos.home.shut', JSON.stringify([...S.shut])); drawList(); return; }
|
|
1767
1803
|
if ('hmAllneeds' in d) { S.allNeeds = !S.allNeeds; drawList(); return; }
|
|
1768
1804
|
if ('hmNew' in d) { menu(b, newItems(), 'New'); return; }
|
|
1769
|
-
// the list header's fold (batch 18 item 15): with a Viewer open the list folds to the rail
|
|
1770
|
-
//
|
|
1771
|
-
if ('hmFold' in d) {
|
|
1805
|
+
// the list header's fold (batch 18 item 15; batch 20 item 6): with a Viewer open the list folds to the rail; with none, it folds away and the
|
|
1806
|
+
// button at the top left brings it back. Only this fold and its unfold change the list: a Viewer's width, wide or close never do
|
|
1807
|
+
if ('hmFold' in d) { setFold(true); return; }
|
|
1772
1808
|
if ('hmMeet' in d) { const m = H.meetLineOf(S.D.today); if (m) openMeeting(m.meeting); return; }
|
|
1773
1809
|
if ('hmCal' in d) { openCalendar(); return; }
|
|
1774
1810
|
if ('hmRec' in d) { MORE.openRecorder().then(() => drawList()); return; }
|
|
@@ -1857,7 +1893,8 @@ async function todayPress(k, b) {
|
|
|
1857
1893
|
}
|
|
1858
1894
|
}
|
|
1859
1895
|
$('#hmDesk').insertAdjacentHTML('afterbegin', `<button type="button" class="hm-unfold" id="hmUnfold" aria-label="Show the list" title="Show the list">${SVG(I.fold, 16)}</button>`);
|
|
1860
|
-
$('#hmUnfold').onclick = () =>
|
|
1896
|
+
$('#hmUnfold').onclick = () => setFold(false);
|
|
1897
|
+
VW.listFold({ folded: () => S.folded && !isPhone(), show: () => setFold(false) });
|
|
1861
1898
|
function cta() {
|
|
1862
1899
|
if (S.ini === 'product') { const C = H.productCard(S.D); if (C.sent) openUpdateViewer(); else { select('n:update'); } return; }
|
|
1863
1900
|
const h = S.H || {};
|
|
@@ -227,11 +227,13 @@ function newsRow(it, now) {
|
|
|
227
227
|
const who = it.kind === 'task' ? (it.from || 'Someone') : (it.product || 'Claude');
|
|
228
228
|
const when = it.at ? ago(new Date(it.at).toISOString(), now) : '';
|
|
229
229
|
const head = it.kind === 'task' ? String(it.title || '').replace(/^New task: /, '') : it.title;
|
|
230
|
-
// an overlap note is Claude's proposal (batch 18 item 2b): the ✦ tile and both initiatives by name, never an id
|
|
231
|
-
|
|
230
|
+
// an overlap note is Claude's proposal (batch 18 item 2b): the ✦ tile and both initiatives by name, never an id; so is moving a replaced
|
|
231
|
+
// workflow's initiatives (batch 20 item 3, WmB: "Shown under your day, in ✦")
|
|
232
|
+
const sub = it.kind === 'wf-bridge' ? ['From ' + ((it.from && it.from.name) || 'the old workflow'), (it.groups || []).length ? 'into ' + it.groups.map((g) => g.name).join(', ') : ''].filter(Boolean).join(' · ')
|
|
233
|
+
: it.kind === 'overlap' ? [it.a && it.a.title, it.b && it.b.title].filter(Boolean).join(' and ') || 'Two open initiatives'
|
|
232
234
|
: it.kind === 'task' ? ['Given to you' + (it.from ? ' from ' + it.from : ''), it.due ? 'due ' + it.due : '', it.iniTitle ? 'filed under ' + it.iniTitle : ''].filter(Boolean).join(' · ')
|
|
233
235
|
: ['Finished while you were away', it.target, when].filter(Boolean).join(' · ');
|
|
234
|
-
const av = it.kind === 'overlap' ? `<span class="yd-av sp" aria-hidden="true">${svg(SPARK, 13, 2)}</span>` : `<span class="yd-av${it.kind === 'finished' ? ' b' : ''}" aria-hidden="true">${esc(initials(who))}</span>`;
|
|
236
|
+
const av = it.kind === 'overlap' || it.kind === 'wf-bridge' ? `<span class="yd-av sp" aria-hidden="true">${svg(SPARK, 13, 2)}</span>` : `<span class="yd-av${it.kind === 'finished' ? ' b' : ''}" aria-hidden="true">${esc(initials(who))}</span>`;
|
|
235
237
|
return `<button type="button" class="yd-nw" data-yd="news" data-id="${esc(it.id)}"><i class="yd-nd" aria-hidden="true"></i>${av}<span class="yd-mt"><b>${esc(head)}</b><em>${esc(sub)}</em></span></button>`;
|
|
236
238
|
}
|
|
237
239
|
/** The New for you fold's parts: the 3 newest rows, "N more", the morning brief's digests as one row, and the ✓✓ that marks all seen.
|
|
@@ -148,6 +148,13 @@ function iniRowOf(D, r, needs, now) {
|
|
|
148
148
|
stage: r.stage || '', at: rowAt(r), steps: ownSteps(r), yours: kids.filter(isMove).length, late: kids.some((k) => k.kind === 'task' && k.mine && k.late) };
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
+
/** A product's own chat key: the board's product is `product` or `product:<n>`; another product is `product:<ws>` or `product:<ws>:<n>`
|
|
152
|
+
* (home-app.js productTarget, goOtherProduct, newProduct). */
|
|
153
|
+
export function isProductChat(key, p) {
|
|
154
|
+
const k = String(key || ''), ws = p && p.ws ? 'product:' + p.ws : null;
|
|
155
|
+
return !!((p && p.primary && (k === 'product' || /^product:\d+$/.test(k))) || (ws && (k === ws || /^:\d+$/.test(k.slice(ws.length)) && k.startsWith(ws + ':'))));
|
|
156
|
+
}
|
|
157
|
+
|
|
151
158
|
/* ── programs (initiative program-hierarchy, H4; canvas PgHomePhone, PgHomeDesk) ── */
|
|
152
159
|
const closedOf = (n, turnN) => [n ? plural(n, 'initiative', 'initiatives') : '', turnN ? turnN + ' your turn' : ''].filter(Boolean).join(' · ') || 'Nothing open';
|
|
153
160
|
const isMe = (D, who) => { const me = String((D.today && D.today.me) || '').toLowerCase(), w = String(who || '').toLowerCase(); return !w || /^(pm|you)(:|$)/.test(w) || (!!me && (w === me || w.startsWith(me + ' '))); };
|
|
@@ -245,21 +252,24 @@ export function homeList(D, o = {}) {
|
|
|
245
252
|
const flat = mineNeeds.filter((x) => !x.ini || !ids.has(x.ini)).filter((x) => !x.needSession).map((x) => ({ ...x, flat: true, hint: bareHint(x) }));
|
|
246
253
|
const turnN = inis.filter((x) => x.turn).length + flat.length;
|
|
247
254
|
const shown = inis.filter((x) => x.turn || x.busy);
|
|
248
|
-
|
|
249
|
-
|
|
255
|
+
// the product's own chats (its heading's chat and its new sessions) sit in the header's pill, as an initiative's sit in its row's
|
|
256
|
+
const kids = (D.sessions || []).filter((s) => listed(s) && isProductChat(keyOfSession(s), p)).map((s) => sessionRow(s, D.desk && D.desk.roles)).sort((a, b) => (RANK[b.state] || 0) - (RANK[a.state] || 0));
|
|
257
|
+
groups.push({ key: 'p:' + p.key, kind: 'product', product: p, name: p.name, kids, initials: p.initials, tone: p.tone, primary: !!p.primary, goals: p.goals, flat, inis: shown, rest: inis.filter((x) => !shown.includes(x)),
|
|
258
|
+
count: inis.length, turnN, yours: inis.reduce((n, x) => n + x.yours, 0) + flat.length + kids.filter((k) => k.state === 'needs' || k.state === 'blocked').length, late: inis.some((x) => x.late), closedLine: [inis.length ? plural(inis.length, 'initiative', 'initiatives') : '', turnN ? turnN + ' your turn' : ''].filter(Boolean).join(' · ') || 'Nothing open' });
|
|
250
259
|
}
|
|
251
260
|
// programs first (program-hierarchy P3): each program takes its initiatives out of their product groups, so an initiative shows once
|
|
252
261
|
groups.unshift(...programGroups(D, groups, products, o, now));
|
|
253
262
|
// the programs and products in the PM's sort or own order, the same as the Board's (batch 14 item 8, order-model.js)
|
|
254
263
|
groups.splice(0, groups.length, ...sortTop(groups, D.order, TOP_ACC));
|
|
255
264
|
// sessions that wait on the PM and belong to no initiative of a product: they are next steps too, under "Not in an initiative"
|
|
256
|
-
const looseNeeds = needs.filter((x) => !used.has(x.id) && !(x.ini && groups.some((g) => g.inis.concat(g.rest).some((i) => i.ini === x.ini))));
|
|
265
|
+
const looseNeeds = needs.filter((x) => !used.has(x.id) && !(x.needSession && products.some((p) => isProductChat(x.key, p))) && !(x.ini && groups.some((g) => g.inis.concat(g.rest).some((i) => i.ini === x.ini))));
|
|
257
266
|
const loose = [];
|
|
258
267
|
for (const x of looseNeeds) loose.push({ ...x, flat: true });
|
|
259
268
|
// an item the PM linked to an initiative (the clean-up, batch 13 item 3) sits under that initiative, not here
|
|
260
269
|
for (const r of tabRows('today')) if (!r.ini || !groups.some((g) => g.inis.concat(g.rest).some((i) => i.ini === r.ini))) loose.push(itemRow(r));
|
|
261
270
|
for (const m of todayOf(D).filter((x) => !meetIni(x) && x.state !== 'past')) loose.push(meetRow(m, null));
|
|
262
|
-
|
|
271
|
+
const inProduct = (s) => products.some((p) => isProductChat(keyOfSession(s), p));
|
|
272
|
+
for (const s of (D.sessions || []).filter((s) => listed(s) && !iniOfSession(s) && !inProduct(s) && s.shown !== 'needs' && s.shown !== 'blocked')) loose.push({ ...sessionRow(s, D.desk && D.desk.roles), loose: true });
|
|
263
273
|
// the folded line's signals (HvAC .lh): a blue dot when a row waits on the PM, an amber square when one of the PM's own is late
|
|
264
274
|
const lsig = { needs: loose.filter((r) => r.state === 'needs' || r.state === 'blocked').length, sessions: loose.filter((r) => r.kind === 'session' || r.needSession).length, tasks: loose.filter((r) => r.check).length, late: loose.filter((r) => r.check && r.late).length };
|
|
265
275
|
groups.push({ key: 'loose', kind: 'loose', name: 'Not in an initiative', rows: loose, n: loose.length, sig: lsig });
|
|
@@ -336,6 +336,11 @@ export function openMentions(ctx, o = {}) {
|
|
|
336
336
|
setTimeout(tick, 5000);
|
|
337
337
|
// the desktop opens wide, so the list and the conversation sit side by side (MnA4); "Back to the side" keeps the one-column list
|
|
338
338
|
if (!(typeof innerWidth === 'number' && innerWidth < 1280)) { VW.wide(true); if (LIST && LIST.body === body && canSplit(body) !== X.split) draw(body); }
|
|
339
|
+
// the Viewer's width changes without a new open (the PM folds or unfolds Home's list, drags the divider): side by side follows it (batch 20 item 6)
|
|
340
|
+
if (typeof ResizeObserver === 'function' && !body.__mnRo) {
|
|
341
|
+
body.__mnRo = new ResizeObserver(() => { if (body.isConnected && LIST && LIST.body === body && canSplit(body) !== X.split) draw(body); });
|
|
342
|
+
body.__mnRo.observe(body);
|
|
343
|
+
}
|
|
339
344
|
// one column: the asked conversation opens over the list, as a press on its row does
|
|
340
345
|
if (o.sel && !X.split) { const m = find(o.sel); if (m) openOne(m, ctx, { back: true }); }
|
|
341
346
|
// read again on open, so the list is never older than the press that opened it
|
|
@@ -57,7 +57,7 @@ export function openTask(task, h) {
|
|
|
57
57
|
const ini = (I.initiatives || []).find((x) => x.id === t.ini);
|
|
58
58
|
sections = ini && Array.isArray(ini.stages) && ini.stages.length ? ini.stages : null;
|
|
59
59
|
const row = (I.items || []).find((x) => x.uid === raw.uid) || raw;
|
|
60
|
-
const P = await placeOf(row, sections || [], (I.items || []).filter((x) => x.ini === t.ini && x.src !== 'jira'));
|
|
60
|
+
const P = await placeOf(row, sections || [], (I.items || []).filter((x) => x.ini === t.ini && x.src !== 'jira'), (ini && ini.map) || null);
|
|
61
61
|
t.section = P.section; t.wbs = P.wbs; card.draw();
|
|
62
62
|
}).catch(() => {});
|
|
63
63
|
return body;
|
|
@@ -128,16 +128,23 @@ function pillHtml(r, o) {
|
|
|
128
128
|
const on = o.ses === sesKey(r, o);
|
|
129
129
|
return `<button type="button" class="hv-sp ${m.top}${on ? ' on' : ''}" data-hm-ses="${esc(sesKey(r, o))}" aria-haspopup="dialog" aria-expanded="${on}" aria-label="${esc(m.say)}. ${on ? 'Hide' : 'Show'}" title="${esc(m.say)}">${pillMark(m.top)}<span class="n">${m.n}</span></button>`;
|
|
130
130
|
}
|
|
131
|
+
/** A product's own chats as a row for the pill (the same pill and list an initiative row has; Wawan, batch 20 item 10). */
|
|
132
|
+
const prodRow = (g) => ({ id: 'product', at: -1, name: g.name, kids: g.kids || [], prodNew: g.key });
|
|
133
|
+
const prodPillHtml = (g, o) => (o.card ? '' : pillHtml(prodRow(g), { ...o, gk: g.key }));
|
|
134
|
+
function prodPopHtml(g, o) {
|
|
135
|
+
const r = prodRow(g);
|
|
136
|
+
return !o.card && !o.phone && r.kids.length && o.ses === sesKey(r, { gk: g.key }) ? `<div class="hv-spp hv-spp-p" data-esc-layer role="dialog" aria-label="In ${esc(g.name)}">${sesListHtml(r, o)}</div>` : '';
|
|
137
|
+
}
|
|
131
138
|
/** The list behind the pill: the rows that used to nest, waiting first, then + for a new session here. */
|
|
132
139
|
function sesListHtml(r, o) {
|
|
133
140
|
const kids = r.kids.slice().sort((a, b) => RANKED.indexOf(kidState(a)) - RANKED.indexOf(kidState(b)));
|
|
134
141
|
return kids.map((k) => rowHtml(k, { ...o, kid: false, sub: kidSub(k), act: kidActHtml(k), safe: !!(k.close && k.close.safe) })).join('')
|
|
135
|
-
+ `<div class="hv-spf"><button type="button" class="ut-ib hv-ib" data-hm-sesnew="${esc(r.ini || '')}" aria-label="New session in ${esc(r.name)}" title="New session here">${svg(P.plus, 18)}</button></div>`;
|
|
142
|
+
+ `<div class="hv-spf"><button type="button" class="ut-ib hv-ib" ${r.prodNew ? `data-hm-prodnew="${esc(r.prodNew)}"` : `data-hm-sesnew="${esc(r.ini || '')}"`}" aria-label="New session in ${esc(r.name)}" title="New session here">${svg(P.plus, 18)}</button></div>`;
|
|
136
143
|
}
|
|
137
144
|
/** On a phone the list is a sheet over Home (as Your day was): the initiative's name and stage track on top. M is homeList(). */
|
|
138
145
|
export function sesSheetHtml(M, o) {
|
|
139
146
|
const g = o.ses && M.groups.find((x) => o.ses.startsWith(x.key + '|'));
|
|
140
|
-
const r = g && (g.inis || []).concat(g.rest || []).find((x) => o.ses === g.key + '|' + x.id);
|
|
147
|
+
const r = g && (o.ses === g.key + '|product' ? prodRow(g) : (g.inis || []).concat(g.rest || []).find((x) => o.ses === g.key + '|' + x.id));
|
|
141
148
|
if (!r || !r.kids.length) return '';
|
|
142
149
|
return `<button type="button" class="hv-scrim" data-hm-sesx tabindex="-1" aria-label="Close"></button><section class="hv-sheet hv-sps" data-esc-layer role="dialog" aria-label="In ${esc(r.name)}" tabindex="-1"><div class="hv-grab" aria-hidden="true"></div>`
|
|
143
150
|
+ `<div class="hv-sbar"><b>${esc(r.name)}</b>${track(r.at, r.stage, r.steps)}<button type="button" class="ut-ib hv-ib" data-hm-sesx aria-label="Close" title="Close">${svg(P.x, 20)}</button></div>`
|
|
@@ -164,8 +171,8 @@ function productHtml(g, o) {
|
|
|
164
171
|
const say = [g.name, open ? (g.goals && g.goals.n ? g.goals.text : '') : [plural(g.count, 'initiative', 'initiatives'), yoursWords(g)].filter(Boolean).join(', ')].filter(Boolean).join(', ');
|
|
165
172
|
// the name opens the product in the Viewer, with its own chat; the rest of the header folds the group (canvas HbCProduct)
|
|
166
173
|
const head = `<div class="hv-gh hv-prg${open ? '' : ' closed'}${o.selHead === g.key ? ' sel' : ''}"><button type="button" class="hv-pt" data-hm-prodopen="${esc(g.key)}" aria-label="Open ${esc(g.name)}, a product"${o.selHead === g.key ? ' aria-current="true"' : ''}>`
|
|
167
|
-
+ `<span class="hv-tl t${g.tone}" aria-hidden="true" data-cz-rail-tile="${esc(g.key)}" data-cz-rail-name="${esc(g.name)}"${o.here === g.key ? ' data-cz-rail-here' : ''}>${esc(g.initials)}${open ? '' : nd(g)}</span><b>${esc(g.name)}</b></button
|
|
168
|
-
+ `<button type="button" class="hv-pf" data-hm-pg="${esc(g.key)}" aria-expanded="${open}" aria-label="${esc(say)}. ${open ? 'Close' : 'Open'} the group">${open ? dots(g) : ''}<span class="hv-cv">${svg(open ? P.chevD : P.chevR, 16)}</span></button
|
|
174
|
+
+ `<span class="hv-tl t${g.tone}" aria-hidden="true" data-cz-rail-tile="${esc(g.key)}" data-cz-rail-name="${esc(g.name)}"${o.here === g.key ? ' data-cz-rail-here' : ''}>${esc(g.initials)}${open ? '' : nd(g)}</span><b>${esc(g.name)}</b></button>${prodPillHtml(g, o)}`
|
|
175
|
+
+ `<button type="button" class="hv-pf" data-hm-pg="${esc(g.key)}" aria-expanded="${open}" aria-label="${esc(say)}. ${open ? 'Close' : 'Open'} the group">${open ? dots(g) : ''}<span class="hv-cv">${svg(open ? P.chevD : P.chevR, 16)}</span></button>${prodPopHtml(g, o)}</div>`;
|
|
169
176
|
const sec = `<section class="hm-pg hv-g" aria-label="${esc(g.name)}" data-po-id="${esc(prodKey(g.name))}">${SO.gripHtml(g.name)}`;
|
|
170
177
|
if (!open) return `${sec}${head}</section>`;
|
|
171
178
|
return `${sec}${head}<div class="hv-card">${productBody(g, o, true)}</div></section>`;
|
|
@@ -323,7 +330,9 @@ export function listHtml(M, T, o) {
|
|
|
323
330
|
+ `<button type="button" class="ut-ib hv-ib" data-hm-new aria-haspopup="menu" aria-label="New" title="New">${svg(P.plus, 20)}</button>`
|
|
324
331
|
// fold the list to the rail (batch 18 item 15, TbT1Split): the rail's list button brings it back; a phone has no rail
|
|
325
332
|
+ (o.phone ? '' : `<button type="button" class="ut-ib hv-ib" data-hm-fold aria-label="Fold the list to the rail" title="Fold the list to the rail">${svg(P.fold, 18)}</button>`) + '</span></div>'
|
|
326
|
-
+ (M.yours ? `<p class="hv-sub">${M.yours} ${M.yours === 1 ? 'is' : 'are'} yours</p>` : '')
|
|
333
|
+
+ (M.yours ? `<p class="hv-sub">${M.yours} ${M.yours === 1 ? 'is' : 'are'} yours</p>` : '')
|
|
334
|
+
// Claude grilled something by itself this week and left findings (canvas FcPhone, Home): one quiet line with ✦, else nothing
|
|
335
|
+
+ (o.grill ? `<p class="hv-sub hv-gn"><span>${esc(o.grill.text)}</span><button type="button" class="ut-ib hv-ib" data-hm-gn="${esc(o.grill.id)}" aria-label="${esc('Open the ' + o.grill.n + (o.grill.n === 1 ? ' finding' : ' findings') + ' on ' + o.grill.title)}" title="Open the findings">${svg('M12 3l1.8 4.7L18.5 9.5l-4.7 1.8L12 16l-1.8-4.7L5.5 9.5l4.7-1.8z', 18)}</button></p>` : '');
|
|
327
336
|
// the Today card only while the day has a moment; the plain day (its meetings and load) is in Your day
|
|
328
337
|
const card = MOMENT.has(T.mode) ? todayHtml(T, { greet: M.greet, sub: '', phone: o.phone }) : '';
|
|
329
338
|
// start-up and errors (canvas AdU9, AdU6): Adler wears his glasses while Home reads, and says a failure plainly; the greeting's face hides
|
|
@@ -7,12 +7,17 @@
|
|
|
7
7
|
* open(v, H) the ✦'s press: "Claude proposes N" as a drill-in. Groups in order: Found elsewhere, Dates, Looks done, Names,
|
|
8
8
|
* Links. ✓ in the header keeps every proposal Claude is sure of; Check these and Not placed need their own ✓.
|
|
9
9
|
* Each proposal: ⌄ its items, ✓ keep, ✕ drop for good; ✕ on one item drops that item. One toast with Undo.
|
|
10
|
+
* Claude grilled it (lib/grill.js, canvas GrillResult): each finding with its angle's mark, the next step, the
|
|
11
|
+
* Simulated tag on Voices and What-if; ✓ adds the next step as a task, ✎ lets the PM word it first, ✕ drops it. 3 show,
|
|
12
|
+
* "+N smaller findings" unfolds the rest. Over them, quietly: the angles Claude chose, when it ran, and what it cost.
|
|
13
|
+
* On a phone the findings are cards side by side, one per screen.
|
|
10
14
|
* lookHtml(v) the Tasks' dashed placeholder while Claude looks and nothing is kept yet (PiA1)
|
|
11
15
|
* foundDocs(v) the documents a ✓ kept from elsewhere, for the Documents fold: [{ title, meta, ref }]
|
|
12
16
|
*
|
|
13
17
|
* The host gives H.where() → { ws, board }, H.reload(), H.toast(text, undo?). Nothing is written until the PM's ✓. */
|
|
14
18
|
import { pmGet, pmPost } from './http.js';
|
|
15
19
|
import { taskTitle } from './ini-links.js';
|
|
20
|
+
import * as GW from './grill-words.js'; // Grill findings: the angle, its mark, the next step, the Simulated tag (canvas GrillResult)
|
|
16
21
|
|
|
17
22
|
const esc = (s) => String(s == null ? '' : s).replace(/[&<>"']/g, (c) => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }[c]));
|
|
18
23
|
const SVG = (d, w = 16, sw = 1.8) => `<svg aria-hidden="true" width="${w}" height="${w}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="${sw}" stroke-linecap="round" stroke-linejoin="round"><path d="${d}"/></svg>`;
|
|
@@ -57,9 +62,15 @@ export function sync(v, H) {
|
|
|
57
62
|
}, 5000));
|
|
58
63
|
}
|
|
59
64
|
}
|
|
60
|
-
async function read(H, id) {
|
|
65
|
+
async function read(H, id, all) {
|
|
61
66
|
const at = H.where ? H.where() : {};
|
|
62
|
-
return pmGet('/api/proposals?ws=' + encodeURIComponent(at.ws || '') + '&board=' + encodeURIComponent(at.board || '') + '&initiative=' + encodeURIComponent(id)).catch(() => null);
|
|
67
|
+
return pmGet('/api/proposals?ws=' + encodeURIComponent(at.ws || '') + '&board=' + encodeURIComponent(at.board || '') + '&initiative=' + encodeURIComponent(id) + (all ? '&grill=all' : '')).catch(() => null);
|
|
68
|
+
}
|
|
69
|
+
/** The initiative's last grill run (GET /api/grill): when, why and what it cost. Quiet: a failed read draws nothing. */
|
|
70
|
+
async function readRun(H, id) {
|
|
71
|
+
const at = H.where ? H.where() : {};
|
|
72
|
+
const r = await pmGet('/api/grill?ws=' + encodeURIComponent(at.ws || '') + '&inis=' + encodeURIComponent(id)).catch(() => null);
|
|
73
|
+
return r && r.ok && r.runs ? r.runs[id] || null : null;
|
|
63
74
|
}
|
|
64
75
|
async function write(H, route, body) {
|
|
65
76
|
const at = H.where ? H.where() : {};
|
|
@@ -75,7 +86,7 @@ export function foundDocs(v) {
|
|
|
75
86
|
}
|
|
76
87
|
|
|
77
88
|
/* ── the Viewer ── */
|
|
78
|
-
const S = { id: null, props: null, open: new Set(), choices: {}, H: null, title: '', timer: null };
|
|
89
|
+
const S = { id: null, props: null, open: new Set(), choices: {}, H: null, title: '', timer: null, edit: null, all: false, run: null };
|
|
79
90
|
const titleOf = (p) => {
|
|
80
91
|
if (p.title) return p.title;
|
|
81
92
|
const n = p.items.length;
|
|
@@ -107,7 +118,26 @@ function linkHtml(p, l) {
|
|
|
107
118
|
const mv = (l.moves || []).map((m) => m.title + ' to ' + span(m.to.start, m.to.due)).join(', ');
|
|
108
119
|
return `<div class="pp-it pp-lk"><span class="w"><b>${esc(clip(l.toTitle, 70))}</b><small>${esc(l.why)}${mv ? ' · ' + esc(mv) : ''}</small></span>${seg}</div>`;
|
|
109
120
|
}
|
|
121
|
+
/* ── Claude grilled it (canvas GrillResult) ── */
|
|
122
|
+
function grillHtml(p) {
|
|
123
|
+
const f = GW.findingOf(p), ed = S.edit === p.id, src = (p.sources || []).map((s) => s.label).join(', ');
|
|
124
|
+
const next = ed ? `<span class="pp-ned"><label class="vh" for="ppNed">The next step, in your words</label><input id="ppNed" data-pp-ned="${esc(p.id)}" maxlength="200" value="${esc(S.choices[p.id] || f.next)}"></span>`
|
|
125
|
+
: f.next ? `<small class="pp-next"><b>Next step:</b> ${esc(S.choices[p.id] || f.next)}</small>` : '';
|
|
126
|
+
return `<div class="pp-p gr" data-pp="${esc(p.id)}"><div class="pp-ph1"><span class="pp-ic gr" title="${esc(f.label)}">${SVG(f.icon, 16)}</span>`
|
|
127
|
+
+ `<span class="w"><b>${esc(f.title)}</b><small>${esc(f.why)}</small>${next}`
|
|
128
|
+
+ `<small class="pp-src"><em class="pp-ang">${esc(f.label)}</em>${f.simulated ? `<em class="pp-sim">${esc(f.simulated)}</em>` : ''}${src ? ' ' + esc(src) : ''}</small></span>`
|
|
129
|
+
+ `<span class="pp-gacts">${ib(`data-pp-drop="${esc(p.sig || '')}"`, 'Drop it', I.x)}${ib(`data-pp-edit="${esc(p.id)}" aria-pressed="${ed}"`, ed ? 'Done changing the step' : 'Change this step', I.name)}${ib(`data-pp-keep="${esc(p.id)}"`, 'Keep this step', I.check, 'ok')}</span></div></div>`;
|
|
130
|
+
}
|
|
131
|
+
/** The grill group: the angles Claude chose, when it ran and its cost over the findings; "+N smaller findings" under them. */
|
|
132
|
+
function grillSec(g) {
|
|
133
|
+
const angles = [...new Set(g.props.map((p) => GW.findingOf(p).label))];
|
|
134
|
+
const r = S.run, cost = r ? GW.costWord(r.cost) : '';
|
|
135
|
+
const head = `<p class="pp-ghd">${angles.map((a) => `<em class="pp-ang">${esc(a)}</em>`).join('')}<span>${esc(r ? GW.runLine(r) : 'Claude chose these and ran them by itself')}${cost ? ' · ' + esc(cost) : ''}. Nothing changes until you keep one.</span></p>`;
|
|
136
|
+
const more = g.more ? `<div class="pp-gmore"><span>+${g.more} smaller ${g.more === 1 ? 'finding' : 'findings'}</span>${ib('data-pp-gall', 'Show the rest', 'M5 12h.01M12 12h.01M19 12h.01')}</div>` : '';
|
|
137
|
+
return head + `<div class="pp-gl">${g.props.map(grillHtml).join('')}</div>` + (g.props.length > 1 ? `<p class="pp-gsw">${g.props.length} findings · swipe for the next</p>` : '') + more;
|
|
138
|
+
}
|
|
110
139
|
function propHtml(p) {
|
|
140
|
+
if (p.group === 'grill') return grillHtml(p);
|
|
111
141
|
if (p.group === 'links') {
|
|
112
142
|
const l = p.link || {}, a = taskTitle(p.ini || S.id, l.from), b = taskTitle(p.ini || S.id, l.to);
|
|
113
143
|
const t = l.kind === 'link' ? clip(b, 40) + ' waits on ' + clip(a, 40) : l.kind === 'pull' ? 'Pull ' + plural((l.tasks || []).length, 'task', 'tasks') + ' in' : 'Move ' + plural((l.tasks || []).length, 'task', 'tasks') + ' to keep your links';
|
|
@@ -136,7 +166,7 @@ function lookBlock(L) {
|
|
|
136
166
|
function bodyHtml(P) {
|
|
137
167
|
const VW = window.czViewer;
|
|
138
168
|
if (!P || (!P.n && !(P.look && !P.look.ended))) return '<p class="pp-none">Nothing waits here now.</p>';
|
|
139
|
-
const secs = (P.groups || []).map((g) => ({ id: g.group, title: GROUP[g.group] || g.group, count: g.props.length, open: true, html: g.props.map(propHtml).join('') }));
|
|
169
|
+
const secs = (P.groups || []).map((g) => ({ id: g.group, title: GROUP[g.group] || g.group, count: g.props.length + (g.more || 0), open: true, html: g.group === 'grill' ? grillSec(g) : g.props.map(propHtml).join('') }));
|
|
140
170
|
return `<div class="pp">${lookBlock(P.look)}${VW.czSections(secs, { key: 'props' })}</div>`;
|
|
141
171
|
}
|
|
142
172
|
function presses(P) { return P && P.sure ? [{ act: 'all', label: 'Keep all ' + P.sure + ' Claude is sure of', icon: I.check, solid: true }] : []; }
|
|
@@ -153,7 +183,7 @@ function draw() {
|
|
|
153
183
|
if (S.props && S.props.look && !S.props.look.ended) S.timer = setTimeout(fresh, 4000);
|
|
154
184
|
}
|
|
155
185
|
async function fresh() {
|
|
156
|
-
const id = S.id, r = await read(S.H, id);
|
|
186
|
+
const id = S.id, r = await read(S.H, id, S.all);
|
|
157
187
|
if (S.id !== id || !r || r.ok === false) return;
|
|
158
188
|
S.props = r.props; draw();
|
|
159
189
|
}
|
|
@@ -183,7 +213,9 @@ async function onPress(e) {
|
|
|
183
213
|
const d = b.dataset;
|
|
184
214
|
if (d.ppMore) { if (S.open.has(d.ppMore)) S.open.delete(d.ppMore); else S.open.add(d.ppMore); draw(); return; }
|
|
185
215
|
if (d.ppCh) { S.choices[d.ppCh] = d.v; draw(); return; }
|
|
186
|
-
if (d.
|
|
216
|
+
if (d.ppEdit) { const i = b.closest('.pp-p') && b.closest('.pp-p').querySelector('[data-pp-ned]'); if (i && i.value.trim()) S.choices[d.ppEdit] = i.value.trim(); S.edit = S.edit === d.ppEdit ? null : d.ppEdit; draw(); const n = document.getElementById('ppNed'); if (n) n.focus(); return; }
|
|
217
|
+
if ('ppGall' in d) { S.all = true; b.disabled = true; await fresh(); return; }
|
|
218
|
+
if (d.ppKeep) { const i = document.querySelector(`[data-pp-ned="${CSS.escape(d.ppKeep)}"]`); if (i && i.value.trim()) S.choices[d.ppKeep] = i.value.trim(); b.disabled = true; S.edit = null; await keep([d.ppKeep], false); return; }
|
|
187
219
|
if (d.ppDrop) { b.disabled = true; await drop(d.ppDrop); return; }
|
|
188
220
|
if (d.ppDropit) { b.disabled = true; await drop(d.ppDropit); return; }
|
|
189
221
|
if ('ppDroplk' in d) {
|
|
@@ -208,11 +240,12 @@ async function onPress(e) {
|
|
|
208
240
|
/** The ✦'s press: the drill-in. v: the initiative's view (id, title, props). */
|
|
209
241
|
export function open(v, H) {
|
|
210
242
|
const VW = window.czViewer; if (!VW || !v || !v.id) return;
|
|
211
|
-
S.id = v.id; S.props = v.props; S.H = H; S.open = new Set(); S.choices = {}; S.title = v.title;
|
|
243
|
+
S.id = v.id; S.props = v.props; S.H = H; S.open = new Set(); S.choices = {}; S.title = v.title; S.edit = null; S.all = false; S.run = null;
|
|
244
|
+
if (v.props && (v.props.groups || []).some((g) => g.group === 'grill')) readRun(H, v.id).then((r) => { if (S.id === v.id && r) { S.run = r; draw(); } });
|
|
212
245
|
VW.drill();
|
|
213
246
|
VW.open({ id: 'pp:' + v.id, kind: 'Claude proposes', title: 'Claude proposes' + (v.props && v.props.n ? ' ' + v.props.n : ''), sub: v.title, icon: I.spark,
|
|
214
247
|
presses: presses(v.props),
|
|
215
248
|
onPress: (act) => { if (act === 'all') keep([], true); },
|
|
216
|
-
render: (b) => { b.innerHTML = bodyHtml(S.props); if (!b.__pp) { b.__pp = true; } b.onclick = onPress; draw(); if (!S.props || S.props.look) fresh(); },
|
|
249
|
+
render: (b) => { b.innerHTML = bodyHtml(S.props); if (!b.__pp) { b.__pp = true; } b.onclick = onPress; b.onkeydown = (e) => { if (e.key !== 'Enter' || !e.target.matches('[data-pp-ned]')) return; e.preventDefault(); const k = e.target.closest('.pp-p').querySelector('[data-pp-keep]'); if (k) k.click(); }; draw(); if (!S.props || S.props.look) fresh(); },
|
|
217
250
|
onClose: () => { clearTimeout(S.timer); if (S.id === v.id) S.id = null; } });
|
|
218
251
|
}
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
* session that waits on the PM, Home's; n: how many wait on this initiative), docs (count | null), linked (count | null), claude (Claude's
|
|
11
11
|
* line while a session works on it, Home's), people ([{ name }]: the stakeholders) }
|
|
12
12
|
* stagesOf(r, steps) → { list: [{ key, name, ms, status: done | now | next | skip, why }], cur } the initiative's OWN workflow (D99)
|
|
13
|
-
* sectionOf(task, list)
|
|
13
|
+
* sectionOf(task, list, map?) → the stage key the task sits under in the breakdown, or '' (a WBS section is a task's place, never its state;
|
|
14
|
+
* map: the row's wfMap, so a task of an earlier workflow's stage sits in the stage it went into, batch 20 item 3)
|
|
14
15
|
* wbsOf(title) → { code, top } | null "10.5 TC to review" → { code: '10.5', top: '10' }; "WP-03 Token exchange" → { code: 'WP-03', top: 'WP' }
|
|
15
16
|
* statusOf(r, grill, fmt) → { tone, text } the status the row and the view both say
|
|
16
17
|
* linkedOf(r) → [{ kind: doc | dep | epic, label, path?, title? }] the Linked fold, from the trail
|
|
@@ -28,7 +29,8 @@
|
|
|
28
29
|
* late task.
|
|
29
30
|
* 9 what waits on you leads, with the one primary; the status then moves to the meta line.
|
|
30
31
|
* 10 a new initiative with no breakdown draws its workflow's sections dashed, with Draft it.
|
|
31
|
-
* 11 Build
|
|
32
|
+
* 11 the stage whose output is Jira tickets (Build; a workflow's own Jira stage): the open tickets are its section, by epic, with "N of M done
|
|
33
|
+
* in Jira" and how fresh (batch 20 item 3: by the output, never by the name build or deliver).
|
|
32
34
|
* 12 over the plan: the dates line turns amber with the days over; a skipped stage keeps its place, with its reason.
|
|
33
35
|
* 18 each section carries its dates: done stages when they ran, now from when to the plan end, later ones "Plan <date>", amber when missed.
|
|
34
36
|
* 19 a big section shows the 3 most urgent first, then folds the rest by the next WBS level, each with its count; done folds last. */
|
|
@@ -73,12 +75,14 @@ export function stagesOf(r, steps) {
|
|
|
73
75
|
/* ── where a task sits ── */
|
|
74
76
|
/** The stage key a task sits under: the PM's own placement (section, '' = none), the stage whose To finish entry made it, a breakdown item's
|
|
75
77
|
* own stage when a stage of this workflow has that key or name; else '' (Not in a stage). */
|
|
76
|
-
export function sectionOf(task, list) {
|
|
78
|
+
export function sectionOf(task, list, map) {
|
|
77
79
|
const L = list || [];
|
|
78
80
|
const has = (k) => L.some((s) => s.key === k);
|
|
79
|
-
|
|
80
|
-
if (
|
|
81
|
-
if (
|
|
81
|
+
// a stage of the workflow it ran before a switch: the stage that switch put it in (row.wfMap: old key → stage key)
|
|
82
|
+
const via = (k) => { if (!k) return ''; if (has(k)) return k; const m = map && (map[k] || map[norm(k)]); return typeof m === 'string' && has(m) ? m : ''; };
|
|
83
|
+
if (typeof task.section === 'string') return via(task.section);
|
|
84
|
+
if (task.from && task.from.stage) { const v = via(task.from.stage); if (v) return v; }
|
|
85
|
+
if (task.itemStage) { const n = norm(task.itemStage), hit = L.find((s) => s.key === task.itemStage || norm(s.name) === n || norm(s.key) === n); if (hit) return hit.key; const v = via(task.itemStage); if (v) return v; }
|
|
82
86
|
return '';
|
|
83
87
|
}
|
|
84
88
|
/** The WBS code a title starts with, and its top level: "10.5 TC to review" → 10.5 under 10; "WP-03 Token exchange" → WP-03 under WP. */
|
|
@@ -180,12 +184,18 @@ export function iniView(r, ctx = {}) {
|
|
|
180
184
|
const T = (r.tasks || []).filter((k) => k.status !== 'Archived');
|
|
181
185
|
// the Jira tickets PMOS read for this initiative: a task whose title names one is linked to it
|
|
182
186
|
const byKey = new Map((t.tickets || []).filter((k) => k && k.key).map((k) => [k.key, k]));
|
|
183
|
-
const rows = T.map((k) => ({ ...rowOf(k, today, linkOf(k.title, byKey)), sec: sectionOf(k, list) }));
|
|
187
|
+
const rows = T.map((k) => ({ ...rowOf(k, today, linkOf(k.title, byKey)), sec: sectionOf(k, list, r.wfMap) }));
|
|
184
188
|
// archived tasks count nowhere and show in no view but the List's Archived fold (batch 9 item 5b)
|
|
185
|
-
const arch = (r.tasks || []).filter((k) => k.status === 'Archived').map((k) => ({ ...rowOf(k, today, linkOf(k.title, byKey)), sec: sectionOf(k, list) }));
|
|
189
|
+
const arch = (r.tasks || []).filter((k) => k.status === 'Archived').map((k) => ({ ...rowOf(k, today, linkOf(k.title, byKey)), sec: sectionOf(k, list, r.wfMap) }));
|
|
186
190
|
const archOf = (keys) => arch.filter((x) => keys.includes(x.sec));
|
|
187
191
|
const open = rows.filter((x) => !x.closed), late = open.filter((x) => x.late);
|
|
188
|
-
|
|
192
|
+
// Jira tickets attach to the stage whose output is Jira tickets (batch 20 item 3), whatever it is called: Product feature's Build, a 3-stage
|
|
193
|
+
// workflow's Implementation. They stay in that stage's section once it is passed; the stage card counts them only while it is the stage.
|
|
194
|
+
const jk = ((r.wfStages || []).find((x) => x.output && x.output.kind === 'jira') || {}).key || (!ownWf(r) ? 'build' : '');
|
|
195
|
+
const jIdx = jk ? list.findIndex((x) => x.key === jk) : -1;
|
|
196
|
+
const hasTk = (t.tickets || []).length > 0;
|
|
197
|
+
const jira = jIdx >= 0 && cur === jIdx && hasTk; // the stage card reads Jira
|
|
198
|
+
const jiraIn = jIdx >= 0 && cur >= jIdx && hasTk; // the section holds the tickets
|
|
189
199
|
// a ticket a task is named for shows once, as the task: it is not drawn or counted again as a Jira row
|
|
190
200
|
const named = new Set(rows.concat(arch).map((x) => x.jkey).filter(Boolean));
|
|
191
201
|
const tkOwn = (t.tickets || []).filter((k) => !named.has(k.key));
|
|
@@ -238,6 +248,8 @@ export function iniView(r, ctx = {}) {
|
|
|
238
248
|
doneOf, nDone: sDone, nTotal: sTotal, nLate: curRows.filter((x) => !x.closed && x.late).length, gates, day: days != null ? 'day ' + days + (usual != null ? ' of ~' + usual : '') : '', dayOver: days != null && usual != null && days > usual,
|
|
239
249
|
clock: days != null && !line.chip ? (usual != null ? days + ' of ~' + usual + ' days' : plural(days, 'day', 'days')) : '', line, ready,
|
|
240
250
|
ladder: list.map((s) => ({ name: s.name, ms: s.ms, cls: s.status })), dates, next: nx,
|
|
251
|
+
// the old stages' own days, kept after a switch merged them (batch 20 item 3, canvas WmD): "Before the switch: Triage 4 days · Discover 12 days"
|
|
252
|
+
before: Array.isArray(tr.before) && tr.before.length ? 'Before the switch: ' + tr.before.map((b) => b.name + ' ' + plural(b.days, 'day', 'days')).join(' · ') : '',
|
|
241
253
|
aria: cur >= 0 ? 'Stage ' + (cur + 1) + ' of ' + list.length + ' of ' + ((r.wf && r.wf.name) || 'Product feature') + ': ' + st.name + '.' + (nx ? ' Next stage: ' + nx.name + '.' : '') : 'No stage on record.',
|
|
242
254
|
};
|
|
243
255
|
|
|
@@ -256,18 +268,19 @@ export function iniView(r, ctx = {}) {
|
|
|
256
268
|
return { kind: 'stage', key: s.key, n: i + 1, name: s.name, ms: s.ms, status: s.status, sub, subWarn, count: countOf(op.length, lt.length, dn), warn: lt.length > 0,
|
|
257
269
|
open: s.status === 'now' || lt.length > 0, ...bodyOf(rs, archOf([s.key])), jira: null, why, ...(s.status === 'skip' ? { skipWhy: s.why || '' } : {}) };
|
|
258
270
|
};
|
|
259
|
-
const anyTasks = rows.length > 0 ||
|
|
271
|
+
const anyTasks = rows.length > 0 || jiraIn;
|
|
260
272
|
// one row per stage, in workflow order (batch 11 item 5, Wawan: "one row/group per stage. Do not combine"): past and later stages are no
|
|
261
273
|
// longer merged into "Stages 1–4" or "Later: …". A stage that is not live starts folded; the current one and any with a late task start open.
|
|
262
274
|
list.forEach((s, i) => {
|
|
263
275
|
const x = one(s, i);
|
|
264
|
-
if (i ===
|
|
276
|
+
if (i === jIdx && jiraIn && tkOwn.length) {
|
|
265
277
|
// a ticket just moved to Done in PMOS stays in view until Jira's next read, so the card the PM dropped does not vanish
|
|
266
278
|
const opn = tkOwn.filter((k) => k.status !== 'Done' || (k.move && (k.move.state === 'moving' || k.move.state === 'moved'))).sort((a, b) => (b.blocked ? 1 : 0) - (a.blocked ? 1 : 0));
|
|
267
279
|
x.jira = { open: opn.map((k) => ({ key: k.key, title: k.title, epic: k.epic || '', status: k.status || 'To do', raw: k.raw || '', move: k.move || null, start: k.start || '', due: k.due || k.sprintEnd || '', here: !!k.datesHere, days: jDays(k, today), av: initials(k.assignee), sub: [k.blocked ? 'Blocked' + (k.reason ? ' by ' + String(k.reason).replace(/^Waiting on /i, '') : '') : k.status || 'To do', k.assignee || ''].filter(Boolean).join(' · '), warn: !!k.blocked })),
|
|
268
280
|
done: tkOwn.length - opn.length, total: tkOwn.length, at: ctx.jiraAt || '' };
|
|
269
281
|
x.count = countOf(opn.length + x.top.length + x.groups.reduce((n, g) => n + g.n, 0), x.top.filter((y) => y.late).length, 0);
|
|
270
282
|
x.sub = x.sub + (x.sub ? ' · ' : '') + 'Jira tickets, by epic';
|
|
283
|
+
if (opn.length) x.open = true; // passed but still open in Jira (Deliver): the tickets stay in view, not folded under a done stage
|
|
271
284
|
}
|
|
272
285
|
sections.push(x);
|
|
273
286
|
});
|
|
@@ -276,7 +289,7 @@ export function iniView(r, ctx = {}) {
|
|
|
276
289
|
const op = loose.filter((x) => !x.closed), lt = op.filter((x) => x.late);
|
|
277
290
|
sections.push({ kind: 'none', key: '', label: 'Not in a stage', sub: '', count: countOf(op.length, lt.length, loose.length - op.length), warn: lt.length > 0, open: op.length > 0, ...bodyOf(loose, archOf([''])) });
|
|
278
291
|
}
|
|
279
|
-
const nOpen = open.length + (
|
|
292
|
+
const nOpen = open.length + (jiraIn ? tkOwn.filter((k) => k.status !== 'Done').length : 0), nDone = rows.length - open.length + (jiraIn ? tkOwn.filter((k) => k.status === 'Done').length : 0);
|
|
280
293
|
const tasks = { open: nOpen, done: nDone, late: late.length, count: [nOpen ? nOpen + ' open' : '', nDone ? nDone + ' done' : ''].filter(Boolean).join(' · '), sections,
|
|
281
294
|
empty: !anyTasks ? { stages: list.map((s, i) => ({ n: i + 1, name: s.name, ms: s.ms, now: i === cur })) } : null };
|
|
282
295
|
|
|
@@ -285,7 +298,7 @@ export function iniView(r, ctx = {}) {
|
|
|
285
298
|
const lateSay = late.length ? plural(late.length, 'task is', 'tasks are') + ' late' + (late.length > 1 ? ', the oldest since ' + dateY(late.map((x) => x.end).sort()[0], today) : ', since ' + dateY(late[0].end, today)) + '.' : '';
|
|
286
299
|
const why = whyText(r, list, cur, today, finished);
|
|
287
300
|
const it = tr || {};
|
|
288
|
-
const progress =
|
|
301
|
+
const progress = jiraIn ? (ctx.jiraAt || '') : r.progress != null && Number.isFinite(Number(r.progress)) ? Math.round(Number(r.progress)) + '% · by hand' : '';
|
|
289
302
|
// what waits on the PM: the track's, else the trail's (the Board merges the trail into the track; Home reads the row as sent)
|
|
290
303
|
const you = t.you || (it.you && it.you.text) || null, youKind = t.youKind || (it.you && it.you.kind) || null, youWhy = t.youWhy || (it.you && it.you.why) || '';
|
|
291
304
|
let wait = null;
|
|
@@ -307,7 +320,7 @@ export function iniView(r, ctx = {}) {
|
|
|
307
320
|
summary.wf = r.wf || { id: PF_ID, name: 'Product feature', icon: 'feature' };
|
|
308
321
|
summary.program = ctx.program || null;
|
|
309
322
|
const today2 = (n) => String(n).padStart(2, '0');
|
|
310
|
-
return { anchor: r.kr || '', vs: r.__vs || null, links: r.__vs && r.__vs.draft ? null : r.links || null, id: r.id || null, key: r.key, title: r.title, today: today.getFullYear() + '-' + today2(today.getMonth() + 1) + '-' + today2(today.getDate()), summary, stage, tasks, docs: ctx.docs != null ? ctx.docs : null, linked: linkedOf(r), jiraAt:
|
|
323
|
+
return { anchor: r.kr || '', vs: r.__vs || null, links: r.__vs && r.__vs.draft ? null : r.links || null, id: r.id || null, key: r.key, title: r.title, today: today.getFullYear() + '-' + today2(today.getMonth() + 1) + '-' + today2(today.getDate()), summary, stage, tasks, docs: ctx.docs != null ? ctx.docs : null, linked: linkedOf(r), jiraAt: jiraIn ? ctx.jiraAt || '' : '', jiraRead: ctx.jiraReadAt || '',
|
|
311
324
|
// split or merge (batch 11 item 14): Claude's suggestion for it, and where its work went when it was merged
|
|
312
325
|
suggest: r.suggest || null, merged: mergedOf(r),
|
|
313
326
|
// what Claude proposes under the one blue ✦, and what a ✓ kept from elsewhere (batch 12 items 2, 3 and 4; pm/ini-props.js)
|