create-pmos 0.400.0 → 0.401.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-pmos",
3
- "version": "0.400.0",
3
+ "version": "0.401.0",
4
4
  "description": "Scaffold the PMOS portable kit — run the PMOS product-management workflow (initiative → lane-fit spec → contract → build → three gates, with work-type lanes for features, research, maintenance, incidents, and content) entirely inside your own repo, with all state as git-versioned files. Includes `workflow-sweep`, which audits the state every board derives from and separates real defects from work you simply have not done. `create-pmos workspace` also installs + launches the local Terminal Workspace GUI. No database, no network, no telemetry.",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -32,6 +32,18 @@
32
32
  "audit"
33
33
  ],
34
34
  "pmosChanges": [
35
+ {
36
+ "v": "0.401.0",
37
+ "at": "2026-10-23T23:36:01.429Z",
38
+ "f": 2,
39
+ "prs": [
40
+ {
41
+ "n": 1025,
42
+ "t": "Testing fixes round 2 (Home list, one chat box, newest-first chat, Draft it)",
43
+ "s": "Testing fixes round 2 (Home list, one chat box, newest-first chat, Draft it)"
44
+ }
45
+ ]
46
+ },
35
47
  {
36
48
  "v": "0.400.0",
37
49
  "at": "2026-10-23T13:50:38.397Z",
@@ -284,18 +296,6 @@
284
296
  "s": "Download a file from the viewer (premium-viewer-share slice 1)"
285
297
  }
286
298
  ]
287
- },
288
- {
289
- "v": "0.381.0",
290
- "at": "2026-10-21T12:15:37.889Z",
291
- "f": 2,
292
- "prs": [
293
- {
294
- "n": 990,
295
- "t": "Markdown tables draw as tables in the viewer, the Read tab and chat",
296
- "s": "Markdown tables draw as tables in the viewer, the Read tab and chat"
297
- }
298
- ]
299
299
  }
300
300
  ]
301
301
  }
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@803c38d3
1
+ kernel-source: pmos@ae21ca8c
2
2
  assembled: 2026-10-23
3
3
  mode: vendor
@@ -2,7 +2,7 @@
2
2
  type: Reference
3
3
  title: "Eval calibration log"
4
4
  description: "Append-only record of every PM override of an evaluator verdict."
