create-pmos 0.428.0 → 0.430.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 +25 -25
- 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/briefing-premium-board-test.js +4 -4
- package/workspace/briefing-premium-insights-test.js +82 -61
- package/workspace/briefing-premium-metrics-test.js +5 -3
- package/workspace/briefing-premium-sources-test.js +5 -5
- package/workspace/briefing-premium-test.js +5 -4
- package/workspace/changelog.json +24 -0
- package/workspace/ev-everywhere-test.js +2 -2
- package/workspace/guide/adler.md +45 -0
- package/workspace/guide/briefing-premium.md +2 -0
- package/workspace/guide/home.md +4 -2
- package/workspace/guide/index.md +2 -0
- package/workspace/guide/metric-drafts.md +49 -0
- package/workspace/guide/programs.md +2 -0
- package/workspace/intel-report-ui-test.js +189 -0
- package/workspace/intelligence-gaps-ui-test.js +168 -0
- package/workspace/lib/board-metrics-premium.js +1 -1
- package/workspace/lib/headless.js +15 -2
- package/workspace/lib/initiative-writer.js +16 -2
- package/workspace/lib/insight-moves.js +135 -0
- package/workspace/lib/insights-premium.js +9 -4
- package/workspace/lib/insights-records.js +14 -5
- package/workspace/lib/intel-report.js +432 -0
- package/workspace/lib/metric-draft-runs.js +193 -0
- package/workspace/lib/metric-drafts.js +261 -0
- package/workspace/lib/metrics-cli.js +104 -0
- package/workspace/lib/page-opens.js +74 -0
- package/workspace/lib/pmos-verbs.js +3 -0
- package/workspace/lib/report-setups.js +29 -13
- package/workspace/lib/route-modules.js +3 -0
- package/workspace/lib/routes-insight-moves.js +119 -0
- package/workspace/lib/routes-insights-premium.js +12 -3
- package/workspace/lib/routes-insights-records.js +13 -5
- package/workspace/lib/routes-metric-drafts.js +150 -0
- package/workspace/lib/routes-page-opens.js +26 -0
- package/workspace/lib/routes-phone-day.js +13 -2
- package/workspace/lib/routes-report-setups.js +97 -3
- package/workspace/lib/routes-viewer.js +5 -2
- package/workspace/lib/settings-store.js +6 -0
- package/workspace/metric-drafts-ui-test.js +209 -0
- package/workspace/milestone-suggest-test.js +4 -4
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/premium-phone-card-test.js +8 -5
- package/workspace/premium-viewer-flicker-test.js +1 -1
- package/workspace/public/pm/bd-acts.js +3 -3
- package/workspace/public/pm/bd-pin-card.css +4 -4
- package/workspace/public/pm/bd-prog-panel.js +12 -7
- package/workspace/public/pm/bd-prog.js +2 -2
- package/workspace/public/pm/cozy-adler.css +82 -0
- package/workspace/public/pm/cozy-adler.js +270 -0
- package/workspace/public/pm/cozy-aud.css +1 -1
- package/workspace/public/pm/cozy-board.css +256 -256
- package/workspace/public/pm/cozy-ev.css +48 -45
- package/workspace/public/pm/cozy-evmodel.js +1 -1
- package/workspace/public/pm/cozy-home-rows.css +23 -23
- package/workspace/public/pm/cozy-home.css +211 -207
- package/workspace/public/pm/cozy-insights.css +221 -108
- package/workspace/public/pm/cozy-live-pill.css +5 -5
- package/workspace/public/pm/cozy-mtg-present.css +23 -23
- package/workspace/public/pm/cozy-nav.js +3 -1
- package/workspace/public/pm/cozy-news.js +2 -2
- package/workspace/public/pm/cozy-panel.css +29 -29
- package/workspace/public/pm/cozy-pick.css +5 -5
- package/workspace/public/pm/cozy-rec-now.css +20 -20
- package/workspace/public/pm/cozy-rec-present.css +11 -11
- package/workspace/public/pm/cozy-rec-tab.css +13 -13
- package/workspace/public/pm/cozy-search.js +4 -2
- package/workspace/public/pm/cozy-settings.js +16 -3
- package/workspace/public/pm/cozy-steps.css +9 -9
- package/workspace/public/pm/cozy-today.css +122 -71
- package/workspace/public/pm/cozy-viewer.css +7 -7
- package/workspace/public/pm/cozy-viewer.js +1 -1
- package/workspace/public/pm/cozy-vw-mtg.css +81 -81
- package/workspace/public/pm/cozy-vw-rp.css +53 -53
- package/workspace/public/pm/cozy-vw-shell.css +23 -23
- package/workspace/public/pm/cozy-vw.css +117 -117
- package/workspace/public/pm/cozy-xv.css +11 -11
- package/workspace/public/pm/cozy.css +34 -15
- package/workspace/public/pm/hi-pop.css +19 -19
- package/workspace/public/pm/home-app.js +33 -9
- package/workspace/public/pm/home-chat.js +10 -2
- package/workspace/public/pm/home-day.js +155 -27
- package/workspace/public/pm/home-ini.css +32 -32
- package/workspace/public/pm/home-line.css +7 -7
- package/workspace/public/pm/home-list.js +12 -1
- package/workspace/public/pm/home-phone-card.js +18 -15
- package/workspace/public/pm/home-today.js +5 -3
- package/workspace/public/pm/ini-view-model.js +1 -1
- package/workspace/public/pm/ini-view.css +108 -102
- package/workspace/public/pm/ini-view.js +22 -3
- package/workspace/public/pm/loose-props.css +13 -13
- package/workspace/public/pm/metric-drafts.css +89 -0
- package/workspace/public/pm/metric-drafts.js +204 -0
- package/workspace/public/pm/ms-suggest.css +8 -8
- package/workspace/public/pm/ms-suggest.js +2 -1
- package/workspace/public/pm/ov-view.css +12 -12
- package/workspace/public/pm/premium-board.js +2 -2
- package/workspace/public/pm/premium-chart-tab.js +6 -6
- package/workspace/public/pm/premium-insights.js +364 -107
- package/workspace/public/pm/premium-report-intel.css +56 -0
- package/workspace/public/pm/premium-report-intel.js +232 -0
- package/workspace/public/pm/premium-shell.js +2 -2
- package/workspace/public/pm/premium-vw-cal.js +1 -1
- package/workspace/public/pm/premium-vw-file.js +2 -2
- package/workspace/public/pm/premium-welcome.js +3 -2
- package/workspace/public/pm/premium.css +130 -128
- package/workspace/public/pm/prog-order.css +6 -6
- package/workspace/public/pm/program-charter.css +23 -23
- package/workspace/public/pm/program-model.js +7 -0
- package/workspace/public/pm/rp-parts.js +2 -2
- package/workspace/public/pm/sort-order.css +1 -1
- package/workspace/public/pm/split-merge.css +15 -15
- package/workspace/public/pm/split-merge.js +2 -1
- package/workspace/public/pm/task-card.css +21 -21
- package/workspace/public/pm/tk-tasks.css +37 -37
- package/workspace/public/pm/tk-view.css +6 -6
- package/workspace/public/pm/wf-page.css +28 -28
- package/workspace/public/premium-intelligence.html +82 -0
- package/workspace/server.js +38 -3
- package/workspace/skills/metric-draft.skill +47 -0
- package/workspace/test-lists/intel-report-ui.json +5 -0
- package/workspace/test-lists/intel-report.json +9 -0
- package/workspace/test-lists/intelligence-gaps-ui.json +5 -0
- package/workspace/test-lists/intelligence-gaps.json +5 -0
- package/workspace/test-lists/metric-drafts-ui.json +5 -0
- package/workspace/test-lists/metric-drafts.json +9 -0
- package/workspace/test-run.js +3 -0
- package/workspace/public/premium-insights.html +0 -81
|
@@ -7,7 +7,9 @@
|
|
|
7
7
|
* the meta line: the status when something waits, the owner, the workflow, the program), the stage card (the stage's
|
|
8
8
|
* number and name, how much of its section is done, the day clock and the → to the next stage, then its one line:
|
|
9
9
|
* each stage on its own dates with the milestone tasks as ◇, pm/stage-line.js, batch 11 item 21), Tasks as the WBS
|
|
10
|
-
* (sections in workflow order), then Documents and Linked as folds.
|
|
10
|
+
* (sections in workflow order), then Documents and Linked as folds. Under the stage card, the success measure Claude
|
|
11
|
+
* drafted from the PRD (pm/metric-drafts.js, GET /api/metric-drafts scope initiative): the proposal, or once kept its
|
|
12
|
+
* fold with Undo; nothing when nothing is drafted.
|
|
11
13
|
* o: { add (the Tasks + icon), adding (the inline field is open), next (the next stage is a press: Home's move sheet), openTask, docs: { n, html? } | null,
|
|
12
14
|
* quick (each task's box carries the status caret and its date is a press: the host has h.status and h.dates),
|
|
13
15
|
* draft (the empty breakdown's Draft it), program (the chip opens the program), wf (the workflow on the meta line opens the Change picker) }
|
|
@@ -35,6 +37,7 @@ import * as PP from './ini-props.js'; // what Claude proposes, under the one b
|
|
|
35
37
|
import * as G from './ini-groups.js'; // Group by and Send to Jira, in place of the old All tasks panel (batch 11 item 20)
|
|
36
38
|
import { cardHtml as smCard, mergedHtml as smMerged } from './split-merge.js'; // split or merge: Claude's card, the merged summary (batch 11 item 14)
|
|
37
39
|
import { lineHtml, fitLine } from './stage-line.js'; // the stage card's one line (batch 11 item 21)
|
|
40
|
+
import * as MD from './metric-drafts.js'; // the success measure Claude drafts from the PRD (batch 15 item 1, canvas Iq9Initiative)
|
|
38
41
|
|
|
39
42
|
const CSS = new URL('./ini-view.css', import.meta.url).href;
|
|
40
43
|
if (typeof document !== 'undefined' && document.head && !document.querySelector(`link[href="${CSS}"]`)) {
|
|
@@ -63,6 +66,19 @@ function summaryHtml(s, o = {}) {
|
|
|
63
66
|
: `<span class="iv-wf">${wfIcon(s.wf, 15)}${esc(s.wf.name || 'Product feature')}</span>`);
|
|
64
67
|
if (s.program) meta.push(`<button type="button" class="iv-prog" data-iv-program="${esc(s.program.id)}" title="Open the program ${esc(s.program.title)}">${SVG(P.prog, 15)}${esc(s.program.title)}</button>`);
|
|
65
68
|
if (!s.line && !s.text && !go) return '';
|
|
69
|
+
// nothing to say beyond the status (batch 16 item 7, "feels like wasting space"): one row. The owner is the avatar, the workflow its icon,
|
|
70
|
+
// each named on hover and to a reader; the program keeps its name, because it is a press
|
|
71
|
+
if (!s.text && !go) {
|
|
72
|
+
const m = [];
|
|
73
|
+
if (s.status) m.push(`<span class="iv-st ${esc(s.status.tone)}"><i aria-hidden="true"></i>${esc(s.status.text)}</span>`);
|
|
74
|
+
m.push(s.owner ? `<span class="iv-who" title="${esc('Owner: ' + s.owner.name)}"><span class="iv-av" aria-hidden="true">${esc(s.owner.av)}</span><span class="iv-sr">${esc(s.owner.name)}</span></span>` : '<span class="iv-who q">No owner</span>');
|
|
75
|
+
const wn = s.wf ? s.wf.name || 'Product feature' : '';
|
|
76
|
+
if (s.wf) m.push(o.wf ? `<button type="button" class="iv-wf" data-iv-wf aria-haspopup="listbox" aria-label="${esc('Workflow: ' + wn + '. Change')}" title="${esc('Workflow: ' + wn + '. Change')}">${wfIcon(s.wf, 15)}<span class="iv-sr">${esc(wn)}</span></button>`
|
|
77
|
+
: `<span class="iv-wf" title="${esc('Workflow: ' + wn)}">${wfIcon(s.wf, 15)}<span class="iv-sr">${esc(wn)}</span></span>`);
|
|
78
|
+
if (s.program) m.push(`<button type="button" class="iv-prog" data-iv-program="${esc(s.program.id)}" title="Open the program ${esc(s.program.title)}">${SVG(P.prog, 15)}${esc(s.program.title)}</button>`);
|
|
79
|
+
return `<section class="iv-sum iv-one" aria-label="Summary"><div class="iv-s1 ${dot}">${dot && dot !== 'ok' ? '<span class="iv-dot" aria-hidden="true"></span>' : ''}<b>${esc(s.line)}</b>`
|
|
80
|
+
+ `<p class="iv-meta">${m.join('')}</p>${s.right ? `<span class="iv-r">${esc(s.right)}</span>` : ''}</div></section>`;
|
|
81
|
+
}
|
|
66
82
|
return `<section class="iv-sum" aria-label="Summary"><div class="iv-s1 ${dot}">${dot && dot !== 'ok' ? '<span class="iv-dot" aria-hidden="true"></span>' : ''}<b>${esc(s.line)}</b>`
|
|
67
83
|
+ `${s.right ? `<span class="iv-r">${esc(s.right)}</span>` : ''}${go}</div>${s.text ? `<p class="iv-why">${esc(s.text)}</p>` : ''}`
|
|
68
84
|
+ `<p class="iv-meta">${meta.join('<span class="iv-sep" aria-hidden="true">·</span>')}</p></section>`;
|
|
@@ -229,7 +245,7 @@ export function viewHtml(v, o = {}) {
|
|
|
229
245
|
if (v && v.id) VIEWED.set(v.id, v);
|
|
230
246
|
// a merged initiative leads with where its work went, and draws no stage or tasks (they moved; its folds stay); an open one shows Claude's split or merge card under the summary (batch 11 item 14)
|
|
231
247
|
const top = v.merged ? smMerged(v.merged) : summaryHtml(v.summary, o) + (o.sm !== false ? smCard(v.suggest, v.title) : '');
|
|
232
|
-
return `<div class="iv" data-iv="${esc(v.id || v.key || '')}">${top}${v.merged ? '' : stageHtml(v.stage, o, v.id || v.key || '') + tasksHtml(v, o)}${foldsHtml(v, o)}${o.tail || ''}</div>`;
|
|
248
|
+
return `<div class="iv" data-iv="${esc(v.id || v.key || '')}">${top}${v.merged ? '' : stageHtml(v.stage, o, v.id || v.key || '') + MD.iniHtml(v.id, '', v.title) + tasksHtml(v, o)}${foldsHtml(v, o)}${o.tail || ''}</div>`;
|
|
233
249
|
}
|
|
234
250
|
|
|
235
251
|
/* ── the presses ── */
|
|
@@ -238,7 +254,9 @@ export function wireView(body, h) {
|
|
|
238
254
|
const idOf = () => { const n = body.querySelector('[data-iv]'); return n ? n.dataset.iv : null; };
|
|
239
255
|
body.__iv = LK.wrap(VS.wrap(h, body, (id) => SHOWN.get(id)), idOf);
|
|
240
256
|
// the one blue ✦ after the title (pm/ini-props.js), drawn again with each draw of the initiative
|
|
241
|
-
const chip = () => { const id = idOf(); if (id && VIEWED.has(id)) PP.sync(VIEWED.get(id), body.__iv || {}); };
|
|
257
|
+
const chip = () => { const id = idOf(); if (id && VIEWED.has(id)) PP.sync(VIEWED.get(id), body.__iv || {}); drafts(id); };
|
|
258
|
+
// the success measure Claude drafted: read once per page load, the view draws again when it arrives
|
|
259
|
+
const drafts = (id) => { const H = body.__iv || {}; if (id && VIEWED.has(id)) MD.want(((H.where && H.where()) || {}).ws || '', 'initiative', id, () => { if (idOf() === id && H.redraw) H.redraw(); }); };
|
|
242
260
|
chip();
|
|
243
261
|
G.attach(body, body.__iv); // the layout and the drafted tickets of the initiative shown (batch 11 item 20)
|
|
244
262
|
if (body.__ivWired) return;
|
|
@@ -255,6 +273,7 @@ export function wireView(body, h) {
|
|
|
255
273
|
const root = b.closest('[data-iv]'); if (!root) return;
|
|
256
274
|
const id = root.dataset.iv;
|
|
257
275
|
const d = b.dataset;
|
|
276
|
+
if (d.md && MD.press(b, { redraw: H.redraw, toast: H.toast })) { e.preventDefault(); return; }
|
|
258
277
|
if (VS.press(b, d, root, H)) return;
|
|
259
278
|
if (G.press(b, d, root, H)) return;
|
|
260
279
|
if (LK.press(b, d, root, { ...H, __dates: (x) => TV.press(x, { ivtBar: x.dataset.ivtBar }, root, H, e) })) return;
|
|
@@ -3,19 +3,19 @@
|
|
|
3
3
|
.hv-lhw { position: relative; }
|
|
4
4
|
.hv-lhw.has-chip .hv-lh .nl { margin-right: 64px; }
|
|
5
5
|
.hv-lhw.has-chip .hv-lh .nl:empty { margin-right: 58px; }
|
|
6
|
-
.lp-chip { position: absolute; right: 34px; top: calc(50% + 6px); transform: translateY(-50%); display: inline-flex; align-items: center; gap: 3px; height: 26px; padding: 0 9px 0 7px; border-radius: 999px; border: 1.5px solid var(--cz-blue); background: var(--cz-card); color: var(--cz-blueink); font: inherit; font-size:
|
|
6
|
+
.lp-chip { position: absolute; right: 34px; top: calc(50% + 6px); transform: translateY(-50%); display: inline-flex; align-items: center; gap: 3px; height: 26px; padding: 0 9px 0 7px; border-radius: 999px; border: 1.5px solid var(--cz-blue); background: var(--cz-card); color: var(--cz-blueink); font: inherit; font-size: var(--fs-2); font-weight: 800; cursor: pointer; }
|
|
7
7
|
.lp-chip:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 2px; }
|
|
8
8
|
@media (hover: hover) { .lp-chip:hover { background: var(--cz-bluebg); } }
|
|
9
9
|
@media (max-width: 760px) { .lp-chip { height: 32px; } .lp-chip::after { content: ''; position: absolute; inset: -6px; } }
|
|
10
10
|
|
|
11
11
|
.lp { display: flex; flex-direction: column; gap: 10px; padding: 0 16px 24px; }
|
|
12
|
-
.lp-intro { margin: 2px 0 4px; font-size:
|
|
13
|
-
.lp-sec h4 { margin: 8px 0 2px; font-size:
|
|
12
|
+
.lp-intro { margin: 2px 0 4px; font-size: var(--fs-2); line-height: 1.5; color: var(--cz-ink2); max-width: 600px; }
|
|
13
|
+
.lp-sec h4 { margin: 8px 0 2px; font-size: var(--fs-2); font-weight: 700; color: var(--cz-ink3); }
|
|
14
14
|
.lp-p { padding: 4px 0; }
|
|
15
15
|
.lp-ph { display: flex; align-items: flex-start; gap: 8px; padding: 6px 0; }
|
|
16
16
|
.lp-ph .w, .lp-r .w, .lp-hr .w { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
|
|
17
|
-
.lp-ph b { font-size:
|
|
18
|
-
.lp-ph small, .lp-r small, .lp-hr small { font-size:
|
|
17
|
+
.lp-ph b { font-size: var(--fs-3); font-weight: 800; color: var(--cz-ink); }
|
|
18
|
+
.lp-ph small, .lp-r small, .lp-hr small { font-size: var(--fs-2); color: var(--cz-ink2); line-height: 1.4; display: inline-flex; align-items: center; gap: 4px; }
|
|
19
19
|
.lp-ic { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; color: var(--cz-blueink); flex: none; margin-top: 1px; }
|
|
20
20
|
.lp-ib { all: unset; box-sizing: border-box; cursor: pointer; width: 32px; height: 32px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; color: var(--cz-ink2); flex: none; }
|
|
21
21
|
.lp-ib.ok { color: var(--cz-blueink); }
|
|
@@ -24,31 +24,31 @@
|
|
|
24
24
|
@media (hover: hover) { .lp-ib:hover { background: var(--cz-well); color: var(--cz-ink); } }
|
|
25
25
|
.lp-rows { display: flex; flex-direction: column; margin: 2px 0 6px 12px; padding-left: 22px; border-left: 2px solid var(--cz-hair); }
|
|
26
26
|
.lp-r { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 3px 0; }
|
|
27
|
-
.lp-r b { font-size:
|
|
27
|
+
.lp-r b { font-size: var(--fs-3); font-weight: 600; color: var(--cz-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
28
28
|
.lp-r.out b { text-decoration: line-through; color: var(--cz-ink3); }
|
|
29
29
|
.lp-mk { width: 16px; flex: none; display: inline-flex; align-items: center; justify-content: center; color: var(--cz-ink3); margin-left: -4px; }
|
|
30
30
|
.lp-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cz-blue); display: inline-block; }
|
|
31
31
|
.lp-late { width: 9px; height: 9px; border-radius: 2px; background: var(--cz-risk); display: inline-block; }
|
|
32
32
|
.lp-tile { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: 2px; height: 28px; padding: 0 6px 0 8px; border-radius: 999px; background: var(--cz-well); color: var(--cz-blueink); flex: none; }
|
|
33
|
-
.lp-tile b { font-size:
|
|
33
|
+
.lp-tile b { font-size: var(--fs-1); font-weight: 800; letter-spacing: .02em; }
|
|
34
34
|
.lp-tile.on { box-shadow: 0 0 0 1.5px var(--cz-blue); background: var(--cz-card); }
|
|
35
35
|
.lp-tile.moved { background: var(--cz-bluebg); }
|
|
36
|
-
.lp-more { all: unset; box-sizing: border-box; cursor: pointer; min-height: 36px; padding: 6px 0; font-size:
|
|
36
|
+
.lp-more { all: unset; box-sizing: border-box; cursor: pointer; min-height: 36px; padding: 6px 0; font-size: var(--fs-2); font-weight: 700; color: var(--cz-blueink); }
|
|
37
37
|
.lp-pick { align-self: flex-end; margin: 0 0 6px; width: min(330px, 100%); background: var(--cz-card); border-radius: 18px; box-shadow: 0 24px 60px -24px rgba(42,46,53,.45), 0 0 0 1px var(--cz-hair); padding: 6px; display: flex; flex-direction: column; }
|
|
38
|
-
.lp-pick p { margin: 8px 10px 4px; font-size:
|
|
39
|
-
.lp-pick button { all: unset; box-sizing: border-box; cursor: pointer; min-height: 44px; padding: 6px 10px; border-radius: 12px; display: flex; align-items: center; gap: 10px; font-size:
|
|
38
|
+
.lp-pick p { margin: 8px 10px 4px; font-size: var(--fs-2); font-weight: 700; color: var(--cz-ink3); }
|
|
39
|
+
.lp-pick button { all: unset; box-sizing: border-box; cursor: pointer; min-height: 44px; padding: 6px 10px; border-radius: 12px; display: flex; align-items: center; gap: 10px; font-size: var(--fs-3); font-weight: 700; color: var(--cz-ink); }
|
|
40
40
|
.lp-pick button .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
41
41
|
.lp-pick button[aria-checked="true"] { background: var(--cz-well); }
|
|
42
42
|
.lp-pick button[aria-checked="true"] svg { color: var(--cz-blueink); }
|
|
43
43
|
.lp-pick button.nw { color: var(--cz-ink2); font-weight: 600; }
|
|
44
44
|
@media (hover: hover) { .lp-pick button:hover { background: var(--cz-well); } }
|
|
45
|
-
.lp-tl { width: 26px; height: 26px; border-radius: 8px; background: var(--cz-bluebg); color: var(--cz-blueink); display: inline-flex; align-items: center; justify-content: center; font-size:
|
|
45
|
+
.lp-tl { width: 26px; height: 26px; border-radius: 8px; background: var(--cz-bluebg); color: var(--cz-blueink); display: inline-flex; align-items: center; justify-content: center; font-size: var(--fs-1); font-weight: 800; flex: none; }
|
|
46
46
|
.lp-pick .nw .lp-tl { background: none; color: var(--cz-ink3); }
|
|
47
47
|
.lp-hist { margin-top: 8px; border-top: 1px solid var(--cz-hair); padding-top: 6px; }
|
|
48
|
-
.lp-hist summary { cursor: pointer; min-height: 40px; display: flex; align-items: center; font-size:
|
|
48
|
+
.lp-hist summary { cursor: pointer; min-height: 40px; display: flex; align-items: center; font-size: var(--fs-2); font-weight: 700; color: var(--cz-ink3); list-style: none; }
|
|
49
49
|
.lp-hist summary::-webkit-details-marker { display: none; }
|
|
50
50
|
.lp-hist summary:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 1px; border-radius: 8px; }
|
|
51
51
|
.lp-hr { display: flex; align-items: center; gap: 8px; min-height: 44px; }
|
|
52
|
-
.lp-hr b { font-size:
|
|
52
|
+
.lp-hr b { font-size: var(--fs-3); font-weight: 700; color: var(--cz-ink); }
|
|
53
53
|
.lp-hr.undone b { color: var(--cz-ink3); }
|
|
54
54
|
@media (max-width: 760px) { .lp { padding: 0 12px 24px; } .lp-ib { width: 40px; height: 40px; } .lp-rows { margin-left: 4px; padding-left: 12px; } }
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/* pm/metric-drafts.css — the metrics Claude drafts (pm/metric-drafts.js; canvas Iq9Program, Iq9Initiative). metric-drafts.js loads it once,
|
|
2
|
+
* so it works wherever the program panel or the initiative view opens (Board, Home). Token vars only, over pm/cozy.css; the type scale is
|
|
3
|
+
* cozy.css's --fs-1..--fs-6 (each with its value as the fallback). Every class starts with md-. Motion: one soft fade the first time a part
|
|
4
|
+
* shows, and none when the PM asks for reduced motion. */
|
|
5
|
+
|
|
6
|
+
/* the proposal: a dashed card, Claude's blue */
|
|
7
|
+
.md-card { border: 1px dashed color-mix(in srgb, var(--cz-blueink) 45%, transparent); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px;
|
|
8
|
+
background: linear-gradient(100deg, var(--cz-bluebg) 0%, var(--cz-card) 60%); color: var(--cz-ink); }
|
|
9
|
+
.md-hd { display: flex; align-items: center; gap: 8px; font-size: var(--fs-3); color: var(--cz-blueink); min-width: 0; }
|
|
10
|
+
.md-hd b { font-weight: 800; white-space: nowrap; }
|
|
11
|
+
.md-sp { display: inline-flex; flex: none; }
|
|
12
|
+
.md-src { margin-left: auto; font-size: var(--fs-2); font-weight: 600; color: var(--cz-ink3); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
13
|
+
.md-gl { margin: 0; font-size: var(--fs-4); font-weight: 800; line-height: 1.35; }
|
|
14
|
+
.md-cps { display: flex; flex-wrap: wrap; gap: 6px; }
|
|
15
|
+
.md-cp { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-2); font-weight: 700; color: var(--cz-ink2); background: var(--cz-card); border: 1px solid var(--cz-hair); border-radius: 999px; padding: 3px 10px; }
|
|
16
|
+
.md-dm { width: 9px; height: 9px; transform: rotate(45deg); border-radius: 3px; border: 2px solid var(--pp-prog, var(--cz-ink3)); box-sizing: border-box; flex: none; }
|
|
17
|
+
.md-pill { display: inline-flex; align-items: center; max-width: 100%; font-size: var(--fs-1); font-weight: 800; border-radius: 999px; padding: 2px 8px; white-space: nowrap; background: var(--cz-riskbg); color: var(--cz-risk); }
|
|
18
|
+
|
|
19
|
+
/* Built from: Now and Target */
|
|
20
|
+
.md-bt { display: flex; flex-direction: column; }
|
|
21
|
+
.md-ru { display: grid; grid-template-columns: minmax(0, 1fr) 64px minmax(0, 150px); gap: 10px; align-items: center; font-size: var(--fs-3); padding: 7px 0; border-top: 1px solid var(--cz-hair); }
|
|
22
|
+
.md-ru.q { border-top: 0; padding-top: 0; font-size: var(--fs-2); color: var(--cz-ink3); }
|
|
23
|
+
.md-ru.q span:first-child { font-weight: 800; }
|
|
24
|
+
.md-ru b { font-weight: 800; }
|
|
25
|
+
.md-ru .md-pill { white-space: normal; }
|
|
26
|
+
|
|
27
|
+
/* the success measure's rows: what it is, Now, Target */
|
|
28
|
+
.md-ms { display: flex; flex-direction: column; }
|
|
29
|
+
.md-mr { display: grid; grid-template-columns: minmax(0, 1fr) 56px minmax(0, 110px); gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--cz-hair); font-size: var(--fs-3); }
|
|
30
|
+
.md-mr:first-child { border-top: 0; padding-top: 0; }
|
|
31
|
+
.md-nm { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
|
|
32
|
+
.md-nm b { font-weight: 800; }
|
|
33
|
+
.md-nm small { font-size: var(--fs-2); color: var(--cz-ink3); }
|
|
34
|
+
.md-role { font-size: var(--fs-1); font-weight: 800; color: var(--cz-ink3); }
|
|
35
|
+
.md-now { color: var(--cz-ink2); }
|
|
36
|
+
.md-to { font-weight: 800; }
|
|
37
|
+
|
|
38
|
+
/* the why and the presses */
|
|
39
|
+
.md-ft { display: flex; align-items: center; gap: 6px; }
|
|
40
|
+
.md-why { flex: 1; min-width: 0; margin: 0; font-size: var(--fs-2); line-height: 1.45; color: var(--cz-ink3); }
|
|
41
|
+
.md-why:empty { visibility: hidden; }
|
|
42
|
+
.md-ib { all: unset; box-sizing: border-box; cursor: pointer; width: 36px; height: 36px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; color: var(--cz-ink2); flex: none; }
|
|
43
|
+
.md-ib.solid { background: var(--cz-ink); color: var(--cz-card); }
|
|
44
|
+
.md-ib[disabled] { opacity: .45; cursor: default; }
|
|
45
|
+
@media (hover: hover) { .md-ib:not([disabled]):hover { background: var(--cz-well); color: var(--cz-ink); } .md-ib.solid:not([disabled]):hover { background: var(--cz-ink); color: var(--cz-card); filter: brightness(1.15); } }
|
|
46
|
+
.md-ib:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 2px; }
|
|
47
|
+
|
|
48
|
+
/* kept: the program's Goal row (the panel's own .pp-goal chips), the initiative's fold */
|
|
49
|
+
.md-kept .md-kr b { margin-right: 2px; }
|
|
50
|
+
.md-kept .md-ib { width: 30px; height: 30px; }
|
|
51
|
+
/* the Undo stays at the row's end when the chips wrap */
|
|
52
|
+
.pp-goal.md-kept { position: relative; padding-right: 38px; }
|
|
53
|
+
.pp-goal.md-kept > .md-ib { position: absolute; right: 0; top: 0; }
|
|
54
|
+
.md-kept-i { display: flex; align-items: flex-start; gap: 6px; }
|
|
55
|
+
.md-kept-i .md-folds { flex: 1; min-width: 0; }
|
|
56
|
+
.md-kept-i > .md-ib { margin-top: 6px; }
|
|
57
|
+
.md-ok { display: inline-flex; align-items: center; font-size: var(--fs-1); font-weight: 800; border-radius: 999px; padding: 2px 8px; white-space: nowrap; background: var(--cz-okbg); color: var(--cz-ok); }
|
|
58
|
+
.md-list { display: flex; flex-direction: column; gap: 2px; }
|
|
59
|
+
.md-lr { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; }
|
|
60
|
+
.md-mk { width: 8px; height: 8px; border-radius: 50%; background: var(--cz-dot-ok); flex: none; margin-top: 6px; }
|
|
61
|
+
.md-w { display: flex; flex-direction: column; min-width: 0; }
|
|
62
|
+
.md-w b { font-size: var(--fs-3); font-weight: 800; }
|
|
63
|
+
.md-w span { font-size: var(--fs-2); color: var(--cz-ink3); }
|
|
64
|
+
|
|
65
|
+
/* the wide Viewer (.cz-vw-w2): the part first in the panel sits above the summary, in its column */
|
|
66
|
+
.cz-vw-w2 .cz-vw-body > .md-top { grid-column: 1; max-width: none; }
|
|
67
|
+
|
|
68
|
+
/* a phone: 44 px touch targets; the columns tighten */
|
|
69
|
+
@media (max-width: 760px) {
|
|
70
|
+
.md-ib { width: 44px; height: 44px; }
|
|
71
|
+
.md-kept .md-ib { width: 40px; height: 40px; }
|
|
72
|
+
.pp-goal.md-kept { padding-right: 48px; }
|
|
73
|
+
.md-ru { grid-template-columns: minmax(0, 1fr) 48px minmax(0, 120px); }
|
|
74
|
+
.md-mr { grid-template-columns: minmax(0, 1fr) 44px minmax(0, 90px); }
|
|
75
|
+
.md-hd { flex-wrap: wrap; }
|
|
76
|
+
.md-src { margin-left: 0; flex-basis: 100%; white-space: normal; }
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
80
|
+
.md-in { animation: md-in .3s ease-out both; }
|
|
81
|
+
@keyframes md-in { from { opacity: 0; } to { opacity: 1; } }
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/* the inline edit (batch 16 item 1): each draft as one row of fields, its role over it */
|
|
85
|
+
.md-ed { display: flex; flex-direction: column; gap: 10px; }
|
|
86
|
+
.md-er { display: flex; flex-direction: column; gap: 4px; }
|
|
87
|
+
.md-ef { display: grid; grid-template-columns: minmax(0, 110px) minmax(0, 1fr); gap: 6px; align-items: center; }
|
|
88
|
+
.md-fld { box-sizing: border-box; width: 100%; min-width: 0; height: 32px; border: 1px solid var(--cz-hair); border-radius: 10px; padding: 0 9px; font: inherit; font-size: var(--fs-3); font-weight: 700; background: var(--cz-card); color: var(--cz-ink); }
|
|
89
|
+
.md-fld:focus { outline: 2px solid color-mix(in srgb, var(--cz-blueink) 45%, transparent); outline-offset: 0; border-color: var(--cz-blueink); }
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
/* pm/metric-drafts.js — the metrics Claude drafts without being asked, as the program panel and the initiative view show them (feedback batch 15
|
|
2
|
+
* item 1; canvas Iq9Program, Iq9Initiative). The drafts, the run and the writes are the server's (GET /api/metric-drafts and its POSTs,
|
|
3
|
+
* lib/routes-metric-drafts.js); this module reads them and draws two parts:
|
|
4
|
+
*
|
|
5
|
+
* want(ws, scope, id, onChange) reads GET /api/metric-drafts?ws=&scope=&id= once per page load; onChange() runs when the answer arrives
|
|
6
|
+
* progHtml(p, ws) the program panel's part (scope program), at the top of its body:
|
|
7
|
+
* open rows: the dashed "✦ Proposed goal" card: the goal line, its checkpoints and guardrail as chips, "Built
|
|
8
|
+
* from" (Now, Target, a drafted ticket as a pill), one line of why, then Discuss in Home, Edit and ✓ keep all
|
|
9
|
+
* kept rows: one Goal row of chips, each with a dot (ok: a reading; off: it waits on a ticket), and Undo
|
|
10
|
+
* iniHtml(id, ws, title) the initiative view's part (scope initiative), under the stage card:
|
|
11
|
+
* open rows: "✦ Proposed success measure": Proves it worked, Early signal and Guardrail as Now → Target rows,
|
|
12
|
+
* one line of why, then Edit and ✓ keep all
|
|
13
|
+
* kept rows: the folded "Success measure · Set before the build · N" with its rows, and Undo
|
|
14
|
+
* press(b, h) a press on [data-md]: keep all, Undo, the fold, Edit, Save, Cancel. h: { redraw(), toast(text) }. → true when it was one
|
|
15
|
+
*
|
|
16
|
+
* Zero is silence: no row drafted (or a read that failed) draws nothing. Edit (✎) turns the card's rows into fields in place (batch 16 item 1):
|
|
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
|
+
* chat icon asks Claude in Home for anything else. Discuss goes to Home's chat. Nothing is kept until the PM's ✓ keep. */
|
|
19
|
+
import { pmPost } from './http.js';
|
|
20
|
+
import { adler } from './cozy-adler.js'; // Claude drafted it unasked, so Adler holds the card (batch 16 item 2, canvas AdM3)
|
|
21
|
+
|
|
22
|
+
(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
|
|
23
|
+
if (typeof document === 'undefined' || !document.head || typeof document.getElementById !== 'function' || document.getElementById('mdCss')) return;
|
|
24
|
+
const l = document.createElement('link'); l.id = 'mdCss'; l.rel = 'stylesheet';
|
|
25
|
+
try { l.href = new URL('./metric-drafts.css', import.meta.url).href; } catch { l.href = '/pm/metric-drafts.css'; }
|
|
26
|
+
document.head.appendChild(l);
|
|
27
|
+
})();
|
|
28
|
+
|
|
29
|
+
const esc = (s) => String(s == null ? '' : s).replace(/[&<>"']/g, (c) => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }[c]));
|
|
30
|
+
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>`;
|
|
31
|
+
const I = {
|
|
32
|
+
spark: 'M12 3l1.8 4.7L18.5 9.5l-4.7 1.8L12 16l-1.8-4.7L5.5 9.5l4.7-1.8z', ask: 'M4 5h16v11H9l-5 4z',
|
|
33
|
+
pen: 'M4 20h4l10.5-10.5a2.1 2.1 0 0 0-3-3L5 17v3z', check: 'M5 12l5 5L20 7', undo: 'M9 14L4 9l5-5M4 9h11a5 5 0 0 1 0 10h-3',
|
|
34
|
+
right: 'M10 7l5 5-5 5', down: 'M7 10l5 5 5-5', x: 'M6 6l12 12M18 6L6 18',
|
|
35
|
+
};
|
|
36
|
+
const MON = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
|
37
|
+
const DAY = /^(\d{4})-(\d{2})-(\d{2})/;
|
|
38
|
+
const day = (iso) => { const m = DAY.exec(String(iso || '')); return m ? MON[+m[2] - 1] + ' ' + +m[3] : ''; };
|
|
39
|
+
const month = (iso) => { const m = DAY.exec(String(iso || '')); return m ? MON[+m[2] - 1] + ' ' + m[1] : ''; };
|
|
40
|
+
|
|
41
|
+
/* ── the reads: one per scope and id, per page load ── */
|
|
42
|
+
const READ = new Map(); // scope|id → { ws, d: the GET answer | null, reading, busy }
|
|
43
|
+
const SEEN = new Set(); // scope|id whose part has been drawn once: the soft fade runs on the first draw only, never on a redraw
|
|
44
|
+
const FOLD = new Set(); // initiative ids whose kept success measure is open (it starts folded: summary first)
|
|
45
|
+
const EDIT = new Set(); // scope|id whose proposal is open for an inline edit
|
|
46
|
+
const keyOf = (scope, id) => scope + '|' + id;
|
|
47
|
+
function fetchOne(ws, scope, id) {
|
|
48
|
+
const q = new URLSearchParams({ scope, id }); if (ws) q.set('ws', ws);
|
|
49
|
+
return fetch('/api/metric-drafts?' + q.toString(), { credentials: 'same-origin' }).then((r) => (r.status === 200 ? r.json() : null)).catch(() => null);
|
|
50
|
+
}
|
|
51
|
+
export function want(ws, scope, id, onChange) {
|
|
52
|
+
if (!id || typeof fetch !== 'function') return null;
|
|
53
|
+
const k = keyOf(scope, id), had = READ.get(k);
|
|
54
|
+
if (had && had.ws === (ws || '')) return had;
|
|
55
|
+
const one = { ws: ws || '', d: null, reading: true, busy: false };
|
|
56
|
+
READ.set(k, one);
|
|
57
|
+
fetchOne(ws, scope, id).then((r) => { one.reading = false; one.d = r && r.ok ? r : null; if (one.d && rowsOf(one.d).length && onChange) onChange(); });
|
|
58
|
+
return one;
|
|
59
|
+
}
|
|
60
|
+
/** Reads again after a press, then draws. */
|
|
61
|
+
async function again(scope, id, onChange) {
|
|
62
|
+
const one = READ.get(keyOf(scope, id)); if (!one) return;
|
|
63
|
+
const r = await fetchOne(one.ws, scope, id);
|
|
64
|
+
one.d = r && r.ok ? r : null;
|
|
65
|
+
if (onChange) onChange();
|
|
66
|
+
}
|
|
67
|
+
const rowsOf = (d) => ((d && Array.isArray(d.rows)) ? d.rows : []).filter((r) => r && r.state !== 'dropped');
|
|
68
|
+
/** The rows to draw: the open ones while Claude has finished drafting them (a run still shaping them draws nothing yet), else the kept ones. */
|
|
69
|
+
function partOf(scope, id) {
|
|
70
|
+
const one = READ.get(keyOf(scope, id)), d = one && one.d; if (!d) return null;
|
|
71
|
+
const R = rowsOf(d), open = R.filter((r) => r.state === 'open'), kept = R.filter((r) => r.state === 'kept');
|
|
72
|
+
const running = d.run && d.run.state === 'running';
|
|
73
|
+
if (open.length && !running) return { d, mode: 'open', rows: open, busy: one.busy };
|
|
74
|
+
if (kept.length && !open.length) return { d, mode: 'kept', rows: kept, busy: one.busy };
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
const fade = (scope, id) => { const k = keyOf(scope, id); if (SEEN.has(k)) return ''; SEEN.add(k); return ' md-in'; };
|
|
78
|
+
|
|
79
|
+
/* ── the words ── */
|
|
80
|
+
const is = (r, re) => re.test(String((r && r.group) || ''));
|
|
81
|
+
const ticketText = (t) => { const s = String((t && (t.text || (t.key ? t.key + ' drafted' : ''))) || ''); return /^ticket\b/i.test(s) ? s : 'Ticket ' + s; };
|
|
82
|
+
const ticketPill = (t) => `<span class="md-pill">${esc(ticketText(t))}</span>`;
|
|
83
|
+
const nowOf = (r) => (r.now == null && !r.nowTxt ? '—' : r.nowTxt || String(r.now));
|
|
84
|
+
const homeHref = (o) => { const q = new URLSearchParams(); for (const [k, v] of Object.entries(o)) if (v) q.set(k, v); return '/premium.html?' + q.toString(); };
|
|
85
|
+
const ib = (o) => (o.href
|
|
86
|
+
? `<a class="md-ib" href="${esc(o.href)}" aria-label="${esc(o.label)}" title="${esc(o.title || o.label)}">${SVG(o.icon)}</a>`
|
|
87
|
+
: `<button type="button" class="md-ib${o.solid ? ' solid' : ''}" data-md="${esc(o.act)}" data-md-scope="${esc(o.scope)}" data-md-id="${esc(o.id)}" aria-label="${esc(o.label)}" title="${esc(o.title || o.label)}"${o.busy ? ' disabled' : ''}>${SVG(o.icon, 16, o.solid ? 2.2 : 1.8)}</button>`);
|
|
88
|
+
const head = (label, src) => `<div class="md-hd"><span class="md-sp ad">${adler('needs-you', 32, { label: false })}</span><b>${esc(label)}</b>${src ? `<span class="md-src">${esc(src)}</span>` : ''}</div>`;
|
|
89
|
+
/** The one line of why: the server's line for the whole draft, else the lead row's own. */
|
|
90
|
+
const whyOf = (d, lead) => String((d && d.sub) || (lead && lead.why) || '');
|
|
91
|
+
|
|
92
|
+
/* ── the inline edit (batch 16 item 1): one field row per open draft; the card's footer turns into ask, ×, ✓ ── */
|
|
93
|
+
const field = (r, f, val, label, o = {}) => `<input class="md-fld${o.cls ? ' ' + o.cls : ''}" data-md-f="${f}" data-md-row="${esc(r.id)}" value="${esc(val)}" aria-label="${esc(label)}"${o.ph ? ` placeholder="${esc(o.ph)}"` : ''}${o.num ? ' inputmode="decimal"' : ''} maxlength="${o.max || 80}">`;
|
|
94
|
+
function editRows(rows, label) {
|
|
95
|
+
return `<div class="md-ed" role="list">${rows.map((r) => `<div class="md-er" role="listitem"><span class="md-role">${esc(label(r))}</span>`
|
|
96
|
+
+ field(r, 'name', r.name, 'Name of ' + r.name)
|
|
97
|
+
+ `<span class="md-ef">${r.type === 'Done or not' ? `<b class="md-to">${esc(r.targetTxt || 'Done')}</b>` : field(r, 'target', r.target == null ? '' : String(r.target), 'Target of ' + r.name, { num: true, cls: 'n', max: 20, ph: 'Target' })}`
|
|
98
|
+
+ field(r, 'source', r.source || '', 'Where ' + r.name + ' is measured', { ph: 'Measured by', max: 40 }) + '</span></div>').join('')}</div>`;
|
|
99
|
+
}
|
|
100
|
+
const editFoot = (scope, id, ask, busy) => `<div class="md-ft"><p class="md-why">Name, target and where it is measured. Anything else, ask me in Home.</p>`
|
|
101
|
+
+ ib({ href: ask, icon: I.ask, label: 'Ask Claude in Home to change something else', title: 'Ask in Home' })
|
|
102
|
+
+ ib({ act: 'cancel', scope, id, icon: I.x, label: 'Cancel the edit', title: 'Cancel', busy })
|
|
103
|
+
+ ib({ act: 'save', scope, id, icon: I.check, label: 'Save the edit', title: 'Save', solid: true, busy }) + '</div>';
|
|
104
|
+
|
|
105
|
+
/* ── the program: the proposed goal, then the kept Goal row ── */
|
|
106
|
+
export function progHtml(p, ws) {
|
|
107
|
+
if (!p || !p.id) return '';
|
|
108
|
+
const P = partOf('program', p.id); if (!P) return '';
|
|
109
|
+
const goal = P.rows.find((r) => is(r, /goal/i)) || P.rows[0];
|
|
110
|
+
const rolls = P.rows.filter((r) => r !== goal && is(r, /roll/i)), guard = P.rows.filter((r) => r !== goal && is(r, /guard/i));
|
|
111
|
+
if (P.mode === 'kept') {
|
|
112
|
+
// the dot: a reading behind it (ok), or it waits on a drafted ticket (off)
|
|
113
|
+
const chip = (r, lead) => { const off = r.now == null && !!r.ticket;
|
|
114
|
+
const txt = off ? 'waits on ' + (r.ticket.key || 'a ticket') : is(r, /guard/i) ? r.targetTxt || '' : [r.nowTxt && r.targetTxt ? r.nowTxt + ' of ' + r.targetTxt : r.targetTxt || r.nowTxt || '', lead ? month(r.by) : day(r.by)].filter(Boolean).join(' · ');
|
|
115
|
+
return `<span class="pp-kr md-kr" title="${esc(r.why || '')}"><i class="pp-gd${off ? ' off' : ''}" aria-hidden="true"></i><b>${esc(r.name)}</b>${esc(txt)}</span>`; };
|
|
116
|
+
return `<div class="pp-goal md-kept md-top${fade('program', p.id)}" role="group" aria-label="Program goal"><span class="pp-per">Goal</span>${chip(goal, true)}${rolls.concat(guard).map((r) => chip(r)).join('')}`
|
|
117
|
+
+ ib({ act: 'undo', scope: 'program', id: p.id, icon: I.undo, label: 'Undo: make the goal a proposal again', title: 'Undo', busy: P.busy }) + '</div>';
|
|
118
|
+
}
|
|
119
|
+
const line = goal.name + ': ' + [goal.nowTxt, goal.targetTxt].filter(Boolean).join(' → ') + (goal.by ? ' by ' + month(goal.by) : '');
|
|
120
|
+
const chips = ((goal.checkpoints) || []).map((c) => `<span class="md-cp"><span class="md-dm" aria-hidden="true"></span>${esc([c.target != null ? String(c.target) + (goal.type === 'Percentage' && typeof c.target === 'number' ? '%' : '') : '', c.label].filter(Boolean).join(' at '))}${c.by ? ' · ' + esc(day(c.by)) : ''}</span>`)
|
|
121
|
+
.concat(guard.map((g) => `<span class="md-cp">Guardrail: ${esc(g.name)}${g.targetTxt ? ' · ' + esc(g.targetTxt) : ''}</span>`)).join('');
|
|
122
|
+
const built = rolls.length ? `<div class="md-bt" role="table" aria-label="Built from"><div class="md-ru q" role="row"><span role="columnheader">Built from</span><span role="columnheader">Now</span><span role="columnheader">Target</span></div>`
|
|
123
|
+
+ rolls.map((r) => { const [a, ...b] = String(r.name).split(' · ');
|
|
124
|
+
return `<div class="md-ru" role="row"><span role="cell">${b.length ? `<b>${esc(a)}</b> · ${esc(b.join(' · '))}` : esc(a)}</span><span role="cell">${esc(nowOf(r))}</span><span role="cell">${r.ticket && r.now == null ? ticketPill(r.ticket) : esc([r.targetTxt, r.by ? 'by ' + day(r.by) : ''].filter(Boolean).join(' '))}</span></div>`; }).join('') + '</div>' : '';
|
|
125
|
+
const q = (w) => homeHref({ ws: ws || p.home, ask: 'program:' + p.id, q: w + p.title + ': ' });
|
|
126
|
+
if (EDIT.has(keyOf('program', p.id))) return `<section class="md-card md-top" aria-label="Edit the proposed goal">${head('Proposed goal', P.d.src)}`
|
|
127
|
+
+ editRows([goal].concat(rolls, guard), (r) => (r === goal ? 'Goal' : String(r.group || ''))) + editFoot('program', p.id, q('Change the proposed goal for '), P.busy) + '</section>';
|
|
128
|
+
return `<section class="md-card md-top${fade('program', p.id)}" aria-label="Proposed goal">${head('Proposed goal', P.d.src)}<p class="md-gl">${esc(line)}</p>`
|
|
129
|
+
+ (chips ? `<div class="md-cps">${chips}</div>` : '') + built
|
|
130
|
+
+ `<div class="md-ft"><p class="md-why">${esc(whyOf(P.d, goal))}</p>`
|
|
131
|
+
+ ib({ href: q('About the proposed goal for '), icon: I.ask, label: 'Discuss the proposed goal in Home', title: 'Discuss in Home' })
|
|
132
|
+
+ ib({ act: 'edit', scope: 'program', id: p.id, icon: I.pen, label: 'Edit the proposed goal', title: 'Edit', busy: P.busy })
|
|
133
|
+
+ ib({ act: 'keep', scope: 'program', id: p.id, icon: I.check, label: 'Keep this goal', solid: true, busy: P.busy }) + '</div></section>';
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/* ── the initiative: the proposed success measure, then the kept fold ── */
|
|
137
|
+
const ROLE = [[/proves/i, 'Proves it worked · 4 weeks after release'], [/early|signal/i, 'Early signal · shows in days'], [/guard/i, 'Guardrail']];
|
|
138
|
+
const roleOf = (r) => { const m = ROLE.find(([re]) => is(r, re)); return m ? m[1] : String(r.group || ''); };
|
|
139
|
+
const order = (r) => { const j = ROLE.findIndex(([re]) => is(r, re)); return j < 0 ? ROLE.length : j; };
|
|
140
|
+
const targetOf = (r) => r.targetTxt || (r.target == null ? '' : String(r.target));
|
|
141
|
+
export function iniHtml(id, ws, title) {
|
|
142
|
+
if (!id) return '';
|
|
143
|
+
const P = partOf('initiative', id); if (!P) return '';
|
|
144
|
+
ws = ws || (READ.get(keyOf('initiative', id)) || {}).ws || '';
|
|
145
|
+
const R = P.rows.slice().sort((a, b) => order(a) - order(b)), why = whyOf(P.d, R[0]);
|
|
146
|
+
if (P.mode === 'kept') {
|
|
147
|
+
const op = FOLD.has(id);
|
|
148
|
+
const sub = (r) => (r.now == null && r.ticket ? 'Waits on ' + (r.ticket.key || 'a drafted ticket') : is(r, /guard/i) ? 'Stays at ' + targetOf(r) : [r.nowTxt ? r.nowTxt + ' → ' + targetOf(r) : targetOf(r), is(r, /proves/i) ? '4 weeks after release' : ''].filter(Boolean).join(', '));
|
|
149
|
+
return `<div class="md-kept-i${fade('initiative', id)}"><div class="iv-folds md-folds"><button type="button" class="iv-fr" data-md="fold" data-md-scope="initiative" data-md-id="${esc(id)}" aria-expanded="${op}"><b>Success measure</b><span class="md-ok">Set before the build</span><span class="n">${R.length}</span>${SVG(op ? I.down : I.right)}</button>`
|
|
150
|
+
+ (op ? `<div class="iv-fb md-list">${R.map((r) => `<div class="md-lr"><span class="md-mk" aria-hidden="true"></span><span class="md-w"><b>${esc(r.name)}</b><span>${esc(sub(r))}</span></span></div>`).join('')}</div>` : '') + '</div>'
|
|
151
|
+
+ ib({ act: 'undo', scope: 'initiative', id, icon: I.undo, label: 'Undo: make the success measure a proposal again', title: 'Undo', busy: P.busy }) + '</div>';
|
|
152
|
+
}
|
|
153
|
+
const row = (r) => `<div class="md-mr"><span class="md-nm"><span class="md-role">${esc(roleOf(r))}</span><b>${esc(r.name)}</b>${r.ticket && r.now == null ? `<small>${ticketPill(r.ticket)}</small>` : r.why && r.why !== why ? `<small>${esc(r.why)}</small>` : ''}</span><span class="md-now">${esc(nowOf(r))}</span><b class="md-to">${esc(targetOf(r))}</b></div>`;
|
|
154
|
+
const q = homeHref({ ws, ask: id, q: 'Change the proposed success measure for ' + (title || id) + ': ' });
|
|
155
|
+
if (EDIT.has(keyOf('initiative', id))) return `<section class="md-card" aria-label="Edit the proposed success measure">${head('Proposed success measure', P.d.src)}` + editRows(R, roleOf) + editFoot('initiative', id, q, P.busy) + '</section>';
|
|
156
|
+
return `<section class="md-card${fade('initiative', id)}" aria-label="Proposed success measure">${head('Proposed success measure', P.d.src)}<div class="md-ms" role="list">${R.map(row).join('')}</div>`
|
|
157
|
+
+ `<div class="md-ft"><p class="md-why">${esc(why)}</p>${ib({ act: 'edit', scope: 'initiative', id, icon: I.pen, label: 'Edit the proposed success measure', title: 'Edit', busy: P.busy })}`
|
|
158
|
+
+ ib({ act: 'keep', scope: 'initiative', id, icon: I.check, label: 'Keep this success measure', solid: true, busy: P.busy }) + '</div></section>';
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/* ── the presses ── */
|
|
162
|
+
export function press(b, h = {}) {
|
|
163
|
+
const a = b && b.dataset && b.dataset.md; if (!a) return false;
|
|
164
|
+
const scope = b.dataset.mdScope, id = b.dataset.mdId, one = READ.get(keyOf(scope, id));
|
|
165
|
+
const redraw = () => { if (h.redraw) h.redraw(); }, say = (m) => { if (h.toast) h.toast(m); };
|
|
166
|
+
if (a === 'fold') { if (FOLD.has(id)) FOLD.delete(id); else FOLD.add(id); redraw(); return true; }
|
|
167
|
+
if (a === 'edit') { EDIT.add(keyOf(scope, id)); redraw(); return true; }
|
|
168
|
+
if (a === 'cancel') { EDIT.delete(keyOf(scope, id)); redraw(); return true; }
|
|
169
|
+
if (!one || !one.d || one.busy) return true;
|
|
170
|
+
if (a === 'save') {
|
|
171
|
+
// what each field row says now, against the draft as read: only a changed row is sent
|
|
172
|
+
const card = b.closest('section') || (typeof document !== 'undefined' ? document : null), want = new Map();
|
|
173
|
+
for (const x of card ? card.querySelectorAll('[data-md-f]') : []) { const r = x.dataset.mdRow; if (!want.has(r)) want.set(r, {}); want.get(r)[x.dataset.mdF] = x.value; }
|
|
174
|
+
const rows = rowsOf(one.d).filter((r) => r.state === 'open' && want.has(r.id)).map((r) => ({ r, w: want.get(r.id) }))
|
|
175
|
+
.filter(({ r, w }) => (w.name !== undefined && w.name.trim() !== r.name) || (w.source !== undefined && w.source.trim() !== (r.source || '')) || (w.target !== undefined && w.target.trim() !== (r.target == null ? '' : String(r.target))));
|
|
176
|
+
if (!rows.length) { EDIT.delete(keyOf(scope, id)); redraw(); say('Nothing changed.'); return true; }
|
|
177
|
+
one.busy = true; redraw();
|
|
178
|
+
(async () => {
|
|
179
|
+
let bad = null;
|
|
180
|
+
for (const { r, w } of rows) { const res = await pmPost('/api/metric-drafts/edit', { ws: one.ws || null, scope, id, row: r.id, ...w }).catch(() => null); if (!res || !res.ok) { bad = (res && res.error) || 'Not saved. The server did not say why.'; break; } }
|
|
181
|
+
one.busy = false;
|
|
182
|
+
if (bad) { say(bad); redraw(); return; }
|
|
183
|
+
EDIT.delete(keyOf(scope, id)); say('Saved. Keep it to track it as you wrote it.');
|
|
184
|
+
await again(scope, id, redraw);
|
|
185
|
+
})();
|
|
186
|
+
return true;
|
|
187
|
+
}
|
|
188
|
+
const body = { ws: one.ws || null, scope, id };
|
|
189
|
+
one.busy = true; redraw();
|
|
190
|
+
(async () => {
|
|
191
|
+
let r;
|
|
192
|
+
if (a === 'keep') r = await pmPost('/api/metric-drafts/keep-all', body).catch(() => null);
|
|
193
|
+
else if (a === 'undo') {
|
|
194
|
+
// no undo of all: each kept row goes back to open, one at a time
|
|
195
|
+
for (const x of rowsOf(one.d).filter((y) => y.state === 'kept')) { r = await pmPost('/api/metric-drafts/undo', { ...body, row: x.id }).catch(() => null); if (!r || !r.ok) break; }
|
|
196
|
+
}
|
|
197
|
+
one.busy = false;
|
|
198
|
+
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
|
+
if (a === 'keep') say(scope === 'program' ? 'Kept. I check the goal every morning.' : 'Kept. I check the success measure every morning after the release.');
|
|
200
|
+
else say('Undone. It is a proposal again.');
|
|
201
|
+
await again(scope, id, redraw);
|
|
202
|
+
})();
|
|
203
|
+
return true;
|
|
204
|
+
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Quiet: no motion. Every class starts with msg-. */
|
|
4
4
|
.msg-box, .msg-list { --msg-prog: var(--pp-prog, var(--cz-c-6b4fa3)); --msg-progbg: var(--pp-progbg, rgba(107,79,163,.10)); }
|
|
5
5
|
.msg-box { border: 1px dashed color-mix(in srgb, var(--msg-prog) 45%, transparent); border-radius: 16px; overflow: hidden; }
|
|
6
|
-
.msg-hd { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 12px; background: var(--msg-progbg); font-size:
|
|
6
|
+
.msg-hd { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 12px; background: var(--msg-progbg); font-size: var(--fs-2); color: var(--cz-ink2); }
|
|
7
7
|
.msg-ht { flex: 1; min-width: 0; }
|
|
8
8
|
.msg-ht b { color: var(--msg-prog); font-weight: 700; }
|
|
9
9
|
.msg-list { display: flex; flex-direction: column; }
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
.msg-mk { color: var(--msg-prog); display: inline-flex; flex: none; padding-top: 2px; }
|
|
14
14
|
.msg-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
|
|
15
15
|
.msg-h { display: flex; gap: 8px; align-items: baseline; width: 100%; }
|
|
16
|
-
.msg-h b { font-size:
|
|
17
|
-
.msg-d { font-size:
|
|
18
|
-
.msg-w { font-size:
|
|
19
|
-
.msg-src { display: inline-flex; align-items: center; gap: 5px; font-size:
|
|
16
|
+
.msg-h b { font-size: var(--fs-3); font-weight: 700; color: var(--cz-ink); flex: 1; min-width: 0; }
|
|
17
|
+
.msg-d { font-size: var(--fs-2); font-weight: 700; color: var(--cz-ink2); white-space: nowrap; }
|
|
18
|
+
.msg-w { font-size: var(--fs-2); color: var(--cz-ink3); line-height: 1.4; }
|
|
19
|
+
.msg-src { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-1); font-weight: 600; color: var(--cz-ink2); background: var(--cz-well); border-radius: 999px; padding: 2px 8px; }
|
|
20
20
|
.msg-src svg { color: var(--cz-ink3); }
|
|
21
21
|
.msg-gd { width: 7px; height: 7px; transform: rotate(45deg); border-radius: 2px; background: var(--msg-prog); display: inline-block; }
|
|
22
22
|
.msg-ends { display: inline-flex; align-items: center; gap: 2px; flex: none; }
|
|
@@ -32,18 +32,18 @@
|
|
|
32
32
|
.pp-needs .msg-list { background: var(--cz-card); border-radius: 12px; margin-bottom: 4px; }
|
|
33
33
|
|
|
34
34
|
/* the charter: last checked and Check now (XmsgB, last frame), and the change filled in from the pencil */
|
|
35
|
-
.msg-chk { display: flex; align-items: center; gap: 8px; font-size:
|
|
35
|
+
.msg-chk { display: flex; align-items: center; gap: 8px; font-size: var(--fs-2); color: var(--cz-ink3); }
|
|
36
36
|
.msg-chk span { flex: 1; min-width: 0; }
|
|
37
37
|
.msg-chk .msg-ib { width: 28px; height: 28px; }
|
|
38
38
|
.msg-chk .msg-ib.on svg { animation: msg-spin 1.2s linear infinite; }
|
|
39
39
|
@keyframes msg-spin { to { transform: rotate(360deg); } }
|
|
40
40
|
@media (prefers-reduced-motion: reduce) { .msg-chk .msg-ib.on svg { animation: none; } }
|
|
41
|
-
.msg-risk { display: flex; align-items: center; gap: 6px; font-size:
|
|
41
|
+
.msg-risk { display: flex; align-items: center; gap: 6px; font-size: var(--fs-2); color: var(--cz-risk); }
|
|
42
42
|
.msg-risk span { flex: 1; min-width: 0; }
|
|
43
43
|
.msg-risk { margin: 4px 0 0 30px; }
|
|
44
44
|
.msg-risk i { width: 7px; height: 7px; border-radius: 50%; background: var(--pc-amberdot, var(--cz-risk)); flex: none; }
|
|
45
45
|
.msg-risk .pc-ib { width: 28px; height: 28px; }
|
|
46
|
-
.msg-chg { display: flex; align-items: flex-start; gap: 6px; margin: 4px 0 0 30px; font-size:
|
|
46
|
+
.msg-chg { display: flex; align-items: flex-start; gap: 6px; margin: 4px 0 0 30px; font-size: var(--fs-2); color: var(--cz-ink2); }
|
|
47
47
|
.msg-chg svg { color: var(--pp-prog, var(--cz-c-6b4fa3)); flex: none; margin-top: 1px; }
|
|
48
48
|
.pc-lnw.msg-on > .pc-ln { border: 1px dashed color-mix(in srgb, var(--pp-prog, var(--cz-c-6b4fa3)) 45%, transparent); border-radius: 14px; }
|
|
49
49
|
.pc-ms > .msg-chg { margin: 0 0 8px; }
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* Every press is icon-only: ✓ keeps, the pencil opens the charter with the change filled in, ✕ drops it (Claude does not ask again unless the
|
|
12
12
|
* source changes). A row says why and where it came from. Nothing shows when there is nothing to suggest (zero is silence). The presses carry
|
|
13
13
|
* data-ms-act and data-key; the panel handles them. */
|
|
14
|
+
import { adler } from './cozy-adler.js'; // Adler holds Claude's suggested milestones (batch 16 item 2, canvas AdM2); the rows keep their ✦
|
|
14
15
|
const esc = (s) => String(s == null ? '' : s).replace(/[&<>"]/g, (c) => ({ '&': '&', '<': '<', '>': '>', '"': '"' }[c]));
|
|
15
16
|
const SV = (d, w, sw) => `<svg viewBox="0 0 24 24" width="${w || 16}" height="${w || 16}" fill="none" stroke="currentColor" stroke-width="${sw || 1.8}" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="${d}"/></svg>`;
|
|
16
17
|
const I = {
|
|
@@ -78,7 +79,7 @@ export function firstHtml(p, L) {
|
|
|
78
79
|
const n = L.length, from = fromWords(L);
|
|
79
80
|
const all = L.length > 1 ? `<span class="msg-ends"><button type="button" class="msg-ok" data-ms-act="keepall" aria-label="Keep all ${n} suggestions" title="Keep all">${SV(I.check, 15, 2.4)}</button>`
|
|
80
81
|
+ `<button type="button" class="msg-ib" data-ms-act="dropall" aria-label="Drop all ${n} suggestions" title="Drop all">${SV(I.x, 15)}</button></span>` : '';
|
|
81
|
-
return `<div class="msg-box" role="group" aria-label="Claude's suggested milestones"><div class="msg-hd"><span class="msg-mk" aria-hidden="true">${
|
|
82
|
+
return `<div class="msg-box" role="group" aria-label="Claude's suggested milestones"><div class="msg-hd"><span class="msg-mk ad" aria-hidden="true">${adler('needs-you', 28, { label: false })}</span>`
|
|
82
83
|
+ `<span class="msg-ht"><b>Claude suggests ${n} ${plural(n, 'milestone', 'milestones')}</b>${from ? ' from ' + esc(from) : ''}</span>${all}</div>`
|
|
83
84
|
+ `<div role="list">${L.map((i) => rowHtml(p, i, 'first')).join('')}</div></div>`;
|
|
84
85
|
}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
/* pm/ov-view.css — the parts every object Viewer shares (feedback batch 6 item 1b; canvas OvViewers, OvReport): the facts card, a quiet
|
|
2
2
|
* label over a block of words, the clamped description with its open icon, and the one "where it sits" row. Over cozy.css's tokens, so the
|
|
3
3
|
* dark theme follows. task-card.js, tk-view.js and the goal Viewer (premium-insights.js) load it. */
|
|
4
|
-
.ovf { border-radius: 18px; box-shadow: inset 0 0 0 1px var(--cz-hair); background: var(--cz-card); padding: 14px 16px; display: grid; grid-template-columns: max-content 1fr; column-gap: 18px; row-gap: 6px; align-items: center; font-size:
|
|
5
|
-
.ovf > .k { color: var(--cz-ink3); font-size:
|
|
4
|
+
.ovf { border-radius: 18px; box-shadow: inset 0 0 0 1px var(--cz-hair); background: var(--cz-card); padding: 14px 16px; display: grid; grid-template-columns: max-content 1fr; column-gap: 18px; row-gap: 6px; align-items: center; font-size: var(--fs-3); }
|
|
5
|
+
.ovf > .k { color: var(--cz-ink3); font-size: var(--fs-2); font-weight: 600; min-height: 30px; display: flex; align-items: center; }
|
|
6
6
|
.ovf > .v { min-width: 0; min-height: 30px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-weight: 700; color: var(--cz-ink); }
|
|
7
7
|
.ovf > .v .late { color: var(--cz-risk); font-weight: 700; }
|
|
8
|
-
.ovf > .foot { grid-column: 1 / -1; margin: 10px 0 0; font-size:
|
|
9
|
-
.ovf .av { width: 22px; height: 22px; border-radius: 7px; background: var(--cz-well); color: var(--cz-ink2); font-size:
|
|
8
|
+
.ovf > .foot { grid-column: 1 / -1; margin: 10px 0 0; font-size: var(--fs-2); color: var(--cz-ink3); font-weight: 600; }
|
|
9
|
+
.ovf .av { width: 22px; height: 22px; border-radius: 7px; background: var(--cz-well); color: var(--cz-ink2); font-size: var(--fs-1); font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex: none; }
|
|
10
10
|
.ovf .av.j { border-radius: 50%; background: var(--cz-okbg); color: var(--cz-ok); }
|
|
11
11
|
.ovf .av.no { background: transparent; border: 1.5px dashed var(--cz-ink3); box-sizing: border-box; }
|
|
12
12
|
|
|
13
13
|
/* a quiet label over a block (Notes, Your notes, Description · from Jira) */
|
|
14
14
|
.ovb { display: flex; flex-direction: column; gap: 4px; }
|
|
15
|
-
.ovl { margin: 0; font-size:
|
|
16
|
-
.ovl small { font-weight: 600; font-size:
|
|
17
|
-
.ovt { margin: 0; font-size:
|
|
15
|
+
.ovl { margin: 0; font-size: var(--fs-2); font-weight: 700; color: var(--cz-ink3); }
|
|
16
|
+
.ovl small { font-weight: 600; font-size: var(--fs-2); }
|
|
17
|
+
.ovt { margin: 0; font-size: var(--fs-3); line-height: 1.55; color: var(--cz-ink); }
|
|
18
18
|
/* the description: shown open, cut at five lines, an icon opens the rest */
|
|
19
19
|
.ovd { position: relative; }
|
|
20
|
-
.ovd .ovdx { font-size:
|
|
20
|
+
.ovd .ovdx { font-size: var(--fs-3); line-height: 1.55; color: var(--cz-ink); overflow-wrap: anywhere; }
|
|
21
21
|
.ovd .ovdx p, .ovd .ovdx ul, .ovd .ovdx ol { margin: 0 0 6px; }
|
|
22
|
-
.ovd .ovdx h4 { margin: 8px 0 2px; font-size:
|
|
22
|
+
.ovd .ovdx h4 { margin: 8px 0 2px; font-size: var(--fs-3); }
|
|
23
23
|
.ovd.cut .ovdx { max-height: calc(1.55em * 5); overflow: hidden; -webkit-mask-image: linear-gradient(180deg, var(--cz-ink) 55%, transparent); mask-image: linear-gradient(180deg, var(--cz-ink) 55%, transparent); }
|
|
24
24
|
.ovd .ovdm { display: flex; justify-content: center; margin-top: 2px; }
|
|
25
25
|
.ovib { width: 30px; height: 30px; border-radius: 999px; border: 0; padding: 0; background: var(--cz-well); color: var(--cz-ink2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
.ovw .go:hover { background: var(--cz-well2); }
|
|
32
32
|
.ovw .tl { width: 28px; height: 28px; border-radius: 9px; background: var(--cz-bluebg); color: var(--cz-blueink); display: inline-flex; align-items: center; justify-content: center; flex: none; }
|
|
33
33
|
.ovw .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
|
|
34
|
-
.ovw .tx b { font-size:
|
|
35
|
-
.ovw .tx small { font-size:
|
|
34
|
+
.ovw .tx b { font-size: var(--fs-3); font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
35
|
+
.ovw .tx small { font-size: var(--fs-2); color: var(--cz-ink3); font-weight: 600; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
|
|
36
36
|
.ovw .tx small .sep { opacity: .7; }
|
|
37
37
|
.ovw .cv { color: var(--cz-ink3); display: inline-flex; flex: none; }
|
|
38
38
|
.ovw .ovmv { width: 38px; height: 38px; border-radius: 999px; border: 0; background: transparent; color: var(--cz-ink2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
|
|
41
41
|
/* the foot link (Open in Jira) */
|
|
42
42
|
.ovft { display: flex; justify-content: center; padding: 6px 0 4px; }
|
|
43
|
-
.ovft a { display: inline-flex; align-items: center; gap: 6px; font-size:
|
|
43
|
+
.ovft a { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-2); font-weight: 700; color: var(--cz-ink2); text-decoration: none; padding: 6px 12px; border-radius: 999px; }
|
|
44
44
|
.ovft a:hover { background: var(--cz-well); color: var(--cz-ink); }
|
|
@@ -32,7 +32,7 @@ import * as V from './bd-views.js';
|
|
|
32
32
|
import * as WF from './bd-wf.js';
|
|
33
33
|
import * as Asks from './bd-asks.js';
|
|
34
34
|
import * as PG from './bd-prog.js';
|
|
35
|
-
import { programOf } from './program-model.js';
|
|
35
|
+
import { programOf, liveRows } from './program-model.js';
|
|
36
36
|
import { open as viewerOpen, current as viewerCur } from './cozy-viewer.js';
|
|
37
37
|
import * as VW from './cozy-viewer.js';
|
|
38
38
|
import * as PP from './bd-prog-panel.js';
|
|
@@ -671,7 +671,7 @@ async function loadOthers() {
|
|
|
671
671
|
let a = null; try { a = await (await fetch('/api/board-premium?ws=' + encodeURIComponent(w) + '&board=' + encodeURIComponent(b.id), { credentials: 'same-origin' })).json(); } catch { a = null; }
|
|
672
672
|
const m = a && a.ok && a.model; if (!m) continue; // still reading, or not read: the member stays "missing", never guessed
|
|
673
673
|
const st = m.steps || [];
|
|
674
|
-
XR[w] = { name: (m.board && (m.board.product || m.board.name)) || b.name, rows: (m
|
|
674
|
+
XR[w] = { name: (m.board && (m.board.product || m.board.name)) || b.name, rows: liveRows(m).filter((x) => x.id).map((x) => ({ id: x.id, title: x.title, stage: x.track && x.track.k >= 0 && st[x.track.k] ? st[x.track.k].key : x.stage, start: x.start || null, end: x.end || null })) };
|
|
675
675
|
}
|
|
676
676
|
if (Object.keys(XR).length) drawInit();
|
|
677
677
|
}
|