create-pmos 0.442.0 → 0.443.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 (49) hide show
  1. package/package.json +13 -13
  2. package/payload/KIT-VERSION +1 -1
  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/workspace/changelog.json +12 -0
  7. package/workspace/goals-clear-ui-test.js +249 -0
  8. package/workspace/guide/home.md +7 -2
  9. package/workspace/guide/metric-drafts.md +8 -2
  10. package/workspace/home-railcard-test.js +193 -0
  11. package/workspace/intelligence-gaps-ui-test.js +16 -14
  12. package/workspace/lib/engine/records/index.js +9 -2
  13. package/workspace/lib/initiative-layout.js +3 -1
  14. package/workspace/lib/insights-premium.js +22 -1
  15. package/workspace/lib/metric-drafts.js +37 -10
  16. package/workspace/lib/metric-read-runs.js +20 -13
  17. package/workspace/lib/metric-reads.js +208 -23
  18. package/workspace/lib/metrics-cli.js +62 -5
  19. package/workspace/lib/routes-goal-status.js +89 -6
  20. package/workspace/lib/routes-insights-premium.js +1 -1
  21. package/workspace/lib/routes-metric-drafts.js +26 -3
  22. package/workspace/metric-drafts-ui-test.js +5 -2
  23. package/workspace/okr-goals-ui-test.js +7 -5
  24. package/workspace/package-lock.json +2 -2
  25. package/workspace/package.json +1 -1
  26. package/workspace/premium-board-actions-test.js +2 -2
  27. package/workspace/public/pm/cozy-insights.css +82 -0
  28. package/workspace/public/pm/cozy-live-pill.css +5 -0
  29. package/workspace/public/pm/cozy-today.css +15 -0
  30. package/workspace/public/pm/cozy-viewer.js +42 -14
  31. package/workspace/public/pm/cozy-vw-shell.css +4 -0
  32. package/workspace/public/pm/goals-clear.js +258 -0
  33. package/workspace/public/pm/home-app.js +51 -3
  34. package/workspace/public/pm/home-today.js +51 -10
  35. package/workspace/public/pm/ini-groups.js +14 -8
  36. package/workspace/public/pm/ini-tasks.js +47 -13
  37. package/workspace/public/pm/ini-view-model.js +37 -14
  38. package/workspace/public/pm/ini-view.css +29 -4
  39. package/workspace/public/pm/ini-view.js +9 -6
  40. package/workspace/public/pm/metric-drafts.js +4 -1
  41. package/workspace/public/pm/mission.js +11 -7
  42. package/workspace/public/pm/premium-insights.js +178 -24
  43. package/workspace/server.js +6 -2
  44. package/workspace/skills/metric-read.skill +7 -5
  45. package/workspace/stage-card-test.js +11 -3
  46. package/workspace/task-views-test.js +190 -1
  47. package/workspace/test-lists/goals-clear.json +15 -0
  48. package/workspace/test-lists/home-railcard.json +9 -0
  49. package/workspace/tk-tasks-test.js +2 -2
@@ -8,7 +8,12 @@
8
8
  * V7 a card's drag · V8 Won't do and Archived in the List · V9 the phone. SHOTS_5B=<dir> writes the screens.
9
9
  * Batch 18 item 1 (1-B; XvpA4Sheet, XvpA3Timeline, XvpA3bMonths): the header holds one view button, its sheet picks View, Group by and Zoom
10
10
  * (Weeks, Months, All); the List shows only the stages with something open and folds a stage after 3 tasks; All fits the whole initiative.
11
- * V10 the sheet · V11 the List's folds · V12 Timeline at All. The pure half is viewer-tasks.test.js. */
11
+ * V10 the sheet · V11 the List's folds · V12 Timeline at All. The pure half is viewer-tasks.test.js.
12
+ * 0.442.0 hotfix (Wawan 2026-10-28 "So much broken UI"; shots next18/hotfix-442/): H1 a phone's titles whole, bars their own size (Home's
13
+ * Viewer makes every button 44 px) · H2 the Today line unbroken · H3 no half-cut axis label · H4 one ◇ a milestone · H5 Full width in the
14
+ * Tasks header · H6 the grouping kept over a task edit. Home's Viewer (premium.html) and the Board's panel, 390 and 1440, light and dark.
15
+ * H7 (Wawan 13:02, 13:03): a task whose title names a Jira ticket PMOS read is that ticket (Jira mark, the key once, Jira's status, no box
16
+ * and no Kanban drag) and its dates stay the PM's to set (date press and bar drag save to the task); a key PMOS has not read is plain text. */
12
17
  const path = require('path');
