create-pmos 0.276.0 → 0.278.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 (58) hide show
  1. package/package.json +1 -1
  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 +1 -1
  7. package/workspace/briefing-premium-calendar-3-test.js +18 -6
  8. package/workspace/briefing-premium-initiative-test.js +1 -1
  9. package/workspace/briefing-premium-insights-test.js +2 -2
  10. package/workspace/briefing-premium-test.js +3 -2
  11. package/workspace/briefing-premium-work-test.js +6 -4
  12. package/workspace/c3-briefing-test.js +2 -2
  13. package/workspace/c3-capture-test.js +3 -3
  14. package/workspace/c3-core-docs-test.js +1 -1
  15. package/workspace/c3-driver-test.js +6 -6
  16. package/workspace/c3-foundation-test.js +4 -4
  17. package/workspace/c3-ini-harness.js +2 -2
  18. package/workspace/c3-initiatives-test.js +1 -1
  19. package/workspace/c3-light-load-test.js +2 -2
  20. package/workspace/c3-one-home-test.js +2 -2
  21. package/workspace/c3-phone-test.js +12 -12
  22. package/workspace/c3-quiet-test.js +5 -5
  23. package/workspace/c3-report-design-real-test.js +2 -2
  24. package/workspace/c3-report-design-test.js +4 -4
  25. package/workspace/c3-report-setup-test.js +7 -7
  26. package/workspace/c3-report-structure-real-test.js +2 -2
  27. package/workspace/c3-report-structure-test.js +2 -2
  28. package/workspace/c3-reports-test.js +2 -2
  29. package/workspace/c3-scan-test.js +7 -7
  30. package/workspace/c3-sessions-panel-test.js +2 -2
  31. package/workspace/c3-settings-test.js +7 -7
  32. package/workspace/c3-updates-test.js +1 -1
  33. package/workspace/c3-work-test.js +2 -2
  34. package/workspace/extension/README.md +1 -1
  35. package/workspace/extension/panel.js +3 -3
  36. package/workspace/extension/popup.js +4 -4
  37. package/workspace/fixtures/my-work-premium-facts.js +4 -4
  38. package/workspace/guide/briefing-premium.md +13 -2
  39. package/workspace/lib/my-work-premium.js +38 -8
  40. package/workspace/package-lock.json +2 -2
  41. package/workspace/package.json +1 -1
  42. package/workspace/premium-work-depth-test.js +375 -0
  43. package/workspace/public/pm/c3-audience-link.js +2 -2
  44. package/workspace/public/pm/c3-capture.js +2 -2
  45. package/workspace/public/pm/c3-focus.js +1 -1
  46. package/workspace/public/pm/premium-board.js +2 -2
  47. package/workspace/public/pm/premium-insights.js +1 -1
  48. package/workspace/public/pm/premium-report-read.js +1 -1
  49. package/workspace/public/pm/premium-shell.js +3 -3
  50. package/workspace/public/pm/premium-work.js +386 -37
  51. package/workspace/public/pm/premium.css +45 -0
  52. package/workspace/public/premium-board.html +1 -1
  53. package/workspace/public/premium-initiative.html +1 -1
  54. package/workspace/public/premium-insights.html +1 -1
  55. package/workspace/public/premium-work.html +1 -1
  56. package/workspace/public/premium.html +11 -2
  57. package/workspace/server.js +12 -4
  58. package/workspace/test-lists/premium-work-depth.json +9 -0
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  'use strict';
3
3
  /* c3-report-design-test.js — the report design studio and the deck of a cycle, UI slice (initiative report-design-studio; mockup 42-reportdeck).
4
- * DEMO mode: a real server and a real Chromium drive /c3.html?demo=1&tab=rep; c3-demo-rd.js answers the design and notes routes.
4
+ * DEMO mode: a real server and a real Chromium drive /console.html?demo=1&tab=rep; c3-demo-rd.js answers the design and notes routes.
5
5
  *
6
6
  * studio Design how it looks on a set-up row; the conversation (samples with a thumbnail and what PMOS took, turns, version links);
7
7
  * add a sample by upload, link and past document; a describe then a turn on a report with no design; the running state
@@ -72,7 +72,7 @@ const DOC = 'planning/reports/rs1/2026-10-21.md';
72
72
  };
73
73
  /* the Reports tab with rs1 (a saved deck design, D3) and rs3 (a document design, not saved) set up from their findings */
74
74
  const goReports = async (pg) => {
75
- await pg.goto(BASE + '/c3.html?demo=1&tab=rep'); await pg.waitForSelector('[data-rp3]'); await pg.click('[data-rp3-tab="reports"]'); await pg.waitForSelector('[data-rs-row]'); await spy(pg);
75
+ await pg.goto(BASE + '/console.html?demo=1&tab=rep'); await pg.waitForSelector('[data-rp3]'); await pg.click('[data-rp3-tab="reports"]'); await pg.waitForSelector('[data-rs-row]'); await spy(pg);
76
76
  await pg.click('[data-rs-row="rs1"] [data-rs-act="setup"]'); await pg.waitForSelector('[data-rs-reg="rs1"]');
77
77
  await pg.click('[data-rs-row="rs3"] [data-rs-act="setup"]'); await pg.waitForSelector('[data-rs-reg="rs3"]');
78
78
  };
@@ -88,7 +88,7 @@ const DOC = 'planning/reports/rs1/2026-10-21.md';
88
88
  const clickUntil = async (sel, fx, fy, want, pg = page) => { for (let i = 0; i < 6; i++) { await clickAt(sel, fx, fy, pg); if (await until(() => pg.$(want), 1500)) return true; } return false; };
89
89
 
90
90
  /* ── output choice and the entry points ── */
91
- await page.goto(BASE + '/c3.html?demo=1&tab=rep'); await page.waitForSelector('[data-rp3]'); await page.click('[data-rp3-tab="reports"]'); await page.waitForSelector('[data-rs-row]'); await spy(page);
91
+ await page.goto(BASE + '/console.html?demo=1&tab=rep'); await page.waitForSelector('[data-rp3]'); await page.click('[data-rp3-tab="reports"]'); await page.waitForSelector('[data-rs-row]'); await spy(page);
92
92
  await page.click('[data-rs-row="rs1"] .tt');
93
93
  await page.waitForSelector('[data-rs-sheet]');
94
94
  ok('the output choice says Slide deck where it said Google Slides', /Slide deck/.test(await text('[data-rs-sheet]')) && !(await page.$$eval('[data-rs-sheet] .seg button', (a) => a.some((b) => /^\s*Google Slides\s*$/.test(b.textContent)))));
@@ -339,7 +339,7 @@ const DOC = 'planning/reports/rs1/2026-10-21.md';
339
339
  await pop.waitForSelector('[data-aud="message"]', { timeout: 30000 });
340
340
  const pu = new URL(pop.url());
341
341
  ok('Audience view opens a window of its own: the audience page, the report path, the slide the presenter is on, and a title that names the deck',
342
- pu.pathname === '/c3.html' && pu.searchParams.get('audience') === '1' && /rs1\/[\d-]+\.md$/.test(pu.searchParams.get('path') || '') && pu.searchParams.get('start') === '4' && /^PMOS · Audience view · /.test(await pop.title()) && !!(await page.$('[data-rd-ov]')), pop.url());
342
+ pu.pathname === '/console.html' && pu.searchParams.get('audience') === '1' && /rs1\/[\d-]+\.md$/.test(pu.searchParams.get('path') || '') && pu.searchParams.get('start') === '4' && /^PMOS · Audience view · /.test(await pop.title()) && !!(await page.$('[data-rd-ov]')), pop.url());
343
343
  ok('the presenter view stays on this page while the window is open', !!(await page.$('[data-rd-ov].rd-pres')));
