create-pmos 0.280.0 → 0.282.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-pmos",
3
- "version": "0.280.0",
3
+ "version": "0.282.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": {
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@f41289c
2
- assembled: 2026-10-18
1
+ kernel-source: pmos@8253e85
2
+ assembled: 2026-10-19
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-18T18:55:32Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-19T02:01:08Z"}
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-18T18:55:32Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-19T02:01:08Z"}
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-18T18:55:32Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-19T02:01:08Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  Newest first, ISO dates.
4
4
 
5
- ## 2026-10-18
5
+ ## 2026-10-19
6
6
 
7
7
  - Adopted OKF v0.2 (D73).
@@ -218,7 +218,7 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
218
218
  ok(`B13 at 390 px (${theme}) the stage and timeline views do not scroll sideways`, await q.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1));
219
219
  await q.click('#ibTabs [data-v="list"]'); await q.locator('#ibBody .ini2').first().click(); await until(() => q.evaluate(() => document.querySelector('#dlg').classList.contains('on'))); await sleep(900);
220
220
  const g = await q.evaluate(() => { const r = document.querySelector('#dlg').getBoundingClientRect(); return { l: Math.round(r.left), w: Math.round(r.width), vw: innerWidth, tabs: getComputedStyle(document.querySelector('#dTabs')).display }; });
221
- ok(`B13 at 390 px (${theme}) the dialog is full width and its tab strip is hidden`, g.l === 0 && g.w === g.vw && g.tabs === 'none', JSON.stringify(g));
221
+ ok(`B13 at 390 px (${theme}) the dialog is full width and its Detail / Conversation switch is shown`, g.l === 0 && g.w === g.vw && g.tabs !== 'none', JSON.stringify(g));
222
222
  await R.ctx.close();
223
223
  }