13
18
  const { spawn } = require('child_process');
14
19
  const { findBrowser } = require('./lib/find-browser');
@@ -44,6 +49,18 @@ const TASKS = [
44
49
  { uid: 'task-h', title: 'Plan the rollout', status: 'To do', owner: 'Wawan', start: '2026-11-02', end: '2026-11-06', section: 'plan' },
45
50
  ];
46
51
  const model = () => { const M = BP.build(F.facts()); const r = M.rows.find((x) => x.id === 'usage-billing'); r.tasks = TASKS.map((t) => ({ ...t })); return M; };
52
+ /* the hotfix's tasks (H*): long titles that start past the first screen, a milestone with a due day only, owners with initials */
53
+ const HTASKS = [
54
+ { uid: 'h1', title: '11.0 Contract Negotiation with selected vendor and their legal team', status: 'In progress', owner: 'Rina Chen', start: '2026-10-08', end: '2026-10-21' },
55
+ { uid: 'h2', title: '11.2 Conclude nego, update TC meeting minutes', status: 'To do', owner: 'Claude', start: '2026-10-18', end: '2026-10-31' },
56
+ { uid: 'h3', title: '11.3 TC endorse meeting minutes and confirm the candidate', status: 'To do', owner: 'Claude', start: '2026-10-29', end: '2026-11-11' },
57
+ { uid: 'h4', title: 'Award contract', milestone: true, status: 'To do', owner: 'Wawan', end: '2026-10-22' },
58
+ { uid: 'h5', title: 'Kick-off notes', status: 'Done', owner: 'Wawan', end: '2026-10-12' },
59
+ ];
60
+ const BRP = require('./lib/briefing-premium.js');
61
+ const BRF = require('./fixtures/briefing-premium-facts.js');
62
+ const IP = require('./lib/initiative-premium.js');
63
+ const IF = require('./fixtures/initiative-premium-facts.js');
47
64
 
