create-pmos 0.611.0 → 0.612.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 (97) hide show
  1. package/package.json +86 -14
  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-board-test.js +1 -1
  8. package/workspace/briefing-premium-calendar-2-test.js +3 -2
  9. package/workspace/briefing-premium-calendar-3-test.js +1 -1
  10. package/workspace/briefing-premium-calendar-test.js +1 -1
  11. package/workspace/briefing-premium-insights-test.js +1 -1
  12. package/workspace/briefing-premium-test.js +1 -1
  13. package/workspace/changelog.json +85 -0
  14. package/workspace/guide/layout.md +52 -18
  15. package/workspace/guide/programs.md +3 -3
  16. package/workspace/guide/routine.md +28 -13
  17. package/workspace/guide/settings-and-switches.md +1 -1
  18. package/workspace/lib/board-premium.js +12 -4
  19. package/workspace/lib/cos-chat.js +1 -0
  20. package/workspace/lib/doc-library.js +43 -12
  21. package/workspace/lib/doc-path.js +30 -0
  22. package/workspace/lib/engine/boards.js +4 -2
  23. package/workspace/lib/events-place.js +190 -38
  24. package/workspace/lib/events-stated.js +129 -0
  25. package/workspace/lib/initiative-chat.js +1 -0
  26. package/workspace/lib/insights-premium.js +13 -1
  27. package/workspace/lib/library-find.js +162 -0
  28. package/workspace/lib/library-items.js +196 -24
  29. package/workspace/lib/notes.js +3 -0
  30. package/workspace/lib/plan-items.js +17 -3
  31. package/workspace/lib/routes-artefacts.js +5 -2
  32. package/workspace/lib/routes-boards.js +6 -2
  33. package/workspace/lib/routes-doc-sheet.js +1 -0
  34. package/workspace/lib/routes-events-place.js +47 -10
  35. package/workspace/lib/routes-library.js +74 -8
  36. package/workspace/lib/routes-report-setups.js +13 -2
  37. package/workspace/lib/routine-reports.js +36 -4
  38. package/workspace/lib/status-when.js +36 -0
  39. package/workspace/lib/task-items.js +5 -3
  40. package/workspace/package-lock.json +2 -2
  41. package/workspace/package.json +1 -1
  42. package/workspace/premium-vw-meet-test.js +2 -1
  43. package/workspace/premium-vw-notes-test.js +3 -2
  44. package/workspace/public/pm/artefact-kind.js +87 -0
  45. package/workspace/public/pm/bd-ini-panel.js +6 -6
  46. package/workspace/public/pm/bd-span.js +5 -0
  47. package/workspace/public/pm/bd-work.css +62 -0
  48. package/workspace/public/pm/bd-work.js +195 -68
  49. package/workspace/public/pm/cozy-bar.css +11 -0
  50. package/workspace/public/pm/cozy-bar.js +99 -0
  51. package/workspace/public/pm/cozy-day-pick.css +27 -0
  52. package/workspace/public/pm/cozy-day-pick.js +97 -0
  53. package/workspace/public/pm/cozy-ev.css +0 -4
  54. package/workspace/public/pm/cozy-events-view.js +165 -33
  55. package/workspace/public/pm/cozy-events.css +75 -3
  56. package/workspace/public/pm/cozy-events.js +86 -18
  57. package/workspace/public/pm/cozy-goals.css +172 -0
  58. package/workspace/public/pm/cozy-library.css +106 -17
  59. package/workspace/public/pm/cozy-nav.js +2 -3
  60. package/workspace/public/pm/cozy-pick.css +3 -0
  61. package/workspace/public/pm/cozy-pop-work.css +83 -24
  62. package/workspace/public/pm/cozy-pop-work.js +313 -72
  63. package/workspace/public/pm/cozy-popup.css +11 -2
  64. package/workspace/public/pm/cozy-popup.js +67 -9
  65. package/workspace/public/pm/cozy-routine-job.js +203 -0
  66. package/workspace/public/pm/cozy-routine-model.js +139 -31
  67. package/workspace/public/pm/cozy-routine-pop.js +164 -42
  68. package/workspace/public/pm/cozy-routine.css +61 -8
  69. package/workspace/public/pm/cozy-routine.js +207 -28
  70. package/workspace/public/pm/cozy-settings.js +1 -5
  71. package/workspace/public/pm/cozy-status-when.js +48 -0
  72. package/workspace/public/pm/cozy-viewer.js +19 -8
  73. package/workspace/public/pm/cozy-vw-mtg.css +39 -0
  74. package/workspace/public/pm/goals-model.js +205 -0
  75. package/workspace/public/pm/goals-open.js +124 -0
  76. package/workspace/public/pm/home-chat.js +4 -2
  77. package/workspace/public/pm/home-ini.js +8 -6
  78. package/workspace/public/pm/ini-edit.js +3 -1
  79. package/workspace/public/pm/ini-view-model.js +1 -1
  80. package/workspace/public/pm/library-model.js +170 -42
  81. package/workspace/public/pm/library-open.js +8 -5
  82. package/workspace/public/pm/page-chat.js +12 -2
  83. package/workspace/public/pm/pop-work-model.js +199 -41
  84. package/workspace/public/pm/premium-board.js +108 -43
  85. package/workspace/public/pm/premium-goals.js +213 -0
  86. package/workspace/public/pm/premium-library.js +376 -62
  87. package/workspace/public/pm/premium-shell.js +1 -1
  88. package/workspace/public/pm/premium-vw-mtg.js +79 -1
  89. package/workspace/public/pm/scope-chip.js +204 -0
  90. package/workspace/public/premium-events.html +3 -1
  91. package/workspace/public/premium-goals.html +37 -0
  92. package/workspace/public/premium-library.html +15 -7
  93. package/workspace/public/premium-routine.html +2 -0
  94. package/workspace/server.js +2 -1
  95. package/workspace/test-lists/doc-path.json +9 -0
  96. package/workspace/test-lists/goals-place.json +9 -0
  97. package/workspace/test-lists/status-when.json +9 -0
