create-pmos 0.415.0 → 0.416.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.
Files changed (78) hide show
  1. package/package.json +13 -13
  2. package/payload/KIT-VERSION +2 -2
  3. package/payload/planning/evals/eval-calibration.md +1 -1
  4. package/payload/planning/okrs/health-budgets.md +1 -1
  5. package/payload/state/discoveries.md +1 -1
  6. package/payload/state/log.md +1 -1
  7. package/workspace/briefing-premium-adddoc-test.js +3 -3
  8. package/workspace/briefing-premium-board-test.js +72 -43
  9. package/workspace/briefing-premium-doc-edit-test.js +2 -2
  10. package/workspace/briefing-premium-initiative-test.js +19 -22
  11. package/workspace/briefing-premium-insights-test.js +28 -17
  12. package/workspace/changelog.json +12 -0
  13. package/workspace/core-docs-workflow-test.js +1 -1
  14. package/workspace/guide/workflows.md +2 -1
  15. package/workspace/ini-workflow-test.js +11 -11
  16. package/workspace/lib/board-premium.js +7 -2
  17. package/workspace/lib/board-trail.js +6 -1
  18. package/workspace/lib/engine/boards.js +8 -2
  19. package/workspace/lib/initiative-chat.js +4 -3
  20. package/workspace/lib/insights-premium.js +9 -1
  21. package/workspace/lib/pmos-verbs.js +1 -1
  22. package/workspace/lib/route-modules.js +1 -0
  23. package/workspace/lib/routes-boards.js +32 -4
  24. package/workspace/lib/routes-live.js +53 -0
  25. package/workspace/lib/task-cli.js +88 -24
  26. package/workspace/lib/task-items.js +3 -1
  27. package/workspace/lib/workflow-cli.js +1 -1
  28. package/workspace/milestone-suggest-test.js +2 -1
  29. package/workspace/package-lock.json +2 -2
  30. package/workspace/package.json +1 -1
  31. package/workspace/premium-board-actions-test.js +3 -3
  32. package/workspace/premium-chat-report-tab-test.js +13 -5
  33. package/workspace/premium-core-doc-issue-test.js +1 -1
  34. package/workspace/premium-report-read-test.js +66 -51
  35. package/workspace/premium-vw-backlog-test.js +3 -3
  36. package/workspace/premium-vw-doc-test.js +3 -3
  37. package/workspace/premium-vw-item-test.js +4 -4
  38. package/workspace/premium-vw-jira-test.js +14 -13
  39. package/workspace/premium-vw-slides-test.js +7 -5
  40. package/workspace/program-panel-test.js +1 -1
  41. package/workspace/public/pm/bd-ini-panel.js +68 -230
  42. package/workspace/public/pm/cozy-insights.css +15 -0
  43. package/workspace/public/pm/cozy-live-pill.css +48 -0
  44. package/workspace/public/pm/cozy-live-pill.js +141 -0
  45. package/workspace/public/pm/cozy-viewer.js +4 -3
  46. package/workspace/public/pm/cozy-vw-rp.css +48 -0
  47. package/workspace/public/pm/home-app.js +45 -8
  48. package/workspace/public/pm/home-chat.js +5 -2
  49. package/workspace/public/pm/home-ini.js +57 -22
  50. package/workspace/public/pm/home-task.js +16 -5
  51. package/workspace/public/pm/ini-view-model.js +277 -0
  52. package/workspace/public/pm/ini-view.css +122 -0
  53. package/workspace/public/pm/ini-view.js +180 -0
  54. package/workspace/public/pm/live-model.js +104 -0
  55. package/workspace/public/pm/ov-view.css +44 -0
  56. package/workspace/public/pm/premium-board.js +14 -15
  57. package/workspace/public/pm/premium-insights.js +61 -35
  58. package/workspace/public/pm/premium-report-read.js +74 -50
  59. package/workspace/public/pm/premium-report-tab.js +36 -15
  60. package/workspace/public/pm/premium-shell.js +1 -1
  61. package/workspace/public/pm/premium-vw-item-model.js +6 -3
  62. package/workspace/public/pm/premium-vw-item.js +25 -6
  63. package/workspace/public/pm/premium-vw-jira.js +17 -15
  64. package/workspace/public/pm/rp-parts.js +75 -12
  65. package/workspace/public/pm/task-card.css +24 -49
  66. package/workspace/public/pm/task-card.js +90 -64
  67. package/workspace/public/pm/tk-view.css +21 -0
  68. package/workspace/public/pm/tk-view.js +216 -0
  69. package/workspace/public/pm/wf-page.js +2 -0
  70. package/workspace/server.js +24 -1
  71. package/workspace/stage-card-test.js +49 -41
  72. package/workspace/task-card-test.js +83 -38
  73. package/workspace/test-files.json +3 -1
  74. package/workspace/test-lists/bd-ini-panel.json +3 -3
  75. package/workspace/tk-tasks-test.js +3 -3
  76. package/workspace/public/pm/bd-ini-model.js +0 -81
  77. package/workspace/public/pm/cozy-rec-pill.css +0 -12
  78. package/workspace/public/pm/cozy-rec-pill.js +0 -46
