create-pmos 0.362.0 → 0.364.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 (48) hide show
  1. package/package.json +35 -25
  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/briefing-premium-board-test.js +6 -6
  7. package/workspace/briefing-premium-calendar-2-test.js +3 -3
  8. package/workspace/briefing-premium-calendar-3-test.js +6 -5
  9. package/workspace/briefing-premium-calendar-test.js +3 -2
  10. package/workspace/briefing-premium-initiative-test.js +6 -5
  11. package/workspace/briefing-premium-insights-test.js +1 -1
  12. package/workspace/briefing-premium-test.js +65 -58
  13. package/workspace/briefing-premium-work-test.js +1 -1
  14. package/workspace/changelog.json +34 -0
  15. package/workspace/guide/briefing-premium.md +23 -19
  16. package/workspace/guide/data-freshness.md +15 -1
  17. package/workspace/lib/briefing-premium-agent.js +3 -1
  18. package/workspace/lib/freshness.js +17 -1
  19. package/workspace/lib/pmos-verbs.js +3 -0
  20. package/workspace/lib/source-cli.js +85 -0
  21. package/workspace/lib/source-reads.js +200 -0
  22. package/workspace/package-lock.json +2 -2
  23. package/workspace/package.json +1 -1
  24. package/workspace/premium-studio-test.js +8 -8
  25. package/workspace/premium-vw-item-test.js +3 -3
  26. package/workspace/premium-vw-meet-test.js +32 -21
  27. package/workspace/premium-vw-notes-test.js +5 -5
  28. package/workspace/premium-vw-rec-test.js +1 -1
  29. package/workspace/public/pm/premium-board.js +4 -3
  30. package/workspace/public/pm/premium-chat.js +9 -0
  31. package/workspace/public/pm/premium-initiative.js +4 -3
  32. package/workspace/public/pm/premium-insights.js +2 -2
  33. package/workspace/public/pm/premium-meeting.js +28 -29
  34. package/workspace/public/pm/premium-shell.js +55 -28
  35. package/workspace/public/pm/premium-vw-meet.css +27 -7
  36. package/workspace/public/pm/premium-vw-meet.js +31 -16
  37. package/workspace/public/pm/premium-work.js +2 -2
  38. package/workspace/public/pm/premium.css +34 -4
  39. package/workspace/public/pm/premium.js +2 -2
  40. package/workspace/public/premium-board.html +1 -0
  41. package/workspace/public/premium-chat.html +39 -0
  42. package/workspace/public/premium-initiative.html +1 -0
  43. package/workspace/public/premium-insights.html +1 -0
  44. package/workspace/public/premium-work.html +2 -1
  45. package/workspace/public/premium.html +2 -1
  46. package/workspace/server.js +4 -2
  47. package/workspace/skills/sources-read.skill +54 -0
  48. package/workspace/test-lists/briefing-source-flow.json +5 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-pmos",
3
- "version": "0.362.0",
3
+ "version": "0.364.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,40 @@
32
32
  "audit"
33
33
  ],
34
34
  "pmosChanges": [
35
+ {
36
+ "v": "0.364.0",
37
+ "at": "2026-10-21T00:58:08.077Z",
38
+ "f": 2,
39
+ "prs": [
40
+ {
41
+ "n": 967,
42
+ "t": "Chat is its own page, with the sessions on it",
43
+ "s": "Chat is its own page, with the sessions on it"
44
+ },
45
+ {
46
+ "n": 970,
47
+ "t": "Each tool the Briefing uses gets a stored read (briefing-source-flow, slice 1)",
48
+ "s": "Each tool the Briefing uses gets a stored read (briefing-source-flow, slice 1)"
49
+ }
50
+ ]
51
+ },
52
+ {
53
+ "v": "0.363.0",
54
+ "at": "2026-10-21T00:46:24.704Z",
55
+ "f": 2,
56
+ "prs": [
57
+ {
58
+ "n": 965,
59
+ "t": "Chat is the big middle place in the premium rail",
60
+ "s": "Chat is the big middle place in the premium rail"
61
+ },
62
+ {
63
+ "n": 966,
64
+ "t": "The meeting detail is one scroll with a short head on a phone",
65
+ "s": "The meeting detail is one scroll with a short head on a phone"
66
+ }
67
+ ]
68
+ },
35
69
  {
36
70
  "v": "0.362.0",
37
71
  "at": "2026-10-21T00:23:03.151Z",
@@ -277,30 +311,6 @@
277
311
  "s": "The bell is an inbox of what the agent made that waits on the PM."
278
312
  }
279
313
  ]
280
- },
281
- {
282
- "v": "0.344.0",
283
- "at": "2026-10-20T05:29:13.194Z",
284
- "f": 2,
285
- "prs": [
286
- {
287
- "n": 940,
288
- "t": "Replay takes the rich layout from the prototype",
289
- "s": "Replay follows the rich layout from prototype PR 901."
290
- }
291
- ]
292
- },
293
- {
294
- "v": "0.343.0",
295
- "at": "2026-10-20T05:20:19.894Z",
296
- "f": 2,
297
- "prs": [
298
- {
299
- "n": 938,
300
- "t": "A file Claude names in a premium chat panel opens beside the conversation",
301
- "s": "A file path in Claude's words is underlined, and pressing it opens the file read-only as a viewer tab beside the conversation."
302
- }
303
- ]
304
314
  }
305
315
  ]
306
316
  }
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@245c2ee7
1
+ kernel-source: pmos@414dedb1
2
2
  assembled: 2026-10-21
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-21T00:22:59Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-21T00:58:05Z"}
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-21T00:22:59Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-21T00:58:05Z"}
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-21T00:22:59Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-21T00:58:05Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -64,7 +64,7 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
64
64
 
65
65
  /* B1 */
66
66
  const rail = await p.evaluate(() => ({ names: [...document.querySelectorAll('.rail .pl')].map((b) => b.textContent.trim()), cur: document.querySelector('.rail [aria-current="page"]').textContent.trim(), pi: getComputedStyle(document.querySelector('.rail')).getPropertyValue('--pi').trim(), title: document.title, name: document.querySelector('#crBoard').textContent, sw: document.querySelector('#crSw').hidden }));
67
- ok('B1 the rail names four places, Board is current, the board is named and has no switcher for one board', rail.names.join() === 'Briefing,My work,Board,Insights' && rail.cur === 'Board' && rail.pi === '2' && rail.name === 'pmos' && rail.sw, JSON.stringify(rail));
67
+ ok('B1 the rail names five places, Board is current, the board is named and has no switcher for one board', rail.names.join() === 'Briefing,My work,Chat,Board,Insights' && rail.cur === 'Board' && rail.pi === '3' && rail.name === 'pmos' && rail.sw, JSON.stringify(rail));
68
68
  { await p.click('#moreBtn'); const tc = await p.evaluate(() => { const a = document.querySelector('#toConsole'); if (!a) return null; const r = a.getBoundingClientRect(); return { href: a.getAttribute('href'), label: a.getAttribute('aria-label'), w: Math.round(r.width), h: Math.round(r.height), tab: a.tabIndex }; }); ok('B1 the ⋯ menu links to the console (premium-console-link, premium-topbar)', tc && tc.href === '/console.html' && tc.label === 'Open the console' && tc.w >= 44 && tc.h >= 44 && tc.tab === 0, JSON.stringify(tc)); await p.keyboard.press('Escape'); }
69
69
  ok('B1 the page is served at /premium-board and /premium-board.html', (await fetch(BASE + '/premium-board')).status === 200 && (await fetch(BASE + '/premium-board.html')).status === 200);
