create-pmos 0.429.0 → 0.431.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 (70) hide show
  1. package/package.json +25 -25
  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 +2 -2
  8. package/workspace/briefing-premium-insights-test.js +1 -1
  9. package/workspace/changelog.json +24 -0
  10. package/workspace/guide/adler.md +45 -0
  11. package/workspace/guide/briefing-premium.md +2 -0
  12. package/workspace/guide/home.md +4 -4
  13. package/workspace/guide/index.md +1 -0
  14. package/workspace/guide/metric-drafts.md +2 -1
  15. package/workspace/guide/programs.md +4 -2
  16. package/workspace/intelligence-gaps-ui-test.js +168 -0
  17. package/workspace/lib/initiative-writer.js +16 -2
  18. package/workspace/lib/insight-moves.js +135 -0
  19. package/workspace/lib/insights-premium.js +4 -3
  20. package/workspace/lib/intel-report.js +16 -3
  21. package/workspace/lib/metric-drafts.js +32 -2
  22. package/workspace/lib/page-opens.js +74 -0
  23. package/workspace/lib/report-setups.js +1 -1
  24. package/workspace/lib/route-modules.js +2 -0
  25. package/workspace/lib/routes-insight-moves.js +119 -0
  26. package/workspace/lib/routes-insights-premium.js +10 -1
  27. package/workspace/lib/routes-metric-drafts.js +10 -1
  28. package/workspace/lib/routes-page-opens.js +26 -0
  29. package/workspace/lib/routes-report-setups.js +6 -1
  30. package/workspace/lib/settings-store.js +6 -0
  31. package/workspace/metric-drafts-ui-test.js +4 -4
  32. package/workspace/milestone-suggest-test.js +4 -4
  33. package/workspace/package-lock.json +2 -2
  34. package/workspace/package.json +1 -1
  35. package/workspace/premium-viewer-flicker-test.js +1 -1
  36. package/workspace/public/pm/bd-prog-panel.js +3 -3
  37. package/workspace/public/pm/bd-prog.js +2 -2
  38. package/workspace/public/pm/bd-span.js +17 -14
  39. package/workspace/public/pm/cozy-adler.css +82 -0
  40. package/workspace/public/pm/cozy-adler.js +270 -0
  41. package/workspace/public/pm/cozy-ev.css +3 -0
  42. package/workspace/public/pm/cozy-home.css +4 -0
  43. package/workspace/public/pm/cozy-insights.css +15 -1
  44. package/workspace/public/pm/cozy-nav.js +2 -0
  45. package/workspace/public/pm/cozy-search.js +4 -2
  46. package/workspace/public/pm/cozy-settings.js +15 -2
  47. package/workspace/public/pm/cozy-today.css +15 -0
  48. package/workspace/public/pm/cozy.css +16 -0
  49. package/workspace/public/pm/home-app.js +7 -9
  50. package/workspace/public/pm/home-chat.js +10 -2
  51. package/workspace/public/pm/home-day.js +39 -16
  52. package/workspace/public/pm/home-today.js +5 -3
  53. package/workspace/public/pm/ini-view-model.js +1 -1
  54. package/workspace/public/pm/ini-view.css +6 -0
  55. package/workspace/public/pm/ini-view.js +13 -0
  56. package/workspace/public/pm/metric-drafts.css +7 -0
  57. package/workspace/public/pm/metric-drafts.js +46 -7
  58. package/workspace/public/pm/ms-suggest.js +2 -1
  59. package/workspace/public/pm/premium-board.js +2 -2
  60. package/workspace/public/pm/premium-insights.js +76 -10
  61. package/workspace/public/pm/premium-vw-cal.js +1 -1
  62. package/workspace/public/pm/premium-welcome.js +3 -2
  63. package/workspace/public/pm/premium.css +3 -0
  64. package/workspace/public/pm/program-model.js +7 -0
  65. package/workspace/public/pm/split-merge.js +2 -1
  66. package/workspace/public/pm/stage-line.js +7 -5
  67. package/workspace/public/premium-intelligence.html +1 -1
  68. package/workspace/test-lists/intelligence-gaps-ui.json +5 -0
  69. package/workspace/test-lists/intelligence-gaps.json +5 -0
  70. package/workspace/test-lists/milestone-label.json +5 -0