@@ -1,159 +1,39 @@
1
1
  /* pm/bd-ini-panel.js — the Board's initiative and Jira ticket in the Viewer's shell A (initiative viewer-shell-a, V9; canvas XvABoard, XvOptAJira).
2
- * It replaces the first kit's 60 % side panel with its Ask box (XnAgBoardPanel) and the timeline's 420 px panel (AgBoardTimelinePanel): both
3
- * views open the same item now. The shell floats at 560 px over the page's right edge, with its grip, and does not push the page.
2
+ * The shell floats at 560 px over the page's right edge, with its grip, and does not push the page.
4
3
  *
5
- * mount(o) once, from premium-board.js. o: { M() the model, statusOf(r), fmt(iso), md(date), ago(iso), segHtml(r), barHtml(o),
6
- * grill(id) the open first questions, dayTitle(track) the current step's tooltip, usual(track) the usual days in it, rowOf(key), pageHref(r), askHref(r, q), refreshJira(), send(r) the Send to Jira sheet, acts(r, btn) the row
7
- * actions popover, grillOpen(r, btn), onShow(key, from) / onHide() so the page marks the row the item came from,
8
- * programOf(r) the program it is in or null, turnProgram(r) "Turn into a program" (POST /api/programs/turn),
9
- * setTask(r, uid, state) a task's state (POST /api/boards/tasks/state) }
10
- * openIni(r, from) the initiative (XipB, feedback batch 4 item 1): the shell's header (icon, the title once, Discuss in chat, ⋯, open
11
- * wide, close); the summary card: the status, ONE sentence that says why (whyOf), where the progress number comes from,
12
- * the owner and the workflow; the stage card: the current stage of the initiative's OWN workflow, its ladder, the
13
- * tickets or exit steps, the next stage; the Plan card: one drawn line (planModel), every date with its year when it is
14
- * not this year; then the folding rows: drafted tickets, Jira against the PRD, linked
15
- * openTicket(r, k) the ticket as a drill-in: ← goes back to the initiative; the summary says what blocks it and what that delays
4
+ * mount(o) once, from premium-board.js. o: { M() the model, statusOf(r), fmt(iso), md(date), ago(iso), grill(id) the open first
5
+ * questions, usual(track) the usual days in the step, rowOf(key), pageHref(r), askHref(r, q), refreshJira(), send(r) the
6
+ * Send to Jira sheet, acts(r, btn) the row actions popover, grillOpen(r, btn), onShow(key, from) / onHide() so the page
7
+ * marks the row the item came from, programOf(r) the program it is in or null, openProgram(id, btn), turnProgram(r)
8
+ * "Turn into a program", setTask(r, uid, state) a task's state, addTask(r, title) a new task (POST /api/boards/tasks/add),
9
+ * viewDoc(path) }
10
+ * openIni(r, from) the initiative: the ONE view (pm/ini-view.js from pm/ini-view-model.js, feedback batch 6 item 1; canvas OvIniA), the
11
+ * same as Home's initiative page: the summary card, the stage card with its dates line (it replaced the Plan card, item 3),
12
+ * Tasks as the WBS, then Documents and Linked. What the Board adds under them: drafted tickets and the PRD drift.
13
+ * openTicket(r, k) the ticket as a drill-in, in the one ticket Viewer (tk-view.js): ← goes back to the initiative; the summary says what blocks it and what that delays
16
14
  * refresh() draws the shown item again after a new read, in place · close() · shown() → the key of the initiative shown, or null
17
15
  *
18
- * Every part shows only when a record holds something for it (zero is silence). What used to sit on the panel and has no place on the frames
19
- * is under ⋯ in the shell's order: change it (move, hold, cancel or archive; the plan dates), look back (read Jira again), then link and copy.
20
- * "Open in full" (the initiative page) is the shell's own ⋯ item. The Ask box is gone: Discuss in chat takes the question to Home. */
16
+ * What has no place on the view is under ⋯ in the shell's order: change it (move, hold, cancel or archive; the plan dates), look back (read
17
+ * Jira again), then link and copy. "Open in full" (the initiative page) is the shell's own ⋯ item. Discuss in chat takes the question to Home. */
21
18
  import * as VW from './cozy-viewer.js';
22
19
  import { esc } from './premium-shell.js';
23
- import { lr, stageBar, chips, copyText } from './cozy-xv.js';
24
- import { stepsHtml, stepTail, nodeHtml } from './cozy-steps.js';
25
- import { wfIcon } from './wf-model.js';
26
- import { editHref } from './bd-wf.js';
27
- import { ladderOf, whyOf as whyOfSteps, planModel } from './bd-ini-model.js';
20
+ import { lr, copyText } from './cozy-xv.js';
21
+ import { iniView } from './ini-view-model.js';
22
+ import { viewHtml, wireView } from './ini-view.js';
23
+ import * as TV from './tk-view.js';
28
24
 
29
25
  let O = null;
30
26
  let cur = null; // { key, tk } the initiative shown, and its ticket while the drill-in is shown
31
- const plural = (n, a, b) => (n === 1 ? a : b);
27
+ let adding = null; // the key of the initiative whose inline Add a task is open
32
28
  const TI = (r) => (r && r.trail) || null;
33
- const DEP_ST = (d) => (!d.known ? 'not on this repository' : d.done ? 'done' : d.stage || 'open');
34
29
  const tkState = (k) => (k.blocked ? 'Blocked' + (k.reason ? ' by ' + k.reason.replace(/^Waiting on /i, '') : '') : k.status || 'To do');
35
- const isJiraStep = (t) => (t.key === 'build' || t.key === 'deliver') && (t.tickets || []).length > 0;
36
30
  const jiraAt = () => { const J = (O.M() && O.M().jira) || {}; return J.readAt ? 'Jira · ' + O.ago(J.readAt) : ''; };
37
31
 