344
344
  await page.bringToFront(); await page.keyboard.press('Escape');
345
345
  ok('closing the presenter view closes the audience window', !!(await until(async () => pop.isClosed())) && !(await page.$('[data-rd-ov]')));
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  'use strict';
3
3
  /* c3-report-setup-test.js — the report workspace on console3, UI slice (initiative report-workspace; mockup 41-reportsetup).
4
- * DEMO mode: a real server and a real Chromium drive /c3.html?demo=1&tab=rep; c3-demo-rs.js answers the contract routes.
4
+ * DEMO mode: a real server and a real Chromium drive /console.html?demo=1&tab=rep; c3-demo-rs.js answers the contract routes.
5
5
  *
6
6
  * tab Ask PMOS, Found in your work (3), Set up (3), Documents (6); the Reports tab badge counts the drafts waiting
7
7
  * ask an ask runs, then answers from its own words (not a fixed report); Change revises it; Set up posts ONE setup with the ask and proposal
@@ -63,7 +63,7 @@ const TAB = '[data-rs-tab]';
63
63
  const sent = (p) => posts.filter((x) => x.path === p);
64
64
  const shot = async (pg, n) => { if (shots) await pg.screenshot({ path: path.join(shots, n + '.png'), fullPage: true }); };
65
65
  const text = (sel) => page.textContent(sel).catch(() => '');
66
- const goReports = async () => { await page.goto(BASE + '/c3.html?demo=1&tab=rep'); await page.waitForSelector('[data-rp3]'); await page.click('[data-rp3-tab="reports"]'); await page.waitForSelector('[data-rs-row]'); await spy(page); };
66
+ const goReports = async () => { await page.goto(BASE + '/console.html?demo=1&tab=rep'); await page.waitForSelector('[data-rp3]'); await page.click('[data-rp3-tab="reports"]'); await page.waitForSelector('[data-rs-row]'); await spy(page); };
67
67
 
68
68
  /* ── tab ── */
69
69
  await goReports();
@@ -153,18 +153,18 @@ const TAB = '[data-rs-tab]';
153
153
 
154
154
 
155
155
  /* ── briefing and settings ── */
156
- await page.goto(BASE + '/c3.html?demo=1');
156
+ await page.goto(BASE + '/console.html?demo=1');
157
157
  ok('the Briefing has a Report found card with Set up, See what PMOS found and Not a report', !!(await until(() => page.$('[data-rs-card] [data-rs-act="b-setup"]'), 12000)) && !!(await page.$('[data-rs-act="b-see"]')) && !!(await page.$('[data-rs-act="b-no"]')) && /Nothing is sent/.test(await text('[data-rs-card]')));
158
- await page.goto(BASE + '/c3.html?demo=1&tab=settings&section=connectors');
158
+ await page.goto(BASE + '/console.html?demo=1&tab=settings&section=connectors');
159
159
  ok('Settings, Connectors has the Report finder: Weekly or Off, and the sources', !!(await until(() => page.$('[data-rs-finder]'), 12000)) && !!(await spy(page).then(() => 1)) && /Weekly/.test(await text('[data-rs-finder]')) && /Calendar/.test(await text('[data-rs-finder]')));
160
160
  await page.click('[data-rs-finder] button:has-text("Off") >> nth=0');
161
161
  ok('Off posts the finder cadence', !!(await until(() => sent('/api/report-setups/finder').length >= 1)) && sent('/api/report-setups/finder')[0].body.cadence === 'off');
162
- await page.goto(BASE + '/c3.html?demo=1&tab=settings&section=sharing');
162
+ await page.goto(BASE + '/console.html?demo=1&tab=settings&section=sharing');
163
163
  await page.waitForSelector('[data-c3set-sched-link]');
164
164
  ok('Sharing links to Reports, Set up and no longer lists schedules', /Set up/.test(await text('[data-c3set-sched-link]')) && !/Scheduled shares/.test(await text('body')));
165
165
 
166
166
  /* ── old tab names ── */
167
- await page.goto(BASE + '/c3.html?demo=1&tab=rep'); await page.waitForSelector('[data-rp3]');
167
+ await page.goto(BASE + '/console.html?demo=1&tab=rep'); await page.waitForSelector('[data-rp3]');
168
168
  await page.evaluate(() => window.dispatchEvent(new CustomEvent('pmos:go-tab', { detail: { tab: 'rep', view: 'lib' } })));
169
169
  ok('view=lib lands on Charts', !!(await until(async () => await page.getAttribute('[data-rp3-tab="charts"]', 'aria-selected') === 'true')));
170
170
  await page.evaluate(() => window.dispatchEvent(new CustomEvent('pmos:go-tab', { detail: { tab: 'rep', view: 'drafts' } })));
@@ -174,7 +174,7 @@ const TAB = '[data-rs-tab]';
174
174
  const ph = await browser.newContext({ viewport: { width: 400, height: 860 }, hasTouch: true, isMobile: true });
175
175
  const pp = await ph.newPage(); watch(pp);
176
176
  const noScroll = () => pp.evaluate(() => document.documentElement.scrollWidth <= document.documentElement.clientWidth + 1);
177
- await pp.goto(BASE + '/c3.html?demo=1&tab=rep'); await pp.waitForSelector('[data-rp3]'); await pp.click('[data-rp3-tab="reports"]'); await pp.waitForSelector('[data-rs-row]');
177
+ await pp.goto(BASE + '/console.html?demo=1&tab=rep'); await pp.waitForSelector('[data-rp3]'); await pp.click('[data-rp3-tab="reports"]'); await pp.waitForSelector('[data-rs-row]');
178
178
  ok('400px: the Reports tab has no horizontal scroll', await noScroll());
179
179
  await shot(pp, 'reports-400');
180
180
  await pp.click('[data-rs-row="rs1"] [data-rs-act="open"], [data-rs-row="rs1"] .tt');
@@ -3,7 +3,7 @@
3
3
  /* c3-report-structure-real-test.js — the Structure step of the report studio against the REAL backend (initiative report-structure, PRD done-criterion 10).
4
4
  * Not demo mode and no route interception: a real server on a scratch repository, with a stub `claude` that plays the report-structure and
5
5
  * report-structure-dry jobs (as report-structure-server.test.js does) and a stub for the source check (PMOS_REPORT_CHECK_STUB), and a real
6
- * Chromium on /c3.html. It proves the page and the server agree on the API contract end to end.
6
+ * Chromium on /console.html. It proves the page and the server agree on the API contract end to end.
7
7
  *
8
8
  * setup a work-sourced report set up through the API
9
9
  * turn the Structure step opens from the set-up row (Shape the report); a purpose and one turn land S1 with sources, charts and outline;
@@ -133,7 +133,7 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
133
133
  const text = (sel) => page.textContent(sel).catch(() => '');
134
134
  const idle = () => page.waitForFunction(() => { const b = document.querySelector('[data-st-act="send"]'); return b && !b.disabled && !document.querySelector('[data-st-running]'); }, null, { timeout: 20000 });
135
135
  const verOn = async (n) => await page.getAttribute('[data-st-v="' + n + '"]', 'aria-pressed') === 'true';
136
- const goReports = async () => { await page.goto(BASE + '/c3.html?tab=rep'); await page.waitForSelector('[data-rp3]'); await page.click('[data-rp3-tab="reports"]'); await page.waitForSelector('[data-rs-reg="' + id + '"]', { timeout: 15000 }); };
136
+ const goReports = async () => { await page.goto(BASE + '/console.html?tab=rep'); await page.waitForSelector('[data-rp3]'); await page.click('[data-rp3-tab="reports"]'); await page.waitForSelector('[data-rs-reg="' + id + '"]', { timeout: 15000 }); };
137
137
 
138
138
  /* ── the Structure step from the set-up row ── */
