create-pmos 0.388.0 → 0.389.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 (35) hide show
  1. package/package.json +13 -13
  2. package/payload/KIT-VERSION +1 -1
  3. package/payload/planning/evals/eval-calibration.md +1 -1
  4. package/payload/planning/okrs/health-budgets.md +1 -1
  5. package/payload/state/discoveries.md +1 -1
  6. package/workspace/briefing-premium-insights-test.js +16 -21
  7. package/workspace/changelog.json +12 -0
  8. package/workspace/guide/briefing-premium.md +19 -9
  9. package/workspace/lib/briefing-premium-agent.js +3 -0
  10. package/workspace/lib/report-chat.js +37 -0
  11. package/workspace/package-lock.json +2 -2
  12. package/workspace/package.json +1 -1
  13. package/workspace/premium-chat-chart-tab-test.js +150 -0
  14. package/workspace/premium-chat-report-tab-test.js +127 -0
  15. package/workspace/public/pm/goal-chat.js +2 -1
  16. package/workspace/public/pm/premium-chart-draw.js +58 -0
  17. package/workspace/public/pm/premium-chart-tab.js +157 -0
  18. package/workspace/public/pm/premium-chat.js +8 -2
  19. package/workspace/public/pm/premium-insights.js +17 -79
  20. package/workspace/public/pm/premium-report-tab.js +233 -0
  21. package/workspace/public/pm/premium-shell.js +35 -3
  22. package/workspace/public/pm/premium-vw-report.css +60 -0
  23. package/workspace/public/pm/premium.css +1 -120
  24. package/workspace/public/pm/report-chat.js +89 -0
  25. package/workspace/test-lists/premium-chat-chart-tab.json +12 -0
  26. package/workspace/test-lists/premium-chat-report-tab.json +12 -0
  27. package/workspace/premium-studio-chart-test.js +0 -193
  28. package/workspace/premium-studio-report-test.js +0 -277
  29. package/workspace/premium-studio-test.js +0 -185
  30. package/workspace/public/pm/premium-studio-design.js +0 -298
  31. package/workspace/public/pm/premium-studio-report.js +0 -291
  32. package/workspace/public/pm/premium-studio.js +0 -453
  33. package/workspace/test-lists/premium-studio-chart.json +0 -13
  34. package/workspace/test-lists/premium-studio-report.json +0 -9
  35. package/workspace/test-lists/premium-studio.json +0 -9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-pmos",
3
- "version": "0.388.0",
3
+ "version": "0.389.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.389.0",
37
+ "at": "2026-10-21T22:57:56.719Z",
38
+ "f": 2,
39
+ "prs": [
40
+ {
41
+ "n": 1001,
42
+ "t": "Reports, charts and dashboards from any chat; the Insight Studio is removed",
43
+ "s": "Reports, charts and dashboards from any chat; the Insight Studio is removed"
44
+ }
45
+ ]
46
+ },
35
47
  {
36
48
  "v": "0.388.0",
37
49
  "at": "2026-10-21T22:35:51.404Z",
@@ -289,18 +301,6 @@
289
301
  "s": "The Chat button draws cleanly on the Chat page"
290
302
  }
291
303
  ]
292
- },
293
- {
294
- "v": "0.369.0",
295
- "at": "2026-10-21T02:18:50.229Z",
296
- "f": 2,
297
- "prs": [
298
- {
299
- "n": 974,
300
- "t": "Insights' first screen shows the list, not the empty card (calmer first screen 2/5)",
301
- "s": "Insights' first screen shows the list, not the empty card (calmer first screen 2/5)"
302
- }
303
- ]
304
304
  }
305
305
  ]
306
306
  }
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@e49a7af3
1
+ kernel-source: pmos@63a88212
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-21T22:35:48Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-21T22:57:53Z"}
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-21T22:35:48Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-21T22:57:53Z"}
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-21T22:35:48Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-21T22:57:53Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -169,21 +169,16 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
169
169
  await q.click('#repBody [data-d="pd-1"]'); await sleep(200);
170
170
  const sv = await q.evaluate(() => ({ tiles: [...document.querySelectorAll('#dashBody .mch .mlab')].map((e) => e.firstChild.textContent), gone: [...document.querySelectorAll('#dashBody .dplist .nempty')].map((e) => e.textContent.replace(/\s+/g, ' ')), bar: document.querySelector('#dashBar').textContent, purpose: document.querySelector('#dashPurpose').textContent }));
171
171
  ok('R1 a saved dashboard draws its charts in its order and says which chart is gone, in its place', sv.tiles.join() === 'Partner activation,Time to first call' && sv.gone.length === 1 && /krm-gone.*No KR metric record is called krm-gone/.test(sv.gone[0]) && /Monday partner review/.test(sv.purpose) && /Pin.*Back to All measures.*Edit/.test(sv.bar), JSON.stringify(sv));
