create-pmos 0.537.0 → 0.538.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 +68 -14
- package/payload/KIT-VERSION +2 -2
- 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/payload/state/log.md +1 -1
- package/workspace/board-columns-test.js +11 -10
- package/workspace/board-programs-test.js +21 -23
- package/workspace/board-publish-ui-test.js +19 -15
- package/workspace/board-shared-ui-test.js +15 -12
- package/workspace/briefing-premium-board-test.js +46 -31
- package/workspace/briefing-premium-insights-test.js +24 -31
- package/workspace/briefing-premium-metrics-test.js +2 -2
- package/workspace/calm-timeline-test.js +1 -1
- package/workspace/changelog.json +67 -0
- package/workspace/ev-everywhere-test.js +4 -5
- package/workspace/fixtures/board-premium-facts.js +1 -1
- package/workspace/fixtures/initiative-premium-facts.js +1 -1
- package/workspace/fixtures/insights-premium-facts.js +6 -6
- package/workspace/fixtures/program-ascent.js +1 -1
- package/workspace/guide/adler.md +2 -2
- package/workspace/guide/agent-capabilities.md +38 -6
- package/workspace/guide/board.md +13 -6
- package/workspace/guide/claude-proposes.md +1 -1
- package/workspace/guide/home.md +2 -2
- package/workspace/guide/index.md +3 -3
- package/workspace/guide/intelligence-okr-goals.md +18 -7
- package/workspace/guide/lifecycle.md +2 -2
- package/workspace/guide/programs.md +2 -2
- package/workspace/guide/reports-needs-you.md +5 -5
- package/workspace/guide/settings.md +14 -11
- package/workspace/guide/workflows.md +3 -3
- package/workspace/guide/your-impact.md +1 -1
- package/workspace/lib/agent-team.js +262 -0
- package/workspace/lib/ai-cli.js +36 -4
- package/workspace/lib/bg-queue.js +9 -4
- package/workspace/lib/board-premium.js +6 -3
- package/workspace/lib/goal-source.js +77 -0
- package/workspace/lib/grill-runs.js +6 -3
- package/workspace/lib/headless.js +36 -4
- package/workspace/lib/idle-lab-engine.js +7 -6
- package/workspace/lib/initiative-premium.js +6 -3
- package/workspace/lib/insights-premium.js +1 -1
- package/workspace/lib/job-graph.js +191 -0
- package/workspace/lib/okr-goals.js +3 -0
- package/workspace/lib/orchestrator-keeprate.js +108 -7
- package/workspace/lib/pmos-verbs.js +3 -0
- package/workspace/lib/proposal-runs.js +8 -5
- package/workspace/lib/proposals.js +32 -2
- package/workspace/lib/report-slots.js +14 -10
- package/workspace/lib/routes-boards.js +2 -2
- package/workspace/lib/routes-insights-premium.js +11 -4
- package/workspace/lib/routes-premium-dashboards.js +20 -6
- package/workspace/lib/routes-proposals.js +10 -5
- package/workspace/lib/routes-your-move.js +6 -7
- package/workspace/lib/status-proof.js +45 -0
- package/workspace/lib/status-signal.js +4 -2
- package/workspace/lib/task-links.js +3 -1
- package/workspace/lib/team-cli.js +164 -0
- package/workspace/lib/team-runs.js +244 -0
- package/workspace/lib/verify-runs.js +112 -0
- package/workspace/okr-goals-ui-test.js +10 -13
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/premium-vw-backlog-test.js +2 -2
- package/workspace/premium-vw-jira-test.js +1 -1
- package/workspace/public/pm/bd-acts.js +14 -34
- package/workspace/public/pm/bd-ini-panel.js +38 -27
- package/workspace/public/pm/bd-publish.js +1 -1
- package/workspace/public/pm/bd-span.js +2 -1
- package/workspace/public/pm/bd-views.js +7 -5
- package/workspace/public/pm/c3-ini-ui.js +9 -7
- package/workspace/public/pm/cozy-board.css +17 -6
- package/workspace/public/pm/cozy-insights.css +18 -0
- package/workspace/public/pm/cozy-nav.js +2 -2
- package/workspace/public/pm/cozy-search.js +29 -7
- package/workspace/public/pm/cozy-settings.js +39 -20
- package/workspace/public/pm/home-data.js +3 -1
- package/workspace/public/pm/home-ini-model.js +15 -1
- package/workspace/public/pm/home-ini.js +9 -3
- package/workspace/public/pm/ini-tail.js +61 -0
- package/workspace/public/pm/ini-view-model.js +10 -7
- package/workspace/public/pm/premium-board.js +66 -99
- package/workspace/public/pm/premium-insights.js +95 -112
- package/workspace/public/pm/premium-report-intel.js +3 -2
- package/workspace/public/pm/readonly.js +4 -3
- package/workspace/public/pm/stage-chip.js +2 -1
- package/workspace/public/pm/status-proof.js +43 -0
- package/workspace/public/premium-board.html +10 -28
- package/workspace/public/premium-intelligence.html +7 -9
- package/workspace/server.js +35 -1
- package/workspace/sort-order-test.js +10 -8
- package/workspace/test-files.json +4 -2
- package/workspace/test-lists/agent-team.json +9 -0
- package/workspace/test-lists/job-graph.json +11 -0
- package/workspace/test-lists/status-proof.json +5 -0
- package/workspace/workflows-setup-test.js +3 -2
- package/workspace/public/premium-chat.html +0 -14
- package/workspace/public/premium-initiative.html +0 -15
- package/workspace/public/premium-work.html +0 -14
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
* General Theme (this device; the place menu's Theme row moved here, feedback batch 16 item 5), Viewer opens as a column or a popup
|
|
3
3
|
* (this device), Product (which products Home reads: the Products card), Your day (when the end-of-day card shows:
|
|
4
4
|
* time.workEnd, POST /api/settings), Your impact (impact.on, POST /api/settings; canvas GmP1Switch, batch 16 item 7: the one switch
|
|
5
|
-
* for Adler's leaf, the impact log and the weekly check; the page hears `pmos:impact`), Agents write to Jira (fixed: only after Commit)
|
|
5
|
+
* for Adler's leaf, the impact log and the weekly check; the page hears `pmos:impact`), Agents write to Jira (fixed: only after Commit).
|
|
6
|
+
* Extras at the bottom (UI grill U4, 2026-11-08: nine sections became five): "Adler ›" and "Jev and Laya ›" open each as a
|
|
7
|
+
* sub-panel inside General with the controls they had as sections, nothing removed (T.sub; ‹ goes back to General).
|
|
6
8
|
* Claude the Claude profile, the API key, and Sharpen prompts: suggestions after a reply, Sharpen as I type, the style and Your own rules
|
|
7
9
|
* (GET/POST /api/next-prompt/prefs; batch 26 item 2)
|
|
8
|
-
* Claude’s checks
|
|
10
|
+
* › Checks (a heading inside Claude since U4; it was the section Claude’s checks) Grill by itself (Full, Only at stage exits, Off) and the monthly credit for checks with what this month used (grill.mode,
|
|
9
11
|
* grill.cap, POST /api/settings; GET /api/grill; canvas GrillEntry). At the cap Claude pauses and says so once here.
|
|
10
|
-
* Jev and Laya the TypeSafe key, Laya on this computer and the per-repository switches (pm/cozy-jl.js; canvas JlA1Empty–JlA4Phone)
|
|
11
|
-
* Adler
|
|
12
|
+
* › Jev and Laya (a sub-panel of General › Extras since U4) the TypeSafe key, Laya on this computer and the per-repository switches (pm/cozy-jl.js; canvas JlA1Empty–JlA4Phone)
|
|
13
|
+
* › Adler (a sub-panel of General › Extras since U4) how much of Claude's face shows, Motion, Celebrations, Quiet after (adler.*, POST /api/settings; canvas AdM5, batch 16 item 2)
|
|
12
14
|
* › Dress for the day (adler.dress.*, canvas AsSet1, batch 18 item 8): the master switch, where you are, one switch per group,
|
|
13
15
|
* "More festivals" with one switch per day, big sports and your colours, exam season, your days, Wear now (pm/cozy-seasons.js).
|
|
14
16
|
* openSettings('dress') opens it straight away (the › in Adler's tap popover, AsSet2Tap).
|
|
@@ -18,8 +20,9 @@
|
|
|
18
20
|
* where a measured read applies (SrSee R3). Claude's failed background work and the Git sync failure are rows too. ↻ in the
|
|
19
21
|
* header reads every source (POST /api/sources/refresh-all); (i) says what PMOS reads and that it never posts. The switches
|
|
20
22
|
* (what PMOS reads on its own, the connectors your sessions have; GET and POST /api/proactive/settings) fold into one row.
|
|
21
|
-
* Workspaces the repositories PMOS works in (GET and POST /api/workspaces, POST /api/workspaces/forget; the folder is never touched)
|
|
22
|
-
*
|
|
23
|
+
* Workspaces the repositories PMOS works in (GET and POST /api/workspaces, POST /api/workspaces/forget; the folder is never touched),
|
|
24
|
+
* then the row "Workflows ›" (U4; it was a section of its own that linked out): the stages each kind of initiative goes
|
|
25
|
+
* through (pm/wf-page.js, D99). It opens WF_HREF.
|
|
23
26
|
* Updates the versions and Check now, Update, Restart to update (GET /api/kit/status, POST /api/kit/check | update | upgrade-app); opening it
|
|
24
27
|
* asks for the latest kit. Under it, what's new (design E, UpE): this week's summary lines, the newest kit at version level,
|
|
25
28
|
* then "Earlier this week" as one flat list of Claude's plain-language stories (a blue dot New, an amber dot Fixed, no dot
|
|
@@ -30,7 +33,8 @@
|
|
|
30
33
|
* The card at the bottom of General says when an update is ready. While a source needs you (lib/source-heal.js), an amber box at the top of every other section names
|
|
31
34
|
* it with its one action and what Claude tried, and the place menu opens Settings at Connectors. Every write is the PM's press (pmPost carries the launch nonce).
|
|
32
35
|
* PMOS reads the sources and never posts to them.
|
|
33
|
-
* openSettings(section?)
|
|
36
|
+
* openSettings(section?): general, claude, connectors, workspaces, updates; the old section names still land where their controls are now
|
|
37
|
+
* (checks → Claude, scrolled to Checks; adler and jl → General's sub-panel; dress → Adler › Dress for the day; workflows → Workspaces). */
|
|
34
38
|
import { mountClaudeSetup } from './cozy-claude-setup.js';
|
|
35
39
|
import * as JL from './cozy-jl.js';
|
|
36
40
|
import { pmGet, pmPost, pressFetch } from './http.js';
|
|
@@ -45,11 +49,12 @@ async function pmSend(method, path, body) {
|
|
|
45
49
|
try { const res = await pressFetch(path, { method, ...(body === undefined ? {} : { body: JSON.stringify(body) }) }); const out = await res.json(); if (out && typeof out === 'object' && !res.ok) out.status = res.status; return out; }
|
|
46
50
|
catch (e) { return { ok: false, error: 'could not reach the workspace server — ' + ((e && e.message) || String(e)) }; }
|
|
47
51
|
}
|
|
48
|
-
const SECTIONS = [['general', 'General'], ['claude', 'Claude'], ['
|
|
49
|
-
const
|
|
52
|
+
const SECTIONS = [['general', 'General'], ['claude', 'Claude'], ['connectors', 'Connectors'], ['workspaces', 'Workspaces'], ['updates', 'Updates']];
|
|
53
|
+
const SUBS = { adler: 'Adler', jl: 'Jev and Laya' }; // General › Extras: each opens as a sub-panel of General (U4)
|
|
54
|
+
const WF_HREF = '/premium-workflows.html'; // Workspaces › Workflows: the Workflows panel's address
|
|
50
55
|
const SRC = { calendar: 'Calendar', wispr: 'Wispr Flow', mail: 'Mail', slack: 'Slack', jira: 'Jira', confluence: 'Confluence', github: 'GitHub', drive: 'Google Drive', figma: 'Figma', website: 'Your websites' };
|
|
51
56
|
const VIEWER_KEY = 'pmos.cz.viewer';
|
|
52
|
-
const T = { el: null, sec: 'general', ws: null, st: {}, src: null, con: {}, conn: [], set: null, prods: null, msg: '', busy: false, phase: '', say: '', back: null, fresh: null, reading: '', note: {}, info: false, fold: false, dress: false, more: false, bday: false, dset: {}, wkOpen: new Set(), wkMore: new Set(), arc: false };
|
|
57
|
+
const T = { el: null, sec: 'general', sub: '', ws: null, st: {}, src: null, con: {}, conn: [], set: null, prods: null, msg: '', busy: false, phase: '', say: '', back: null, fresh: null, reading: '', note: {}, info: false, fold: false, dress: false, more: false, bday: false, dset: {}, wkOpen: new Set(), wkMore: new Set(), arc: false };
|
|
53
58
|
const cmpVer = (a, b) => { const x = String(a || '0').split('-')[0].split('.').map(Number), y = String(b || '0').split('-')[0].split('.').map(Number); for (let i = 0; i < 3; i++) if ((x[i] || 0) !== (y[i] || 0)) return (x[i] || 0) < (y[i] || 0) ? -1 : 1; return 0; };
|
|
54
59
|
const home = () => (T.ws && T.ws[0] ? T.st[T.ws[0].id] : null);
|
|
55
60
|
const latest = () => { const s = home(); return (s && (s.latest || (s.lastCheck && s.lastCheck.latest))) || null; };
|
|
@@ -73,6 +78,8 @@ const trow = (title, sub, right) => `<div class="ev-trow"><div class="ev-tx"><b>
|
|
|
73
78
|
const sw = (on, attrs, label) => `<button type="button" class="ev-sw" role="switch" aria-checked="${!!on}" aria-label="${esc(label)}" ${attrs}>${on ? 'On' : 'Off'}</button>`;
|
|
74
79
|
|
|
75
80
|
function general() {
|
|
81
|
+
if (T.sub === 'adler') return T.dress ? dressSec() : subHead('adler') + adlerSec();
|
|
82
|
+
if (T.sub === 'jl') return subHead('jl') + JL.html();
|
|
76
83
|
const theme = (() => { const t = store.get('pmos.c3.theme'); return t === 'light' || t === 'dark' ? t : 'auto'; })();
|
|
77
84
|
const vw = store.get(VIEWER_KEY) === 'popup' ? 'popup' : 'column';
|
|
78
85
|
const P = T.prods, on = P ? P.filter((x) => x.on) : null;
|
|
@@ -89,8 +96,14 @@ function general() {
|
|
|
89
96
|
+ trow('Your day', 'When the end-of-day card shows', `<label class="ev-vh" for="evDay">Your day ends at</label><select id="evDay" class="ev-inp" data-ev-day>${hours.map((h) => `<option value="${h}"${h === end ? ' selected' : ''}>${pad(h)}:00</option>`).join('')}</select>`)
|
|
90
97
|
+ trow('Your impact', 'Adler’s sprout and your impact log. Only you see it. Nothing leaves PMOS.', sw(impactOn(), 'data-ev-impact', 'Your impact'))
|
|
91
98
|
+ trow('Agents write to Jira', 'Only after you press Commit. Never on their own.', (ready() ? '' : adFace('needs-you', 24)) + '<span class="ev-pill ok">Fixed</span>')
|
|
92
|
-
+ upd
|
|
99
|
+
+ upd
|
|
100
|
+
+ '<h4>Extras</h4>'
|
|
101
|
+
+ trow('Adler', 'How much of Claude’s face shows, motion, celebrations, quiet hours and Dress for the day', subBtn('adler'))
|
|
102
|
+
+ trow('Jev and Laya', 'The TypeSafe key, Laya on this computer and the repositories it reads', subBtn('jl'));
|
|
93
103
|
}
|
|
104
|
+
/* General › Extras (U4): the row's › opens the sub-panel; its ‹ comes back to General */
|
|
105
|
+
const subBtn = (k) => `<button type="button" class="ev-ib" data-ev-sub="${k}" aria-label="${esc(SUBS[k])}" title="${esc(SUBS[k])}">${svg(CHEV, 18)}</button>`;
|
|
106
|
+
const subHead = (k) => `<div class="ev-dr-hd"><button type="button" class="ev-ib" data-ev-sub="" aria-label="Back to General" title="Back">${svg(BACK, 18)}</button><h4 class="ev-grow">${esc(SUBS[k])}</h4></div>`;
|
|
94
107
|
/* Your impact (GmP1Switch): on by default; off hides every impact surface and stops Claude's daily read */
|
|
95
108
|
function impactOn() { const x = T.set && Array.isArray(T.set.settings) ? T.set.settings.find((y) => y.key === 'impact.on') : null; return x ? x.value !== false : true; }
|
|
96
109
|
/** One Dress for the day press: POST /api/settings, keep the row, and tell the page (the event adler:dress) so Adler changes at once. */
|
|
@@ -106,7 +119,6 @@ async function saveDress(key, value, said = 'Saved.') {
|
|
|
106
119
|
}
|
|
107
120
|
/* Settings > Adler (AdM5): four choices, each saved for this computer the moment it is pressed */
|
|
108
121
|
function adlerSec() {
|
|
109
|
-
if (T.dress) return dressSec();
|
|
110
122
|
const P = AD.prefs();
|
|
111
123
|
return `<div class="ev-ad-hd">${AD.adler('handled', 48)}<p class="ev-small ev-mut">Adler is how Claude shows its mood in PMOS. You choose how much of him you see.</p></div>`
|
|
112
124
|
+ trow('How much Adler', 'Face only keeps his face where Claude speaks and drops the scenes. Off shows the plain mood dot.', seg('How much Adler', 'adler.amount', P['adler.amount'], [['full', 'Full'], ['face', 'Face only'], ['off', 'Off']]))
|
|
@@ -218,7 +230,8 @@ function workspaces() {
|
|
|
218
230
|
if (T.ws === null) return '<p class="ev-small ev-mut">Reading the repositories.</p>';
|
|
219
231
|
return '<p class="ev-small ev-mut">A workspace is one repository PMOS works in. Removing one forgets the address only; the folder is not deleted.</p>'
|
|
220
232
|
+ T.ws.filter((x) => !x.linked).map((x) => trow(x.label || x.name || x.id, (x.root || '') + (x.home ? ' · home' : ''), x.home ? '<span class="ev-pill">Home</span>' : `<button type="button" class="ev-btn sm" data-ev-rm="${esc(x.id)}">Remove</button>`)).join('')
|
|
221
|
-
+ '<div class="ev-add"><label class="ev-vh" for="evRoot">Folder path of a repository</label><input id="evRoot" class="ev-inp" placeholder="Folder path of a repository"><button type="button" class="ev-btn pri" data-ev-add>Add</button></div>'
|
|
233
|
+
+ '<div class="ev-add"><label class="ev-vh" for="evRoot">Folder path of a repository</label><input id="evRoot" class="ev-inp" placeholder="Folder path of a repository"><button type="button" class="ev-btn pri" data-ev-add>Add</button></div>'
|
|
234
|
+
+ trow('Workflows', 'The stages each kind of initiative goes through', `<a class="ev-ib" href="${WF_HREF}" data-ev-wf aria-label="Workflows" title="Workflows">${svg(CHEV, 18)}</a>`);
|
|
222
235
|
}
|
|
223
236
|
function updates() {
|
|
224
237
|
const s = home();
|
|
@@ -285,7 +298,8 @@ function claudeSec() {
|
|
|
285
298
|
return '<h4>Claude login and profile</h4><div data-claude-setup></div>'
|
|
286
299
|
+ trow('API key', keySub, keyRight)
|
|
287
300
|
+ (k.present && C.off ? trow('Runs on the API', 'Off: PMOS_GRILL_API is off in the environment.', '<span class="ev-pill">Off</span>') : '')
|
|
288
|
-
+ sharpenRows()
|
|
301
|
+
+ sharpenRows()
|
|
302
|
+
+ '<h4 id="evChecks">Checks</h4>' + checksSec(); // U4: the section Claude’s checks folded in here
|
|
289
303
|
}
|
|
290
304
|
/* Settings › Claude › Sharpen prompts (batch 26 item 2; pm/next-prompt-ui.js, lib/routes-next-prompt.js): the suggestions after a reply, Sharpen as I
|
|
291
305
|
* type (on by default: both run as a background `claude -p` in the PM's own Claude session, Wawan 2026-11-04), the style, and Your own rules.
|
|
@@ -329,7 +343,9 @@ function checksSec() {
|
|
|
329
343
|
+ trow('Monthly credit for checks', C.paused ? 'Paused at the limit this month. Claude starts again next month, or when you raise it.' : 'At the limit Claude pauses and says so once. It never charges beyond it.', seg('Monthly credit for checks', 'grill.cap', C.cap, caps.map((v) => [v, usd(v)])))
|
|
330
344
|
+ `<div class="ev-trow ev-gcap"><span class="ev-small"><b>${esc(usd(C.spent))}</b> of ${esc(usd(C.cap))} used this month</span><span class="ev-gbar" role="img" aria-label="${used}% of the monthly credit used"><i style="width:${used}%"></i></span></div>`;
|
|
331
345
|
}
|
|
332
|
-
const BODY = { general, claude: claudeSec,
|
|
346
|
+
const BODY = { general, claude: claudeSec, connectors, workspaces, updates };
|
|
347
|
+
// the old section names (deep links, other pages' calls): where their controls are now (U4)
|
|
348
|
+
const MOVED = { checks: ['claude', ''], adler: ['general', 'adler'], jl: ['general', 'jl'], dress: ['general', 'adler'], workflows: ['workspaces', ''] };
|
|
333
349
|
let disposeClaudeSetup = null;
|
|
334
350
|
function draw() {
|
|
335
351
|
const el = T.el; if (!el || el.hidden) return;
|
|
@@ -337,7 +353,7 @@ function draw() {
|
|
|
337
353
|
const ae = document.activeElement, had = ae && el.contains(ae), key = had ? [...ae.attributes].find((a) => a.name.startsWith('data-ev-')) : null;
|
|
338
354
|
const n = { workspaces: T.ws ? T.ws.filter((x) => !x.linked).length : '', updates: ready() ? '<span class="ev-pill y">1</span>' : '' };
|
|
339
355
|
const stale = T.fresh && T.fresh.ok ? bannerOf(T.fresh.sources) : null;
|
|
340
|
-
el.querySelector('.ev-st-nav').innerHTML = '<h2 class="ev-h2">Settings</h2>' + SECTIONS.map(([k, l]) =>
|
|
356
|
+
el.querySelector('.ev-st-nav').innerHTML = '<h2 class="ev-h2">Settings</h2>' + SECTIONS.map(([k, l]) => `<a href="#${k}" class="ev-mi" data-ev-sec="${k}"${T.sec === k ? ' aria-current="page"' : ''}>${esc(l)}${k === 'connectors' && stale ? '<i class="ev-dot risk" aria-label="A source needs you" role="img"></i>' : ''}${n[k] !== undefined && n[k] !== '' ? `<span class="ev-k">${typeof n[k] === 'number' ? n[k] : n[k]}</span>` : ''}</a>`).join('');
|
|
341
357
|
const label = (SECTIONS.find((x) => x[0] === T.sec) || SECTIONS[0])[1];
|
|
342
358
|
const all = T.sec === 'connectors' ? `<button type="button" class="ev-ib" data-ev-info aria-expanded="${!!T.info}" aria-controls="evConInfo" aria-label="What PMOS reads and what it never does" title="What PMOS reads and what it never does">${svg(INFO_I, 18)}</button>`
|
|
343
359
|
+ `<button type="button" class="ev-ib" data-ev-readall aria-label="Read every source again" title="Read all again"${T.reading ? ' disabled' : ''}>${svg(RD, 18)}</button>` : '';
|
|
@@ -382,14 +398,15 @@ function mount() {
|
|
|
382
398
|
}
|
|
383
399
|
async function press(e) {
|
|
384
400
|
const t = e.target.closest('a[data-ev-sec], button'); if (!t) return;
|
|
385
|
-
if (t.dataset.evSec) { e.preventDefault(); T.sec = t.dataset.evSec; T.msg = ''; T.dress = false; draw(); const f = T.el.querySelector(`[data-ev-sec="${T.sec}"]`); if (f) f.focus(); openCheck(); return; }
|
|
401
|
+
if (t.dataset.evSec) { e.preventDefault(); const m = MOVED[t.dataset.evSec]; T.sec = m ? m[0] : t.dataset.evSec; T.sub = m ? m[1] : ''; T.msg = ''; T.dress = false; draw(); const f = T.el.querySelector(`[data-ev-sec="${T.sec}"]`); if (f) f.focus(); openCheck(); return; }
|
|
386
402
|
if ('evClose' in t.dataset) { closeSettings(); return; }
|
|
387
403
|
if (t.dataset.evWk) { const k = t.dataset.evWk; if (T.wkOpen.has(k)) T.wkOpen.delete(k); else T.wkOpen.add(k); draw(); return; }
|
|
388
404
|
if ('evArc' in t.dataset) { T.arc = !T.arc; draw(); return; }
|
|
389
405
|
if ('evInfo' in t.dataset) { T.info = !T.info; draw(); return; }
|
|
390
406
|
if ('evFold' in t.dataset) { T.fold = !T.fold; draw(); return; }
|
|
391
407
|
if (t.dataset.evMore) { T.wkMore.add(t.dataset.evMore); draw(); return; }
|
|
392
|
-
if (t.dataset.evGo) { T.sec = t.dataset.evGo; draw(); return; }
|
|
408
|
+
if (t.dataset.evGo) { T.sec = t.dataset.evGo; T.sub = ''; draw(); return; }
|
|
409
|
+
if (t.dataset.evSub !== undefined) { const k = t.dataset.evSub, was = T.sub; T.sub = k; T.dress = false; T.more = false; T.bday = false; T.msg = ''; draw(); const f = T.el.querySelector(k ? '[data-ev-sub=""]' : `[data-ev-sub="${was}"]`); if (f) f.focus(); return; }
|
|
393
410
|
if (t.dataset.evSeg === 'theme') { const M = await import('./cozy-nav.js'); M.setTheme(t.dataset.v); draw(); return; }
|
|
394
411
|
if (t.dataset.evSeg && t.dataset.evSeg.startsWith('grill.')) {
|
|
395
412
|
const key = t.dataset.evSeg, value = key === 'grill.cap' ? Number(t.dataset.v) : t.dataset.v;
|
|
@@ -538,12 +555,14 @@ async function load() {
|
|
|
538
555
|
}
|
|
539
556
|
export function openSettings(section) {
|
|
540
557
|
const el = mount();
|
|
541
|
-
|
|
542
|
-
|
|
558
|
+
const m = MOVED[section];
|
|
559
|
+
if (m) { T.sec = m[0]; T.sub = m[1]; T.dress = section === 'dress'; } else if (section && BODY[section]) { T.sec = section; T.sub = ''; T.dress = false; }
|
|
560
|
+
else if (el.hidden) { T.sec = 'general'; T.sub = ''; T.dress = false; } // a fresh open with no section opens on General (R2), not on the section of the last visit
|
|
543
561
|
if (el.hidden) { const ae = document.activeElement; T.back = ae && ae !== document.body ? ae : null; T.ws = null; T.src = null; T.msg = ''; T.phase = ''; T.auto = false; T.wkOpen = new Set(); T.wkMore = new Set(); T.arc = false; T.fresh = null; T.note = {}; T.info = false; T.fold = false; T.dset = {}; T.cl = null; T.gr = null; T.np = null; JL.reset(); }
|
|
544
562
|
el.hidden = false; document.getElementById('evStScrim').hidden = false; el.setAttribute('data-esc-layer', '');
|
|
545
563
|
draw();
|
|
546
564
|
const f = el.querySelector('[aria-current="page"]'); if (f) f.focus();
|
|
565
|
+
if (section === 'checks') { const h = el.querySelector('#evChecks'); if (h && h.scrollIntoView) h.scrollIntoView({ block: 'start' }); }
|
|
547
566
|
load();
|
|
548
567
|
return el;
|
|
549
568
|
}
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* roleOf(s, roles) an agent's role name and initial for a session ("Claude" when no skill names one)
|
|
14
14
|
* D is { brief, board, sessions, desk, trail, today, schedules, now }: the answers of GET /api/briefing-premium, /api/board-premium,
|
|
15
15
|
* /api/sessions, /api/home-desk, /api/board-trail, /api/brief-page and /api/schedules. A part that did not answer is left out, never guessed. */
|
|
16
|
+
import { provenStatus } from './status-proof.js'; // T3: a status renders only with its source and read time
|
|
16
17
|
|
|
17
18
|
export const ICON = {
|
|
18
19
|
chat: 'M4 5h16v11H9l-5 4z', doc: 'M7 3h7l5 5v13H7zM14 3v5h5', goal: 'M5 21V4M5 4h12l-2 4 2 4H5',
|
|
@@ -146,7 +147,8 @@ function iniRow(D, r) {
|
|
|
146
147
|
export const OPEN = (r) => !(r.acts && (r.acts.archived || r.acts.life === 'done' || r.acts.life === 'cancelled'));
|
|
147
148
|
|
|
148
149
|
/* ── the product ── */
|
|
149
|
-
|
|
150
|
+
// T3 (status-proof.js): a claim the row cannot prove counts as No signal: never on track, never at risk
|
|
151
|
+
const statusOf = (r) => { const s = String(r.status || '').toLowerCase(); return /^(stalled|blocked)/.test(s) ? s : provenStatus(r); };
|
|
150
152
|
const risky = (r) => r.late || /risk|late|stalled|blocked/.test(statusOf(r));
|
|
151
153
|
/* workspace grill W2: on track only from a read; a row with nothing read (status 'no signal', or no status at all) is never counted as on track */
|
|
152
154
|
const onTrack = (r) => !risky(r) && (statusOf(r) === 'on track' || statusOf(r) === 'done');
|
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
* InTasks, InDocs, InPhone). home-ini.js draws what these return; a node test imports them.
|
|
3
3
|
*
|
|
4
4
|
* moveModel(h, M, L, now) the stage move: the exit items of the stage, the next and previous stage, whether it can move by itself
|
|
5
|
+
* autoFires(seen, id, mv) whether a move by itself fires on this draw: only when the page saw an open exit item close, never on a read
|
|
5
6
|
* taskRows(M, L, now) the initiative's tasks with the stage each belongs to, its owner and its date
|
|
6
7
|
* docRows(M) the core documents with their kind, phase and whether they need a look
|
|
7
8
|
* docGroups(rows, stage, o) the Documents card's groups: by stage (now, earlier, Later), by kind, or none; o.filter narrows them
|
|
8
9
|
* docChips(rows) the filter chips: All, Needs a look, then one per kind that is there
|
|
9
10
|
*
|
|
10
11
|
* THE RULES (canvas InStage): a stage moves by itself only when every exit item is done, never into a milestone (Deliver, Evaluate), never when the
|
|
11
|
-
* PM turned "Moves on by itself" off,
|
|
12
|
+
* PM turned "Moves on by itself" off, never out of a stage the PM undid a move by itself out of, and never on a read: only when the page saw
|
|
13
|
+
* the last open item close. Every figure comes from a record. */
|
|
12
14
|
import { STEPS, stageKey } from './premium-initiative-head.js';
|
|
13
15
|
|
|
14
16
|
const MON = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
|
@@ -54,6 +56,18 @@ export function moveModel(h, M, L, now = Date.now()) {
|
|
|
54
56
|
now,
|
|
55
57
|
};
|
|
56
58
|
}
|
|
59
|
+
/** Whether a move by itself fires now (bug 2026-11-08: opening Tender new CIAM moved it Discover → Plan → Prioritize → Build over three
|
|
60
|
+
* opens). Opening or redrawing an initiative is a read, and a read never writes a stage. A stage moves by itself only on a change this page
|
|
61
|
+
* saw: an earlier draw of the SAME stage had an open exit item, and now every one is done. A stage that is already all done when the page
|
|
62
|
+
* first draws it waits for the PM. This also covers Product feature, whose exit items are the engine's checks and do not change when the
|
|
63
|
+
* stage moves, so each new stage first draws all done.
|
|
64
|
+
* seen a Map: initiative id → the last { stage, open } this page drew. autoFires records the draw in it.
|
|
65
|
+
* mv moveModel's answer for this draw. */
|
|
66
|
+
export function autoFires(seen, id, mv) {
|
|
67
|
+
const before = seen.get(id);
|
|
68
|
+
seen.set(id, { stage: mv.cur, open: mv.open.length });
|
|
69
|
+
return !!(mv.autoReady && before && before.stage === mv.cur && before.open > 0);
|
|
70
|
+
}
|
|
57
71
|
/** The reasons Back offers (InStage); "Other" asks for words. */
|
|
58
72
|
export const BACK_REASONS = ['The PRD changed', 'New research', 'Scope was wrong', 'Other'];
|
|
59
73
|
/** The why a move records: the reason chip and the words, or the note. Empty when nothing was said. */
|
|
@@ -33,6 +33,7 @@ import * as SC from './home-stage-card.js';
|
|
|
33
33
|
import { viewHtml, wireView } from './ini-view.js'; // the one initiative view, the Board's panel's own renderer
|
|
34
34
|
import { ensureCss as ensureStepsCss } from './cozy-steps.js'; // stage card D: the card's last node and the move sheet's words // D99: the initiative's own workflow (Change picker, switch, Won't do, Archive)
|
|
35
35
|
import * as DB from './dash-view.js'; // the ready-made Dashboard view (batch 17 item 1)
|
|
36
|
+
import * as TL from './ini-tail.js'; // under Linked, as the Board draws it (UI grill U1): drafted tickets, the PRD drift, Your impact
|
|
36
37
|
|
|
37
38
|
const esc = (s) => String(s == null ? '' : s).replace(/[&<>"']/g, (c) => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }[c]));
|
|
38
39
|
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>`;
|
|
@@ -42,7 +43,7 @@ const I = {
|
|
|
42
43
|
};
|
|
43
44
|
const PHONE = 760;
|
|
44
45
|
const isPhone = () => innerWidth <= PHONE;
|
|
45
|
-
const X = { ctx: null, L: new Map(), reading: new Set(), tried: new Set(), view: 'page', doc: { by: 'stage', filter: 'all', more: new Set() } };
|
|
46
|
+
const X = { ctx: null, L: new Map(), reading: new Set(), tried: new Set(), seen: new Map(), view: 'page', doc: { by: 'stage', filter: 'all', more: new Set() } };
|
|
46
47
|
|
|
47
48
|
/* ── reading the layout record ── */
|
|
48
49
|
const curM = () => { const S = X.ctx && X.ctx.S; return S && S.ini && S.ini !== 'product' && S.IMid === S.ini ? S.IM : null; };
|
|
@@ -121,7 +122,9 @@ async function doMove(id, M, to, why, o = {}) {
|
|
|
121
122
|
}
|
|
122
123
|
function autoCheck(id, M, mv) {
|
|
123
124
|
const L = Lof(id);
|
|
124
|
-
|
|
125
|
+
// a read never writes a stage: only an exit item this page saw close moves it (MD.autoFires). Record the draw before the layout is read too
|
|
126
|
+
const fires = MD.autoFires(X.seen, id, mv);
|
|
127
|
+
if (!L.read || !fires) return;
|
|
125
128
|
const k = id; // at most one move by itself per initiative while the page is open: a chain of moves would read as drift
|
|
126
129
|
if (X.tried.has(k)) return;
|
|
127
130
|
X.tried.add(k);
|
|
@@ -233,7 +236,8 @@ function pageHtml(id, M) {
|
|
|
233
236
|
const talk = isPhone() ? `<button type="button" class="hi-talk" data-hi-talk>Message Claude about ${esc(X.ctx.iniTitle(id))}</button>` : '';
|
|
234
237
|
return `<div class="hi-v hi-page" data-hi-v="page">${WF.endedHtml(rowOf(id))}`
|
|
235
238
|
+ viewHtml(v, { add: true, adding: ADDING === id, addHint: ADDING === id && ADD_DATES ? ADD_DATES.start + ' to ' + ADD_DATES.due : '', hold: true, next: !!v.stage.next, openTask: true, quick: true, docs: docs.length ? { n: docs.length } : null, wf: !(M.acts && M.acts.self) && !rowOf(id).ended,
|
|
236
|
-
person: !!X.ctx.addPerson, stagePick: true, planDates: !!X.ctx.askIn, jira: !!((X.ctx.S.D && X.ctx.S.D.board) || {}).jira
|
|
239
|
+
person: !!X.ctx.addPerson, stagePick: true, planDates: !!X.ctx.askIn, jira: !!((X.ctx.S.D && X.ctx.S.D.board) || {}).jira,
|
|
240
|
+
tail: TL.tailHtml({ ...rowOf(id), trail: (((X.ctx.S.D || {}).trail || {}).items || {})[id] || rowOf(id).trail || null }, { VW: X.ctx.VW, today: v.today }) })
|
|
237
241
|
+ `${talk}<p class="hi-small" role="status" id="ovMsg"></p></div>`;
|
|
238
242
|
}
|
|
239
243
|
/** A hold's card from the stage card (batch 11 item 21): its words and the return date, which writes an on-hold line with the new date
|
|
@@ -661,6 +665,7 @@ function pagePress(t, id, M) {
|
|
|
661
665
|
if ('wfBack' in d) { WF.backToTriage(wfUi(), id); return true; }
|
|
662
666
|
if ('hmDone' in d) { C.S.doneOpen = !C.S.doneOpen; redrawView(); return true; }
|
|
663
667
|
if ('hiTalk' in d) { C.talk(id); return true; }
|
|
668
|
+
if (d.xb === 'drift') { if (C.askIn) C.askIn(id, d.q || ''); return true; } // Jira differs from the PRD (pm/ini-tail.js): the question, typed in this chat
|
|
664
669
|
if ('hiMove' in d) { const mv = mvOf(id, M); if (!mv.canMove) return true; if (mv.open.length) popMove(t, id, M, mv); else doMove(id, M, mv.next, mv.allDone ? 'Moved by hand: every exit item is done.' : 'Moved by hand'); return true; }
|
|
665
670
|
if ('hiBack' in d) { const mv = mvOf(id, M); if (mv.canBack) popBack(t, id, M, mv); return true; }
|
|
666
671
|
if ('hiAddtask' in d) { iniAddTask(); return true; }
|
|
@@ -681,6 +686,7 @@ export function mountIni(ctx) {
|
|
|
681
686
|
ensurePopCss(); // before home-ini.css, so its phone rules win
|
|
682
687
|
if (!document.querySelector('link[data-hi-css]')) { const l = document.createElement('link'); l.rel = 'stylesheet'; l.href = new URL('./home-ini.css', import.meta.url).href; l.dataset.hiCss = ''; document.head.appendChild(l); }
|
|
683
688
|
ensureStepsCss(); // the stage card's step list (cozy-steps.css), before the first draw
|
|
689
|
+
TL.readImpact(() => redrawView()); // Your impact under a delivered milestone (pm/ini-tail.js), as on the Board
|
|
684
690
|
if (!document.querySelector('link[data-tk-css]')) { const l = document.createElement('link'); l.rel = 'stylesheet'; l.href = new URL('./tk-tasks.css', import.meta.url).href; l.dataset.tkCss = ''; document.head.appendChild(l); }
|
|
685
691
|
ctx.VW.onChange((v) => { if (!v.open || !/^ov:/.test(v.id || '')) closePop(); });
|
|
686
692
|
return X;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/* pm/ini-tail.js — what the one initiative view (pm/ini-view.js) draws under Documents and Linked, the same on the Board and on Home
|
|
2
|
+
* (UI grill U1: one initiative view). Until 8 Nov only the Board's panel drew these three parts; Home's page left them out.
|
|
3
|
+
*
|
|
4
|
+
* tailHtml(r, o) the parts, as the view's o.tail: "Drafted in PMOS" (tickets drafted here and not pushed to Jira yet), "Jira differs from
|
|
5
|
+
* the PRD" (pushed tickets whose PRD changed after the push) and, under a milestone delivered in the last 30 days, the
|
|
6
|
+
* people who made it happen (Your impact, pm/impact.js; private, read only). r: the board row with its trail (the Board's
|
|
7
|
+
* r.trail, Home's trail item). o: { VW (the Viewer: its czSections), today (iso day) }. '' when the row has none of them.
|
|
8
|
+
* driftHtml(keys) the drift part's words and its one press, data-xb="drift" with the question in data-q (the host opens the chat with it)
|
|
9
|
+
* jiraAgo(iso) "Jira · 5 min ago", the freshness words beside Jira's tickets
|
|
10
|
+
* readImpact(fn) reads this week's impact once (pm/impact.js readWeek), then fn() so the host draws again
|
|
11
|
+
* Zero is silence: a part with nothing on record draws nothing. */
|
|
12
|
+
import * as IM from './impact.js';
|
|
13
|
+
|
|
14
|
+
// the row look of the Board's panels (pm/cozy-xv.css), loaded here so Home's page draws the same; cozy-xv.js itself is not imported, as it
|
|
15
|
+
// loads premium-shell.js, whose start reads ?session= for the old dialog
|
|
16
|
+
const CSS = new URL('./cozy-xv.css', import.meta.url).href;
|
|
17
|
+
if (typeof document !== 'undefined' && !document.querySelector(`link[href="${CSS}"]`)) {
|
|
18
|
+
const l = document.createElement('link'); l.rel = 'stylesheet'; l.href = CSS; document.head.appendChild(l);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const esc = (s) => String(s == null ? '' : s).replace(/[&<>"']/g, (c) => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }[c]));
|
|
22
|
+
|
|
23
|
+
const lr = (o) => `<div class="xv-lr"><span class="xv-mk${o.mk ? ' ' + o.mk : ''}" aria-hidden="true"></span><span class="w"><b>${o.title}</b>${o.sub ? `<span>${esc(o.sub)}</span>` : ''}</span></div>`;
|
|
24
|
+
function draftedHtml(d, g) {
|
|
25
|
+
return d.slice(0, 8).map((x) => lr({ mk: x.waiting ? 'you' : '', title: (x.id ? `<em>${esc(x.id)}</em> ` : '') + esc(x.summary || ''), sub: 'not in Jira' })).join('')
|
|
26
|
+
+ (d.length > 8 ? lr({ title: esc(d.length - 8 + ' more drafted') }) : '')
|
|
27
|
+
+ `<p class="xv-q">They go to Jira only through your Commit${g.open === false && g.why ? '. The Commit is closed: ' + esc(g.why) : ''}.</p>`;
|
|
28
|
+
}
|
|
29
|
+
export const driftQ = (keys) => 'What changed in the PRD after ' + keys.join(', ') + ' ' + (keys.length === 1 ? 'was' : 'were') + ' pushed?';
|
|
30
|
+
export const driftHtml = (keys) => `<p>${esc(keys.join(', '))} ${keys.length === 1 ? 'was' : 'were'} pushed from an older PRD. Review ${keys.length === 1 ? 'it' : 'them'} before the next push.</p>`
|
|
31
|
+
+ `<div><button type="button" class="xv-mini" data-xb="drift" data-q="${esc(driftQ(keys))}">Discuss the change in chat</button></div>`;
|
|
32
|
+
|
|
33
|
+
/** The sections only the board's trail holds: tickets drafted in PMOS and pushed tickets that differ from the PRD. */
|
|
34
|
+
export function sections(trail) {
|
|
35
|
+
const it = trail || null, S = [];
|
|
36
|
+
const d = ((it && it.drafted) || []).filter((x) => !x.key);
|
|
37
|
+
if (d.length) S.push({ id: 'drafted', title: 'Drafted in PMOS', count: d.length, render: () => draftedHtml(d, (it && it.gate) || {}) });
|
|
38
|
+
const dr = (it && it.drift) || [];
|
|
39
|
+
if (dr.length) S.push({ id: 'drift', title: 'Jira differs from the PRD', count: dr.length, render: () => driftHtml(dr) });
|
|
40
|
+
return S;
|
|
41
|
+
}
|
|
42
|
+
export function tailHtml(r, o = {}) {
|
|
43
|
+
if (!r) return '';
|
|
44
|
+
const S = sections(r.trail);
|
|
45
|
+
const secs = S.length && o.VW && o.VW.czSections ? o.VW.czSections(S, { key: 'board' }) : '';
|
|
46
|
+
return secs + IM.madeHtml(IM.madeOf(r, o.today || new Date().toISOString().slice(0, 10)));
|
|
47
|
+
}
|
|
48
|
+
/** "Jira · 5 min ago": the freshness line the view puts beside Jira's tickets, the same words on both pages. */
|
|
49
|
+
export function jiraAgo(iso) {
|
|
50
|
+
const t = Date.parse(iso || ''); if (!t) return '';
|
|
51
|
+
const m = Math.max(0, Math.round((Date.now() - t) / 60000));
|
|
52
|
+
return 'Jira · ' + (m < 1 ? 'just now' : m < 60 ? m + ' min ago' : m < 60 * 36 ? Math.round(m / 60) + ' h ago' : Math.round(m / 1440) + ' days ago');
|
|
53
|
+
}
|
|
54
|
+
let read = null;
|
|
55
|
+
export function readImpact(fn) {
|
|
56
|
+
if (!read) {
|
|
57
|
+
read = IM.readWeek().catch(() => {});
|
|
58
|
+
if (typeof window !== 'undefined') window.addEventListener('pmos:impact', () => { setTimeout(() => IM.readWeek().then(() => fn && fn()).catch(() => {}), 0); });
|
|
59
|
+
}
|
|
60
|
+
read.then(() => fn && fn());
|
|
61
|
+
}
|
|
@@ -39,6 +39,7 @@ import { ticketGroups } from './tk-model.js'; // the drafted Jira tickets by e
|
|
|
39
39
|
import { stageSource } from './stage-chip.js'; // W1: what set the one stage, and when it was read
|
|
40
40
|
const endWord = (r) => (r && r.oneStage && ['shipped', 'on-hold', 'cancelled'].includes(r.oneStage.stage) ? r.oneStage.label : '');
|
|
41
41
|
import { lineOf } from './stage-line.js'; // the stage card's one line (batch 11 item 21)
|
|
42
|
+
import { provenStatus, fromLine, NO_SIGNAL } from './status-proof.js'; // T3: a status renders only with its source and read time
|
|
42
43
|
|
|
43
44
|
const MON = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
|
44
45
|
const CLOSED = new Set(['Done', "Won't do", 'Archived']);
|
|
@@ -102,18 +103,20 @@ export function wbsOf(title) {
|
|
|
102
103
|
/* ── the status ── */
|
|
103
104
|
export function statusOf(r, grill, fmt) {
|
|
104
105
|
const t = r.track || {};
|
|
106
|
+
// T3 (status-proof.js): On track, At risk and Done render only with the source and read time behind them; else No signal
|
|
107
|
+
const ps = provenStatus(r), from = fromLine(r.signal);
|
|
105
108
|
if (r.acts && r.acts.life === 'hold') return { tone: 'q', text: 'On hold' + (r.acts.back ? ' · back ' + r.acts.back : '') };
|
|
106
109
|
if (t.you) return { tone: 'you', text: t.you };
|
|
107
110
|
const g = grill; if (g && g.open && !g.later) return { tone: 'you', text: plural(g.open, 'question', 'questions') + ' before the BRD' };
|
|
108
111
|
if (r.late) return { tone: 'late', text: r.overDays > 0 ? plural(r.overDays, 'day', 'days') + ' over' : 'Late' };
|
|
109
|
-
if (
|
|
112
|
+
if (ps === 'at risk') return { tone: 'risk', text: 'At risk' + (r.owner ? '' : ' · no owner'), from };
|
|
110
113
|
if (t.idle != null) return { tone: 'q', text: 'Idle ' + t.idle + ' days' };
|
|
111
|
-
if (
|
|
112
|
-
const d = r.release.days; return { tone: 'ok', text: d === 0 ? 'Ships today' : d === 1 ? 'Ships tomorrow' : 'Ships ' + (fmt ? fmt(r.release.iso) : r.release.at) };
|
|
114
|
+
if (ps === 'on track' && r.release && r.release.days != null && r.release.days >= 0 && t.key === 'deliver') {
|
|
115
|
+
const d = r.release.days; return { tone: 'ok', text: d === 0 ? 'Ships today' : d === 1 ? 'Ships tomorrow' : 'Ships ' + (fmt ? fmt(r.release.iso) : r.release.at), from };
|
|
113
116
|
}
|
|
114
|
-
if (
|
|
115
|
-
if (
|
|
116
|
-
return { tone: 'q', text: r.statusLabel || '' };
|
|
117
|
+
if (ps === 'on track') return { tone: 'ok', text: 'On track', from };
|
|
118
|
+
if (ps === 'done') return { tone: 'ok', text: 'Done', from };
|
|
119
|
+
return { tone: 'q', text: ps === NO_SIGNAL && r.status ? 'No signal' : r.statusLabel || '' };
|
|
117
120
|
}
|
|
118
121
|
|
|
119
122
|
/* a Jira ticket's dates as words (batch 11 item 23): the start and due the PM keeps in PMOS, else the sprint's end */
|
|
@@ -248,7 +251,7 @@ export function iniView(r, ctx = {}) {
|
|
|
248
251
|
const stage = {
|
|
249
252
|
n: cur >= 0 ? cur + 1 : null, of: list.length, name: (endWord(r) || (st ? st.name : (t.label || r.stage || 'No stage on record'))), ms: !!(st && st.ms), key: st ? st.key : '',
|
|
250
253
|
// W1: what set the stage and when it was read, and the gate line (the spec ladder) the page model sends
|
|
251
|
-
source: stageSource(r), gate: ctx.gate || null,
|
|
254
|
+
source: r.oneStage && r.oneStage.setBy === 'files' && ctx.gate ? '' : stageSource(r), gate: ctx.gate || null, // set by the documents: the gate chips say it (U1)
|
|
252
255
|
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,
|
|
253
256
|
clock: days != null && !line.chip ? (usual != null ? days + ' of ~' + usual + ' days' : plural(days, 'day', 'days')) : '', line, ready,
|
|
254
257
|
ladder: list.map((s) => ({ name: s.name, ms: s.ms, cls: s.status })), dates, next: nx,
|