@@ -77,13 +77,14 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
77
77
  /* N5 a note opens in the card */
78
78
  await tap(p, '[data-c="note"][data-id="n3"]');
79
79
  ok('N5 a note opens as the meeting card in place of the list', await until(() => p.evaluate(() => !!document.querySelector('#czViewer .vz-mtg') && /Compare meeting note apps/.test(document.querySelector('#czViewer .cz-vw-title').textContent))), (await text(p)).slice(0, 300));
80
- ok('N5 a note that is not linked offers What it is about', await until(async () => /What it is about/.test(await text(p)) && !!(await p.$('#czViewer [data-a="m-about"]'))), (await text(p)).slice(0, 400));
80
+ const full = (pg) => pg.evaluate(() => { const f = document.querySelector('#czViewer [data-a="h-full"]'); if (f) f.click(); }); // a held note opens in its notes view (board 34); the full card is one press away
81
+ ok('N5 a note that is not linked offers What it is about', await until(async () => (await full(p), true) && /What it is about/.test(await text(p)) && !!(await p.$('#czViewer [data-a="m-about"]'))), (await text(p)).slice(0, 400));
81
82
  await p.evaluate(() => window.czViews.openNotes({}));
82
83
  await until(() => p.evaluate(() => !!document.querySelector('#czViewer [data-c="ser"][data-k="viewer-sync"]')));
83
84
  await tap(p, '[data-c="ser"][data-k="viewer-sync"]');
84
85
  ok('N3 pressing the series card unfolds its notes, newest first', await until(async () => (await ids(p)).slice(0, 2).join() === 'n1,n0'), JSON.stringify(await ids(p)));
85
86
  await tap(p, '[data-c="note"][data-id="n1"]');
86
- ok('N5 a note of the series opens and its summary says 4 of 4 in the series', await until(async () => /4 of 4/.test(await text(p))) && A.S.gets.some((x) => /notes\/one\?id=n1/.test(x)), (await text(p)).slice(0, 300));
87
+ ok('N5 a note of the series opens and its summary says 4 of 4 in the series', await until(async () => (await full(p), true) && /4 of 4/.test(await text(p))) && A.S.gets.some((x) => /notes\/one\?id=n1/.test(x)), (await text(p)).slice(0, 300));
87
88
  ok('N5 ⋯ holds the meeting before, and no meeting after the last one', await until(async () => { const r = await F.more(p); return r && r.some((x) => /^The meeting before/.test(x)) && !r.some((x) => /^The meeting after/.test(x)); }));