172
- await (async (pg, sel) => { if (await pg.locator('#dashBar').isHidden()) await pg.click('#dashMore'); await pg.click(sel); })(q, '#pdEdit'); await dlgOn();
173
- const chipv = (k) => q.evaluate((x) => (document.querySelector(`#oMain [data-st="chip|${x}"] b`) || {}).textContent || '', k);
174
- await q.click('#oMain [data-st="chip|charts"]');
175
- const ed = await q.evaluate(() => ({ eye: document.querySelector('#dEye').textContent, rows: [...document.querySelectorAll('#stTr .sul li > span:first-child')].map((b) => b.childNodes[0].textContent) }));
176
- ok('R2 Edit opens the Studio with the name, Main and the charts in order', /^Insight Studio · /.test(ed.eye) && await chipv('name') === 'Weekly partner review' && await chipv('main') === 'Yes' && ed.rows.join() === 'Partner activation,Time to first call,krm-gone', JSON.stringify(ed));
177
- await q.click('#stTr [data-st="mv|1|-1"]'); await q.click('#stTr [data-st="rm|2"]'); await q.click('#oMain [data-st="lib"]'); await q.click('#stLb [data-st="libc|krm-up"]');
178
- await q.click('#oMain [data-st="chip|name"]'); await q.fill('#stI', 'Monday review'); await q.click('#oMain [data-st="save"]'); await sleep(400);
179
- ok('R2 Save posts the dashboard with the new order, name and Main to the one save route', last()[0] === '/api/premium-dashboards/save' && JSON.stringify(last()[1]) === JSON.stringify({ ws: 'w1', board: 'w1', id: 'pd-1', name: 'Monday review', purpose: 'The measures the Monday partner review reads.', charts: ['krm-ttfc', 'krm-act', 'krm-up'], main: true }), JSON.stringify(last()));
180
- await q.click('#listNew'); await q.click('#pdNew'); await dlgOn(); await q.click('#oMain [data-st="save"]'); await sleep(200);
181
- ok('R2 a new dashboard without a name says so and posts nothing', /Give the dashboard a name/.test(await qt('#stMsg')) && last()[1].id === 'pd-1');
182
- answer = () => ({ ok: false, error: '“Weekly partner review” is already a dashboard on this board.' });
183
- await q.click('#oMain [data-st="chip|name"]'); await q.fill('#stI', 'Weekly partner review'); await q.click('#oMain [data-st="chip|use"]'); await q.fill('#stI', 'x'); await q.click('#oMain [data-st="save"]'); await sleep(300);
184
- ok('R7 the server\'s refusal is shown in words and the dialog stays open', /already a dashboard on this board/.test(await qt('#stMsg')) && await q.evaluate(() => document.querySelector('#dlg').classList.contains('on') && !document.querySelector('#oMain [data-st="save"]').disabled));
185
- answer = (u, b) => ({ ok: true, dashboard: { id: b.id || 'pd-9' }, dashboards: [], setup: {}, drafted: { slot: '2026-10-23', path: 'planning/reports/release-readiness/2026-10-23.md' } });
186
- await shut();
172
+ await q.route('**/premium-chat.html*', (r) => r.fulfill({ status: 200, contentType: 'text/html', body: '<!doctype html><title>chat</title>' }));
173
+ await Promise.all([q.waitForURL(/premium-chat\.html/), (async (pg, sel) => { if (await pg.locator('#dashBar').isHidden()) await pg.click('#dashMore'); await pg.click(sel); })(q, '#pdEdit')]);
174
+ const u1 = new URL(q.url());
175
+ ok('R2 Edit opens the Chat page with the saved dashboard in its tab: the Insight Studio is removed', u1.searchParams.get('open') === 'dashboard:pd-1' && u1.searchParams.get('ws') === 'w1', u1.search);
176
+ await q.goBack(); await until(() => q.evaluate(() => !!document.querySelector('#repBody [data-d="pd-1"]')));
177
+ await q.click('#listNew'); await Promise.all([q.waitForURL(/premium-chat\.html/), q.click('#pdNew')]);
178
+ const u2 = new URL(q.url());
179
+ ok('R2 New, then Dashboard, opens the Chat page with a first message for the PM to send, and posts nothing', u2.searchParams.get('say') === 'Make a dashboard of ' && !u2.searchParams.get('open') && !sent.length, u2.search);
180
+ await q.goBack(); await until(() => q.evaluate(() => !!document.querySelector('#repBody [data-d="pd-1"]')));
181
+ await q.click('#repBody [data-d="pd-1"]'); await sleep(200);
187
182
  await (async (pg, sel) => { if (await pg.locator('#dashBar').isHidden()) await pg.click('#dashMore'); await pg.click(sel); })(q, '#pdBack'); await q.locator('#dashBody .lk[data-open="ins:krm-up"]').click(); await dlgOn(); await q.click('#oMain [data-pdsw="pd-1"]'); await sleep(300);
188
183
  ok('R3 the chart dialog\'s switch saves that dashboard with the chart added', last()[0] === '/api/premium-dashboards/save' && JSON.stringify(last()[1].charts) === JSON.stringify(['krm-act', 'krm-ttfc', 'krm-gone', 'krm-up']) && /Added to Weekly partner review/.test(await qt('#pdSwM')), JSON.stringify(last()));
189
184
  await shut();
@@ -214,7 +209,7 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
214
209
  await shut();
215
210
  await q.click('#repBody [data-setup="partner-update"]'); await dlgOn();
216
211
  const su = await q.evaluate(() => ({ kv: document.querySelector('#oMain .kv2').textContent, acts: [...document.querySelectorAll('#oMain [data-rx]')].map((b) => b.dataset.rx).join() }));
217
- ok('R4 a set-up report shows its schedule and next draft, with Draft it now, Pause and Shape it in the Studio', /ScheduleEvery other Monday at 09:00/.test(su.kv) && /Next draft26 Oct/.test(su.kv) && su.acts === 'draft,pause,studio', JSON.stringify(su));
212
+ ok('R4 a set-up report shows its schedule and next draft, with Draft it now, Pause and Shape it in a chat', /ScheduleEvery other Monday at 09:00/.test(su.kv) && /Next draft26 Oct/.test(su.kv) && su.acts === 'draft,pause,studio', JSON.stringify(su));
218
213
  await q.click('#oMain [data-rx="pause"]'); await sleep(300);
219
214
  ok('R4 Pause posts that report', last()[0] === '/api/report-setups/pause' && last()[1].id === 'partner-update', JSON.stringify(last()));
220
215
  ok('R7 every press went to the dashboard save route or an existing report-setups route; an opened popup is only recorded (seen)', R.posts.every((x) => /^POST \/api\/(premium-dashboards\/save|report-setups\/(ask|change|cancel|setup|dismiss|pause|resume|draft)|briefing-premium\/seen)$/.test(x)), R.posts.join());
@@ -297,13 +292,13 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
297
292
  await pg.goto(base2 + '/premium-insights.html');
298
293
  ok('E7 the real page draws that chart with the record\'s numbers and no script error', await until(() => pg.evaluate(() => { const t = document.querySelector('#dashBody .mch'); return !!t && t.querySelector('.mval').textContent === '30%' && /Partner activation/.test(t.textContent); }), 20000) && errs.length === 0, errs.join(' | '));