5
- generated: {by: process:create-pmos, at: "2026-10-23T13:50:36Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-23T23:35:59Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -2,7 +2,7 @@
2
2
  type: Reference
3
3
  title: "Health budgets"
4
4
  description: "Closed registry of health-budget anchors (D59), edited only by the PM."
5
- generated: {by: process:create-pmos, at: "2026-10-23T13:50:36Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-23T23:35:59Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -2,7 +2,7 @@
2
2
  type: Reference
3
3
  title: "Discoveries and friction log"
4
4
  description: "Append-only record of what runs discovered and where the process rubbed."
5
- generated: {by: process:create-pmos, at: "2026-10-23T13:50:36Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-23T23:35:59Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -147,7 +147,7 @@ const mk = (o) => BP.build(F.facts(o));
147
147
  ok('B1 its ladder has the eight steps; In Jira lists its tickets (blocked first) with their status, and names release notes and your sign-off (BdPanel)', !!pk && pk.lad === 8 && pk.cur === 'Deliv' && pk.tks.split(',')[0] === 'SSO-12' && pk.tks.split(',').sort().join() === 'SSO-10,SSO-12,SSO-14,SSO-15' && pk.jt.some((x) => /^SSO-10Okta configDone/.test(x)) && pk.jt.some((x) => /^SSO-12SAML errorsBlocked/.test(x)) && pk.rows.some((x) => x === 'Release notesnot on record') && pk.rows.some((x) => x === 'Your sign-offafter the tickets'), JSON.stringify(pk && [pk.tks, pk.jt, pk.rows]));
148
148
  // re-pointed for the Agreed design (AgBoardPanel has no empty variants): what PMOS has no record of draws no card and no chip, rather than an empty one
149
149
  ok('B1 what PMOS has no record of is not drawn: no next-action card, no PRD card, no Linked chip', !!pk && pk.nb === 0 && pk.wt === 0 && pk.lk.length === 0, JSON.stringify(pk && [pk.nb, pk.wt, pk.lk]));
150
- ok('B1 the ask box says the answer lands in Home and when Jira was read', !!pk && /^Answer lands in HomeJira 6 days ago$/.test(pk.ask), pk && pk.ask);
150
+ ok('B1 the ask box says the answer lands in Home and when Jira was read', !!pk && /^Answer lands in HomeJira \d+ days? ago$/.test(pk.ask), pk && pk.ask);
151
151
  const n0 = R.posts.length; await q.click('#peek [data-pk="jira"]');
152
152
  ok('B1 the refresh in the ask box reads Jira again through the Jira source\'s own refresh, and says so', await until(() => R.posts.slice(n0).some((x) => x.path === '/api/sources/refresh' && x.body.source === 'jira' && x.body.ws === 'w1')) && await until(() => q.evaluate(() => /Reading Jira again/.test(document.querySelector('#bdToast').textContent))), JSON.stringify(R.posts.slice(n0)));
153
153
  await q.click('#peek .pk-jt[data-tk="SSO-12"]');
@@ -98,6 +98,8 @@ const sh = (cwd, args) => spawnSync('git', args, { cwd, encoding: 'utf8' });
98
98
  const ctx = await browser.newContext({ viewport: { width: w, height: h } });
99
99
  const page = await ctx.newPage(); const errors = [];
100
100
  page.on('pageerror', (e) => errors.push(String(e.message || e)));
101
+ // the greeting is a morning card (the evening shows the day's recap instead): the page reads a fixed morning clock
102
+ const am = new Date(); am.setHours(10, 0, 0, 0); await page.clock.setFixedTime(am);
101
103
  await page.goto(BASE + '/premium.html?theme=' + theme, { waitUntil: 'domcontentloaded' });
102
104
  await page.waitForSelector('#hmList .hm-r[data-id^="n:src:"]', { state: 'attached', timeout: 60000 });
103
105
  return { ctx, page, errors };
@@ -64,6 +64,9 @@ const vw = () => { const v = document.querySelector('#czViewer:not([hidden])');
64
64
  await page.route('**/api/briefing-premium/thread**', json({ ok: true, turns: [], working: false }));
65
65
  if (mock) for (const act of ['decide', 'put-off', 'return', 'start']) await page.route('**/api/briefing-premium/' + act + '*', json({ ok: true, session: 's-new' }));
66
66
  if (mock) await page.route('**/api/agent/start*', json({ ok: true, session: 's-new', id: 's-new' })); // Start opens a real agent session: answered here
67
+ // Home's card depends on the hour (the evening shows the day's recap, not the greeting): the page reads a fixed morning clock, so
68
+ // the suite gives the same answer at any time of day
69
+ const am = new Date(); am.setHours(10, 0, 0, 0); await page.clock.setFixedTime(am);
67
70
  await page.goto(BASE + '/premium.html?theme=' + theme);
68
71
  const up = await until(() => page.evaluate((sel) => document.querySelectorAll(sel).length > 0 || /could not read/.test((document.querySelector('#hmList') || {}).textContent || ''), NEEDS), 20000);
69
72
  return { ctx, page, errors, reqs, posts, up };
@@ -1,4 +1,16 @@
1
1
  [
2
+ {
3
+ "v": "0.401.0",
4
+ "at": "2026-10-23T23:36:01.429Z",
5
+ "f": 2,
6
+ "prs": [
7
+ {
8
+ "n": 1025,
9
+ "t": "Testing fixes round 2 (Home list, one chat box, newest-first chat, Draft it)",
10
+ "s": "Testing fixes round 2 (Home list, one chat box, newest-first chat, Draft it)"
11
+ }
12
+ ]
13
+ },
2
14
  {
3
15
  "v": "0.400.0",
4
16
  "at": "2026-10-23T13:50:38.397Z",
@@ -15,7 +15,7 @@ Home is the page at `/premium.html`. It follows the Agreed design and the "Uncov
15
15
  - Each next step sits under its **initiative**. An initiative where the next step is yours comes first and shows **your turn**. The first one is open. Press an initiative to open or close it.
16
16
  - **Not in an initiative** holds only the items that have no initiative: loose notes, mentions and meetings.
17
17
  - The greeting says how many next steps are yours today, for example "Good morning. 2 next steps are yours today."
18
- - **Today**, **Waiting**, **Kept** and **Done** are filters on the same list. There is no separate Needs you list and no Your list.
18
+ - **Kept** and **Done** are filters on the same list, on a desktop only. A phone shows the list itself. There is no Today or Waiting filter, no separate Needs you list and no Your list.
19
19
  - On Fridays, **Weekly review** at the top of the list opens four short steps.
20
20
  - The microphone in the chat box turns what you say into text. Nothing is sent until you press send.
21
21
 
@@ -56,8 +56,11 @@ Press the round button at the bottom of the page (bottom left on a desktop, bott
56
56
  There is no My work page. The list on Home is your list:
57
57
 
58
58
  - **Tasks.** An initiative shows its 3 most urgent tasks: yours first, then due today, late, and due this week. **Show N more tasks** shows the rest.
59
- - **Focus.** A chip in the list's filters opens the suggested focus items. A PM item opens alone, as its own card. Items that nobody touched are in the Weekly review.
59
+ - **Your items.** A PM item opens alone, as its own card. There is no Focus chip. Items that nobody touched are in the Weekly review.
60
60
  - **Add a task.** Press **New**, then **A task**, then choose the initiative, or **Not in an initiative**. Home has no add box that is always open.
61
+ - **Sessions.** A session row names its agent. The coloured dot beside it is its state: blue waits on you, amber may be blocked, green is running. A session PMOS started itself (a skill or a background job) shows on Home only while it works or asks you something. Once it finishes its prompt, it leaves the list.
62
+ - **One chat box.** Every conversation has the same box: **+** (attach a file, notes, the terminal, and **Link to an initiative** for a loose chat), **/** for commands, **@** inside an initiative, the To or In chip, the mic, and Send. A chat opens at its newest message.
63
+ - **Documents not written yet.** A document that does not exist yet shows **Draft it**, in its stage or ahead of it. The agent writes a draft. Nothing is issued until you read it.
61
64
  - **Meeting notes.** A decision, to-do or question that the notes caught is not a fact until you confirm it in the meeting's Replay. Home, End of the day and the evening recap do not count unconfirmed points.
62
65
 
63
66
  ## The chat
@@ -600,8 +600,8 @@ function gather(ctx, w, { level, board: boardId, id, now = Date.now() } = {}) {
600
600
 
601
601
  /** The next step of a row that is not started: draft it, propose it, or go where its source is made. Null otherwise. */
602
602
  function actOf(entry, st) {
603
- if (st === 'stale' && draftable(entry)) return { label: 'Draft it', do: 'draft' };
604
- if (st !== 'missing') return null;
603
+ if ((st === 'stale' || st === 'due') && draftable(entry)) return { label: 'Draft it', do: 'draft' };
604
+ if (st !== 'missing' && st !== 'later') return null; // a document that does not exist yet can be drafted now, in its stage or ahead of it (testing fixes)
605
605
  if (draftable(entry)) return { label: 'Draft it', do: 'draft' };
606
606
  if (entry.store && entry.by !== 'you') return { label: entry.key === 'okrs' ? 'Propose them' : 'Propose it', do: 'draft' };
607
607
  if (entry.key === 'scan') return { label: 'Run a scan', go: 'scan' };
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.400.0",
3
+ "version": "0.401.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pmos-workspace",
9
- "version": "0.400.0",
9
+ "version": "0.401.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.400.0",
3
+ "version": "0.401.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",
@@ -64,7 +64,12 @@ const json = (r, b, status = 200) => r.fulfill({ status, contentType: 'applicati
64
64
  return json(r, { ok: true, view: u.searchParams.get('view') || 'quarter', cells: [], gantt: [], no_plan: 0, strategy: [], today: DATE });
65
65
  });
66
66
  await p.goto(`${F.BASE}/premium.html?ws=${encodeURIComponent(ws)}`);
67
- if (width < 641) await until(() => p.evaluate(() => !!document.querySelector('#hmList'))); // the card is the Today card at the top of the phone's list (canvas HmPhone)
67
+ if (width < 641) {
68
+ await until(() => p.evaluate(() => !!document.querySelector('#hmList')));
69
+ // testing fixes: the card is no longer in the phone's list. It is the greeting's detail, in the Viewer: the greeting opens it,
70
+ // and in a mode with no greeting (a meeting near or live) the hm:day event does
71
+ await p.evaluate(() => { const g = document.querySelector('#hmList [data-hm-tc="cal"]'); if (g) g.click(); else dispatchEvent(new Event('hm:day')); });
72
+ }
68
73
  p.__posts = posts; p.__gets = gets; p.__errs = errs; p.__ctx = ctx;
69
74
  if (shotDir && name) p.__shot = async (suffix) => { await sleep(700); fs.mkdirSync(shotDir, { recursive: true }); await p.screenshot({ path: path.join(shotDir, `${name}-${suffix}.png`) }); };
70
75
  return p;
@@ -92,8 +92,11 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
92
92
  await tap(r, '[data-c="view"][data-k="month"]');
93
93
  ok('C6 Month reads the month and draws its grid', await until(() => C.S.gets.some((g) => /view=month/.test(g))) && await until(() => r.evaluate(() => !!document.querySelector('#czViewer .vzc-mg') && /^\w+ \d{4}$/.test(document.querySelector('#czViewer .vzc-head h2').textContent))));
94
94
  const n1 = C.S.gets.filter((g) => g.startsWith('/api/calendar-views')).length;
95
+ const head = () => r.evaluate(() => document.querySelector('#czViewer .vzc-head h2').textContent);
96
+ const m0 = await head();
95
97
  await tap(r, '[data-c="nav"][data-k="1"]');
96
- await until(() => C.S.gets.filter((g) => g.startsWith('/api/calendar-views')).length > n1);
98
+ // Today is pressed once the next month is drawn: a press while the read is in flight can land on the card being replaced
99
+ await until(async () => C.S.gets.filter((g) => g.startsWith('/api/calendar-views')).length > n1 && (await head()) !== m0);
97
100
  await tap(r, '[data-c="nav"][data-k="0"]');
98
101
  ok('C6 next and Today read again', await until(() => C.S.gets.filter((g) => g.startsWith('/api/calendar-views')).length >= n0 + 3));
99
102
  await tap(r, '[data-c="view"][data-k="week"]');
@@ -269,7 +269,7 @@ form.hm-box textarea { min-height: 48px; border: 0; background: none; resize: no
269
269
  .hm-att em { font-style: normal; color: var(--cz-ink3); white-space: nowrap; }
270
270
  .hm-ath { width: 22px; height: 22px; border-radius: 6px; object-fit: cover; margin-left: -6px; }
271
271
  .hm-att button { border: 0; background: none; cursor: pointer; width: 28px; height: 28px; border-radius: 999px; color: var(--cz-ink3); }
272
- @media (pointer: coarse), (max-width: 760px) { .hm-att button { width: 44px; height: 44px; margin: -8px -6px -8px -10px; } .hm-scope .hm-tool { width: 44px; height: 44px; } }
272
+ @media (pointer: coarse), (max-width: 760px) { .hm-att button { width: 44px; height: 44px; margin: -8px -6px -8px -10px; } .hm-tb .hm-tool { width: 44px; height: 44px; } }
273
273
  .hm-chat.hm-drop { outline: 2px dashed var(--cz-blue); outline-offset: -8px; }
274
274
  .hm-scope { display: flex; align-items: center; gap: 8px; }
275
275
  .hm-scope .sp { flex: 1; }
@@ -198,7 +198,7 @@ body.cz-home .hm-r.lr .hm-tile { width: 32px; height: 32px; }
198
198
  body.cz-home .hm-top .hm-back { display: grid; }
199
199
  body.cz-home .hm-top { background: var(--cz-card); padding: 8px 12px 4px 8px; }
200
200
  body.cz-home:not(.hm-plist) { background: var(--cz-card); }
201
- .hm-flt .dk, .hm-un { display: none; }
201
+ .hm-flt.dk, .hm-un { display: none; }
202
202
  .hm-all { display: flex; }
203
203
  body.cz-home .hm-r.lr .hm-rm, body.cz-home .hm-r.lr.kid .hm-rm { min-height: 48px; }
204
204
  .hm-tc .ut-btn, .ut-dec .ut-btn, .ut-vc .ut-btn { height: 44px; }
@@ -216,5 +216,3 @@ body.cz-home .hm-r.lr .hm-tile { width: 32px; height: 32px; }
216
216
  }
217
217
  .hm-top .hm-back { display: none; }
218
218
  /* the Focus chip beside the filters (testing fixes: it came over from the My work page) */
219
- .hm-flt .hm-fc { margin-left: auto; }
220
- .hm-flt .hm-fc em { font-style: normal; color: var(--cz-ink3); font-weight: 600; }
@@ -98,7 +98,7 @@ async function load() {
98
98
  const D = S.D;
99
99
  D.brief = brief && brief.ok && brief.model ? brief.model : null;
100
100
  D.board = board && board.ok && board.model ? board.model : null;
101
- D.sessions = ses && Array.isArray(ses.sessions) ? ses.sessions : [];
101
+ D.sessions = H.homeSessions(ses && ses.sessions);
102
102
  D.desk = desk && desk.ok ? desk : null;
103
103
  D.today = today && today.ok ? today : null;
104
104
  D.schedules = sch && Array.isArray(sch.schedules) ? sch : null;
@@ -147,7 +147,7 @@ function poll() {
147
147
  pollT = setTimeout(async () => {
148
148
  if (!document.hidden) {
149
149
  const [ses, desk] = await Promise.all([pmGet('/api/sessions'), pmGet('/api/home-desk' + wsQ())]);
150
- if (ses && Array.isArray(ses.sessions)) S.D.sessions = ses.sessions;
150
+ if (ses && Array.isArray(ses.sessions)) S.D.sessions = H.homeSessions(ses.sessions);
151
151
  if (desk && desk.ok) S.D.desk = desk;
152
152
  S.D.now = Date.now();
153
153
  drawList(); drawTop();
@@ -209,7 +209,7 @@ function homeListHtml() {
209
209
  const pins = H.needsOf(S.D).filter((r) => S.pin.has(r.key)).length;
210
210
  return TD.listHtml(M, todayModel(), {
211
211
  sel: S.sel, isOpen: open, pOpen, restOpen: (k) => S.rest.has(k), cap: S.cap, tasksOpen: (k) => S.tasks.has(k), pin: S.pin, avHtml, ready: S.ready, err: S.D.err.length ? S.D.err[0] : '',
212
- product: S.product, review: R, mic: canDictate(), sub: pins ? pins + ' pinned' : nPick || 'Each one sits under its initiative',
212
+ product: S.product, review: R, mic: canDictate(), sub: pins ? pins + ' pinned' : nPick || 'Each one sits under its initiative', phone: isPhone(),
213
213
  });
214
214
  }
215
215
 
@@ -319,9 +319,10 @@ function drawList() {
319
319
  const fh = elseHtml();
320
320
  if (ft.__h !== fh) { ft.__h = fh; ft.innerHTML = fh; }
321
321
  iniList(sc);
322
- // the first-run card after an import tops the list; the phone moment card sits after the groups
322
+ // the first-run card after an import tops the list. The phone moment card is not in the list: it is the detail of the greeting
323
+ // at the top, and opens in the Viewer when the greeting is pressed (testing fixes: in the list it took a screen of room)
323
324
  if (FST && sc.firstElementChild !== FST) sc.prepend(FST);
324
- if (PHC && sc.lastElementChild !== PHC.el) sc.append(PHC.el);
325
+ if (PHC && PHC.el.parentNode === sc) PHC.el.remove();
325
326
  document.body.classList.toggle('hm-folded', S.folded && !isPhone());
326
327
  document.body.classList.toggle('hm-plist', isPhone() && !S.phoneChat); // a phone: the list is the page until a row opens its conversation (HmPhone)
327
328
  }
@@ -921,6 +922,15 @@ async function openMeeting(m) {
921
922
  if (typeof v.openMeeting === 'function') return v.openMeeting(m.note ? { note: m.note } : m, { ws: deskWs() });
922
923
  try { const M = await import('./premium-vw-mtg.js'); return M.openMeeting(m.note ? { note: m.note } : m, { ws: deskWs() }); } catch { return VW.placeholder('Meeting', { icon: 'meet' }); }
923
924
  }
925
+ /** A phone: the greeting's detail, the moment card of the day (home-phone-card.js) in the Viewer, with the calendar one press on. */
926
+ function openMoment() {
927
+ VW.open({ id: 'moment', kind: 'Your day', title: L.greetWord(), icon: 'cal', render: (body) => {
928
+ body.append(PHC.el);
929
+ body.insertAdjacentHTML('beforeend', '<p class="ut-acts hm-mcal"><button type="button" class="ut-btn sm soft" data-hm-mcal>Open the calendar</button></p>');
930
+ body.onclick = (e) => { if (e.target.closest('[data-hm-mcal]')) openCalendar(); };
931
+ PHC.read(true);
932
+ } });
933
+ }
924
934
  async function openCalendar() {
925
935
  const v = await V();
926
936
  if (typeof v.openCalendar === 'function') return v.openCalendar({ ws: deskWs(), view: 'day' });
@@ -1051,6 +1061,8 @@ $('#hmNeeds').onclick = () => sheet(!S.sheet);
1051
1061
  // a phone: the back bar of a conversation returns to the list, which is the page (HmPhone2)
1052
1062
  // My work's "Weekly review" (home-work.js) asks Home, which holds the data the review reads
1053
1063
  addEventListener('hm:review', (e) => { e.preventDefault(); openReviewVw(); });
1064
+ // a phone: the day's moment card opens on the greeting's press, and on this event from any other place that asks for the day
1065
+ addEventListener('hm:day', () => { if (isPhone() && PHC) openMoment(); });
1054
1066
  $('#hmBack').onclick = () => { S.phoneChat = false; S.sel = null; drawList(); syncUrl(); const f = $('#hmList .hm-rm'); if (f) f.focus(); };
1055
1067
  $('#hmMoreP').onclick = (e) => moreMenu(e.currentTarget);
1056
1068
  $('#hmDesk').onclick = (e) => { if (S.sheet && e.target === $('#hmDesk')) sheet(false); }; // a press beside the sheet closes it; Escape and the N need you button do too
@@ -1068,10 +1080,9 @@ $('#hmList').onclick = (e) => { // delegated: every press on the list is a <bu
1068
1080
  if ('hmProd' in d) { goIni('product'); return; }
1069
1081
  if (d.hmTasks) { if (S.tasks.has(d.hmTasks)) S.tasks.delete(d.hmTasks); else S.tasks.add(d.hmTasks); drawList(); return; }
1070
1082
  if (d.hmRest) { if (S.rest.has(d.hmRest)) S.rest.delete(d.hmRest); else S.rest.add(d.hmRest); drawList(); return; }
1071
- if (d.hmFilter) { S.filter = d.hmFilter; drawList(); const f = $(`#hmList [data-hm-filter="${d.hmFilter}"]`); if (f) f.focus(); return; }
1083
+ if (d.hmFilter) { S.filter = S.filter === d.hmFilter ? 'today' : d.hmFilter; drawList(); const f = $(`#hmList [data-hm-filter="${d.hmFilter}"]`); if (f) f.focus(); return; }
1072
1084
  if (d.hmCheck) { checkRow(d.hmCheck); return; }
1073
1085
  if ('hmReview' in d) { openReviewVw(); return; }
1074
- if ('hmFocus' in d) { import('./home-work.js').then((M) => M.openFocus()); return; }
1075
1086
  if ('hmPick' in d) { pickProduct(b); return; }
1076
1087
  if ('hmCapmic' in d) { const i = $('#hmCap'); if (i) capMic(i, b); return; }
1077
1088
  if (d.hmTc) { todayPress(d.hmTc, b); return; }
@@ -1117,7 +1128,7 @@ function capMic(input, b) {
1117
1128
  /* the Today card's presses (HmDay, HmMic): the calendar, the meeting's prep, the live meeting, the recording, the end of the day */
1118
1129
  async function todayPress(k, b) {
1119
1130
  const T = todayModel();
1120
- if (k === 'cal') { openCalendar(); return; }
1131
+ if (k === 'cal') { if (isPhone() && PHC) openMoment(); else openCalendar(); return; }
1121
1132
  if ((k === 'prep' || k === 'open') && T.meeting) { openMeeting(T.meeting); return; }
1122
1133
  if (k === 'record') { MORE.openRecorder().then(() => drawList()); return; }
1123
1134
  if (k === 'hl') { const r = REC && await REC.highlight(); toast(r && r.ok ? 'Highlighting the last 30 seconds and the next ones.' : (r && r.error) || 'The highlight did not start.'); return; }
@@ -3,9 +3,8 @@
3
3
  * No header on the docked desk. The stream: the role's avatar and name over each agent message with Copy, Retry and Make a work-item; the
4
4
  * PM's bubbles with "You · HH:MM"; "Worked …" folds (under the message that asks, while it asks); a Today divider; "New since you left"; "N earlier messages · show"; the agent's step
5
5
  * checklist while it works (from its own TodoWrite list); a permission card with the change before → after, Allow and Deny. Over the box: the
6
- * run strip with Stop, and "Also waiting on you". Two boxes: the basic one on Home (In: chip above, → send, the hint under it) and the rich
7
- * one in an initiative (+, /, @, the In:/To: chip, the key hint, ↑ send). The + menu holds Attach a file, and the Notes and the terminal of
8
- * the conversation.
6
+ * run strip with Stop, and "Also waiting on you". One box for every conversation (+, /, @ in an initiative, the In:/To: chip, the key hint,
7
+ * ↑ send). The + menu holds Attach a file, the Notes and the terminal of the conversation, and Link to an initiative for a loose session.
9
8
  * The mic is part of the input (canvas HmMic): press it and speak, the words appear as text in the box with a small blue dot while it
10
9
  * listens, press it again to stop, edit, send. On a phone it opens the "Speak to Claude" sheet (HmPhone): Discard, or stop and send.
11
10
  * Nothing is saved as audio (home-dictate.js). A card the target brings (intro.card, the decision card of HmDecide) draws under the intro.
@@ -53,7 +52,10 @@ export function mountChat(el, host) {
53
52
  const log = el.querySelector('#hmLog'), foot = el.querySelector('#hmFoot'), reopen = el.querySelector('#hmReopen');
54
53
  loadSlash(host.pmGet).then(() => { if (el.querySelector('#hmSlash:not([hidden])')) drawSlash(); });
55
54
  // when a hidden log is shown (the phone's chat over the list), a jump still owed is made then
56
- if (typeof ResizeObserver === 'function') new ResizeObserver(() => { if (C.jump && log.clientHeight) { log.scrollTop = log.scrollHeight; if (C.conv) C.jump = false; } }).observe(log);
55
+ // On a phone the chat is the page: the log grows and the page scrolls, so "the end" is the page's end (testing fixes: a chat opened at its oldest message)
56
+ const pageScrolls = () => log.scrollHeight <= log.clientHeight + 1;
57
+ const toEnd = () => { log.scrollTop = log.scrollHeight; if (log.clientHeight && pageScrolls()) { const se = document.scrollingElement || document.documentElement; se.scrollTop = se.scrollHeight; } };
58
+ if (typeof ResizeObserver === 'function') new ResizeObserver(() => { if (C.jump && log.clientHeight) { toEnd(); if (C.conv) C.jump = false; } }).observe(log);
57
59
  reopen.onclick = () => host.reopenViewer();
58
60
  // the foot's height, for the place menu's button on a phone: it sits just above the box and its bars (cozy-home.css --hm-foot-h)
59
61
  if (typeof ResizeObserver === 'function') new ResizeObserver(() => document.body.style.setProperty('--bd-hmfoot', Math.round(foot.getBoundingClientRect().height) + 'px')).observe(foot);
@@ -172,7 +174,8 @@ export function mountChat(el, host) {
172
174
  R.waiting = !!C.conv && !C.conv.ask && C.conv.turn !== 'agent' && C.conv.turn !== 'tool';
173
175
  const ctx = new Map(turnsOf(msgs, R.waiting || (C.conv && C.conv.state === 'ended')).filter((x) => x.done).map((x) => [x.at, x.items]));
174
176
  R.chips = (mi) => (ctx.get(mi) ? chipsOf(ctx.get(mi)) : '');
175
- const atEnd = log.scrollHeight - log.scrollTop - log.clientHeight < 80;
177
+ const se = document.scrollingElement || document.documentElement;
178
+ const atEnd = pageScrolls() ? se.scrollHeight - se.scrollTop - innerHeight < 80 : log.scrollHeight - log.scrollTop - log.clientHeight < 80;
176
179
  const goal = C.th && C.th.goal;
177
180
  let html = (t.intro && !(t.intro.onlyEmpty && items.length) ? introHtml(t.intro) : '') + items.map((it, i) => msgHtml(it, i, R)).join('') + (goalProgressHtml(goal) ? goalChipHtml(goal) : '') + liveHtml(R) + askHtml(R) + queuedHtml();
178
181
  if (C.th && C.th.working) html += `<p class="hm-note" role="status">The agent is answering. You can write again when it has.</p>`;
@@ -182,7 +185,7 @@ export function mountChat(el, host) {
182
185
  C.items = items;
183
186
  // a session opens at its latest message: the jump waits until the conversation is read and the log is shown (on a phone the chat
184
187
  // can be drawn while hidden, where scrollTop does nothing and the session then opened at the top)
185
- if (atEnd || C.jump) { log.scrollTop = log.scrollHeight; if (C.conv && log.clientHeight) C.jump = false; }
188
+ if (atEnd || C.jump) { toEnd(); if (C.conv && log.clientHeight) C.jump = false; }
186
189
  drawFoot(R);
187
190
  reopen.hidden = !host.viewerClosed();
188
191
  // the PM has seen what is here now
@@ -274,27 +277,23 @@ export function mountChat(el, host) {
274
277
  const mic = canDictate() ? `<button type="button" class="ut-mic${on ? ' on' : ''}" data-hm-mic aria-pressed="${on}" aria-label="${on ? 'Stop listening' : C.spoke ? 'Speak more' : 'Speak instead of typing'}" title="${on ? 'Stop listening' : 'Speak instead of typing'}">${SVG(on ? SQ : MIC, on ? 12 : 18)}</button>` : '';
275
278
  const dot = on ? '<span class="ut-live" role="status"><span class="ut-rec b" aria-hidden="true"></span><span class="vh">Listening</span></span>' : '';
276
279
  const attach = t.key ? '<button type="button" role="menuitem" data-hm-file><b>Attach a file</b><em>Or paste or drop it on the conversation</em></button>' : '';
277
- const addOpen = !!C.addOpen && !!(attach || notesBtn || term);
278
- const add = attach || notesBtn || term ? `<span class="hm-mw hm-addw"><button type="button" class="hm-tool" id="hmAdd" data-hm-add aria-haspopup="menu" aria-expanded="${addOpen}" aria-label="${t.key ? 'Attach a file, notes and more' : 'More'}" title="${t.key ? 'Attach a file' : 'More'}">${SVG(PLUS)}</button>`
279
- + `<span class="hm-pmenu hm-addm" role="menu" aria-label="Add"${addOpen ? ' data-esc-layer' : ' hidden'}>${attach}${notesBtn}${term}</span>${t.key ? '<input type="file" id="hmFile" multiple hidden>' : ''}</span>` : '';
280
- let html;
281
- if (t.rich) {
282
- const wait = C.conv && C.conv.ask && t.also ? `<button type="button" class="hm-chip" data-hm-also><i class="dot" aria-hidden="true"></i><span>1 more next step</span></button>` : '';
283
- const to = t.to && !wait ? `<button type="button" class="hm-chip to" data-hm-to aria-label="Who reads this: ${esc(t.to.name)}. Change">${avHtml(t.to, 20)}<span>To: ${esc(t.to.name)}</span></button>` : '';
284
- const scope = !to && !wait ? `<button type="button" class="hm-chip" data-hm-scope aria-label="Where this goes: ${esc(sc.text)}. Change" title="Where this goes: ${esc(sc.text)}">${SVG(sc.icon, 14)}<span>In: ${esc(sc.text)}</span></button>` : '';
285
- html = `${also}${strip}<form class="hm-box${on ? ' ut-on' : ''}" id="hmForm">${dot}<textarea id="hmIn" rows="1" aria-label="A message for ${esc(R.role.name)}" placeholder="${esc(ph)}"></textarea>`
286
- + `<div class="hm-tb">${add}`
287
- + `<button type="button" class="hm-tool" data-hm-slash aria-label="Commands" title="Commands"><b>/</b></button><button type="button" class="hm-tool" data-hm-at aria-label="Choose which conversation reads this" title="Send to another session of this initiative"><b>@</b></button>`
288
- + to + wait + scope + `<span class="sp"></span>${host.viewerClosed() ? '<span class="hm-key">Enter sends · Shift+Enter for a new line</span>' : ''}`
289
- + `${mic}<button type="submit" class="hm-send" aria-label="Send" title="Send">${SVG(UP, 18)}</button></div>`
290
- + filesRow()
291
- + '</form>';
292
- } else {
293
- html = `${also}${strip}<div class="hm-scope"><button type="button" class="hm-chip${sc.loose ? ' loose' : ''}" data-hm-scope aria-label="Where this goes: ${esc(sc.text)}. Change" title="Where this goes: ${esc(sc.text)}">${SVG(sc.icon, 14)}<span>In: ${esc(sc.text)}</span>${SVG(DOWN, 12)}</button>`
294
- + (sc.loose && t.sid ? '<button type="button" class="hm-link" data-hm-link>Link to an initiative</button>' : '') + `<span class="sp"></span>${add}</div>`
295
- + filesRow() + `<form class="hm-basic${on ? ' ut-on' : ''}" id="hmForm">${dot}<textarea id="hmIn" rows="1" aria-label="A message for Claude" placeholder="${esc(ph)}"></textarea>${mic}<button type="submit" class="hm-go" aria-label="Send to Claude" title="Send">${SVG(ARROW, 18)}</button></form>`
296
- + '<p class="hm-hint">It works in a real Claude Code session: it can read, change files, run commands and take slash commands.</p>';
297
- }
280
+ // One box everywhere (testing fixes: a loose chat and an initiative's chat drew two different boxes): +, / and @ (in an initiative), the
281
+ // To: or In: chip, the mic and ↑ send. A loose session's "Link to an initiative" is in the + menu, and no hint line repeats under the box.
282
+ const link = sc.loose && t.sid ? '<button type="button" role="menuitem" data-hm-link><b>Link to an initiative</b><em>Move this chat under one</em></button>' : '';
283
+ const addOpen = !!C.addOpen && !!(attach || notesBtn || term || link);
284
+ const add = attach || notesBtn || term || link ? `<span class="hm-mw hm-addw"><button type="button" class="hm-tool" id="hmAdd" data-hm-add aria-haspopup="menu" aria-expanded="${addOpen}" aria-label="${t.key ? 'Attach a file, notes and more' : 'More'}" title="${t.key ? 'Attach a file' : 'More'}">${SVG(PLUS)}</button>`
285
+ + `<span class="hm-pmenu hm-addm" role="menu" aria-label="Add"${addOpen ? ' data-esc-layer' : ' hidden'}>${attach}${notesBtn}${term}${link}</span>${t.key ? '<input type="file" id="hmFile" multiple hidden>' : ''}</span>` : '';
286
+ const wait = C.conv && C.conv.ask && t.also ? `<button type="button" class="hm-chip" data-hm-also><i class="dot" aria-hidden="true"></i><span>1 more next step</span></button>` : '';
287
+ const to = t.to && !wait ? `<button type="button" class="hm-chip to" data-hm-to aria-label="Who reads this: ${esc(t.to.name)}. Change">${avHtml(t.to, 20)}<span>To: ${esc(t.to.name)}</span></button>` : '';
288
+ const scope = !to && !wait ? `<button type="button" class="hm-chip${sc.loose ? ' loose' : ''}" data-hm-scope aria-label="Where this goes: ${esc(sc.text)}. Change" title="Where this goes: ${esc(sc.text)}">${SVG(sc.icon, 14)}<span>In: ${esc(sc.text)}</span></button>` : '';
289
+ const at = t.ini ? '<button type="button" class="hm-tool" data-hm-at aria-label="Choose which conversation reads this" title="Send to another session of this initiative"><b>@</b></button>' : '';
290
+ const html = `${also}${strip}<form class="hm-box${on ? ' ut-on' : ''}" id="hmForm">${dot}<textarea id="hmIn" rows="1" aria-label="A message for ${esc(R.role.name)}" placeholder="${esc(ph)}"></textarea>`
291
+ + `<div class="hm-tb">${add}`
292
+ + `<button type="button" class="hm-tool" data-hm-slash aria-label="Commands" title="Commands"><b>/</b></button>${at}`
293
+ + to + wait + scope + `<span class="sp"></span>${host.viewerClosed() ? '<span class="hm-key">Enter sends · Shift+Enter for a new line</span>' : ''}`
294
+ + `${mic}<button type="submit" class="hm-send" aria-label="Send" title="Send">${SVG(UP, 18)}</button></div>`
295
+ + filesRow()
296
+ + '</form>';
298
297
  if (foot.__h !== html) {
299
298
  const focused = document.activeElement && document.activeElement.id === 'hmIn';
300
299
  foot.__h = html; foot.innerHTML = html;
@@ -400,7 +399,7 @@ export function mountChat(el, host) {
400
399
  if ('hmAlso' in d) { if (C.t.also && C.t.also.go) C.t.also.go(); return; }
401
400
  if ('hmNotes' in d) { openNotesHere(); return; }
402
401
  if ('hmScope' in d) { host.onScope(b); return; }
403
- if ('hmLink' in d) { host.onLink(b, C.t); return; }
402
+ if ('hmLink' in d) { host.onLink(foot.querySelector('#hmAdd') || b, C.t); return; } // the + menu has closed: the list opens from the +
404
403
  if ('hmTo' in d || 'hmAt' in d) { host.onTo(b, C.t); return; }
405
404
  if ('hmSlash' in d) { const ta = foot.querySelector('textarea'); if (!ta.value.startsWith('/')) ta.value = '/' + ta.value; ta.focus(); drawSlash(); return; }
406
405
  if (d.hmUnfile) {
@@ -60,8 +60,14 @@ export function sessionRow(s, roles) {
60
60
  const st = stateOf(s);
61
61
  const name = s.hx && s.hx.title ? s.hx.title : s.name || 'Session';
62
62
  return { id: 's:' + s.id, kind: 'session', sid: s.id, key: keyOfSession(s), ini: iniOfSession(s), name, state: st, initial: role.initial, role,
63
- hint: role.name + ' · ' + (s.label || (st === 'working' ? 'Running' : st === 'needs' ? 'Ready for you' : 'Idle')), icon: 'chat', created: s.created || '' };
63
+ hint: role.name, icon: 'chat', created: s.created || '' }; // the state is the dot beside the row, not a word (testing fixes)
64
64
  }
65
+ /** The sessions as Home reads them. A session PMOS started (a skill, a background job) reads 'needs' as soon as its prompt is done:
66
+ * its turn ending asks nothing of the PM, so it is a finished run, quiet, and never a row that waits on the PM (testing fixes).
67
+ * A permission prompt ('blocked') still is. */
68
+ // A session PMOS started itself shows on Home only while it works or asks the PM something (a permission or a question): one that
69
+ // finished its prompt is not shown at all (testing fixes; Wawan on the canvas, 2026-10-23)
70
+ export const homeSessions = (list) => (Array.isArray(list) ? list : []).filter((s) => !(s && s.automatic && ['needs', 'quiet', 'exited'].includes(s.shown) && !s.ask));
65
71
 
66
72
  /* ── needs you ── */
67
73
  const NEED_ICON = { decision: 'gate', blocked: 'warn', waited: 'clock', src: 'doc', ev: 'gate' };
@@ -255,7 +255,7 @@ function docRowHtml(d, cur, later) {
255
255
  const meta = [d.when, d.by, d.link ? d.link.kind : ''].filter(Boolean).join(' · ') || d.what;
256
256
  return `<div class="hi-drow${d.look ? ' look' : ''}" data-ov-doc="${esc(d.key)}">`
257
257
  + `<button type="button" class="hi-dmain" ${open} aria-label="${d.path ? 'Open ' : ''}${esc(d.title)}"><span class="hi-dic">${SVG(I.doc, 16)}</span><span class="hi-dtx"><b>${esc(d.title)}</b> <span class="hi-k">· ${esc(d.kind)}${d.core ? ' · core' : ''}</span><em>${esc(meta)}</em>${d.link ? `<small>${esc(d.link.kind + ': ' + d.link.url)}</small>` : ''}</span></button>`
258
- + (d.act && d.act.kind === 'draft' && !d.running && d.st === 'missing' ? `<button type="button" class="hi-btn sm" data-ov-draft="${esc(d.key)}">Draft it</button>` : `<span class="hi-pill ${pc}">${esc(pt)}</span>`) + '</div>';
258
+ + (d.act && d.act.kind === 'draft' && !d.running && !d.path && d.st !== 'stale' ? `<button type="button" class="hi-btn sm" data-ov-draft="${esc(d.key)}">Draft it</button>` : `<span class="hi-pill ${pc}">${esc(pt)}</span>`) + '</div>';
259
259
  }
260
260
  function docsView(id, M) {
261
261
  const rows = MD.docRows(M), cur = MD.phaseOf(M.acts && M.acts.stage);
@@ -5,7 +5,7 @@
5
5
  * grouped by product. This file turns what the routes answer into what the list draws, and touches no page, so a node test imports it:
6
6
  * productsOf(D) the products the list shows: the board's own first, then every product Home reads (GET /api/briefing-premium products)
7
7
  * and every product a next step names; each with its goals line ("2 of 4 goals on track")
8
- * homeList(D, o) { greet, yours, filters, groups, untouched, focus, filter } for the list column
8
+ * homeList(D, o) { greet, yours, filters, groups, untouched, filter } for the list column
9
9
  * todayCard(D, o) the Today card through the day: day (greeting and the day's load), soon (a meeting in 15 minutes or less), live
10
10
  * (a meeting on now), rec (a recording that is no calendar meeting), eod (the end of a day with something open), clear
11
11
  * staleInis(D, now, days) open initiatives with no change for `days` days or more, the longest first
@@ -114,7 +114,7 @@ function iniRowOf(D, r, needs, now) {
114
114
 
115
115
  /* ── the list ── */
116
116
  const sameName = (a, b) => String(a || '').toLowerCase() === String(b || '').toLowerCase();
117
- /** o: { filter ('today' | 'waiting' | 'kept' | 'done'), product (a product key, or null for all), now } */
117
+ /** o: { filter ('today' | 'kept' | 'done'), product (a product key, or null for all), now } */
118
118
  export function homeList(D, o = {}) {
119
119
  const now = o.now || D.now || Date.now();
120
120
  const needs = needsOf(D);
@@ -124,9 +124,8 @@ export function homeList(D, o = {}) {
124
124
  const W = D.work || null;
125
125
  const tab = (k) => ((W && W.queue && W.queue.tabs) || []).find((t) => t.key === k) || null;
126
126
  const tabRows = (k) => { const t = tab(k); return t ? t.groups.flatMap((g) => g.rows || []) : []; };
127
+ // Kept and Done only (testing fixes: no Today or Waiting chip; the list is Today unless one of these two is on, and pressing it again goes back)
127
128
  const filters = [
128
- { key: 'today', label: 'Today' },
129
- { key: 'waiting', label: 'Waiting', n: W && W.waiting ? W.waiting.rows.length : 0 },
130
129
  { key: 'kept', label: 'Kept', n: (tab('kept') || {}).n || 0 },
131
130
  { key: 'done', label: 'Done' },
132
131
  ];
@@ -156,7 +155,7 @@ export function homeList(D, o = {}) {
156
155
  const looseNeeds = needs.filter((x) => !used.has(x.id) && !(x.ini && groups.some((g) => g.inis.concat(g.rest).some((i) => i.ini === x.ini))));
157
156
  const loose = [];
158
157
  for (const x of looseNeeds) loose.push({ ...x, flat: true });
159
- for (const r of tabRows('today')) loose.push({ id: 'w:' + r.key, kind: 'item', key: r.key, name: r.title, hint: [r.overdue ? 'late' : '', r.sub ? r.sub.replace(/^Yours\b/, 'your own note') : 'your own note'].filter(Boolean).join(' · '), check: true, item: r });
158
+ for (const r of tabRows('today')) loose.push({ id: 'w:' + r.key, kind: 'item', key: r.key, name: r.title, hint: [r.overdue ? 'late' : '', String(r.sub || '').replace(/^Yours\b\s*(·\s*)?/, '')].filter(Boolean).join(' · '), check: true, item: r }); // the check box says it is the PM's own: no "your own note" on every row (testing fixes)
160
159
  const inIni = new Set(groups.flatMap((g) => g.inis.concat(g.rest)).map((i) => i.ini));
161
160
  for (const m of mentionsOf(D).filter((x) => !(x.initiative && inIni.has(x.initiative)))) loose.push(mentionRow(m, null));
162
161
  for (const m of todayOf(D).filter((x) => !meetIni(x) && x.state !== 'past')) loose.push(meetRow(m, null));
@@ -166,7 +165,6 @@ export function homeList(D, o = {}) {
166
165
  const untouched = { n: stale.length + ((W && W.review && W.review.n) || 0), inis: stale.length, items: (W && W.review && W.review.n) || 0, day: new Date(now).getDay() === REVIEW_DAY ? 'today' : 'Fri' };
167
166
  // a filter other than Today shows one plain list from the PM's own list (the items carry no initiative)
168
167
  let list = null;
169
- if (o.filter === 'waiting') list = { title: 'Waiting on others', rows: (W && W.waiting ? W.waiting.rows : []).map((r) => ({ id: 'w:' + r.key, kind: 'item', key: r.key, name: r.title, hint: r.sub || '', state: 'wait', item: r })), empty: 'Nobody owes you anything.' };
170
168
  if (o.filter === 'kept') list = { title: 'Kept for later', rows: tabRows('kept').map((r) => ({ id: 'w:' + r.key, kind: 'item', key: r.key, name: r.title, hint: r.sub || '', check: true, item: r })), empty: 'Nothing is kept for later.' };
171
169
  if (o.filter === 'done') {
172
170
  const done = tabRows('done').map((r) => ({ id: 'w:' + r.key, kind: 'item', key: r.key, name: r.title, hint: r.sub || 'Done', done: true, item: r }));
@@ -176,10 +174,7 @@ export function homeList(D, o = {}) {
176
174
  }
177
175
  const yours = needs.length + mentionsOf(D).filter((m) => m.initiative && groups.some((g) => g.inis.concat(g.rest || []).some((i) => i.ini === m.initiative))).length;
178
176
  const nIni = groups.filter((g) => g.kind === 'product').reduce((n, g) => n + g.count, 0);
179
- // Focus (my-work-premium's focus): the suggestions left for today, else what the PM accepted; null when there is neither
180
- const F = W && W.focus, sug = (F && F.suggestions) || [], acc = (F && F.accepted) || [];
181
- const focus = sug.length || acc.length ? { suggested: sug.length, accepted: acc.length, title: sug.length ? sug[0].title + (sug[0].why ? ' · ' + sug[0].why : '') : acc.map((x) => x.title).join(' · ') } : null;
182
- return { yours, greet: greeting(yours, now), products, primary, filters, filter: o.filter || 'today', groups, list, untouched, focus,
177
+ return { yours, greet: greeting(yours, now), products, primary, filters, filter: o.filter || 'today', groups, list, untouched,
183
178
  counts: { products: products.length, initiatives: nIni } };
184
179
  }
185
180
 
@@ -111,7 +111,7 @@ export function todayHtml(T, o) {
111
111
  const L = T.load || { segs: [] };
112
112
  const sub = L.n ? L.sub : o.sub;
113
113
  const bar = L.segs.length ? `<span class="hm-load" aria-hidden="true">${L.segs.map((s) => `<i class="${s.m ? 'm' : ''}${s.now ? ' n' : ''}" data-f="${Math.max(1, s.flex)}"></i>`).join('')}</span><span class="hm-lx" aria-hidden="true"><span>09</span><span>12</span><span>15</span><span>18</span></span>` : '';
114
- return `<button type="button" class="hm-tc day" data-hm-tc="cal" aria-label="${esc(o.greet)} ${esc(sub)}. Open the calendar"><b class="big">${esc(o.greet)}</b><span class="sub">${esc(sub)}</span>${bar}</button>`;
114
+ return `<button type="button" class="hm-tc day" data-hm-tc="cal" aria-label="${esc(o.greet)} ${esc(sub)}. ${o.phone ? 'Open your day' : 'Open the calendar'}"><b class="big">${esc(o.greet)}</b><span class="sub">${esc(sub)}</span>${bar}</button>`;
115
115
  }
116
116
 
117
117
  /* ── the whole column ── */
@@ -122,10 +122,9 @@ export function listHtml(M, T, o) {
122
122
  const head = `<div class="hm-hd"><h1>Today</h1>`
123
123
  + (many ? `<button type="button" class="cz-pick hm-pk" data-hm-pick aria-haspopup="menu" aria-expanded="false">${esc(picked ? picked.name : 'All products')} ${svg(P.chevD, 14)}</button><button type="button" class="ut-ib" data-hm-new aria-haspopup="menu" aria-label="New" title="New">${svg(P.plus, 16)}</button>`
124
124
  : `<button type="button" class="hm-new" data-hm-new aria-haspopup="menu">${svg(P.plus, 14)}New</button>`) + '</div>';
125
- const card = todayHtml(T, { greet: M.greet, sub: o.sub });
126
- // Focus (once on the My work page): the agent's suggested focus for today, or what the PM accepted; it opens Focus and jobs
127
- const fc = M.focus && (M.focus.suggested || M.focus.accepted) ? `<button type="button" class="cz-chip gh hm-fc" data-hm-focus aria-label="Focus and jobs: ${esc(M.focus.title)}" title="${esc(M.focus.title)}">Focus <em>${M.focus.suggested ? M.focus.suggested + ' suggested' : M.focus.accepted + ' in focus'}</em></button>` : '';
128
- const flt = `<div class="hm-flt" role="group" aria-label="Show">${M.filters.map((f, i) => `<button type="button" class="cz-chip${f.key === M.filter ? ' on' : ' gh'}${i > 1 ? ' dk' : ''}" data-hm-filter="${f.key}" aria-pressed="${f.key === M.filter}">${esc(f.label)}${f.n ? ' ' + f.n : ''}</button>`).join('')}${fc}</div>`;
125
+ const card = todayHtml(T, { greet: M.greet, sub: o.sub, phone: o.phone });
126
+ // Kept and Done, on a desktop only: a phone shows the list itself (testing fixes)
127
+ const flt = `<div class="hm-flt dk" role="group" aria-label="Show">${M.filters.map((f) => `<button type="button" class="cz-chip${f.key === M.filter ? ' on' : ' gh'}" data-hm-filter="${f.key}" aria-pressed="${f.key === M.filter}">${esc(f.label)}${f.n ? ' ' + f.n : ''}</button>`).join('')}</div>`;
129
128
  if (!o.ready) return head + card + '<p class="hm-none" role="status">Reading your work.</p>';
130
129
  const errLine = `<p class="hm-none" role="status">Home could not read the repository: ${esc(o.err)}.</p>`;
131
130
  if (o.err && !M.groups.some((g) => (g.kind === 'product' && g.count) || (g.rows && g.rows.length))) return head + card + errLine;
@@ -1,5 +1,5 @@
1
1
  /* pm/home-work.js — My work in the Home Viewer. Since the testing fixes it opens only alone (solo): an item's card from a row of Home's list
2
- * (openWorkItem) and Focus and jobs from the Focus chip (openFocus); Home's list is the list, so the tabbed page is not reachable from Home. (initiative premium-uncovered-features, H1; canvas HmMyWork; the depth of premium-work-depth).
2
+ * (openWorkItem). Home has no Focus chip since the testing fixes, so Focus and jobs is not reachable from Home either; Home's list is the list, so the tabbed page is not reachable from Home. (initiative premium-uncovered-features, H1; canvas HmMyWork; the depth of premium-work-depth).
3
3
  * There is no separate list on Home: a task sits under its initiative, and the PM's own notes sit under "Not in an initiative". This card is
4
4
  * the depth behind those rows. It reads GET /api/my-work-premium (lib/my-work-premium.js builds the model) and keeps every feature of the
5
5
  * old My work page usable:
@@ -543,8 +543,6 @@ export function openMyWork(tab = 'yours', o = {}) {
543
543
 
544
544
  /** Open one of the PM's own items (a note, a mention made into a task) as its card, from a row of Home's list: key "work:<id>". */
545
545
  export function openWorkItem(key) { return openMyWork('yours', { item: key, solo: true }); }
546
- /** Focus and jobs alone, from the Focus chip of Home's list (My work is no longer a page of its own). */
547
- export function openFocus() { return openMyWork('yours', { view: 'fjobs', solo: true }); }
548
546
  /* The weekly review lives on Home (home-review.js needs Home's data): Home answers the hm:review event. Elsewhere the old summary shows. */
549
547
  function askReview() {
550
548
  if (typeof CustomEvent !== 'function') return false;
@@ -23,3 +23,9 @@
23
23
  .vwi .vwi-go,.vwi .vwi-p a{color:var(--ink);font-weight:500;text-decoration:underline;text-underline-offset:3px;display:inline-flex;align-items:center;min-height:44px}
24
24
  .vwi-open{margin:14px 0 0}
25
25
  .vwi-open .dmcta{min-height:44px}
26
+ /* in the cozy Viewer (Home), where premium.css is not loaded: the facts are a two-column list, and the card keeps its gutter (testing fixes) */
27
+ .vwi .kv2{display:grid;grid-template-columns:minmax(96px,auto) minmax(0,1fr);gap:8px 18px;font-size:var(--fs-3);margin:6px 0}
28
+ .vwi .kv2 span:nth-child(odd){color:var(--ink-3)}
29
+ .vwi .kv2 span:nth-child(even){color:var(--ink);font-weight:500;line-height:1.5;overflow-wrap:anywhere}
30
+ .cz-vw-body>.vwi{padding:16px 20px 24px}
31
+ .cz-vw-body>.vwi>.vwi-head{display:none} /* the Viewer header already names it */
@@ -39,6 +39,7 @@
39
39
  "briefing-premium-agent.test.js",
40
40
  "goal-chat.test.js",
41
41
  "phone-day.test.js",
42
+ "home-sessions.test.js",
42
43
  "chat-ask.test.js",
43
44
  "chat-md.test.js",
44
45
  "md-table.test.js",