139
139
  await goReports();
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  'use strict';
3
3
  /* c3-report-structure-test.js — the Structure step of the report studio, UI slice (initiative report-structure; mockup 43-reportstructure;
4
- * API contract planning/prd/report-structure-contract.md). A real server and a real Chromium drive /c3.html?tab=rep; the routes of the
4
+ * API contract planning/prd/report-structure-contract.md). A real server and a real Chromium drive /console.html?tab=rep; the routes of the
5
5
  * contract (/api/report-structure*, /api/charts) and the report reads are answered by Playwright route interception, so the page is
6
6
  * tested against the contract alone, not against the backend (c3-report-structure-real-test.js does that).
7
7
  *
@@ -152,7 +152,7 @@ function makeStub() {
152
152
  const text = (sel) => page.textContent(sel).catch(() => '');
153
153
  const sent = (p) => S.posts.filter((x) => x.path === p);
154
154
  const closeAll = async () => { for (let i = 0; i < 3 && await page.$('.sheet'); i++) { await page.keyboard.press('Escape'); await sleep(250); } };
155
- const goReports = async () => { await page.goto(BASE + '/c3.html?tab=rep'); await page.waitForSelector('[data-rp3]'); await page.click('[data-rp3-tab="reports"]'); await page.waitForSelector('[data-rs-reg="' + SETUP.id + '"]', { timeout: 15000 }); };
155
+ const goReports = async () => { await page.goto(BASE + '/console.html?tab=rep'); await page.waitForSelector('[data-rp3]'); await page.click('[data-rp3-tab="reports"]'); await page.waitForSelector('[data-rs-reg="' + SETUP.id + '"]', { timeout: 15000 }); };
156
156
  const idle = () => page.waitForFunction(() => { const b = document.querySelector('[data-st-act="send"]'); return b && !b.disabled && !document.querySelector('[data-st-running]'); }, null, { timeout: 15000 });
157
157
  const noOverflow = () => page.evaluate(() => document.documentElement.scrollWidth <= document.documentElement.clientWidth + 1);
158
158
 
@@ -2,7 +2,7 @@
2
2
  'use strict';
3
3
  /* c3-reports-test.js — the console3 Reports dashboards in a browser, demo mode (initiative console3-reports, PRD R1 to R7).
4
4
  *
5
- * WHERE. The suite first loads /c3.html?demo=1&tab=rep. When the shell mounts the dashboards there ([data-rp3] in the Reports pane),
5
+ * WHERE. The suite first loads /console.html?demo=1&tab=rep. When the shell mounts the dashboards there ([data-rp3] in the Reports pane),
6
6
  * it runs against the shell. Until c3-shell.js has the mount line, it serves a small harness page from this process (page.route, no
7
7
  * file in public/) that installs demo mode and mounts mountReports with the same ctx the shell passes ({ ws, pmGet, drafts }, drafts
8
8
  * doing what repTab does). The suite prints which one it used.
@@ -83,7 +83,7 @@ const DEF_P = ['north', 'outcomes', 'signals', 'delivery', 'bets', 'synergy', 'm
83
83
  const open = async (page) => {
84
84
  await page.route(BASE + HARNESS, (r) => r.fulfill({ status: 200, contentType: 'text/html', body: HARNESS_HTML }));
85
85
  if (mode !== 'harness') {
86
- await page.goto(BASE + '/c3.html?demo=1&tab=rep');
86
+ await page.goto(BASE + '/console.html?demo=1&tab=rep');
87
87
  const inShell = await until(() => page.$('[data-c3-pane="rep"] [data-rp3]'), mode === 'shell' ? 15000 : 4000);
88
88
  if (inShell) { mode = 'shell'; return true; }
89
89
  }
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  'use strict';
3
3
  /* c3-scan-test.js — the portfolio Horizon scan on console3 (initiative horizon-scan-portfolio; PRD sections 1 to 4 and 7; the approved mockup 42-hscan).
4
- * LIVE mode: a real server and a scratch repository (c3-scan-fixture.js) and a real Chromium driving /c3.html. The first part routes the page's
4
+ * LIVE mode: a real server and a scratch repository (c3-scan-fixture.js) and a real Chromium driving /console.html. The first part routes the page's
5
5
  * /api/scan/* calls to a model that answers with the REAL view functions and presses of lib/scan.js and lib/routes-scan.js over a ledger of its own
6
6
  * (portfolioStub), so a test can move a scan one step at a time. The last part (E) is end to end: no routing at all, the server's own scan routes over a
7
7
  * seeded state folder, the runner stubbed, a real initiative created. The report documents are real markdown files read through GET /api/doc.
@@ -66,7 +66,7 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
66
66
  const noScroll = () => st(() => document.documentElement.scrollWidth <= window.innerWidth + 1 && [...document.querySelectorAll('.sheet .sb')].every((n) => n.scrollWidth <= n.clientWidth + 1));
67
67
  const text = (s) => st((q) => { const n = document.querySelector(q); return n ? n.textContent : ''; }, s);
68
68
  const toastText = () => st(() => (document.querySelector('[data-c3-toast]') || {}).textContent || '');
69
- const portfolio = async () => { await page.goto(BASE + '/c3.html?tab=init', { waitUntil: 'load' }); await sel('[data-scan-section="portfolio"] [data-scan-act=scan]'); };
69
+ const portfolio = async () => { await page.goto(BASE + '/console.html?tab=init', { waitUntil: 'load' }); await sel('[data-scan-section="portfolio"] [data-scan-act=scan]'); };
70
70
 
71
71
  /* ── pure parts, read in the page ── */
72
72
  await portfolio();
@@ -347,7 +347,7 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
347
347
  await page.keyboard.press('Escape');
348
348
 
349
349
  /* ── Briefing ── */
350
- await page.goto(BASE + '/c3.html?tab=brief', { waitUntil: 'load' });
350
+ await page.goto(BASE + '/console.html?tab=brief', { waitUntil: 'load' });
351
351
  await sel('[data-c3pg="scan"] [data-scan-report]');
352
352
  const card = await text('[data-c3pg="scan"]');
353
353
  ok('B1 the Briefing has a Horizon scan card: when it ran, the boards scanned, the reports of the day', /Horizon scan/.test(card) && /today, \d\d:\d\d/.test(card) && /1 board scanned/.test(card) && /4 reports today/.test(card), card);
@@ -363,7 +363,7 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
363
363
  await page.keyboard.press('Escape');
364
364
 
365
365
  /* ── Board settings ── */
366
- await page.goto(BASE + `/c3.html?tab=init&init=board:${ws}:summary`, { waitUntil: 'load' });
366
+ await page.goto(BASE + `/console.html?tab=init&init=board:${ws}:summary`, { waitUntil: 'load' });
367
367
  await (await sel('[data-ini=board-settings]')).click();
368
368
  await sel('[data-scan-ptr]');
369
369
  const ptr = await text('[data-scan-ptr]');
@@ -380,7 +380,7 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
380
380
 
381
381
  /* ── triage: an ask an earlier per-board scan found ── */
382
382
  const seed = fx.seedScan();
383
- await page.goto(BASE + `/c3.html?tab=init&init=board:${ws}:triage`, { waitUntil: 'load' });
383
+ await page.goto(BASE + `/console.html?tab=init&init=board:${ws}:triage`, { waitUntil: 'load' });
384
384
  await sel(`[data-ibt-ask="${seed.asks[0]}"]`);