299
294
  /* briefing-premium-reports against the real server: New dashboard, Save, the switch, then the ledger answers it back */
300
- await pg.click('#listNew'); await pg.click('#pdNew'); await until(() => pg.evaluate(() => document.querySelector('#dlg').classList.contains('on')));
301
- await pg.click('#oMain [data-st="chip|name"]'); await pg.fill('#stI', 'Partner review'); await pg.click('#oMain [data-st="chip|use"]'); await pg.fill('#stI', 'The Monday partner review.');
302
- await pg.click('#stLb [data-st="libc|' + m.charts[0].id + '"]'); await pg.click('#oMain [data-st="chip|main"]'); await pg.click('#stTr [data-st="set|main|1"]'); await pg.click('#oMain [data-st="save"]');
303
- ok('E8 a dashboard made on the real page as the main one is saved, pinned and drawn at the top', await until(() => pg.evaluate(() => !document.querySelector('#dlg').classList.contains('on') && document.querySelector('#hDash').textContent === 'Partner review' && document.querySelector('#dashTag').textContent === 'Pinned' && document.querySelectorAll('#dashBody .mch').length === 1), 10000), await pg.evaluate(() => (document.querySelector('#pdM') || {}).textContent + ' / ' + document.querySelector('#hDash').textContent + ' ' + document.querySelector('#dashTag').textContent));
295
+ const H = await T.pressHeaders(base2);
296
+ const made = await fetch(base2 + '/api/premium-dashboards/save', { method: 'POST', headers: H, body: JSON.stringify({ ws: m.board.ws, board: m.board.id, name: 'Partner review', purpose: 'The Monday partner review.', charts: [m.charts[0].id], main: true }) }).then((x) => x.status);
297
+ await pg.reload();
298
+ ok('E8 a dashboard saved as the main one (a press in the Chart tab) is pinned and drawn at the top of the real page', made === 200 && await until(() => pg.evaluate(() => document.querySelector('#hDash').textContent === 'Partner review' && document.querySelector('#dashTag').textContent === 'Pinned' && document.querySelectorAll('#dashBody .mch').length === 1), 10000), await pg.evaluate(() => (document.querySelector('#pdM') || {}).textContent + ' / ' + document.querySelector('#hDash').textContent + ' ' + document.querySelector('#dashTag').textContent));
304
299
  const j2 = await (await fetch(base2 + '/api/insights-premium')).json(), d2 = j2.model.dashboards.find((d) => d.saved);
305
300
  ok('E8 the model reads it back from the ledger', !!d2 && d2.name === 'Partner review' && d2.main && d2.charts.join() === m.charts[0].id, JSON.stringify(d2));
306
- const H = await T.pressHeaders(base2), body = JSON.stringify({ ws: m.board.ws, board: m.board.id, name: 'From an agent', purpose: 'x', charts: [] });
301
+ const body = JSON.stringify({ ws: m.board.ws, board: m.board.id, name: 'From an agent', purpose: 'x', charts: [] });
307
302
  const asAgent = await fetch(base2 + '/api/premium-dashboards/save', { method: 'POST', headers: { ...H, 'x-pmos-session': 's1' }, body }).then((x) => x.status);
308
303
  const noNonce = await fetch(base2 + '/api/premium-dashboards/save', { method: 'POST', headers: { 'Content-Type': 'application/json', Origin: base2 }, body }).then((x) => x.status);
309
304
  const unknown = await fetch(base2 + '/api/premium-dashboards/save', { method: 'POST', headers: H, body: JSON.stringify({ ws: m.board.ws, board: m.board.id, name: 'Other', purpose: 'x', charts: ['krm-none'] }) }).then((x) => x.status);