88
89
  await F.more(p, 'The meeting before');
89
90
  ok('N5 paging (⋯ The meeting before) reads the meeting before into the same card', await until(() => A.S.gets.some((x) => /notes\/one\?id=n0/.test(x))) && await p.evaluate(() => document.querySelectorAll('#czViewer .vz-mtg').length === 1));
@@ -0,0 +1,87 @@
1
+ /* pm/artefact-kind.js — what kind of artefact a file is, and one row per kind (popup round 3 point 16: "Make the Kind specific such as
2
+ * prototype or PRD. And each type ideally should have 1 artefact only, with version shows if necessary. If there are multiple artefact for the
3
+ * same kind, then propose to merge"). Pure: no DOM, no reads. The popup's Artefacts table (pm/cozy-pop-work.js) and the Library share it.
4
+ *
5
+ * kindOf({ type, title, path, kind }) → 'PRD' | 'Prototype brief' | 'Design brief' | 'Eval rubric' | 'User stories' | 'Grilling critique' |
6
+ * 'Minutes' | 'Pre-read' | 'Update note' | 'API spec' | 'Guideline' | 'Anchor' | 'Report' | 'Brief' | 'Spec' | 'Done test' | 'Research' |
7
+ * 'Prototype' | 'Link' | 'Note' the frontmatter or Library type first, then the title, then the path; "Note" last, never "Document"
8
+ * versionOf(title) → 3 for "PRD v3", else 0
9
+ * group(rows, { at(row) → ms, current?(row) → bool, dropped: Set }) → { groups: [{ kind, cur, earlier, files, versions, series }], merge }
10
+ * one group per kind, in lifecycle order. cur: the record's own file when current() names one, else the newest. versions: the files
11
+ * are versions of one document (the same name but for a version mark or a date); files: different documents of one kind. merge:
12
+ * { id, say, kinds, ask } — one ✦ line that proposes to merge the kinds with several different files (never a series kind,
13
+ * Minutes, Update note, Report, nor a Note, Link or Research: separate things by nature), or null. dropped: the merge ids the PM said No to.
14
+ */
15
+ const RULES = [
16
+ [/\bprd\b|product requirements/i, 'PRD'],
17
+ [/prototype brief|proto(type)?[ -]brief/i, 'Prototype brief'],
18
+ [/design brief/i, 'Design brief'],
19
+ [/\brubric\b|\beval(uation)?\b/i, 'Eval rubric'],
20
+ [/user stor/i, 'User stories'],
21
+ [/\bgrill|critique/i, 'Grilling critique'],
22
+ [/minutes|meeting notes|\bmom\b/i, 'Minutes'],
23
+ [/pre-?read/i, 'Pre-read'],
24
+ [/update note|weekly update|status update/i, 'Update note'],
25
+ [/api spec|openapi|swagger/i, 'API spec'],
26
+ [/guideline|style guide|playbook/i, 'Guideline'],
27
+ [/\banchor\b/i, 'Anchor'],
28
+ [/\breport\b/i, 'Report'],
29
+ [/done test/i, 'Done test'],
30
+ [/\bresearch\b|interview/i, 'Research'],
31
+ [/\bbrief\b/i, 'Brief'],
32
+ [/\bspec(ification)?\b/i, 'Spec'],
33
+ ];
34
+ const TYPES = { prd: 'PRD', spec: 'Spec', 'done test': 'Done test', rubric: 'Eval rubric', 'eval rubric': 'Eval rubric', 'prototype brief': 'Prototype brief', 'design brief': 'Design brief',
35
+ research: 'Research', brief: 'Brief', report: 'Report', minutes: 'Minutes', 'meeting notes': 'Minutes', 'user stories': 'User stories', guideline: 'Guideline', guide: 'Guideline', 'api spec': 'API spec' };
36
+ export const SERIES = new Set(['Minutes', 'Update note', 'Report']);
37
+ const NOMERGE = new Set(['Minutes', 'Update note', 'Report', 'Note', 'Link', 'Research']); // separate things by nature: counted, never merged
38
+ export const ORDER = ['Anchor', 'Brief', 'Prototype brief', 'Prototype', 'Design brief', 'PRD', 'User stories', 'Eval rubric', 'Done test', 'Spec', 'API spec', 'Grilling critique', 'Guideline', 'Research', 'Pre-read', 'Minutes', 'Update note', 'Report', 'Link', 'Note'];
39
+
40
+ export function kindOf(x = {}) {
41
+ const t = String(x.type || '').trim().toLowerCase();
42
+ if (TYPES[t]) return TYPES[t];
43
+ if (x.kind === 'meeting') return 'Minutes';
44
+ if (x.kind === 'proto') return 'Prototype';
45
+ const words = String(x.title || '');
46
+ for (const [re, k] of RULES) if (re.test(words)) return k;
47
+ const p = String(x.path || '').split('/').pop().replace(/[-_.]+/g, ' ');
48
+ for (const [re, k] of RULES) if (re.test(p)) return k;
49
+ return x.kind === 'link' ? 'Link' : 'Note';
50
+ }
51
+ export function versionOf(title) { const m = /\bv(\d{1,3})\b/i.exec(String(title || '')); return m ? +m[1] : 0; }
52
+ /* the name without a version mark, a date or a "copy": two files with the same base are versions of one document */
53
+ const baseOf = (s) => String(s || '').toLowerCase().replace(/\bv\d{1,3}\b/g, '').replace(/\b\d{4}-\d{2}-\d{2}\b|\b\d{1,2} [a-z]{3}( \d{4})?\b/g, '').replace(/\b(copy|draft|final|old|new)\b/g, '').replace(/[^a-z0-9]+/g, ' ').trim();
54
+ const ACR = /^(PRD|API spec)$/;
55
+ const many = (k, n) => n + ' ' + (ACR.test(k) ? k + 's' : (k.toLowerCase().endsWith('s') ? k.toLowerCase() : k.toLowerCase() + 's')).replace(/^api specs$/, 'API specs');
56
+ const andList = (a) => (a.length <= 1 ? a.join('') : a.slice(0, -1).join(', ') + ' and ' + a[a.length - 1]);
57
+
58
+ export function group(rows, o = {}) {
59
+ const at = o.at || (() => 0), cur = o.current || (() => false), drop = o.dropped || new Set();
60
+ const by = new Map();
61
+ for (const r of rows || []) { const k = r.kindName || kindOf({ type: r.type, title: r.title, path: r.path, kind: r.akind || r.kind }); if (!by.has(k)) by.set(k, []); by.get(k).push(r); }
62
+ const rank = (k) => { const i = ORDER.indexOf(k); return i < 0 ? ORDER.length : i; };
63
+ const groups = [...by.entries()].sort((a, b) => rank(a[0]) - rank(b[0]) || a[0].localeCompare(b[0])).map(([kind, L]) => {
64
+ const real = L.filter((r) => !r.missing), miss = L.filter((r) => r.missing);
65
+ const sorted = real.slice().sort((a, b) => at(b) - at(a) || versionOf(b.title) - versionOf(a.title));
66
+ const named = sorted.find((r) => cur(r));
67
+ const c = named || sorted[0] || miss[0];
68
+ const rest = (sorted.length ? sorted : miss).filter((r) => r !== c);
69
+ const bases = new Set(sorted.map((r) => baseOf(r.title)));
70
+ const series = SERIES.has(kind);
71
+ const versions = sorted.length > 1 && bases.size === 1 && !series;
72
+ return { kind, cur: c, earlier: rest, n: sorted.length, versions, files: sorted.length > 1 && !versions ? sorted.length : 0, series, v: versionOf(c && c.title) };
73
+ });
74
+ const mergeable = groups.filter((g) => g.files > 1 && !NOMERGE.has(g.kind));
75
+ const id = 'merge:' + mergeable.map((g) => g.kind).join('+');
76
+ const merge = mergeable.length && !drop.has(id) ? { id, kinds: mergeable.map((g) => g.kind),
77
+ say: andList(mergeable.map((g) => many(g.kind, g.files))) + ' can each be one artefact. Merge them?',
78
+ ask: 'Merge the ' + andList(mergeable.map((g) => many(g.kind, g.files))) + ' of this initiative into one artefact per kind: the newest is the base, add the parts only the others have, name the sources at the end, and keep the old files as earlier versions. Delete nothing. Tell me what you merged.' } : null;
79
+ return { groups, merge };
80
+ }
81
+ /** The Version cell: "v3 · 2 earlier" when there is more than one; "v2" for one file that says its version; '' otherwise (zero is silence). */
82
+ export function versionText(g) {
83
+ if (g.series) return g.n > 1 ? g.n + (g.kind === 'Minutes' ? ' meetings' : ' in all') : '';
84
+ if (g.versions) return (g.v ? 'v' + g.v : 'v' + g.n) + ' · ' + g.earlier.length + ' earlier';
85
+ if (g.files) return g.files + ' files';
86
+ return g.v ? 'v' + g.v : '';
87
+ }
@@ -77,7 +77,7 @@ async function readPage(r, force) {
77
77
  /** Documents, as a drill-in of the view (Home's page opens its Documents view): each core document with its state; a press opens it. */
78
78
  function openDocs(r) {
79
79
  const L = ((PAGE.get(r.id) || {}).docs) || [];
80
- const rows = L.map((d) => `<button type="button" class="czs-it"${d.path ? ` data-doc="${esc(d.path)}"` : ' disabled'} aria-label="${d.path ? 'Open ' : ''}${esc(d.title)}"><span class="w">${esc(d.title)}<span>${esc([d.when, d.by, MD.docPill(d)[0]].filter(Boolean).join(' · '))}</span></span>${d.look ? '<span class="czs-amb" role="img" aria-label="Needs a look"></span>' : ''}</button>`).join('');
80
+ const rows = L.map((d) => `<button type="button" class="czs-it"${d.path ? ` data-doc="${esc(d.path)}"${r.ws ? ` data-doc-ws="${esc(r.ws)}"` : ''}` : ' disabled'} aria-label="${d.path ? 'Open ' : ''}${esc(d.title)}"><span class="w">${esc(d.title)}<span>${esc([d.when, d.by, MD.docPill(d)[0]].filter(Boolean).join(' · '))}</span></span>${d.look ? '<span class="czs-amb" role="img" aria-label="Needs a look"></span>' : ''}</button>`).join('');
81
81
  VW.drill();
82
82
  VW.open({ kind: 'Documents', title: r.title, icon: 'doc', back: true, id: 'docs:' + vidOf(r), html: `<div class="hi-v">${rows || '<p class="hi-small">No document is on record yet.</p>'}</div>` });
83
83
  }
@@ -200,7 +200,7 @@ function iniBody(r, body) {
200
200
  /** What pm/cozy-pop-work.js reads for the row: the Board's steps and day, the core documents, the product and the program. */
201
201
  function popOpts(r) {
202
202
  const M = O.M() || {}, B = M.board || {}, p = O.programOf ? O.programOf(r) : null;
203
- return { steps: M.steps || [], today: M.today, docs: ((r.id && PAGE.get(r.id)) || {}).docs || [], product: r.wsName || (r.ws && r.ws !== B.ws ? r.ws : (M.product && M.product.name) || B.name || B.ws) || '', program: p ? { id: p.id, title: p.title } : null, canProduct: true, ws: r.ws || B.ws || '', id: r.id || '' };
203
+ return { steps: M.steps || [], today: M.today, docs: ((r.id && PAGE.get(r.id)) || {}).docs || [], product: r.wsName || (r.ws && r.ws !== B.ws ? r.ws : (M.product && M.product.name) || B.name || B.ws) || '', program: p ? { id: p.id, title: p.title } : null, canProduct: true, ws: r.ws || B.ws || '', board: r.boardId || B.id || '', id: r.id || '' };
204
204
  }
205
205
  /** The popup's own presses for the row: every part of the old page as a drill-in (so nothing is lost), and everything PMOS suggests. */
206
206
  function popExtra(r) {
@@ -262,7 +262,7 @@ function wire(body, key) {
262
262
  toast: (m, undo) => (O.toast ? O.toast(m, undo) : null),
263
263
  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'); },
264
264
  // the quick changes (batch 9 item 5b): the status caret, the date press and a Timeline or Kanban drag, each with Undo in the toast
265
- status: (uid, state) => { const r = O.rowOf(key); if (r && O.setTask) O.setTask(r, uid, state); },
265
+ status: (uid, state, w) => { const r = O.rowOf(key); if (r && O.setTask) O.setTask(r, uid, state, w); },
266
266
  dates: (uid, patch) => { const r = O.rowOf(key); if (r && O.setDates) O.setDates(r, uid, patch); },
267
267
  // the ◇ in the status picker (batch 11 item 3): a task made a milestone, or made a plain task again, with Undo
268
268
  milestone: (uid, on) => { const r = O.rowOf(key); if (r && O.setDates) O.setDates(r, uid, { milestone: !!on }); },
@@ -281,7 +281,7 @@ function wire(body, key) {
281
281
  const r = O.rowOf(key); if (!r) return;
282
282
  if (act === 'grill') O.grillOpen(r, b);
283
283
  else if (act === 'commit') O.send(r); // the Commit of drafted tickets opens the Send sheet (tk-send.js), the one path to Jira
284
- else if (act.startsWith('doc:')) O.viewDoc(act.slice(4));
284
+ else if (act.startsWith('doc:')) O.viewDoc(act.slice(4), (O.rowOf(key) || {}).ws);
285
285
  else if (act === 'page' && r.id) location.assign(O.pageHref(r));
286
286
  },
287
287
  program: (id, b) => { if (O.openProgram) O.openProgram(id, b); },
@@ -296,7 +296,7 @@ function wire(body, key) {
296
296
  // Claude's split or merge card (batch 11 item 14): ✕ Not now, ✎ Change it first, ✓ as suggested; the merged summary's link opens the one that stays
297
297
  sm: (act, b) => { const r = O.rowOf(key); if (r && O.smPress) O.smPress(r, act, b); },
298
298
  openIni: (id) => { if (O.openIniId) O.openIniId(id); },
299
- doc: (path) => O.viewDoc(path),
299
+ doc: (path) => O.viewDoc(path, (O.rowOf(key) || {}).ws), // the initiative's own workspace, not the board's (round 3 point 17)
300
300
  redraw,
301
301
  };
302
302
  // in the popup: what the popup shows for work (pm/cozy-pop-work.js), with the same handlers; else the old page
@@ -311,7 +311,7 @@ function wire(body, key) {
311
311
  const a = e.target.closest('[data-czs-act], [data-xb]'); if (!a) return;
312
312
  const act = a.dataset.czsAct || a.dataset.xb;
313
313
  if (act === 'drift') location.assign(O.askHref(r, a.dataset.q || ''));
314
- else if (act.startsWith('doc:')) O.viewDoc(act.slice(4));
314
+ else if (act.startsWith('doc:')) O.viewDoc(act.slice(4), (O.rowOf(key) || {}).ws);
315
315
  };
316
316
  }
317
317
  /** The shell's id of an initiative: its record id, so Discuss in chat names it (?about=init:<id>&vid=<id>) and Home reopens it beside the chat. */
@@ -217,6 +217,11 @@ const slipWords = (r, e) => { const p = r.plan, b = p && day(p.end), n = p && p.
217
217
 
218
218
  /** One initiative's marks: the plan cut by its gaps and holds, the forecast past the plan, the shown milestones, the end ◇ and one label after the
219
219
  * furthest mark. */
220
+ /** One initiative's bar as the Board draws it, for another page's own timeline: Work's list (pm/bd-work.js) and the popup's Work breakdown
221
+ * (pm/cozy-pop-work.js), so the bar has one design everywhere (Wawan, 2026-11-19). X: a date → its percent of the box; the markup sits in a
222
+ * position:relative box of the row's height. o: { pxPct: px per 1 % of the box, reach: days in which ◇s merge, mode: 'all' | 'pinned',
223
+ * label: false drops the end label, phone } → html */
224
+ export const rowBar = (r, X, now, o = {}) => qBar(r, X, now, !!o.phone, md, o.pxPct || 0, { reach: o.reach || 7, mode: o.mode || 'all', noLabel: o.label === false });
220
225
  function qBar(r, X, now, phone, fmt, pxPct, ms = {}) {
221
226
  const s = day(r.start), e = day(r.end), fr = fcRange(r), fc = r.forecast ? null : r.track && day(r.track.forecast), tone = toneOf(r);
222
227
  const tm = taskMarks(r, X, now, phone, pxPct, ms), et = tm.end, note = markWords(r, now);
@@ -128,3 +128,65 @@ body.bd-page.wk-on .bd-hd .bd-tools { margin-left: auto; }
128
128
  .wk-stm button:hover, .wk-stm button:focus-visible { background: var(--cz-well); }
129
129
  .wk-stm button.on { font-weight: var(--fw-strong); background: var(--cz-well); }
130
130
  .wk-stm button.on::after { content: '✓'; color: var(--cz-ink2); }
131
+ /* Work's rows in the shell's ⋯ menu (board 5 keeps them out of the view menu): a count or "on" sits at the right, small and grey */
132
+ .crmenu > .wk-xo .k { margin-left: auto; padding-left: 16px; font-size: var(--fs-meta); font-weight: var(--fw-regular); color: var(--cz-ink3); }
133
+ /* round 2 (Wawan, 2026-11-19): the Board's own bar sits in Work's track; the key says what it draws; the closed ones fold into one line */
134
+ .wk-x .tg-bar { cursor: pointer; }
135
+ .wk-key .k { width: 14px; height: 7px; border-radius: 3px; }
136
+ .wk-key .k.dn { background: var(--bd-done); }
137
+ .wk-key .k.nw { background: var(--cz-blue); }
138
+ .wk-key .k.pl { background: var(--bd-plan); }
139
+ .wk-key .k.dlv { width: 8px; height: 8px; transform: rotate(45deg); border-radius: 2px; border: 2px solid var(--bd-done); background: var(--cz-card); }
140
+ .wk-fold { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-label); font-weight: var(--fw-strong); color: var(--cz-ink2); border-radius: 6px; }
141
+ .wk-fold svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; transform: rotate(-90deg); transition: transform .15s; }
142
+ .wk-fold[aria-expanded="true"] svg { transform: none; }
143
+ .wk-fold:hover { color: var(--cz-ink); }
144
+ .wk-fold:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 2px; }
145
+ /* round 3 (Wawan, 2026-11-19): Filter, Sort, View and Columns in one calm panel of about 360 px; pills with their counts; several at once */
146
+ .wk-menu { width: 352px; padding: 6px 16px 12px; }
147
+ .wk-menu section { padding: 12px 0 4px; box-shadow: inset 0 -1px 0 var(--cz-hair); }
148
+ .wk-menu section:last-of-type { box-shadow: none; }
149
+ .wk-menu h6 { display: flex; align-items: baseline; gap: 6px; margin: 0 0 10px; text-transform: none; }
150
+ .wk-menu h6 small { font-size: var(--fs-meta); font-weight: var(--fw-regular); color: var(--cz-ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
151
+ .wk-menu h6 .wk-lk { margin-left: auto; }
152
+ .wk-fg { margin: 0 0 10px; }
153
+ .wk-fl { display: block; margin: 0 0 6px; font-size: var(--fs-meta); color: var(--cz-ink3); }
154
+ .wk-menu .wk-pl { gap: 6px; margin: 0; }
155
+ .wk-menu .wk-pl button { height: 28px; padding: 0 11px; gap: 6px; font-size: var(--fs-label); }
156
+ .wk-menu .wk-pl button small { font-size: var(--fs-meta); color: var(--cz-ink3); }
157
+ .wk-menu .wk-pl button.on small { color: inherit; opacity: .7; }
158
+ .wk-menu .wk-pl button:hover:not(.on) { background: var(--cz-well2); color: var(--cz-ink); }
159
+ .wk-menu .wk-pl .wk-mo { background: none; color: var(--cz-blue); padding: 0 6px; }
160
+ .wk-sorts { margin-bottom: 10px; }
161
+ .wk-sk { display: inline-flex; align-items: center; border-radius: 999px; background: var(--cz-ink); }
162
+ .wk-menu .wk-pl .wk-sk button.on { padding-right: 6px; }
163
+ .wk-menu .wk-pl .wk-sk b { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; background: var(--cz-card); color: var(--cz-ink); font-size: var(--fs-badge); }
164
+ .wk-menu .wk-pl .wk-sk .x { height: 28px; width: 26px; padding: 0; justify-content: center; background: none; color: var(--cz-card); opacity: .7; }
165
+ .wk-menu .wk-pl .wk-sk .x:hover { opacity: 1; background: none; }
166
+ .wk-sk svg, .wk-cx svg, .wk-fold svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
167
+ .wk-sar { display: inline-flex; }
168
+ .wk-sar svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2.2; transform: rotate(180deg); }
169
+ .wk-sar.dn svg { transform: none; }
170
+ .wk-hd .wk-sar svg { width: 12px; height: 12px; }
171
+ .wk-sk .x svg { width: 11px; height: 11px; }
172
+ .wk-menu .wk-tlr { margin: 0 0 10px; height: 36px; }
173
+ .wk-cx { all: unset; cursor: pointer; box-sizing: border-box; display: flex; align-items: center; gap: 8px; width: 100%; height: 32px; font-size: var(--fs-meta); font-weight: var(--fw-strong); color: var(--cz-ink3); border-radius: 8px; }
174
+ .wk-cx small { font-weight: var(--fw-regular); }
175
+ .wk-cx svg { width: 12px; height: 12px; margin-left: auto; transform: rotate(-90deg); }
176
+ .wk-cx[aria-expanded="true"] svg { transform: none; }
177
+ .wk-cx:hover { color: var(--cz-ink); }
178
+ .wk-cx:focus-visible, .wk-lk:focus-visible, .wk-sa:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 2px; }
179
+ .wk-note { margin: 2px 0 10px; font-size: var(--fs-meta); color: var(--cz-ink3); line-height: var(--lh-meta); }
180
+ .wk-lk, .wk-sa { all: unset; cursor: pointer; font-size: var(--fs-meta); font-weight: var(--fw-strong); color: var(--cz-blue); border-radius: 4px; }
181
+ .wk-ft { min-height: 24px; }
182
+ .wk-showing { display: flex; align-items: baseline; gap: 6px; margin: 0 4px 10px; font-size: var(--fs-label); color: var(--cz-ink2); }
183
+ .wk-showing .q { color: var(--cz-ink3); }
184
+ .wk-showing .wk-sa { font-size: var(--fs-label); }
185
+ .wk-fc { position: absolute; top: -2px; right: -2px; min-width: 16px; height: 16px; padding: 0 4px; box-sizing: border-box; border-radius: 999px; background: var(--cz-blue); color: var(--cz-card); font-size: var(--fs-badge); font-weight: var(--fw-strong); font-style: normal; line-height: 16px; text-align: center; pointer-events: none; }
186
+ body.bd-page.wk-on [id="bdFilter"] { position: relative; }
187
+ .wk-empty { margin: 0; padding: 18px 16px; font-size: var(--fs-row); color: var(--cz-ink3); background: var(--cz-card); }
188
+ .wk-menu { max-height: calc(100vh - 24px); overscroll-behavior: contain; }
189
+ .wk-menu section:first-child h6 { position: sticky; top: -12px; z-index: 2; margin: -12px -16px 10px; padding: 12px 16px 8px; background: var(--cz-card); }
190
+ .wk-menu .wk-pl button.q:not(.on) { color: var(--cz-ink3); background: none; box-shadow: inset 0 0 0 1px var(--cz-hair); }
191
+ .wk-menu .wk-pl button em { font-style: normal; color: var(--cz-ink3); }
192
+ .wk-menu .wk-pl button.on em { color: inherit; opacity: .7; }