48
65
  (async () => {
49
66
  const exe = findBrowser();
@@ -319,5 +336,177 @@ const model = () => { const M = BP.build(F.facts()); const r = M.rows.find((x) =
319
336
  const D = await open({ theme: 'dark', store: { 'pmos.tasks.view': 'timeline' } }); await sleep(200); await shot(D.page, 'timeline-1440-dark');
320
337
  await sheetPick(D.page, 'view', 'kanban'); await sleep(200); await shot(D.page, 'kanban-1440-dark'); await D.ctx.close();
321
338
  }
339
+
340
+ /* ── 0.442.0 hotfix: H1–H6 ── */
341
+ // where: 'home' (premium.html's Viewer; self-serve-v2 is in Build) or 'board' (usage-billing's panel; in Discover)
342
+ const openH = async ({ where = 'home', w = 390, h = 844, theme = 'light', view = 'timeline', zoom = 'week', tasks = HTASKS, tickets = null, drafts = null } = {}) => {
343
+ const touch = w < 700, id = where === 'home' ? 'self-serve-v2' : 'usage-billing', sec = where === 'home' ? 'build' : 'discover';
344
+ const ctx = await browser.newContext({ viewport: { width: w, height: h }, hasTouch: touch, isMobile: touch, colorScheme: theme });
345
+ await ctx.addInitScript(([v, z]) => { localStorage.setItem('pmos.tasks.view', v); localStorage.setItem('pmos.tasks.zoom', z); }, [view, zoom]);
346
+ const page = await ctx.newPage(), errors = [], posts = [];
347
+ let layout = { ok: true, by: 'stage', picked: false, names: [], of: {}, sets: [] };
348
+ const M = () => { const m = BP.build(F.facts()); const r = m.rows.find((x) => x.id === id); r.tasks = tasks.map((t) => ({ ...t, section: sec })); if (tickets) r.track = { ...(r.track || {}), tickets }; return m; };
349
+ const json = (r, b, status = 200) => r.fulfill({ status, contentType: 'application/json', body: JSON.stringify(b) });
350
+ page.on('pageerror', (e) => errors.push(String((e && e.stack) || e)));
351
+ await page.route('**/api/board-premium*', (r) => json(r, { ok: true, state: 'ready', model: M(), as_of: Date.now() }));
352
+ await page.route('**/api/board-trail*', (r) => json(r, { ok: false }, 500));
353
+ await page.route('**/api/initiative-premium*', (r) => json(r, { ok: true, state: 'ready', model: IP.build(IF.facts()), as_of: Date.now() }));
354
+ await page.route(/\/api\/briefing-premium(\?.*)?$/, (r) => json(r, { ok: true, state: 'ready', model: BRP.build(BRF.facts()), as_of: Date.now() }));
355
+ await page.route('**/api/briefing-premium/**', (r) => json(r, { ok: true, turns: [], working: false }));
356
+ await page.route('**/api/jira/tickets*', (r) => json(r, drafts || { ok: false, error: 'not in this check' }));
357
+ // the layout answers as the server does once a pick saves (the write's own wording is initiative-layout.test.js's)
358
+ await page.route('**/api/initiative-layout*', (r) => { const rq = r.request(); if (rq.method() === 'POST') { const b = JSON.parse(rq.postData() || '{}'); posts.push({ path: '/api/initiative-layout', body: b }); layout = { ...layout, by: b.grouping || b.by, picked: true }; } json(r, layout); });
359
+ await page.route(/\/api\/(boards\/|lifecycle)/, (r) => { const rq = r.request(); if (rq.method() !== 'GET') posts.push({ path: new URL(rq.url()).pathname, body: JSON.parse(rq.postData() || '{}') }); json(r, { ok: true }); });
360
+ if (where === 'home') await page.goto(BASE + '/premium.html?ini=self-serve-v2&ws=w1&board=w1&theme=' + theme);
361
+ else {
362
+ await page.goto(BASE + '/premium-board.html?theme=' + theme);
363
+ await until(() => page.evaluate(() => document.querySelectorAll('#ibBody .ini2, #ibBody .bt-l').length > 0), 20000);
364
+ await page.evaluate(() => { const b = [...document.querySelectorAll('[data-row="board:usage-billing"] .bt-nm, [data-key="board:usage-billing"]')].find((x) => x.offsetParent); if (b) b.click(); });
365
+ }
366
+ await until(() => page.evaluate((v) => !!document.querySelector(v === 'timeline' ? '#czViewer :is(.ivt, .iva)' : '#czViewer .iv-th'), view), 20000);
367
+ await sleep(300);
368
+ return { ctx, page, errors, posts };
369
+ };
370
+ const shotH = async (pg, name) => { if (!process.env.SHOTS_5B) return; await pg.evaluate(() => { const t = document.querySelector('#czViewer :is(.ivt, .iva)'); if (t) t.scrollIntoView({ block: 'start' }); }); await sleep(150); await pg.screenshot({ path: path.join(process.env.SHOTS_5B, name + '.png') }); };
371
+ // the geometry of a phone's rows: each title's width, its label inside the screen, its bar's height and place inside its row
372
+ const rowsGeo = (pg) => pg.evaluate(() => { const sc = document.querySelector('#czViewer .ivt-sc').getBoundingClientRect();
373
+ return [...document.querySelectorAll('#czViewer .ivt-r.k')].filter((r) => r.querySelector('.ivt-n[data-tln]')).map((r) => { const n = r.querySelector('.ivt-n').getBoundingClientRect(), t = r.querySelector('.iv-tt').getBoundingClientRect(), b = r.querySelector('.ivt-b, .ivt-d'), q = b && b.getBoundingClientRect(), R = r.getBoundingClientRect();
374
+ return { t: r.querySelector('.iv-tt').textContent.slice(0, 12), tw: Math.round(t.width), inside: n.left >= sc.left - 1 && n.right <= sc.right + 1, bh: q ? Math.round(q.height) : null, bin: q ? q.top >= R.top - 1 && q.bottom <= R.bottom + 1 : true, rh: Math.round(R.height) }; }); });
375
+ const axisGeo = (pg) => pg.evaluate(() => { const T = document.querySelector('#czViewer .ivt'), sc = T.querySelector('.ivt-sc').getBoundingClientRect(), nw = T.querySelector('.ivt-n').offsetWidth, ch = T.querySelector('.ivt-today i').getBoundingClientRect();
376
+ return [...T.querySelectorAll('.ivt-r.ax .ivt-c span')].filter((e) => getComputedStyle(e).visibility !== 'hidden').map((e) => { const r = e.getBoundingClientRect(); return { t: e.textContent, cut: r.left + 4 < sc.left + nw - 1 && r.right > sc.left + nw, chip: r.right > ch.left - 4 && r.left + 4 < ch.right + 4 && r.left < sc.right }; }).filter((x) => x.cut || x.chip); });
377
+
378
+ for (const theme of ['light', 'dark']) {
379
+ for (const zoom of ['week', 'month']) {
380
+ const P = await openH({ theme, zoom }), q = P.page;
381
+ const g = await rowsGeo(q);
382
+ ok(`H1 Home phone ${zoom} ${theme}: every task names itself (at least 60 px of title) and its label is whole on the screen`, g.length === 4 && g.every((x) => x.tw >= 60 && x.inside), JSON.stringify(g));
383
+ ok(`H1 Home phone ${zoom} ${theme}: a bar keeps its own size inside its row (Home's 44 px button rule does not reach it); rows stay under 66 px`, g.every((x) => (x.bh == null || x.bh <= 20) && x.bin && x.rh <= 66), JSON.stringify(g));
384
+ // H2: where a group's name crosses the Today line, the name does not hide it
385
+ const tl = await q.evaluate(() => { const x = document.querySelector('#czViewer .ivt-today').getBoundingClientRect().left;
386
+ return [...document.querySelectorAll('#czViewer .ivt-r.g .ivt-n')].filter((n) => { const r = n.getBoundingClientRect(); return r.left < x && r.right > x; }).map((n) => getComputedStyle(n).backgroundColor); });
387
+ ok(`H2 Home phone ${zoom} ${theme}: the Today line runs unbroken through the group names`, tl.every((c) => c === 'rgba(0, 0, 0, 0)'), JSON.stringify(tl));
388
+ const ax = await axisGeo(q);
389
+ ok(`H3 Home phone ${zoom} ${theme}: no axis label is half cut at the left or drawn under the Today chip`, ax.length === 0, JSON.stringify(ax));
390
+ if (zoom === 'week') {
391
+ await q.evaluate(() => { const s = document.querySelector('#czViewer .ivt-sc'); s.scrollLeft += 160; });
392
+ await sleep(200);
393
+ const g2 = await rowsGeo(q), ax2 = await axisGeo(q);
394
+ ok(`H1 Home phone ${theme}: scrolled sideways, the titles stay whole on the screen and no axis label is cut`, g2.every((x) => x.tw >= 60 && x.inside) && ax2.length === 0, JSON.stringify({ g2, ax2 }));
395
+ await q.evaluate(() => { const s = document.querySelector('#czViewer .ivt-sc'); s.scrollLeft -= 160; });
396
+ await sleep(150);
397
+ ok(`H5 Home phone ${theme}: no Full width on a phone`, !(await q.$('#czViewer [data-iv-full]')));
398
+ }
399
+ await shotH(q, `hotfix-home-390-${zoom}-${theme}`);
400
+ ok(`H0 Home phone ${zoom} ${theme}: no page error`, P.errors.length === 0, P.errors.join(' | '));
401
+ await P.ctx.close();
402
+ }
403
+ const Pa = await openH({ theme, zoom: 'all' }), qa = Pa.page;
404
+ const ga = await qa.evaluate(() => [...document.querySelectorAll('#czViewer .iva-r.k')].map((r) => { const b = r.querySelector('.iva-tb, .iva-md'); return { t: r.querySelector('.iv-tt').textContent.slice(0, 12), bh: b ? Math.round(b.getBoundingClientRect().height) : null, tw: Math.round(r.querySelector('.iv-tt').getBoundingClientRect().width) }; }));
405
+ ok(`H1 Home phone All ${theme}: bars and ◇ keep their own size; every task names itself`, ga.length >= 4 && ga.every((x) => (x.bh == null || x.bh <= 17) && x.tw >= 60), JSON.stringify(ga));
406
+ await shotH(qa, `hotfix-home-390-all-${theme}`);
407
+ await Pa.ctx.close();
408
+
409
+ /* desktop: the Board's panel */
410
+ const D = await openH({ where: 'board', w: 1440, h: 900, theme }), d = D.page;
411
+ const fl = await d.evaluate(() => { const b = document.querySelector('#czViewer .iv-th [data-iv-full]'), vb = document.querySelector('#czViewer .iv-th [data-iv-vbtn]'); return { head: !!b, after: !!b && vb.nextElementSibling === b, legend: !!document.querySelector('#czViewer .ivt-lg [data-iv-full]') }; });
412
+ ok(`H5 Board 1440 ${theme}: Full width sits in the Tasks header beside the view button, not at the Timeline's foot`, fl.head && fl.after && !fl.legend, JSON.stringify(fl));
413
+ const ax = await axisGeo(d);
414
+ ok(`H3 Board 1440 ${theme}: no axis label half cut at the name column or under the Today chip`, ax.length === 0, JSON.stringify(ax));
415
+ const ms = await d.evaluate(() => { const b = document.querySelector('#czViewer [data-ivt-bar="h4"]'); return b ? { cls: b.className, tf: getComputedStyle(b).transform } : null; });
416
+ ok(`H4 Board 1440 ${theme}: a milestone with a due day only is its ◇ on the Timeline, not the due-only circle`, !!ms && /\bms\b/.test(ms.cls) && ms.tf !== 'none', JSON.stringify(ms));
417
+ await shotH(d, `hotfix-board-1440-week-${theme}`);
418
+ await sheetPick(d, 'zoom', 'all');
419
+ await until(() => d.evaluate(() => !!document.querySelector('#czViewer .iva')));
420
+ const one = await d.evaluate(() => { const r = [...document.querySelectorAll('#czViewer .iva-r.k')].find((x) => /Award contract/.test(x.textContent)); return r ? r.querySelectorAll('.iva-mg, .iva-l .iv-ms').length : -1; });
421
+ ok(`H4 Board 1440 All ${theme}: a milestone row shows its ◇ once (it led and trailed the title)`, one === 1, String(one));
422
+ const fa = await d.evaluate(() => !document.querySelector('#czViewer .iv-th [data-iv-full]'));
423
+ ok(`H5 Board 1440 ${theme}: at All (it fits the panel) there is no Full width`, fa);
424
+ await shotH(d, `hotfix-board-1440-all-${theme}`);
425
+ await sheetPick(d, 'view', 'list');
426
+ ok(`H5 Board 1440 ${theme}: the List has no Full width`, await d.evaluate(() => !document.querySelector('#czViewer .iv-th [data-iv-full]')));
427
+ ok(`H0 Board 1440 ${theme}: no page error`, D.errors.length === 0, D.errors.join(' | '));
428
+ await D.ctx.close();
429
+ }
430
+
431
+ /* H6 the grouping survives a task edit: pick Owner in the sheet, mark a task done, the redraw keeps Owner */
432
+ {
433
+ const G = await openH({ where: 'home', w: 1440, h: 900, view: 'list' }), g = G.page;
434
+ await g.click('#czViewer [data-iv-vbtn]');
435
+ await until(() => g.evaluate(() => !!document.querySelector('.tkc.ivq .ivs [data-ivs-by="owner"]')));
436
+ await g.click('.tkc.ivq .ivs [data-ivs-by="owner"]');
437
+ const saved = await until(() => G.posts.find((x) => x.path === '/api/initiative-layout'));
438
+ await g.keyboard.press('Escape');
439
+ const heads0 = await until(() => g.evaluate(() => { const h = [...document.querySelectorAll('#czViewer .iv-wbs .iv-ws b')].map((b) => b.textContent); return h.some((x) => /Wawan|Claude|Rina/.test(x)) ? h : null; }));
440
+ ok('H6 Owner is picked and saved', !!saved && !!heads0, JSON.stringify({ saved: saved && saved.body, heads0 }));
441
+ await g.click('#czViewer [data-iv-check="h2"]');
442
+ await until(() => G.posts.find((x) => x.path === '/api/boards/tasks/state'));
443
+ await sleep(1500);
444
+ const st = await g.evaluate(() => { const vb = document.querySelector('#czViewer [data-iv-vbtn]'); vb.click(); return null; });
445
+ const by = await until(() => g.evaluate(() => { const b = document.querySelector('.tkc.ivq .ivs [data-ivs-by][aria-pressed="true"], .tkc.ivq .ivs [data-ivs-more][aria-pressed="true"]'); return b ? (b.dataset.ivsBy || b.textContent.trim()) : null; }));
446
+ const heads1 = await g.evaluate(() => [...document.querySelectorAll('#czViewer .iv-wbs .iv-ws b')].map((b) => b.textContent));
447
+ ok('H6 after a task edit the redraw keeps Owner: no fall back to Epic or Stage', by === 'owner' && heads1.some((x) => /Wawan|Claude|Rina/.test(x)), JSON.stringify({ st, by, heads1 }));
448
+ await G.ctx.close();
449
+ }
450
+
451
+ /* H7 a task named for a Jira ticket */
452
+ {
453
+ const JT = [
454
+ { uid: 'j1', title: 'MSD-4376 Microsite page in the single layout', status: 'To do', owner: 'Wawan', start: '2026-10-10', end: '2026-10-16' },
455
+ { uid: 'j2', title: 'Plan block at the top [MSD-4377]', status: 'To do', owner: 'Wawan', start: '2026-10-14', end: '2026-10-22' },
456
+ { uid: 'j3', title: 'MSD-9999 Navigation tabs', status: 'In progress', owner: 'Wawan', start: '2026-10-15', end: '2026-10-24' },
457
+ ];
458
+ const JK = [{ key: 'MSD-4376', title: 'Microsite page', status: 'Done', raw: 'Closed' }, { key: 'MSD-4377', title: 'Plan block', status: 'In progress', raw: 'In Review', due: '2026-11-30' }];
459
+ const J = await openH({ where: 'board', w: 1440, h: 900, view: 'list', tasks: JT, tickets: JK }), j = J.page;
460
+ await j.evaluate(() => { const b = [...document.querySelectorAll('#czViewer .iv-grp')].find((x) => /^Done/.test(x.textContent)); if (b) b.click(); });
461
+ await sleep(200);
462
+ const L = await j.evaluate(() => { const row = (re) => [...document.querySelectorAll('#czViewer .iv-tr')].find((r) => re.test(r.textContent));
463
+ const one = (r) => r ? { sq: (r.querySelector('.iv-jq') || { className: '' }).className, box: !!r.querySelector('[data-iv-check]'), em: [...r.querySelectorAll('.iv-tt em')].map((e) => e.textContent).join(), tt: r.querySelector('.iv-tt').textContent, label: (r.querySelector('.iv-jq') || { getAttribute: () => '' }).getAttribute('aria-label') } : null;
464
+ return { j1: one(row(/Microsite page/)), j2: one(row(/Plan block/)), j3: one(row(/Navigation tabs/)) }; });
465
+ ok('H7 List: a task named for a ticket PMOS read shows the Jira status square for Jira\'s status, no box, the key once', L.j1 && /ig-sq done/.test(L.j1.sq) && !L.j1.box && L.j1.em === 'MSD-4376' && L.j1.tt === 'MSD-4376 Microsite page in the single layout' && /Closed/.test(L.j1.label), JSON.stringify(L.j1));
466
+ ok('H7 List: a key anywhere in the title links too, In progress from Jira\'s "In Review"', L.j2 && /ig-sq doing/.test(L.j2.sq) && L.j2.em === 'MSD-4377' && L.j2.tt === 'MSD-4377 Plan block at the top', JSON.stringify(L.j2));
467
+ ok('H7 List: a key PMOS has not read is plain text in a plain task, with its box', L.j3 && L.j3.box && !L.j3.sq && L.j3.em === '' && L.j3.tt === 'MSD-9999 Navigation tabs', JSON.stringify(L.j3));
468
+ // the dates stay the PM's: the date press opens the picker, a day picked saves on the task
469
+ await j.click('#czViewer .iv-tr [data-iv-date="j2"]');
470
+ await until(() => j.evaluate(() => !!document.querySelector('.tkc.ivq .tkc-dp')));
471
+ const tip = await j.evaluate(() => document.querySelector('#czViewer .iv-tr [data-iv-date="j2"]').getAttribute('title'));
472
+ await j.click('.tkc.ivq .tkc-dp [data-tkc-day="2026-10-24"]');
473
+ const dd = await until(() => J.posts.find((x) => x.path === '/api/boards/tasks/edit' && x.body.task === 'j2'));
474
+ ok('H7 a linked task\'s dates are the PM\'s: the date press saves the day on the task, kept in PMOS', !!dd && dd.body.due === '2026-10-24' && /kept in PMOS/.test(tip || ''), JSON.stringify({ dd: dd && dd.body, tip }));
475
+ await sleep(600);
476
+ await sheetPick(j, 'view', 'timeline');
477
+ await until(() => j.evaluate(() => !!document.querySelector('#czViewer .ivt')));
478
+ await sleep(300);
479
+ const T7 = await j.evaluate(() => { const r = document.querySelector('#czViewer [data-ivt-bar="j2"]').closest('.ivt-r'); return { sq: !!r.querySelector('.iv-jq.ig-sq'), box: !!r.querySelector('[data-iv-check]'), drag: document.querySelector('#czViewer [data-ivt-bar="j2"]').hasAttribute('data-ivt-drag'), plain: !!document.querySelector('#czViewer [data-iv-check="j3"]') }; });
480
+ ok('H7 Timeline: the linked task shows the Jira square, no box, and its bar drags; the plain one keeps its box', T7.sq && !T7.box && T7.drag && T7.plain, JSON.stringify(T7));
481
+ const bb = await j.evaluate(() => { const r = document.querySelector('#czViewer [data-ivt-bar="j2"]').getBoundingClientRect(); return { x: r.left + r.width / 2, y: r.top + r.height / 2 }; });
482
+ const n0 = J.posts.length;
483
+ await j.mouse.move(bb.x, bb.y); await j.mouse.down(); await j.mouse.move(bb.x + 20, bb.y, { steps: 3 }); await j.mouse.move(bb.x + 42, bb.y, { steps: 3 }); await j.mouse.up();
484
+ const mv = await until(() => J.posts.slice(n0).find((x) => x.path === '/api/boards/tasks/edit' && x.body.task === 'j2'));
485
+ ok('H7 Timeline: dragging the linked task\'s bar moves its dates, saved on the task', !!mv && !!mv.body.start && !!mv.body.due, JSON.stringify(mv && mv.body));
486
+ await sleep(500);
487
+ await sheetPick(j, 'view', 'kanban');
488
+ await until(() => j.evaluate(() => !!document.querySelector('#czViewer .ivk')));
489
+ await j.evaluate(() => { const b = document.querySelector('#czViewer [data-iv-kstage]'); if (b) b.click(); });
490
+ await until(() => j.evaluate(() => !!document.querySelector('.tkc.ivq [data-ivq-i]')));
491
+ await j.evaluate(() => { const b = [...document.querySelectorAll('.tkc.ivq [data-ivq-i]')].find((x) => /All stages/.test(x.textContent)); if (b) b.click(); });
492
+ await sleep(300);
493
+ const K = await j.evaluate(() => { const card = (re) => [...document.querySelectorAll('#czViewer .ivk-d')].find((c) => re.test(c.textContent)); const col = (c) => c && c.closest('[data-ivk-col]') && c.closest('[data-ivk-col]').dataset.ivkCol;
494
+ const a = card(/Microsite/), b = card(/Plan block/), c = card(/Navigation tabs/); return { a: col(a), b: col(b), bDrag: b && b.getAttribute('draggable'), cDrag: c && c.getAttribute('draggable') }; });
495
+ ok('H7 Kanban: linked tasks sit in Jira\'s column and do not drag (Jira owns the status); the plain task drags', K.a === 'Done' && K.b === 'In progress' && K.bDrag == null && K.cDrag === 'true', JSON.stringify(K));
496
+ ok('H7 no page error', J.errors.length === 0, J.errors.join(' | '));
497
+ await J.ctx.close();
498
+ // By epic: a task linked to a ticket its draft put in Jira shows once, as the ticket, with the task's bar on the Timeline
499
+ const DR = { ok: true, drafted: 2, groups: [], epic: {}, tickets: [{ id: 'S1', summary: 'Plan block at the top', inJira: true, key: 'MSD-4377', jira: { status: 'In Review', category: 'doing' } }, { id: 'S2', summary: 'FAQ section', inJira: false, selectable: true }] };
500
+ const E = await openH({ where: 'board', w: 1440, h: 900, view: 'timeline', tasks: JT, tickets: JK.slice(0, 1), drafts: DR }), e = E.page;
501
+ await e.click('#czViewer [data-iv-vbtn]'); await until(() => e.evaluate(() => !!document.querySelector('.tkc.ivq .ivs [data-ivs-more]')));
502
+ await e.click('.tkc.ivq .ivs [data-ivs-more]');
503
+ await until(() => e.evaluate(() => !!document.querySelector('.ig-pop [role="menuitemradio"]')));
504
+ await e.click('.ig-pop [role="menuitemradio"]:has-text("Epic")');
505
+ const EP = await until(() => e.evaluate(() => { const r = document.querySelector('#czViewer .ivt-r.k [data-ig-tk="S1"]'); if (!r) return null; const row = r.closest('.ivt-r');
506
+ return { bar: !!row.querySelector('[data-ivt-bar="j2"]'), twice: [...document.querySelectorAll('#czViewer .ivt-r.k')].filter((x) => /Plan block/.test(x.textContent)).length, j1: (document.querySelector('#czViewer [data-ivt-bar="j1"]') || { closest: () => null }).closest('.ivt-r') ? 1 : 0 }; }), 15000);
507
+ ok('H7 By epic: the linked task shows once, as its ticket in Jira, carrying the task\'s bar', !!EP && EP.bar && EP.twice === 1, JSON.stringify(EP));
508
+ ok('H7 By epic: no page error', E.errors.length === 0, E.errors.join(' | '));
509
+ await E.ctx.close();
510
+ }
322
511
  return finish();
323
512
  })();
@@ -0,0 +1,15 @@
1
+ {
2
+ "_comment": "Feedback batch 18 item 11, goals made clear. Backend 11-A: how a goal is counted (num and den beside each reading), the hourly rhythm and a time of day, Read now that never moves the next read, Claude's checks that hold a strange reading, file it, compare with your number and the pick, a guardrail without a date, and the fields the UI reads (lib/metric-reads.js, lib/metric-drafts.js recipeOf, lib/metrics-cli.js reading, lib/routes-goal-status.js, lib/insights-premium.js readFields, lib/routes-metric-drafts.js liveRows, scripts/records); pure folds, fake run parts and the routes in process on a scratch workspace. UI 11-B (frames Gc*): the drafts table, the check panel, the first readings, a key result's counts said once, a failed read and a held reading; goals-clear.test.mjs is pure (pm/goals-clear.js), goals-clear-ui-test.js drives the real page at 1440 px and 390 px with the 11-A routes stubbed.",
3
+ "modules": [
4
+ "goals-clear.test.js",
5
+ "goals-clear.test.mjs"
6
+ ],
7
+ "panels": [
8
+ "goals-clear-ui-test.js"
9
+ ],
10
+ "seconds": {
11
+ "goals-clear.test.js": 3,
12
+ "goals-clear.test.mjs": 1,
13
+ "goals-clear-ui-test.js": 30
14
+ }
15
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "_comment": "Home's folded rail: a tile's press opens a card of that group's rows beside it (feedback batch 18 item 14; home-app.js drawRailCard, home-today.js railCardHtml, cozy-viewer.js railCard). A browser suite.",
3
+ "panels": [
4
+ "home-railcard-test.js"
5
+ ],
6
+ "seconds": {
7
+ "home-railcard-test.js": 30
8
+ }
9
+ }
@@ -87,7 +87,7 @@ const LAYOUT = { ok: true, auto: true, held: [], by: 'stage', names: [], of: {},
87
87
  page.on('request', (rq) => { if (rq.method() === 'POST') posts.push({ path: new URL(rq.url()).pathname, body: JSON.parse(rq.postData() || '{}') }); });
88
88
  const json = (r, b, status = 200) => r.fulfill({ status, contentType: 'application/json', body: JSON.stringify(b) });
89
89
  const press = (b) => {
90
- if (b.kind === 'by') L = { ...L, by: b.by, picked: true };
90
+ if (b.kind === 'by') L = { ...L, by: b.grouping, picked: true }; // the page sends `grouping` (pm-guard refuses `by`)
91
91
  else if (b.kind === 'groups') { const of = {}; for (const [k, v] of Object.entries(L.of)) if (b.names.includes(v)) of[k] = v; L = { ...L, names: b.names, of }; }
92
92
  else if (b.kind === 'rename') { const of = {}; for (const [k, v] of Object.entries(L.of)) of[k] = v === b.from ? b.to : v; L = { ...L, names: L.names.map((n) => (n === b.from ? b.to : n)), of }; }
93
93
  else if (b.kind === 'place') { const of = { ...L.of }; if (b.group) of[b.task] = b.group; else delete of[b.task]; L = { ...L, of }; }
@@ -150,7 +150,7 @@ const LAYOUT = { ok: true, auto: true, held: [], by: 'stage', names: [], of: {},
150
150
  await shot(p, 'group-menu-1440.png');
151
151
  await p.click('.ig-pop [role="menuitemradio"]:has-text("Stage")');
152
152
  const by = await until(() => lastPost(A, '/api/initiative-layout'));
153
- ok('G1 a pick is kept for the workspace: by stage', !!by && by.body.kind === 'by' && by.body.by === 'stage' && by.body.initiative === I && by.body.ws === 'w1', JSON.stringify(by && by.body));
153
+ ok('G1 a pick is kept for the workspace: by stage', !!by && by.body.kind === 'by' && by.body.grouping === 'stage' && by.body.initiative === I && by.body.ws === 'w1', JSON.stringify(by && by.body));
154
154
  ok('G1 Stage draws the stages again, with no ticket rows', await until(() => p.evaluate((v) => !document.querySelector(v + ' .ig-tk') && !document.querySelector(v + ' .ig-sum') && [...document.querySelectorAll(v + ' .iv-wbs .iv-ws b')].some((b) => /Discover/.test(b.textContent)), V)));
155
155
  await openMore(p);
156
156
  await p.click('.ig-pop [role="menuitemradio"]:has-text("Epic")');