38
- /* ── the initiative (XvABoard, read as XipB: the why first, the stage card, the plan line) ── */
39
- /** The model's own day (lib/board-premium.js today), so "N days ago" counts as the row's "N days over" does; the clock when it is absent. */
40
- const nowOf = () => { const m = /^(\d{4})-(\d{2})-(\d{2})/.exec(String((O.M() && O.M().today) || '')); return m ? new Date(+m[1], +m[2] - 1, +m[3], 12).getTime() : Date.now(); };
41
- /** Where the progress number comes from, said once: Jira's reading when the tickets count it, else the percent typed into the record. */
42
- function progSource(r) {
43
- const t = r.track || {};
44
- if (isJiraStep(t)) return jiraAt();
45
- return r.progress != null && Number.isFinite(Number(r.progress)) ? Math.round(Number(r.progress)) + '% done · typed in by hand' : '';
46
- }
47
- /** The meta line: the owner's avatar and name, then the workflow's icon and name (each fact has one place on the panel). */
48
- function whoHtml(r) {
49
- const L = ladderOf(r, (O.M() && O.M().steps) || []), wf = L.wf;
50
- const av = r.owner ? `<span class="xv-av" aria-hidden="true">${esc(String(r.owner).charAt(0).toUpperCase())}</span>${esc(r.owner)}` : 'No owner';
51
- return `<p class="czs-meta xv-who">${av}<span aria-hidden="true">·</span>${wfIcon(wf, 16)}${esc(wf.name || 'Product feature')}</p>`;
52
- }
53
- /** The summary card: what waits on you leads, with its one primary; otherwise the status and the one sentence that says why. */
54
- export function iniSummary(r) {
55
- const t = r.track || {}, s = O.statusOf(r), it = TI(r), g = r.id && O.grill(r.id);
56
- const L = ladderOf(r, (O.M() && O.M().steps) || []);
57
- const meta = [r.owner || 'No owner', (L.wf && L.wf.name) || 'Product feature'].join(' · '), extra = whoHtml(r), right = progSource(r), why = whyOfSteps(r, (O.M() && O.M().steps) || [], nowOf());
58
- if (t.you && t.youKind) {
59
- const prd = t.youKind === 'drift' && it && it.links && it.links.prd;
60
- return { line: t.you, tone: 'you', text: t.youWhy || why, meta: '', metaText: meta, extra, right, primary: prd ? { label: 'Open the PRD', act: 'doc:' + prd } : t.youKind === 'commit' && r.id ? { label: 'Send to Jira', act: 'commit' } : r.id ? { label: t.you, href: O.pageHref(r) } : null };
61
- }
62
- if (t.you) {
63
- const rel = r.release ? r.release.name : t.output, open = (t.tickets || []).filter((k) => k.status !== 'Done').length;
64
- return { line: 'Your sign-off' + (rel ? ' · ' + rel : ''), tone: 'you', meta: '', metaText: meta, extra, right,
65
- text: open ? open + ' ' + plural(open, 'ticket is', 'tickets are') + ' still open, so the sign-off can wait until they close.' : 'Every release ticket is done. Release notes are not on record in PMOS.',
66
- primary: r.id ? { label: 'Sign off ' + (rel || 'the release'), href: O.pageHref(r) } : null };
67
- }
68
- if (g && g.open) return { line: g.open + ' ' + plural(g.open, 'question', 'questions') + ' before the BRD', tone: 'you', meta: '', metaText: meta, extra, right, text: (g.later ? 'You chose to answer later. ' : '') + 'PMOS asks what the BRD needs that the Why does not say yet.', primary: { label: 'Answer the questions', act: 'grill' } };
69
- const tone = s.tone === 'late' || s.tone === 'risk' || s.tone === 'red' ? 'warn' : '';
70
- // say it once: when the sentence counts the days past the plan, the status line says only Late (the row's "N days over" is the list's)
71
- return { line: s.tone === 'late' && /^The plan ended /.test(why) ? 'Late' : s.text, tone, meta: '', metaText: meta, extra, right, text: why };
72
- }
73
- /** The skipped steps, each with its reason (lib/board-trail.js), under the ladder. */
74
- function skipText(r, L) {
75
- const t = r.track || {};
76
- if (L.own) {
77
- const sk = L.skipped.map((j) => r.wfStages[j]).filter(Boolean);
78
- return sk.map((s) => s.name + ' skipped' + (s.skipped && s.skipped.why ? '. ' + s.skipped.why : '.')).join(' ');
79
- }
80
- const sk = (t.skipped || []).map((j) => L.steps[j]).filter(Boolean);
81
- if (!sk.length) return '';
82
- const why = sk.map((s) => { const w = (t.skipWhy || []).find((x) => x.stage === s.key); return w && w.why ? s.label + ' skipped. ' + w.why : null; });
83
- if (why.every(Boolean)) return why.join(' ');
84
- return sk.map((s) => s.label).join(', ') + ' skipped: it was moved past ' + (sk.length === 1 ? 'that step' : 'those steps') + '. No reason is on record.';
85
- }
86
- const TK_SHOWN = 3;
87
- const moreOpen = new Set(); // the initiatives whose open tickets are all shown (a press on "N more open")
88
- /** Build and Deliver: the open tickets, blocked first, three shown, then "N more open" with the done count; Deliver's two parts. */
89
- function ticketsHtml(r) {
90
- const t = r.track || {};
91
- const open = t.tickets.filter((k) => k.status !== 'Done').sort((a, b) => (b.blocked ? 1 : 0) - (a.blocked ? 1 : 0)), done = t.tickets.filter((k) => k.status === 'Done');
92
- const all = moreOpen.has(r.key), shown = all ? open : open.slice(0, TK_SHOWN), more = open.length - shown.length;
93
- const doneOf = done.length + ' of ' + t.tickets.length + ' ' + plural(t.tickets.length, 'ticket', 'tickets') + ' done';
94
- let h = shown.map((k) => lr({ tk: k.key, mk: k.blocked ? 'warn' : '', title: `<em>${esc(k.key)}</em> ${esc(k.title)}`, sub: [tkState(k), k.assignee, k.age != null ? k.age + 'd' : ''].filter(Boolean).join(' · ') })).join('');
95
- if (more > 0) h += `<button type="button" class="xv-lr go" data-xb="tkmore"><span class="xv-mk" aria-hidden="true"></span><span class="w"><b>${esc(more + ' more open')}</b><span>${esc(doneOf)}</span></span></button>`;
96
- else if (done.length) h += lr({ mk: 'done', title: esc(doneOf), sub: done.slice(0, 3).map((k) => k.title.toLowerCase()).join(', ') + (done.length > 3 ? ', …' : '') });
97
- if (t.key === 'deliver') h += lr({ title: 'Release notes', sub: 'not on record' }) + lr({ mk: t.you ? 'you' : '', title: 'Your sign-off', sub: t.you ? 'waiting' : 'after the tickets' });
98
- return h;
99
- }
100
- /** The exit steps of the current stage, as the shared step list (stage card D): the stage's own To finish list and its output on another
101
- * workflow; on Product feature the parts of the step's output that the records count. */
102
- function exitSteps(r, L) {
103
- const t = r.track || {};
104
- if (L.own) {
105
- const st = L.stage || {}, out = [];
106
- // each To finish entry is a task of the initiative (feedback batch 5): done when that task is closed, and ✓ closes it here
107
- for (const f of Array.isArray(st.finish) ? st.finish : []) {
108
- if (!f) continue;
109
- const k = (r.tasks || []).find((x) => x.from && x.from.stage === st.key && x.from.finish === f);
110
- const label = k ? k.title : f.charAt(0).toUpperCase() + f.slice(1);
111
- out.push(k && CLOSED.has(k.status) ? { state: 'done', label } : { state: 'wait', label, ...(k ? { act: doneAct(k) } : {}) });
112
- }
113
- const o = st.output || {};
114
- if (o.name && !out.some((x) => x.label.toLowerCase() === String(o.name).toLowerCase())) out.push(o.kind === 'signoff' ? { state: 'you', label: 'Your sign-off: ' + o.name } : { state: 'wait', label: o.name.charAt(0).toUpperCase() + o.name.slice(1) });
115
- return out;
116
- }
117
- return (t.segs || []).filter((s) => s.name).map((s) => (s.cls === 'dn' ? { state: 'done', label: s.name } : s.cls === 'yo' ? { state: 'you', label: s.name, note: s.st || '' } : { state: 'wait', label: s.name, note: s.st && s.st !== 'to do' ? s.st : '' }));
118
- }
119
- const CLOSED = new Set(['Done', "Won't do", 'Archived']);
120
- const doneAct = (k) => ({ attr: `data-xb="tkdone:${esc(k.uid)}"`, icon: 'check', label: 'Mark done: ' + k.title });
121
- /** The initiative's tasks (feedback batch 5, one list): its Board tasks, its breakdown items and its stage's To finish tasks, the open ones
122
- * each with ✓, then how many are done. The Tasks section of the initiative page lists and edits them all. */
123
- function tasksHtml(r) {
124
- const T = r.tasks || [], open = T.filter((k) => !CLOSED.has(k.status)), done = T.length - open.length;
125
- const note = (k) => [k.status === 'In progress' ? 'In progress' : '', k.end ? 'due ' + O.fmt(k.end) : '', k.owner && !/^pm:/.test(k.owner) ? k.owner : ''].filter(Boolean).join(' · ');
126
- return stepsHtml(open.map((k) => ({ state: 'wait', label: k.title, note: note(k), act: doneAct(k) })), { cls: 'xv-sl', label: 'Tasks' })
127
- + (done ? lr({ mk: 'done', title: esc(done + ' done') }) : '');
128
- }
129
- const PLUS = '<svg aria-hidden="true" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 5v14M5 12h14"/></svg>';
130
- /** The stage card (XipB; the Home stage card D look): the current stage of the initiative's own workflow, where it stands ("5 of 7 · day 0
131
- * of ~14"), its ladder, then what finishes it: the tickets on Build and Deliver, else the exit steps, else "No exit steps on record" with
132
- * the icon-only add; the last row is the next stage. */
133
- export function stageCardHtml(r) {
134
- const t = r.track || {}, L = ladderOf(r, (O.M() && O.M().steps) || []);
135
- const u = O.usual ? O.usual(t) : null;
136
- const where = [L.k >= 0 ? (L.k + 1) + ' of ' + L.steps.length : '', t.days != null ? 'day ' + t.days + (u && u.days != null ? ' of ~' + u.days : '') : ''].filter(Boolean).join(' · ');
137
- const title = L.name || 'Stage not on record';
138
- const nowTitle = O.dayTitle ? O.dayTitle({ ...t, label: title }) : title;
139
- const sk = skipText(r, L);
140
- let body = '';
141
- const tail = L.next ? stepTail({ name: L.next.label, note: 'Next stage' }) : ''; // its node is the diamond (cozy-xv.css), so the name carries no second ◆
142
- if (!L.own && isJiraStep(t)) body = ticketsHtml(r);
143
- else if (!L.own && (t.key === 'build' || t.key === 'deliver')) body = '<p class="xv-q">No Jira ticket has been read for it yet.</p>' + (tail ? stepsHtml([], { cls: 'xv-sl', tail }) : '');
144
- else {
145
- const steps = exitSteps(r, L);
146
- if (steps.length) body = stepsHtml(steps, { cls: 'xv-sl', label: 'To finish ' + title, tail });
147
- else {
148
- // nothing finishes this stage on record: say so, and the icon-only add opens the stage in the workflow editor (WfAStage, To finish)
149
- const add = L.own && L.stage && L.stage.key ? `<a class="xv-add" href="${esc(editHref(L.wf) + '&stage=' + encodeURIComponent(L.stage.key) + (r.ws || (O.M() && O.M().board && O.M().board.ws) ? '&ws=' + encodeURIComponent(r.ws || O.M().board.ws) : ''))}" aria-label="Add an exit step" title="Add an exit step">${PLUS}</a>` : '';
150
- const none = `<li class="cz-sli${add ? ' has-act' : ''}"><div class="cz-st wt xv-none">${nodeHtml('wait')}<span class="tx"><span class="lb">No exit steps on record</span><small>${esc(L.own ? 'Add the steps that finish ' + title + ', so PMOS can count them.' : 'Nothing is counted toward ' + title + ' yet.')}</small></span></div>${add}</li>`;
151
- body = stepsHtml([], { cls: 'xv-sl', tail: none + tail });
152
- }
153
- }
154
- const aria = L.k >= 0 ? L.steps.length + ' stages of ' + (L.wf.name || 'Product feature') + '. Stage ' + (L.k + 1) + ', ' + title : 'No stage on record';
155
- return `<section class="xv-card xv-sc" aria-label="${esc('Stage · ' + title)}"><div class="xv-ch"><b>${esc(title)}</b>${where ? `<span class="r">${esc(where)}</span>` : ''}</div>`
156
- + stageBar(L.steps, L.k, L.skipped, nowTitle, aria) + (sk ? `<p class="xv-q xv-skip">${esc(sk)}</p>` : '') + body + '</section>';
32
+ /* ── the initiative: the one view ── */
33
+ /** The view's model for a row: the same function Home's page calls, with what only the Board's model holds (its eight steps, its day). */
34
+ export function viewOf(r) {
35
+ const M = O.M() || {}, p = O.programOf ? O.programOf(r) : null, u = O.usual ? O.usual(r.track || {}) : null;
36
+ return iniView(r, { steps: M.steps || [], today: M.today, usual: u, grill: r.id ? O.grill(r.id) : null, program: p ? { id: p.id, title: p.title } : null, jiraAt: jiraAt() });
157
37
  }
158
38
  function draftedHtml(d, g) {
159
39
  return d.slice(0, 8).map((x) => lr({ mk: x.waiting ? 'you' : '', title: (x.id ? `<em>${esc(x.id)}</em> ` : '') + esc(x.summary || ''), sub: 'not in Jira' })).join('')
@@ -163,48 +43,13 @@ function draftedHtml(d, g) {
163
43
  const driftQ = (keys) => 'What changed in the PRD after ' + keys.join(', ') + ' ' + (keys.length === 1 ? 'was' : 'were') + ' pushed?';
164
44
  const driftHtml = (keys) => `<p>${esc(keys.join(', '))} ${keys.length === 1 ? 'was' : 'were'} pushed from an older PRD. Review ${keys.length === 1 ? 'it' : 'them'} before the next push.</p>`
165
45
  + `<div><button type="button" class="xv-mini" data-xb="drift" data-q="${esc(driftQ(keys))}">Discuss the change in chat</button></div>`;
166
- function linkedChips(r) {
167
- const it = TI(r), L = (it && it.links) || {}, epic = L.epic || (r.epics || [])[0], D = (it && it.deps) || [];
168
- const doc = (label, path) => (path ? [`<button type="button" class="xv-chip" data-doc="${esc(path)}" title="${esc(path)}">${esc(label)}</button>`] : []);
169
- return [].concat(doc(L.prdVersion ? 'PRD v' + String(L.prdVersion).replace(/^v/i, '') : 'PRD', L.prd), doc('Rubric', L.rubric), doc('Evaluation', L.evaluation), doc('Release notes', L.notes),
170
- D.map((d) => `<span class="xv-chip" title="${esc((d.title || d.id) + ': ' + DEP_ST(d))}">${esc('Waits on ' + (d.title || d.id))}</span>`),
171
- epic ? [`<span class="xv-chip">${esc('Epic ' + epic)}</span>`] : []);
172
- }
173
- const CAL = '<svg aria-hidden="true" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M5 6h14v14H5zM5 10h14M9 3v4M15 3v4"/></svg>';
174
- /** The Plan card: one drawn line, its legend naming only what is drawn, then what its dates wait on. */
175
- function planHtml(r) {
176
- const m = planModel(r, nowOf()), it = TI(r), D = (it && it.deps) || [];
177
- if (!m && !D.length) return '';
178
- const w = (a, b) => Math.max(0.5, b - a);
179
- const pos = (x) => (x <= 8 ? '0' : x >= 92 ? '-100%' : '-50%');
180
- const say = m ? [m.marks.find((x) => x.kind === 'start'), m.marks.find((x) => x.kind === 'end')].filter(Boolean).map((x) => (x.kind === 'start' ? 'Plan from ' : 'to ') + x.label).join(' ')
181
- + (m.over ? ', ' + m.overBar.days + ' days past the plan' : '') + (m.exp ? '. Jira’s pace ends it ' + m.marks.find((x) => x.kind === 'jira').label : '') + '.' : '';
182
- let line = '';
183
- if (m) {
184
- line = `<div class="xv-pl" role="img" aria-label="${esc(say)}">`
185
- + (m.bar ? `<i class="bar" style="left:${m.bar.from}%;width:${w(m.bar.from, m.bar.to)}%"></i>` : '')
186
- + (m.overBar ? `<i class="over" style="left:${m.overBar.from}%;width:${w(m.overBar.from, m.overBar.to)}%"></i>` : '')
187
- + (m.expBar ? `<i class="exp" style="left:${m.expBar.from}%;width:${w(m.expBar.from, m.expBar.to)}%"></i>` : '')
188
- + m.marks.map((x) => `<i class="tk${x.kind === 'today' && x.warn ? ' am' : x.kind === 'jira' ? ' e' : ''}" style="left:${x.at}%"></i>`).join('')
189
- + m.marks.filter((x) => !x.hide).map((x) => `<span class="lb${x.kind === 'today' || x.kind === 'jira' ? ' tp' : ''}${x.kind === 'today' && x.warn ? ' w' : ''}${x.kind === 'jira' ? ' e' : ''}" data-pl="${x.kind}" style="left:${x.at}%;transform:translateX(${pos(x.at)})">`
190
- + (x.kind === 'start' ? esc(x.label) : `<b>${esc(x.label)}</b>${x.word ? ' ' + esc(x.word) : ''}`) + '</span>').join('')
191
- + '</div>'
192
- + `<div class="xv-lg" aria-hidden="true">${m.legend.map((x) => `<span><i class="${x.kind}"></i>${esc(x.text)}</span>`).join('')}</div>`;
193
- }
194
- const open = D.filter((d) => d.known && !d.done);
195
- const deps = D.length ? `<p class="xv-q"><b>Waits on ${esc(D.map((d) => d.title || d.id).join(', '))}.</b> ${esc(D.map((d) => (d.title || d.id) + ': ' + DEP_ST(d)).join(' · '))}.${open.length ? ' Its own dates hold only once ' + (open.length === 1 ? 'that one is' : 'those are') + ' done.' : ''}</p>` : '';
196
- return `<section class="xv-card xv-plan" aria-label="Plan"><div class="xv-ch">${CAL}<b>Plan</b></div>${line}${deps}</section>`;
197
- }
198
- function iniSections(r) {
46
+ /** What only the Board reads under the view: tickets drafted in PMOS and pushed tickets that differ from the PRD. */
47
+ function boardSections(r) {
199
48
  const it = TI(r), S = [];
200
- const T = r.tasks || [], open = T.filter((k) => !CLOSED.has(k.status)).length;
201
- if (T.length) S.push({ id: 'tasks', title: 'Tasks', count: open ? open + ' open' : T.length + ' done', open: open > 0, render: () => tasksHtml(r) });
202
49
  const d = ((it && it.drafted) || []).filter((x) => !x.key);
203
50
  if (d.length) S.push({ id: 'drafted', title: 'Drafted in PMOS', count: d.length, render: () => draftedHtml(d, (it && it.gate) || {}) });
204
51
  const dr = (it && it.drift) || [];
205
52
  if (dr.length) S.push({ id: 'drift', title: 'Jira differs from the PRD', count: dr.length, render: () => driftHtml(dr) });
206
- const L = linkedChips(r);
207
- if (L.length) S.push({ id: 'linked', title: 'Linked', count: L.length, render: () => chips(L) });
208
53
  return S;
209
54
  }
210
55
  /** ⋯ in the shell's order: change it, look back, then link and copy. Archive and cancel stay in the row actions, with their Undo. */
@@ -220,28 +65,44 @@ function iniMore(r) {
220
65
  more.push({ label: 'Copy as text', on: () => copyText(iniText(r), 'Copied as text.') });
221
66
  return more;
222
67
  }
223
- /** The initiative as plain text, for Copy as text: the summary, the output and the open tickets. */
68
+ /** The initiative as plain text, for Copy as text: the summary, the stage and the open tasks. */
224
69
  function iniText(r) {
225
- const s = iniSummary(r), t = r.track || {}, L = ladderOf(r, (O.M() && O.M().steps) || []);
226
- const lines = [r.title, [s.line, s.metaText].filter(Boolean).join(' · ')];
70
+ const v = viewOf(r), s = v.summary, lines = [r.title, s.line + (s.right ? ' · ' + s.right : '')];
227
71
  if (s.text) lines.push(s.text);
228
- if (L.name) lines.push('', L.name + (L.k >= 0 ? ' · ' + (L.k + 1) + ' of ' + L.steps.length : ''));
229
- for (const k of (t.tickets || []).filter((x) => x.status !== 'Done')) lines.push('- ' + k.key + ' ' + k.title + ' · ' + tkState(k) + (k.assignee ? ' · ' + k.assignee : ''));
72
+ lines.push('', v.stage.name + (v.stage.n ? ' · ' + v.stage.n + ' of ' + v.stage.of : '') + (v.stage.doneOf ? ' · ' + v.stage.doneOf : ''));
73
+ for (const sec of v.tasks.sections) for (const x of sec.top || []) lines.push('- ' + x.title + (x.sub ? ' · ' + x.sub : ''));
74
+ for (const k of ((r.track && r.track.tickets) || []).filter((x) => x.status !== 'Done')) lines.push('- ' + k.key + ' ' + k.title + ' · ' + tkState(k) + (k.assignee ? ' · ' + k.assignee : ''));
230
75
  return lines.join('\n');
231
76
  }
232
- const iniBody = (r) => VW.czSummary(iniSummary(r)) + stageCardHtml(r) + planHtml(r) + VW.czSections(iniSections(r), { key: 'board' });
233
- /** Presses inside the shown item: a ticket opens its drill-in; the primary; the PRD-change question. A [data-doc] goes to the page's handler. */
77
+ function iniBody(r) {
78
+ return viewHtml(viewOf(r), { add: !!(r.id && O.addTask), adding: adding === r.key, openTask: false, tail: VW.czSections(boardSections(r), { key: 'board' }) });
79
+ }
80
+ /** Presses inside the shown item: the view's own (pm/ini-view.js), a ticket's drill-in, the PRD-change question. A [data-doc] goes to the page's handler. */
234
81
  function wire(body, key) {
82
+ const redraw = () => { const r = O.rowOf(key); if (!r || (cur && cur.tk)) return; const top = body.scrollTop; body.innerHTML = iniBody(r); body.scrollTop = top; };
83
+ wireView(body, {
84
+ check: (uid, b) => { const r = O.rowOf(key), k = r && (r.tasks || []).find((x) => x.uid === uid); if (r && O.setTask) O.setTask(r, uid, k && k.status === 'Done' ? 'To do' : 'Done'); },
85
+ openTicket: (tk) => { const r = O.rowOf(key), k = r && ((r.track && r.track.tickets) || []).find((x) => x.key === tk); if (k) openTicket(r, k); },
86
+ add: () => { adding = key; redraw(); const f = body.querySelector('#ivAddTask'); if (f) f.focus(); },
87
+ addCancel: () => { adding = null; redraw(); },
88
+ addTask: async (title, inp) => { const r = O.rowOf(key); if (!r || !O.addTask) return; inp.disabled = true; const ok = await O.addTask(r, title); inp.disabled = false; if (ok) { inp.value = ''; inp.focus(); } },
89
+ primary: (act, b) => {
90
+ const r = O.rowOf(key); if (!r) return;
91
+ if (act === 'grill') O.grillOpen(r, b);
92
+ else if (act === 'commit') O.send(r); // the Commit of drafted tickets opens the Send sheet (tk-send.js), the one path to Jira
93
+ else if (act.startsWith('doc:')) O.viewDoc(act.slice(4));
94
+ else if (act === 'page' && r.id) location.assign(O.pageHref(r));
95
+ },
96
+ program: (id, b) => { if (O.openProgram) O.openProgram(id, b); },
97
+ doc: (path) => O.viewDoc(path),
98
+ redraw,
99
+ });
235
100
  body.onclick = (e) => {
236
101
  const r = O.rowOf(key); if (!r) return;
237
102
  const tk = e.target.closest('[data-tk]'); if (tk) { const k = ((r.track && r.track.tickets) || []).find((x) => x.key === tk.dataset.tk); if (k) openTicket(r, k); return; }
238
103
  const a = e.target.closest('[data-czs-act], [data-xb]'); if (!a) return;
239
104
  const act = a.dataset.czsAct || a.dataset.xb;
240
- if (act === 'tkmore') { moreOpen.add(key); body.innerHTML = iniBody(r); return; }
241
- if (act === 'grill') O.grillOpen(r, a);
242
- else if (act === 'commit') O.send(r); // the Commit of drafted tickets opens the Send sheet (tk-send.js), the one path to Jira
243
- else if (act === 'drift') location.assign(O.askHref(r, a.dataset.q || ''));
244
- else if (act.startsWith('tkdone:') && O.setTask) O.setTask(r, act.slice(7), 'Done');
105
+ if (act === 'drift') location.assign(O.askHref(r, a.dataset.q || ''));
245
106
  else if (act.startsWith('doc:')) O.viewDoc(act.slice(4));
246
107
  };
247
108
  }
@@ -249,6 +110,7 @@ function wire(body, key) {
249
110
  export const vidOf = (r) => (r.id ? String(r.id) : 'bd:' + r.key);
250
111
  export function openIni(r, from) {
251
112
  if (!O || !r || !r.track) return;
113
+ adding = null;
252
114
  // a row with no record id has no chat of its own: its question goes to the board's chat
253
115
  VW.open({ kind: 'Initiative', title: r.title, icon: 'flag', id: vidOf(r), url: r.id ? O.pageHref(r) : '', full: true,
254
116
  discuss: r.id ? true : () => location.assign(O.askHref(r, '')), more: iniMore(r), rename: O.rename ? O.rename(r) : null,
@@ -256,50 +118,26 @@ export function openIni(r, from) {
256
118
  onClose: () => { if (cur && cur.key === r.key && !cur.tk) { cur = null; O.onHide(); } } });
257
119
  }
258
120
 
259
- /* ── the Jira ticket, as a drill-in (XvOptAJira) ── */
121
+ /* ── the Jira ticket, as a drill-in, in the one ticket Viewer (tk-view.js; canvas OvViewers) ── */
260
122
  /** The blocker's own summary, where its key (in the reason) is a ticket of a row on this board. */
261
123
  function blockerTitle(key) {
262
124
  for (const r of (O.M() && O.M().rows) || []) { const x = ((r.track && r.track.tickets) || []).find((y) => y.key === key); if (x && x.title && x.title !== x.key) return x.title; }
263
125
  return '';
264
126
  }
265
- export function tkSummary(r, k) {
266
- const x = TI(r) && TI(r).tickets ? TI(r).tickets[k.key] : null, pts = k.points != null ? k.points + ' ' + plural(k.points, 'point', 'points') : '';
267
- const right = jiraAt(), primary = k.url ? { label: k.blocked ? 'Comment in Jira' : 'Open in Jira', href: k.url, blank: true } : null;
268
- if (!k.blocked) return { line: k.raw || k.status || 'To do', right, meta: [k.assignee, k.sprint, pts].filter(Boolean).join(' · '), primary };
269
- const reason = k.reason || (x && x.reason) || 'Flagged as blocked in Jira', on = /\b([A-Z][A-Z0-9]+-\d+)\b/.exec(reason), bt = on ? blockerTitle(on[1]) : '';
270
- const days = k.blockedDays != null ? ' ' + k.blockedDays + ' ' + plural(k.blockedDays, 'day', 'days') : '';
271
- const slip = k.sprintEnd ? 'If it is not fixed by ' + O.fmt(k.sprintEnd) + ', the end of ' + (k.sprint || 'its sprint') + ', ' + (r.release ? r.release.name + ' on ' + O.fmt(r.release.iso) + ' slips.' : 'it carries into the next sprint.') : r.release ? 'It holds up ' + r.release.name + ' on ' + O.fmt(r.release.iso) + '.' : '';
272
- const status = k.raw && !/block/i.test(k.raw) ? k.raw : '';
273
- return { line: 'Blocked' + days + (on ? ' on ' + on[1] : ''), tone: 'warn', right, text: [reason.replace(/\.$/, '') + (bt ? ' (' + bt + ')' : '') + '.', slip].filter(Boolean).join(' '),
274
- meta: [k.assignee, k.sprint, pts, status].filter(Boolean).join(' · '), primary };
275
- }
276
- function tkSections(r, k) {
277
- const t = r.track || {}, it = TI(r), x = it && it.tickets ? it.tickets[k.key] : null, sub = x && x.subtasks, S = [];
278
- if (((it && it.drift) || []).includes(k.key)) S.push({ id: 'tdrift', title: 'The PRD changed after the push', count: 1, open: true, render: () => driftHtml([k.key]) });
279
- const items = sub && Array.isArray(sub.items) ? sub.items : null;
280
- S.push({ id: 'sub', title: 'Subtasks', count: sub && sub.total ? sub.done + ' of ' + sub.total : '', render: () => (items && items.length
281
- ? items.map((y) => lr({ mk: y.done ? 'done' : '', title: esc(y.name || y.summary || ''), sub: y.done ? 'done' : 'open' })).join('')
282
- : sub && sub.total ? [[sub.done, 'done', 'done'], [sub.total - sub.done, 'open', '']].filter(([n]) => n > 0).map(([n, w, c]) => lr({ mk: c, title: esc(n + ' ' + plural(n, 'subtask', 'subtasks')), sub: w })).join('')
283
- : '<p class="xv-q">No subtasks are in the Jira reading.</p>') });
284
- if (t.output) S.push({ id: 'counts', title: 'Counts toward', count: t.output, render: () => `<p>${esc(t.output)}${t.count ? ' · ' + esc(t.count) : ''}</p>` });
285
- return S;
286
- }
287
- const tkBody = (r, k) => VW.czSummary(tkSummary(r, k)) + VW.czSections(tkSections(r, k), { key: 'board-ticket' }) + '<p class="xv-q">PMOS owns the ticket text. Status, sprint and assignee change only in Jira.</p>';
127
+ /** The stage a ticket sits in: the workflow's Build stage (where its tickets count), else the stage the initiative is in. */
128
+ const tkStage = (r) => { const L = (r && r.wfStages) || [], b = L.find((x) => /^build\b/i.test(x.name || '')); return (b && b.name) || (r && r.wfStage && r.wfStage.name) || ''; };
288
129
  export function openTicket(r, k, from) {
289
130
  if (!O || !r || !k) return;
290
131
  const c = VW.current && VW.current(), back = !!(c && c.id === vidOf(r));
291
- const more = [{ label: 'Discuss in chat', on: () => location.assign(O.askHref(r, k.key + ': ')) }];
292
- if ((O.M() || {}).jira) more.push({ label: 'Read Jira again', on: () => O.refreshJira() });
293
- more.push({ sep: true });
294
- if (k.url) more.push({ label: 'Copy link', on: () => copyText(k.url, 'Link copied.') });
295
- more.push({ label: 'Copy as text', on: () => copyText([k.key + ' · ' + k.title, tkSummary(r, k).meta].filter(Boolean).join('\n'), 'Copied as text.') });
296
- VW.open({ kind: 'Jira ticket', title: k.key + ' · ' + k.title, icon: 'jira', id: 'tk:' + vidOf(r) + ':' + k.key, url: k.url || '', back, more,
297
- render: (body) => {
298
- const x = O.rowOf(r.key) || r, kk = ((x.track && x.track.tickets) || []).find((y) => y.key === k.key) || k;
299
- cur = { key: x.key, tk: kk.key }; O.onShow(x.key, back ? null : from);
300
- body.innerHTML = tkBody(x, kk); wire(body, x.key);
301
- },
302
- onClose: () => { if (cur && cur.tk === k.key) { cur = null; O.onHide(); } } });
132
+ const it = TI(r), tr = it && it.tickets ? it.tickets[k.key] || null : null, M = O.M() || {}, B = M.board || {};
133
+ O.onShow(r.key, back ? null : from);
134
+ cur = { key: r.key, tk: k.key };
135
+ TV.openTicketView({ ws: r.ws || B.ws || '', board: r.boardId || B.id || '', ini: r.id || '', iniTitle: r.title, ref: k.key, base: k, trail: tr, stage: tkStage(r), release: r.release || null,
136
+ readAt: (M.jira && M.jira.readAt) || '', back, blockerTitle, askHref: (q) => O.askHref(r, q),
137
+ refresh: M.jira ? () => O.refreshJira() : null,
138
+ openIni: () => openIni(O.rowOf(r.key) || r),
139
+ extra: () => (((it && it.drift) || []).includes(k.key) ? [{ id: 'tdrift', title: 'The PRD changed after the push', count: 1, open: true, render: () => driftHtml([k.key]) }] : []),
140
+ onHide: () => { if (cur && cur.tk === k.key) { cur = null; O.onHide(); } } });
303
141
  }
304
142
 
305
143
  /** The shown item drawn again from the new read, in place. A row that left the Board closes it. */
@@ -307,9 +145,9 @@ export function refresh() {
307
145
  if (!cur || !VW.isOpen()) return;
308
146
  const r = O.rowOf(cur.key); if (!r || !r.track) { close(); return; }
309
147
  const b = VW.body(); if (!b || (document.activeElement && b.contains(document.activeElement))) return;
310
- const k = cur.tk && (r.track.tickets || []).find((x) => x.key === cur.tk);
148
+ if (cur.tk) return; // the ticket Viewer reads its own records (tk-view.js); Read Jira again opens it fresh
311
149
  const top = b.scrollTop;
312
- b.innerHTML = cur.tk && k ? tkBody(r, k) : iniBody(r);
150
+ b.innerHTML = iniBody(r);
313
151
  b.scrollTop = top;
314
152
  }
315
153
  export function close() { if (cur) { cur = null; VW.close(); } }
@@ -485,6 +485,21 @@ p.ins-fl { flex-direction: row; align-items: center; margin: 0 0 6px; flex-wrap:
485
485
  .ins-etr { display: flex; align-items: center; gap: 10px; }
486
486
  .ins-etr > span { flex: 1; }
487
487
  .ins-mvl { display: flex; flex-direction: column; gap: 8px; }
488
+ /* the goal Viewer (canvas OvViewers "Goal"): the big number over the chart, the milestones, Moved by */
489
+ .ins-gbig { border-radius: 18px; box-shadow: inset 0 0 0 1px var(--cz-hair); background: var(--cz-card); padding: 14px 16px 10px; display: flex; flex-direction: column; gap: 6px; }
490
+ .ins-gnum { margin: 0; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
491
+ .ins-gnum b { font-size: 30px; font-weight: 800; letter-spacing: -.02em; color: var(--cz-ink); }
492
+ .ins-gnum span { font-size: 13px; font-weight: 700; color: var(--cz-ink3); }
493
+ .ins-gch .msr { stroke: var(--cz-ink3); stroke-width: 1; stroke-dasharray: 1.5 3; opacity: .8; }
494
+ .ins-gch .msd { fill: var(--cz-ink2); stroke: none; }
495
+ .ins-gch .msl { fill: var(--cz-ink2); font-size: 11px; font-weight: 700; }
496
+ .ins-mvb { display: flex; flex-direction: column; gap: 8px; }
497
+ .ins-mvh { margin: 4px 0 0; font-size: 14px; font-weight: 800; color: var(--cz-ink); }
498
+ .ins-mvh span { font-weight: 700; font-size: 12.5px; color: var(--cz-ink3); margin-left: 4px; }
499
+ a.ins-mvr { text-decoration: none; color: inherit; padding: 0; }
500
+ a.ins-mvr .go { min-height: 46px; }
501
+ a.ins-mvr:hover .go { background: var(--cz-well2); }
502
+ .ins-dia { display: inline-block; width: 7px; height: 7px; background: currentColor; transform: rotate(45deg); margin: 0 3px 0 1px; }
488
503
  .ins-gd.ph .ins-vbar { background: transparent; padding: 0; }
489
504
  .ins-gd.ph .ins-vtab.on { background: var(--cz-well); box-shadow: none; }
490
505
  .ins-gd .ins-trow .ins-tog { margin-left: auto; }
@@ -0,0 +1,48 @@
1
+ /* pm/cozy-live-pill.css — the Live pill beside the floating menu and its list (canvas XrrABoard, XrrAPhone, XrrAGrill), drawn by
2
+ * pm/cozy-live-pill.js inside #czNav, so it follows the menu button and hides with it. Token vars from cozy.css only. Motion: one info
3
+ * ripple when a mark changes while the list is open; the recording clock is the only other thing that changes. */
4
+ .cz-live { position: absolute; left: 68px; bottom: 8px; height: 40px; padding: 0 14px 0 12px; border-radius: 999px; border: 0; background: var(--cz-card); box-shadow: var(--cz-float); display: inline-flex; align-items: center; gap: 10px; font: 800 13px var(--cz-sans); color: var(--cz-ink); white-space: nowrap; cursor: pointer; z-index: 1; }
5
+ .cz-live[hidden] { display: none; }
6
+ .cz-live.open { box-shadow: var(--cz-float), 0 0 0 2px color-mix(in srgb, var(--cz-blue) 30%, var(--cz-card)); }
7
+ .cz-live.recp { box-shadow: var(--cz-float), 0 0 0 1.5px color-mix(in srgb, var(--cz-dot-red) 35%, var(--cz-card)); }
8
+ .cz-live:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 2px; }
9
+ .lv-row:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: -2px; }
10
+ .cz-live .lv-g { display: inline-flex; align-items: center; gap: 6px; }
11
+ .cz-live .lv-sp { width: 1px; height: 16px; background: var(--cz-hair); }
12
+ .cz-live .lv-ms { display: inline-flex; align-items: center; gap: 6px; }
13
+
14
+ /* one mark per item: blue asks you, ring running, amber stopped, check finished, red recording (grey while paused) */
15
+ .lv-m { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 9px; height: 9px; border-radius: 50%; box-sizing: border-box; flex: none; background: var(--cz-blue); }
16
+ .lv-m.run { background: transparent; border: 1.5px solid var(--cz-ink3); }
17
+ .lv-m.stop { background: var(--cz-dot-late); }
18
+ .lv-m.rec { background: var(--cz-dot-red); }
19
+ .lv-m.rec.paused { background: var(--cz-dot-q); }
20
+ .lv-m.done { width: 14px; height: 14px; border-radius: 0; background: none; color: var(--cz-dot-ok); }
21
+ .lv-m.done svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
22
+ .lv-m.once::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--cz-blue); animation: cz-info 1.6s ease-out 1; }
23
+ @media (prefers-reduced-motion: reduce) { .lv-m.once::after { animation: none; } }
24
+
25
+ /* the list: one popover over the menu button, newest first, no headers */
26
+ .lv-tray { position: absolute; left: 0; bottom: 68px; width: 360px; box-sizing: border-box; padding: 6px; border-radius: 22px; background: var(--cz-card); border: 1px solid var(--cz-hair); box-shadow: var(--cz-sheet); display: flex; flex-direction: column; z-index: 2; }
27
+ .lv-tray[hidden], .lv-scrim[hidden] { display: none; }
28
+ .lv-row { position: relative; display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 4px 12px 4px 6px; border-radius: 14px; color: var(--cz-ink); text-decoration: none; }
29
+ .lv-row + .lv-row::before { content: ''; position: absolute; left: 38px; right: 12px; top: 0; height: 1px; background: var(--cz-hair); }
30
+ .lv-row:hover { background: var(--cz-well); }
31
+ .lv-row.cur { background: var(--cz-bluebg); }
32
+ .lv-mk { width: 24px; flex: none; display: inline-flex; justify-content: center; align-items: center; }
33
+ .lv-t { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
34
+ .lv-t small { display: block; font-size: 12.5px; font-weight: 600; color: var(--cz-ink3); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
35
+ .lv-tm { font-size: 12.5px; font-weight: 700; color: var(--cz-ink3); white-space: nowrap; font-variant-numeric: tabular-nums; flex: none; }
36
+ .cz-live .lv-tm { font-size: 13px; }
37
+ .lv-tm.rec { color: var(--cz-red); }
38
+ .lv-tm.stop { color: var(--cz-late); }
39
+
40
+ /* a phone: the menu button is bottom right, so the pill sits to its left, and the list is a short sheet */
41
+ @media (max-width: 760px) {
42
+ .cz-live { left: auto; right: 68px; }
43
+ .lv-scrim { position: fixed; inset: 0; background: rgba(42,46,53,.18); z-index: 0; }
44
+ .lv-tray.sheet { position: fixed; left: 0; right: 0; bottom: 0; width: auto; padding: 18px 8px 28px; border-radius: 26px 26px 0 0; border: 0; }
45
+ .lv-tray.sheet::before { content: ''; position: absolute; top: 8px; left: 50%; width: 40px; height: 5px; margin-left: -20px; border-radius: 3px; background: var(--cz-well2); }
46
+ }
47
+ /* the phone keyboard is up: no pill and no menu button over the chat box */
48
+ body.cz-kb .cz-fabw { display: none; }