385
385
  const row = (i) => st((id) => { const r = document.querySelector(`[data-ibt-ask="${id}"]`); return { text: r.textContent, agent: !!r.querySelector('[data-scan="found-by-agent"]'), links: [...r.querySelectorAll('a[data-scan-src=web]')].map((a) => ({ target: a.target, rel: a.rel })), accept: !!r.querySelector('[data-ibt-accept]'), more: !!r.querySelector('[data-ibt-more]'), decline: !!r.querySelector('[data-ibt-decline]') }; }, seed.asks[i]);
386
386
  const r0 = await row(0); const r2 = await row(2);
@@ -406,7 +406,7 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
406
406
  await page.click(`[data-scan-act=change][data-id=${CP1}]`); await sleep(300);
407
407
  ok('M5 at 400 wide the Change first form has no horizontal scroll', await noScroll());
408
408
  await page.keyboard.press('Escape');
409
- await page.goto(BASE + '/c3.html?tab=brief', { waitUntil: 'load' });
409
+ await page.goto(BASE + '/console.html?tab=brief', { waitUntil: 'load' });
410
410
  await sel('[data-c3pg="scan"] [data-scan-report]'); await sleep(300);
411
411
  await shot('briefing-400');
412
412
  ok('M6 at 400 wide the Briefing has no horizontal scroll', await noScroll());
@@ -443,7 +443,7 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
443
443
  const eToast = () => page2.evaluate(() => (document.querySelector('[data-c3-toast]') || {}).textContent || '');
444
444
  const eRb = E.reports.find((r) => r.type === 'benchmark'); const eRc = E.reports.find((r) => r.type === 'competitive');
445
445
  const eProp = (rep, kind) => [...eState().proposals.values()].find((p) => p.report === rep.id && p.kind === kind);
446
- await page2.goto(eBase + '/c3.html?tab=init', { waitUntil: 'load' });
446
+ await page2.goto(eBase + '/console.html?tab=init', { waitUntil: 'load' });
447
447
  await eSel('[data-scan-section="portfolio"] [data-scan-act=scan]');
448
448
  await eSel('[data-scan-section] [data-scan-report]');
449
449
  const eSec = await eText('[data-scan-section="portfolio"]');
@@ -5,7 +5,7 @@
5
5
  * Starts a real server with its own state directory. Before it starts, a session record is written whose process does not exist and
6
6
  * whose file still says it runs: the server restores it as exited, and GET /api/runs must say it ended (it read "starting · 4 d" before).
7
7
  * Then one live shell is started, and the page checks: the live row reads the server's state, not "starting"; Open the session draws the
8
- * session's real terminal in a sheet on /c3.html and the address does not change; the message box types into the session and presses Enter;
8
+ * session's real terminal in a sheet on /console.html and the address does not change; the message box types into the session and presses Enter;
9
9
  * End asks first, Keep it keeps it, End ends it.
10
10
  */
11
11
  const fs = require('fs');