224
224
  {
@@ -78,12 +78,12 @@ const prop = (o) => Object.assign({ id: 'prop-a', state: 'proposed', prompt: 'ad
78
78
  return { ctx, page, S };
79
79
  };
80
80
  const txt = (p, q) => p.evaluate((s) => (document.querySelector(s) || {}).textContent || '', q);
81
- const tab = async (p, k) => { await p.click(`#shT [data-sh="${k}"]`); await sleep(150); };
81
+ const tab = async (p, k) => { if (!(await p.$('#shT [data-sh]'))) await p.click('#shV'); await p.click(`#shT [data-sh="${k}"]`); await sleep(150); };
82
82
 
83
83
  const A = await open(); const p = A.page;
84
84
  ok('0 the sheet opens', !!(await p.evaluate(() => document.querySelector('#shT'))));
85
85
  /* E1 tabs */
86
- ok('E1 the sheet has Read, Edit, Proposals, Edit log and Health, with the open count on Proposals', await p.evaluate(() => [...document.querySelectorAll('#shT button')].map((b) => b.textContent.replace(/\s+/g, ' ').trim()).join('|') === 'Read|Edit|Proposals 1|Edit log|Health'));
86
+ await p.click('#shV'); ok('E1 the sheet has a view menu with Read, Edit, Proposals, Edit log and Health, and the open count on Proposals', await p.evaluate(() => [...document.querySelectorAll('#shT [data-sh]')].map((b) => b.textContent.replace(/\s+/g, ' ').trim()).join('|') === 'Read|Edit|Proposals 1|Edit log|Health'));
87
87
  ok('E1 the Read outline marks only a heading an open proposal names', await p.evaluate(() => { const b = [...document.querySelectorAll('.dso button')]; return b.length === 0 || b.every((x) => !x.querySelector('i') === !/Goal|Summary/.test(x.textContent)); }));
88
88
  ok('E7 the footnote no longer says read-only', !/Read-only/.test(await txt(p, '#oMain .xn')) && /only when you press Save or Accept/.test(await txt(p, '#oMain .xn')));
89
89
 
@@ -119,7 +119,7 @@ const prop = (o) => Object.assign({ id: 'prop-a', state: 'proposed', prompt: 'ad
119
119
  ok('E4 Accept posts path, id, hash and only the sections still current', ac.route === 'accept' && Object.keys(ac.body).sort().join() === 'hash,id,path,sections' && ac.body.hash === 'ha' && ac.body.sections.join() === 'Summary', JSON.stringify(ac.body));
120
120
  await until(() => p.evaluate(() => /Closed · 1/.test(document.querySelector('#oMain').textContent)));
121
121
  ok('E5 after Accept the proposal is listed as closed and accepted, and none is open', await p.evaluate(() => /Open proposals · 0/.test(document.querySelector('#oMain').textContent) && /Accepted/.test(document.querySelector('.dsp.accepted').textContent) && /No open proposals/.test(document.querySelector('#oMain').textContent)));
122
- ok('E5 the Proposals count is gone from the tab once none is open', await p.evaluate(() => document.querySelector('#shT [data-sh="props"]').textContent.trim() === 'Proposals'));
122
+ if (!(await p.$('#shT [data-sh]'))) await p.click('#shV'); ok('E5 the Proposals count is gone from the menu once none is open', await p.evaluate(() => document.querySelector('#shT [data-sh="props"]').textContent.trim() === 'Proposals'));
123
123
  await A.ctx.close();
124
124
 
125
125
  /* E4 stale-all, reject, ask */
@@ -181,13 +181,13 @@ const HEALTH = { ok: true, path: 'planning/prd/self-serve-v2-prd.md', health: {
181
181
  /* I8 the document sheet */
182
182
  const nPost0 = A.posts.length;
183
183
  await p.locator('#dmList .dmo[data-doc="prd"]').click(); await until(() => p.evaluate(() => document.querySelector('#dlg').classList.contains('on') && /Self-serve onboarding v2/.test(document.querySelector('#oMain').textContent) && document.querySelector('#oMain .dsbody'))); await sleep(500);
184
- const sh = await p.evaluate(() => ({ title: document.querySelector('#dTitle').textContent, path: document.querySelector('#oMain .dpath').textContent, tabs: [...document.querySelectorAll('#shT button')].map((b) => b.textContent).join(','), fm: [...document.querySelectorAll('#oMain .kv2 span')].map((s) => s.textContent).join('|'), heads: [...document.querySelectorAll('#oMain h3.d2')].map((h) => h.textContent).join('|'), outline: [...document.querySelectorAll('#oMain .dso button')].map((b) => b.textContent).join('|'), pre: [...document.querySelectorAll('#oMain pre')].map((e) => e.textContent).join('|'), li: document.querySelectorAll('#oMain li').length }));
184
+ const sh = await p.evaluate(() => ({ title: document.querySelector('#dTitle').textContent, path: document.querySelector('#oMain .dpath').textContent, tabs: (() => { document.querySelector('#shV').click(); const t = [...document.querySelectorAll('#shT [data-sh]')].map((b) => b.textContent).join(','); document.querySelector('#shV').click(); return t; })(), fm: [...document.querySelectorAll('#oMain .kv2 span')].map((s) => s.textContent).join('|'), heads: [...document.querySelectorAll('#oMain h3.d2')].map((h) => h.textContent).join('|'), outline: [...document.querySelectorAll('#oMain .dso button')].map((b) => b.textContent).join('|'), pre: [...document.querySelectorAll('#oMain pre')].map((e) => e.textContent).join('|'), li: document.querySelectorAll('#oMain li').length }));
185
185
  ok('I8 Read shows the file\'s path, its front matter as a grid, its headings, list and code', sh.title === 'PRD' && sh.path === 'planning/prd/self-serve-v2-prd.md' && sh.tabs === 'Read,Edit,Proposals,Edit log,Health' && /type\|PRD\|title\|Self-serve onboarding v2/.test(sh.fm) && sh.heads === 'PRD: Self-serve onboarding v2|Problem|Goal|Requirements' && sh.li === 2 && /R1 a first call/.test(sh.pre), JSON.stringify(sh));
186
186
  ok('I8 Read asked for the log and the last revision, by GET, for this path', A.gets.some((g) => g.path === '/api/doc-sheet/log' && /path=planning%2Fprd%2Fself-serve-v2-prd.md/.test(g.query)) && A.gets.some((g) => g.path === '/api/doc-sheet/at' && /rev=2/.test(g.query)));
187
- await p.click('#shT [data-sh="log"]');
187
+ await p.click('#shV'); await p.click('#shT [data-sh="log"]');
188
188
  const lg = await until(() => p.evaluate(() => document.querySelector('#oMain .hsr') && [...document.querySelectorAll('#oMain .hsr')].map((r) => r.textContent.replace(/\s+/g, ' ').trim())));
189
189
  ok('I8 Edit log lists the revisions newest first with their reasons and the other entries', lg && /v2 tightened the goal · pm/.test(lg[0]) && /v1 The file as the sheet first saw it · baseline/.test(lg[1]) && /asked What is missing\?/.test(lg[2]), JSON.stringify(lg));
190
- await p.click('#shT [data-sh="health"]');
190
+ await p.click('#shV'); await p.click('#shT [data-sh="health"]');
191
191
  const hl = await until(() => p.evaluate(() => document.querySelector('#oMain .ckr') && { note: document.querySelector('#oMain .note').textContent, rows: [...document.querySelectorAll('#oMain .ckr')].map((r) => r.className + ':' + r.querySelector('span').textContent) }));
192
192
  ok('I8 Health shows each check as passed, not passed or no input, and says no input is not counted', hl && /1 of 2 checks/.test(hl.note) && hl.rows.join() === 'ckr done:Passed,ckr blocked:Not passed,ckr skipped:No input', JSON.stringify(hl));
193
193
  ok('I8 the health check posts the path and the workspace only', A.posts.some((x) => x.path === '/api/doc-health/check' && Object.keys(x.body).sort().join() === 'path,ws' && x.body.ws === 'w1'));
@@ -111,6 +111,7 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
111
111
  ok('I7 a finding opens the standard dialog: the record\'s numbers, its readings with dates, its path, and only the dashboard switch as a press', dl.title === 'Time to first call' && /real data/.test(dl.eye) && /Target3 days by 31 Dec/.test(dl.kv) && /15 Oct9 days/.test(dl.kv) && dl.path === 'planning/records/kr-metrics.jsonl' && dl.btn === 1 && dl.sw === 'Weekly partner review:true' && /Nothing here changes a record/.test(dl.hold) && dl.inert, JSON.stringify(dl));
112
112
  ok('I7 Escape closes it and focus returns', (await p.keyboard.press('Escape'), await until(() => p.evaluate(() => !document.querySelector('#dlg').classList.contains('on')))));
113
113
  await p.locator('#dashBody [data-open]').filter({ hasText: 'Details' }).first().click(); await until(() => p.evaluate(() => document.querySelector('#dlg').classList.contains('on'))); await sleep(300);
114
+ ok('I6 the measure popup draws the chart in its detail panel, under its heading and lead line, as the mockup does', await p.evaluate(() => { const o = document.querySelector('#oMain'), d1 = o.querySelector('.d1'), t = o.querySelector('.pdchart .mtile, .pdchart svg, .pdchart [class*="tile"]'); return !!d1 && !!t && !!(d1.compareDocumentPosition(t) & Node.DOCUMENT_POSITION_FOLLOWING); }));
114
115
  ok('I7 the Details link of a chart opens that chart\'s dialog', (await txt('#dTitle')) === 'Partner activation');
115
116
  await p.keyboard.press('Escape'); await sleep(300);
116
117
  /* the agent is the read-only one: a question goes to the briefing route and nothing else posts */
@@ -216,7 +217,7 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
216
217
  ok(`I11 at 390 px (${theme}) the page has no sideways scroll and every control is 44 px`, !m.over && m.small.length === 0, JSON.stringify(m));
217
218
  await q.locator('#dashBody .nfr').first().click(); await until(() => q.evaluate(() => document.querySelector('#dlg').classList.contains('on'))); await sleep(900);
218
219
  const g = await q.evaluate(() => { const r = document.querySelector('#dlg').getBoundingClientRect(); return { l: Math.round(r.left), w: Math.round(r.width), vw: innerWidth, tabs: getComputedStyle(document.querySelector('#dTabs')).display }; });
219
- ok(`I11 at 390 px (${theme}) the dialog is full width and its tab strip is hidden`, g.l === 0 && g.w === g.vw && g.tabs === 'none', JSON.stringify(g));
220
+ ok(`I11 at 390 px (${theme}) the dialog is full width and its Detail / Conversation switch is shown`, g.l === 0 && g.w === g.vw && g.tabs !== 'none', JSON.stringify(g));
220
221
  await R.ctx.close();
221
222
  }
222
223
  {
@@ -218,7 +218,7 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
218
218
  const d = await p.evaluate(() => ({ title: document.querySelector('#dTitle').textContent, inert: ['.rail', 'main.stage', '#dock'].every((s) => document.querySelector(s).inert), pane: document.querySelector('#oMain').textContent, card: document.querySelector('#card') ? document.querySelector('#card').textContent : '', log: document.querySelector('#logT') ? document.querySelector('#logT').textContent : '', label: document.querySelector('#oLab').textContent, input: document.querySelector('#askIn').disabled, role: document.querySelector('#dlg').getAttribute('aria-modal') }));
219
219
  ok('R11 the page behind the dialog is inert and the dialog is modal', d.inert && d.role === 'true');
220
220
  ok('R4 the dialog names the row, with an activity log of what was read', d.title === MODEL.list.rows[0].title && /Readfromtherepository3steps/.test(d.log.replace(/\s+/g, '')), d.log);
221
- ok('R4 the detail pane repeats neither the dialog title nor its subtitle, and its record is a grid, not a bullet list', await p.evaluate(() => { const t = document.querySelector('#dTitle').textContent, sub = document.querySelector('#dSub').textContent, o = document.querySelector('#oMain'); return !o.querySelector('.d1') && !o.textContent.includes(t) && (!sub || !o.textContent.includes(sub)) && !o.querySelector('ul'); }), JSON.stringify(await p.evaluate(() => ({ t: document.querySelector('#dTitle').textContent, sub: document.querySelector('#dSub').textContent, pane: document.querySelector('#oMain').innerHTML.slice(0, 500) }))));
221
+ ok('R4 the detail pane opens with the record\'s path and heading, as the mockup draws it', await p.evaluate(() => { const o = document.querySelector('#oMain'); return !!o.querySelector('.dpath') && !!o.querySelector('.d1') && o.querySelector('.dpath').compareDocumentPosition(o.querySelector('.d1')) & Node.DOCUMENT_POSITION_FOLLOWING; }));
222
222
  ok('R4 the card holds the evidence and the next step, and the right pane the record', /The way through/.test(d.card) && /Blocked at/.test(d.card) && /Initiative record/.test(d.label) && /planning\/initiatives|console-3-boards/.test(d.pane), d.card.slice(0, 120));
223
223
  await until(() => p.evaluate(() => getComputedStyle(document.querySelector('#dlg')).transform === 'none' || /matrix\(1, 0, 0, 1, 0, 0\)/.test(getComputedStyle(document.querySelector('#dlg')).transform)), 3000);
224
224
  const pane0 = await p.evaluate(() => { const b = document.querySelector('#dPane'); const r = b.getBoundingClientRect(); return { on: b.getAttribute('aria-pressed'), t: b.title, w: r.width, h: r.height, convo: getComputedStyle(document.querySelector('#dBody')).display }; });
@@ -350,7 +350,7 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
350
350
  await q.goto(BASE + '/premium.html?theme=' + theme);
351
351
  await until(() => q.evaluate(() => document.querySelectorAll('#rank .rr').length > 0));
352
352
  await q.locator('#rank .rhd').nth(3).click(); await until(() => q.evaluate(() => document.querySelector('#dlg').classList.contains('on'))); await sleep(800);
353
- await q.click('#dPane'); await sleep(300);
353
+ await q.click('#dTabs [data-t="chat"]'); await sleep(300);
354
354
  await q.locator('#card .op').nth(0).click(); await q.fill('#why', 'A reason');
355
355
  const m = await q.evaluate(() => { const hs = (sel) => [...document.querySelectorAll(sel)].map((b) => Math.round(b.getBoundingClientRect().height)); return { over: document.documentElement.scrollWidth > innerWidth + 1 || document.querySelector('#dlg').scrollWidth > document.querySelector('#dlg').clientWidth + 1, small: [].concat(hs('#card .seg2 button'), hs('#recBtn'), hs('.askbar input'), hs('#askGo'), hs('#card .op')).filter((h) => h < 44) }; });
356
356
  ok('W10 at 390 px (' + theme + ') the decision card has no sideways scroll and every new control is 44 px', !m.over && m.small.length === 0, JSON.stringify(m));
@@ -492,8 +492,8 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
492
492
  const ov = await R.page.evaluate(() => document.documentElement.scrollWidth - innerWidth);
493
493
  ok(`R11 no sideways scroll at 390 px (${th})`, ov <= 0, String(ov));
494
494
  await R.page.click('#rank .rhd');
495
- const ph = await until(() => R.page.evaluate(() => document.querySelector('#dlg').classList.contains('on')), 3000) && await R.page.evaluate(() => ({ tab: document.querySelector('#dGrid').dataset.tab, pressed: document.querySelector('#dTabs [data-t="out"]').getAttribute('aria-pressed'), tabsShown: getComputedStyle(document.querySelector('#dTabs')).display !== 'none', w: Math.round(document.querySelector('#dlg').getBoundingClientRect().width), l: Math.round(document.querySelector('#dlg').getBoundingClientRect().left), vw: innerWidth, btn: document.querySelector('#dPane').getAttribute('aria-pressed'), ov: document.documentElement.scrollWidth - innerWidth }));
496
- ok(`R4 on a phone the dialog opens on Detail, the tab strip is hidden and the header button brings the conversation (${th})`, ph && ph.tab === 'out' && ph.pressed === 'true' && !ph.tabsShown && ph.btn === 'false' && ph.l === 0 && ph.w === ph.vw && ph.ov <= 0, JSON.stringify(ph));
495
+ const ph = await until(() => R.page.evaluate(() => document.querySelector('#dlg').classList.contains('on')), 3000) && await R.page.evaluate(() => ({ tab: document.querySelector('#dGrid').dataset.tab, pressed: document.querySelector('#dTabs [data-t="out"]').getAttribute('aria-pressed'), tabsShown: getComputedStyle(document.querySelector('#dTabs')).display !== 'none', paneBtn: getComputedStyle(document.querySelector('#dPane')).display, w: Math.round(document.querySelector('#dlg').getBoundingClientRect().width), l: Math.round(document.querySelector('#dlg').getBoundingClientRect().left), vw: innerWidth, btn: document.querySelector('#dPane').getAttribute('aria-pressed'), ov: document.documentElement.scrollWidth - innerWidth }));
496
+ ok(`R4 on a phone the dialog opens on Detail, with the mockup's Detail / Conversation switch and no panel button (${th})`, ph && ph.tab === 'out' && ph.pressed === 'true' && ph.tabsShown && ph.paneBtn === 'none' && ph.l === 0 && ph.w === ph.vw && ph.ov <= 0, JSON.stringify(ph));
497
497
  ok(`0 no page error at 390 px (${th})`, R.errors.length === 0, R.errors.join(' | '));
498
498
  await R.ctx.close();
499
499
  }
@@ -200,7 +200,7 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
200
200
  const R = await open({ w: 820, h: 1000 }), t = R.page;
201
201
  await t.locator('.wrow[data-key="work:item-aaaaaaaaaaa1"] .wrh').click(); await until(() => t.evaluate(() => document.querySelector('#dlg').classList.contains('on'))); await sleep(900);
202
202
  const g = await t.evaluate(() => { const r = document.querySelector('#dlg').getBoundingClientRect(); return { l: Math.round(r.left), w: Math.round(r.width), vw: innerWidth, tabs: getComputedStyle(document.querySelector('#dTabs')).display }; });
203
- ok('M12 on a tablet (820 px) the dialog is centred with a 12 px margin, and the tab strip is hidden', Math.abs(g.l - (g.vw - g.w) / 2) <= 2 && g.w === g.vw - 24 && g.tabs === 'none', JSON.stringify(g));
203
+ ok('M12 on a tablet (820 px) the dialog is centred with a 12 px margin, and the Detail / Conversation switch is shown', Math.abs(g.l - (g.vw - g.w) / 2) <= 2 && g.w === g.vw - 24 && g.tabs !== 'none', JSON.stringify(g));
204
204
  await R.ctx.close();
205
205
  }
206
206
  /* M12 floors on a phone, both themes */
@@ -210,9 +210,9 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
210
210
  const geo = () => q.evaluate(() => { const r = document.querySelector('#dlg').getBoundingClientRect(); return { l: Math.round(r.left), w: Math.round(r.width), vw: innerWidth }; });
211
211
  const g1 = await geo();
212
212
  ok(`M12 at 390 px (${theme}) the dialog opens on Detail at the full width of the screen`, g1.l === 0 && g1.w === g1.vw, JSON.stringify(g1));
213
- await q.click('#dPane'); await sleep(900);
213
+ await q.click('#dTabs [data-t="chat"]'); await sleep(900);
214
214
  const g2 = await geo();
215
- ok(`M12 at 390 px (${theme}) with the conversation brought in it is still full width`, g2.l === 0 && g2.w === g2.vw && await q.evaluate(() => document.querySelector('#dPane').getAttribute('aria-pressed') === 'true' && getComputedStyle(document.querySelector('#dBody')).display !== 'none' && getComputedStyle(document.querySelector('#dOut')).display === 'none'), JSON.stringify(g2));
215
+ ok(`M12 at 390 px (${theme}) with the conversation brought in it is still full width`, g2.l === 0 && g2.w === g2.vw && await q.evaluate(() => document.querySelector('#dTabs [data-t="chat"]').getAttribute('aria-pressed') === 'true' && getComputedStyle(document.querySelector('#dBody')).display !== 'none' && getComputedStyle(document.querySelector('#dOut')).display === 'none'), JSON.stringify(g2));
216
216
  const m = await q.evaluate(() => { const hs = (sel) => [...document.querySelectorAll(sel)].map((b) => Math.round(b.getBoundingClientRect().height)); return { over: document.documentElement.scrollWidth > innerWidth + 1 || document.querySelector('#dlg').scrollWidth > document.querySelector('#dlg').clientWidth + 1, small: [].concat(hs('#card .cta'), hs('#card .seg2 button'), hs('#wOn'), hs('.askbar input'), hs('#askGo')).filter((h) => h < 44) }; });
217
217
  ok(`M12 at 390 px (${theme}) the dialog has no sideways scroll and every control is 44 px`, !m.over && m.small.length === 0, JSON.stringify(m));
218
218
  await q.keyboard.press('Escape'); await sleep(300);
@@ -260,3 +260,9 @@ Welcome is the premium first-run page, at `/premium-welcome.html`. It is a page
260
260
  ## The default page
261
261
 
262
262
  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.
263
+
264
+ ## The dialog on a phone and the document sheet's views
265
+
266
+ On a phone or tablet (under 1000 px) every dialog opens on **Detail**. A **Detail / Conversation** switch sits under the title, and **Open it** at the foot of Detail brings the conversation when an action waits there. The header holds only **Close**. A document sheet picks its view (**Read**, **Edit**, **Proposals**, **Edit log**, **Health**) from one button with a menu.
267
+
268
+ A dialog's detail panel opens with the record's path, its heading and one lead line. A decision's evidence reads as a list. A measure's dialog draws the measure's chart above its facts and readings.
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.280.0",
3
+ "version": "0.282.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pmos-workspace",
9
- "version": "0.280.0",
9
+ "version": "0.282.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.280.0",
3
+ "version": "0.282.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",
@@ -92,7 +92,7 @@ const BODY = '## Purpose\n\nWhy this board exists.\n\n## Scope\n\nWhat it covers
92
92
  ok('B1 a document with no file is not', await p.evaluate((k) => !document.querySelector('#docBody .dmo:not(button)') || [...document.querySelectorAll('#docBody .dmo:not(button)')].every((x) => !x.closest('.dmr').querySelector(`[data-doc="${k}"]`)), bkey));
93
93
  await p.click(`#docBody [data-doc="${bkey}"]`); await dlgOn(p);
94
94
  ok('B2 the reader shows the file\'s text and path, and the bar says nothing is sent', await until(() => p.evaluate((pt) => { const o = document.querySelector('#oMain'); return /Why this board exists/.test(o.textContent) && o.textContent.includes(pt) && !!o.querySelector('[data-issue-bar="draft"]') && /Nothing is sent/.test(o.querySelector('[data-issue-bar]').textContent) && !!o.querySelector('[data-rd="issue"]'); }, d1.path)), await p.evaluate(() => document.querySelector('#oMain').textContent));
95
- ok('B2 the reader has no Edit tab', await p.evaluate(() => !document.querySelector('#oMain [data-sh]')));
95
+ ok('B2 the reader has no Edit tab', await p.evaluate(() => !document.querySelector('#oMain [data-sh], #oMain #shV')));
96
96
  const n0 = ledger().filter((l) => l.ev === 'issue').length;
97
97
  await p.click('[data-rd="issue"]');
98
98
  ok('B3 Issue it says it sent nothing', !!(await toastIs(p, /Issued\. Nothing was sent to anyone/)));
@@ -110,17 +110,17 @@ const BODY = '## Purpose\n\nWhy this board exists.\n\n## Scope\n\nWhat it covers
110
110
  await until(() => ip.evaluate((k) => !!document.querySelector(`#dmList [data-doc="${k}"]`), ikey), 60000);
111
111
  await ip.click(`#dmList [data-doc="${ikey}"]`); await dlgOn(ip);
112
112
  ok('I1 the Read tab of a draft has the Issue it bar above the text', await until(() => ip.evaluate(() => { const o = document.querySelector('#oMain'); const b = o.querySelector('[data-issue-bar="draft"]'); return !!b && /Nothing is sent/.test(b.textContent) && /Why this board exists/.test(o.textContent) && b.compareDocumentPosition(o.querySelector('.dsbody')) & Node.DOCUMENT_POSITION_FOLLOWING; })));
113
- await ip.click('[data-sh="edit"]');
113
+ await ip.click('#shV'); await ip.click('[data-sh="edit"]');
114
114
  await until(() => ip.evaluate(() => !!document.querySelector('#dsEd')));
115
115
  await ip.fill('#dsEd', BODY + '\n## Added\n\nUnsaved line.\n');
116
- await ip.click('[data-sh="read"]');
116
+ await ip.click('#shV'); await ip.click('[data-sh="read"]');
117
117
  await until(() => ip.evaluate(() => !!document.querySelector('[data-ds="issue"]')));
118
118
  const nI = I.posts.length;
119
119
  await ip.click('[data-ds="issue"]');
120
120
  ok('I2 Issue it with unsaved edits posts nothing and says to save or cancel first', await until(() => ip.evaluate(() => /unsaved changes.*Save or cancel/.test((document.querySelector('#dsErr') || {}).textContent || ''))) && I.posts.length === nI);
121
121
  ok('I2 the ledger has no issue line for that draft yet', !ledger().some((l) => l.ev === 'issue' && l.slot === d2.slot && l.scope === iscope));
122
- await ip.click('[data-sh="edit"]'); await until(() => ip.evaluate(() => !!document.querySelector('[data-ds="discard"]')));
123
- await ip.click('[data-ds="discard"]'); await ip.click('[data-sh="read"]');
122
+ await ip.click('#shV'); await ip.click('[data-sh="edit"]'); await until(() => ip.evaluate(() => !!document.querySelector('[data-ds="discard"]')));
123
+ await ip.click('[data-ds="discard"]'); await ip.click('#shV'); await ip.click('[data-sh="read"]');
124
124
  await until(() => ip.evaluate(() => !!document.querySelector('[data-ds="issue"]')));
125
125
  /* a refusal: someone else issues the same draft first (the console, a second tab) */
126
126
  const raced = await fetch(BASE + '/api/core-docs/issue', { method: 'POST', headers: H, body: JSON.stringify({ ws: B.ws, scope: iscope, key: ikey, slot: d2.slot }) });
@@ -301,7 +301,7 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
301
301
  const R = await open({ w: 390, h: 844, theme }), q2 = R.page;
302
302
  const bar2 = await q2.evaluate(() => { const b = document.querySelector('#xFocus').getBoundingClientRect(); return { over: document.documentElement.scrollWidth > innerWidth + 1, w: Math.round(b.width), h: [...document.querySelectorAll('#xFocus button')].map((x) => Math.round(x.getBoundingClientRect().height)) }; });
303
303
  ok(`W12 at 390 px (${theme}) the Focus bar fits and its buttons are 44 px`, !bar2.over && bar2.h.every((x) => x >= 44), JSON.stringify(bar2));
304
- await openKey(q2, 'work:item-bbbbbbbbbbb2'); await q2.click('#dPane'); await sleep(900);
304
+ await openKey(q2, 'work:item-bbbbbbbbbbb2'); await q2.click('#dTabs [data-t="chat"]'); await sleep(900);
305
305
  const g = {};
306
306
  for (const k of ['edit', 'steps', 'defer']) {
307
307
  await q2.click(`[data-p="xt"][data-k="${k}"]`); await sleep(150);
@@ -309,7 +309,7 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
309
309
  }
310
310
  ok(`W12 at 390 px (${theme}) the edit, steps and Not before panels have no sideways scroll and every control is 44 px`, ['edit', 'steps', 'defer'].every((k) => !g[k].over && g[k].small.length === 0), JSON.stringify(g));
311
311
  await q2.keyboard.press('Escape'); await dlgOff(q2);
312
- await R.page.locator('#plateBody .wrow[data-key="work:wbs:alpha:4.2"] .wrh').click(); await dlgOn(q2); await sleep(500); await q2.click('#dPane'); await sleep(900);
312
+ await R.page.locator('#plateBody .wrow[data-key="work:wbs:alpha:4.2"] .wrh').click(); await dlgOn(q2); await sleep(500); await q2.click('#dTabs [data-t="chat"]'); await sleep(900);
313
313
  const ag = await q2.evaluate(() => ({ over: document.documentElement.scrollWidth > innerWidth + 1 || document.querySelector('#dlg').scrollWidth > document.querySelector('#dlg').clientWidth + 1, small: [...document.querySelectorAll('.agblk button')].filter((b) => b.getBoundingClientRect().height < 43.5).map((b) => b.textContent.trim()) }));
314
314
  ok(`W12 at 390 px (${theme}) the agent block has no sideways scroll and its buttons are 44 px`, !ag.over && ag.small.length === 0, JSON.stringify(ag));
315
315
  await R.ctx.close();
@@ -6,7 +6,7 @@
6
6
  * premium-board-actions, pm/premium-acts.js): move to the next stage or back, hold, cancel, archive, resume, reopen and restore, each with Undo. Nothing here issues a document. */
7
7
  import { pmPost } from './http.js';
8
8
  import { proposalsModel, editBody, acceptBody, rejectBody, askBody, askLine, issueBody, mdHtml } from './premium-doc-edit.js';
9
- import { $, $$, esc, openDlg, closeDlg, setMode, toast, loadThread, onScroll, wireRail, logHtml, turnA, ptx, pillOf, kv, H2, CHECK, crumbHtml, wireCrumb, AI, openAddDoc } from './premium-shell.js';
9
+ import { $, $$, esc, openDlg, closeDlg, setMode, toast, loadThread, onScroll, wireRail, logHtml, turnA, ptx, pillOf, kv, H2, CHECK, CHEV, crumbHtml, wireCrumb, AI, openAddDoc } from './premium-shell.js';
10
10
  import { barHtml, onBar, closeMenu } from './premium-acts.js';
11
11
 
12
12
  let M = null; // the model
@@ -233,7 +233,9 @@ function issueBar(s) {
233
233
  }
234
234
  function sheetPane() {
235
235
  const s = sheet, d = s.d;
236
- const menu = `<div class="seg" id="shT" role="group" aria-label="Document views"><i class="pill"></i>${TABS.map(([k, n]) => `<button data-sh="${k}" aria-pressed="${s.tab === k}">${n}${k === 'props' && s.props && propsM(s).count ? ` <em>${propsM(s).count}</em>` : ''}</button>`).join('')}</div>`;
236
+ const cnt = (k) => (k === 'props' && s.props && propsM(s).count ? ` <em>${propsM(s).count}</em>` : '');
237
+ const EYE = '<svg class="i" viewBox="0 0 24 24"><path d="M2 12s4-7 10-7 10 7 10 7-4 7-10 7S2 12 2 12z"/><circle cx="12" cy="12" r="3"/></svg>';
238
+ const menu = `<div class="dsvr" id="shT"><span class="dsvw"><button type="button" class="dsvb" id="shV" aria-haspopup="menu" aria-expanded="${!!s.vm}">${EYE}${esc(TABS.find((t) => t[0] === s.tab)[1])}${cnt(s.tab)}${CHEV}</button>${s.vm ? `<div class="dsmn" role="menu" aria-label="Document views">${TABS.map(([k, n]) => `<button type="button" role="menuitem" data-sh="${k}" aria-current="${s.tab === k}">${n}${cnt(k)}${s.tab === k ? CHECK : ''}</button>`).join('')}</div>` : ''}</span></div>`;
237
239
  const head = `<p class="dpath">${esc(d.path)}</p><div class="dsm"><span class="${d.st === 'ok' ? 'ok' : d.st === 'draft' ? 'warn' : 'mut'}">${esc(d.state)}</span>${d.when ? `<span>updated ${esc(d.when)}</span>` : ''}${d.by ? `<span>${esc(d.by)}</span>` : ''}</div>`;
238
240
  let body = '';
239
241
  if (s.err) body = `<p class="empty3 plain">${esc(s.err)}</p>`;
@@ -278,7 +280,7 @@ function propHtml(s, p) {
278
280
  const secs = p.sections.map((x) => `<div class="dsdf">${p.sections.length > 1 && !x.stale ? `<label><input type="checkbox" data-pk="${esc(p.id)}" value="${esc(x.name)}"${on(x.name) ? ' checked' : ''}> ` : ''}<b>${esc(x.name)}</b>${p.sections.length > 1 && !x.stale ? '</label>' : ''} ${x.stale ? '<span class="dst2">Changed since this was proposed</span>' : `<ins>+ ${esc(x.add)}</ins>`}</div>`).join('');
279
281
  return `<div class="dsp"><div><b>${esc(p.who)}</b><span>${esc(p.request)}</span>${secs}${p.staleAll ? '<q>The document changed since this was proposed, so it cannot be accepted. Ask again.</q>' : ''}</div><div class="dsa">${p.canAccept ? `<button class="dmcta dark" data-ds="acc:${esc(p.id)}"${s.busy ? ' disabled' : ''}>Accept</button>` : ''}<button class="dmcta alt" data-ds="rej:${esc(p.id)}"${s.busy ? ' disabled' : ''}>Reject</button></div>${s.rejecting === p.id ? `<div class="dsrow" style="grid-column:1/-1"><input id="dsRj" class="dsy" placeholder="Why are you rejecting it? Kept in the edit log." aria-label="Why are you rejecting it" value="${esc(s.rejWhy || '')}"><button class="dmcta dark" data-ds="rejgo:${esc(p.id)}"${s.busy ? ' disabled' : ''}>Reject it</button><button class="dmcta alt" data-ds="rejno">Cancel</button></div>` : ''}</div>`;
280
282
  }
281
- function drawSheet() { $('#oMain').innerHTML = sheetPane(); pillOf($('#shT')); }
283
+ function drawSheet() { $('#oMain').innerHTML = sheetPane(); }
282
284
  async function getJson(url, init) { try { const r = await fetch(url, Object.assign({ credentials: 'same-origin' }, init || {})); return await r.json(); } catch { return null; } }
283
285
  async function loadTab(tab) {
284
286
  const s = sheet, p = encodeURIComponent(s.d.path), ws = M.board.ws ? '&ws=' + encodeURIComponent(M.board.ws) : '';
@@ -317,8 +319,10 @@ function openSheet(d) {
317
319
  drawSheet(); loadThread(key); loadTab('read');
318
320
  }
319
321
  $('#oMain').addEventListener('click', (e) => {
322
+ if (sheet && sheet.vm && !e.target.closest('.dsvw')) { sheet.vm = false; drawSheet(); }
323
+ if (sheet && e.target.closest('#shV')) { keepDraft(); sheet.vm = !sheet.vm; drawSheet(); return; }
320
324
  const t = e.target.closest('[data-sh]');
321
- if (t && sheet) { keepDraft(); sheet.tab = t.dataset.sh; sheet.err = null; sheet.msg = ''; drawSheet(); loadTab(sheet.tab); return; }
325
+ if (t && sheet) { keepDraft(); sheet.vm = false; sheet.tab = t.dataset.sh; sheet.err = null; sheet.msg = ''; drawSheet(); loadTab(sheet.tab); return; }
322
326
  const b = e.target.closest('[data-ds]'); if (b && sheet) { sheetPress(b.dataset.ds); return; }
323
327
  const g = e.target.closest('[data-go]'); if (g) { const h = $('#ds-h' + g.dataset.go); if (h) h.scrollIntoView({ block: 'start', behavior: 'smooth' }); }
324
328
  });
@@ -323,7 +323,7 @@ function drawDock() { $('#dN').textContent = M.dock.needs; $('#dLab').textConten
323
323
  function cardHtml(c) { return `<div class="acard" id="card"><p class="ct">What this page can do</p><p class="nodef" id="holdWhy">${esc(c.dialog.hold)} The switches under On your dashboards save a dashboard and change no record.</p></div>`; }
324
324
  function paneHtml(c) {
325
325
  const p = c.dialog.pane;
326
- return `<article class="paper doc"><p class="dpath">${esc(p.file)}</p>${onDashHtml(c)}<div class="kv2">${c.dialog.facts.map(([a, b]) => `<span>${esc(a)}</span><span>${esc(b)}</span>`).join('')}</div><h3 class="h2">All ${c.pts.length} readings</h3><div class="kv2">${p.rows.map(([a, b]) => `<span>${esc(a)}</span><span>${esc(b)}</span>`).join('')}</div><p class="xn">Read from the KR metric record. The line status is the record's own: the straight line from its baseline to its target. Nothing here is a forecast.</p></article>`;
326
+ return `<article class="paper doc"><p class="dpath">${esc(p.file)}</p><h3 class="d1">${esc(c.title)}</h3><p>${esc(c.dialog.say)}</p><div class="ntw pdchart">${tileHtml(c)}</div><div class="kv2">${c.dialog.facts.map(([a, b]) => `<span>${esc(a)}</span><span>${esc(b)}</span>`).join('')}</div><h3 class="h2">All ${c.pts.length} readings</h3><div class="kv2">${p.rows.map(([a, b]) => `<span>${esc(a)}</span><span>${esc(b)}</span>`).join('')}</div>${onDashHtml(c)}<p class="xn">Read from the KR metric record. The line status is the record's own: the straight line from its baseline to its target. Nothing here is a forecast.</p></article>`;
327
327
  }
328
328
  /* Add to a dashboard (PRD D6): one switch per saved dashboard of the board. A press saves that dashboard with the chart added or taken off. */
329
329
  function onDashHtml(c) {
@@ -38,7 +38,7 @@ export function openDlg(o) {
38
38
  $('#dEye').textContent = o.eye; $('#dTitle').textContent = o.title; $('#dSub').textContent = o.sub || ''; $('#dSub').hidden = !o.sub;
39
39
  $('#oMain').innerHTML = o.pane || `<article class="paper doc">${o.html}</article>`; $('#oLab').textContent = o.label || 'Detail';
40
40
  $('#dBody').innerHTML = `<div class="stream" role="log">${o.stream || turnA(ptx(o.say))}</div><form class="askbar" id="askF"><input id="askIn" placeholder="Ask the agent about this row" maxlength="2000" autocomplete="off" aria-label="A question for the agent"><button type="submit" data-act="ask" id="askGo" aria-label="Ask the agent" title="Ask the agent"><svg class="i" viewBox="0 0 24 24"><path d="M5 12h14M13 6l6 6-6 6"/></svg></button></form><p class="fine2" id="askNote">The agent reads this repository and answers in words. It cannot change anything, and its answers are not checked against the records.</p>`;
41
- $('#dlg').classList.remove('full'); setMode(innerWidth < 1000 ? 'detail' : 'split'); setTab('out'); // on a phone the dialog opens on Detail and the header button brings the conversation
41
+ $('#dlg').classList.remove('full'); setMode('split'); setTab('out'); // on a phone the dialog opens on the Detail tab and the Detail / Conversation switch brings the conversation, as the mockup draws it
42
42
  $('#veil').classList.add('on'); $('#dlg').classList.add('on');
43
43
  $$('#dGrid .pane').forEach((p) => { p.scrollTop = 0; });
44
44
  setTimeout(() => $('#dlg').focus(), 60);
@@ -60,6 +60,7 @@ export function setMode(m) {
60
60
  }
61
61
  $('#dPane').onclick = () => setMode($('#dlg').dataset.mode === 'split' ? 'detail' : 'split');
62
62
  export function setFull(f) { $('#dlg').classList.toggle('full', f); const b = $('#dExpand'); b.setAttribute('aria-pressed', f); b.title = f ? 'Exit full screen' : 'Full screen'; $('#dExpP').setAttribute('d', f ? 'M20 10h-6V4M4 14h6v6M14 10l7-7M3 21l7-7' : 'M14 4h6v6M10 20H4v-6M20 4l-7 7M4 20l7-7'); }
63
+ $('#tabGo').onclick = () => setTab('chat');
63
64
  $('#dClose').onclick = closeDlg; $('#veil').onclick = closeDlg;
64
65
  $('#dExpand').onclick = () => setFull(!$('#dlg').classList.contains('full'));
65
66
  $('#dTabs').addEventListener('click', (e) => { const b = e.target.closest('[data-t]'); if (b) setTab(b.dataset.t); });
@@ -187,7 +187,7 @@ function cardInner(r) {
187
187
  const cardHtml = (r) => `<div class="acard" id="card">${cardInner(r)}</div>`;
188
188
  function paneHtml(r) {
189
189
  const p = r.dialog.pane;
190
- let h = `<p class="dpath">${esc(p.file)}</p>`; // the dialog heading above already names the item and its source
190
+ let h = `<p class="dpath">${esc(p.file)}</p>${p.h ? `<h3 class="d1">${esc(p.h)}</h3>` : ''}${p.intro ? `<p>${esc(p.intro)}</p>` : ''}`; // the heading and lead line, as the mockup draws them
191
191
  if (p.rows && p.rows.length) h += `<div class="kv2">${p.rows.map(([a, b]) => `<span>${esc(a)}</span><span>${esc(b)}</span>`).join('')}</div>`;
192
192
  if (p.paras && p.paras.length) h += `<h3 class="d2">${esc(p.parasTitle)}</h3>${p.paras.map((x) => `<p>${esc(x)}</p>`).join('')}`;
193
193
  return `<article class="paper doc">${h}<p class="xn">The item as your list holds it.</p></article>`;
@@ -325,6 +325,10 @@ a.round{color:inherit;text-decoration:none}
325
325
  .dlg.full .dgrid .p-work,.dlg.full .dgrid .p-out{display:flex;overflow:auto;min-height:0}
326
326
  .dlg.full #dTabs{display:none}}
327
327
  @media (max-width:699px){#dExpand{display:none}}
328
+ #dPane{display:none}@media (min-width:1000px){#dPane{display:grid}.dlg.full #dPane{display:none}}
329
+ .dlg[data-mode="detail"] #dPane{display:grid}
330
+ .tabhint{display:none}
331
+ @media (max-width:999px){.dlg[data-mode="split"] .dgrid[data-tab="out"] .p-out .tabhint{display:none}.dlg:has(#dBody .acard:not(.answered)) .dgrid[data-tab="out"] .p-out .tabhint{display:flex;position:sticky;bottom:0;align-items:center;justify-content:space-between;gap:12px;padding:12px 4px 4px;margin-top:10px;background:linear-gradient(to top,var(--well) 70%,transparent);font-size:12.5px;color:var(--ink-2)}.tabhint button{height:44px;padding:0 18px;border-radius:999px;background:var(--solid);color:var(--on-solid);font-weight:650;font-size:12.5px}}
328
332
  .dx2[aria-pressed="true"]{background:var(--solid);color:var(--on-solid)}
329
333
  .fchip{display:inline-flex;align-items:center;gap:6px;padding:3px 10px;border-radius:999px;background:var(--well);font-size:12.5px}
330
334
  .fchip svg{width:13px;height:13px}
@@ -627,7 +631,6 @@ a.round{color:inherit;text-decoration:none}
627
631
  .wck.dec:hover{color:var(--ember-ink)}
628
632
  .wrow .wtit .tgf{display:block;width:fit-content;margin:6px 0 2px}
629
633
  .wck.dec{box-shadow:none}
630
- @media (max-width:999px){.dtabs{display:none}}
631
634
 
632
635
  .tgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:36px;margin-top:6px}
633
636
  .tgrid .wrw:nth-child(2){border-top:0}
@@ -143,11 +143,11 @@ function cardHtml(r) {
143
143
  return `${head}${d.nodef ? `<p class="nodef">${esc(d.nodef)}</p>` : ''}${d.action ? `<div class="cact"><button class="cta" disabled title="${esc(d.hold || 'Nothing here can be recorded.')}">${CHECK}${esc(d.action)}</button></div>${d.hold ? holdNote(d.hold) : ''}` : ''}</div>`;
144
144
  }
145
145
  function paneHtml(r) {
146
- // the dialog heading above already names the row and what it is about, so the pane starts with the record itself, as a grid (no repeated title or intro)
146
+ // as the mockup draws it: the record's path, its heading and one lead line, then its grid or sections
147
147
  const p = r.dialog.pane, sel = SEL[r.key] || r.dialog.sel, o = (r.dialog.opts || []).find((x) => x.k === sel);
148
- let h = `<p class="dpath">${esc(p.file || '')}</p>`;
148
+ let h = `<p class="dpath">${esc(p.file || '')}</p>${p.h ? H1(p.h) : ''}${p.intro ? P1(p.intro) : ''}`;
149
149
  if (p.list) h = `<p class="dpath">planning/runs/evals.jsonl</p><ol class="stp">${r.dialog.items.map((x, k) => `<li><i>${k + 1}</i><span><b>${esc(x.t)}</b><small>${esc(x.m + ' · ' + x.s)}${x.lead ? '. ' + esc(x.lead) : ''}</small></span></li>`).join('')}</ol>`;
150
- else if (p.optsDraft) h += H2('Evidence') + kv(p.evidence) + H2('Decision') + P1(o ? o.t + '. ' + o.draft : 'Choose an option to draft the entry.') + `<p class="xn">A draft. Nothing is written to the journal until you press Record.</p>`;
150
+ else if (p.optsDraft) h += H2('Evidence') + UL(p.evidence.filter((x) => x && x[1]).map(([k, v]) => k + ': ' + v)) + H2('Decision') + P1(o ? o.t + '. ' + o.draft : 'Choose an option to draft the entry.') + `<p class="xn">A draft. Nothing is written to the journal until you press Record.</p>`;
151
151
  else h += (p.rows && p.rows.length ? kv(p.rows) : '') + (p.paras && p.paras.length ? (p.parasTitle ? H2(p.parasTitle) : '') + p.paras.map(P1).join('') : '') + `<p class="xn">The record as it stands. Nothing is drafted here.</p>`;
152
152
  return `<article class="paper doc">${h}</article>`;
153
153
  }
@@ -27,7 +27,7 @@
27
27
  <div class="dtools"><button class="round dx2" id="dPane" aria-label="Hide the conversation" aria-pressed="true" title="Hide the conversation"><svg class="i" viewBox="0 0 24 24"><rect x="3" y="4" width="18" height="16" rx="3"/><path d="M9 4v16"/></svg></button><button class="round dx2" id="dExpand" aria-label="Full screen" aria-pressed="false" title="Full screen"><svg class="i" viewBox="0 0 24 24"><path id="dExpP" d="M14 4h6v6M10 20H4v-6M20 4l-7 7M4 20l7-7"/></svg></button><button class="round dx2" id="dClose" aria-label="Close"><svg class="i" viewBox="0 0 24 24"><path d="M6 6l12 12M18 6 6 18"/></svg></button></div></div>
28
28
  <div class="dtabs" id="dTabs"><div class="seg" role="group" aria-label="Sections"><i class="pill"></i><button data-t="out" aria-pressed="true">Detail</button><button data-t="chat" aria-pressed="false">Conversation</button></div></div>
29
29
  <div class="dgrid" id="dGrid" data-tab="out"><section class="pane p-work" id="dBody" aria-label="Conversation"></section>
30
- <section class="pane p-out" id="dOut" aria-label="Detail"><div class="otop"><span class="ol" id="oLab">Detail</span></div><div class="obody" id="oMain"></div></section></div>
30
+ <section class="pane p-out" id="dOut" aria-label="Detail"><div class="otop"><span class="ol" id="oLab">Detail</span></div><div class="obody" id="oMain"></div><div class="tabhint"><span>The action is on the Conversation tab.</span><button type="button" id="tabGo">Open it</button></div></section></div>
31
31
  </div>
32
32
  <div class="toast glass" id="toast" role="status"></div>
33
33
  <main class="stage" id="stage">
@@ -27,7 +27,7 @@
27
27
  <div class="dtools"><button class="round dx2" id="dPane" aria-label="Hide the conversation" aria-pressed="true" title="Hide the conversation"><svg class="i" viewBox="0 0 24 24"><rect x="3" y="4" width="18" height="16" rx="3"/><path d="M9 4v16"/></svg></button><button class="round dx2" id="dExpand" aria-label="Full screen" aria-pressed="false" title="Full screen"><svg class="i" viewBox="0 0 24 24"><path id="dExpP" d="M14 4h6v6M10 20H4v-6M20 4l-7 7M4 20l7-7"/></svg></button><button class="round dx2" id="dClose" aria-label="Close"><svg class="i" viewBox="0 0 24 24"><path d="M6 6l12 12M18 6 6 18"/></svg></button></div></div>
28
28
  <div class="dtabs" id="dTabs"><div class="seg" role="group" aria-label="Sections"><i class="pill"></i><button data-t="out" aria-pressed="true">Detail</button><button data-t="chat" aria-pressed="false">Conversation</button></div></div>
29
29
  <div class="dgrid" id="dGrid" data-tab="out"><section class="pane p-work" id="dBody" aria-label="Conversation"></section>
30
- <section class="pane p-out" id="dOut" aria-label="Detail"><div class="otop"><span class="ol" id="oLab">Detail</span></div><div class="obody" id="oMain"></div></section></div>
30
+ <section class="pane p-out" id="dOut" aria-label="Detail"><div class="otop"><span class="ol" id="oLab">Detail</span></div><div class="obody" id="oMain"></div><div class="tabhint"><span>The action is on the Conversation tab.</span><button type="button" id="tabGo">Open it</button></div></section></div>
31
31
  </div>
32
32
  <div class="toast glass" id="toast" role="status"></div>
33
33
  <main class="stage" id="stage">
@@ -28,7 +28,7 @@
28
28
  <div class="dtools"><button class="round dx2" id="dPane" aria-label="Hide the conversation" aria-pressed="true" title="Hide the conversation"><svg class="i" viewBox="0 0 24 24"><rect x="3" y="4" width="18" height="16" rx="3"/><path d="M9 4v16"/></svg></button><button class="round dx2" id="dExpand" aria-label="Full screen" aria-pressed="false" title="Full screen"><svg class="i" viewBox="0 0 24 24"><path id="dExpP" d="M14 4h6v6M10 20H4v-6M20 4l-7 7M4 20l7-7"/></svg></button><button class="round dx2" id="dClose" aria-label="Close"><svg class="i" viewBox="0 0 24 24"><path d="M6 6l12 12M18 6 6 18"/></svg></button></div></div>
29
29
  <div class="dtabs" id="dTabs"><div class="seg" role="group" aria-label="Sections"><i class="pill"></i><button data-t="out" aria-pressed="true">Detail</button><button data-t="chat" aria-pressed="false">Conversation</button></div></div>
30
30
  <div class="dgrid" id="dGrid" data-tab="out"><section class="pane p-work" id="dBody" aria-label="Conversation"></section>
31
- <section class="pane p-out" id="dOut" aria-label="Detail"><div class="otop"><span class="ol" id="oLab">Detail</span></div><div class="obody" id="oMain"></div></section></div>
31
+ <section class="pane p-out" id="dOut" aria-label="Detail"><div class="otop"><span class="ol" id="oLab">Detail</span></div><div class="obody" id="oMain"></div><div class="tabhint"><span>The action is on the Conversation tab.</span><button type="button" id="tabGo">Open it</button></div></section></div>
32
32
  </div>
33
33
  <div class="toast glass" id="toast" role="status"></div>
34
34
  <main class="stage" id="stage">
@@ -27,7 +27,7 @@
27
27
  <div class="dtools"><button class="round dx2" id="dPane" aria-label="Hide the conversation" aria-pressed="true" title="Hide the conversation"><svg class="i" viewBox="0 0 24 24"><rect x="3" y="4" width="18" height="16" rx="3"/><path d="M9 4v16"/></svg></button><button class="round dx2" id="dExpand" aria-label="Full screen" aria-pressed="false" title="Full screen"><svg class="i" viewBox="0 0 24 24"><path id="dExpP" d="M14 4h6v6M10 20H4v-6M20 4l-7 7M4 20l7-7"/></svg></button><button class="round dx2" id="dClose" aria-label="Close"><svg class="i" viewBox="0 0 24 24"><path d="M6 6l12 12M18 6 6 18"/></svg></button></div></div>
28
28
  <div class="dtabs" id="dTabs"><div class="seg" role="group" aria-label="Sections"><i class="pill"></i><button data-t="out" aria-pressed="true">Detail</button><button data-t="chat" aria-pressed="false">Conversation</button></div></div>
29
29
  <div class="dgrid" id="dGrid" data-tab="out"><section class="pane p-work" id="dBody" aria-label="Conversation"></section>
30
- <section class="pane p-out" id="dOut" aria-label="Detail"><div class="otop"><span class="ol" id="oLab">Detail</span></div><div class="obody" id="oMain"></div></section></div>
30
+ <section class="pane p-out" id="dOut" aria-label="Detail"><div class="otop"><span class="ol" id="oLab">Detail</span></div><div class="obody" id="oMain"></div><div class="tabhint"><span>The action is on the Conversation tab.</span><button type="button" id="tabGo">Open it</button></div></section></div>
31
31
  </div>
32
32
  <div class="toast glass" id="toast" role="status"></div>
33
33
  <main class="stage" id="stage">
@@ -37,7 +37,7 @@
37
37
  <div class="dtools"><button class="round dx2" id="dPane" aria-label="Hide the conversation" aria-pressed="true" title="Hide the conversation"><svg class="i" viewBox="0 0 24 24"><rect x="3" y="4" width="18" height="16" rx="3"/><path d="M9 4v16"/></svg></button><button class="round dx2" id="dExpand" aria-label="Full screen" aria-pressed="false" title="Full screen"><svg class="i" viewBox="0 0 24 24"><path id="dExpP" d="M14 4h6v6M10 20H4v-6M20 4l-7 7M4 20l7-7"/></svg></button><button class="round dx2" id="dClose" aria-label="Close"><svg class="i" viewBox="0 0 24 24"><path d="M6 6l12 12M18 6 6 18"/></svg></button></div></div>
38
38
  <div class="dtabs" id="dTabs"><div class="seg" role="group" aria-label="Sections"><i class="pill"></i><button data-t="out" aria-pressed="true">Detail</button><button data-t="chat" aria-pressed="false">Conversation</button></div></div>
39
39
  <div class="dgrid" id="dGrid" data-tab="out"><section class="pane p-work" id="dBody" aria-label="Conversation"></section>
40
- <section class="pane p-out" id="dOut" aria-label="Detail"><div class="otop"><span class="ol" id="oLab">Detail</span></div><div class="obody" id="oMain"></div></section></div>
40
+ <section class="pane p-out" id="dOut" aria-label="Detail"><div class="otop"><span class="ol" id="oLab">Detail</span></div><div class="obody" id="oMain"></div><div class="tabhint"><span>The action is on the Conversation tab.</span><button type="button" id="tabGo">Open it</button></div></section></div>
41
41
  </div>
42
42
  <div class="toast glass" id="toast" role="status"></div>
43
43
  <main class="stage" id="stage">