70
70
  for (const [go, re] of [['brief', /\/premium\.html$/], ['work', /\/premium-work\.html$/]]) {
@@ -174,13 +174,13 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
174
174
  const D = await open({ model: BP.build(Object.assign({}, base, { docs: docs3 })) });
175
175
  const q = D.page;
176
176
  ok('B15 the third card is "Next release", as the mockup names it', await q.evaluate(() => document.querySelector('#hRel').textContent === 'Next release'));
177
- ok('B15 the header is the crumb: the board\'s name, no switcher for one board, and the sparkle', await q.evaluate(() => document.querySelector('#crBoard').disabled && document.querySelector('#crBoard').textContent === 'pmos' && document.querySelector('#crSw').hidden && document.querySelector('#crAsk').getAttribute('aria-label') === 'Ask about this board' && !document.querySelector('#bsw')));
178
- await q.click('#crAsk'); await until(() => q.evaluate(() => document.querySelector('#dlg').classList.contains('on'))); await sleep(500);
179
- const bd = await q.evaluate(() => ({ title: document.querySelector('#dTitle').textContent, grid: [...document.querySelectorAll('#oMain .kv2 span')].map((x) => x.textContent).join('|'), ask: document.querySelector('#askF').hidden }));
180
- ok('B15 the sparkle opens the board in the dialog, its counts as a grid and the read-only agent beside it', bd.title === 'pmos' && /Open initiatives\|9\|On track\|5\|At risk\|3\|Late\|1/.test(bd.grid) && bd.ask === false, JSON.stringify(bd));
177
+ ok('B15 the header is the crumb: the board\'s name, no switcher for one board, and no chat button (Chat is in the rail)', await q.evaluate(() => document.querySelector('#crBoard').disabled && document.querySelector('#crBoard').textContent === 'pmos' && document.querySelector('#crSw').hidden && !document.querySelector('#crAsk') && !document.querySelector('#bsw')));
178
+ await q.click('.rail [data-go="chat"]'); await until(() => q.evaluate(() => /premium-chat\.html/.test(location.pathname) && document.querySelector('#dlg').classList.contains('on')), 10000); await sleep(500);
179
+ const bd = await q.evaluate(() => ({ title: document.querySelector('#dTitle').textContent, ask: document.querySelector('#askF').hidden }));
180
+ ok('B15 Chat opens the Chat page on the board\'s conversation (premium-chat-page)', /about=board%3Athis-board/.test(q.url()) && bd.title === 'Ask about the pmos board' && bd.ask === false, JSON.stringify({ ...bd, url: q.url() }));
181
181
  D.setThread({ ok: true, working: false, turns: [] }); await q.fill('#askIn', 'What is late?'); const nq = D.posts.length; await q.press('#askIn', 'Enter');
182
182
  ok('B15 a question about the board posts the board key and the text', await until(() => D.posts.length > nq && D.posts[D.posts.length - 1].path === '/api/briefing-premium/ask' && D.posts[D.posts.length - 1].body.key === 'board:this-board' && D.posts[D.posts.length - 1].body.text === 'What is late?'));
183
- await q.keyboard.press('Escape'); await until(() => q.evaluate(() => !document.querySelector('#dlg').classList.contains('on')));
183
+ await q.goBack(); await until(() => q.evaluate(() => document.querySelectorAll('#ibBody .ini2').length > 0), 20000);
184
184
  const dm = await q.evaluate(() => ({ cap: document.querySelector('#docCap').textContent, sum: document.querySelector('.dsum').textContent.replace(/\s+/g, ' '), bar: document.querySelectorAll('.dprog i').length, tabs: [...document.querySelectorAll('#dmF button')].map((b) => b.textContent.replace(/\s+/g, '')).join(','), link: (document.querySelector('.dsum .dlink') || {}).textContent }));
185
185
  ok('B15 the documents have the mockup\'s summary, progress bar, filter and search, from one set of counts', dm.cap === '8' && /1 draft to review/.test(dm.sum) && /5 not started/.test(dm.sum) && /1 up to date/.test(dm.sum) && dm.bar === 8 && dm.tabs === 'All8,Notstarted5,Draft1,Uptodate1' && /Draft the 3 not started/.test(dm.link || ''), JSON.stringify(dm));
186
186
  await q.click('#dmF [data-dmf="none"]'); ok('B15 the filter shows the documents not started', (await q.evaluate(() => [...document.querySelectorAll('#docBody .dmn b')].map((b) => b.textContent))).join('|') === 'Board charter|Board status report|Board risks|Intake log|Roadmap note'.replace('|Board risks', '') || true);
@@ -109,8 +109,8 @@ const SUGGEST = { ok: true, suggested: [{ kind: 'pmos-doc', ref: 'planning/prd/p
109
109
  await until(() => page.evaluate(() => document.querySelectorAll('#wkStrip [data-day]').length === 5)); // the card's day strip: today is picked, so the row is a Today row
110
110
  await page.evaluate(() => { const r = [...document.querySelectorAll('#tl .ev')].find((e) => e.querySelector('b').textContent === 'Sprint planning'); r.id = 'rowSprint'; r.click(); });
111
111
  S.dlg = await until(() => page.evaluate(() => document.querySelector('#dlg').classList.contains('on') && !!document.querySelector('#mmAdd') && /Roadmap|No material/.test(document.querySelector('#oMain').textContent)));
112
- // the detail opens on After when the meeting has notes (premium-viewer S3): material is under Before, Make task under After
113
- if (S.dlg && stage) { await page.click(`#oMain [data-ph="${stage}"]`); S.dlg = await until(() => page.evaluate((k) => !document.querySelector(`#oMain .vm-body[data-part="${k}"]`).hidden, stage)); }
112
+ // the detail shows Notes first and open when the meeting has notes: material is in Prep and material, Make task in Notes and next steps
113
+ if (S.dlg && stage) { await page.evaluate((k) => { const d = document.querySelector(`#oMain .vm-body[data-part="${k}"]`); if (d && !d.open) d.querySelector('summary').click(); }, stage); S.dlg = await until(() => page.evaluate((k) => document.querySelector(`#oMain .vm-body[data-part="${k}"]`).open, stage)); }
114
114
  return Object.assign(S, { ctx, page });
115
115
  };
116
116
  const text = (p) => p.evaluate(() => document.querySelector('#oMain').textContent);
@@ -212,7 +212,7 @@ const SUGGEST = { ok: true, suggested: [{ kind: 'pmos-doc', ref: 'planning/prd/p
212
212
  /* M7 floors and fidelity */
213
213
  for (const th of ['light', 'dark']) {
214
214
  const P = await open({ w: 390, h: 844, theme: th });
215
- const f1 = await P.page.evaluate(() => ({ scroll: document.documentElement.scrollWidth <= innerWidth + 1, btn: [...document.querySelectorAll('#mmAdd,.mtg-rm,.mtg-task,#oMain .vm-ph button')].filter((b) => b.getClientRects().length).map((b) => Math.min(b.getBoundingClientRect().width, b.getBoundingClientRect().height)) }));
215
+ const f1 = await P.page.evaluate(() => ({ scroll: document.documentElement.scrollWidth <= innerWidth + 1, btn: [...document.querySelectorAll('#mmAdd,.mtg-rm,.mtg-task,#oMain .vm-sh')].filter((b) => b.getClientRects().length).map((b) => Math.min(b.getBoundingClientRect().width, b.getBoundingClientRect().height)) }));
216
216
  await P.page.click('#mmAdd'); await until(() => P.page.evaluate(() => /Premium UX PRD/.test(document.querySelector('#mmSug').textContent)));
217
217
  await P.page.click('#mmSug [data-pick]');
218
218
  const f2 = await P.page.evaluate(() => ({ scroll: document.documentElement.scrollWidth <= innerWidth + 1 && document.querySelector('#oMain').scrollWidth <= document.querySelector('#oMain').clientWidth + 1, btn: [...document.querySelectorAll('#mmBack,#mmDo,#mmCancel,[data-scope],[data-pick],.mtg-in')].map((b) => Math.min(b.getBoundingClientRect().width, b.getBoundingClientRect().height)) }));
@@ -148,9 +148,9 @@ const RECORDER = () => {
148
148
  };
149
149
  const text = (p) => p.evaluate(() => document.querySelector('#oMain').textContent);
150
150
  const rec = (p) => p.evaluate(() => document.querySelector('#m3Rec') ? document.querySelector('#m3Rec').textContent : '');
151
- /* A control under a stage the dialog is not showing (Before / During / After) is reached by pressing that stage first; the press holds the stage
152
- * when the meeting's answers land and the dialog would otherwise open on its own pick. */
153
- const reveal = async (p, sel) => { await until(() => p.evaluate(() => document.querySelector('#oMain').dataset.ready === 'meeting')); await p.evaluate((q) => { const b = document.querySelector(q), part = b && b.closest('.vm-body[data-part]'); if (part) document.querySelector(`#oMain [data-ph="${part.dataset.part}"]`).click(); }, sel); };
151
+ /* A control in a folded part of the detail is reached by opening that part first, and one in the More menu by opening the menu; an opened part stays
152
+ * open when the meeting's answers land and the detail is drawn again. */
153
+ const reveal = async (p, sel) => { await until(() => p.evaluate(() => document.querySelector('#oMain').dataset.ready === 'meeting')); await p.evaluate((q) => { const b = document.querySelector(q), part = b && b.closest('details.vm-part'), mn = b && b.closest('details.vm-menu'); if (part && !part.open) part.querySelector('summary').click(); if (mn) mn.open = true; }, sel); };
154
154
  const press = async (p, act) => { const sel = `#oMain [data-m3="${act}"]`; await reveal(p, sel); await p.click(sel); };
155
155
  const chip = (p) => p.evaluate(() => { const c = document.querySelector('#recChip'); return c && !c.hidden ? c.textContent : null; });
156
156
 
@@ -161,7 +161,8 @@ const RECORDER = () => {
161
161
 
162
162
  /* R1 R2 record */
163
163
  const t0 = await text(p);
164
- ok('R1 a meeting under way has Record, and says what the press does', /Record/.test(await rec(p)) && /microphone/.test(await rec(p)) && /this machine/.test(await rec(p)));
164
+ const why = () => p.evaluate(() => (document.querySelector('#oMain .acts2 > .why') || {}).textContent || '');
165
+ ok('R1 a meeting under way has Record, and More says what the press does', /Record/.test(await rec(p)) && /microphone/.test(await why()) && /this machine/.test(await why()));
165
166
  ok('R5 the Detail view says what Focus reads before any read, and none was made', /every 3 seconds/.test(t0) && /sends nothing/.test(t0) && A.focusGets === 0);
166
167
  ok('R5 the dialog read the meeting prep once, apart from Focus', !!(await until(() => A.briefGets === 1)) && A.focusGets === 0, 'brief ' + A.briefGets + ' focus ' + A.focusGets);
167
168
  ok('R1 nothing was sent to the notes routes before a press', !A.reqs.some((r) => /^POST \/api\/notes/.test(r)), A.reqs.join());
@@ -185,7 +186,7 @@ const RECORDER = () => {
185
186
  await press(p, 'stopno');
186
187
  ok('R1 Cancel on the ask stops nothing', A.stopPosts.length === 0 && /Recording/.test(await rec(p)));
187
188
  await press(p, 'stop'); await press(p, 'stopgo');
188
- ok('R1 Stop for good ends the meeting through the route, and the row says it ended', await until(() => A.stopPosts.length === 1) && await until(() => p.evaluate(() => /cannot be recorded again/.test(document.querySelector('#m3Rec').textContent))), await rec(p));
189
+ ok('R1 Stop for good ends the meeting through the route, and the row says it ended', await until(() => A.stopPosts.length === 1) && await until(() => p.evaluate(() => /Stopped for good/.test(document.querySelector('#m3Rec').textContent) && !document.querySelector('#m3Rec [data-m3="rec"]'))), await rec(p));
189
190
  ok('R3 the chip is gone once no note records', await until(async () => (await chip(p)) === null));
190
191
  ok('R10 the notes writes sent were new, record, pause, record, stop and nothing else', A.reqs.filter((r) => /^POST \/api\/notes/.test(r)).join() === 'POST /api/notes/new,POST /api/notes/record,POST /api/notes/pause,POST /api/notes/record,POST /api/notes/stop', A.reqs.filter((r) => /^POST/.test(r)).join());
191
192
  await A.ctx.close();
@@ -152,7 +152,7 @@ const MOCKUP = fs.readFileSync(path.join(__dirname, '..', 'prototype', 'premium-
152
152
  /* C5 link it */
153
153
  await p.click('#rowSprint');
154
154
  await until(() => p.evaluate(() => !!document.querySelector('#mtgSel') && /Capacity sheet/.test(document.querySelector('#oMain').textContent)));
155
- await p.click('#oMain [data-vm="about"]'); // the head's Change opens the choice (premium-viewer S3)
155
+ await p.click('#oMain .vm-menu > summary'); await p.click('#oMain [data-vm="about"]'); // Change what it is about, in the More menu, opens the choice
156
156
  const dis = await p.evaluate(() => document.querySelector('#mtgLink').disabled);
157
157
  ok('C5 Link it is off until a choice is made', dis === true);
158
158
  const optsText = await p.evaluate(() => [...document.querySelectorAll('#mtgSel option')].map((o) => o.textContent));
@@ -181,7 +181,8 @@ const MOCKUP = fs.readFileSync(path.join(__dirname, '..', 'prototype', 'premium-
181
181
  const owner = await R.page.evaluate(() => { const c = document.querySelector('#oMain [data-vm-t="actions"] tbody tr'); return c ? [...c.children].slice(1, 3).map((x) => x.textContent).join(' · ') : ''; });
182
182
  ok('C6 the note\'s decisions, next steps and questions are listed as the note holds them', rd && /Plan the sprint with eight people/.test(rd) && /Sam confirms the data fix owner/.test(rd) && /^Sam · Tue/.test(owner) && /Does a release eat the capacity\?/.test(rd) && /Sprint planning notes/.test(rd), String(rd).slice(0, 300));
183
183
  ok('C8 a kept recording is summarised, and Replay opens in the dialog', rd && /A recording is kept: 25 min, 3 key points/.test(rd) && /Replay/.test(rd) && !/Replay opens in the console/.test(rd));
184
- ok('C6 the replay answer\'s people are used only when the calendar lists none', rd && /Dara, Priya, Sam/.test(rd));
184
+ const ppl = await R.page.evaluate(() => [...document.querySelectorAll('#oMain .vm-ppl .pp')].map((x) => x.lastChild.textContent).join(', '));
185
+ ok('C6 the replay answer\'s people are used only when the calendar lists none', rd && ppl === 'Dara, Priya, Sam', ppl);
185
186
 
186
187
  /* C4 a Today row opens the same dialog when the calendar answer knows the meeting */
187
188
  const Tt = await open({ replay: REPLAY });
@@ -74,9 +74,9 @@ const HEALTH = { ok: true, path: 'planning/prd/self-serve-v2-prd.md', health: {
74
74
 
75
75
  /* I1 place */
76
76
  const rail = await p.evaluate(() => ({ names: [...document.querySelectorAll('.rail .pl')].map((b) => b.textContent.trim()), cur: document.querySelector('.rail [aria-current="page"]').textContent.trim() }));
77
- ok('I1 the rail names the four places and marks Board', rail.names.join() === 'Briefing,My work,Board,Insights' && rail.cur === 'Board');
77
+ ok('I1 the rail names the five places and marks Board', rail.names.join() === 'Briefing,My work,Chat,Board,Insights' && rail.cur === 'Board');
78
78
  { await p.click('#moreBtn'); const tc = await p.evaluate(() => { const a = document.querySelector('#toConsole'); if (!a) return null; const r = a.getBoundingClientRect(); return { href: a.getAttribute('href'), label: a.getAttribute('aria-label'), w: Math.round(r.width), h: Math.round(r.height), tab: a.tabIndex }; }); ok('I1 the ⋯ menu links to the console (premium-console-link, premium-topbar)', tc && tc.href === '/console.html' && tc.label === 'Open the console' && tc.w >= 44 && tc.h >= 44 && tc.tab === 0, JSON.stringify(tc)); await p.keyboard.press('Escape'); }
79
- ok('I1 the bar has a back button to the board, the initiative with its switcher, and Chat (premium-topbar)', await p.evaluate(() => document.querySelector('#crBoard').getAttribute('aria-label') === 'Back to Onboarding' && document.querySelector('#crIni').textContent === 'Self-serve onboarding v2' && !document.querySelector('#crSw') && !!document.querySelector('#crSw2') && document.querySelector('#crAsk').getAttribute('aria-label') === 'Ask about this initiative'));
79
+ ok('I1 the bar has a back button to the board, the initiative with its switcher, and no chat button (Chat is in the rail)', await p.evaluate(() => document.querySelector('#crBoard').getAttribute('aria-label') === 'Back to Onboarding' && document.querySelector('#crIni').textContent === 'Self-serve onboarding v2' && !document.querySelector('#crSw') && !!document.querySelector('#crSw2') && !document.querySelector('#crAsk')));
80
80
  await p.route('**/premium-board.html*', (r) => r.fulfill({ contentType: 'text/html', body: '<title>b</title>' }));
81
81
  await p.route('**/premium-initiative.html?id=partner*', (r) => r.fulfill({ contentType: 'text/html', body: '<title>i</title>' }));
82
82
  await p.click('#crSw2'); const im = await p.evaluate(() => [...document.querySelectorAll('#crMenu button')].map((b) => b.textContent + (b.hasAttribute('aria-current') ? '*' : '')).join('|'));
@@ -85,9 +85,10 @@ const HEALTH = { ok: true, path: 'planning/prd/self-serve-v2-prd.md', health: {
85
85
  { const u = new URL(p.url()); ok('I1 choosing an initiative opens its page on the same board', u.pathname === '/premium-initiative.html' && u.searchParams.get('id') === 'partner-rate-limits' && u.searchParams.get('board') === 'w1', p.url()); await p.goBack(); await until(() => p.evaluate(() => !!document.querySelector('#cIniTk'))); }
86
86
  await p.click('#crBoard'); await sleep(500);
87
87
  { const u = new URL(p.url()); ok('I1 the back button leads back to the Board', u.pathname === '/premium-board.html' && u.searchParams.get('board') === 'w1', p.url()); await p.goBack(); await until(() => p.evaluate(() => !!document.querySelector('#cIniTk'))); }
88
- await p.click('#crAsk'); await until(() => p.evaluate(() => document.querySelector('#dlg').classList.contains('on'))); await sleep(500);
89
- ok('I1 Chat opens the initiative in the dialog with the read-only agent beside it', await p.evaluate(() => document.querySelector('#dTitle').textContent === 'Self-serve onboarding v2' && /Lane\|feature/.test([...document.querySelectorAll('#oMain .kv2 span')].map((x) => x.textContent).join('|')) && !document.querySelector('#askF').hidden));
90
- await p.keyboard.press('Escape'); await until(() => p.evaluate(() => !document.querySelector('#dlg').classList.contains('on')));
88
+ await p.click('.rail [data-go="chat"]'); await until(() => p.evaluate(() => /premium-chat\.html/.test(location.pathname) && document.querySelector('#dlg').classList.contains('on')), 10000); await sleep(500);
89
+ { const u = new URL(p.url()); const t = await p.evaluate(() => document.querySelector('#dTitle').textContent);
90
+ ok('I1 Chat opens the Chat page on the initiative\'s conversation (premium-chat-page)', /^init:/.test(u.searchParams.get('about') || '') && t === 'Ask about Self-serve onboarding v2', JSON.stringify({ url: p.url(), t })); }
91
+ await p.goBack(); await until(() => p.evaluate(() => !!document.querySelector('#cIniTk')), 20000);
91
92
 
92
93
  /* I3 header */
93
94
  const head = await p.evaluate(() => ({ chip: document.querySelector('.ihead .chp').textContent.trim(), tone: document.querySelector('.ihead .chp').className, meta: document.querySelector('.ihm').textContent, segs: [...document.querySelectorAll('.iws .sg2 i')].map((i) => i.className).join('|'), cur: document.querySelector('.iws em b').textContent }));
@@ -64,7 +64,7 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
64
64
 
65
65
  /* I1 */
66
66
  const rail = await p.evaluate(() => ({ names: [...document.querySelectorAll('.rail .pl')].map((b) => b.textContent.trim()), cur: document.querySelector('.rail [aria-current="page"]').textContent.trim(), pi: getComputedStyle(document.querySelector('.rail')).getPropertyValue('--pi').trim(), title: document.title, name: document.querySelector('#crBoard').textContent, sw: document.querySelector('#crSw').hidden }));
67
- ok('I1 the rail names four places, Insights is current, the board is named and has no switcher for one board', rail.names.join() === 'Briefing,My work,Board,Insights' && rail.cur === 'Insights' && rail.pi === '3' && rail.name === 'pmos' && rail.sw, JSON.stringify(rail));
67
+ ok('I1 the rail names five places, Insights is current, the board is named and has no switcher for one board', rail.names.join() === 'Briefing,My work,Chat,Board,Insights' && rail.cur === 'Insights' && rail.pi === '4' && rail.name === 'pmos' && rail.sw, JSON.stringify(rail));
68
68
  { await p.click('#moreBtn'); const tc = await p.evaluate(() => { const a = document.querySelector('#toConsole'); if (!a) return null; const r = a.getBoundingClientRect(); return { href: a.getAttribute('href'), label: a.getAttribute('aria-label'), w: Math.round(r.width), h: Math.round(r.height), tab: a.tabIndex }; }); ok('I1 the ⋯ menu links to the console (premium-console-link, premium-topbar)', tc && tc.href === '/console.html' && tc.label === 'Open the console' && tc.w >= 44 && tc.h >= 44 && tc.tab === 0, JSON.stringify(tc)); await p.keyboard.press('Escape'); }
69
69
  ok('I1 the page is served at /premium-insights and /premium-insights.html', (await fetch(BASE + '/premium-insights')).status === 200 && (await fetch(BASE + '/premium-insights.html')).status === 200);
70
70
  for (const [go, re] of [['brief', /\/premium\.html$/], ['work', /\/premium-work\.html$/], ['init', /\/premium-board\.html$/]]) {
@@ -92,8 +92,9 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
92
92
 
93
93
  /* R1 */
94
94
  const rail = await p.evaluate(() => ({ names: [...document.querySelectorAll('.rail .pl')].map((b) => b.textContent.trim()), cur: document.querySelector('.rail [aria-current="page"]').textContent.trim(), go: [...document.querySelectorAll('.rail [data-go]')].map((b) => b.dataset.go) }));
95
- ok('R1 the rail names four places and Briefing is current', rail.names.join() === 'Briefing,My work,Board,Insights' && rail.cur === 'Briefing', JSON.stringify(rail));
96
- ok('R1 each place has a target: Briefing and My work are premium pages, Board and Insights open the console tab', rail.go.join() === 'brief,work,init,rep');
95
+ ok('R1 the rail names five places, Chat in the middle, and Briefing is current (premium-chat-rail)', rail.names.join() === 'Briefing,My work,Chat,Board,Insights' && rail.cur === 'Briefing' && rail.go.join() === 'brief,work,chat,init,rep', JSON.stringify(rail));
96
+ ok('R1b no round chat button beside the page name, and no Sessions in the ⋯ menu (premium-chat-rail C4)', await p.evaluate(() => !document.querySelector('#pgChat,#crAsk,#sessBtn')));
97
+ ok('R1 each place has a target: the four pages and Chat', rail.go.join() === 'brief,work,chat,init,rep');
97
98
  const def = await fetch(BASE + '/').then((r) => r.text());
98
99
  ok('R1 the premium Briefing is the default page', /class="rail/.test(def) && !/id="c3-root"/.test(def));
99
100
  { const con = await fetch(BASE + '/console.html').then((r) => r.text()); ok('R1 the console is served at /console.html', /id="c3-root"/.test(con)); const old = await fetch(BASE + '/c3.html', { redirect: 'manual' }); const oldQ = await fetch(BASE + '/c3.html?tab=rep', { redirect: 'manual' }); ok('R1 /c3.html goes to the premium Briefing, and with a query to the console with the same query', old.status === 302 && old.headers.get('location') === '/premium.html' && oldQ.status === 302 && oldQ.headers.get('location') === '/console.html?tab=rep', old.headers.get('location') + ' | ' + oldQ.headers.get('location')); }
@@ -153,72 +154,78 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
153
154
  for (let i = A.reqs.length - 1; i >= 0; i--) if (/^POST \/api\/proactive\/settings$/.test(A.reqs[i])) A.reqs.splice(i, 1); // R10 below counts presses on a page where nothing was pressed
154
155
  await p.keyboard.press('Escape'); }
155
156
 
156
- /* premium-session-list (replaces the Agent sessions popup): the ⋯ menu's Sessions opens the chat panel full screen with the list beside it.
157
+ /* premium-session-list, reached from the rail's Chat (premium-chat-rail): Chat opens the page's conversation full screen with the list beside it.
157
158
  * The list reads /api/sessions; PMOS sessions that need nothing fold into one line; the viewer holds the session's facts, its question and Stop. */
158
159
  { const now = Date.now();
160
+ // premium-chat-page: the session list lives on the Chat page. The Briefing stays open on p; this block works in a second tab, xp.
161
+ const xp = await A.ctx.newPage(); xp.on('pageerror', (e) => A.errors.push(String((e && e.message) || e)));
162
+ await xp.route('**/api/briefing-premium*', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, state: 'ready', model: MODEL, as_of: Date.now() }) }));
159
163
  const fake = [
160
164
  { id: 'sess-1', name: 'Draft the brief', agent: 'claude', note: 'Writing the brief', cwd: 'planning', created: new Date(now - 14 * 60000).toISOString(), shown: 'needs', label: 'needs you', automatic: false, origin: 'next-step' },
161
165
  { id: 'sess-2', name: 'Refresh metrics', agent: 'claude', note: '', cwd: '.', created: new Date(now - 6 * 60000).toISOString(), shown: 'working', label: 'working', automatic: true, origin: 'schedule:metrics', headless: 'skill' },
162
166
  { id: 'sess-3', name: 'Old one', agent: 'claude', note: '', cwd: '.', created: new Date(now).toISOString(), shown: 'exited', label: 'exited', automatic: false },
163
167
  { id: 'sess-4', name: 'Driver · drafts search', agent: 'claude', note: '', cwd: '.', created: new Date(now - 3 * 60000).toISOString(), shown: 'blocked', label: 'maybe blocked', automatic: true, origin: 'drive:drafts:search' }];
164
168
  let removes = 0, slowOnce = true; const said = [];
165
- await p.route('**/api/sessions', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ sessions: fake }) }));
166
- await p.route('**/api/briefing-premium/goals', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, goals: {} }) }));
167
- await p.route('**/api/sessions/conversation**', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, state: 'conv', turn: 'user', messages: [{ role: 'user', text: 'Draft the brief' }, { role: 'assistant', text: 'The brief is drafted in planning/briefs.' }] }) }));
168
- await p.route('**/api/session/say', (r) => { said.push({ ...JSON.parse(r.request().postData()), hasNonce: !!r.request().headers()['x-pmos-nonce'] }); r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true }) }); });
169
- await p.route('**/api/session/remove', (r) => { removes++; const id = JSON.parse(r.request().postData()).id; if (id === 'sess-4' && slowOnce) { slowOnce = false; return r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, removed: false, note: 'asked it to end' }) }); } const i = fake.findIndex((x) => x.id === id); if (i >= 0) fake.splice(i, 1); return r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, removed: true }) }); });
170
- await p.click('#moreBtn'); const bt = await p.evaluate(() => { const b = document.querySelector('#sessBtn'); if (!b) return null; const r = b.getBoundingClientRect(); return { w: Math.round(r.width), h: Math.round(r.height), t: b.textContent }; });
171
- ok('X1 the ⋯ menu has a Sessions item of at least 44 px', bt && bt.w >= 44 && bt.h >= 44 && /^Sessions/.test(bt.t), JSON.stringify(bt));
172
- await p.click('#sessBtn');
173
- const lay = await until(() => p.evaluate(() => { const d = document.querySelector('#dlg'), r = document.querySelector('#sRail'); if (!d.classList.contains('full') || !r || !r.offsetWidth || !document.querySelector('#srlList .srl-r')) return null; const o = { rail: Math.round(r.getBoundingClientRect().width), work: Math.round(document.querySelector('#dBody').getBoundingClientRect().width), out: Math.round(document.querySelector('#dOut').getBoundingClientRect().width) }; return o.out > 300 ? o : null; }), 8000) || (await p.evaluate(() => ({ rail: document.querySelector('#sRail').getBoundingClientRect().width, work: document.querySelector('#dBody').getBoundingClientRect().width, out: document.querySelector('#dOut').getBoundingClientRect().width, cls: document.querySelector('#dlg').className, mode: document.querySelector('#dlg').dataset.mode, w: document.querySelector('#dlg').getBoundingClientRect().width })));
174
- ok('X2 Sessions opens the chat panel full screen with three panels: list, conversation, viewer', lay && lay.out > 300 && lay.rail > 150 && lay.work > 300 && lay.out > 300, JSON.stringify(lay));
175
- const grpOf = () => p.evaluate(() => [...document.querySelectorAll('#srlList .srl-g')].map((g) => g.querySelector('.srl-gh span').textContent + ':' + g.querySelectorAll('.srl-r').length + (g.querySelector('.srl-more') ? '+' + g.querySelector('.srl-more').textContent : '')));
169
+ await xp.route('**/api/sessions', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ sessions: fake }) }));
170
+ await xp.route('**/api/briefing-premium/goals', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, goals: {} }) }));
171
+ await xp.route('**/api/sessions/conversation**', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, state: 'conv', turn: 'user', messages: [{ role: 'user', text: 'Draft the brief' }, { role: 'assistant', text: 'The brief is drafted in planning/briefs.' }] }) }));
172
+ await xp.route('**/api/session/say', (r) => { said.push({ ...JSON.parse(r.request().postData()), hasNonce: !!r.request().headers()['x-pmos-nonce'] }); r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true }) }); });
173
+ await xp.route('**/api/session/remove', (r) => { removes++; const id = JSON.parse(r.request().postData()).id; if (id === 'sess-4' && slowOnce) { slowOnce = false; return r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, removed: false, note: 'asked it to end' }) }); } const i = fake.findIndex((x) => x.id === id); if (i >= 0) fake.splice(i, 1); return r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, removed: true }) }); });
174
+ await xp.goto(BASE + '/premium.html?theme=light'); await until(() => xp.evaluate(() => document.querySelectorAll('#rank .rr').length > 0), 20000);
175
+ const bt = await xp.evaluate(() => { const b = document.querySelector('.rail [data-go="chat"] .orb'); if (!b) return null; const r = b.getBoundingClientRect(); return { w: Math.round(r.width), h: Math.round(r.height) }; });
176
+ ok('X1 the rail\'s Chat is a round button of at least 44 px', bt && bt.w >= 44 && bt.h >= 44, JSON.stringify(bt));
177
+ await xp.click('.rail [data-go="chat"]'); await until(() => xp.evaluate(() => /premium-chat\.html/.test(location.pathname) && document.querySelector('#dlg').classList.contains('on')), 10000);
178
+ ok('X1b Chat goes to the Chat page and carries the Briefing as the conversation it opens', /about=src%3Athis-page/.test(xp.url()) && /label=the(\+|%20)Briefing/.test(xp.url()), xp.url());
179
+ const lay = await until(() => xp.evaluate(() => { const d = document.querySelector('#dlg'), r = document.querySelector('#sRail'); if (!d.classList.contains('full') || !r || !r.offsetWidth || !document.querySelector('#srlList .srl-r')) return null; const o = { rail: Math.round(r.getBoundingClientRect().width), work: Math.round(document.querySelector('#dBody').getBoundingClientRect().width), out: Math.round(document.querySelector('#dOut').getBoundingClientRect().width) }; return o.out > 300 ? o : null; }), 8000) || (await xp.evaluate(() => ({ rail: document.querySelector('#sRail').getBoundingClientRect().width, work: document.querySelector('#dBody').getBoundingClientRect().width, out: document.querySelector('#dOut').getBoundingClientRect().width, cls: document.querySelector('#dlg').className, mode: document.querySelector('#dlg').dataset.mode, w: document.querySelector('#dlg').getBoundingClientRect().width })));
180
+ ok('X2 the Chat page opens the Briefing\'s conversation with three panels: list, conversation, viewer', /Ask about the Briefing/.test(await xp.evaluate(() => document.querySelector('#dTitle').textContent)) && lay && lay.out > 300 && lay.rail > 150 && lay.work > 300 && lay.out > 300, JSON.stringify(lay));
181
+ const grpOf = () => xp.evaluate(() => [...document.querySelectorAll('#srlList .srl-g')].map((g) => g.querySelector('.srl-gh span').textContent + ':' + g.querySelectorAll('.srl-r').length + (g.querySelector('.srl-more') ? '+' + g.querySelector('.srl-more').textContent : '')));
176
182
  const grp = (await until(async () => { const v = await grpOf(); return v.join('|') === 'Yours:1|Started by PMOS:1+1 more working on their own · Show' ? v : null; }, 8000)) || (await grpOf());
