create-pmos 0.442.0 → 0.443.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 +13 -13
- 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/changelog.json +12 -0
- package/workspace/goals-clear-ui-test.js +249 -0
- package/workspace/guide/home.md +7 -2
- package/workspace/guide/metric-drafts.md +8 -2
- package/workspace/home-railcard-test.js +193 -0
- package/workspace/intelligence-gaps-ui-test.js +16 -14
- package/workspace/lib/engine/records/index.js +9 -2
- package/workspace/lib/initiative-layout.js +3 -1
- package/workspace/lib/insights-premium.js +22 -1
- package/workspace/lib/metric-drafts.js +37 -10
- package/workspace/lib/metric-read-runs.js +20 -13
- package/workspace/lib/metric-reads.js +208 -23
- package/workspace/lib/metrics-cli.js +62 -5
- package/workspace/lib/routes-goal-status.js +89 -6
- package/workspace/lib/routes-insights-premium.js +1 -1
- package/workspace/lib/routes-metric-drafts.js +26 -3
- package/workspace/metric-drafts-ui-test.js +5 -2
- package/workspace/okr-goals-ui-test.js +7 -5
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/premium-board-actions-test.js +2 -2
- package/workspace/public/pm/cozy-insights.css +82 -0
- package/workspace/public/pm/cozy-live-pill.css +5 -0
- package/workspace/public/pm/cozy-today.css +15 -0
- package/workspace/public/pm/cozy-viewer.js +42 -14
- package/workspace/public/pm/cozy-vw-shell.css +4 -0
- package/workspace/public/pm/goals-clear.js +258 -0
- package/workspace/public/pm/home-app.js +51 -3
- package/workspace/public/pm/home-today.js +51 -10
- package/workspace/public/pm/ini-groups.js +14 -8
- package/workspace/public/pm/ini-tasks.js +47 -13
- package/workspace/public/pm/ini-view-model.js +37 -14
- package/workspace/public/pm/ini-view.css +29 -4
- package/workspace/public/pm/ini-view.js +9 -6
- package/workspace/public/pm/metric-drafts.js +4 -1
- package/workspace/public/pm/mission.js +11 -7
- package/workspace/public/pm/premium-insights.js +178 -24
- package/workspace/server.js +6 -2
- package/workspace/skills/metric-read.skill +7 -5
- package/workspace/stage-card-test.js +11 -3
- package/workspace/task-views-test.js +190 -1
- package/workspace/test-lists/goals-clear.json +15 -0
- package/workspace/test-lists/home-railcard.json +9 -0
- package/workspace/tk-tasks-test.js +2 -2
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* viewMode() / setViewMode(m) 'list' | 'timeline' | 'kanban': the last view, remembered for the PM across initiatives; first time List
|
|
7
7
|
* switchHtml(m) the icon-only segment List / Timeline / Kanban (Kanban is the Board's "By stage" icon)
|
|
8
8
|
* viewBtnHtml(m) the Tasks header's one view button (batch 18 item 1, XvpA4Sheet); its press opens the view sheet
|
|
9
|
+
* fullBtnHtml(m) Full width, beside the view button: a desktop's Timeline at Weeks or Months (0.442.0 hotfix)
|
|
9
10
|
* sheetHtml(m, g, z) the sheet: View, Group by (Stage, Owner, Status, ⋯ for Epic and Your groups) and the Timeline's Zoom
|
|
10
11
|
* (Weeks, Months, All); a bottom sheet on a phone, a popover under the button on a desktop
|
|
11
12
|
* kanbanPickHtml(v) Kanban's stage picker, at the top of the Kanban
|
|
@@ -128,9 +129,10 @@ export function kanbanPickHtml(v) {
|
|
|
128
129
|
const what = v.tasks.by && v.tasks.by !== 'stage' ? 'Group' : 'Stage';
|
|
129
130
|
return `<button type="button" class="ivx-pick on" data-iv-kstage aria-haspopup="menu" aria-label="${what}: ${esc(x.label)}. Change">${esc(x.label)}${SVG(P.down, 14, 2)}</button>`;
|
|
130
131
|
}
|
|
131
|
-
/** Full width: a desktop's Weeks and Months
|
|
132
|
-
|
|
133
|
-
|
|
132
|
+
/** Full width: a desktop's Timeline at Weeks and Months (All fits the panel), in the Tasks header beside the view button (0.442.0 hotfix:
|
|
133
|
+
* at the Timeline's foot it went unseen). Once on it stays there at All too, so the way back is where it was. */
|
|
134
|
+
export function fullBtnHtml(m) {
|
|
135
|
+
if (m !== 'timeline' || PHONE() || (zoomOf() === 'all' && !fullOn())) return '';
|
|
134
136
|
const f = fullOn(), fl = f ? 'Back to the panel' : 'Full width';
|
|
135
137
|
return `<button type="button" class="iv-ib ivt-fl" data-iv-full aria-pressed="${f}" aria-label="${fl}" title="${fl}">${SVG(f ? P.unfull : P.full, 16)}</button>`;
|
|
136
138
|
}
|
|
@@ -172,7 +174,18 @@ const tkOf = (sec) => (sec.stages ? sec.stages.flatMap((s) => tkOf(s)) : sec.tk
|
|
|
172
174
|
const tkMark = (t) => (t.inJira ? `<span class="ig-sq ${esc(t.cat || 'todo')}" role="img" aria-label="${esc('In Jira: ' + (t.status || 'To do'))}"></span>`
|
|
173
175
|
: `<span class="ig-tkd" role="img" aria-label="Jira ticket drafted, not sent" title="Drafted, not in Jira">${SVG(P.jira, 14, 2)}</span>`);
|
|
174
176
|
const tkTitle = (t) => `<button type="button" class="iv-tt" data-ig-tk="${esc(t.id)}">${t.inJira && t.key ? `<em>${esc(t.key)}</em> ` : ''}${esc(t.title)}</button>`;
|
|
177
|
+
/** A task linked to a Jira ticket it names (ini-view-model.js linkOf): the key once, in blue, then the rest of its title. A key PMOS has not
|
|
178
|
+
* read stays plain text in the title (0.442.0 hotfix). */
|
|
179
|
+
export function keyName(x) {
|
|
180
|
+
if (!x.jkey) return esc(x.title);
|
|
181
|
+
const rest = String(x.title || '').replace(new RegExp('[\\[(]?\\b' + x.jkey + '\\b[\\])]?\\s*[:\u2013\u2014-]?\\s*'), '').trim();
|
|
182
|
+
return `<em>${esc(x.jkey)}</em>${rest ? ' ' + esc(rest) : ''}`;
|
|
183
|
+
}
|
|
184
|
+
/** The Jira mark of a linked task, in place of its box: the status square the ticket rows draw (To do, In progress, Done). Jira owns the
|
|
185
|
+
* status, so it marks nothing here. */
|
|
186
|
+
export const jqMark = (x) => `<span class="iv-jq ig-sq ${x.closed ? 'done' : x.prog ? 'doing' : 'todo'}" role="img" aria-label="${esc('Jira ' + x.jkey + ': ' + (x.jst || x.status))}" title="${esc('Jira · ' + (x.jst || x.status))}"></span>`;
|
|
175
187
|
const box = (x, o) => {
|
|
188
|
+
if (x.jkey && !x.dr) return `<span class="iv-bxw">${jqMark(x)}</span>`;
|
|
176
189
|
// a draft's task (batch 11 item 8) is an assumption: a dashed box that marks nothing; its caret still changes the status in the draft
|
|
177
190
|
if (x.dr) return `<span class="iv-bxw"><span class="iv-cb dr" aria-hidden="true"></span>` + (o.quick ? `<button type="button" class="iv-car" data-iv-stat="${esc(x.uid)}" data-st="${esc(x.status)}" aria-haspopup="dialog" aria-label="${esc('Change the status in the draft: ' + x.title)}" title="Status">${SVG(P.down, 10, 2.6)}</button>` : '') + '</span>';
|
|
178
191
|
const cls = ['iv-cb', x.done ? 'on' : '', x.prog ? 'pr' : '', x.wont ? 'wo' : ''].filter(Boolean).join(' ');
|
|
@@ -180,7 +193,8 @@ const box = (x, o) => {
|
|
|
180
193
|
+ (o.quick ? `<button type="button" class="iv-car" data-iv-stat="${esc(x.uid)}" data-st="${esc(x.status)}" data-ms="${x.ms ? 1 : 0}" aria-haspopup="dialog" aria-label="${esc('Change the status: ' + x.title)}" title="Status">${SVG(P.down, 10, 2.6)}</button>` : '') + '</span>';
|
|
181
194
|
};
|
|
182
195
|
const jmark = (k) => `<span class="iv-jm" role="img" aria-label="${esc('Jira ticket, ' + (k.status || 'To do') + '. Status and dates come from Jira')}" title="${esc('Jira · ' + (k.status || 'To do'))}">${SVG(P.jira, 14, 2)}</span>`;
|
|
183
|
-
|
|
196
|
+
// noMs: the row already leads with its ◇ (Timeline at All), so the title does not repeat it
|
|
197
|
+
const title = (x, o, noMs = false) => (o.openTask && x.uid && !x.dr ? `<button type="button" class="iv-tt" data-iv-task="${esc(x.uid)}">${keyName(x)}</button>` : `<b class="iv-tt">${keyName(x)}</b>`) + (noMs ? '' : msGlyph(x)) + addedMark(x);
|
|
184
198
|
/* ── planned versus actual (batch 11 item 8; canvas PvaAC1Live): ⊕ after a title added after the compared version, the slip after a date ── */
|
|
185
199
|
const ADDED = 'M12 8v8M8 12h8M12 3a9 9 0 1 0 0 18 9 9 0 1 0 0-18';
|
|
186
200
|
export const addedMark = (x) => (x.added ? `<span class="vs-add" role="img" aria-label="Added after the plan" title="Added after the plan">${SVG(ADDED, 14, 1.8)}</span>` : '');
|
|
@@ -197,7 +211,7 @@ const ttitle = (k) => `<button type="button" class="iv-tt" data-iv-ticket="${esc
|
|
|
197
211
|
/** The date press: the task card's start and due picker opens right under it. No dates: a calendar icon, shown on hover. */
|
|
198
212
|
export function dateBtn(x, o) {
|
|
199
213
|
if (!o.quick || !x.uid) return x.days ? `<span class="${x.late ? 'w' : ''}">${esc(x.days)}</span>` : '';
|
|
200
|
-
const a = `data-iv-date="${esc(x.uid)}" data-s="${esc(x.start)}" data-e="${esc(x.end)}" title="${x.jira ? 'Start and due, kept in PMOS. Jira is not changed' : 'Start and due'}"`;
|
|
214
|
+
const a = `data-iv-date="${esc(x.uid)}" data-s="${esc(x.start)}" data-e="${esc(x.end)}" title="${x.jira || x.jkey ? 'Start and due, kept in PMOS. Jira is not changed' : 'Start and due'}"`;
|
|
201
215
|
// a milestone with no due date: a dashed chip asks for it, shown always (canvas XmlA6Suggest)
|
|
202
216
|
if (msNoDate(x)) return `<button type="button" class="iv-dc ms" ${a} aria-label="${esc('Set the due date: ' + x.title)}">${SVG(P.cal, 13)}Set the due date</button>`;
|
|
203
217
|
return x.days ? `<button type="button" class="iv-dc${x.late ? ' w' : ''}" ${a} aria-label="${esc('Dates: ' + x.days + '. Change')}">${esc(x.days)}</button>`
|
|
@@ -259,7 +273,8 @@ export function timelineHtml(v, o, isOpen) {
|
|
|
259
273
|
const lw = LK.barWords(x, o.lk);
|
|
260
274
|
const at = `data-ivt-bar="${esc(x.uid)}" data-s="${esc(x.start)}" data-e="${esc(x.end)}"${o.quick && !x.closed ? drag : ''} aria-label="${esc(lbl + (lw ? ', ' + lw : '') + '. Change the dates')}"`;
|
|
261
275
|
if (a == null && b == null) return x.closed || !o.quick ? '' : `<button type="button" class="ivt-g" data-iv-date="${esc(x.uid)}" data-s="" data-e="" data-tlx="${X(today) - 18}" aria-label="${esc('No dates yet. Set dates: ' + x.title)}" title="Set dates">${SVG(P.cal, 13)}</button>`;
|
|
262
|
-
|
|
276
|
+
// a milestone with a due day only is its ◇ (the guide drops through it), not the due-only circle
|
|
277
|
+
if (a == null) return `<button type="button" class="ivt-d ${cls}${x.ms && !x.wont ? ' ms' : ''}" ${at} data-only="due" data-tlx="${x.ms && !x.wont ? X(b + 1) : X(b) + Math.round(px / 2)}"></button>`;
|
|
263
278
|
const e = b == null ? a : Math.max(a, b);
|
|
264
279
|
return `<button type="button" class="ivt-b ${cls}" ${at} data-tlx="${X(a)}" data-tlw="${Math.max(10, X(e + 1) - X(a))}">`
|
|
265
280
|
+ (o.quick && !x.closed ? '<span class="ivt-gp l" data-grip="start" aria-hidden="true"></span><span class="ivt-gp r" data-grip="end" aria-hidden="true"></span>' : '') + av + LK.barExtra(x, o.lk, o.quick) + '</button>' + msEnd(x);
|
|
@@ -303,7 +318,8 @@ export function timelineHtml(v, o, isOpen) {
|
|
|
303
318
|
const head = `<button type="button" class="ivt-gh${sec.kind === 'past' || sec.kind === 'later' || sec.status === 'skip' ? ' mut' : ''}" ${has ? `data-iv-fold="${esc(key)}" aria-expanded="${op}"` : 'disabled'}>${o.mark(sec)}<b>${esc(sec.label || sec.name)}</b>${sec.count ? `<span class="n${sec.warn ? ' w' : ''}">${esc(sec.count)}</span>` : ''}${has ? `<span class="iv-cv" aria-hidden="true">${SVG(op ? P.down : P.right, 15, 2)}</span>` : ''}</button>`;
|
|
304
319
|
h += row(head, sec.status === 'skip' && !has ? skipLine(si) : band(rs.concat(dn_)), ' g');
|
|
305
320
|
if (!op || !has) continue;
|
|
306
|
-
|
|
321
|
+
// a ticket in Jira whose task is linked to it (By epic) draws that task's bar: its dates are the task's, kept in PMOS
|
|
322
|
+
for (const t of tk) h += row(`${tkMark(t)}${tkTitle(t)}`, t.x ? barOf(t.x) : '', ' k', t.x ? nx(dn(t.x.start), dn(t.x.end)) : null);
|
|
307
323
|
for (const k of jr) h += row(`${jmark(k)}${ttitle(k)}${k.days ? `<span class="ivt-wn">· ${esc(k.days)}</span>` : ''}`, jbar(k), ' k', nx(dn(k.start), dn(k.due)));
|
|
308
324
|
for (const x of rs) h += trow(x);
|
|
309
325
|
// a stage with nothing open lists its done tasks straight away, as the List does: no "Done" fold inside the stage's own fold
|
|
@@ -321,7 +337,7 @@ export function timelineHtml(v, o, isOpen) {
|
|
|
321
337
|
const vk = v.vs ? (v.vs.lines && v.vs.cmp ? `<span><i class="pl"></i>${esc((v.vs.cmp.kind === 'plan' ? 'Plan · ' : 'Draft · ') + v.vs.cmp.name)}</span>` : '') + (v.vs.draft ? '<span><i class="dr"></i>Draft</span>' : '') : '';
|
|
322
338
|
const legend = `<div class="ivt-lg">${v.vs && v.vs.draft ? '' : '<span><i class="to"></i>To do</span><span><i class="pr"></i>In progress</span><span><i class="lt"></i>Late</span>'}<span><i class="dd"></i>Due only</span>${vk}`
|
|
323
339
|
+ (/class="ivt-ng"/.test(h) ? '<span><i class="ng"></i>No activity</span>' : '') + (/class="ivt-sk"/.test(h) ? `<span>${SVG(P.skip, 12, 2)}Skipped</span>` : '')
|
|
324
|
-
+ `${guides ? `<span>${SVG(P.dia, 11, 2.4)}Milestone</span>` : ''}<span>${SVG(P.jira, 12, 2)}Jira</span>${LK.legendHtml(o.lk)}${o.quick ? `<span class="h">${o.lk && o.lk.links.length ? 'Drag a bar to move it, an end to change dates, a dot to link it' : 'Drag a bar to move it; drag an end to change start or due'}</span>` : ''}
|
|
340
|
+
+ `${guides ? `<span>${SVG(P.dia, 11, 2.4)}Milestone</span>` : ''}<span>${SVG(P.jira, 12, 2)}Jira</span>${LK.legendHtml(o.lk)}${o.quick ? `<span class="h">${o.lk && o.lk.links.length ? 'Drag a bar to move it, an end to change dates, a dot to link it' : 'Drag a bar to move it; drag an end to change start or due'}</span>` : ''}</div>`;
|
|
325
341
|
// it opens on today, moved left as far as the earliest open task's start, so a late bar is in view
|
|
326
342
|
const firstOpen = S.flatMap(flat).flatMap((x) => [dn(x.start), dn(x.end)]).filter((n) => n != null);
|
|
327
343
|
const first = firstOpen.length ? X(Math.min(...firstOpen)) : X(today);
|
|
@@ -400,7 +416,7 @@ export function allHtml(v, o, isOpen) {
|
|
|
400
416
|
// its tasks: tickets drafted, Jira, the open tasks, then the done ones (quieter)
|
|
401
417
|
const trow = (lc, ttl, bar, p0, cls = '') => `<div class="iva-r k${cls}"><span class="iva-n">${lc}</span><span class="iva-l" data-tlp="${p0}">${ttl}</span><span class="iva-c">${bar}</span></div>`;
|
|
402
418
|
// the words after a title: a phone says the dates and the late days; a desktop the late days or "you" only (XvpD3Timeline)
|
|
403
|
-
const tline = (x) => title(x, o)
|
|
419
|
+
const tline = (x) => title(x, o, true)
|
|
404
420
|
+ (x.days ? `<span class="ivt-wn">· ${esc(x.days)}${x.lateText ? `<b>, ${esc(x.lateText)}</b>` : ''}</span>` : '')
|
|
405
421
|
+ (x.lateText && !x.closed ? `<span class="iva-nt lt">${esc(x.lateText)}</span>` : x.owner === 'You' && !x.closed ? '<span class="iva-nt you">you</span>' : '')
|
|
406
422
|
+ (!x.days && o.quick && x.uid && !x.closed ? ' ' + dateBtn(x, o) : '');
|
|
@@ -415,7 +431,7 @@ export function allHtml(v, o, isOpen) {
|
|
|
415
431
|
return `<${open0} class="iva-tb ${cls}" ${at} data-tlx="${pc(s0)}" data-tlw="${pw(s0, e0)}" aria-label="${lb}"></${tag}>`;
|
|
416
432
|
};
|
|
417
433
|
const p0 = (x) => { const n = dn(x.start) != null ? dn(x.start) : dn(x.end); return n == null ? 0 : fr(n).toFixed(4); };
|
|
418
|
-
for (const t of tk) h += trow(tkMark(t), tkTitle(t), '', 0);
|
|
434
|
+
for (const t of tk) h += trow(tkMark(t), tkTitle(t), t.x ? tbar(t.x) : '', t.x ? p0(t.x) : 0);
|
|
419
435
|
for (const k of jr) { const r = jiraRow(k); h += trow(jmark(k), ttitle(k) + (k.days ? `<span class="ivt-wn">· ${esc(k.days)}</span>` : ''), tbar({ ...r, title: k.title }), p0(r)); }
|
|
420
436
|
for (const x of rs) h += trow(x.ms ? dia : box(x, o), tline(x), tbar(x), p0(x));
|
|
421
437
|
for (const x of dn_) h += trow(x.ms ? dia : box(x, o), tline(x), tbar(x), p0(x), ' x' + (x.wont ? ' wo' : ''));
|
|
@@ -461,7 +477,7 @@ export function kanbanHtml(v, o, isOpen) {
|
|
|
461
477
|
return `<div class="ivk-d jr">${jmark(t)}<div class="w">${ttitle(t)}<div class="ivk-m">${d != null ? `<span>${esc(md(d))}</span>` : ''}${t.av ? `<span class="ivt-av" aria-hidden="true">${esc(t.av)}</span>` : ''}</div></div></div>`;
|
|
462
478
|
}
|
|
463
479
|
const x = c.x;
|
|
464
|
-
return `<div class="ivk-d${x.closed ? ' x' : ''}${x.wont ? ' wo' : ''}${x.dr ? ' dr' : ''}"${o.quick && x.uid ? ` draggable="true" data-ivk-card="${esc(x.uid)}" data-st="${esc(x.status)}"` : ''}>${box(x, o)}<div class="w">${title(x, o)}`
|
|
480
|
+
return `<div class="ivk-d${x.closed ? ' x' : ''}${x.wont ? ' wo' : ''}${x.dr ? ' dr' : ''}${x.jkey ? ' jr' : ''}"${o.quick && x.uid && !x.jkey ? ` draggable="true" data-ivk-card="${esc(x.uid)}" data-st="${esc(x.status)}"` : ''}>${box(x, o)}<div class="w">${title(x, o)}`
|
|
465
481
|
+ `<div class="ivk-m">${dateBtn(x, o)}${LK.metaHtml(x, o.lk, o.quick)}${x.av ? `<span class="ivt-av" aria-hidden="true">${esc(x.av)}</span>` : ''}</div></div></div>`;
|
|
466
482
|
};
|
|
467
483
|
const wop = isOpen('kb:wont', false), nW = by["Won't do"].length;
|
|
@@ -612,8 +628,26 @@ export function wireDrag(body, after) {
|
|
|
612
628
|
sc.scrollLeft = SCROLL.has(k) ? SCROLL.get(k) : Math.max(0, Math.min((+T.dataset.today || 0) - Math.max(0, sc.clientWidth - nw) * 0.25, (+T.dataset.first || 0) - 16));
|
|
613
629
|
// an earlier start fades in at the left edge once the Timeline is scrolled from its start (XvpA3bMonths)
|
|
614
630
|
const fade = () => T.classList.toggle('scl', sc.scrollLeft > 2);
|
|
615
|
-
|
|
616
|
-
|
|
631
|
+
// an axis label cut by the left edge (or the name column) or under the Today chip is hidden, not half drawn (0.442.0 hotfix: "5", "9")
|
|
632
|
+
const cut = () => {
|
|
633
|
+
const c = sc.getBoundingClientRect(), ch = T.querySelector('.ivt-today i'), t = ch ? ch.getBoundingClientRect() : null;
|
|
634
|
+
for (const e of T.querySelectorAll('.ivt-r.ax .ivt-c span')) {
|
|
635
|
+
const r = e.getBoundingClientRect(), x0 = r.left + 4;
|
|
636
|
+
e.classList.toggle('cut', x0 < c.left + nw - 1 || r.right > c.right + 1 || (!!t && r.right > t.left - 4 && x0 < t.right + 4));
|
|
637
|
+
}
|
|
638
|
+
};
|
|
639
|
+
// a phone: each title starts at its bar's start, but slides back from the right edge so it is whole on the screen (0.442.0 hotfix)
|
|
640
|
+
const fit = () => {
|
|
641
|
+
if (T.offsetWidth >= 520) return;
|
|
642
|
+
const L = sc.scrollLeft, vw = sc.clientWidth;
|
|
643
|
+
for (const n of T.querySelectorAll('.ivt-r.k .ivt-n[data-tln]')) {
|
|
644
|
+
const kids = [...n.children], w = kids.reduce((a, c) => a + (c.classList.contains('iv-tt') ? c.scrollWidth : c.offsetWidth), 0) + 8 * Math.max(0, kids.length - 1) + 12;
|
|
645
|
+
n.style.setProperty('--tl-fw', (vw - 24) + 'px'); // its content: the padding takes the other 12
|
|
646
|
+
n.style.setProperty('--tl-fl', Math.max(0, Math.min(+n.dataset.tln || 0, L + vw - Math.min(w, vw - 12) - 4)) + 'px');
|
|
647
|
+
}
|
|
648
|
+
};
|
|
649
|
+
fade(); cut(); fit();
|
|
650
|
+
sc.addEventListener('scroll', () => { SCROLL.set(k, sc.scrollLeft); fade(); cut(); fit(); }, { passive: true });
|
|
617
651
|
}
|
|
618
652
|
if (after) after();
|
|
619
653
|
};
|
|
@@ -113,7 +113,12 @@ export function statusOf(r, grill, fmt) {
|
|
|
113
113
|
/* 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 */
|
|
114
114
|
const jDays = (k, today) => { const e = k.due || k.sprintEnd || ''; return k.start && e ? span(k.start, e, today) : k.start ? 'from ' + dateY(k.start, today) : e ? dateY(e, today) : ''; };
|
|
115
115
|
/* ── one task row ── */
|
|
116
|
-
|
|
116
|
+
/** The PMOS status a Jira status reads as: Done, In progress (review and test count as work under way), else To do. */
|
|
117
|
+
const jiraBucket = (st) => (/^(done|closed|resolved|released)$/i.test(String(st || '')) ? 'Done' : /progress|review|test|\bqa\b|doing|started|block/i.test(String(st || '')) ? 'In progress' : 'To do');
|
|
118
|
+
/** k: the task as stored; J: the Jira ticket its title names, when PMOS read that ticket (0.442.0 hotfix, Wawan 13:02 and 13:03). A linked task's
|
|
119
|
+
* status is the ticket's; its start and due stay the PM's, kept in PMOS: Jira's start and due show only while the task has none of its own. */
|
|
120
|
+
function rowOf(k0, today, J = null) {
|
|
121
|
+
const k = J ? { ...k0, status: jiraBucket(J.status), start: k0.start || J.start || '', end: k0.end || J.due || J.sprintEnd || '' } : k0;
|
|
117
122
|
const closed = CLOSED.has(k.status), d = dayOf(k.end), late = !closed && !!d && d < today;
|
|
118
123
|
// start and end both (batch 7 item 6): "Oct 15 – Oct 28", one day once, "from Oct 15" with no end
|
|
119
124
|
const days = k.start && k.end ? span(k.start, k.end, today) : k.start ? 'from ' + dateY(k.start, today) : d ? dateY(k.end, today) : '';
|
|
@@ -123,19 +128,31 @@ function rowOf(k, today) {
|
|
|
123
128
|
return { uid: k.uid, title: k.title, status: k.status || 'To do', closed, done: k.status === 'Done', wont: k.status === "Won't do", prog: k.status === 'In progress', late, due,
|
|
124
129
|
days, lateText: late ? plural(between(d, today), 'day', 'days') + ' late' : '', item: !!k.item, ms: !!k.milestone, // ms: the ◇ flag (batch 11 item 3)
|
|
125
130
|
start: k.start || '', end: k.end || '', owner: who, av: initials(k.owner),
|
|
126
|
-
sub: [k.status === 'In progress' ? 'In progress' : '', due, who && who !== 'You' ? who : ''].filter(Boolean).join(' · '), wbs: wbsOf(k.title), canCheck: !!k.uid && !k.draft, order: k.order,
|
|
131
|
+
sub: [k.status === 'In progress' ? 'In progress' : '', due, who && who !== 'You' ? who : ''].filter(Boolean).join(' · '), wbs: wbsOf(k.title), canCheck: !!k.uid && !k.draft && !J, order: k.order,
|
|
127
132
|
// planned versus actual (batch 11 item 8, pm/ini-versions.js): the compared version's days where they differ, ⊕ added after it, a draft's task
|
|
128
|
-
cmp: k.cmp || null, added: !!k.added, dr: !!k.draft,
|
|
133
|
+
cmp: k.cmp || null, added: !!k.added, dr: !!k.draft,
|
|
134
|
+
// jkey: the key of the Jira ticket the task is linked to, only when PMOS read that ticket; jst: its own Jira status (it owns the status)
|
|
135
|
+
jkey: J ? J.key : '', jst: J ? String(J.raw || J.status || '') : '', _k: k0, _t: today };
|
|
136
|
+
}
|
|
137
|
+
/** The Jira keys a task's title holds ("MSD-4376 Navigation tabs" → ['MSD-4376']). A task whose title names a ticket PMOS read IS that ticket
|
|
138
|
+
* (linkOf): it shows the Jira mark and the key once, its status is Jira's, and the ticket's own row does not show again (batch 11 item 4,
|
|
139
|
+
* batch 14 item 6). A key PMOS has not read stays text in a plain task: it looks like a ticket only when it is one (0.442.0 hotfix). */
|
|
140
|
+
const KEY_RE = /\b([A-Z][A-Z0-9]+-\d+)\b/g;
|
|
141
|
+
export const jiraKeysOf = (title) => [...String(title || '').matchAll(KEY_RE)].map((m) => m[1]);
|
|
142
|
+
export const jiraKeyOf = (title) => jiraKeysOf(title)[0] || '';
|
|
143
|
+
/** The read ticket a title names, from a Map key → ticket, or null. */
|
|
144
|
+
export const linkOf = (title, byKey) => { for (const k of jiraKeysOf(title)) if (byKey && byKey.has(k)) return byKey.get(k); return null; };
|
|
145
|
+
/** The rows of a view linked again with more tickets (the drafted tickets that are in Jira, read by pm/ini-groups.js): a row not linked yet
|
|
146
|
+
* whose title names one of them becomes that ticket. tickets: [{ key, status }]. */
|
|
147
|
+
export function linkRows(rows, tickets) {
|
|
148
|
+
const by = new Map((tickets || []).filter((t) => t && t.key).map((t) => [t.key, t]));
|
|
149
|
+
if (!by.size) return rows;
|
|
150
|
+
return rows.map((x) => { if (x.jkey || !x._k) return x; const J = linkOf(x.title, by); return J ? { ...rowOf(x._k, x._t, J), sec: x.sec } : x; });
|
|
129
151
|
}
|
|
130
|
-
/** The Jira key a task's title starts with ("MSD-4376 Navigation tabs" → 'MSD-4376'), or ''. A task named for a ticket IS that ticket:
|
|
131
|
-
* Build's section shows it once, as the task (it carries the dates and the owner), not again as a Jira row (batch 11 item 4), and it looks
|
|
132
|
-
* like a ticket: the Jira square and the key in blue (batch 14 item 6). */
|
|
133
|
-
const KEY_RE = /^\s*([A-Z][A-Z0-9]+-\d+)\b/;
|
|
134
|
-
export const jiraKeyOf = (title) => { const m = KEY_RE.exec(String(title || '')); return m ? m[1] : ''; };
|
|
135
152
|
const urgent = (a, b) => (b.late - a.late) || (a.end || '9999').localeCompare(b.end || '9999') || (a.order != null && b.order != null ? a.order - b.order : 0);
|
|
136
153
|
/** A section's rows: open ones first by urgency; past 5 open, the 3 most urgent then the rest folded by the next WBS level; done fold last
|
|
137
154
|
* (Won't do joins it), then the archived ones, which only the List draws, folded after Done (batch 9 item 5b). */
|
|
138
|
-
function bodyOf(rows, archived = []) {
|
|
155
|
+
export function bodyOf(rows, archived = []) {
|
|
139
156
|
const open = rows.filter((x) => !x.closed).sort(urgent), done = rows.filter((x) => x.closed);
|
|
140
157
|
if (open.length <= 5) return { top: open, groups: [], done, archived };
|
|
141
158
|
const top = open.slice(0, 3), rest = open.slice(3), by = new Map();
|
|
@@ -157,14 +174,16 @@ export function iniView(r, ctx = {}) {
|
|
|
157
174
|
const today = todayOf(ctx), t = r.track || {}, tr = r.trail || {};
|
|
158
175
|
const { list, cur } = stagesOf(r, ctx.steps);
|
|
159
176
|
const T = (r.tasks || []).filter((k) => k.status !== 'Archived');
|
|
160
|
-
|
|
177
|
+
// the Jira tickets PMOS read for this initiative: a task whose title names one is linked to it
|
|
178
|
+
const byKey = new Map((t.tickets || []).filter((k) => k && k.key).map((k) => [k.key, k]));
|
|
179
|
+
const rows = T.map((k) => ({ ...rowOf(k, today, linkOf(k.title, byKey)), sec: sectionOf(k, list) }));
|
|
161
180
|
// archived tasks count nowhere and show in no view but the List's Archived fold (batch 9 item 5b)
|
|
162
|
-
const arch = (r.tasks || []).filter((k) => k.status === 'Archived').map((k) => ({ ...rowOf(k, today), sec: sectionOf(k, list) }));
|
|
181
|
+
const arch = (r.tasks || []).filter((k) => k.status === 'Archived').map((k) => ({ ...rowOf(k, today, linkOf(k.title, byKey)), sec: sectionOf(k, list) }));
|
|
163
182
|
const archOf = (keys) => arch.filter((x) => keys.includes(x.sec));
|
|
164
183
|
const open = rows.filter((x) => !x.closed), late = open.filter((x) => x.late);
|
|
165
184
|
const jira = !ownWf(r) && (t.key === 'build' || t.key === 'deliver') && (t.tickets || []).length > 0;
|
|
166
185
|
// a ticket a task is named for shows once, as the task: it is not drawn or counted again as a Jira row
|
|
167
|
-
const named = new Set(
|
|
186
|
+
const named = new Set(rows.concat(arch).map((x) => x.jkey).filter(Boolean));
|
|
168
187
|
const tkOwn = (t.tickets || []).filter((k) => !named.has(k.key));
|
|
169
188
|
|
|
170
189
|
// the dates each stage ran: its board moves, oldest first; the first stage starts with the plan
|
|
@@ -341,15 +360,19 @@ export function groupSections(tasks, by, L, T) {
|
|
|
341
360
|
if (arch.length) out.push(sec('group', 's:Archived', 'Archived', [], { archived: arch, open: false }));
|
|
342
361
|
} else if (by === 'epic') {
|
|
343
362
|
const G = ticketGroups(T), pushed = new Set(((T && T.tickets) || []).map((t) => t.key).filter(Boolean));
|
|
363
|
+
// a task linked to a ticket in Jira shows once: as that ticket, in its epic, carrying the task's dates (its bar on the Timeline)
|
|
364
|
+
const linked = new Map(all.concat(arch).filter((x) => x.jkey && pushed.has(x.jkey)).map((x) => [x.jkey, x]));
|
|
344
365
|
G.forEach((g, i) => out.push({ kind: 'epic', key: 'ep:' + g.id, label: g.name, sub: '', epicKey: g.key || '', gid: g.id, send: T.pushing ? 0 : g.send,
|
|
345
|
-
count: g.inJira === g.n ? g.n + ' in Jira' : (g.n - g.inJira) + ' drafted', warn: false, open: i === 0, top: [], groups: [], done: [], archived: [], jira: null,
|
|
366
|
+
count: g.inJira === g.n ? g.n + ' in Jira' : (g.n - g.inJira) + ' drafted', warn: false, open: i === 0, top: [], groups: [], done: [], archived: [], jira: null,
|
|
367
|
+
tk: g.rows.map((r) => (r.inJira && r.key && linked.has(r.key) ? { ...r, x: linked.get(r.key) } : r)) }));
|
|
346
368
|
// "Jira read at 9:02", said once, under the last epic that has a ticket in Jira
|
|
347
369
|
const lastJ = out.filter((x) => x.kind === 'epic' && x.tk.some((r) => r.inJira)).pop(); if (lastJ && T.checkedAt) lastJ.tkRead = T.checkedAt;
|
|
348
370
|
// nothing drafted: By epic says what comes next (every gap has its next action): Draft the tickets, or why there is nothing to draft
|
|
349
371
|
if (!G.length) out.push({ kind: 'epic', key: 'ep:', label: 'Jira tickets', sub: '', count: '', open: true, top: [], groups: [], done: [], archived: [], jira: null,
|
|
350
372
|
tkEmpty: !T ? { reading: true } : T.ok !== true ? { error: T.error || 'The tickets could not be read.' } : T.items ? { items: T.items } : { none: true } });
|
|
351
373
|
for (let i = jr.length - 1; i >= 0; i--) if (pushed.has(jr[i].key)) jr.splice(i, 1);
|
|
352
|
-
|
|
374
|
+
const own = (x) => !(x.jkey && linked.has(x.jkey));
|
|
375
|
+
out.push(sec('group', 'yours', 'Your tasks', all.filter(own), { archived: arch.filter(own), open: !G.length }));
|
|
353
376
|
const send = G.reduce((a, g) => a + g.send, 0), open = tasks.open || 0, meta = [open ? open + ' open' : '', 'grouped by epic'].filter(Boolean).join(' · ');
|
|
354
377
|
if (T && T.ok === true && T.pushing) sum = { line: 'Sending to Jira', tone: 'live', text: 'Claude is creating the tickets with your Atlassian connection. Each task shows its Jira key when it is done.', meta };
|
|
355
378
|
else if (send) sum = { line: plural(send, 'ticket is', 'tickets are') + ' drafted, not in Jira', tone: 'you', text: 'Each PRD story is a task with its Jira ticket drafted. Nothing reaches Jira until you send it.', meta, primary: { act: 'sendall', label: 'Send to Jira' } };
|
|
@@ -272,6 +272,11 @@ button.iv-chip:hover { background: var(--cz-well) !important; }
|
|
|
272
272
|
.ivt-r.ax .ivt-n { background: var(--cz-well); }
|
|
273
273
|
.ivt-r.ax .ivt-c span { position: absolute; top: 8px; font-size: var(--fs-1); font-weight: 700; color: var(--cz-ink3); white-space: nowrap; padding-left: 4px; }
|
|
274
274
|
.ivt-r.ax .ivt-c span.b { color: var(--cz-ink2); font-weight: 800; }
|
|
275
|
+
.ivt-r.ax .ivt-c span.cut { visibility: hidden; } /* cut by an edge or under the Today chip (ini-tasks.js wireDrag) */
|
|
276
|
+
/* Home's phone rule gives every button in its Viewer 44 px (home-ini.css .hi-v button): a bar, a mark or a title in the Timeline keeps its
|
|
277
|
+
* own size, or each bar grows to 44 px and spills over the next row (0.442.0 hotfix). The row stays the press area. */
|
|
278
|
+
.iv .ivt :is(.ivt-b, .ivt-d, .ivt-g, .iv-tt, .iv-cb, .iv-car), .iv .iva .iva-r.k :is(.iva-tb, .iva-md, .iv-tt, .iv-cb, .iv-dc) { min-height: 0; min-width: 0; }
|
|
279
|
+
.ivt-d.ms { width: 12px; height: 12px; margin: -6px 0 0 -6px !important; border-radius: 2px !important; transform: rotate(45deg); }
|
|
275
280
|
.ivt-n { position: sticky; left: 0; z-index: 3; width: var(--nw); flex: none; background: var(--cz-card); display: flex; align-items: center; gap: 10px; padding: 0 10px 0 14px; min-width: 0; }
|
|
276
281
|
.ivt-r.k .ivt-n { padding-left: 34px; }
|
|
277
282
|
.ivt-n .iv-tt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; font-size: var(--fs-2); }
|
|
@@ -716,7 +721,11 @@ button.lk-mt:hover { color: var(--cz-ink) !important; }
|
|
|
716
721
|
.ivt-wn b { color: var(--cz-late); font-weight: 800; }
|
|
717
722
|
@container (max-width: 520px) {
|
|
718
723
|
/* a phone: each title sits above its bar, from the bar's start; it sticks to the left edge once the start scrolls away */
|
|
719
|
-
|
|
724
|
+
/* --tl-n is a place on the whole track, not on the screen: the title is at most a screen wide, and starts no later than one screen
|
|
725
|
+
* before the track's end (0.442.0 hotfix: a start past the first screen squeezed the title to nothing, only the dates showed) */
|
|
726
|
+
.ivt-r.k .ivt-n { position: sticky; left: 0; width: auto; max-width: var(--tl-fw, calc(100cqw - 12px)); margin-left: var(--tl-fl, max(0px, min(var(--tl-n, 0px), 100% - 100cqw + 12px))); padding-left: 6px; padding-right: 6px; background: transparent; gap: 8px; z-index: 3; }
|
|
727
|
+
/* a group's name lets the Today line through: an opaque name cut gaps in it (0.442.0 hotfix) */
|
|
728
|
+
.ivt-r.g .ivt-n { background: transparent; }
|
|
720
729
|
.ivt-r.k .ivt-n .iv-tt { flex: 0 1 auto; }
|
|
721
730
|
.ivt-wn { display: inline; flex: none; }
|
|
722
731
|
.ivt-r.k .ivt-g { display: none; }
|
|
@@ -832,7 +841,7 @@ button.iv-msr:hover { background: var(--cz-well) !important; }
|
|
|
832
841
|
.iv-msk.dn { background: var(--cz-okbg); color: var(--cz-ok); }
|
|
833
842
|
.iv-msr.up .iv-msk { color: var(--cz-blueink); }
|
|
834
843
|
.iv-msr.up.late .iv-msk { color: var(--cz-late); }
|
|
835
|
-
.iv-msn { flex: 1; min-width: 0; font-size: var(--fs-3); font-weight: 700; color: var(--cz-ink);
|
|
844
|
+
.iv-msn { flex: 1; min-width: 0; font-size: var(--fs-3); font-weight: 700; color: var(--cz-ink); line-height: 1.3; padding: 6px 0; overflow-wrap: anywhere; }
|
|
836
845
|
.iv-msr.dn .iv-msn { color: var(--cz-ink3); font-weight: 600; }
|
|
837
846
|
.iv-msd { font-size: var(--fs-2); font-weight: 700; color: var(--cz-ink3); white-space: nowrap; }
|
|
838
847
|
.iv-msr.up .iv-msd { color: var(--cz-blueink); }
|
|
@@ -883,7 +892,15 @@ button.iv-mt.iv-wf { padding: 0 !important; margin: 0 !important; }
|
|
|
883
892
|
.iv-mis .iv-stc { background: transparent !important; color: var(--cz-ink) !important; padding: 0 !important; min-height: 26px; }
|
|
884
893
|
.iv-setd { display: inline-flex !important; align-items: center; gap: 6px; min-height: 40px; font-size: var(--fs-3); font-weight: 800; color: var(--cz-blueink) !important; }
|
|
885
894
|
.iv-mis .iv-scgo.on { height: 40px; padding: 0 14px 0 16px !important; font-size: var(--fs-3); font-weight: 800; }
|
|
886
|
-
.iv-mi { position: relative; cursor: pointer; border-radius: 14px; }
|
|
895
|
+
.iv-mi { position: relative; cursor: pointer; border-radius: 14px; overflow: hidden; }
|
|
896
|
+
/* the picture spans the card edge to edge (Wawan 12:25); at the card's top it takes the card's corners */
|
|
897
|
+
.iv-card .iv-mi { margin: 0 -16px; border-radius: 0; }
|
|
898
|
+
.iv-card > .iv-sc:first-child > .iv-mi:first-child { margin-top: -16px; }
|
|
899
|
+
@container iv (min-width: 820px) {
|
|
900
|
+
.iv-card > .iv-sc:first-child > .iv-sch:not(:has(.iv-setd, .iv-scgo, .iv-chp)) + .iv-mi { margin-top: -16px; }
|
|
901
|
+
}
|
|
902
|
+
/* the Board's page draws its icons with a stroke on every svg (cozy-board.css .bd-page svg); the mission is a picture, not an icon */
|
|
903
|
+
.iv-mi svg.mi-svg { fill: initial; stroke: none; stroke-width: 1; }
|
|
887
904
|
.iv-mi:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 2px; }
|
|
888
905
|
.iv-mi .mi-svg { display: block; height: auto; }
|
|
889
906
|
.iv-mi-nm { display: none; position: relative; height: 18px; margin-top: 4px; }
|
|
@@ -901,12 +918,20 @@ button.iv-mt.iv-wf { padding: 0 !important; margin: 0 !important; }
|
|
|
901
918
|
.iv-mi-tip i { font-style: normal; font-weight: 600; opacity: .75; }
|
|
902
919
|
/* in place: N of M done, ⋯, the next stage, then the list */
|
|
903
920
|
.iv-mio { display: flex; flex-direction: column; gap: 6px; }
|
|
921
|
+
.iv-mio:not(.on) { display: none; }
|
|
922
|
+
@container iv (min-width: 820px) {
|
|
923
|
+
.iv-mio:not(.on) { display: flex; }
|
|
924
|
+
.iv-mio .iv-msh, .iv-mio .iv-msl { display: none; }
|
|
925
|
+
}
|
|
904
926
|
.iv-mio-h { display: flex; align-items: center; gap: 8px; min-height: 40px; }
|
|
905
927
|
.iv-mio-h .iv-sp { flex: 1; }
|
|
906
928
|
.iv-mio-h .iv-mo { width: 40px; height: 40px; background: var(--cz-card); }
|
|
907
929
|
.iv-mio-h .iv-scgo { height: 40px; background: var(--cz-card) !important; font-size: var(--fs-3); font-weight: 800; color: var(--cz-ink); }
|
|
908
930
|
.iv-mio .iv-msh { padding: 6px 6px 0; }
|
|
909
|
-
.iv-mio-h
|
|
931
|
+
.iv-mio-h { flex-wrap: wrap; row-gap: 4px; }
|
|
932
|
+
.iv-mio-b { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
|
|
933
|
+
/* the dates are never cut (Wawan 11:58): too long for the row, they take their own line and the buttons go under them, right */
|
|
934
|
+
.iv-mio-h .iv-dtc { display: block !important; line-height: 36px; white-space: nowrap; min-width: 0; max-width: 100%; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; }
|
|
910
935
|
.iv-mio-h .iv-mo, .iv-mio-h .iv-scgo { flex: none; }
|
|
911
936
|
.iv-dtc.w { color: var(--cz-late) !important; }
|
|
912
937
|
/* a real win (XvpE5Adler 1): he stands in the card with a soft green glow, his thanks and the one primary */
|
|
@@ -109,12 +109,14 @@ function missionBox(v, o, pri) {
|
|
|
109
109
|
+ '<span class="iv-mi-tip" role="tooltip" hidden></span></div>';
|
|
110
110
|
// in place (XvpE2Stages, Wawan 10:59): the stage's dates, ⋯ the stage picker, the next stage; then the milestones, the same list as the
|
|
111
111
|
// desktop's Milestones card (the picture already shows the stages)
|
|
112
|
+
// on a desktop the dates line always shows under the picture and the Milestones card holds the list (Wawan 11:58: the line was missing,
|
|
113
|
+
// and an open picture showed the milestones twice); on a phone both wait for the picture's tap
|
|
112
114
|
let below = '';
|
|
113
|
-
|
|
115
|
+
{
|
|
114
116
|
const more = o.stagePick ? `<button type="button" class="iv-ib iv-mo" data-iv-stagepick aria-haspopup="menu" aria-expanded="false" aria-label="${esc('Stage: ' + st.name + '. Change')}" title="Change the stage">${SVG(MORE, 18, 3)}</button>` : '';
|
|
115
117
|
const D = st.dates, dt = D && (D.start || D.end) ? [D.start, D.end].filter(Boolean).join(' – ') + (D.left ? ' · ' + D.left : '') : '';
|
|
116
118
|
const dates = dt ? (o.planDates ? `<button type="button" class="iv-dtc${D.over ? ' w' : ''}" data-iv-plandates aria-label="${esc('Plan dates: ' + dt + '. Change')}" title="Change the plan dates">${esc(dt)}</button>` : `<span class="iv-dtc${D.over ? ' w' : ''}">${esc(dt)}</span>`) : '';
|
|
117
|
-
below = `<div class="iv-mio"><div class="iv-mio-h">${dates}<span class="iv-
|
|
119
|
+
below = `<div class="iv-mio${open ? ' on' : ''}"><div class="iv-mio-h">${dates}<span class="iv-mio-b">${more}${pri ? '' : nextHtml(st, o, false)}</span></div>${msListHtml(v, o)}</div>`;
|
|
118
120
|
}
|
|
119
121
|
return `<div class="iv-sc iv-mis" aria-label="${esc(st.aria || 'Stage · ' + st.name)}">${head}${pic}${below}</div>`;
|
|
120
122
|
}
|
|
@@ -172,10 +174,11 @@ function taskHtml(x, o, arch) {
|
|
|
172
174
|
// the box marks done in one press; its caret opens the status picker right under it (an archived task has only the caret)
|
|
173
175
|
const car = o.quick && x.uid ? `<button type="button" class="iv-car" data-iv-stat="${esc(x.uid)}" data-st="${esc(x.status)}" data-ms="${x.ms ? 1 : 0}" aria-haspopup="dialog" aria-label="${esc('Change the status: ' + x.title)}" title="Status">${SVG(P.down, 10, 2.6)}</button>` : '';
|
|
174
176
|
const cls = ['iv-cb', x.done ? 'on' : '', x.prog ? 'pr' : '', x.wont ? 'wo' : ''].filter(Boolean).join(' ');
|
|
175
|
-
const chk = x.jkey && !x.dr ? `<span class="iv-bxw"
|
|
177
|
+
const chk = x.jkey && !x.dr ? `<span class="iv-bxw">${TV.jqMark(x)}${arch ? car : ''}</span>` : x.dr ? `<span class="iv-bxw"><span class="iv-cb dr" aria-hidden="true"></span>${car}</span>` : x.canCheck && !arch ? `<span class="iv-bxw"><button type="button" class="${cls}" data-iv-check="${esc(x.uid)}" aria-pressed="${x.done}" aria-label="${esc((x.done ? 'Reopen: ' : 'Mark done: ') + x.title)}" title="${x.done ? 'Reopen' : 'Mark done'}">${x.done ? SVG(P.check, 12, 3) : ''}</button>${car}</span>`
|
|
176
178
|
: `<span class="iv-bxw"><span class="iv-cb off${x.done ? ' on' : ''}" aria-hidden="true">${x.done ? SVG(P.check, 12, 3) : ''}</span>${arch ? car : ''}</span>`;
|
|
177
|
-
// a task
|
|
178
|
-
|
|
179
|
+
// a task linked to the Jira ticket it names looks like the ticket rows beside it (batch 14 item 6): the Jira square, the key in blue.
|
|
180
|
+
// A key PMOS has not read is only text: a plain task with its box (0.442.0 hotfix)
|
|
181
|
+
const name = TV.keyName(x);
|
|
179
182
|
const t = (o.openTask && x.uid && !x.dr ? `<button type="button" class="iv-tt" data-iv-task="${esc(x.uid)}">${name}</button>` : `<b class="iv-tt">${name}</b>`) + TV.msGlyph(x) + TV.addedMark(x);
|
|
180
183
|
// the meta: In progress, the dates (a press: the start and due picker opens under them), the late days, the owner
|
|
181
184
|
let meta = x.sub ? `<span class="${x.late ? 'w' : ''}">${esc(x.sub)}</span>` : '';
|
|
@@ -266,7 +269,7 @@ function tasksHtml(v0, o) {
|
|
|
266
269
|
// links (batch 11 item 15): the blue ✦ (proposals), the grey ✦ (quiet moves), the late count, between the count and the version chip
|
|
267
270
|
const lk = T.empty ? null : LK.of(v);
|
|
268
271
|
o = { ...o, lk };
|
|
269
|
-
const head = `<div class="iv-th"><b>Tasks</b>${cnt ? `<span class="n">${esc(cnt)}</span>` : ''}${LK.headHtml(lk)}${VS.headHtml(v.vs)}<span class="iv-sp"></span>${T.empty ? '' : G.headHtml(v) + TV.viewBtnHtml(mode)}${VS.liveHtml(v.vs)}${add}</div>`
|
|
272
|
+
const head = `<div class="iv-th"><b>Tasks</b>${cnt ? `<span class="n">${esc(cnt)}</span>` : ''}${LK.headHtml(lk)}${VS.headHtml(v.vs)}<span class="iv-sp"></span>${T.empty ? '' : G.headHtml(v) + TV.viewBtnHtml(mode) + TV.fullBtnHtml(mode)}${VS.liveHtml(v.vs)}${add}</div>`
|
|
270
273
|
+ (o.adding ? `<form class="iv-addf" data-iv-addform><input id="ivAddTask" type="text" maxlength="160" autocomplete="off" placeholder="A task for ${esc(v.title)}${o.addHint ? esc(', ' + o.addHint) : ''}" aria-label="New task"><button type="submit" class="iv-go" aria-label="Add the task" title="Add (Enter). Esc cancels.">${SVG(P.check, 16, 2.2)}</button></form>` : '');
|
|
271
274
|
// while Claude looks for a new initiative elsewhere, Tasks waits for what it finds (PiA1)
|
|
272
275
|
if (T.empty && PP.lookHtml(v)) return head + PP.lookHtml(v);
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
* each row's name, target and where it is measured; ✓ saves them (POST /api/metric-drafts/edit, one per changed row), × puts them back, and the
|
|
18
18
|
* chat icon asks Claude in Home for anything else. Discuss goes to Home's chat. Nothing is kept until the PM's ✓ keep. */
|
|
19
19
|
import { pmPost } from './http.js';
|
|
20
|
+
import { rhythmOf } from './goals-clear.js'; // the Kept toast says the goal's own rhythm (batch 18 item 11)
|
|
20
21
|
import { adler } from './cozy-adler.js'; // Claude drafted it unasked, so Adler holds the card (batch 16 item 2, canvas AdM3)
|
|
21
22
|
|
|
22
23
|
(function sheet() { // once, at import: the parts show on the Board and in Home's Viewer, and the look must come with them on both
|
|
@@ -196,7 +197,9 @@ export function press(b, h = {}) {
|
|
|
196
197
|
}
|
|
197
198
|
one.busy = false;
|
|
198
199
|
if (!r || !r.ok) { say((r && r.error) || (a === 'keep' ? 'Not kept. The server did not say why.' : 'Not undone. The server did not say why.')); redraw(); return; }
|
|
199
|
-
|
|
200
|
+
// batch 18 item 11: "Kept" names the goal's own rhythm (the server's rhythm.txt, else the drafted recipe), never "every morning"
|
|
201
|
+
if (a === 'keep') { const rh = r.rhythm && r.rhythm.txt ? r.rhythm.txt : (rhythmOf(rowsOf(one.d).find((x) => x.state === 'open' && (x.rhythm || x.recipe))) || {}).long;
|
|
202
|
+
say(scope === 'program' ? 'Kept. I read the goal ' + (rh || 'on its own rhythm') + '.' : 'Kept. I read the success measure ' + (rh || 'on its own rhythm') + ' after the release.'); }
|
|
200
203
|
else say('Undone. It is a proposal again.');
|
|
201
204
|
await again(scope, id, redraw);
|
|
202
205
|
})();
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
export const W = 340, H = 100;
|
|
26
26
|
const GY = 78; // the ground line
|
|
27
|
-
export const PX = W - 62, PY =
|
|
27
|
+
export const PX = W - 62, PY = 27; // the target planet, near the right end, high in the sky (Wawan 12:27: far enough to fly to)
|
|
28
28
|
const DX = W - 16; // the dish, at the right edge
|
|
29
29
|
const TX = 30; // the telescope, near the left end
|
|
30
30
|
export const HIT = 44; // a press's square, in px (the picture draws about 1 px a unit)
|
|
@@ -142,7 +142,7 @@ export function missionSvg(M, o = {}) {
|
|
|
142
142
|
const crowd = crowded(pointsOf(M));
|
|
143
143
|
let s = `<defs><linearGradient id="${id}k" x1="0" y1="0" x2="0" y2="1"><stop offset="0" class="mi-s0"/><stop offset="1" class="mi-s1"/></linearGradient>`
|
|
144
144
|
+ `<linearGradient id="${id}x" x1="0" x2="1"><stop offset="0" class="mi-t0"/><stop offset="1" class="mi-t1"/></linearGradient></defs>`;
|
|
145
|
-
s += `<rect x="0" y="0" width="${W}" height="${H}"
|
|
145
|
+
s += `<rect x="0" y="0" width="${W}" height="${H}" fill="url(#${id}k)"/>`; // the corners are the box's (ini-view.css .iv-mi)
|
|
146
146
|
// the stars
|
|
147
147
|
[[30, 12, 1], [84, 26, 0.8], [124, 9, 1.2], [160, 30, 0.9], [250, 12, 1], [292, 30, 0.8], [W - 26, 8, 1]].forEach(([x, y, r], k) => {
|
|
148
148
|
s += `<circle class="mi-tw mi-star mi-d${k}" transform-origin="${x} ${y}" cx="${x}" cy="${y}" r="${r}"/>`;
|
|
@@ -176,7 +176,9 @@ export function missionSvg(M, o = {}) {
|
|
|
176
176
|
+ '<rect x="-4" y="-2.6" width="15" height="5.2" rx="2" class="mi-wh mi-ln" stroke-width="1.1"/><rect x="10" y="-3.4" width="3" height="6.8" rx="1" class="mi-lens mi-ln" stroke-width=".9"/></g></g></g>';
|
|
177
177
|
if (seeking && !M.empty) s += `<line class="mi-beam" x1="${TX + 10}" y1="${GY - 19}" x2="${PX - 12}" y2="${PY + 4}" stroke-width="1.2" stroke-dasharray="2 5" aria-hidden="true"/>`;
|
|
178
178
|
// Plan to Build: the pad at the start of Build; the rocket is a blueprint, then built from the bottom up; past Build 50% it flies
|
|
179
|
-
|
|
179
|
+
// the pad stands in the middle, as the telescope stands left and the dish right (Wawan 12:26): the props keep their places, only the
|
|
180
|
+
// stages under them follow the dates
|
|
181
|
+
const bx = W / 2;
|
|
180
182
|
const fin = M.late ? 'mi-fin late' : 'mi-fin';
|
|
181
183
|
s += `<g aria-hidden="true"><rect x="${f1(bx - 12)}" y="${GY - 1}" width="24" height="3" rx="1.5" class="mi-pad"/>`
|
|
182
184
|
+ `<path d="M${f1(bx - 14)} ${GY} L${f1(bx - 14)} ${GY - 34} M${f1(bx - 14)} ${GY - 26} L${f1(bx - 6)} ${GY - 26} M${f1(bx - 14)} ${GY - 14} L${f1(bx - 6)} ${GY - 14}" fill="none" class="mi-padl" stroke-width="1.2"/></g>`;
|
|
@@ -191,7 +193,7 @@ export function missionSvg(M, o = {}) {
|
|
|
191
193
|
s += b + '</g>';
|
|
192
194
|
} else {
|
|
193
195
|
s += `<g class="mi-puff" aria-hidden="true"><circle cx="${f1(bx - 6)}" cy="${GY - 3}" r="3.5" class="mi-smoke"/><circle cx="${f1(bx + 5)}" cy="${GY - 4}" r="4" class="mi-smoke"/></g>`;
|
|
194
|
-
const p0 = [bx, GY - 20], c1 = [bx +
|
|
196
|
+
const p0 = [bx, GY - 20], c1 = [bx + 10, 4], p1 = [PX - 12, PY - 9]; // it comes down onto the planet's upper left
|
|
195
197
|
const bz = (u) => [(1 - u) ** 2 * p0[0] + 2 * (1 - u) * u * c1[0] + u * u * p1[0], (1 - u) ** 2 * p0[1] + 2 * (1 - u) * u * c1[1] + u * u * p1[1]];
|
|
196
198
|
const all = Array.from({ length: 41 }, (_, i) => bz(i / 40)), pts = Array.from({ length: 41 }, (_, i) => bz((i / 40) * M.fly));
|
|
197
199
|
let len = 0; for (let i = 0; i < 40; i++) len += Math.hypot(pts[i + 1][0] - pts[i][0], pts[i + 1][1] - pts[i][1]);
|
|
@@ -199,14 +201,16 @@ export function missionSvg(M, o = {}) {
|
|
|
199
201
|
if (!M.landed) s += `<path d="${d(all)}" fill="none" class="mi-path" stroke-width="1.4" stroke-dasharray="1.5 5" aria-hidden="true"/>`;
|
|
200
202
|
s += `<path class="mi-vn" d="${d(pts)}" fill="none" stroke="url(#${id}x)" stroke-width="${M.landed ? 2.4 : 3}" stroke-linecap="round" opacity="${M.landed ? 0.45 : 1}" pathLength="100" aria-hidden="true"/>`;
|
|
201
203
|
let rx, ry, a, flame = '';
|
|
202
|
-
if (M.landed) { rx = PX -
|
|
204
|
+
if (M.landed) { rx = PX - 5; ry = PY - 11; a = -12; }
|
|
203
205
|
else {
|
|
204
206
|
[rx, ry] = pts[40];
|
|
205
207
|
a = (Math.atan2(pts[40][1] - pts[38][1], pts[40][0] - pts[38][0]) * 180) / Math.PI + 90;
|
|
206
208
|
if (!M.hold) flame = '<g class="mi-flame"><path d="M-3.4 1 Q0 12 3.4 1Z" class="mi-fo"/><path d="M-1.8 1 Q0 7 1.8 1Z" class="mi-fy"/></g>';
|
|
207
209
|
}
|
|
208
|
-
|
|
209
|
-
|
|
210
|
+
// the farther it flies the smaller it looks (Wawan 12:27): from .8 on the pad's side to .4 at the planet
|
|
211
|
+
const sc = M.landed ? 0.4 : 0.8 - 0.4 * M.fly;
|
|
212
|
+
s += `<g class="${M.landed ? '' : 'mi-rk'}" role="img" aria-label="${M.landed ? 'Landed at the release' : 'Flying to the release'}"><g transform="translate(${f1(rx)} ${f1(ry)}) rotate(${a.toFixed(1)}) scale(${sc.toFixed(2)})">${flame}${rocketBody(fin)}</g></g>`;
|
|
213
|
+
if (M.landed) s += `<g aria-hidden="true"><rect x="${PX + 5}" y="${PY - 20}" width="1.4" height="9" class="mi-pole"/><path class="mi-flag" transform-origin="${PX + 6} ${PY - 19}" d="M${PX + 6.4} ${PY - 20} L${PX + 14} ${PY - 17.5} L${PX + 6.4} ${PY - 15}Z"/></g>`;
|
|
210
214
|
}
|
|
211
215
|
// Monitor: the dish listens; the last milestone lights it green
|
|
212
216
|
let dish = `<path d="M${DX} ${GY} L${DX} ${GY - 10}" class="mi-ln" stroke-width="1.2"/>`
|