@@ -1,4 +1,16 @@
1
1
  [
2
+ {
3
+ "v": "0.389.0",
4
+ "at": "2026-10-21T22:57:56.719Z",
5
+ "f": 2,
6
+ "prs": [
7
+ {
8
+ "n": 1001,
9
+ "t": "Reports, charts and dashboards from any chat; the Insight Studio is removed",
10
+ "s": "Reports, charts and dashboards from any chat; the Insight Studio is removed"
11
+ }
12
+ ]
13
+ },
2
14
  {
3
15
  "v": "0.388.0",
4
16
  "at": "2026-10-21T22:35:51.404Z",
@@ -359,15 +359,7 @@ Insights is the fifth place on the rail, at `/premium-insights.html`. It reads t
359
359
  - **The insight.** The page opens with one finding across the board's measures, in a large line, with the reason and its numbers under it, up to two more findings, **Ask PMOS why** (opens the measure's dialog on the Conversation tab) and **See the chart**. A measure that is short of its target, with a target date after its last reading, gets a projection: a straight line through its last four readings (all, when fewer), carried to the target date. When the line lands short, the finding says the measure will miss its target on that date at this pace, where it lands, how far short, and when it would get there. When the line lands on or past the target, it says the measure is on course. The page says how the projection is made, and no forecast line is drawn on a chart. With no KR metric, or none with two readings, the page says there is no insight yet and why.
360
360
  - **The pinned dashboard.** The card under the insight shows the pinned dashboard: its insight band (the next findings on it, past the one the page leads with), and its charts. Its **⋯** holds **Unpin** (or **Pin**, with Not pinned when nothing is pinned), **Back to** the pinned one, **Edit** and **New chart**, and its **ⓘ** says what the dashboard is for. When nothing can be charted yet, the card is hidden and All measures is a row of the list; the insight's explanation is then behind the **ⓘ** next to Insight. Pressing a dashboard in the list shows it in this card. One dashboard per board is pinned, All measures included; pillar groups cannot be pinned. The pin is a line in `premium-dashboards.jsonl` and shows on Insights only.
361
361
  - **Dashboards and reports.** One list holds the dashboards (All measures, your saved ones, then the pillars the metrics name) and then the reports (your set-up reports, then the report files). One chip in the card's head (**All** with its count) opens **All**, **Dashboards** and **Reports**, and shows only when the list holds both kinds; it shows six rows to a page, with page numbers. A dashboard row shows its top finding and a pin. A report row quotes the opening sentence of its latest file; a set-up report with no file says no draft is written yet. **New** offers **Dashboard** or **Report**. Your requests and what PMOS found in your work stay at the top of the list. A saved dashboard draws its charts in the order you saved them. A chart whose record is gone, or that has fewer than two readings, is listed in its place with the reason and is not drawn.
362
- - **Open the Studio.** **New**, then **Dashboard**, opens the Insight Studio on a new dashboard, and **Edit** in the dashboard's **⋯** opens it on the saved dashboard you are looking at. Chat in the rail opens the Chat page, not the Studio.
363
- - **Make or edit a dashboard.** **+** (at the left of the report input), then **Dashboard**, or **Edit** on a saved one, opens the **Insight Studio**, a wide dialog. On the right, the brief shows the Name, Purpose, Charts and Main dashboard; press a chip to change it. **Library** lists the board's measures and saved dashboards to add. The preview draws the dashboard as the page will, and lists a measure with no series as not drawn. The checks (a name, a purpose, a chart, six or fewer, no repeat, a main dashboard on the board) say what fails, with a one-press fix. On the left you can say it instead: "add Partner activation", "remove …", "move … first", "call it …", "it is for …", "make it the main dashboard", "undo" or "start a new one". A turn changes the draft only. **Undo** steps back one change. **Save the dashboard** records it; **Remove the dashboard** asks once more and then removes it. In a chart's dialog, **On your dashboards** has a switch for each saved dashboard, which adds the chart to it or takes it off.
364
- - **Make your own chart.** **New chart**, or **Edit** on one of your charts, opens the Insight Studio in **Chart** mode; the switch at the top moves between Chart and Dashboard, and each keeps its own draft. The brief shows the Question, Measure, Form (line, bars, number or meter), Range (all readings or the last few) and Target; **More** adds the Title, Better when, Note and Add to (a dashboard). The Studio suggests a form from the question and says why. The checks (a question, a target, enough readings, a form that fits the question, one scale) say what fails, with a one-press fix. You can say it instead: "show it as bars", "last 4 readings", "target 35", "lower is better", "call it …", "note: …", "add it to Weekly", or a question. A pie is declined, with the reason. **Save the chart** records it in the workspace's state folder, and adds it to the dashboard you named. Your charts are listed under **All measures**, and a dashboard can hold them beside the measures. **Remove the chart** asks once more; a dashboard that held it then says it was removed.
365
- - **Set up a report in the Studio.** **+**, then **Report**, opens the Insight Studio in **Report** mode. The brief shows the Title, What it answers, Audience, Format, Schedule, Draw from (your work, or the board's dashboard) and the Sections. A new report always has the same sections, in the same order, so they are listed, not edited. The checks (what it answers, an audience, a format that fits the audience, a new title, the answer first) say what fails, with a one-press fix. You can say it instead: "it answers: …", "for leadership", "slides", "monthly", "every two weeks on Thursday", "call it …". **Set it up** records the report and writes its first draft as a file.
366
- - **Change the size of the Studio.** On a wide window, **Normal**, **Half**, **3/4** and **Whole** sit beside **Library**. Whole is the full screen. At Half, the conversation and the Studio are two tabs. The Studio opens on Whole, and PMOS remembers your choice on this browser.
367
- - **Shape a report's sections.** On a report drawn from your work, **Shape it in the Studio** opens Report mode on it. Tell PMOS how to shape the sections in your own words; PMOS proposes the next version and says what it changed. **Leave out** on a section makes the next version without it; the headline, Needs your call and Sources are always in. **Undo** goes back one version. **Use this structure** saves the version shown, and the next cycle follows it.
368
- - **Design how a report looks.** A set-up report in the Studio has two tabs: **1 Structure** (what it says) and **2 Design** (how it looks). The Design tab shows the versions D1 to Dn, the slides of the one shown (a large preview, previous and next, and thumbnails), and the samples the look follows. **Add a file** (PDF, PowerPoint, Word or an image) or **Add the link** (Google or Confluence) adds a sample, and PMOS says what it took from it. Say how it should look, for example "use the theme of my picture", and PMOS makes the next version. Pick a version to look at it. **Undo** goes back one version. **This is it** saves the version shown as the design, and each new cycle is drawn to it. When you open a report again, both tabs show what was said before.
369
- - **Choose a deck or a document, and read the design brief.** On the Design tab, the **Format** chip offers **Deck** and **Document** for the next version. Versions you already made keep their form. Once a design is saved, a **Design brief** chip shows what PMOS reads each cycle: your description, your samples, the reference version, and what stays the same, what changes and what PMOS learned. The cycles drafted to match it are checked on the report itself.
370
- - **Point, make the next version, compare.** On the Design tab, click any part of a slide to attach a request to that spot: a numbered pin appears, and you type the request under the preview (**Point and say**; the switch turns pointing off). **Make the next version** sends the typed line and every pinned request to PMOS, which makes the next version; the pins are cleared once it starts. **Compare two** shows the same slide of two versions side by side; pick the version on each side.
362
+ - **Make or change a dashboard, a chart or a report in a chat.** There is no Insight Studio. **+**, then **Dashboard** or **Report**, and **New chart** in the dashboard's **⋯**, open the Chat page with a first line in the message box ("Make a dashboard of ") for you to finish and send. **Edit** on a saved dashboard or one of your charts, and **Shape it in a chat** on a report drawn from your work, open the Chat page with it in its tab beside the conversation. See [Reports from a chat](#reports-from-a-chat).
371
363
  - **The findings.** Each finding is one sentence with its reason, taken from the series: will miss its target at this pace, on course, behind its line for three readings in a row, behind and still moving away from the target, closing in, slipped, reached its target, or a large one-step move. No cause is given.
372
364
  - **Board measures.** The same four tiles as the Board's Metrics card, counted from the board's repository and drawn the same way. Choose **8 weeks**, **26 weeks** or **52 weeks**; the page keeps your choice. Press a measure to read its definition and values and to set its target: type a number and press **Save target**, or press **Clear target**. For Corrections, Blocked and Idle, lower is better, so the target is the most you accept; for Merged a week it is the least. The target goes to the workspace's state folder (`board-metric-targets.jsonl`) and the Board draws it too. An agent session cannot set one.
373
365
  - **No series recorded.** A KR metric with one reading or none is listed with the reason and is not drawn.
@@ -445,6 +437,24 @@ Every popup has this chat, including the ones that have no row of their own: a t
445
437
 
446
438
  Sending and the option presses need the page's launch nonce, so an agent session cannot type into your chat.
447
439
 
440
+ ### Reports from a chat
441
+
442
+ Any chat can become a report. There is no button for it: say it in the chat, for example "make this a report for the growth leads" or "make it weekly on Wednesdays". Claude answers in a few lines, and the **Report** tab opens beside the conversation (on a phone, a bar over the message box offers it). The chip under Claude's answer opens the tab again.
443
+
444
+ - **A new report** shows its name, what it answers, who reads it, its format and the seven sections every new report has. **Set it up** records it and writes its first draft. If you did not say a schedule, its **Schedule** is **Off**: it runs once, and you can give it a schedule later.
445
+ - **Schedule** is a chip on the tab. Press it to pick **Off**, **Daily**, **Weekly**, **Every two weeks** or **Monthly**, and a day for a weekly one. Or say it in the chat; Claude's proposal shows with **Change the schedule**. Off pauses the template and keeps its schedule for later.
446
+ - **Structure** and **Design** show the report's versions (S1, S2, … and D1, D2, …). Say a change in the chat ("leave out the timeline", "use the theme of my sample"); the tab shows it with **Make the next version**. **Use this** or **This is it** saves the version shown, and **Undo** goes back one.
447
+ - **Reports** lists the template's cycles. A **draft** can be discarded until it is issued. An **issued** report is kept for good: it can be archived (hidden) and brought back, never deleted.
448
+ - **Delete template** stops its schedule now. Its issued reports and its open draft stay, with its name.
449
+
450
+ Charts and dashboards work the same way. Say "chart partner activation as bars" or "make a dashboard for the Monday partner review", and the **Chart** or **Dashboard** tab opens beside the conversation.
451
+
452
+ - **A chart** is drawn from the readings of one KR metric record, as Insights draws it. **Line**, **Bars**, **Number** and **Meter** redraw it; a meter needs a target. **Save chart** saves it, and it shows on Insights under Your charts. A saved chart has **Delete chart**, which asks first.
453
+ - **A dashboard** draws its charts in order and names any measure with fewer than two readings. **Save dashboard** saves it to the list on Insights, where you pin it. A saved dashboard has **Delete dashboard**, which asks first. Its charts and records stay.
454
+ - To change a saved one, ask in the chat; the tab shows the change with **Save the change**.
455
+
456
+ Claude never sets up, schedules or deletes a report, a chart or a dashboard itself. Every change is a press on the tab, and the routes refuse an agent session.
457
+
448
458
  ### Notes
449
459
 
450
460
  Notes is a notepad for each conversation. Open it from **+** › **Notes**. It opens in the viewer beside the conversation. On a phone, it opens on the viewer tab.
@@ -15,6 +15,7 @@ const path = require('path');
15
15
  const crypto = require('crypto');
16
16
  const headless = require('./headless.js');
17
17
  const Goal = require('./goal-chat.js');
18
+ const ReportChat = require('./report-chat.js');
18
19
 
19
20
  const THREADS = 'briefing-premium-threads.jsonl';
20
21
  const KEY_RE = /^(decision|blocked|waited|src|ev|work|board|init|doc|ins|chat|pop):[A-Za-z0-9][A-Za-z0-9._:-]{0,100}$/; // chat: the PM's own chat on the Chat page (premium-chat-page); pop: a popup with no row of its own (premium-popup-context P1)
@@ -193,6 +194,8 @@ function chat({ runtimeDir, key, text, model, context, sessions, wsId, now = new
193
194
  let msg = q, goal = null;
194
195
  const cmd = Goal.parseCommand(q);
195
196
  if (cmd) { const b = Goal.begin({ runtimeDir, key, text: cmd.text, now }); if (b.error) return fail(400, b.error); msg = b.prompt; goal = b.id; }
197
+ // premium-reports-from-chat R1: a message about a report, a chart or a dashboard carries the pmos-report rule (lib/report-chat.js)
198
+ else if (ReportChat.isAsk(q)) msg = ReportChat.wrap(q);
196
199
  const extra = goal ? { goal } : {};
197
200
  if (alive) {
198
201
  if (!sessions.type(live, msg)) return fail(409, 'The message did not reach the session. Open it in Sessions.');
@@ -0,0 +1,37 @@
1
+ 'use strict';
2
+ /* report-chat — reports, charts and dashboards from any chat (initiative premium-reports-from-chat, slices B and C; PRD R1–R4, C1–C3).
3
+ * There is no button: the PM says "make this a report" in the chat. When a message asks for a report, a chart or a dashboard, the chat route
4
+ * types it into the session with a PMOS rule first. The rule asks Claude to end its answer with one fenced `pmos-report` JSON block. The page
5
+ * (public/pm/report-chat.js) splits that block off and shows it in the Report or Chart tab beside the conversation.
6
+ * Claude never sets up, schedules, changes or deletes a report, a chart or a dashboard itself. Every write is the PM's press in the tab, through the
7
+ * report-setups, report-structure, report-design, premium-charts and premium-dashboards routes, which refuse an agent session (D65: propose-only). */
8
+
9
+ // The first line of every message PMOS wraps. The page reads it to show the PM's turn as typed (public/pm/goal-chat.js shownUser).
10
+ const MARK = '[PMOS report]';
11
+ const SAYS = 'The PM says: ';
12
+ // A message about a report, a chart or a dashboard. Other messages go to the session as typed.
13
+ const ASK_RE = /\b(reports?|charts?|graphs?|dashboards?)\b/i;
14
+
15
+ const isAsk = (text) => ASK_RE.test(String(text == null ? '' : text)) && !String(text).trim().startsWith('/');
16
+
17
+ const RULE = [
18
+ 'If the PM asks for a report, a chart or a dashboard, or asks to change, schedule or stop one, do the reading yourself and answer in a few lines.',
19
+ 'Then end your message with ONE fenced code block with the language tag pmos-report, holding one JSON object. The page shows it in a Report or Chart tab beside this chat.',
20
+ 'You never set up, schedule, change or delete a report yourself, and you never write report-setups.jsonl: the PM presses in the tab.',
21
+ '- A new report: {"kind":"report","proposal":{"name":"short name","purpose":"what it answers, one line","audience":"who reads it","output":"google-doc|google-slides|google-sheets|confluence|pdf","schedule":null,"sources":["what it draws from"]}}',
22
+ ' schedule stays null unless the PM named one; then it is {"cadence":"daily|weekly|bi-weekly|monthly","day":"Mon","dayOfMonth":1,"time":"09:00"}. A report with no schedule runs once.',
23
+ '- A report that is set up already: {"kind":"report","id":"<its id>"} and, only when the PM asked for it, "schedule": {…} or "off", "structure": "the change to its sections, in the PM\'s words", "design": "the change to its look, in the PM\'s words".',
24
+ ' The set-up reports are the setup lines of report-setups.jsonl (planning/ or pmos/state/); a later change line wins, a remove line deletes one.',
25
+ '- A chart of one measure: {"kind":"chart","proposal":{"measure":"<KR metric id>","title":"short title","question":"what it answers","form":"line|bars|number|meter","range":null,"target":null,"better":"higher|lower","note":""}}',
26
+ ' measure is the id of a KR metric record (planning/records/kr-metrics.jsonl). range is how many of the latest readings to draw, or null for all. A meter needs a target.',
27
+ ' To change a saved chart, add its "id" (pc-…, from premium-charts.jsonl in the state folder) and put the whole changed chart in proposal; {"kind":"chart","id":"pc-…"} alone opens it.',
28
+ '- A dashboard: {"kind":"dashboard","proposal":{"name":"short name","purpose":"the routine it serves","charts":["KR metric ids or saved chart ids, in order"]}}. Six charts or fewer serve one routine.',
29
+ ' To change a saved dashboard, add its "id" (from premium-dashboards.jsonl in the state folder); {"kind":"dashboard","id":"…"} alone opens it.',
30
+ ' You never save, change or delete a chart or a dashboard yourself either: the PM presses Save in the Chart tab.',
31
+ 'If the message is not about a report, a chart or a dashboard, answer it and add no block.',
32
+ ].join('\n');
33
+
34
+ /** The message as PMOS types it into the session: the rule, then the PM's words. */
35
+ function wrap(text) { return MARK + ' ' + RULE + '\n\n' + SAYS + String(text == null ? '' : text); }
36
+
37
+ module.exports = { MARK, isAsk, wrap, RULE };
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.388.0",
3
+ "version": "0.389.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pmos-workspace",
9
- "version": "0.388.0",
9
+ "version": "0.389.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.388.0",
3
+ "version": "0.389.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",
@@ -0,0 +1,150 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+ /* premium-chat-chart-tab-test.js — charts and dashboards from any chat, and the Insight Studio removed (initiative premium-reports-from-chat,
4
+ * slice C; PRD C1–C3). A real server on a scratch repository whose KR metric records hold two measures with a series and one without. The thread and
5
+ * the session's conversation are routed, so Claude's answers are set here; every save goes to the real premium-charts and premium-dashboards routes.
6
+ * C1 a chart block is a chip; it opens the Chart tab with the measure drawn from its readings, as proposed (bars)
7
+ * C2 a form pick redraws the chart and writes nothing; Save chart saves it with the picked form; Delete chart asks once and removes it
8
+ * C3 a dashboard block draws its charts in order and names a measure with no series; Save dashboard saves it
9
+ * I1 Insights has no Studio: Edit on a saved dashboard opens the Chat page with its tab; New chart opens it with a first message in the box
10
+ * F1 no page error and no sideways scroll at 1280 and 390
11
+ * Set CHART_TAB_SHOTS=<dir> to save the page at 1280 and 390. */
12
+ const fs = require('fs');
13
+ const os = require('os');
14
+ const path = require('path');
15
+ const { spawn } = require('child_process');
16
+ const { findBrowser } = require('./lib/find-browser');
17
+ const T = require('./test-run').configure({ name: 'premium-chat-chart-tab' });
18
+ const PC = require('./lib/premium-charts.js');
19
+ const PD = require('./lib/premium-dashboards.js');
20
+
21
+ const BASE = T.BASE;
22
+ const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
23
+ const until = async (fn, ms = 15000, step = 150) => { const t0 = Date.now(); for (;;) { let v; try { v = await fn(); } catch { v = null; } if (v) return v; if (Date.now() - t0 > ms) return v; await sleep(step); } };
24
+ const results = [];
25
+ const ok = (name, cond, extra = '') => { results.push({ name, cond: !!cond }); console.log(`${cond ? '✓' : '✗'} ${name}${!cond && extra !== '' ? ' — ' + String(extra).slice(0, 500) : ''}`); };
26
+ let srv = null, browser = null;
27
+ const finish = async (code) => {
28
+ if (browser) await browser.close().catch(() => {});
29
+ if (srv) { try { srv.kill('SIGKILL'); } catch { /* gone */ } }
30
+ T.killTmux();
31
+ const bad = results.filter((x) => !x.cond).length;
32
+ console.log(`\n${results.length - bad}/${results.length} premium-chat-chart-tab assertions passed`);
33
+ process.exit(code !== undefined ? code : (bad ? 1 : 0));
34
+ };
35
+ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
36
+
37
+ /* the scratch repository: Partner activation (5 readings), Time to first call (2 readings), Lonely (1 reading, no series) */
38
+ const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'chart-tab-repo-'));
39
+ const stateDir = fs.mkdtempSync(path.join(os.tmpdir(), 'chart-tab-state-'));
40
+ fs.mkdirSync(path.join(dir, 'planning', 'records'), { recursive: true });
41
+ const rd = (id, rid, at, value) => ({ id, kind: 'reading', rid, fields: { at, value } });
42
+ const L = [
43
+ { id: '1', kind: 'add', rid: 'krm-a', fields: { metric: 'Partner activation', baseline: 20, target: 50, by: '2026-12-31', pillar: 'Growth', unit: '%' } },
44
+ rd('2', 'krm-a', '2026-06-01', 20), rd('3', 'krm-a', '2026-07-01', 24), rd('4', 'krm-a', '2026-08-01', 30), rd('5', 'krm-a', '2026-09-01', 28), rd('6', 'krm-a', '2026-10-01', 33),
45
+ { id: '7', kind: 'add', rid: 'krm-t', fields: { metric: 'Time to first call', baseline: 10, target: 4, by: '2026-12-31', pillar: 'Growth', unit: ' days' } },
46
+ rd('8', 'krm-t', '2026-08-01', 9), rd('9', 'krm-t', '2026-10-01', 7),
47
+ { id: '10', kind: 'add', rid: 'krm-l', fields: { metric: 'Lonely', baseline: 1, target: 2, by: '2026-12-31' } }, rd('11', 'krm-l', '2026-10-01', 1),
48
+ ];
49
+ fs.writeFileSync(path.join(dir, 'planning', 'records', 'kr-metrics.jsonl'), L.map((x) => JSON.stringify(x)).join('\n') + '\n');
50
+
51
+ const block = (o) => '```pmos-report\n' + JSON.stringify(o) + '\n```';
52
+ const ASK = (t) => ({ role: 'user', text: '[PMOS report] rule\n\nThe PM says: ' + t });
53
+ const CHART = { kind: 'chart', proposal: { measure: 'krm-a', title: 'Partners activating', question: 'Are partners activating?', form: 'bars', range: null, target: 50, better: 'higher', note: '' } };
54
+ const DASH = { kind: 'dashboard', proposal: { name: 'Partner growth', purpose: 'The Monday partner review', charts: ['krm-a', 'krm-t', 'krm-l'] } };
55
+
56
+ const look = () => {
57
+ const pane = [...document.querySelectorAll('#dOut .obody.vw')].find((x) => !x.hidden && /^(chart|dashboard):/.test(x.dataset.vw || '')) || null;
58
+ return { chip: (document.querySelector('#dBody [data-report-open]') || {}).textContent || null, tabs: [...document.querySelectorAll('#vTabs .vtab')].map((t) => t.textContent.trim()),
59
+ pane: pane ? pane.textContent.replace(/\s+/g, ' ').trim() : null, tiles: pane ? [...pane.querySelectorAll('.mt1')].map((t) => t.className.split(' ').slice(0, 3).join(' ')) : [],
60
+ bars: pane ? pane.querySelectorAll('.bw i').length : 0, form: pane ? ((pane.querySelector('.rt-seg [aria-pressed="true"]') || {}).textContent || null) : null,
61
+ wide: document.documentElement.scrollWidth > innerWidth + 1, say: (document.querySelector('#askIn') || {}).value || '' };
62
+ };
63
+
64
+ (async () => {
65
+ const exe = findBrowser();
66
+ if (!exe) { console.log('✗ no Chrome/Chromium on this machine — the suite cannot run'); return finish(1); }
67
+ let chromium;
68
+ try { ({ chromium } = require('playwright-core')); } catch { console.log('✗ playwright-core is not installed'); return finish(1); }
69
+ srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT), PMOS_SELF_ROOT: dir, PMOS_STATE_DIR: stateDir }) });
70
+ await T.waitForServer(BASE);
71
+ browser = await chromium.launch({ executablePath: exe, headless: true, args: ['--no-sandbox'] });
72
+ const shots = process.env.CHART_TAB_SHOTS;
73
+ const board = (await (await fetch(BASE + '/api/insights-premium')).json()).model.board.id;
74
+ const open = async (width, messages, url = '/premium-chat.html') => {
75
+ const ctx = await browser.newContext({ viewport: { width, height: width < 1000 ? 844 : 860 }, hasTouch: width < 1000 });
76
+ const p = await ctx.newPage(); const errs = []; p.on('pageerror', (e) => errs.push(String(e)));
77
+ await p.route('**/api/briefing-premium/thread?**', (r) => r.fulfill({ json: { ok: true, turns: [], session: 's-ch', goal: null } }));
78
+ await p.route('**/api/sessions/conversation?**', (r) => r.fulfill({ json: { ok: true, state: 'conv', turn: 'pm', messages } }));
79
+ await p.goto(BASE + url);
80
+ await until(() => p.evaluate(() => document.querySelector('#dlg').classList.contains('on') && !!document.querySelector('#dBody .stream')));
81
+ await sleep(500);
82
+ return { p, ctx, errs };
83
+ };
84
+
85
+ { const { p, ctx, errs } = await open(1280, [ASK('chart partner activation as bars'), { role: 'assistant', text: 'Partner activation is at 33%.\n\n' + block(CHART) }]);
86
+ const s0 = await p.evaluate(look);
87
+ ok('C1 the chart block is a chip under Claude\'s words', /Partners activating/.test(s0.chip || '') && /New chart/.test(s0.chip || ''), JSON.stringify(s0));
88
+ await p.click('#dBody [data-report-open]');
89
+ const s1 = await until(async () => { const v = await p.evaluate(look); return v.pane && v.tiles.length ? v : null; }) || await p.evaluate(look);
90
+ ok('C1 the Chart tab draws the measure from its five readings as bars, as proposed', s1.tabs.includes('Chart') && /New chart/.test(s1.pane || '') && s1.bars === 5 && s1.form === 'Bars', JSON.stringify(s1));
91
+ if (shots) await p.screenshot({ path: `${shots}/chart-1280.png` });
92
+ await p.click('#dOut [data-ct="form|line"]');
93
+ const s2 = await until(async () => { const v = await p.evaluate(look); return v.form === 'Line' ? v : null; }) || await p.evaluate(look);
94
+ ok('C2 a form pick redraws the chart and writes nothing', s2.bars === 0 && /mch/.test(s2.tiles.join()) && PC.list(dir, board).length === 0, JSON.stringify(s2));
95
+ await p.click('#dOut [data-ct="save"]');
96
+ const s3 = await until(async () => { const v = await p.evaluate(look); return v.pane && /Saved\./.test(v.pane) ? v : null; }) || await p.evaluate(look);
97
+ const saved = PC.list(dir, board);
98
+ ok('C2 Save chart saves it with the picked form; the tab shows it saved', saved.length === 1 && saved[0].form === 'line' && saved[0].measure === 'krm-a' && saved[0].title === 'Partners activating' && /Saved chart/.test(s3.pane || ''), JSON.stringify([saved, s3.pane]));
99
+ await p.click('#dOut [data-ct="remove"]');
100
+ await p.click('#dOut .vcf [data-a="1"]');
101
+ const s4 = await until(async () => { const v = await p.evaluate(look); return v.pane && /Deleted\./.test(v.pane) ? v : null; }) || await p.evaluate(look);
102
+ ok('C2 Delete chart asks once, then the chart is removed', /Deleted\./.test(s4.pane || '') && PC.list(dir, board).length === 0, JSON.stringify(s4));
103
+ ok('F1 no page error and no sideways scroll (chart, 1280)', !errs.length && !s4.wide, errs.join(' | '));
104
+ await ctx.close(); }
105
+
106
+ { const { p, ctx, errs } = await open(1280, [ASK('a dashboard for the partner review'), { role: 'assistant', text: 'Here it is.\n\n' + block(DASH) }]);
107
+ await p.click('#dBody [data-report-open]');
108
+ const s1 = await until(async () => { const v = await p.evaluate(look); return v.pane && v.tiles.length ? v : null; }) || await p.evaluate(look);
109
+ ok('C3 the Dashboard tab draws two charts in order and names the measure with no series', s1.tabs.includes('Dashboard') && s1.tiles.length === 2 && /Partner growth/.test(s1.pane || '') && /Lonely/.test(s1.pane || '') && /fewer than two readings/.test(s1.pane || ''), JSON.stringify(s1));
110
+ if (shots) await p.screenshot({ path: `${shots}/dashboard-1280.png` });
111
+ await p.click('#dOut [data-ct="save"]');
112
+ await until(async () => { const v = await p.evaluate(look); return v.pane && /Saved\./.test(v.pane) ? v : null; });
113
+ const D = PD.list(dir, board);
114
+ ok('C3 Save dashboard saves it with its charts in order', D.length === 1 && D[0].name === 'Partner growth' && D[0].charts.join() === 'krm-a,krm-t,krm-l', JSON.stringify(D));
115
+ ok('F1 no page error (dashboard, 1280)', !errs.length, errs.join(' | '));
116
+ await ctx.close(); }
117
+
118
+ { const ctx = await browser.newContext({ viewport: { width: 1280, height: 860 } }), p = await ctx.newPage(), errs = [];
119
+ p.on('pageerror', (e) => errs.push(String(e)));
120
+ await p.goto(BASE + '/premium-insights.html');
121
+ await until(() => p.evaluate(() => !!document.querySelector('#dashBody .mch')));
122
+ const D = PD.list(dir, board)[0];
123
+ await p.evaluate((id) => { const r = document.querySelector(`[data-d="${id}"]`); if (r) r.click(); }, D.id);
124
+ await sleep(400);
125
+ if (await p.locator('#dashBar').isHidden()) await p.click('#dashMore');
126
+ const hasStudio = await p.evaluate(() => !!document.querySelector('#oMain .stu') || [...document.scripts].some((s) => /premium-studio/.test(s.src)));
127
+ await Promise.all([p.waitForURL(/premium-chat\.html/), p.click('#pdEdit')]);
128
+ const u1 = new URL(p.url());
129
+ await until(() => p.evaluate(() => [...document.querySelectorAll('#dOut .obody.vw')].some((x) => !x.hidden && /Partner growth/.test(x.textContent))));
130
+ const s1 = await p.evaluate(look);
131
+ ok('I1 Edit on a saved dashboard opens the Chat page with its Dashboard tab, saved', !hasStudio && u1.searchParams.get('open') === 'dashboard:' + D.id && /Saved dashboard/.test(s1.pane || ''), JSON.stringify([u1.search, s1.pane]));
132
+ await p.goto(BASE + '/premium-insights.html');
133
+ await until(() => p.evaluate(() => !!document.querySelector('#dashBody .mch')));
134
+ await p.evaluate(() => { const r = document.querySelector('[data-d="all"]'); if (r) r.click(); });
135
+ if (await p.locator('#dashBar').isHidden()) await p.click('#dashMore');
136
+ await Promise.all([p.waitForURL(/premium-chat\.html/), p.click('#pcNew')]);
137
+ const s2 = await until(async () => { const v = await p.evaluate(look); return v.say ? v : null; }) || await p.evaluate(look);
138
+ ok('I1 New chart opens the Chat page with a first message in the box, not sent', s2.say === 'Make a chart of ', JSON.stringify(s2.say));
139
+ ok('F1 no page error (Insights to Chat)', !errs.length, errs.join(' | '));
140
+ await ctx.close(); }
141
+
142
+ { const { p, ctx, errs } = await open(390, [ASK('chart partner activation'), { role: 'assistant', text: 'Here.\n\n' + block(CHART) }]);
143
+ await p.click('#dBody [data-report-open]');
144
+ const s1 = await until(async () => { const v = await p.evaluate(look); return v.pane && v.tiles.length ? v : null; }) || await p.evaluate(look);
145
+ ok('C1 at 390 the chip opens the Chart tab over the page', s1.bars === 5, JSON.stringify(s1));
146
+ if (shots) await p.screenshot({ path: `${shots}/chart-390.png` });
147
+ ok('F1 no page error and no sideways scroll at 390', !errs.length && !s1.wide, errs.join(' | '));
148
+ await ctx.close(); }
149
+ return finish();
150
+ })();