177
183
  ok('X3 the list groups by who started each session, exited ones are gone, and PMOS runs that need nothing fold into one line', grp.join('|') === 'Yours:1|Started by PMOS:1+1 more working on their own · Show', grp.join('|'));
178
- ok('X4 the badge counts the sessions that need you (Ready or Maybe blocked), not every running one', !!(await until(() => p.evaluate(() => document.querySelector('#sessBdg').textContent === '2'), 6000)), await p.evaluate(() => document.querySelector('#sessBdg').textContent));
179
- const first = await until(() => p.evaluate(() => { const on = document.querySelector('#srlList .srl-r.on'); return on && /Draft the brief/.test(document.querySelector('#dTitle').textContent) && /brief is drafted/.test(document.querySelector('#dBody').textContent) ? on.dataset.sid : null; }), 8000);
180
- ok('X5 it opens on the session that needs you most, with its conversation from the transcript', first === 'sess-1', String(first));
181
- await p.fill('#askIn', 'Put it in planning/research instead'); await p.click('#askGo');
184
+ const chatName = () => xp.evaluate(() => { const a = document.querySelector('.rail [data-go="chat"]'); return a.getAttribute('aria-label') + (a.querySelector('.cdot').hidden ? '' : ' +dot'); });
185
+ ok('X4 the Chat dot counts the sessions that need you (Ready or Maybe blocked), not every running one', !!(await until(async () => (await chatName()) === 'Chat, 2 sessions need you +dot', 6000)), await chatName());
186
+ await xp.click('#srlList [data-sid="sess-1"]');
187
+ const first = await until(() => xp.evaluate(() => { const on = document.querySelector('#srlList .srl-r.on'); return on && /Draft the brief/.test(document.querySelector('#dTitle').textContent) && /brief is drafted/.test(document.querySelector('#dBody').textContent) ? on.dataset.sid : null; }), 8000);
188
+ ok('X5 a press on the Ready session opens its conversation from the transcript', first === 'sess-1', String(first));
189
+ await xp.fill('#askIn', 'Put it in planning/research instead'); await xp.click('#askGo');
182
190
  await until(() => said.length, 6000);
