create-pmos 0.410.0 → 0.411.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +13 -18
- package/payload/KIT-VERSION +1 -1
- package/payload/planning/evals/eval-calibration.md +1 -1
- package/payload/planning/okrs/health-budgets.md +1 -1
- package/payload/state/discoveries.md +1 -1
- package/workspace/briefing-premium-adddoc-test.js +1 -1
- package/workspace/briefing-premium-initiative-test.js +9 -15
- package/workspace/changelog.json +12 -0
- package/workspace/chat-asks-test.js +146 -0
- package/workspace/guide/briefing-premium.md +1 -1
- package/workspace/guide/home.md +24 -0
- package/workspace/home-rows-test.js +149 -56
- package/workspace/ini-workflow-test.js +4 -4
- package/workspace/lib/briefing-premium-agent.js +8 -1
- package/workspace/lib/engine/boards.js +3 -1
- package/workspace/lib/goal-chat.js +94 -30
- package/workspace/lib/mention-cli.js +70 -0
- package/workspace/lib/mention-store.js +307 -0
- package/workspace/lib/pmos-verbs.js +3 -0
- package/workspace/lib/routes-boards.js +12 -0
- package/workspace/lib/routes-briefing-premium.js +2 -2
- package/workspace/lib/routes-mentions.js +62 -9
- package/workspace/lib/session-files.js +132 -0
- package/workspace/lib/session-name.js +103 -0
- package/workspace/lib/source-reads.js +4 -1
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/premium-board-actions-test.js +10 -8
- package/workspace/premium-chat-goal-setup-test.js +203 -0
- package/workspace/premium-chat-goal-view-test.js +28 -23
- package/workspace/premium-chat-line-test.js +189 -0
- package/workspace/premium-vw-backlog-test.js +1 -1
- package/workspace/premium-vw-item-test.js +1 -1
- package/workspace/premium-vw-jira-test.js +1 -1
- package/workspace/public/pm/chat-ask.js +17 -9
- package/workspace/public/pm/cozy-home-rows.css +39 -1
- package/workspace/public/pm/cozy-home.css +112 -12
- package/workspace/public/pm/cozy-search.js +2 -1
- package/workspace/public/pm/cozy-steps.css +69 -0
- package/workspace/public/pm/cozy-steps.js +90 -0
- package/workspace/public/pm/goal-chat.js +141 -23
- package/workspace/public/pm/home-app.js +68 -35
- package/workspace/public/pm/home-ask.js +121 -0
- package/workspace/public/pm/home-chat.js +120 -68
- package/workspace/public/pm/home-data.js +10 -2
- package/workspace/public/pm/home-goal.js +159 -0
- package/workspace/public/pm/home-ini.css +35 -0
- package/workspace/public/pm/home-ini.js +50 -19
- package/workspace/public/pm/home-line.css +59 -0
- package/workspace/public/pm/home-line.js +200 -0
- package/workspace/public/pm/home-list.js +2 -2
- package/workspace/public/pm/home-mentions.js +303 -111
- package/workspace/public/pm/home-ses-name.js +65 -0
- package/workspace/public/pm/home-stage-card.js +94 -0
- package/workspace/public/pm/home-sweep.js +112 -0
- package/workspace/public/pm/home-today.js +7 -2
- package/workspace/public/pm/premium-initiative-head.js +8 -4
- package/workspace/public/pm/rename-press.js +24 -0
- package/workspace/public/pm/wf-page.css +3 -0
- package/workspace/public/pm/wf-page.js +2 -1
- package/workspace/public/premium-workflows.html +1 -0
- package/workspace/server.js +125 -11
- package/workspace/session-names-test.js +144 -0
- package/workspace/skills/jira-push.skill +1 -0
- package/workspace/skills/morning-brief.skill +2 -1
- package/workspace/skills/report-daily.skill +1 -0
- package/workspace/skills/report-monthly.skill +1 -0
- package/workspace/skills/report-weekly.skill +1 -0
- package/workspace/skills/sources-read.skill +3 -2
- package/workspace/stage-card-test.js +203 -0
- package/workspace/test-lists/chat-asks.json +13 -0
- package/workspace/test-lists/chat-progress.json +13 -0
- package/workspace/test-lists/mentions-a-plus.json +9 -0
- package/workspace/test-lists/premium-chat-goal-setup.json +9 -0
- package/workspace/test-lists/session-files.json +5 -0
- package/workspace/test-lists/session-names.json +13 -0
- package/workspace/test-lists/stage-card.json +6 -0
- package/workspace/tk-tasks-test.js +1 -1
- package/workspace/workflows-setup-test.js +17 -0
|
@@ -7,29 +7,37 @@ const esc = (s) => String(s == null ? '' : s).replace(/[&<>"']/g, (c) => ({ '&':
|
|
|
7
7
|
/** True when one press answers the whole card: one question that takes one answer. */
|
|
8
8
|
export const oneTap = (ask) => Array.isArray(ask) && ask.length === 1 && !ask[0].multi;
|
|
9
9
|
|
|
10
|
+
/** An option's label without Claude Code's "(Recommended)" mark, and whether it carried it (or the option says recommended: true). */
|
|
11
|
+
const REC = /\s*\(recommended\)\s*$/i;
|
|
12
|
+
export const bare = (o) => String((o && o.label) || '').replace(REC, '');
|
|
13
|
+
export const isRec = (o) => !!o && (o.recommended === true || REC.test(String(o.label || '')));
|
|
14
|
+
|
|
10
15
|
/** The PM's answer as one message. picked: { '<q>': [option index, …] }. Empty when a question has no answer yet. */
|
|
11
16
|
export function answerText(ask, picked) {
|
|
12
17
|
const qs = Array.isArray(ask) ? ask : [];
|
|
13
|
-
const parts = qs.map((q, i) => (picked && picked[i] || []).map((k) => q.options[k] && q.options[k]
|
|
18
|
+
const parts = qs.map((q, i) => (picked && picked[i] || []).map((k) => q.options[k] && bare(q.options[k])).filter(Boolean));
|
|
14
19
|
if (!qs.length || parts.some((p) => !p.length)) return '';
|
|
15
20
|
if (qs.length === 1) return parts[0].join(', ');
|
|
16
21
|
return qs.map((q, i) => (q.header || q.question) + ': ' + parts[i].join(', ')).join('; ');
|
|
17
22
|
}
|
|
18
23
|
|
|
19
|
-
/** The card
|
|
24
|
+
/** The card, in the one shape every ask takes (canvas XcbOptions "Every kind of ask", kind 3: a choice only the PM can make): the header,
|
|
25
|
+
* the question, then tap answers with the recommended one first and "recommended" under it. live: the PM can still answer (nothing was
|
|
26
|
+
* written after the question); picked: the toggled options of a multi card. The box under the chat already says the PM can write their own. */
|
|
20
27
|
export function askCardHtml(ask, { live = false, picked = {}, at = '' } = {}) {
|
|
21
28
|
const qs = Array.isArray(ask) ? ask : [];
|
|
22
29
|
if (!qs.length) return '';
|
|
23
30
|
const one = oneTap(qs);
|
|
24
31
|
const body = qs.map((q, i) => {
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
const
|
|
28
|
-
|
|
32
|
+
const order = q.options.map((o, k) => k).sort((a, b) => (isRec(q.options[b]) ? 1 : 0) - (isRec(q.options[a]) ? 1 : 0));
|
|
33
|
+
const opts = order.map((k) => {
|
|
34
|
+
const o = q.options[k], on = (picked[i] || []).includes(k), rec = isRec(o);
|
|
35
|
+
const act = one ? `data-chat-say="${esc(bare(o))}"` : `data-ask-pick="${i}:${k}" aria-pressed="${on}"`;
|
|
36
|
+
const small = rec ? `<small>recommended${o.detail ? ' · ' + esc(o.detail) : ''}</small>` : '';
|
|
37
|
+
return `<button type="button" class="chip chip2${rec ? ' rec' : ''}${on ? ' on' : ''}" ${act}${o.detail ? ` title="${esc(o.detail)}"` : ''}${live ? '' : ' disabled'}>${esc(bare(o))}${small}</button>`;
|
|
29
38
|
}).join('');
|
|
30
|
-
return `<div class="askq"
|
|
39
|
+
return `<div class="askq"><p class="k">${esc(q.header || 'Claude asks')}${q.multi ? ' · pick any' : ''}</p><b class="q">${esc(q.question)}</b><div class="chips2">${opts}</div></div>`;
|
|
31
40
|
}).join('');
|
|
32
41
|
const send = !one && live ? `<div class="chatopts"><button type="button" class="cta" data-ask-send="${esc(at)}"${answerText(qs, picked) ? '' : ' disabled'}>Send answers</button></div>` : '';
|
|
33
|
-
|
|
34
|
-
return `<p class="agtag">Claude asks</p>${body}${send}${foot}`;
|
|
42
|
+
return `${body}${send}`;
|
|
35
43
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* pm/cozy-home-rows.css — the two rows at the top of Home and the Mentions Viewer (Viewer kit; canvas
|
|
1
|
+
/* pm/cozy-home-rows.css — the two rows at the top of Home and the Mentions Viewer (Viewer kit; canvas XmsMentionsGrill, XmsDeskList/One/Refine, XvARecHome).
|
|
2
2
|
* Loaded once by home-mentions.js. Token variables only (cozy.css). The rows reuse Home's row (.hv-card, .hv-r, .hm-rm). */
|
|
3
3
|
|
|
4
4
|
/* ── the rows on Home ── */
|
|
@@ -8,6 +8,9 @@
|
|
|
8
8
|
.hr-at { color: var(--cz-blueink); font-weight: 800; font-size: 15px; }
|
|
9
9
|
.hr-men:not(.new) .hr-at { color: var(--cz-ink3); }
|
|
10
10
|
.hr-new { color: var(--cz-blueink); font-weight: 700; }
|
|
11
|
+
/* the badge counts the asks that wait on the PM (XmsMentionsGrill 4); a new ask adds one line under the name */
|
|
12
|
+
.hr-bd { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--cz-blue); color: var(--cz-onsolid); font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex: none; box-sizing: border-box; margin-left: auto; }
|
|
13
|
+
.hr-sub { display: block; font-size: 12.5px; font-weight: 600; color: var(--cz-ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
11
14
|
.hr-rec-card { box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--cz-red) 32%, var(--cz-card)); }
|
|
12
15
|
.hr-rdot { display: block; width: 9px; height: 9px; border-radius: 50%; background: var(--cz-dot-red); }
|
|
13
16
|
.hr-rst { color: var(--cz-red); font-weight: 700; font-variant-numeric: tabular-nums; }
|
|
@@ -52,3 +55,38 @@
|
|
|
52
55
|
.hr-chk > b { font-size: 13px; color: var(--cz-ink2); }
|
|
53
56
|
.hr-cl { display: flex; gap: 8px; align-items: flex-start; line-height: 1.45; }
|
|
54
57
|
.hr-ok { color: var(--cz-ok); flex: none; display: inline-flex; padding-top: 1px; }
|
|
58
|
+
|
|
59
|
+
/* ── Mentions A+ (XmsMentionsGrill, XmsDeskList, XmsDeskOne) ── */
|
|
60
|
+
.hr-sum { background: color-mix(in srgb, var(--cz-well) 60%, var(--cz-card)); border-radius: 20px; padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
|
|
61
|
+
.hr-sumb { display: flex; align-items: center; gap: 12px; }
|
|
62
|
+
.hr-sumb .czs-p { flex: 1; min-width: 0; }
|
|
63
|
+
.hr-old { color: var(--cz-risk); font-weight: 700; }
|
|
64
|
+
.hr-rp { width: 44px; height: 44px; border-radius: 999px; border: 0; background: var(--cz-solid); color: var(--cz-onsolid); display: inline-grid; place-items: center; cursor: pointer; flex: none; }
|
|
65
|
+
.hr-rp:focus-visible, .hr-ckb:focus-visible, .hr-all:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 2px; }
|
|
66
|
+
.hr-mi.hr-w8 { align-items: flex-start; padding-top: 10px; padding-bottom: 10px; }
|
|
67
|
+
.hr-mi .hr-mw > span { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
|
|
68
|
+
.hr-mw b { display: flex; align-items: center; gap: 6px; }
|
|
69
|
+
.hr-cn { font-style: normal; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 999px; background: var(--cz-well); color: var(--cz-ink2); font-size: 11.5px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex: none; }
|
|
70
|
+
.hr-age { flex: none; font-size: 12.5px; font-weight: 700; color: var(--cz-ink3); white-space: nowrap; }
|
|
71
|
+
.hr-age.late { color: var(--cz-risk); }
|
|
72
|
+
.hr-dr { font-style: normal; font-weight: 700; color: var(--cz-blueink); }
|
|
73
|
+
.hr-nc { font-style: normal; color: var(--cz-ink3); }
|
|
74
|
+
.hr-st { color: var(--cz-ink3); }
|
|
75
|
+
.hr-rd .hr-mw b { color: var(--cz-ink2); }
|
|
76
|
+
.hr-day { margin: 10px 10px 2px; font-size: 12.5px; font-weight: 800; color: var(--cz-ink3); }
|
|
77
|
+
.hr-day:first-child { margin-top: 2px; }
|
|
78
|
+
.hr-all { display: block; width: 100%; min-height: 44px; border: 0; border-top: 1px solid var(--cz-hair); background: none; font: inherit; font-size: 13.5px; font-weight: 800; color: var(--cz-blueink); cursor: pointer; }
|
|
79
|
+
.hr-ck { display: flex; align-items: center; gap: 6px; margin: 0 4px 8px; padding: 4px 4px 4px 12px; border-radius: 12px; background: var(--cz-riskbg); color: var(--cz-risk); font-size: 13px; font-weight: 700; }
|
|
80
|
+
.hr-ck span { flex: 1; min-width: 0; }
|
|
81
|
+
.hr-ckb { width: 36px; height: 36px; border-radius: 999px; border: 0; background: var(--cz-card); color: var(--cz-ink2); display: inline-grid; place-items: center; cursor: pointer; flex: none; }
|
|
82
|
+
.hr-gap { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; border-radius: 16px; border: 1.5px dashed var(--cz-hair); font-size: 13px; line-height: 1.45; color: var(--cz-ink2); }
|
|
83
|
+
.hr-gap p { margin: 0; flex: 1; min-width: 0; }
|
|
84
|
+
.hr-gap b { color: var(--cz-ink); }
|
|
85
|
+
.hr-acts { justify-content: flex-end; }
|
|
86
|
+
.hr-ia { background: var(--cz-well); }
|
|
87
|
+
.hr-card2 { background: color-mix(in srgb, var(--cz-well) 60%, var(--cz-card)); border-radius: 20px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; line-height: 1.5; }
|
|
88
|
+
.hr-h { font-size: 13px; color: var(--cz-ink2); }
|
|
89
|
+
.hr-found ul { margin: 0; padding: 0 0 0 18px; display: flex; flex-direction: column; gap: 6px; }
|
|
90
|
+
.hr-rtxt { margin: 0; border-left: 3px solid var(--cz-blue); padding: 2px 0 2px 12px; font-size: 14px; color: var(--cz-ink); white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
91
|
+
.hr-none { margin: 0; color: var(--cz-ink3); }
|
|
92
|
+
.hr-racts { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
|
|
@@ -182,6 +182,17 @@ body.cz-home { min-height: 100vh; overflow: hidden; }
|
|
|
182
182
|
.hm-chd[hidden] { display: none; }
|
|
183
183
|
.hm-chd .hv-mk { margin-right: -4px; }
|
|
184
184
|
.hm-chb { min-width: 0; font-size: 17px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
185
|
+
/* session names A (canvas XmsNames): the session's name is the rename press; a tap makes it the agreed field (RnATask) */
|
|
186
|
+
.hm-chn { min-width: 0; flex: 0 1 auto; display: flex; align-items: center; }
|
|
187
|
+
.hm-chn:has(.hm-ren) { flex: 1; }
|
|
188
|
+
.hm-rn { font: inherit; color: inherit; background: transparent; border: 0; margin: 0 0 0 -6px; padding: 2px 6px; border-radius: 10px; cursor: text; text-align: left; max-width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
|
|
189
|
+
.hm-rn:hover { background: var(--cz-well); }
|
|
190
|
+
.hm-rn:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 1px; }
|
|
191
|
+
.hm-ren { flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px; height: 40px; border-radius: 12px; background: var(--cz-card); box-shadow: 0 0 0 1.5px var(--cz-blue), 0 0 0 5px color-mix(in srgb, var(--cz-blue) 14%, transparent); padding: 0 4px 0 10px; }
|
|
192
|
+
.hm-ren input { flex: 1; min-width: 0; font: inherit; font-size: 16px; font-weight: 800; color: var(--cz-ink); border: 0; background: transparent; outline: 0; padding: 0; }
|
|
193
|
+
.hm-ren .sv { width: 32px; height: 32px; border-radius: 999px; border: 0; background: var(--cz-solid); color: var(--cz-onsolid); display: inline-flex; align-items: center; justify-content: center; flex: none; cursor: pointer; }
|
|
194
|
+
.hm-ren .sv:disabled { opacity: .6; cursor: default; }
|
|
195
|
+
.hm-renerr { margin: 4px 0 0 10px; font-size: 12.5px; color: var(--cz-red); }
|
|
185
196
|
.hm-chs { flex: 0 1 auto; min-width: 0; height: 28px; padding: 0 10px; border-radius: 999px; background: var(--cz-well); color: var(--cz-ink2); font-size: 12.5px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
|
|
186
197
|
.hm-chs > span { overflow: hidden; text-overflow: ellipsis; }
|
|
187
198
|
.hm-chs .hv-mt { margin-left: 0; }
|
|
@@ -237,20 +248,33 @@ body.cz-home { min-height: 100vh; overflow: hidden; }
|
|
|
237
248
|
.hm-steps li.done { color: var(--cz-ink); } .hm-steps li.done i { background: var(--cz-done); border-color: var(--cz-done); }
|
|
238
249
|
.hm-steps li.now { color: var(--cz-ink); font-weight: 700; } .hm-steps li.now i { border: 2px solid var(--cz-blue); }
|
|
239
250
|
.hm-watch { margin-top: 6px; border: 0; background: none; padding: 0 8px; height: 30px; font-size: 12px; color: var(--cz-ink2); cursor: pointer; }
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
.hm-
|
|
243
|
-
.hm-
|
|
244
|
-
.hm-
|
|
245
|
-
.hm-
|
|
246
|
-
.hm-
|
|
247
|
-
.hm-
|
|
248
|
-
.hm-
|
|
249
|
-
.hm-
|
|
250
|
-
.hm-
|
|
251
|
+
/* every kind of ask, one card (canvas XcbOptions "Every kind of ask", home-ask.js): part of the agent's message, in line with its text, no
|
|
252
|
+
* avatar of its own; the kind's label, what it asks, before → after where the change holds both, then the answers as labeled icons */
|
|
253
|
+
.hm-askw, .hm-askc { padding-left: 38px; }
|
|
254
|
+
.hm-askk { padding: 10px 12px 12px; border-radius: 16px; background: linear-gradient(180deg, var(--cz-bluebg) 0%, var(--cz-card) 70%); box-shadow: inset 0 0 0 1.5px var(--cz-blue); display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
|
|
255
|
+
.hm-askk .k { margin: 0; font-size: 12px; font-weight: 700; color: var(--cz-ink3); }
|
|
256
|
+
.hm-askk .q { font-size: 14px; font-weight: 700; color: var(--cz-ink); overflow-wrap: anywhere; }
|
|
257
|
+
.hm-askk .ft { margin: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; }
|
|
258
|
+
.hm-askk .ft b { font-weight: 600; }
|
|
259
|
+
.hm-askk s { color: var(--cz-ink3); }
|
|
260
|
+
.hm-askk .acts, .hm-fix { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
|
|
261
|
+
.hm-fix { padding-left: 38px; margin-top: 0; }
|
|
262
|
+
.hm-icb { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--cz-hair); background: var(--cz-card); color: var(--cz-ink2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
|
|
263
|
+
.hm-icb.pri { background: var(--cz-solid); color: var(--cz-onsolid); border-color: transparent; }
|
|
264
|
+
.hm-icb:disabled { opacity: .45; cursor: default; }
|
|
265
|
+
.hm-icb:focus-visible, .hm-chat .chip2:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 2px; }
|
|
266
|
+
.hm-chat .hm-askk.tc { margin-top: 0; padding: 10px 12px 12px; }
|
|
267
|
+
.hm-chat .hm-askk .askq { margin: 0 0 6px; display: flex; flex-direction: column; gap: 4px; }
|
|
268
|
+
.hm-chat .chips2 { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
|
|
269
|
+
.hm-chat .chips2 .chip2 { min-height: 44px; padding: 8px 12px; border-radius: 14px; border: 1px solid var(--cz-hair); background: var(--cz-card); color: var(--cz-ink); font: 600 13.5px/1.25 var(--cz-sans); text-align: left; cursor: pointer; }
|
|
270
|
+
.hm-chat .chips2 .chip2.rec { border-color: var(--cz-blue); background: var(--cz-bluebg); }
|
|
271
|
+
.hm-chat .chips2 .chip2 small { display: block; font-size: 11.5px; font-weight: 800; color: var(--cz-blueink); }
|
|
272
|
+
.hm-chat .chips2 .chip2[aria-pressed="true"] { background: var(--cz-solid); color: var(--cz-onsolid); border-color: transparent; }
|
|
273
|
+
.hm-chat .chips2 .chip2[aria-pressed="true"] small { color: inherit; }
|
|
274
|
+
.hm-chat .chips2 .chip2:disabled { opacity: .55; cursor: default; }
|
|
251
275
|
.hm-mw { position: relative; }
|
|
252
276
|
.hm-dots { width: 36px; padding: 0 !important; display: grid; place-items: center; }
|
|
253
|
-
.hm-
|
|
277
|
+
.hm-askk .hm-dots { border-color: transparent; } /* a quiet ⋯: the prompt's other choices (AgChatAsk) */
|
|
254
278
|
.hm-pmenu { position: absolute; right: 0; bottom: 42px; z-index: 5; min-width: 220px; padding: 6px; border-radius: 14px; background: var(--cz-card); box-shadow: var(--cz-sheet); display: flex; flex-direction: column; }
|
|
255
279
|
.hm-pmenu[hidden] { display: none; }
|
|
256
280
|
.hm-pmenu button { border: 0 !important; border-radius: 10px !important; text-align: left; }
|
|
@@ -405,6 +429,13 @@ form.hm-box textarea { min-height: 48px; border: 0; background: none; resize: no
|
|
|
405
429
|
.hm-top-t { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 10px; }
|
|
406
430
|
.hm-top-t b { font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
|
|
407
431
|
.hm-top-t span { font-size: 13px; color: var(--cz-ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
432
|
+
/* session names A: the top bar is back + the name; the name is a 44 px press, and the field fills the bar (XmsNames) */
|
|
433
|
+
.hm-top-t:has(.hm-rn, .hm-ren) b { max-width: 100%; flex: 1; min-width: 0; display: flex; flex-direction: column; }
|
|
434
|
+
.hm-top-t .hm-rn { min-height: 44px; display: flex; align-items: center; max-width: 100%; }
|
|
435
|
+
.hm-top-t .hm-rn, .hm-top-t .hm-ren input { font-size: 17px; }
|
|
436
|
+
.hm-top-t .hm-ren { flex: none; height: 44px; }
|
|
437
|
+
.hm-top-t .hm-ren .sv { width: 36px; height: 36px; }
|
|
438
|
+
.hm-top-t span:empty { display: none; }
|
|
408
439
|
.hm-needs { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--cz-hair); background: var(--cz-card); color: var(--cz-ink); font-size: 13px; font-weight: 700; cursor: pointer; font-family: var(--cz-sans); }
|
|
409
440
|
.hm-needs i { width: 7px; height: 7px; border-radius: 50%; background: var(--cz-dot-q); }
|
|
410
441
|
.hm-needs.loud i { background: var(--cz-blue); }
|
|
@@ -449,6 +480,64 @@ form.hm-box textarea { min-height: 48px; border: 0; background: none; resize: no
|
|
|
449
480
|
.hm-chat .gkv { display: grid; grid-template-columns: 90px 1fr; gap: 4px 10px; margin: 6px 0; }
|
|
450
481
|
.hm-chat .smart { display: flex; gap: 4px; } .hm-chat .smart b { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font-size: 11px; background: var(--cz-well); color: var(--cz-ink3); }
|
|
451
482
|
.hm-chat .smart b.y { background: var(--cz-bluebg); color: var(--cz-blueink); }
|
|
483
|
+
/* the goal before Start (XcbOptions B, row 1; home-goal.js, goal-chat.js): the method line with Change, a row of dots (one per point the
|
|
484
|
+
* method needs), tap answers with one recommended, the plan card with Start, Change and Cancel as icons, the editor in place, the /goal choice */
|
|
485
|
+
:is(.hm-chat, .vwgoal) .gq, :is(.hm-chat, .vwgoal) .gplan { min-width: 0; font-size: 14px; }
|
|
486
|
+
:is(.hm-chat, .vwgoal) .gmw { position: relative; display: inline-block; }
|
|
487
|
+
:is(.hm-chat, .vwgoal) .gmeth { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-height: 32px; margin: 0 0 2px; padding: 0; border: 0; background: none; font: inherit; font-size: 12.5px; color: var(--cz-ink3); text-align: left; }
|
|
488
|
+
:is(.hm-chat, .vwgoal) button.gmeth { cursor: pointer; }
|
|
489
|
+
:is(.hm-chat, .vwgoal) .gmeth b { color: var(--cz-ink); font-weight: 800; }
|
|
490
|
+
:is(.hm-chat, .vwgoal) .gmeth svg { color: var(--cz-blueink); }
|
|
491
|
+
:is(.hm-chat, .vwgoal) .gmeth em { font-style: normal; margin-left: 4px; }
|
|
492
|
+
:is(.hm-chat, .vwgoal) .gmenu { position: absolute; left: 0; top: 34px; z-index: 6; min-width: 240px; padding: 6px; border-radius: 14px; background: var(--cz-card); box-shadow: var(--cz-sheet); border: 1px solid var(--cz-hair); display: flex; flex-direction: column; }
|
|
493
|
+
:is(.hm-chat, .vwgoal) .gmenu[hidden] { display: none; }
|
|
494
|
+
:is(.hm-chat, .vwgoal) .gmenu button { display: flex; flex-direction: column; gap: 1px; min-height: 44px; padding: 6px 10px; border: 0; border-radius: 10px; background: none; color: var(--cz-ink); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
|
|
495
|
+
:is(.hm-chat, .vwgoal) .gmenu button:hover, :is(.hm-chat, .vwgoal) .gmenu button:focus-visible { background: var(--cz-well); }
|
|
496
|
+
:is(.hm-chat, .vwgoal) .gmenu em { font-style: normal; font-size: 12px; color: var(--cz-ink3); }
|
|
497
|
+
:is(.hm-chat, .vwgoal) .gdots { display: flex; gap: 4px; margin: 2px 0 8px; }
|
|
498
|
+
:is(.hm-chat, .vwgoal) .gdots i { display: block; width: 16px; height: 5px; border-radius: 3px; background: var(--cz-ink3); opacity: .3; }
|
|
499
|
+
:is(.hm-chat, .vwgoal) .gdots i.y { background: var(--cz-blueink); opacity: 1; }
|
|
500
|
+
:is(.hm-chat, .vwgoal) .gchips { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
|
|
501
|
+
:is(.hm-chat, .vwgoal) .gchip { min-height: 44px; padding: 8px 12px; border-radius: 14px; border: 1px solid var(--cz-hair); background: var(--cz-card); color: var(--cz-ink); font: inherit; font-size: 13.5px; font-weight: 600; text-align: left; cursor: pointer; }
|
|
502
|
+
:is(.hm-chat, .vwgoal) .gchip.rec { border-color: var(--cz-blue); background: var(--cz-bluebg); }
|
|
503
|
+
:is(.hm-chat, .vwgoal) .gchip small { display: block; font-size: 11.5px; font-weight: 800; color: var(--cz-blueink); }
|
|
504
|
+
:is(.hm-chat, .vwgoal) .gchip small.warn { color: var(--cz-late); }
|
|
505
|
+
:is(.hm-chat, .vwgoal) .gplan { margin-top: 6px; padding: 10px 12px 12px; border-radius: 16px; border: 1px solid var(--cz-hair); background: linear-gradient(180deg, var(--cz-bluebg) 0%, var(--cz-card) 60%); box-shadow: var(--cz-vlift); }
|
|
506
|
+
:is(.hm-chat, .vwgoal) .gpt { display: block; padding: 0; border: 0; background: none; color: var(--cz-ink); font: inherit; font-size: 14px; font-weight: 800; text-align: left; cursor: pointer; }
|
|
507
|
+
:is(.hm-chat, .vwgoal) .gplan ul { margin: 2px 0 6px; padding-left: 18px; font-size: 13.5px; line-height: 1.45; }
|
|
508
|
+
:is(.hm-chat, .vwgoal) .pk2 { margin: 8px 0 0; font-size: 12px; font-weight: 700; color: var(--cz-ink3); }
|
|
509
|
+
:is(.hm-chat, .vwgoal) .pk2 span { color: var(--cz-ink); font-weight: 600; }
|
|
510
|
+
:is(.hm-chat, .vwgoal) .pk2 em { font-style: normal; margin-left: 4px; padding: 0 5px; border-radius: 6px; color: var(--cz-late); background: var(--cz-latebg); }
|
|
511
|
+
:is(.hm-chat, .vwgoal) .acts { display: flex; gap: 8px; margin-top: 10px; }
|
|
512
|
+
:is(.hm-chat, .vwgoal, .gprog2) .icb { width: 44px; height: 44px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--cz-hair); background: var(--cz-card); color: var(--cz-ink2); cursor: pointer; }
|
|
513
|
+
:is(.hm-chat, .vwgoal) .icb.pri { background: var(--cz-solid); border-color: var(--cz-solid); color: var(--cz-onsolid); }
|
|
514
|
+
:is(.hm-chat, .vwgoal) .icb:disabled { opacity: .5; cursor: default; }
|
|
515
|
+
:is(.hm-chat, .vwgoal) .gplan.ed .fld { flex: 1; min-width: 0; box-sizing: border-box; padding: 8px 10px; border-radius: 10px; border: 1px solid transparent; background: var(--cz-well); color: var(--cz-ink); font: inherit; font-size: 13.5px; line-height: 1.35; resize: none; overflow: hidden; }
|
|
516
|
+
:is(.hm-chat, .vwgoal) .gplan.ed .fld:focus { outline: none; border-color: var(--cz-blue); background: var(--cz-card); box-shadow: 0 0 0 3px var(--cz-bluebg); }
|
|
517
|
+
:is(.hm-chat, .vwgoal) .gplan.ed .fld.s { display: inline-block; flex: none; width: 13em; max-width: 100%; padding: 2px 6px; font-size: 12.5px; font-weight: 600; }
|
|
518
|
+
:is(.hm-chat, .vwgoal) .gplan.ed .kv { display: flex; flex-wrap: wrap; gap: 6px 12px; }
|
|
519
|
+
:is(.hm-chat, .vwgoal) .gplan.ed .kv label { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
|
|
520
|
+
:is(.hm-chat, .vwgoal) .edl { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; }
|
|
521
|
+
:is(.hm-chat, .vwgoal) .edl li { display: flex; align-items: flex-start; gap: 4px; }
|
|
522
|
+
:is(.hm-chat, .vwgoal) .edl li.drag { opacity: .7; }
|
|
523
|
+
:is(.hm-chat, .vwgoal) .grip { width: 24px; height: 36px; flex: none; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; background: none; color: var(--cz-ink3); cursor: grab; touch-action: none; }
|
|
524
|
+
:is(.hm-chat, .vwgoal, .gprog2) .rx { width: 36px; height: 36px; flex: none; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--cz-ink3); cursor: pointer; }
|
|
525
|
+
:is(.hm-chat, .vwgoal) .addp { width: 36px; height: 36px; margin: 6px 0 0 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px dashed var(--cz-ink3); background: none; color: var(--cz-blueink); cursor: pointer; }
|
|
526
|
+
.hm-chat .gchoice .askc { padding: 10px 12px 12px; border-radius: 16px; border: 1.5px solid var(--cz-blue); background: linear-gradient(180deg, var(--cz-bluebg) 0%, var(--cz-card) 70%); }
|
|
527
|
+
.hm-chat .gchoice .askc .k { margin: 0; font-size: 12px; font-weight: 700; color: var(--cz-ink3); }
|
|
528
|
+
.hm-chat .gchoice .askc > b { font-size: 14px; }
|
|
529
|
+
.vwgoal .gprog2 .grow { display: flex; align-items: center; gap: 8px; }
|
|
530
|
+
.vwgoal .gprog2 .grow b { flex: 1; min-width: 0; }
|
|
531
|
+
.vwgoal .gprog2 .gpill { font-size: 12px; color: var(--cz-ink3); }
|
|
532
|
+
.vwgoal .gprog2 .grow .icb { width: 36px; height: 36px; }
|
|
533
|
+
.vwgoal .gprog { margin: 8px 0 0; font-size: 12.5px; color: var(--cz-ink2); }
|
|
534
|
+
.vwgoal .gpts { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
|
|
535
|
+
.vwgoal .gpts li { display: grid; grid-template-columns: 14px 1fr auto; gap: 0 10px; align-items: center; font-size: 13.5px; }
|
|
536
|
+
.vwgoal .gpts li > em { grid-column: 2; font-style: normal; font-size: 12px; color: var(--cz-ink3); }
|
|
537
|
+
.vwgoal .gpts li > .rx { grid-column: 3; grid-row: 1 / span 2; }
|
|
538
|
+
.vwgoal .gpts i { width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--cz-ink3); }
|
|
539
|
+
.vwgoal .gpts li.m i { background: var(--cz-ok); box-shadow: none; }
|
|
540
|
+
.vwgoal .gpts li.sk s { color: var(--cz-ink3); }
|
|
452
541
|
.hm-chat .atrow { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
|
|
453
542
|
.hm-chat .atc { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 10px; background: var(--cz-card); font-size: 12px; cursor: pointer; border: 1px solid var(--cz-hair); }
|
|
454
543
|
.hm-peek { display: flex; align-items: center; gap: 10px; min-height: 40px; margin-top: 8px; padding: 0 14px; border: 0; border-radius: 12px; background: var(--cz-bluebg); color: var(--cz-ink); font-size: 12.5px; cursor: pointer; text-align: left; }
|
|
@@ -633,3 +722,14 @@ form.hm-box textarea { min-height: 48px; border: 0; background: none; resize: no
|
|
|
633
722
|
body.cz-home.cz-vw-over .hm-vw { position: absolute; top: 16px; right: 16px; bottom: 16px; z-index: 5; }
|
|
634
723
|
body.cz-home.cz-vw-over .hm-vw .cz-vw { box-shadow: var(--cz-vlift); }
|
|
635
724
|
}
|
|
725
|
+
|
|
726
|
+
/* a phone chat's top bar: ← and the title, and the recording pill while a meeting records (XcbOptions B, case 7) */
|
|
727
|
+
.hm-recp { display: none; }
|
|
728
|
+
@media (max-width: 760px) {
|
|
729
|
+
body.cz-home:not(.hm-plist) #hmTopSub { display: none; }
|
|
730
|
+
.hm-recp:not([hidden]) { flex: none; display: inline-flex; align-items: center; height: 44px; padding: 0 2px; border: 0; background: none; cursor: pointer; }
|
|
731
|
+
.hm-recp .pill { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; background: var(--cz-redbg); color: var(--cz-red); font: 700 13px var(--cz-sans); font-variant-numeric: tabular-nums; }
|
|
732
|
+
.hm-recp i { width: 8px; height: 8px; border-radius: 50%; background: var(--cz-dot-red); }
|
|
733
|
+
.hm-recp.paused .pill { background: var(--cz-well); color: var(--cz-ink3); }
|
|
734
|
+
.hm-recp.paused i { background: var(--cz-dot-q); }
|
|
735
|
+
}
|
|
@@ -12,6 +12,7 @@ import { esc, svg, ICON, wsParam, wsQ, skelRows, cantRead, failedItem } from './
|
|
|
12
12
|
const ARROW = { up: 'M12 19V5M6 11l6-6 6 6', down: 'M12 5v14M6 13l6 6 6-6', enter: 'M20 5v7a3 3 0 0 1-3 3H5M9 11l-4 4 4 4' }; // the footer's keys, drawn (R28-13: no glyph as a control)
|
|
13
13
|
import { SEARCH_KINDS, PHONE_KINDS, searchGroups, resultSub, resultTag, wtChip } from './cozy-evmodel.js';
|
|
14
14
|
import { open as vwOpen, current as vwCurrent } from './cozy-viewer.js';
|
|
15
|
+
import { nameOf as sessionName } from './home-data.js'; // session names A: the PM's name wins, then Claude's
|
|
15
16
|
|
|
16
17
|
const PHONE = 760;
|
|
17
18
|
const isPhone = () => innerWidth <= PHONE;
|
|
@@ -95,7 +96,7 @@ function allRows() {
|
|
|
95
96
|
const seen = new Set(res.filter((r) => r.kind === 'initiative').map((r) => r.id));
|
|
96
97
|
for (const r of res) if (r.kind === 'initiative') { const b = B.find((x) => x.id === r.id); if (b) Object.assign(r, { stage: b.stage, lane: r.lane || b.lane, days: b.days_in_stage || b.days || null, title: b.title || r.title, board: S.boards.board, bws: S.boards.ws }); }
|
|
97
98
|
for (const b of B) if (!seen.has(b.id) && (String(b.title || '') + ' ' + b.id).toLowerCase().includes(q)) res.unshift({ kind: 'initiative', group: 'initiative', id: b.id, title: b.title || b.id, lane: b.lane, stage: b.stage, days: b.days_in_stage || null, board: S.boards.board, bws: S.boards.ws, why: 'name' });
|
|
98
|
-
for (const s of S.sessions || []) if ((String(s.name || '') + ' ' + String((s.hx && s.hx.title) || '')).toLowerCase().includes(q)) res.push({ kind: 'session', group: 'meeting', id: s.id, title: (s
|
|
99
|
+
for (const s of S.sessions || []) if ((String(s.name || '') + ' ' + String(s.auto_name || '') + ' ' + String((s.hx && s.hx.title) || '')).toLowerCase().includes(q)) res.push({ kind: 'session', group: 'meeting', id: s.id, title: sessionName(s) || s.id, where: s.cwd && s.cwd !== '.' ? s.cwd : '', state: s.state || '', why: 'name' });
|
|
99
100
|
return res;
|
|
100
101
|
}
|
|
101
102
|
const countsOf = (rows) => { const c = { all: rows.length }; for (const r of rows) { const k = r.group === 'session' ? 'meeting' : r.group || r.kind; c[k] = (c[k] || 0) + 1; } return c; };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/* pm/cozy-steps.css — the step list, one shared part (stage card D XscD/XscDDesk, the chat progress line XcbOptions). cozy-steps.js
|
|
2
|
+
* adds it once. Motion signals importance: the PM's step ripples (info), a late step ripples faster (warn), an agent at work spins. */
|
|
3
|
+
.cz-sl { --cz-sl-line: color-mix(in srgb, var(--cz-ink3) 32%, transparent); list-style: none; margin: 0; padding: 0; }
|
|
4
|
+
.cz-sli { position: relative; display: flex; align-items: flex-start; gap: 4px; }
|
|
5
|
+
.cz-sli:not(:last-child)::before { content: ""; position: absolute; left: 10px; top: 26px; bottom: -2px; width: 1.5px; background: var(--cz-sl-line); }
|
|
6
|
+
.cz-st { position: relative; display: flex; align-items: flex-start; gap: 12px; width: 100%; min-height: 44px; padding: 2px 0 10px; font: inherit; color: var(--cz-ink); background: transparent; border: 0; margin: 0; text-align: left; }
|
|
7
|
+
button.cz-st { cursor: pointer; border-radius: 10px; }
|
|
8
|
+
button.cz-st:focus-visible, .cz-sact:focus-visible, .cz-more:focus-visible, .cz-mvb:focus-visible { outline: 2px solid var(--cz-focus, var(--cz-blue)); outline-offset: 2px; }
|
|
9
|
+
.cz-sli.has-act .cz-st { flex: 1; min-width: 0; }
|
|
10
|
+
|
|
11
|
+
/* the node */
|
|
12
|
+
.cz-nd { position: relative; z-index: 1; flex: none; width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--cz-card); color: var(--cz-ink3); }
|
|
13
|
+
.cz-nd.s16 { width: 16px; height: 16px; } .cz-nd.s14 { width: 14px; height: 14px; }
|
|
14
|
+
.cz-nd.wait, .cz-nd.skip { border: 1.6px solid var(--cz-sl-line); }
|
|
15
|
+
.cz-nd.done { background: var(--cz-bluebg); color: var(--cz-blueink); }
|
|
16
|
+
.cz-nd.you { border: 2px solid var(--cz-blue); }
|
|
17
|
+
.cz-nd.you::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; background: var(--cz-blue); animation: cz-st-info 6s ease-out infinite; }
|
|
18
|
+
.cz-nd.risk { border: 2px solid var(--cz-risk); color: var(--cz-risk); font-size: 12px; }
|
|
19
|
+
.cz-nd.risk b { font-weight: 900; }
|
|
20
|
+
.cz-nd.risk::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; background: var(--cz-risk); animation: cz-st-warn 3.2s ease-out infinite; }
|
|
21
|
+
.cz-nd.tl { border: 1.6px dashed var(--cz-sl-line); }
|
|
22
|
+
.cz-nd.go { background: var(--cz-solid); color: var(--cz-onsolid); }
|
|
23
|
+
.cz-spin { display: inline-flex; color: var(--cz-ink3); }
|
|
24
|
+
.cz-spin svg { animation: cz-st-spin 1.1s steps(8) infinite; }
|
|
25
|
+
@keyframes cz-st-spin { to { transform: rotate(360deg); } }
|
|
26
|
+
@keyframes cz-st-info { 0% { transform: scale(1); opacity: .25; } 35% { transform: scale(1.9); opacity: 0; } 100% { transform: scale(1.9); opacity: 0; } }
|
|
27
|
+
@keyframes cz-st-warn { 0% { transform: scale(1); opacity: .35; } 60% { transform: scale(2.2); opacity: 0; } 100% { transform: scale(2.2); opacity: 0; } }
|
|
28
|
+
@media (prefers-reduced-motion: reduce) { .cz-spin svg, .cz-nd.you::after, .cz-nd.risk::after { animation: none; } .cz-nd.you::after, .cz-nd.risk::after { opacity: 0; } }
|
|
29
|
+
|
|
30
|
+
/* the words */
|
|
31
|
+
.cz-st .tx { flex: 1; min-width: 0; font-size: 14px; line-height: 1.35; padding-top: 1px; }
|
|
32
|
+
.cz-st .tx small { display: block; font-size: 12px; color: var(--cz-ink3); font-weight: 600; margin-top: 2px; }
|
|
33
|
+
.cz-st .tx small.warn { color: var(--cz-risk); }
|
|
34
|
+
.cz-st .tx code { display: block; margin-top: 3px; font-family: var(--cz-mono); font-size: 11.5px; color: var(--cz-ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
35
|
+
.cz-st.dn .tx { color: var(--cz-ink3); }
|
|
36
|
+
.cz-st.now .tx .lb { font-weight: 800; }
|
|
37
|
+
.cz-st.rk .tx .lb { font-weight: 800; }
|
|
38
|
+
.cz-st.wt .tx { color: var(--cz-ink2); }
|
|
39
|
+
.cz-st.sk .tx .lb { text-decoration: line-through; color: var(--cz-ink3); }
|
|
40
|
+
.cz-fold { align-items: center; min-height: 40px; padding-bottom: 6px; color: var(--cz-ink3); font-size: 13.5px; font-weight: 600; }
|
|
41
|
+
.cz-fold .tx { font-size: 13.5px; color: var(--cz-ink3); padding-top: 0; }
|
|
42
|
+
.cz-fold[aria-expanded="false"] .tx { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
43
|
+
.cz-cv { display: inline-flex; color: var(--cz-ink3); margin-top: 3px; flex: none; }
|
|
44
|
+
.cz-fold .cz-cv { margin-top: 0; }
|
|
45
|
+
.cz-more { display: flex; align-items: center; min-height: 36px; width: 100%; padding: 0 0 6px 34px; font: inherit; font-size: 13px; font-weight: 700; color: var(--cz-ink2); background: transparent; border: 0; cursor: pointer; text-align: left; }
|
|
46
|
+
.cz-sli:has(> .cz-more)::before { display: none; }
|
|
47
|
+
|
|
48
|
+
/* the go button (the one primary), the owner, the trailing act */
|
|
49
|
+
.cz-gob { flex: none; width: 32px; height: 32px; margin-top: -4px; border-radius: 50%; background: var(--cz-solid); color: var(--cz-onsolid); display: inline-flex; align-items: center; justify-content: center; }
|
|
50
|
+
.cz-own { flex: none; width: 24px; height: 24px; margin-top: -1px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 800; background: var(--cz-riskbg); color: var(--cz-risk); }
|
|
51
|
+
.cz-own.c { background: var(--cz-solid); color: var(--cz-onsolid); }
|
|
52
|
+
.cz-own.cw { background: var(--cz-well); color: var(--cz-ink2); }
|
|
53
|
+
.cz-own.j { background: var(--cz-well); color: var(--cz-ink2); border-radius: 6px; }
|
|
54
|
+
.cz-sact { flex: none; width: 32px; height: 32px; margin-top: -4px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--cz-ink3); background: transparent; border: 0; cursor: pointer; }
|
|
55
|
+
.cz-sact:hover { background: var(--cz-well); }
|
|
56
|
+
|
|
57
|
+
/* Jira: the ticket bar */
|
|
58
|
+
.cz-jb { display: flex; gap: 2px; margin-top: 5px; max-width: 180px; }
|
|
59
|
+
.cz-jb i { flex: 1; height: 4px; border-radius: 2px; background: var(--cz-sl-line); }
|
|
60
|
+
.cz-jb i.on { background: var(--cz-ok); box-shadow: none; }
|
|
61
|
+
.cz-jb + small { margin-top: 4px !important; }
|
|
62
|
+
|
|
63
|
+
/* the last node: the next stage, then the button when every step is done */
|
|
64
|
+
.cz-st.mv .tx .nm { display: flex; align-items: center; gap: 6px; font-weight: 800; color: var(--cz-ink); }
|
|
65
|
+
.cz-st.mv .tx small { font-weight: 600; }
|
|
66
|
+
.cz-auto { display: inline-flex; color: var(--cz-blue); }
|
|
67
|
+
.cz-st.mvr { align-items: center; padding-bottom: 4px; }
|
|
68
|
+
.cz-mvb { flex: 1; min-height: 44px; border-radius: 14px; background: var(--cz-solid); color: var(--cz-onsolid); font: inherit; font-weight: 800; font-size: 14.5px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; padding: 0 16px; }
|
|
69
|
+
.cz-mvb span { display: inline-flex; align-items: center; gap: 4px; }
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/* pm/cozy-steps.js — the step list, one shared part (canvas Ready for development: stage card D XscD and XscDDesk, the chat progress
|
|
2
|
+
* line XcbOptions). Pure string builders; the first call in a page adds /pm/cozy-steps.css once.
|
|
3
|
+
*
|
|
4
|
+
* stepsHtml(steps, o) <ol class="cz-sl">. A step: { state, label, note, noteWarn, code, owner, go, attr, aria, jira, act }
|
|
5
|
+
* state 'done' | 'you' (blue ring, info motion) | 'run' (spinner: only when a record says a session runs) | 'wait' (empty circle)
|
|
6
|
+
* | 'risk' (amber ring with !, warn motion) | 'skip' (struck through)
|
|
7
|
+
* note the line under the label; noteWarn draws it amber (a late or blocked step's reason)
|
|
8
|
+
* code a mono line under the label (the tool call, "Edit · planning/prd/x.md")
|
|
9
|
+
* owner { kind: 'person' | 'claude' | 'jira', initials, name, live } (live: Claude at work, a solid avatar)
|
|
10
|
+
* go { attr, label } the blue go button: the one primary on the card
|
|
11
|
+
* attr makes the whole row a button ('data-x="y"'); aria its label
|
|
12
|
+
* jira { done, total, read } the ticket bar and "Read from Jira 10 min ago"
|
|
13
|
+
* act { attr, icon: 'undo' | 'x', label } a trailing icon button (a skipped step's undo, × to skip)
|
|
14
|
+
* o: { label, cls, fold: { n, names, open, attr }, more: { n, attr, label }, tail } tail: the html of a last node (stepTail)
|
|
15
|
+
* stepTail(t) the last node: { name, ms, auto, note, attr, aria, ready: { attr, label } } (ready: every step done, the button
|
|
16
|
+
* "<label> ◆ <name>", label 'Move to' when not given)
|
|
17
|
+
* nodeHtml(state, size) one node alone (14, 16 or 22); spinHtml(size) the 8-tick spinner, still under reduced motion.
|
|
18
|
+
* ensureCss() adds the stylesheet now: a page calls it when it mounts, so the first draw is not unstyled. */
|
|
19
|
+
const esc = (s) => String(s == null ? '' : s).replace(/[&<>"']/g, (c) => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }[c]));
|
|
20
|
+
const SVG = (d, w = 16, sw = 2.2) => `<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>`;
|
|
21
|
+
const P = {
|
|
22
|
+
check: 'M5 12l5 5 9-10', go: 'M10 7l5 5-5 5', down: 'M7 10l5 5 5-5', up: 'M7 14l5-5 5 5', next: 'M5 12h14M13 6l6 6-6 6',
|
|
23
|
+
spin: 'M12 3v3M12 18v3M3 12h3M18 12h3M5.6 5.6l2.1 2.1M16.3 16.3l2.1 2.1M5.6 18.4l2.1-2.1M16.3 7.7l2.1-2.1',
|
|
24
|
+
auto: 'M20 11a8 8 0 0 0-14.3-4.9M4 13a8 8 0 0 0 14.3 4.9M5 3v3.5h3.5M19 21v-3.5h-3.5',
|
|
25
|
+
undo: 'M9 14L4 9l5-5M4 9h10a6 6 0 0 1 0 12h-3', x: 'M6 6l12 12M18 6L6 18',
|
|
26
|
+
};
|
|
27
|
+
export const ICON = P;
|
|
28
|
+
const MS = '<i class="cz-ms" aria-hidden="true"></i>';
|
|
29
|
+
|
|
30
|
+
let css = false;
|
|
31
|
+
export function ensureCss() {
|
|
32
|
+
if (css || typeof document === 'undefined' || !document.head) return;
|
|
33
|
+
css = true;
|
|
34
|
+
if (document.querySelector('link[data-cz-steps-css]')) return;
|
|
35
|
+
const l = document.createElement('link'); l.rel = 'stylesheet'; l.href = '/pm/cozy-steps.css'; l.dataset.czStepsCss = ''; document.head.appendChild(l);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** The 8-tick spinner (it turns in steps; still under reduced motion). */
|
|
39
|
+
export const spinHtml = (size = 16) => `<span class="cz-spin" aria-hidden="true">${SVG(P.spin, size, 2.4)}</span>`;
|
|
40
|
+
/** One node alone: done, you, run, wait, risk, skip. size: 14, 16 or 22 (the list's own). */
|
|
41
|
+
export function nodeHtml(state, size = 22) {
|
|
42
|
+
ensureCss();
|
|
43
|
+
const s = [14, 16, 22].includes(size) ? size : 22;
|
|
44
|
+
const inner = state === 'done' ? SVG(P.check, s === 22 ? 12 : s - 4, 2.8) : state === 'run' ? spinHtml(s === 22 ? 16 : s - 2) : state === 'risk' ? '<b>!</b>' : '';
|
|
45
|
+
return `<span class="cz-nd ${esc(state || 'wait')} s${s}" aria-hidden="true">${inner}</span>`;
|
|
46
|
+
}
|
|
47
|
+
function ownerHtml(o) {
|
|
48
|
+
if (!o) return '';
|
|
49
|
+
const k = o.kind === 'jira' ? 'j' : o.kind === 'claude' ? (o.live ? 'c' : 'cw') : 'p';
|
|
50
|
+
const t = o.kind === 'jira' ? 'J' : o.kind === 'claude' ? 'C' : String(o.initials || '?').slice(0, 2);
|
|
51
|
+
const name = o.name || (o.kind === 'jira' ? 'Jira' : o.kind === 'claude' ? 'Claude' : '');
|
|
52
|
+
return `<span class="cz-own ${k}" role="img" aria-label="${esc(name)}" title="${esc(name)}">${esc(t)}</span>`;
|
|
53
|
+
}
|
|
54
|
+
function jiraHtml(j) {
|
|
55
|
+
const total = Math.max(0, Math.min(40, Number(j.total) || 0)), done = Math.max(0, Math.min(total, Number(j.done) || 0));
|
|
56
|
+
if (!total) return '';
|
|
57
|
+
return `<span class="cz-jb" role="img" aria-label="${done} of ${total} tickets done">${Array.from({ length: total }, (_, i) => `<i${i < done ? ' class="on"' : ''}></i>`).join('')}</span>`
|
|
58
|
+
+ (j.read ? `<small>${esc(j.read)}</small>` : '');
|
|
59
|
+
}
|
|
60
|
+
function stepHtml(x) {
|
|
61
|
+
const st = x.state || 'wait';
|
|
62
|
+
const cls = { done: 'dn', you: 'now', run: 'now', wait: 'wt', risk: 'rk', skip: 'sk' }[st] || 'wt';
|
|
63
|
+
const body = `${nodeHtml(st)}<span class="tx"><span class="lb">${esc(x.label)}</span>`
|
|
64
|
+
+ (x.note ? `<small${x.noteWarn ? ' class="warn"' : ''}>${esc(x.note)}</small>` : '')
|
|
65
|
+
+ (x.code ? `<code>${esc(x.code)}</code>` : '')
|
|
66
|
+
+ (x.jira ? jiraHtml(x.jira) : '') + '</span>'
|
|
67
|
+
+ (x.go ? `<span class="cz-gob" aria-hidden="true">${SVG(P.go, 16, 2.4)}</span>` : ownerHtml(x.owner));
|
|
68
|
+
// a row with a press is one button; a trailing act is its own button beside it (never a button inside a button)
|
|
69
|
+
const press = x.go ? x.go.attr : x.attr;
|
|
70
|
+
const aria = x.go ? x.go.label : x.aria;
|
|
71
|
+
const row = press ? `<button type="button" class="cz-st ${cls}${x.go ? ' go' : ''}" ${press}${aria ? ` aria-label="${esc(aria)}"` : ''}>${body}</button>` : `<div class="cz-st ${cls}">${body}</div>`;
|
|
72
|
+
const act = x.act ? `<button type="button" class="cz-sact" ${x.act.attr} aria-label="${esc(x.act.label)}" title="${esc(x.act.label)}">${SVG(P[x.act.icon] || P.x, 14, 2.2)}</button>` : '';
|
|
73
|
+
return `<li class="cz-sli${act ? ' has-act' : ''}">${row}${act}</li>`;
|
|
74
|
+
}
|
|
75
|
+
/** The last node: the next stage, its payoff and the KR, the "moves on by itself" icon; with every step done, the primary button. */
|
|
76
|
+
export function stepTail(t) {
|
|
77
|
+
if (!t) return '';
|
|
78
|
+
if (t.ready) return `<li class="cz-sli tail"><div class="cz-st mvr">${'<span class="cz-nd go" aria-hidden="true">' + SVG(P.next, 14, 2.4) + '</span>'}<button type="button" class="cz-mvb" ${t.ready.attr}><span>${esc(t.ready.label || 'Move to')} ${t.ms ? MS : ''}${esc(t.name)}</span>${SVG(P.next, 16, 2.2)}</button></div></li>`;
|
|
79
|
+
const inner = `<span class="cz-nd tl" aria-hidden="true"></span><span class="tx"><span class="nm">${t.ms ? MS : ''}${esc(t.name)}${t.auto && !t.ms ? `<span class="cz-auto" title="Moves on by itself">${SVG(P.auto, 13, 2.2)}</span>` : ''}</span>${t.note ? `<small>${esc(t.note)}</small>` : ''}</span>`
|
|
80
|
+
+ (t.attr ? `<span class="cz-cv">${SVG(P.go, 14, 2.2)}</span>` : '');
|
|
81
|
+
return `<li class="cz-sli tail">${t.attr ? `<button type="button" class="cz-st mv" ${t.attr} aria-haspopup="dialog" aria-expanded="false"${t.aria ? ` aria-label="${esc(t.aria)}"` : ''}>${inner}</button>` : `<div class="cz-st mv">${inner}</div>`}</li>`;
|
|
82
|
+
}
|
|
83
|
+
/** The list. Done steps the caller passes in fold to one line when o.fold is given (the caller passes them only when it is open). */
|
|
84
|
+
export function stepsHtml(steps, o = {}) {
|
|
85
|
+
ensureCss();
|
|
86
|
+
const f = o.fold;
|
|
87
|
+
const fold = f && f.n ? `<li class="cz-sli"><button type="button" class="cz-st cz-fold" ${f.attr || ''} aria-expanded="${!!f.open}">${nodeHtml('done')}<span class="tx">${esc(f.n + ' done' + (f.names ? ' · ' + f.names : ''))}</span><span class="cz-cv">${SVG(f.open ? P.up : P.down, 14, 2.2)}</span></button></li>` : '';
|
|
88
|
+
const more = o.more && o.more.n > 0 ? `<li class="cz-sli"><button type="button" class="cz-more" ${o.more.attr || ''}>${esc(o.more.label || o.more.n + ' more')}</button></li>` : '';
|
|
89
|
+
return `<ol class="cz-sl${o.cls ? ' ' + esc(o.cls) : ''}"${o.label ? ` aria-label="${esc(o.label)}"` : ''}>${fold}${(steps || []).map(stepHtml).join('')}${more}${o.tail || ''}</ol>`;
|
|
90
|
+
}
|