@@ -120,8 +120,8 @@ const INITIATIVE = () => ({
120
120
  ok('P Built from: Now and Target, a drafted ticket as a pill', !!c && c.built.join(' / ') === 'idpf · sign-ins on CIAM | 15% | 100% by Feb 27 / Microsites · sign-ins on CIAM | — | Ticket MS-212 drafted'
121
121
  && await p.evaluate(() => !!document.querySelector('#czViewer .md-card .md-ru .md-pill')), c && c.built.join(' / '));
122
122
  ok('P one line of why, in Claude\'s words', !!c && c.why === 'idpf is 80% of all sign-ins, so it carries the goal. I check it every morning once you keep it.', c && c.why);
123
- ok('P Discuss in Home, Edit and a solid ✓ Keep this goal: icon-only, each with a label and a title', !!c && c.presses.map((x) => x.label).join() === 'Discuss the proposed goal in Home,Edit the proposed goal in Home,Keep this goal'
124
- && c.presses.every((x) => x.title && !x.text && x.svg) && c.presses[2].solid && /ask=program%3Aproject-ascent/.test(c.presses[0].href) && /^\/premium\.html\?ws=idpf/.test(c.presses[1].href), JSON.stringify(c && c.presses));
123
+ ok('P Discuss in Home, Edit (in place, batch 16) and a solid ✓ Keep this goal: icon-only, each with a label and a title', !!c && c.presses.map((x) => x.label).join() === 'Discuss the proposed goal in Home,Edit the proposed goal,Keep this goal'
124
+ && c.presses.every((x) => x.title && !x.text && x.svg) && c.presses[2].solid && /ask=program%3Aproject-ascent/.test(c.presses[0].href) && !c.presses[1].href, JSON.stringify(c && c.presses));
125
125
  ok('P the read names the program and its product', D.gets.some((g) => g.scope === 'program' && g.id === 'project-ascent' && g.ws === 'idpf'), JSON.stringify(D.gets));
126
126
  const ps = await sizes(p, '#czViewer .md-card');
127
127
  ok('S the card uses the type scale only', ps.length && ps.every((x) => SCALE.has(x)), ps.join());
@@ -157,8 +157,8 @@ const INITIATIVE = () => ({
157
157
  ok('I the proposed success measure sits under the stage card, with where it came from', !!ic && ic.after && ic.hd === 'Proposed success measure' && ic.src === 'from the PRD and the desktop launch', JSON.stringify(ic));
158
158
  ok('I three groups in order, each Now → Target', !!ic && ic.rows.join(' / ') === 'Proves it worked · 4 weeks after release | Mobile checkout login drop-off | Moves your key result “drop-off under 15%” | 27% | 19% / Early signal · shows in days | Inline form completion | Ticket ESHOP-981 drafted | — | 80% week 1 / Guardrail | Checkout conversion | A faster login must not cost orders | 3.1% | ≥ 3.1%', ic && ic.rows.join(' / '));
159
159
  ok('I one line of why', !!ic && /^Desktop fell 7 points/.test(ic.why));
160
- ok('I Edit and a solid ✓ Keep this success measure: icon-only, each with a label and a title', !!ic && ic.presses.map((x) => x.label).join() === 'Edit the proposed success measure in Home,Keep this success measure'
161
- && ic.presses.every((x) => x.title && !x.text) && ic.presses[1].solid && /ask=descope-parity/.test(ic.presses[0].href), JSON.stringify(ic && ic.presses));
160
+ ok('I Edit (in place, batch 16) and a solid ✓ Keep this success measure: icon-only, each with a label and a title', !!ic && ic.presses.map((x) => x.label).join() === 'Edit the proposed success measure,Keep this success measure'
161
+ && ic.presses.every((x) => x.title && !x.text) && ic.presses[1].solid && !ic.presses[0].href, JSON.stringify(ic && ic.presses));
162
162
  const is = await sizes(p, '#czViewer .iv .md-card');
163
163
  ok('S the initiative card uses the type scale only', is.length && is.every((x) => SCALE.has(x)), is.join());
164
164
  await shot(p, 'Iq9Initiative-proposed-built');
@@ -142,7 +142,7 @@ const withReview = (open, o = {}) => F.programs().map((p) => ({ ...p, ...(o.empt
142
142
 
143
143
  /* ── M: Home's Your move ── */
144
144
  const M = await open({ home: true });
145
- // the program's milestone changes lead its card on Home (batch 14 item 4: a desktop has no Your day; the greeting opens the calendar)
145
+ // the program's milestone changes lead its card on Home (batch 14 item 4)
146
146
  await until(() => M.page.evaluate(() => !!document.querySelector('[data-hm-prog]')), 10000);
147
147
  const hm = await until(() => M.page.evaluate(() => { const b = document.querySelector('[data-hm-sel="ms:project-ascent"]'); return b ? [...b.querySelectorAll('b, em')].map((x) => x.textContent.trim()).join(' · ') : null; }), 10000);
148
148
  ok('M Home\'s program card has one line for its milestone changes, first', hm === '3 milestone changes · Pilot live to Dec 2', String(hm));
@@ -150,11 +150,11 @@ const withReview = (open, o = {}) => F.programs().map((p) => ({ ...p, ...(o.empt
150
150
  await M.page.click('[data-hm-sel="ms:project-ascent"]');
151
151
  ok('M a tap opens the program, where the changes lead Waits on you', !!(await until(() => M.page.evaluate(() => !!document.querySelector('#czViewer [data-czs-id="needs"] .msg-r')), 8000)));
152
152
  }
153
- // batch 14 item 4: on a desktop the greeting opens the calendar in the Viewer, not Your day
153
+ // batch 16: on a desktop the greeting opens Your day in the Viewer, as on a phone; the calendar is under ⋯
154
154
  if (await M.page.$('[data-hm-day]')) {
155
155
  await M.page.click('[data-hm-day]');
156
- const vw = await until(() => M.page.evaluate(() => { const v = document.querySelector('#czViewer'); const t = v && !v.hidden ? v.textContent.replace(/\s+/g, ' ') : ''; return /Calendar|Your move/.test(t) ? t : null; }), 8000);
157
- ok('D on a desktop the greeting opens the calendar in the Viewer; there is no Your day', vw && /Calendar/.test(vw) && !/Your move/.test(vw), String(vw).slice(0, 200));
156
+ const vw = await until(() => M.page.evaluate(() => { const v = document.querySelector('#czViewer'); const t = v && !v.hidden ? v.textContent.replace(/\s+/g, ' ') : ''; return /Your day/.test(t) ? t : null; }), 8000);
157
+ ok('D on a desktop the greeting opens Your day in the Viewer, as on a phone', !!vw, String(vw).slice(0, 200));
158
158
  }
159
159
  ok('0 no page error on Home', M.errors.length === 0, M.errors.join(' | '));
160
160
  await M.ctx.close();
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.429.0",
3
+ "version": "0.431.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pmos-workspace",
9
- "version": "0.429.0",
9
+ "version": "0.431.0",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@xterm/addon-fit": "^0.11.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.429.0",
3
+ "version": "0.431.0",
4
4
  "private": true,
5
5
  "description": "PMOS Terminal Workspace — local companion hosting real PTYs beside the library and gates (D62)",
6
6
  "license": "MIT",
@@ -76,7 +76,7 @@ const SHOTS = process.env.PMOS_SHOTS || '';
76
76
  await page.evaluate(() => {
77
77
  window.__rise = 0; window.__loads = 0; window.__frame = document.querySelector('#czViewer .obody.vw iframe.vwframe');
78
78
  window.__turns = [...document.querySelectorAll('#hmLog .hm-u, #hmLog .hm-a')];
79
- document.querySelector('#hmLog').addEventListener('animationstart', () => { window.__rise++; }); // any entrance a turn plays again
79
+ document.querySelector('#hmLog').addEventListener('animationstart', (e) => { if (!e.target.closest('.ad-svg')) window.__rise++; }); // any entrance a turn plays again (Adler's own idle motion on the latest reply is not an entrance)
80
80
  if (window.__frame) window.__frame.addEventListener('load', () => { window.__loads++; });
81
81
  });
82
82
  await sleep(7000); // three conversation reads and two list reads
@@ -29,7 +29,7 @@
29
29
  * shows) and its PMOS tasks (GET /api/boards/items). A part whose read failed is left out, never guessed. Every fold is kept in this browser. */
30
30
  import { pmPost } from './http.js';
31
31
  import { esc, store } from './premium-shell.js';
32
- import { programState, milestoneTrack, milestoneGroups, goalsByPeriod, shortDay, toJira, milestoneStep } from './program-model.js';
32
+ import { programState, liveRows, milestoneTrack, milestoneGroups, goalsByPeriod, shortDay, toJira, milestoneStep } from './program-model.js';
33
33
  import { STEPS } from './premium-initiative-head.js';
34
34
  import * as VW from './cozy-viewer.js';
35
35
  import * as Pop from './bd-pop.js';
@@ -69,7 +69,7 @@ function rowsOf(ws) {
69
69
  const M = O.M(); if (!M) return null;
70
70
  const steps = M.steps || [];
71
71
  const shape = (rows) => (rows || []).filter((r) => r.id).map((r) => ({ ...r, stage: r.track && r.track.k >= 0 && steps[r.track.k] ? steps[r.track.k].key : r.stage }));
72
- if (!ws || !board().ws || ws === board().ws) return { name: board().product || board().name || '', rows: shape(M.rows), here: true };
72
+ if (!ws || !board().ws || ws === board().ws) return { name: board().product || board().name || '', rows: shape(liveRows(M)), here: true };
73
73
  const a = AWAY.get(ws);
74
74
  return a && a !== 'reading' ? { name: a.name, rows: shape(a.rows) } : null;
75
75
  }
@@ -85,7 +85,7 @@ function readAway(p) {
85
85
  // still reading (a cold board answers before its model is ready), or refused: ask again a few times, then the next open asks again,
86
86
  // so a member does not stay "not read" until the panel is opened again
87
87
  if (!r || !r.ok || !r.model) { AWAY.delete(ws); const n = (TRIES.get(ws) || 0) + 1; TRIES.set(ws, n); if (n < 4 && cur && cur.id === p.id) setTimeout(() => { if (cur && cur.id === p.id) { readAway(p); draw(); } }, 1500 * n); return; }
88
- AWAY.set(ws, { name: (r.model.board && (r.model.board.product || r.model.board.name)) || ws, board: (r.model.board && r.model.board.id) || ws, rows: r.model.rows || [] });
88
+ AWAY.set(ws, { name: (r.model.board && (r.model.board.product || r.model.board.name)) || ws, board: (r.model.board && r.model.board.id) || ws, rows: liveRows(r.model) });
89
89
  if (cur && cur.id === p.id) draw();
90
90
  });
91
91
  }
@@ -17,7 +17,7 @@
17
17
  * A program has no stage of its own (PM, 2026-10-23): the band shows only what its initiatives say. With one product picked, the program shows
18
18
  * that product's initiatives (PRD decision 5); its other products count in its line and its readiness, and their initiatives are not drawn here.
19
19
  * With All products picked, the program holds a sub-row per product with that product's initiatives, then one group per product follows. */
20
- import { programState, groupRows, mergeClose } from './program-model.js';
20
+ import { programState, groupRows, mergeClose, liveRows } from './program-model.js';
21
21
  import { goalsOf } from './home-list.js';
22
22
 
23
23
  const esc = (s) => String(s == null ? '' : s).replace(/[&<>"']/g, (c) => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#39;' }[c]));
@@ -55,7 +55,7 @@ export function groupsOf(programs, rows, M, byProduct) {
55
55
  export function stateOf(p, M, XR, now = Date.now()) {
56
56
  const ws = (M && M.board && M.board.ws) || '';
57
57
  const steps = (M && M.steps) || [];
58
- const rows = ((M && M.rows) || []).filter((r) => r.id).map((r) => ({ id: r.id, title: r.title, stage: r.track && r.track.k >= 0 && steps[r.track.k] ? steps[r.track.k].key : r.stage, anchor: r.anchor, ws: r.ws, product: r.product, start: r.start || null, end: r.end || null })); // the dates: Claude's order (prog-order.js)
58
+ const rows = liveRows(M).filter((r) => r.id).map((r) => ({ id: r.id, title: r.title, stage: r.track && r.track.k >= 0 && steps[r.track.k] ? steps[r.track.k].key : r.stage, anchor: r.anchor, ws: r.ws, product: r.product, start: r.start || null, end: r.end || null })); // the dates: Claude's order (prog-order.js)
59
59
  // All products: every product's rows are on this board, each with its own workspace
60
60
  if (M && M.board && M.board.all) return programState(p, (w) => { const R = rows.filter((r) => r.ws === w); return R.length ? { name: R[0].product, rows: R } : null; }, now);
61
61
  return programState(p, (w) => (!w || !ws || w === ws ? { name: prodName(M), rows } : (XR && XR[w]) || null), now);
@@ -28,7 +28,7 @@
28
28
  * the hairline and » only; its row sheet lists them. A gap never changes the row's dot or risk.
29
29
  * Calmer timeline (feedback batch 13 item 4, A: XcalmA1Desk, A4Dark, A3Phone, A2Folded, A5Milestones): say it once, few marks, quiet rows.
30
30
  * · One label per bar end: what lands, then when ("Tender award Nov 3"; the year only when it is not this year). The name is the end milestone's,
31
- * else Deliver or Evaluate. The date turns amber at risk and orange late; the rest (days over, the forecast, a slip, a clash) is its hover.
31
+ * else a milestone close enough to merge with the end ◇, else Deliver or Evaluate. The date turns amber at risk and orange late; the rest (days over, the forecast, a slip, a clash) is its hover.
32
32
  * With no room at the right edge the label sits before the ◇, on a card chip. No date under a ◇ and no second date.
33
33
  * · Marks: the bar (done dark, to do light), a 2 px hairline for any gap or hold (a hold's hairline opens the hold card), one ◇ (filled done,
34
34
  * orange late), the dashed Jira forecast, Today. The dotted hold, ⏸, the amber tint, the blue ◆ and the hatched out-of-window band are gone.
@@ -200,7 +200,7 @@ function qBar(r, X, now, phone, fmt, pxPct, ms = {}) {
200
200
  const risk = r.status === 'at risk' ? 'risk' : r.status === 'on hold' ? 'q' : '';
201
201
  let out = tm.html + depHtml(r, X, phone), clash = null;
202
202
  if (s && e) {
203
- const g = gapsHtml(r, X, now, phone, fmt, pxPct || 0, s, e, tone, note);
203
+ const g = gapsHtml(r, X, now, phone, fmt, pxPct || 0, s, e, tone, note, et ? { name: et.name, d: day(et.date) } : null);
204
204
  out += g.html; clash = g.clash;
205
205
  const over = r.over && now > e, late = fc && fc > e, hover = [];
206
206
  if (over) hover.push(r.overDays + ' ' + (r.overDays === 1 ? 'day' : 'days') + ' over');
@@ -260,7 +260,7 @@ export function holdWords(x, now) {
260
260
  }
261
261
  /** The plan bar cut by its holds and its plain gaps: the pieces (the done part fills them in order and skips the gaps), each hold's dotted line and ⏸,
262
262
  * and the return date where the bar starts again. → { html, clash } — clash: the words when the return date falls after the end ◇. */
263
- function gapsHtml(r, X, now, phone, fmt, pxPct, s, e, tone, note = '') {
263
+ function gapsHtml(r, X, now, phone, fmt, pxPct, s, e, tone, note = '', lands = null) {
264
264
  const wide = (a, b) => !pxPct || (X(b) - X(a)) * pxPct >= MIN_PX;
265
265
  // a resumed hold narrower than 8 px closes up; a hold still running always shows, so its ⏸ is there to press
266
266
  const H = holdSpans(r, now), shown = H.filter((x) => x.kind !== 'past' || wide(x.a, x.b));
@@ -317,8 +317,9 @@ function gapsHtml(r, X, now, phone, fmt, pxPct, s, e, tone, note = '') {
317
317
  const late = x.kind === 'over' ? ' late' : '', l = X(x.a), w = X(x.b) - l, words = holdWords(x, now) + (x.kind === 'none' ? '. Set a return date' : '. Open the hold');
318
318
  html += `<button type="button" class="tg-ng ho${late}" data-hold="${esc(r.key)}" data-i="${x.i}" style="left:${P(l)};width:${P(w)}" aria-label="${esc(words)}" title="${esc(holdWords(x, now))}" aria-haspopup="dialog"></button>`;
319
319
  }
320
- const ob = H.find((x) => x.kind === 'open' && x.b > e);
321
- const clash = ob ? (r.track && r.track.k >= 6 ? 'Evaluate' : 'Deliver') + ' is before the return, ' + md(ob.b) : null;
320
+ // the end ◇'s own name and date when a milestone task is it (the timeline-label hotfix: never a stage name for a milestone)
321
+ const ob = H.find((x) => x.kind === 'open' && x.b > (lands ? lands.d : e));
322
+ const clash = ob ? (lands ? lands.name : r.track && r.track.k >= 6 ? 'Evaluate' : 'Deliver') + ' is before the return, ' + md(ob.b) : null;
322
323
  return { html, clash };
323
324
  }
324
325
  const iso = (d) => d.getFullYear() + '-' + String(d.getMonth() + 1).padStart(2, '0') + '-' + String(d.getDate()).padStart(2, '0');
@@ -329,14 +330,16 @@ const lastMs = (r) => { const S = (r.wfStages || []).filter((x) => x && x.milest
329
330
  const msStage = (r, m) => { if (!m.sec) return ''; const st = (r.wfStages || []).find((x) => x.key === m.sec); return st ? (st.milestone ? st.name : '') : /^(deliver|evaluate)$/i.test(m.sec) ? m.sec.replace(/^./, (c) => c.toUpperCase()) : ''; };
330
331
  /** The milestone task the bar's end ◇ stands for, or null. The end ◇ is the workflow's last ◆ stage (Evaluate on Product feature): the latest
331
332
  * milestone task in that stage IS it, else one on the end's own day, else the latest task in any ◆ stage (Deliver: batch 14 item 1, so a
332
- * "rolled out" task in Deliver names the row's end). It takes that task's name, date and done, and is not drawn twice. A task outside the ◆
333
- * stages keeps its own ◇. M: the row's dated milestones. */
334
- function endTask(r, M) {
333
+ * "rolled out" task in Deliver names the row's end), else the latest one close enough to the end to merge with its ◇ (`reach` days, the
334
+ * zoom's ~40 px: the timeline-label hotfix, "[Tender] 12.0 Award contract" on Nov 2 sat under the end ◇ labelled "Deliver Nov 4"; one mark says
335
+ * the milestone's own name and date). It takes that task's name, date and done, and is not drawn twice. A task outside the ◆ stages and
336
+ * away from the end keeps its own ◇, and the plain end ◇ says Deliver or Evaluate. M: the row's dated milestones. */
337
+ function endTask(r, M, reach = 0) {
335
338
  const e = day(r.end); if (!e || !M.length) return null;
336
339
  const S = M.slice().sort((a, b) => day(a.date) - day(b.date));
337
340
  const last = lastMs(r), inLast = S.filter((m) => m.sec && m.sec.toLowerCase() === last);
338
341
  const inMs = S.filter((m) => msStage(r, m));
339
- const end = inLast.length ? inLast[inLast.length - 1] : S.find((m) => +day(m.date) === +e) || inMs[inMs.length - 1];
342
+ const end = inLast.length ? inLast[inLast.length - 1] : S.find((m) => +day(m.date) === +e) || inMs[inMs.length - 1] || S.filter((m) => Math.abs(day(m.date) - e) <= reach * 864e5).pop();
340
343
  return end ? { ...end, stage: msStage(r, end) } : null;
341
344
  }
342
345
  /** One ◇ per milestone task the Filter shows (batch 13 item 4, XcalmA5Milestones; pm/bd-pins.js shownMs: the pinned ones, by default the last),
@@ -346,7 +349,7 @@ function endTask(r, M) {
346
349
  function taskMarks(r, X, now, phone, pxPct, ms) {
347
350
  const M = (r.milestones || []).filter((m) => day(m.date));
348
351
  if (!M.length) return { html: '', end: null };
349
- const end = endTask(r, M), show = new Set(shownMs(r, ms.mode || 'pinned').map((m) => m.id));
352
+ const end = endTask(r, M, ms.reach || 0), show = new Set(shownMs(r, ms.mode || 'pinned').map((m) => m.id));
350
353
  const L = M.filter((m) => (!end || m.id !== end.id) && show.has(m.id)).map((m) => ({ ...m, late: msLate(m, now), stage: msStage(r, m) }))
351
354
  .filter((m) => { const x = X(day(m.date)); return x > 0 && x < 100; });
352
355
  const C = mergeClose(L, Math.max(1, ms.reach || 7));
@@ -366,10 +369,10 @@ function taskMarks(r, X, now, phone, pxPct, ms) {
366
369
  * late. Close ◇s merge into one counted ◇ (the rows' reach, about 40 px) with the date range under it; pressing it lists them, each line opening
367
370
  * its initiative. A thin line runs from the first start to the last end. A phone draws the ◇s alone; a tap on the lane lists them in a sheet. */
368
371
  /** A product's milestones, by date: [{ id, name, date, done, late, row }]. */
369
- export function laneMilestones(rows, now) {
372
+ export function laneMilestones(rows, now, reach = 0) {
370
373
  const out = [];
371
374
  for (const r of rows || []) {
372
- const M = (r.milestones || []).filter((m) => day(m.date)), s = day(r.start), e = day(r.end), et = endTask(r, M);
375
+ const M = (r.milestones || []).filter((m) => day(m.date)), s = day(r.start), e = day(r.end), et = endTask(r, M, reach);
373
376
  for (const m of M) if (!et || m.id !== et.id) out.push({ id: m.id, name: m.name, date: m.date, done: !!m.done, late: msLate(m, now), row: r });
374
377
  if (!s || !e) continue;
375
378
  const ob = openBack(r, now), late = (r.over && now > e) || (ob && ob > e) || (et && msLate(et, now));
@@ -401,14 +404,14 @@ function offDots(rows, now) {
401
404
  /** A folded group's track (XcalmA2Folded): the roll-up line, the counted ◇s and the end date. Open, a group draws nothing (its rows say it). */
402
405
  function rollUp(rows, sp, X, W, o, ms, pxPct, now) {
403
406
  if (!sp || sp.hi <= W.from || sp.lo >= W.to) return '';
404
- const L = laneMilestones(rows, now);
407
+ const L = laneMilestones(rows, now, ms.reach);
405
408
  const end = o.phone ? '' : `<span class="tg-endl" style="left:${P(X(sp.hi))}" title="${esc('Last end ' + md(sp.hi) + ', ' + sp.hi.getFullYear())}"><b>${esc(my(sp.hi))}</b></span>`;
406
409
  return progLine({ rows }, sp, X, now) + laneMarks(L, X, o.phone, pxPct, ms) + end;
407
410
  }
408
411
  /** The product's head row on the timeline: the name cell (tile, name, goal dots, count when folded, the fold) and the lane. Open or folded it
409
412
  * looks the same: folded, it is the product's summary. */
410
413
  function laneRow(g, X, W, ov, o, ms, pxPct, now) {
411
- const shut = o.folded(g.key), sp = progSpan(g), L = shut ? laneMilestones(g.rows, now) : [];
414
+ const shut = o.folded(g.key), sp = progSpan(g), L = shut ? laneMilestones(g.rows, now, ms.reach) : [];
412
415
  const tr = shut ? rollUp(g.rows, sp, X, W, o, ms, pxPct, now) : '', cell = o.prodCell(g, shut ? offDots(g.rows, now) : '');
413
416
  if (o.phone) return `<div class="tgq-r tg-lane${shut ? ' closed' : ''}" data-lane="${esc(g.key)}"><div class="tgq-n tg-lnn">${cell}</div><div class="tg-p"${L.length ? ` data-lane-ms="${laneData(L)}" data-lane-name="${esc(g.name)}"` : ''}>${ov}${tr}</div></div>`;
414
417
  return `<div class="tg-r tg-lane${shut ? ' closed' : ''}" role="row" data-lane="${esc(g.key)}"><div class="tg-n tg-lnn" role="rowheader">${cell}</div><div class="tg-p" role="cell">${ov}${tr}</div></div>`;
@@ -0,0 +1,82 @@
1
+ /* cozy-adler.css — Adler, Claude's face in PMOS (feedback batch 16 item 2; pm/cozy-adler.js adds this sheet). The art's colours are the --ad-*
2
+ * tokens in cozy.css; the classes below give them to the SVG (adf- a fill, ads- a stroke, adg- a gradient stop). Then the sizes' boxes, the
3
+ * toast face, the scenes, dark mode (the scene dims, Adler stays warm) and the slow motion of AdMotion. All motion stops under
4
+ * prefers-reduced-motion and under Settings > Adler > Motion: Still (html.ad-still). Motion is on Adler and his scene only, never on data
5
+ * (design principle 12, the Adler exception). */
6
+
7
+ .ad-svg .adf-pink,.ad-scene .adf-pink{fill:var(--ad-pink)} .ad-svg .adf-blush,.ad-scene .adf-blush{fill:var(--ad-blush)} .ad-svg .adf-ink,.ad-scene .adf-ink{fill:var(--ad-ink)} .ad-svg .adf-mouth,.ad-scene .adf-mouth{fill:var(--ad-mouth)} .ad-svg .adf-tongue,.ad-scene .adf-tongue{fill:var(--ad-tongue)} .ad-svg .adf-white,.ad-scene .adf-white{fill:var(--ad-white)} .ad-svg .adf-shade,.ad-scene .adf-shade{fill:var(--ad-shade)} .ad-svg .adf-shadow,.ad-scene .adf-shadow{fill:var(--ad-shadow)} .ad-svg .adf-hoodd,.ad-scene .adf-hoodd{fill:var(--ad-hoodd)} .ad-svg .adf-hoodl,.ad-scene .adf-hoodl{fill:var(--ad-hoodl)} .ad-svg .adf-mug,.ad-scene .adf-mug{fill:var(--ad-mug)} .ad-svg .adf-mugleaf,.ad-scene .adf-mugleaf{fill:var(--ad-mugleaf)} .ad-svg .adf-gold,.ad-scene .adf-gold{fill:var(--ad-gold)} .ad-svg .adf-hp,.ad-scene .adf-hp{fill:var(--ad-hp)} .ad-svg .adf-lens,.ad-scene .adf-lens{fill:var(--ad-lens)} .ad-svg .adf-sun,.ad-scene .adf-sun{fill:var(--ad-sun)} .ad-svg .adf-sunglow,.ad-scene .adf-sunglow{fill:var(--ad-sunglow)} .ad-svg .adf-moon,.ad-scene .adf-moon{fill:var(--ad-moon)} .ad-svg .adf-firefly,.ad-scene .adf-firefly{fill:var(--ad-firefly)} .ad-svg .adf-raincloud,.ad-scene .adf-raincloud{fill:var(--ad-raincloud)} .ad-svg .adf-ground,.ad-scene .adf-ground{fill:var(--ad-ground)} .ad-svg .adf-groundn,.ad-scene .adf-groundn{fill:var(--ad-groundn)} .ad-svg .adf-leaf2,.ad-scene .adf-leaf2{fill:var(--ad-leaf2)} .ad-svg .adf-thinkdot,.ad-scene .adf-thinkdot{fill:var(--ad-thinkdot)} .ad-svg .adf-night0,.ad-scene .adf-night0{fill:var(--ad-night0)}
8
+ .ad-svg .ads-cream,.ad-scene .ads-cream{stroke:var(--ad-c1)} .ad-svg .ads-ink,.ad-scene .ads-ink{stroke:var(--ad-ink)} .ad-svg .ads-glass,.ad-scene .ads-glass{stroke:var(--ad-glass)} .ad-svg .ads-creamhi,.ad-scene .ads-creamhi{stroke:var(--ad-creamhi)} .ad-svg .ads-hp,.ad-scene .ads-hp{stroke:var(--ad-hp)} .ad-svg .ads-grass,.ad-scene .ads-grass{stroke:var(--ad-grass)} .ad-svg .ads-drop,.ad-scene .ads-drop{stroke:var(--ad-drop)} .ad-svg .ads-white,.ad-scene .ads-white{stroke:var(--ad-white)} .ad-svg .ads-cardline,.ad-scene .ads-cardline{stroke:var(--ad-cardline)} .ad-svg .ads-tick,.ad-scene .ads-tick{stroke:var(--ad-tick)}
9
+ .adg-f0{stop-color:var(--ad-f0)} .adg-f1{stop-color:var(--ad-f1)} .adg-f2{stop-color:var(--ad-f2)} .adg-c0{stop-color:var(--ad-c0)} .adg-c1{stop-color:var(--ad-c1)} .adg-c2{stop-color:var(--ad-c2)} .adg-h0{stop-color:var(--ad-h0)} .adg-h1{stop-color:var(--ad-h1)} .adg-h2{stop-color:var(--ad-h2)} .adg-l0{stop-color:var(--ad-l0)} .adg-l1{stop-color:var(--ad-l1)} .adg-morning0{stop-color:var(--ad-morning0)} .adg-morning1{stop-color:var(--ad-morning1)} .adg-tea0{stop-color:var(--ad-tea0)} .adg-tea1{stop-color:var(--ad-tea1)} .adg-win0{stop-color:var(--ad-win0)} .adg-win1{stop-color:var(--ad-win1)} .adg-think0{stop-color:var(--ad-think0)} .adg-think1{stop-color:var(--ad-think1)} .adg-rain0{stop-color:var(--ad-rain0)} .adg-rain1{stop-color:var(--ad-rain1)} .adg-night0{stop-color:var(--ad-night0)} .adg-night1{stop-color:var(--ad-night1)} .adg-plain0{stop-color:var(--ad-plain0)} .adg-plain1{stop-color:var(--ad-plain1)}
10
+
11
+ .ad-svg { display: inline-block; flex: none; vertical-align: middle; }
12
+ .ad-dot { display: inline-block; flex: none; width: var(--ad-px, 12px); height: var(--ad-px, 12px); max-width: 12px; max-height: 12px; border-radius: 50%; background: var(--cz-dot-ok, currentColor); vertical-align: middle; }
13
+ .ad-dot.m-honest { background: var(--cz-dot-red, currentColor); }
14
+ .ad-dot.m-needs-you { background: var(--cz-blue, currentColor); }
15
+ .ad-dot.m-thinking, .ad-dot.m-resting { background: var(--cz-dot-q, currentColor); }
16
+ .ad-dot.m-celebrating { background: var(--cz-dot-risk, currentColor); }
17
+ .ad-scene { display: block; width: 100%; height: auto; border-radius: 18px; }
18
+ .ad-scene .ad-z { font-family: var(--cz-sans, sans-serif); font-weight: 800; }
19
+ .ad-scene .ad-z.z0 { font-size: var(--fs-3); } .ad-scene .ad-z.z1 { font-size: var(--fs-4); } .ad-scene .ad-z.z2 { font-size: var(--fs-5); }
20
+ .ad-scene-face { display: flex; justify-content: center; padding: 12px 0; }
21
+ .ad-peek { display: block; }
22
+ /* every toast (AdM1-4): the S face before the words */
23
+ .ad-tf { display: inline-flex; align-items: center; margin-right: 8px; vertical-align: middle; }
24
+ .ad-toast { display: inline-flex; align-items: center; }
25
+ /* dark mode (AdU8): the scene's sky and ground dim; Adler keeps his own warm colours */
26
+ :root[data-theme="dark"] .ad-env, .cz.dark .ad-env { filter: brightness(.55) saturate(.85); }
27
+
28
+ .am .ad-br { animation: adBr 4.6s ease-in-out infinite; transform-origin: 100px 250px; }
29
+ @keyframes adBr { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.008, 1.018); } }
30
+ .am .ad-sp { animation: adSp 5.2s ease-in-out infinite; transform-origin: 100px 38px; }
31
+ @keyframes adSp { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
32
+ .am .ad-ey { animation: adBl 5.6s infinite; transform-box: fill-box; transform-origin: center; }
33
+ @keyframes adBl { 0%, 93%, 100% { transform: scaleY(1); } 95.5% { transform: scaleY(.12); } }
34
+ .am .ad-tl { animation: adTl 3.2s ease-in-out infinite; transform-origin: 146px 214px; }
35
+ @keyframes adTl { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(7deg); } }
36
+ .am.m-joy .ad-tl { animation-duration: 1s; }
37
+ .am.m-joy .ad-br { animation: adHop 2.6s ease-in-out infinite; }
38
+ @keyframes adHop { 0%, 60%, 100% { transform: translateY(0); } 72% { transform: translateY(-6px); } 84% { transform: translateY(0); } }
39
+ .am.m-joy .ad-ey, .am.m-rest .ad-ey { animation: none; }
40
+ .am.m-worry .ad-tl, .am.m-rest .ad-tl { animation: none; }
41
+ .am.m-worry .ad-sp { animation-duration: 9s; }
42
+ .am.m-rest .ad-br { animation-duration: 6.5s; }
43
+ /* the S face in a toast or a chip only blinks: a 24 px face that breathes reads as jitter */
44
+ .ad-tf .am *, .ad-svg[width="24"] .ad-sp { animation: none; }
45
+ .env-glow { animation: enGl 6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
46
+ @keyframes enGl { 0%, 100% { opacity: .55; transform: scale(1); } 50% { opacity: .85; transform: scale(1.08); } }
47
+ .env-cloud { animation: enCl 26s ease-in-out infinite alternate; }
48
+ @keyframes enCl { from { transform: translateX(-14px); } to { transform: translateX(18px); } }
49
+ .env-steam { animation: enSt 3.6s ease-out infinite; opacity: 0; }
50
+ .env-steam.d2 { animation-delay: 1.2s; } .env-steam.d3 { animation-delay: 2.4s; }
51
+ @keyframes enSt { 0% { opacity: 0; transform: translateY(6px); } 30% { opacity: .6; } 100% { opacity: 0; transform: translateY(-22px); } }
52
+ .env-leaf { animation: enLf 7s ease-in 1 forwards; opacity: 0; }
53
+ .env-leaf.d2 { animation-delay: .5s; } .env-leaf.d3 { animation-delay: 1s; } .env-leaf.d4 { animation-delay: 1.4s; } .env-leaf.d5 { animation-delay: .8s; }
54
+ @keyframes enLf { 0% { opacity: 0; transform: translate(0, -10px) rotate(0); } 6% { opacity: 1; } 40% { opacity: 1; transform: translate(14px, 120px) rotate(200deg); } 48%, 100% { opacity: 0; transform: translate(16px, 140px) rotate(240deg); } }
55
+ .env-tw { animation: enTw 3.4s ease-in-out infinite; }
56
+ .env-tw.d2 { animation-delay: 1.1s; } .env-tw.d3 { animation-delay: 2.2s; }
57
+ @keyframes enTw { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
58
+ .env-ff { animation: enFf 9s ease-in-out infinite alternate; }
59
+ .env-ff.d2 { animation-duration: 11s; animation-delay: -3s; }
60
+ @keyframes enFf { 0% { transform: translate(0, 0); opacity: .3; } 50% { transform: translate(18px, -14px); opacity: 1; } 100% { transform: translate(-10px, -24px); opacity: .4; } }
61
+ .env-z { animation: enZ 4.5s ease-out infinite; opacity: 0; }
62
+ .env-z.d2 { animation-delay: 1.5s; } .env-z.d3 { animation-delay: 3s; }
63
+ @keyframes enZ { 0% { opacity: 0; transform: translate(0, 0) scale(.7); } 25% { opacity: .8; } 100% { opacity: 0; transform: translate(14px, -34px) scale(1.15); } }
64
+ .env-dot { animation: enDt 1.5s ease-in-out infinite; }
65
+ .env-dot.d2 { animation-delay: .25s; } .env-dot.d3 { animation-delay: .5s; }
66
+ @keyframes enDt { 0%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
67
+ .env-sway { animation: enSw 4s ease-in-out infinite; transform-box: fill-box; transform-origin: bottom center; }
68
+ .env-sway.d2 { animation-delay: -1.5s; }
69
+ @keyframes enSw { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
70
+ .env-drop { animation: enDr 2.2s linear infinite; opacity: 0; }
71
+ .env-drop.d2 { animation-delay: .7s; } .env-drop.d3 { animation-delay: 1.4s; }
72
+ @keyframes enDr { 0% { opacity: 0; transform: translateY(0); } 15% { opacity: .6; } 100% { opacity: 0; transform: translateY(26px); } }
73
+ /* still: the OS asks for less motion, or Settings > Adler > Motion is Still. A leaf that would fall once is simply not drawn. */
74
+ html.ad-still .am *, html.ad-still .ad-scene * { animation: none !important; }
75
+ html.ad-still .env-steam, html.ad-still .env-z, html.ad-still .env-drop { opacity: .6; }
76
+ html.ad-still .env-leaf { opacity: 0; }
77
+ @media (prefers-reduced-motion: reduce) {
78
+ .am *, .ad-scene * { animation: none !important; }
79
+ .env-steam, .env-z, .env-drop { opacity: .6; }
80
+ .env-leaf { opacity: 0; }
81
+ }
82
+ svg.ad-svg.am { stroke: none; }