183
191
  ok('X6 a message to a session with no chat row goes to that session, as a page press', said.length === 1 && said[0].id === 'sess-1' && /planning\/research/.test(said[0].text) && said[0].hasNonce, JSON.stringify(said));
184
- await p.click('#srlList [data-smore]');
185
- ok('X7 Show lists the PMOS runs that need nothing', (await p.evaluate(() => document.querySelectorAll('#srlList .srl-r').length)) === 3);
186
- await p.click('#srlList [data-sid="sess-4"]');
187
- await until(() => p.evaluate(() => /Driver · drafts search/.test(document.querySelector('#dTitle').textContent) && !!document.querySelector('#oMain [data-stop]')), 6000);
188
- await p.click('#oMain [data-stop]');
189
- const asked = await p.evaluate(() => { const c = document.querySelector('#oMain .ssc'); return c ? c.textContent : ''; });
192
+ await xp.click('#srlList [data-smore]');
193
+ ok('X7 Show lists the PMOS runs that need nothing', (await xp.evaluate(() => document.querySelectorAll('#srlList .srl-r').length)) === 3);
194
+ await xp.click('#srlList [data-sid="sess-4"]');
195
+ await until(() => xp.evaluate(() => /Driver · drafts search/.test(document.querySelector('#dTitle').textContent) && !!document.querySelector('#oMain [data-stop]')), 6000);
196
+ await xp.click('#oMain [data-stop]');
197
+ const asked = await xp.evaluate(() => { const c = document.querySelector('#oMain .ssc'); return c ? c.textContent : ''; });
190
198
  ok('X8 Stop in the viewer asks first and says what it ends, and nothing is sent yet', /Stop “Driver · drafts search”\?/.test(asked) && /closes its terminal/.test(asked) && removes === 0, asked);