@@ -101,7 +101,7 @@ function startShell(name) {
101
101
  page.on('pageerror', (e) => errors.push(String(e && e.message || e)));
102
102
 
103
103
  /* ── B: the panel ── */
104
- await page.goto(BASE + '/c3.html');
104
+ await page.goto(BASE + '/console.html');
105
105
  ok('B1 the header has the Sessions button', await waitFor(page, () => !!document.querySelector('[data-c3pg="agent-button"]'), null, 45000));
106
106
  await page.click('[data-c3pg="agent-button"]');
107
107
  const sel = `[data-c3t="mine"] [data-run="${id}"]`;
@@ -2,7 +2,7 @@
2
2
  'use strict';
3
3
  /* c3-settings-test.js — the console3 Settings page (initiative console3-settings).
4
4
  *
5
- * Loads /c3.html against a real server with its own state directory and checks: the gear, the More menu item and
5
+ * Loads /console.html against a real server with its own state directory and checks: the gear, the More menu item and
6
6
  * ?tab=settings open Settings; every section draws; search finds a setting across sections; a change to a store setting
7
7
  * is saved through POST /api/settings and read back; the theme switch sets the page theme; the start page and the
8
8
  * time-of-day switches take effect on the next load; Set up Laya opens its terminal; and the page throws no error.
@@ -49,7 +49,7 @@ async function waitFor(page, fn, arg, ms = 8000) {
49
49
  page.on('dialog', (d) => d.dismiss().catch(() => {}));
50
50
 
51
51
  /* ── A: the ways in ── */
52
- await page.goto(BASE + '/c3.html');
52
+ await page.goto(BASE + '/console.html');
53
53
  ok('A1 the header has a Settings gear', await waitFor(page, () => !!document.querySelector('[data-c3pg="settings"]')));
54
54
  await page.click('[data-c3pg="settings"]');
55
55
  ok('A2 the gear opens Settings', await waitFor(page, () => { const p = document.querySelector('[data-c3-pane="settings"]'); return p && !p.hidden && !!p.querySelector('[data-c3set]'); }));
@@ -113,7 +113,7 @@ async function waitFor(page, fn, arg, ms = 8000) {
113
113
 
114
114
 
115
115
  /* ── R: Data refresh (data-refresh-settings R9) ── */
116
- await page.goto(BASE + '/c3.html?tab=settings');
116
+ await page.goto(BASE + '/console.html?tab=settings');
117
117
  await waitFor(page, () => !!document.querySelector('[data-c3set-nav] [data-c3set-sec="connectors"]'));
118
118
  await page.click('[data-c3set-nav] [data-c3set-sec="connectors"]');
119
119
  ok('R1 Connectors links to Data refresh instead of holding its schedule', await waitFor(page, () => { const a = document.querySelector('[data-c3set-row="conn.cal.refresh"]'); const b = document.querySelector('[data-c3set-row="conn.jira.refresh"]'); return !!a && !!b && !!a.querySelector('button.lk') && /Data refresh/.test(a.textContent) && !a.querySelector('select') && !b.querySelector('select'); }));
@@ -173,16 +173,16 @@ async function waitFor(page, fn, arg, ms = 8000) {
173
173
  const post = (key, value) => page.evaluate(async ([k, v]) => { const { pmPost } = await import('/pm/http.js'); return pmPost('/api/settings', { key: k, value: v }); }, [key, value]);
174
174
  const f0 = [await post('look.start', 'cal'), await post('time.tint', false), await post('time.strip', false)];
175
175
  ok('F0 the start page and switches save', f0.every((r) => r && r.ok), JSON.stringify(f0));
176
- await page.goto(BASE + '/c3.html');
176
+ await page.goto(BASE + '/console.html');
177
177
  ok('F1 the saved start page opens', await waitFor(page, () => { const p = document.querySelector('[data-c3-pane="cal"]'); return p && !p.hidden; }));
178
178
  ok('F2 the tint switch reaches the page', await waitFor(page, () => document.getElementById('c3-root').getAttribute('data-c3-tint') === 'off'));
179
179
  ok('F3 the daylight strip is hidden', await waitFor(page, () => { const s = document.querySelector('.c3pg-daylight'); return !s || getComputedStyle(s).display === 'none'; })); // the stylesheet loads after the attribute is set
180
- await page.goto(BASE + '/c3.html?tab=settings');
180
+ await page.goto(BASE + '/console.html?tab=settings');
181
181
  ok('F4 ?tab=settings opens Settings directly', await waitFor(page, () => { const p = document.querySelector('[data-c3-pane="settings"]'); return p && !p.hidden && !!p.querySelector('[data-c3set]'); }));
182
182
  await post('look.start', 'brief'); await post('time.tint', true); await post('time.strip', true);
183
183
 
184
184
  /* ── G: the palette ── */
185
- await page.goto(BASE + '/c3.html');
185
+ await page.goto(BASE + '/console.html');
186
186
  await waitFor(page, () => !!document.querySelector('[data-c3pg="search"]'));
187
187
  await page.click('[data-c3pg="search"]');
188
188
  await sleep(200);
@@ -190,7 +190,7 @@ async function waitFor(page, fn, arg, ms = 8000) {
190
190
  ok('G1 the palette lists Settings', await waitFor(page, () => [...document.querySelectorAll('[role="option"], .pal li, .pal button, [data-pal-item]')].some((x) => /Settings/.test(x.textContent)), null, 3000));
191
191
 
192
192
  /* ── I: Set up Laya opens its terminal on the page, not only on the server (jev-local-fallback R9) ── */
193
- await page.goto(BASE + '/c3.html?tab=settings');
193
+ await page.goto(BASE + '/console.html?tab=settings');
194
194
  await waitFor(page, () => !!document.querySelector('[data-c3set-nav] [data-c3set-sec="privacy"]'));
195
195
  await page.click('[data-c3set-nav] [data-c3set-sec="privacy"]');
196
196
  ok('I1 Privacy shows the Set up Laya button', await waitFor(page, () => !!document.querySelector('[data-c3set-laya-setup]')));
@@ -74,7 +74,7 @@ async function waitFor(page, fn, arg, ms = 8000) {
74
74
  const named = (kind) => calls.filter((c) => c[0] === kind);
75
75
 
76
76
  const open = async () => {
77
- await page.goto(BASE + '/c3.html?tab=settings');
77
+ await page.goto(BASE + '/console.html?tab=settings');
78
78
  await waitFor(page, () => !!document.querySelector('[data-c3set-nav] [data-c3set-sec="updates"]'));
79
79
  await page.click('[data-c3set-nav] [data-c3set-sec="updates"]');
80
80
  return waitFor(page, () => !!document.querySelector('[data-c3set-section="updates"] [data-c3set-check]:not([disabled])'));
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  'use strict';
3
3
  /* c3-work-test.js — the console3 Work page (initiative console3-work-page; planning/prd/console3-work-page-prd.md R1 to R10, rubric
4
- * dimensions 1 to 5 and 7). Loads /c3.html?demo=1 at 1440 wide and then at 390 wide. Demo mode answers every /api call in the page,
4
+ * dimensions 1 to 5 and 7). Loads /console.html?demo=1 at 1440 wide and then at 390 wide. Demo mode answers every /api call in the page,
5
5
  * so nothing reaches the server and the fixture (public/pm/c3-demo-data.js pmItems) is placed by the same rule the server uses.
6
6
  *
7
7
  * views seven views in order (Inbox, Today, Upcoming, Waiting, Someday, Review, Done), each with its count; no Triage, Week, Later
@@ -81,7 +81,7 @@ const W = '[data-pm-work]';
81
81
  };
82
82
  const toastUndo = () => until(() => click('[data-c3-toast-action]'), 4000);
83
83
 
84
- await page.goto(BASE + '/c3.html?demo=1&tab=work');
84
+ await page.goto(BASE + '/console.html?demo=1&tab=work');
85
85
  const up = await until(() => st((w) => !!document.querySelector('[data-c3-demo="1"]') && !!document.querySelector(w + ' [data-pm-lenses]') && !!document.querySelector(w + ' [data-pm-lens-head]'), W), 45000, 250);
86
86
  if (!up) { await click('[data-c3-tab="work"]'); }
87
87
  const ready = up || await until(() => st((w) => !!document.querySelector(w + ' [data-pm-lens-head]'), W), 20000, 250);
@@ -31,7 +31,7 @@ Open any page in Chrome and press the PMOS button in the toolbar. The popup is "
31
31
  - A sample is at most 20 MB. When it is over, the popup says so. Open a shorter page, or add a smaller copy.
32
32
  - When PMOS does not answer, the popup says "PMOS is not answering at <address>. Start PMOS, then try again." and has **Try again**.
33
33
 
34
- How the data reaches PMOS: the extension never writes to PMOS itself. The popup shows a page from your PMOS (`/c3.html?capture=1&pop=1`) in a frame. That page has the report list and the Add button. When you press Add, it asks the popup to take the page. The popup sends the PDF or the pictures back to that page, and that page saves them with its own press, as every other change in PMOS is saved. Each message is checked for its sender and its origin on both sides.
34
+ How the data reaches PMOS: the extension never writes to PMOS itself. The popup shows a page from your PMOS (`/console.html?capture=1&pop=1`) in a frame. That page has the report list and the Add button. When you press Add, it asks the popup to take the page. The popup sends the PDF or the pictures back to that page, and that page saves them with its own press, as every other change in PMOS is saved. Each message is checked for its sender and its origin on both sides.
35
35
 
36
36
  ## Files
37
37
 
@@ -1,6 +1,6 @@
1
1
  /* panel.js — the page the content script frames over a Meet call (panel.html).
2
2
  * It reads the PMOS address from chrome.storage.sync (pmosAddress, default http://localhost:7433) and asks whether anything answers there.
3
- * When PMOS answers, the page becomes one frame: ${address}/c3.html?focus=now&pop=1&meet=…&mtitle=… (PMOS's compact meeting focus). When it does not,
3
+ * When PMOS answers, the page becomes one frame: ${address}/console.html?focus=now&pop=1&meet=…&mtitle=… (PMOS's compact meeting focus). When it does not,
4
4
  * the page says where it looked and links to the options. Nothing else is fetched. The frame's { pmosFocus } message (fold or open, no data) is passed
5
5
  * up to the content script. */
6
6
  (function () {
@@ -28,7 +28,7 @@
28
28
  function answers(addr) {
29
29
  var ctl = typeof AbortController === 'function' ? new AbortController() : null;
30
30
  var t = ctl ? setTimeout(function () { ctl.abort(); }, CHECK_MS) : null;
31
- return fetch(addr + '/c3.html', { mode: 'no-cors', cache: 'no-store', signal: ctl ? ctl.signal : undefined })
31
+ return fetch(addr + '/console.html', { mode: 'no-cors', cache: 'no-store', signal: ctl ? ctl.signal : undefined })
32
32
  .then(function (r) { if (t) clearTimeout(t); return r; }, function (e) { if (t) clearTimeout(t); throw e; });
33
33
  }
34
34
  function showMissing(addr) {
@@ -46,7 +46,7 @@
46
46
  var q = new URLSearchParams({ focus: 'now', pop: '1', meet: meet, mtitle: title });
47
47
  frame = document.createElement('iframe');
48
48
  frame.title = 'PMOS meeting helper';
49
- frame.src = addr + '/c3.html?' + q.toString();
49
+ frame.src = addr + '/console.html?' + q.toString();
50
50
  frameOrigin = new URL(addr).origin;
51
51
  msg.remove();
52
52
  document.body.appendChild(frame);
@@ -1,5 +1,5 @@
1
1
  /* popup.js — the PMOS button's popup (popup.html): "Add this page to a report design".
2
- * PMOS draws the popup: the page is one frame, ${address}/c3.html?capture=1&pop=1&…, which lists the reports and has the Add button. The extension never posts to PMOS
2
+ * PMOS draws the popup: the page is one frame, ${address}/console.html?capture=1&pop=1&…, which lists the reports and has the Add button. The extension never posts to PMOS
3
3
  * itself, because every PMOS write needs a press on a PMOS page (a nonce and an Origin check). So when the frame asks (postMessage { pmosCapture: 'request' }), this
4
4
  * page takes the open tab and posts it back to the frame ({ pmosCapture: 'data', … }), and the frame uploads it with its own press. Both ways, the message must
5
5
  * come from the other window and from the PMOS origin; the extension posts to the PMOS origin only.
@@ -34,7 +34,7 @@
34
34
  function answers(addr) {
35
35
  var ctl = typeof AbortController === 'function' ? new AbortController() : null;
36
36
  var t = ctl ? setTimeout(function () { ctl.abort(); }, CHECK_MS) : null;
37
- return fetch(addr + '/c3.html', { mode: 'no-cors', cache: 'no-store', signal: ctl ? ctl.signal : undefined })
37
+ return fetch(addr + '/console.html', { mode: 'no-cors', cache: 'no-store', signal: ctl ? ctl.signal : undefined })
38
38
  .then(function (r) { if (t) clearTimeout(t); return r; }, function (e) { if (t) clearTimeout(t); throw e; });
39
39
  }
40
40
  var sleep = function (ms) { return new Promise(function (r) { setTimeout(r, ms); }); };
@@ -78,7 +78,7 @@
78
78
  if (screens) q.set('pscreens', String(screens));
79
79
  frame = document.createElement('iframe');
80
80
  frame.title = 'PMOS: add this page to a report design';
81
- frame.src = addr + '/c3.html?' + q.toString();
81
+ frame.src = addr + '/console.html?' + q.toString();
82
82
  frameOrigin = new URL(addr).origin;
83
83
  if (msg.parentNode) msg.remove();
84
84
  document.body.appendChild(frame);
@@ -169,7 +169,7 @@
169
169
  if (m.pmosCapture === 'resize') { if (frame) frame.style.height = m.height + 'px'; return; }
170
170
  if (m.pmosCapture === 'close') { window.close(); return; }
171
171
  if (m.pmosCapture === 'open') {
172
- try { chrome.tabs.create({ url: frameOrigin + '/c3.html?studio=' + encodeURIComponent(m.report) }); } catch (x) { /* no tabs */ }
172
+ try { chrome.tabs.create({ url: frameOrigin + '/console.html?studio=' + encodeURIComponent(m.report) }); } catch (x) { /* no tabs */ }
173
173
  window.close();
174
174
  return;
175
175
  }
@@ -6,18 +6,18 @@ const A = (state, extra) => ({ state, suggest: null, instruction: null, draft: n
6
6
  const it = (id, title, o = {}) => ({ id, title, due: null, priority: null, waiting_on: null, job: null, source: 'local', created_at: '2026-10-14T09:00:00.000Z', touched_at: '2026-10-14T09:00:00.000Z', steps: [], agent: A('suggest'), ...o });
7
7
  function view() {
8
8
  const inbox = [
9
- it('item-aaaaaaaaaaa1', 'Decide how partial refunds are handled', { source: 'jira', created_at: '2026-10-16T08:00:00.000Z', touched_at: '2026-10-16T08:00:00.000Z' }),
9
+ it('item-aaaaaaaaaaa1', 'Decide how partial refunds are handled', { source: 'jira', origin: 'jira', agent: A('suggest', { suggest: 'Draft your reply: partial refunds' }), created_at: '2026-10-16T08:00:00.000Z', touched_at: '2026-10-16T08:00:00.000Z' }),
10
10
  it('item-aaaaaaaaaaa2', 'Write acceptance criteria for partner rate limits', { source: 'jira', created_at: '2026-10-16T09:30:00.000Z', touched_at: '2026-10-16T09:30:00.000Z' }),
11
11
  it('item-aaaaaaaaaaa3', 'Rina asks if the SSO beta can move to November', { source: 'slack', created_at: '2026-10-16T17:20:00.000Z', touched_at: '2026-10-16T17:20:00.000Z' }),
12
12
  it('item-aaaaaaaaaaa4', 'Is the payment-step experiment worth another week?', { created_at: '2026-10-16T17:50:00.000Z', touched_at: '2026-10-16T17:50:00.000Z' }),
13
13
  ];
14
14
  const today = [
15
15
  it('wbs:alpha:4.2', 'Sign off the fit-out contractor shortlist', { source: 'wbs', due: '2026-10-15', priority: 'P1', agent: A('ready', { draft: { summary: 'Shortlist sign-off', body: 'Two of the three quotes meet the brief. I would sign off A and B.' } }) }),
16
- it('item-bbbbbbbbbbb2', 'Prepare for the Design review', { due: '2026-10-16' }),
16
+ it('item-bbbbbbbbbbb2', 'Prepare for the Design review', { due: '2026-10-16', job: 'job-1', steps: [{ id: 'step-1', text: 'List the open questions', who: 'you' }, { id: 'step-2', text: 'Send the agenda to the team', who: 'agent-drafts' }] }),
17
17
  it('item-bbbbbbbbbbb3', 'Send the revised roadmap to Finance', { flagged: true, agent: A('working') }),
18
18
  ];
19
19
  const upcoming = [
20
- it('item-ccccccccccc1', 'Choose the win-back email subject line', { due: '2026-10-19' }),
20
+ it('item-ccccccccccc1', 'Choose the win-back email subject line', { due: '2026-10-19', defer: '2026-10-18' }),
21
21
  it('item-ccccccccccc2', 'Outline the weekly partner digest', { due: '2026-11-02', agent: A('failed', { error: 'the run ended' }) }),
22
22
  ];
23
23
  const waiting = [
@@ -26,6 +26,6 @@ function view() {
26
26
  ];
27
27
  const someday = [it('item-eeeeeeeeeee1', 'Rework the onboarding checklist', { parked: true })];
28
28
  const review = [waiting[0], someday[0]].map((x) => ({ id: x.id }));
29
- return { ok: true, today: '2026-10-16', lists: {}, jobs: [], items: [], work: { inbox, today, upcoming, waiting, someday }, review, review_days: 7, focus: {}, counts: { inbox: 4, today: 3, upcoming: 2, waiting: 2, someday: 1, review: 2 } };
29
+ return { ok: true, today: '2026-10-16', lists: {}, jobs: [{ id: 'job-1', when: 'a design review is on the calendar', want: 'to walk in with a decision ready', so: 'the review ends with a disposition', done: 0, total: 1 }], items: [], work: { inbox, today, upcoming, waiting, someday }, review, review_days: 7, focus: { suggestions: [{ key: 'job:job-1', title: 'to walk in with a decision ready', why: '1 due today', item_ids: ['item-bbbbbbbbbbb2'], job: 'job-1' }], accepted: [], dismissed: [] }, counts: { inbox: 4, today: 3, upcoming: 2, waiting: 2, someday: 1, review: 2 } };
30
30
  }
31
31
  module.exports = { NOW, view, it, A };
@@ -180,9 +180,16 @@ My work is the second place on the rail, at `/premium-work.html`. It reads the l
180
180
  - **Add** takes one line, read by the Work page's own parser (`Reply to Rina about SSO by Friday !p1`). A new item with no date waits in **Your tray** and its dialog opens at once, so you can place it. An item with a date goes where its date says.
181
181
  - **Your tray** holds what you threw in and have not placed. It is not counted to clear until you place it (Do today, Later, Not yet, Waiting, Done or Drop).
182
182
  - **On your plate** has Inbox, Today, Upcoming and Someday. A row shows where it came from (Yours, Jira, Slack, Board) and a due chip only when a date was set. The round check marks it done, with Undo for a few seconds. "Do this first" appears only on an overdue item.
183
- - **With agents** counts running, failed and to-review drafts from each item's agent field. A draft is labelled "Agent draft, not checked" and is never counted as done. Starting, approving or revising a draft is not built here, because it can write or post.
183
+ - **With agents** counts running, failed and to-review drafts from each item's agent field. A draft is labelled "Agent draft, not checked" and is never counted as done. The agent itself is started, stopped, edited, sent back or approved in the item's dialog (see below).
184
184
  - **Waiting on others** lists who you wait for and for how long. There is no nudge.
185
- - **An item's dialog** offers Done, Not yet (later today, tomorrow, next week), Do today, Later, Waiting on a name, Drop (with Undo), and Keep for an item untouched for seven days. The read-only agent from "Asking the agent" is beside it.
185
+ - **An item's dialog** offers Done, Not yet (later today, tomorrow, next week), Do today, Waiting on a name, Drop (with Undo), and Keep for an item untouched for seven days. The read-only agent from "Asking the agent" is beside it. Below those is a tool row with four more presses, each through the Work page's own route:
186
+ - **Edit** changes the title, due day, priority, who you wait on and the job. A title that Jira, the breakdown or the morning brief owns is read-only, and the panel says so. Only the fields you changed are saved, and Undo writes the old values back.
187
+ - **Who does each step** lists the item's steps. Each step is done by You, the Agent drafts it, or the Agent does it. A step that sends something to a person is only ever drafted by the agent, and the page says when it set that for you. **Add** adds a step.
188
+ - **Not before** hides the item until a day: Tomorrow, Monday, In a week, or a date you pick. **Clear the date** brings it back.
189
+ - **Someday** sends the item to Someday. On an item already there, the same button brings it back.
190
+ - **The agent on an item** appears at the top of the dialog when the item has one. A *suggestion* shows what the agent will do (you can change the words) and **Let the agent draft this**. A *queued or working* agent shows its state and **Stop**. A *ready* draft is labelled the agent's and unchecked. **Post it to Jira** (or Slack, email and so on, from where the item came) first asks, names the place, shows exactly the text and posts nothing until you press **Post it now**. **Edit the draft** lets you change the text, and the post sends your text. **Send it back with a note** needs a note. **Mark it done** posts nothing. A failed run says why and offers **Try again** and **Stop**. An item you added has no place to post to, so it has no Post.
191
+ - **Focus** sits under the add line. It shows the first of the (at most three) things PMOS suggests for today, grouped by the job they serve, with **Accept**. **See all** lists them with Accept, Not today and Clear, and your jobs with their open counts, and **Add a job** takes one line (`when …, I want …, so …`). An accepted group tags its Today rows with Focus. Focus starts empty each day. Editing and deleting a job stay in the console.
192
+ - **Keys and swipe** work on the rows of the plate and the tray. J and K move between rows. The right arrow, or a drag to the right past 90 px, does Done on a Today row and In Today elsewhere; the left arrow, or a drag to the left, does Tomorrow on a Today row and Someday elsewhere. A Today row whose draft is ready offers Review on the right. A row in Waiting has none. Each one offers Undo, and under reduced motion the row does not slide.
186
193
 
187
194
  Not drawn, because no record backs them: the tray's lifecycle states, the shelf, "fold the laundry", the week bars and the capacity figure, and the mockup's suggested place on an inbox item.
188
195
 
@@ -240,3 +247,7 @@ Insights is the fourth place on the rail, at `/premium-insights.html`. It reads
240
247
  - **Shape a report's look.** On a draft, **Add a sample** takes a PDF, PowerPoint, Word, PNG or JPG file to follow. Say how it should look in the conversation; PMOS draws the next design version (D1, D2, …) and says what it changed. Press a version to go back to it. **This is it** saves the version shown as the report's design, and PMOS draws the cycle to match. An issued cycle is frozen with its look.
241
248
 
242
249
  Not built: a second measure next to a chart, bar highlights, speaker notes and notes on a slide, changing a set-up report's audience, format or schedule, tile sizes and free layout, the finder's settings, run-based charts such as corrections per 100 runs (they belong to the Board's Metrics card), and any measure no record holds. The console's own dashboards are separate and unchanged. KR metric records belong to a workspace, so every board of a workspace shows the same charts.
250
+
251
+ ## The default page
252
+
253
+ The premium Briefing is the default page: `/` and `/index.html` open it. The console is at `/console.html`, and the header button **Open the console** on each premium page goes there. The old address `/c3.html` goes to the premium Briefing; with a query (for example `/c3.html?tab=rep`) it goes to `/console.html` with the same query. `/classic.html` is unchanged. To go back, change the last page name in the page-route chain in `server.js` from `premium.html` to `c3.html` and delete the `/c3.html` redirect above it.
@@ -27,7 +27,10 @@ const clip = (s, n) => { s = String(s == null ? '' : s).replace(/\s+/g, ' ').tri
27
27
  const MAX_PER = 8;
28
28
  const SECTIONS = [['inbox', 'Inbox'], ['today', 'Today'], ['upcoming', 'Upcoming'], ['someday', 'Someday']];
29
29
  const RUNNING = ['queued', 'working', 'sending'];
30
- const HOLD = { agent: 'Starting, approving or revising an agent draft from here is not built yet. It can write or post, so it needs its own decision.' };
30
+ const HOLD = { agent: 'An agent writes a draft and nothing else. Nothing is posted until you confirm it, and what is posted is the text you see.' };
31
+ const PLACE = { mail: 'email', slack: 'Slack', jira: 'Jira', confluence: 'Confluence', github: 'GitHub', drive: 'Drive', figma: 'Figma', calendar: 'the calendar', wispr: 'Wispr' };
32
+ const READONLY = { jira: 'Jira', wbs: 'the breakdown', brief: 'the morning brief' };
33
+ const isUrl = (s) => /^https?:\/\//i.test(String(s || ''));
31
34
 
32
35
  let last = null;
33
36
  const peekModel = () => last;
@@ -44,6 +47,22 @@ const agentOf = (it) => (it && it.agent && it.agent.state) || null;
44
47
  const isReady = (it) => agentOf(it) === 'ready';
45
48
  const isRunning = (it) => RUNNING.includes(agentOf(it));
46
49
 
50
+ /** The agent on an item, as its dialog draws it. Only fields of it.agent; where a post goes is the place the item came from (as the Work page says). */
51
+ function agentDetail(it) {
52
+ const a = it && it.agent;
53
+ if (!a || !a.state) return null;
54
+ if (a.state === 'suggest' && !(a.instruction || a.suggest)) return null; // an offer with no words behind it is not drawn
55
+ const mine = isLocal(it) && !it.origin;
56
+ const d = a.draft || null;
57
+ return {
58
+ state: a.state, ask: clip(a.instruction || a.suggest || '', 500),
59
+ draft: d ? { summary: clip(d.summary || '', 300), body: String(d.body || '').slice(0, 4000), step: d.step ? clip(d.step, 200) : null } : null,
60
+ error: a.error ? clip(a.error, 300) : null, asks: !!a.asks, session: a.session || null,
61
+ mine, where: mine ? null : it.origin === 'jira' ? 'Jira' : PLACE[it.place] || 'its source',
62
+ started_at: a.started_at || null, sent_at: a.sent && a.sent.at ? a.sent.at : null, link: a.sent && isUrl(a.sent.link) ? a.sent.link : null,
63
+ };
64
+ }
65
+
47
66
  function dueChip(it, today) {
48
67
  if (!it.due) return { chip: null, overdue: false };
49
68
  const d = daysBetween(today, it.due);
@@ -53,7 +72,7 @@ function dueChip(it, today) {
53
72
  return { chip: shortDate(it.due), overdue: false };
54
73
  }
55
74
 
56
- function rowOf(it, list, v, inReview) {
75
+ function rowOf(it, list, v, inReview, focusIds) {
57
76
  const today = v.today, { chip, overdue } = dueChip(it, today);
58
77
  const sub = [srcLabel(it), it.priority, it.waiting_on ? 'waiting on ' + it.waiting_on : null].filter(Boolean).join(' · ');
59
78
  const days = it.waiting_since ? daysBetween(String(it.waiting_since).slice(0, 10), today) : null;
@@ -65,7 +84,6 @@ function rowOf(it, list, v, inReview) {
65
84
  const draft = it.agent && it.agent.draft && (it.agent.draft.body || it.agent.draft.summary);
66
85
  const actions = ['done', 'notyet'];
67
86
  if (list !== 'today') actions.push('flag');
68
- if (list !== 'someday') actions.push('park');
69
87
  if (list !== 'waiting') actions.push('waiting');
70
88
  actions.push('remove');
71
89
  if (inReview) actions.push('keep');
@@ -73,12 +91,18 @@ function rowOf(it, list, v, inReview) {
73
91
  return {
74
92
  key: 'work:' + it.id, id: it.id, list, title: clip(it.title, 140), sub, chip, overdue, src: srcLabel(it),
75
93
  agent: agentOf(it) && agentOf(it) !== 'suggest' ? agentOf(it) : null,
94
+ focus: list === 'today' && focusIds.has(it.id),
76
95
  dialog: {
77
96
  eye: 'Your item', logTitle: 'Read from your list',
78
97
  log: ['Read the item (' + srcLabel(it) + ')', 'Placed it from its date, its flag and who it waits on: ' + list, inReview ? 'Found it untouched for ' + v.review_days + ' days' : 'Checked it against the seven-day review'],
79
98
  say, head: 'Where it stands', facts,
80
99
  write: { kind: 'work', id: it.id, actions },
81
100
  hold: HOLD.agent,
101
+ agent: agentDetail(it),
102
+ edit: { title: it.title || '', due: it.due || '', priority: it.priority || '', waiting_on: it.waiting_on || '', job: it.job || '', title_ro: READONLY[it.origin || it.source] ? 'The title comes from ' + READONLY[it.origin || it.source] + '. It is read-only here.' : '' },
103
+ steps: (it.steps || []).map((x) => ({ id: x.id, text: clip(x.text, 200), who: x.who })),
104
+ defer: it.defer || null,
105
+ someday: list === 'someday',
82
106
  pane: { label: 'Item record', file: 'pm-items · ' + it.id, h: clip(it.title, 120), intro: sub, rows: facts, paras: draft ? [clip(draft, 1500)] : [], parasTitle: draft ? 'Agent draft, not checked' : '' },
83
107
  },
84
108
  };
@@ -91,6 +115,11 @@ function build({ v, now }) {
91
115
  v = Object.assign({ work: {}, review: [], review_days: 7 }, v, { today });
92
116
  const work = Object.assign({ inbox: [], today: [], upcoming: [], waiting: [], someday: [] }, v.work);
93
117
  const reviewIds = new Set((v.review || []).map((x) => x.id));
118
+ const fo = v.focus || {};
119
+ const cleanF = (x) => ({ key: String(x.key), title: clip(x.title, 140), why: clip(x.why || '', 160), item_ids: (x.item_ids || []).map(String), job: x.job || null });
120
+ const focus = { suggestions: (fo.suggestions || []).slice(0, 3).map(cleanF), accepted: (fo.accepted || []).map(cleanF), dismissed: (fo.dismissed || []).map(String) };
121
+ const focusIds = new Set([].concat(...focus.accepted.map((a) => a.item_ids)));
122
+ const jobs = (v.jobs || []).map((j) => ({ id: j.id, name: clip(j.want || j.when || j.so || 'A standing job', 120), when: j.when || '', want: j.want || '', so: j.so || '', open: Math.max(0, (j.total || 0) - (j.done || 0)) }));
94
123
  const tray = (work.inbox || []).filter(isLocal), arrivals = (work.inbox || []).filter((i) => !isLocal(i));
95
124
  work.inbox = arrivals;
96
125
  const all = [];
@@ -124,15 +153,15 @@ function build({ v, now }) {
124
153
 
125
154
  const sections = SECTIONS.map(([k, label]) => {
126
155
  const items = work[k] || [];
127
- return { key: k, label, n: items.length, more: Math.max(0, items.length - MAX_PER), rows: items.slice(0, MAX_PER).map((it) => rowOf(it, k, v, reviewIds.has(it.id))) };
156
+ return { key: k, label, n: items.length, more: Math.max(0, items.length - MAX_PER), rows: items.slice(0, MAX_PER).map((it) => rowOf(it, k, v, reviewIds.has(it.id), focusIds)) };
128
157
  });
129
- const waitingRows = (work.waiting || []).slice(0, MAX_PER).map((it) => rowOf(it, 'waiting', v, reviewIds.has(it.id)));
130
- const agentRows = ready.concat(running, failed.filter((x) => !ready.includes(x))).slice(0, MAX_PER).map((x) => rowOf(x.it, x.list, v, reviewIds.has(x.it.id)));
131
- const trayRows = tray.slice(0, MAX_PER).map((it) => rowOf(it, 'tray', v, reviewIds.has(it.id)));
158
+ const waitingRows = (work.waiting || []).slice(0, MAX_PER).map((it) => rowOf(it, 'waiting', v, reviewIds.has(it.id), focusIds));
159
+ const agentRows = ready.concat(running, failed.filter((x) => !ready.includes(x))).slice(0, MAX_PER).map((x) => rowOf(x.it, x.list, v, reviewIds.has(x.it.id), focusIds));
160
+ const trayRows = tray.slice(0, MAX_PER).map((it) => rowOf(it, 'tray', v, reviewIds.has(it.id), focusIds));
132
161
  const rowsAll = [].concat(...sections.map((s) => s.rows), waitingRows, agentRows, trayRows);
133
162
  const firstToday = sections[1].rows[0];
134
163
  const model = {
135
- date: dateLine(now), pending: false,
164
+ date: dateLine(now), today, pending: false,
136
165
  header: { text: 'Real data · as of ' + hhmm(now) + ' · Jira and Slack appear only when an agent session has read them', missing: [] },
137
166
  hero, empty,
138
167
  capture: { placeholder: 'Add anything: "Reply to Rina about SSO by Friday"', hint: 'One line. The date and priority are read from it.' },
@@ -142,6 +171,7 @@ function build({ v, now }) {
142
171
  waiting: { title: 'Waiting on others', cap: longest != null ? 'longest ' + longest + ' ' + plural(longest, 'day', 'days') : (work.waiting || []).length ? num(work.waiting.length) + ' waiting' : '', n: (work.waiting || []).length, more: Math.max(0, (work.waiting || []).length - MAX_PER), rows: waitingRows },
143
172
  review: { n: (v.review || []).length, days: v.review_days, ids: (v.review || []).map((i) => i.id) },
144
173
  dock: { needs: clear, label: 'to clear', next: firstToday ? firstToday.title : (sections[0].rows[0] ? sections[0].rows[0].title : null) },
174
+ focus, jobs,
145
175
  rows: rowsAll,
146
176
  };
147
177
  last = model;
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.276.0",
3
+ "version": "0.278.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pmos-workspace",
9
- "version": "0.276.0",
9
+ "version": "0.278.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.276.0",
3
+ "version": "0.278.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",