191
- await p.click('#oMain [data-no]');
192
- ok('X9 Keep running closes the question and sends nothing', (await p.evaluate(() => !document.querySelector('#oMain .ssc'))) && removes === 0);
193
- await p.click('#oMain [data-stop]'); await p.click('#oMain [data-yes]');
194
- const slow = await until(() => p.evaluate(() => { const c = document.querySelector('#oMain .ssc'); return c ? c.textContent : ''; }), 6000);
199
+ await xp.click('#oMain [data-no]');
200
+ ok('X9 Keep running closes the question and sends nothing', (await xp.evaluate(() => !document.querySelector('#oMain .ssc'))) && removes === 0);
201
+ await xp.click('#oMain [data-stop]'); await xp.click('#oMain [data-yes]');
202
+ const slow = await until(() => xp.evaluate(() => { const c = document.querySelector('#oMain .ssc'); return c ? c.textContent : ''; }), 6000);
195
203
  ok('X10 a session that has not exited says so and offers Stop again, never "Ended"', /has not exited yet/.test(slow), slow);
196
- await p.click('#oMain [data-yes]');
197
- ok('X11 the second press ends it, the toast confirms, and the list drops it', !!(await until(() => p.evaluate(() => /Ended “Driver · drafts search”/.test(document.querySelector('#toast').textContent) && !document.querySelector('#srlList [data-sid="sess-4"]')), 8000)));
198
- await p.click('#srlFold');
199
- const folded = await until(() => p.evaluate(() => { const w = document.querySelector('#sRail').getBoundingClientRect().width; return w > 0 && w < 70 ? Math.round(w) : 0; }), 4000);
204
+ await xp.click('#oMain [data-yes]');
205
+ ok('X11 the second press ends it, the toast confirms, and the list drops it', !!(await until(() => xp.evaluate(() => /Ended “Driver · drafts search”/.test(document.querySelector('#toast').textContent) && !document.querySelector('#srlList [data-sid="sess-4"]')), 8000)));
206
+ await xp.click('#srlFold');
207
+ const folded = await until(() => xp.evaluate(() => { const w = document.querySelector('#sRail').getBoundingClientRect().width; return w > 0 && w < 70 ? Math.round(w) : 0; }), 4000);
200
208
  ok('X12 the list folds to a strip of dots', folded > 0, String(folded));
201
- await p.click('#vFold');
202
- const vf = await until(() => p.evaluate(() => { const w = document.querySelector('#dOut').getBoundingClientRect().width; return w > 0 && w < 70 ? Math.round(w) : 0; }), 4000);
203
- ok('X13 the viewer folds and the conversation takes the width', vf > 0 && (await p.evaluate(() => document.querySelector('#dBody').getBoundingClientRect().width)) > 800, String(vf));
209
+ await xp.click('#vFold');
210
+ const vf = await until(() => xp.evaluate(() => { const w = document.querySelector('#dOut').getBoundingClientRect().width; return w > 0 && w < 70 ? Math.round(w) : 0; }), 4000);
211
+ ok('X13 the viewer folds and the conversation takes the width', vf > 0 && (await xp.evaluate(() => document.querySelector('#dBody').getBoundingClientRect().width)) > 800, String(vf));
204
212
  /* premium-fullscreen-blank: the folded viewer is a strip that opens again from anywhere on it, and folding never empties the panel */
205
- const strip = await p.evaluate(() => { const r = document.querySelector('#dOut').getBoundingClientRect(); return { x: r.left + r.width / 2, y: r.top + r.height * 0.6 }; });
206
- await p.mouse.click(strip.x, strip.y);
207
- ok('X13b a press anywhere on the folded viewer strip opens the viewer again', !!(await until(() => p.evaluate(() => document.querySelector('#dOut').getBoundingClientRect().width > 300 && !document.querySelector('#dlg').classList.contains('vw-min')), 4000)));
208
- await p.click('#vFold');
209
- await p.click('#dExpand'); await p.click('#dPane'); await p.click('#dExpand');
210
- const det = await until(() => p.evaluate(() => { const d = document.querySelector('#dlg'), o = document.querySelector('#oMain').getBoundingClientRect(); return d.classList.contains('full') && d.dataset.mode === 'detail' && o.width > 300 && o.height > 0 ? { out: Math.round(o.width), fold: getComputedStyle(document.querySelector('#vFold')).display } : null; }), 4000);
211
- ok('X13c with the conversation hidden, a folded viewer still shows: full screen is never blank', det && det.fold === 'none', JSON.stringify(det));
212
- await p.click('#dPane');
213
- await p.click('#srlFold'); await p.click('#vFold');
213
+ const strip = await xp.evaluate(() => { const r = document.querySelector('#dOut').getBoundingClientRect(); return { x: r.left + r.width / 2, y: r.top + r.height * 0.6 }; });
214
+ await xp.mouse.click(strip.x, strip.y);
215
+ ok('X13b a press anywhere on the folded viewer strip opens the viewer again', !!(await until(() => xp.evaluate(() => document.querySelector('#dOut').getBoundingClientRect().width > 300 && !document.querySelector('#dlg').classList.contains('vw-min')), 4000)));
216
+ await xp.click('#vFold');
217
+ const shell = await xp.evaluate(() => ({ close: !!document.querySelector('#dClose').offsetParent, expand: !!document.querySelector('#dExpand').offsetParent, rail: !document.querySelector('.rail').inert }));
218
+ await xp.keyboard.press('Escape');
219
+ ok('X13c the Chat page has no close and no full-screen button, its rail stays live, and Escape keeps it open', !shell.close && !shell.expand && shell.rail && await xp.evaluate(() => document.querySelector('#dlg').classList.contains('on') && document.querySelector('#dlg').classList.contains('full')), JSON.stringify(shell));
220
+ await xp.click('#srlFold'); await xp.click('#vFold');
214
221
  /* the soft warning: silent at 6 working agents, speaks at 7, at the top of the list */
215
222
  const before = fake.slice();
216
223
  const mk = (n) => Array.from({ length: n }, (_, i) => ({ id: 'w-' + i, name: 'Agent ' + i, agent: 'claude', note: '', cwd: '.', created: new Date().toISOString(), shown: 'working', label: 'working', automatic: false }));
217
224
  fake.splice(0, fake.length, ...mk(6));
218
- ok('X14 six agents working: no warning', !!(await until(() => p.evaluate(() => document.querySelectorAll('#srlList .srl-r').length === 6 && !document.querySelector('#srlList .srl-warn')), 8000)));
225
+ ok('X14 six agents working: no warning', !!(await until(() => xp.evaluate(() => document.querySelectorAll('#srlList .srl-r').length === 6 && !document.querySelector('#srlList .srl-warn')), 8000)));
219
226
  fake.push({ ...mk(7)[6] });
220
- const warnText = await until(() => p.evaluate(() => { const w = document.querySelector('#srlList .srl-warn'); return w ? w.textContent : ''; }), 8000);
221
- ok('X15 seven agents working: the warning names the count and says why, with no button', /^7 agents are working at once\./.test(warnText) && /Stop the ones you are not watching/.test(warnText) && (await p.evaluate(() => document.querySelectorAll('#srlList .srl-warn button').length)) === 0, warnText);
227
+ const warnText = await until(() => xp.evaluate(() => { const w = document.querySelector('#srlList .srl-warn'); return w ? w.textContent : ''; }), 8000);
228
+ ok('X15 seven agents working: the warning names the count and says why, with no button', /^7 agents are working at once\./.test(warnText) && /Stop the ones you are not watching/.test(warnText) && (await xp.evaluate(() => document.querySelectorAll('#srlList .srl-warn button').length)) === 0, warnText);
222
229
  fake.splice(0, fake.length, ...before);
223
230
  const bare = await fetch(BASE + '/api/session/remove', { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ id: 'sess-1' }) });
224
231
  ok('X16 Stop is a page press: no nonce, no end (403)', bare.status === 403, String(bare.status));
@@ -226,21 +233,21 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
226
233
  ok('X17 writing to a session is a page press: no nonce, nothing typed (403)', bareSay.status === 403, String(bareSay.status));
227
234
  /* premium-run-questions: the question a run asks shows in its viewer; a press is the one write, /api/runs/answer */
228
235
  let asking = true; const answers = [];
229
- await p.route('**/api/runs', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, cards: asking ? { 'sess-1': { state: 'asking', asked: 'q-7', ask: { id: 'q-7', q: 'Which folder should the brief go in?', options: [{ label: 'planning/briefs', rec: true }, { label: 'planning/research' }] } } } : {} }) }));
230
- await p.route('**/api/runs/answer', (r) => { answers.push({ ...JSON.parse(r.request().postData()), hasNonce: !!r.request().headers()['x-pmos-nonce'] }); asking = false; r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true }) }); });
231
- await until(() => p.evaluate(() => !!document.querySelector('#srlList [data-sid="sess-1"]')), 8000);
232
- await p.click('#srlList [data-sid="sess-1"]');
233
- const q = await until(() => p.evaluate(() => { const b = document.querySelector('#oMain .ssq'); return b ? b.textContent : ''; }), 8000);
236
+ await xp.route('**/api/runs', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, cards: asking ? { 'sess-1': { state: 'asking', asked: 'q-7', ask: { id: 'q-7', q: 'Which folder should the brief go in?', options: [{ label: 'planning/briefs', rec: true }, { label: 'planning/research' }] } } } : {} }) }));
237
+ await xp.route('**/api/runs/answer', (r) => { answers.push({ ...JSON.parse(r.request().postData()), hasNonce: !!r.request().headers()['x-pmos-nonce'] }); asking = false; r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true }) }); });
238
+ await until(() => xp.evaluate(() => !!document.querySelector('#srlList [data-sid="sess-1"]')), 8000);
239
+ await xp.click('#srlList [data-sid="sess-1"]');
240
+ const q = await until(() => xp.evaluate(() => { const b = document.querySelector('#oMain .ssq'); return b ? b.textContent : ''; }), 8000);
234
241
  ok('Q1 a session that is asking shows its question and the options it offered, in its own words', /Which folder should the brief go in\?/.test(q) && /planning\/briefs/.test(q) && /planning\/research/.test(q), q);
235
- await p.click('#oMain [data-ans="planning/research"]');
242
+ await xp.click('#oMain [data-ans="planning/research"]');
236
243
  await until(() => answers.length, 6000);
237
244
  ok('Q3 a press sends the chosen option to /api/runs/answer with the run, the request id and the page nonce', answers.length === 1 && answers[0].run === 'sess-1' && answers[0].request === 'q-7' && answers[0].behavior === 'answer' && answers[0].message === 'planning/research' && answers[0].hasNonce, JSON.stringify(answers));
238
- ok('Q4 the question leaves once answered, and the toast says so', !!(await until(() => p.evaluate(() => !document.querySelector('#oMain .ssq') && /Answered/.test(document.querySelector('#toast').textContent)), 6000)));
245
+ ok('Q4 the question leaves once answered, and the toast says so', !!(await until(() => xp.evaluate(() => !document.querySelector('#oMain .ssq') && /Answered/.test(document.querySelector('#toast').textContent)), 6000)));
239
246
  const bareAns = await fetch(BASE + '/api/runs/answer', { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ run: 'sess-1', request: 'q-7', behavior: 'answer', message: 'planning/research' }) });
240
247
  ok('Q5 answering is a page press: no nonce, no answer (403)', bareAns.status === 403, String(bareAns.status));
241
- await p.unroute('**/api/runs'); await p.unroute('**/api/runs/answer');
242
- await p.keyboard.press('Escape'); await p.keyboard.press('Escape');
243
- await p.unroute('**/api/sessions'); await p.unroute('**/api/session/remove'); await p.unroute('**/api/session/say'); await p.unroute('**/api/sessions/conversation**'); await p.unroute('**/api/briefing-premium/goals');
248
+ await xp.unroute('**/api/runs'); await xp.unroute('**/api/runs/answer');
249
+ await xp.unroute('**/api/sessions'); await xp.unroute('**/api/session/remove'); await xp.unroute('**/api/session/say'); await xp.unroute('**/api/sessions/conversation**'); await xp.unroute('**/api/briefing-premium/goals');
250
+ await xp.close();
244
251
  for (let i = A.reqs.length - 1; i >= 0; i--) if (/^POST \/api\/(session\/remove|session\/say|runs\/answer)$/.test(A.reqs[i])) A.reqs.splice(i, 1); }
245
252
 
246
253
  /* R2: with the console reads off, the hero is the model's records-only sentences */
@@ -641,7 +648,7 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
641
648
  {
642
649
  const t = await p.evaluate(() => {
643
650
  const small = [];
644
- for (const s of ['.rr .rhd', '.rr .rpin', '#tl .ev', '#srcChips .fchip', '.fbtn', '.rail .pl', '#srcChip', '#moreBtn', '#pgChat', '#theme2']) document.querySelectorAll(s).forEach((e) => { const r = e.getBoundingClientRect(); if (r.width && (r.height < 44 || r.width < 44)) small.push(s + ' ' + Math.round(r.width) + 'x' + Math.round(r.height)); });
651
+ for (const s of ['.rr .rhd', '.rr .rpin', '#tl .ev', '#srcChips .fchip', '.fbtn', '.rail .pl', '#srcChip', '#moreBtn', '.rail .pchat .orb', '#theme2']) document.querySelectorAll(s).forEach((e) => { const r = e.getBoundingClientRect(); if (r.width && (r.height < 44 || r.width < 44)) small.push(s + ' ' + Math.round(r.width) + 'x' + Math.round(r.height)); });
645
652
  return small;
646
653
  });
647
654
  ok('R11 every control is at least 44 px', t.length === 0, t.join(' | '));
@@ -71,7 +71,7 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
71
71
 
72
72
  /* M1 */
73
73
  const rail = await p.evaluate(() => ({ names: [...document.querySelectorAll('.rail .pl')].map((b) => b.textContent.trim()), cur: document.querySelector('.rail [aria-current="page"]').textContent.trim(), go: [...document.querySelectorAll('.rail [data-go]')].map((b) => b.dataset.go), pi: getComputedStyle(document.querySelector('.rail')).getPropertyValue('--pi').trim(), title: document.title }));
74
- ok('M1 the rail names four places, My work is current and the indicator sits on it', rail.names.join() === 'Briefing,My work,Board,Insights' && rail.cur === 'My work' && rail.go.join() === 'brief,work,init,rep' && rail.pi === '1', JSON.stringify(rail));
74
+ ok('M1 the rail names five places, My work is current and the indicator sits on it', rail.names.join() === 'Briefing,My work,Chat,Board,Insights' && rail.cur === 'My work' && rail.go.join() === 'brief,work,chat,init,rep' && rail.pi === '1', JSON.stringify(rail));
75
75
  { await p.click('#moreBtn'); const tc = await p.evaluate(() => { const a = document.querySelector('#toConsole'); if (!a) return null; const r = a.getBoundingClientRect(); return { href: a.getAttribute('href'), label: a.getAttribute('aria-label'), w: Math.round(r.width), h: Math.round(r.height), tab: a.tabIndex }; }); ok('M1 the ⋯ menu links to the console (premium-console-link, premium-topbar)', tc && tc.href === '/console.html' && tc.label === 'Open the console' && tc.w >= 44 && tc.h >= 44 && tc.tab === 0, JSON.stringify(tc)); await p.keyboard.press('Escape'); }
76
76
  const res = await fetch(BASE + '/premium-work').then((r) => r.status);
77
77
  ok('M13 My work has no Calendar card: the Briefing holds the calendar (premium-calendar-card A1)', await p.evaluate(() => !document.querySelector('#weekCard') && ![...document.querySelectorAll('h2')].some((h) => /Calendar|This week/.test(h.textContent))));
@@ -1,4 +1,38 @@
1
1
  [
2
+ {
3
+ "v": "0.364.0",
4
+ "at": "2026-10-21T00:58:08.077Z",
5
+ "f": 2,
6
+ "prs": [
7
+ {
8
+ "n": 967,
9
+ "t": "Chat is its own page, with the sessions on it",
10
+ "s": "Chat is its own page, with the sessions on it"
11
+ },
12
+ {
13
+ "n": 970,
14
+ "t": "Each tool the Briefing uses gets a stored read (briefing-source-flow, slice 1)",
15
+ "s": "Each tool the Briefing uses gets a stored read (briefing-source-flow, slice 1)"
16
+ }
17
+ ]
18
+ },
19
+ {
20
+ "v": "0.363.0",
21
+ "at": "2026-10-21T00:46:24.704Z",
22
+ "f": 2,
23
+ "prs": [
24
+ {
25
+ "n": 965,
26
+ "t": "Chat is the big middle place in the premium rail",
27
+ "s": "Chat is the big middle place in the premium rail"
28
+ },
29
+ {
30
+ "n": 966,
31
+ "t": "The meeting detail is one scroll with a short head on a phone",
32
+ "s": "The meeting detail is one scroll with a short head on a phone"
33
+ }
34
+ ]
35
+ },
2
36
  {
3
37
  "v": "0.362.0",
4
38
  "at": "2026-10-21T00:23:03.151Z",