create-pmos 0.332.0 → 0.334.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 +106 -50
- package/payload/KIT-VERSION +1 -1
- package/payload/planning/evals/eval-calibration.md +1 -1
- package/payload/planning/okrs/health-budgets.md +1 -1
- package/payload/state/discoveries.md +1 -1
- package/workspace/briefing-premium-test.js +12 -0
- package/workspace/changelog.json +250 -111
- package/workspace/guide/briefing-premium.md +6 -4
- package/workspace/lib/kit-update.js +4 -3
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/premium-menu-rows-test.js +106 -0
- package/workspace/premium-vw-rec-test.js +11 -6
- package/workspace/public/pm/listen-sheet.js +3 -3
- package/workspace/public/pm/premium-brief.js +17 -5
- package/workspace/public/pm/premium-shell.js +3 -1
- package/workspace/public/pm/premium-vw-rec.css +3 -0
- package/workspace/public/pm/premium-vw-rec.js +17 -5
- package/workspace/public/pm/premium.css +19 -1
- package/workspace/public/pm/premium.js +14 -5
- package/workspace/test-lists/premium-menu-rows.json +9 -0
|
@@ -20,8 +20,9 @@ Every premium page has the same top bar. On the left is where you are, then a ro
|
|
|
20
20
|
- **The bell** counts the same things the Briefing lists under what you need to do, and a press opens the Briefing.
|
|
21
21
|
- **The ⋯ menu** holds **Search** (Ctrl K), **Agent sessions** with a count, **Console**, **Theme** (Light, Dark or Auto) and **Settings**. On the Board it also holds **Open initiatives** as Page or Popup. An orange dot on ⋯ means a newer PMOS is ready, and **Settings** then shows the version.
|
|
22
22
|
- **On a phone** the bar is one row: the page name, Chat, the bell and ⋯. Sources moves into the ⋯ menu.
|
|
23
|
+
- **Menus.** An option that is too long for one line wraps onto the next line, and its row grows to hold it.
|
|
23
24
|
|
|
24
|
-
**Search** (Ctrl K, or `/`) opens the search over places, initiatives, documents and your running sessions; Enter opens the result. Search and the bell only read; neither changes a record. **Console** opens the console at `/console.html`, for the places premium does not have yet. In the console, the More menu has **Open premium**, which opens this page. **Settings** opens one dialog. **Updates** comes first: the PMOS version you have, the newest published version, **Check now** and, when a newer one is ready, **Update**. Update does what the console's Settings › Updates does: it updates the kit in each workspace that is behind, then PMOS itself, which stops for about a minute and reloads the page. PMOS that runs from a checkout says to use `git pull` instead. Each workspace is a row with its kit version. PMOS checks once a day while a page is open (the console's **Check for updates** setting turns this off). **What's new** lists each published kit, newest first and grouped by day: its version, when it published, and one
|
|
25
|
+
**Search** (Ctrl K, or `/`) opens the search over places, initiatives, documents and your running sessions; Enter opens the result. Search and the bell only read; neither changes a record. **Console** opens the console at `/console.html`, for the places premium does not have yet. In the console, the More menu has **Open premium**, which opens this page. **Settings** opens one dialog. **Updates** comes first: the PMOS version you have, the newest published version, **Check now** and, when a newer one is ready, **Update**. Update does what the console's Settings › Updates does: it updates the kit in each workspace that is behind, then PMOS itself, which stops for about a minute and reloads the page. PMOS that runs from a checkout says to use `git pull` instead. Each workspace is a row with its kit version. PMOS checks once a day while a page is open (the console's **Check for updates** setting turns this off). **What's new** lists each published kit, newest first and grouped by day: its version, when it published, and one entry per pull request it carries: the pull request's title in bold, with its number, and under it the first sentence of its "After:" paragraph. Both are copied from the pull request when the kit is published; a parenthesis that holds code or a decision number is left out, and a pull request with no "After:" paragraph shows its title only. Kits newer than yours are tinted, and yours is marked. Five show per day; **Show more** opens the rest. Then come two choices. **Workspaces** lists the repositories PMOS works in, with Add (a folder path) and Remove; Remove forgets the address and never deletes the folder, and a refusal shows the server's reason. **Connectors** has an On/Off switch for each source the Briefing reads. Each press saves that one record. Every other setting runs on a default and stays in the console; the dialog links to it. Remove needs the page's launch nonce, so an agent session cannot call it.
|
|
25
26
|
|
|
26
27
|
**Sources** is a dialog that lists each tracked source (Repository, Initiatives, Calendar, Jira status, My work and Tracker items) with its own state and the time it was last read. Each source except the repository has **Refresh**, and **Refresh all** reads them all again. Slack and email are read as part of My work, so they have no row of their own. A source PMOS does not track has no row: the dialog shows only what PMOS can say it read.
|
|
27
28
|
|
|
@@ -61,7 +62,8 @@ The list also shows what the Initiative Driver is waiting on you for, the same t
|
|
|
61
62
|
- **Order.** A product whose agent is stopped on you comes after the repository rows and before mail, Jira and Confluence. Open drafts come after those, the oldest first. The list shows seven rows; the rest are counted under "more".
|
|
62
63
|
- **The hero** says how many agent drafts wait on you, counting every one, shown or not. The dock counts them too.
|
|
63
64
|
- **The dialog** shows only what the Driver's row holds: the cause, the draft count, the age, and the confidence, recommendation, reversibility and effort the agent stated when it filed. A fact nobody stated is left out. **Review the drafts** opens Around you's Agent proposals, where Keep, Send back and Drop are.
|
|
64
|
-
- **
|
|
65
|
+
- **Pressing a row** opens Around you's Agent proposals on the Briefing, with only that initiative's or Work item's drafts. **Show all proposals** lists every one. A row never opens the console.
|
|
66
|
+
- **Core-document drafts** open the initiative page or the Board page that holds the documents. Portfolio documents still open the console, because no premium page holds them yet.
|
|
65
67
|
|
|
66
68
|
## How long it takes to load
|
|
67
69
|
|
|
@@ -127,7 +129,7 @@ When the meeting is not linked, the dialog has a **Link it** press. You choose t
|
|
|
127
129
|
|
|
128
130
|
In **Notes**, each next step has **Make task** when the note is linked to an initiative. It adds the step to the first stage of that initiative's breakdown, with its owner and due day when the step names them, and the status says where it went. **Undo** withdraws the task. A note with no initiative explains that it must be linked first, and writes nothing. Both writes need the page's launch nonce, so an agent session is refused. A refused write shows its reason and changes nothing on screen.
|
|
129
131
|
|
|
130
|
-
**Record.** A meeting of today that ended less than 10 minutes ago, or has not started, has a **Record** press in the dialog. Before the first press, the dialog says "Tell everyone first" and what the press does: it makes the meeting's note, or uses the one it has, and starts to listen to your microphone and the sound of the meeting. The audio and the notes stay on this machine. The console's own sheet asks where the meeting's sound comes from. While it records, the dialog shows the clock, **Pause** and **Stop**. A paused meeting stays open for one hour and has **Resume**. **Stop** asks first, because a stopped meeting cannot be resumed, and offers **Pause instead**. A refusal shows the reason and changes nothing. What the dialog shows comes from the recorder and from the notes the server holds, not from the last press. Only one meeting records at a time. A row in Today or in the week shows **Recording** or **Paused** when its note is in that state.
|
|
132
|
+
**Record.** A meeting of today that ended less than 10 minutes ago, or has not started, has a **Record** press in the dialog. Before the first press, the dialog says "Tell everyone first" and what the press does: it makes the meeting's note, or uses the one it has, and starts to listen to your microphone and the sound of the meeting. The audio and the notes stay on this machine. The console's own sheet asks where the meeting's sound comes from. It looks as it does in the console, in the premium colours. While it records, the dialog shows the clock, **Pause** and **Stop**. A paused meeting stays open for one hour and has **Resume**. **Stop** asks first, because a stopped meeting cannot be resumed, and offers **Pause instead**. A refusal shows the reason and changes nothing. What the dialog shows comes from the recorder and from the notes the server holds, not from the last press. Only one meeting records at a time. A row in Today or in the week shows **Recording** or **Paused** when its note is in that state.
|
|
131
133
|
|
|
132
134
|
**The Record control.** The Briefing's top bar has **Record**. A press starts an untitled note at once and listens to your microphone and the sound of the meeting. The arrow next to it lists today's meetings that have not ended more than 10 minutes ago, each with its time and **Now**, **Recording** or **Paused**, and **New note**. The first start on the page asks "Tell everyone first". The control hides while a note records, because only one note records at a time. The other premium pages have no Record control, because only the Briefing can hold the microphone.
|
|
133
135
|
|
|
@@ -357,7 +359,7 @@ A calendar meeting's panel follows the mockup's Design review panel: the title w
|
|
|
357
359
|
The panel is laid out like the console's note sheet. Under the head, a line shows the time, then what the meeting is about with **Change** (the link choice). When the meeting is part of a series, the series line names it with "N of M" and has a press for the meeting before and the one after. Each opens that meeting's notes as a tab in the viewer, and the tab pages through the series. **Not part of this series** takes the note out of the series, and **Put it back** returns it. A switch then shows one part at a time:
|
|
358
360
|
|
|
359
361
|
- **Before**: first the meeting prep the console's Calendar card shows: In short, What matters today (To settle in planning for a planning meeting), Since the last one with its decisions and the steps From last time, To be ready, and the meeting's links. When the note already carries in the meeting before, Since the last one is left to it. The prep is read once when the detail opens; that read is not a Focus read, and Focus still reads nothing until you open it. Then the open steps carried in from the meeting before, the agenda with each item marked when the transcript heard it, what the meeting is for, what to have ready, what to read first and the people. Prepared for you, Material, Previous meetings and Topics follow.
|
|
360
|
-
- **During**: the transcript the note holds, with times.
|
|
362
|
+
- **During**: the transcript the note holds, with times. On the Briefing, while the note records or is paused there, During is the live capture instead, the same as the **Live notes** tab: Recording or Paused, **Highlight**, **Pause** or **Resume**, **Stop**, **Private**, **Your notes**, the highlights and the live transcript.
|
|
361
363
|
- **After**: **Since the last one** (each step from the meeting before as Done, Raised again or Not mentioned, and the new steps), the replay, the summary, a table of decisions with their why, a table of next steps with owner, due and **Make task**, the open questions, the screenshots of the shared screen and the transcript, folded.
|
|
362
364
|
|
|
363
365
|
The switch opens on During while the note records, on After once there are notes, and on Before otherwise. A part with no record behind it says so. A private note shows none of its notes.
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* status({ root, appVersion, appDir }) → { app: { version, fromCheckout }, kit, changes } local only, no network
|
|
6
6
|
* source(env) → { kind:'npm' } | { kind:'local', path } | { kind:'local', path, error }
|
|
7
7
|
* latest({ exec, source }) → Promise<{ ok, version, changes } | { ok:false, error }> npm view create-pmos version pmosChanges
|
|
8
|
-
* readChanges(appDir) → [{ v, at, prs: [{ n, s }] }] the installed app's changelog.json, newest first
|
|
8
|
+
* readChanges(appDir) → [{ v, at, prs: [{ n, t?, s }] }] the installed app's changelog.json, newest first
|
|
9
9
|
* readLastCheck(stateDir) · writeLastCheck(stateDir, { latest, changes }) the last check's answer, kept in the state folder
|
|
10
10
|
* compare(st, latestVersion) → { appBehind, kitBehind }
|
|
11
11
|
* updateKit(root, { version, exec }) → Promise<{ ok, output, kit } | { ok:false, error, output }>
|
|
@@ -122,11 +122,12 @@ const npxArgs = (src, version, rest) => (src && src.kind === 'local'
|
|
|
122
122
|
? ['-y', `--package=${src.path}`, '--', PKG_NAME, ...rest]
|
|
123
123
|
: ['-y', `${PKG_NAME}@${version}`, ...rest]);
|
|
124
124
|
|
|
125
|
-
/** One changelog entry as the page may show it, or null: a version, a time, and PRs with a number
|
|
125
|
+
/** One changelog entry as the page may show it, or null: a version, a time, and PRs with a number, a summary and, from
|
|
126
|
+
* kit-changelog format 2, a title. */
|
|
126
127
|
function cleanEntry(e) {
|
|
127
128
|
if (!e || !validVersion(e.v)) return null;
|
|
128
129
|
const prs = (Array.isArray(e.prs) ? e.prs : []).filter((p) => p && typeof p.s === 'string' && p.s.trim())
|
|
129
|
-
.map((p) => ({ n: Number.isInteger(p.n) ? p.n : null, s: p.s.trim().slice(0, 400) }));
|
|
130
|
+
.map((p) => ({ n: Number.isInteger(p.n) ? p.n : null, ...(typeof p.t === 'string' && p.t.trim() ? { t: p.t.trim().slice(0, 200) } : {}), s: p.s.trim().slice(0, 400) }));
|
|
130
131
|
return { v: e.v, at: typeof e.at === 'string' && !Number.isNaN(Date.parse(e.at)) ? e.at : null, prs };
|
|
131
132
|
}
|
|
132
133
|
const cleanList = (list) => (Array.isArray(list) ? list.map(cleanEntry).filter(Boolean) : []);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmos-workspace",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.334.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pmos-workspace",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.334.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@xterm/addon-fit": "^0.11.0",
|
package/workspace/package.json
CHANGED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
/* premium-menu-rows-test.js — a premium menu row grows with its text (bug report 2026-10-20: the initiative switcher and the
|
|
4
|
+
* row's More menu drew a wrapped title over the next row, and the title and description of an action collided).
|
|
5
|
+
* The cause was a fixed row height (height:38px / 42px / 44px) on the menu buttons: a label that wraps to a second line ran
|
|
6
|
+
* out of its row. Every premium menu class is drawn here with long labels, on the real stylesheets, at 390 and 1280 in light
|
|
7
|
+
* and dark. No server: the page is built in the browser and the stylesheets and fonts are served from public/ by a route.
|
|
8
|
+
* R1 each row holds all of its text · R2 no row overlaps the next · R3 a one-line row keeps its old height (no visual drift)
|
|
9
|
+
* The same report named two more: C1 a console sheet on a premium page (the Listen sheet) has the console's colour tokens and plain
|
|
10
|
+
* body text, and H1 a recording highlight keeps its tag ("decision") on one line. */
|
|
11
|
+
const fs = require('fs');
|
|
12
|
+
const path = require('path');
|
|
13
|
+
const { findBrowser } = require('./lib/find-browser');
|
|
14
|
+
const results = [];
|
|
15
|
+
const ok = (name, cond, extra = '') => { results.push({ name, cond: !!cond }); console.log(`${cond ? '✓' : '✗'} ${name}${!cond && extra !== '' ? ' — ' + String(extra).slice(0, 600) : ''}`); };
|
|
16
|
+
const PUB = path.join(__dirname, 'public');
|
|
17
|
+
const ORIGIN = 'http://pmos-menus.test';
|
|
18
|
+
const TYPES = { '.css': 'text/css', '.woff2': 'font/woff2', '.html': 'text/html', '.svg': 'image/svg+xml' };
|
|
19
|
+
const SHEETS = ['pm/premium.css', 'pm/premium-insights.css', 'pm/premium-vw-doc.css', 'pm/premium-vw-rec.css'];
|
|
20
|
+
|
|
21
|
+
const LONG = ['Migration off Okta (tender, award, migration), incl. the Okta CIS renewal runway', 'Inline login for eShop onsite checkout',
|
|
22
|
+
'MAGW migration to auth-service (Java to Go) — Phase 1 and Phase 2', 'Email OTP'];
|
|
23
|
+
const ACTS = [['Put on hold', 'Pause it; keeps its stage and work'], ['Cancel', 'Stop it for good, with a reason'], ['Archive', 'Out of every list; restore any time']];
|
|
24
|
+
const btns = (L) => L.map((t) => `<button type="button" role="menuitem">${t}</button>`).join('');
|
|
25
|
+
/* each menu as its page draws it (premium-shell.js, premium-acts.js, premium-doc-sheet.js, premium-report-read.js, premium.html,
|
|
26
|
+
* premium-insights.html, premium-vw-doc.js, premium-vw-rec.js) */
|
|
27
|
+
const MENUS = {
|
|
28
|
+
'crumb switcher (.crmenu)': `<nav class="crumb" style="position:relative;width:120px"><div class="crmenu" role="menu">${btns(LONG)}</div></nav>`,
|
|
29
|
+
'header More (.crmenu.tbmenu)': `<div style="position:relative;width:120px"><div class="crmenu tbmenu" role="menu" style="left:0;right:auto">${btns(LONG)}</div></div>`,
|
|
30
|
+
'product picker (.crmenu.pkmenu)': `<span class="pkw" style="position:relative;display:block;width:120px"><div class="crmenu pkmenu" role="menu" style="left:0;right:auto">${LONG.map((t) => `<button type="button" role="menuitemcheckbox" aria-checked="false"><span class="bx"></span>${t}</button>`).join('')}</div></span>`,
|
|
31
|
+
'row More (.dsmn.bam2)': `<div style="position:relative;width:120px"><div class="dsmn bam2" role="menu" style="left:0;right:auto">${ACTS.map(([l, s]) => `<button type="button" role="menuitem"><span><b>${l}</b><small>${s}</small></span></button>`).join('')}</div></div>`,
|
|
32
|
+
'document menu (.dsmn)': `<div class="dsvw" style="width:120px"><div class="dsmn" role="menu">${btns(LONG)}</div></div>`,
|
|
33
|
+
'report menu (.dsmn.rpm)': `<div class="dsvw" style="width:120px"><div class="dsmn rpm" role="menu">${LONG.map((t) => `<button type="button" role="menuitem"><span>${t}<small>${t}</small></span></button>`).join('')}</div></div>`,
|
|
34
|
+
'insights list (.lmenu)': `<div style="position:relative;width:120px"><div class="lmenu" role="menu">${btns(LONG)}</div></div>`,
|
|
35
|
+
'viewer popover (.vwpop)': `<div style="position:relative;width:120px"><div class="vwpop" role="menu" style="max-height:none">${LONG.map((t) => `<button type="button" role="menuitem"><span class="ki">D</span><span>${t}</span><kbd>⏎</kbd></button>`).join('')}</div></div>`,
|
|
36
|
+
'record menu (.recm)': `<div style="position:relative;width:120px"><div class="recm" role="menu" style="left:0;right:auto">${LONG.map((t) => `<button type="button" role="menuitem"><b>${t}</b><small>10:30</small></button>`).join('')}</div></div>`,
|
|
37
|
+
};
|
|
38
|
+
/* the one-line row height each menu had before the fix; a short label must still draw at it */
|
|
39
|
+
const ONE = { '.crmenu': 42, '.crmenu.tbmenu': 44, '.dsmn': 44 };
|
|
40
|
+
|
|
41
|
+
(async () => {
|
|
42
|
+
const exe = findBrowser();
|
|
43
|
+
if (!exe) { console.log('✗ no Chrome/Chromium on this machine — the suite cannot run'); process.exit(1); }
|
|
44
|
+
const { chromium } = require('playwright-core');
|
|
45
|
+
const browser = await chromium.launch({ executablePath: exe });
|
|
46
|
+
const page0 = (menu, theme, extra = []) => `<!doctype html><html data-theme="${theme}"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">${[...SHEETS, ...extra].map((s) => `<link rel="stylesheet" href="/${s}">`).join('')}</head><body><main style="padding:16px;min-height:1400px">${menu}</main></body></html>`;
|
|
47
|
+
try {
|
|
48
|
+
for (const [w, h] of [[390, 844], [1280, 900]]) for (const theme of ['light', 'dark']) {
|
|
49
|
+
const ctx = await browser.newContext({ viewport: { width: w, height: h } });
|
|
50
|
+
await ctx.route(ORIGIN + '/**', (r) => {
|
|
51
|
+
const u = new URL(r.request().url()), f = path.join(PUB, decodeURIComponent(u.pathname));
|
|
52
|
+
if (u.pathname === '/menu.html') return r.fulfill({ status: 200, contentType: 'text/html', body: ctx._html });
|
|
53
|
+
if (!f.startsWith(PUB) || !fs.existsSync(f)) return r.fulfill({ status: 404, body: '' });
|
|
54
|
+
return r.fulfill({ status: 200, contentType: TYPES[path.extname(f)] || 'application/octet-stream', body: fs.readFileSync(f) });
|
|
55
|
+
});
|
|
56
|
+
const page = await ctx.newPage();
|
|
57
|
+
for (const [name, html] of Object.entries(MENUS)) {
|
|
58
|
+
ctx._html = page0(html, theme);
|
|
59
|
+
await page.goto(ORIGIN + '/menu.html');
|
|
60
|
+
await page.evaluate(() => document.fonts.ready);
|
|
61
|
+
const m = await page.evaluate(() => {
|
|
62
|
+
const menu = document.querySelector('[role="menu"]'), rows = [...menu.children].filter((e) => /^(BUTTON|A)$/.test(e.tagName));
|
|
63
|
+
const out = rows.map((b) => {
|
|
64
|
+
const r = b.getBoundingClientRect();
|
|
65
|
+
// every text line inside the row: a range over the row's text gives the line boxes
|
|
66
|
+
const rg = document.createRange(); rg.selectNodeContents(b);
|
|
67
|
+
const lines = [...rg.getClientRects()].filter((x) => x.height > 0);
|
|
68
|
+
const lo = Math.min(...lines.map((x) => x.top)), hi = Math.max(...lines.map((x) => x.bottom));
|
|
69
|
+
return { top: r.top, bottom: r.bottom, h: r.height, lo, hi, n: new Set(lines.map((x) => Math.round(x.top))).size };
|
|
70
|
+
});
|
|
71
|
+
return { rows: out, cls: '.' + menu.className.trim().split(/\s+/).join('.') };
|
|
72
|
+
});
|
|
73
|
+
const tag = `${name} at ${w} ${theme}`;
|
|
74
|
+
const spill = m.rows.filter((r) => r.lo < r.top - 0.5 || r.hi > r.bottom + 0.5);
|
|
75
|
+
ok(`R1 ${tag}: each row holds all of its text`, m.rows.length && !spill.length, JSON.stringify(spill));
|
|
76
|
+
const over = m.rows.slice(1).filter((r, i) => r.top < m.rows[i].bottom - 0.5);
|
|
77
|
+
ok(`R2 ${tag}: no row overlaps the next`, !over.length, JSON.stringify(over));
|
|
78
|
+
}
|
|
79
|
+
// R3: one short label keeps the row height the menu had before
|
|
80
|
+
for (const [cls, px] of Object.entries(ONE)) {
|
|
81
|
+
const k = cls.slice(1).split('.').join(' ');
|
|
82
|
+
ctx._html = page0(`<div class="dsvw" style="position:relative;width:120px"><div class="${k}" role="menu" style="left:0;right:auto"><button type="button" role="menuitem">Short</button></div></div>`, theme);
|
|
83
|
+
await page.goto(ORIGIN + '/menu.html');
|
|
84
|
+
await page.evaluate(() => document.fonts.ready);
|
|
85
|
+
const hh = await page.evaluate(() => document.querySelector('[role="menuitem"]').getBoundingClientRect().height);
|
|
86
|
+
ok(`R3 ${cls} at ${w} ${theme}: a one-line row is still ${px}px tall`, Math.abs(hh - px) < 0.6, hh);
|
|
87
|
+
}
|
|
88
|
+
// C1: a console sheet (c3-sheet.js draws div.c3.c3e.c3pop > .sheet > .sb > .brief.sbb) reads the console tokens and plain text
|
|
89
|
+
ctx._html = page0('<div class="c3 c3e c3pop"><div class="sheet bs"><div class="sb"><div class="brief sbb"><p class="lsn-help">Pick the meeting window.</p><span class="tag">only this window</span></div></div></div></div>', theme, ['pm/console3.css']);
|
|
90
|
+
await page.goto(ORIGIN + '/menu.html');
|
|
91
|
+
const c1 = await page.evaluate(() => { const t = getComputedStyle(document.querySelector('.tag')), p = getComputedStyle(document.querySelector('.lsn-help')), c = getComputedStyle(document.querySelector('.c3'));
|
|
92
|
+
return { tag: t.backgroundColor, fs: p.fontSize, muted: c.getPropertyValue('--muted').trim(), fg: c.getPropertyValue('--foreground').trim() }; });
|
|
93
|
+
ok(`C1 a console sheet at ${w} ${theme}: its tokens are set, a tag has a fill and the body is 14px text`, c1.muted && c1.fg && !/rgba\(0, 0, 0, 0\)|transparent/.test(c1.tag) && c1.fs === '14px', JSON.stringify(c1));
|
|
94
|
+
// H1: a long highlight keeps its tag on one line
|
|
95
|
+
ctx._html = page0(`<section class="rvsec" style="overflow-wrap:anywhere;max-width:${Math.min(w - 32, 560)}px"><ul class="rvhl"><li><time>0:00</time><span>${LONG.join(' ').repeat(3)}</span><em>decision</em></li></ul></section>`, theme);
|
|
96
|
+
await page.goto(ORIGIN + '/menu.html');
|
|
97
|
+
await page.evaluate(() => document.fonts.ready);
|
|
98
|
+
const h1 = await page.evaluate(() => { const e = document.querySelector('.rvhl em'), rg = document.createRange(); rg.selectNodeContents(e); return new Set([...rg.getClientRects()].map((r) => Math.round(r.top))).size; });
|
|
99
|
+
ok(`H1 a long highlight at ${w} ${theme} keeps its tag on one line`, h1 === 1, h1 + ' lines');
|
|
100
|
+
await ctx.close();
|
|
101
|
+
}
|
|
102
|
+
} finally { await browser.close().catch(() => {}); }
|
|
103
|
+
const bad = results.filter((x) => !x.cond).length;
|
|
104
|
+
console.log(`\n${results.length - bad}/${results.length} premium-menu-rows assertions passed`);
|
|
105
|
+
process.exit(bad ? 1 : 0);
|
|
106
|
+
})().catch((e) => { console.error(e); process.exit(1); });
|
|
@@ -141,13 +141,18 @@ const RECORDER = () => {
|
|
|
141
141
|
const lv = await until(async () => { const t = await pane(p, 'rec:n1'); return /We plan eight people/.test(t) ? t : ''; });
|
|
142
142
|
ok('R3 the tab shows Recording with the clock, Highlight, Pause, Stop, Focus and Private', /Recording/.test(lv) && /1:0\d/.test(lv) && /Highlight/.test(lv) && /Pause/.test(lv) && /Stop/.test(lv) && /Focus/.test(lv) && /Private/.test(lv), lv.slice(0, 300));
|
|
143
143
|
ok('R3 the transcript names who spoke, and the highlight comes from the note', /You/.test(lv) && /Dara/.test(lv) && /Plan with eight people/.test(lv));
|
|
144
|
-
await p.fill('#dOut [data-rv-mine]', 'Ask Sam about the meter'); await p.click('#dOut .rvt');
|
|
144
|
+
await p.fill('#dOut .obody.vw[data-vw="rec:n1"] [data-rv-mine]', 'Ask Sam about the meter'); await p.click('#dOut .rvt');
|
|
145
145
|
ok('R3 your notes are saved through POST /api/notes/save when you leave the box', await until(() => A.savePosts.length === 1) && A.savePosts[0].id === 'n1' && A.savePosts[0].body === 'Ask Sam about the meter', JSON.stringify(A.savePosts));
|
|
146
|
-
await p.click('#dOut [data-rv="private"]');
|
|
146
|
+
await p.click('#dOut .obody.vw:not([hidden]) [data-rv="private"]');
|
|
147
147
|
ok('R3 Private asks first, saying what it deletes, and sends nothing yet', await until(() => p.evaluate(() => /deleted now/.test((document.querySelector('#dOut .vcf') || {}).textContent || ''))) && A.privPosts.length === 0);
|
|
148
148
|
await p.click('#dOut .vcf [data-a="0"]');
|
|
149
149
|
ok('R3 Cancel keeps the note as it was', await until(() => p.evaluate(() => !document.querySelector('#dOut .vcf'))) && A.privPosts.length === 0);
|
|
150
150
|
|
|
151
|
+
await p.evaluate(() => document.querySelector('#vTabs .vtab').click());
|
|
152
|
+
const dur = await until(() => p.evaluate(() => { const b = document.querySelector('#oMain .vm-body[data-part="during"]'); return b && !b.hidden && b.querySelector('[data-rv-stage] .rvh') ? b.textContent : ''; }));
|
|
153
|
+
ok('R3 the meeting detail opens on During, and During is the live capture: Recording, Highlight, Pause, Stop and your notes', /Recording/.test(dur) && /Highlight/.test(dur) && /Pause/.test(dur) && /Stop/.test(dur) && /Your notes/.test(dur) && await p.evaluate(() => !document.querySelector('#oMain .rvt')), dur.slice(0, 200));
|
|
154
|
+
ok('R3 the During stage and the Live notes tab each label their own notes box', await p.evaluate(() => { const ids = [...document.querySelectorAll('#dOut [data-rv-mine]')].map((t) => t.id); return ids.length === 2 && ids[0] !== ids[1] && ids.every((i) => !!document.querySelector(`label[for="${i}"]`)); }));
|
|
155
|
+
|
|
151
156
|
/* R2 the chip on the Briefing (the dialog sits over it, so it is closed first) */
|
|
152
157
|
await p.keyboard.press('Escape'); await until(() => p.evaluate(() => !document.querySelector('#dlg').classList.contains('on')));
|
|
153
158
|
const c1 = await until(async () => { const t = await chip(p); return t && /Recording Live review/.test(t) ? t : ''; });
|
|
@@ -167,14 +172,14 @@ const RECORDER = () => {
|
|
|
167
172
|
ok('R4 Focus stops reading while its tab is hidden', A.focusGets <= g1 + 1, String(A.focusGets - g1));
|
|
168
173
|
|
|
169
174
|
/* R3 Pause, Resume, Stop from the tab */
|
|
170
|
-
await p.click('#dOut [data-rv="pause"]');
|
|
175
|
+
await p.click('#dOut .obody.vw:not([hidden]) [data-rv="pause"]');
|
|
171
176
|
ok('R3 Pause pauses through the route and the tab says Paused with Resume', await until(() => A.pausePosts.length === 1) && await until(async () => /Paused/.test(await pane(p, 'rec:n1')) && /Resume/.test(await pane(p, 'rec:n1'))));
|
|
172
|
-
await p.click('#dOut [data-rv="resume"]');
|
|
177
|
+
await p.click('#dOut .obody.vw:not([hidden]) [data-rv="resume"]');
|
|
173
178
|
ok('R3 Resume listens again on the same note without asking twice', await until(() => A.recPosts.length === 2) && A.newPosts.length === 1);
|
|
174
179
|
await until(async () => /Recording/.test(await pane(p, 'rec:n1')));
|
|
175
|
-
await p.click('#dOut [data-rv="stop"]');
|
|
180
|
+
await p.click('#dOut .obody.vw:not([hidden]) [data-rv="stop"]');
|
|
176
181
|
ok('R3 Stop asks first and says a stopped meeting cannot be resumed', await until(async () => /cannot be resumed/.test(await pane(p, 'rec:n1'))) && A.stopPosts.length === 0);
|
|
177
|
-
await p.click('#dOut [data-rv="stopgo"]');
|
|
182
|
+
await p.click('#dOut .obody.vw:not([hidden]) [data-rv="stopgo"]');
|
|
178
183
|
ok('R3 Stop for good ends it through the route, and the Record control comes back', await until(() => A.stopPosts.length === 1) && await until(() => p.evaluate(() => !document.querySelector('#recCtl').hidden)));
|
|
179
184
|
ok('R5 no page error on the Briefing', A.errors.length === 0, A.errors.join(' | '));
|
|
180
185
|
await A.ctx.close();
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
import { el } from './dom.js';
|
|
13
13
|
import { button } from './primitives.js';
|
|
14
14
|
import { openSheet, closeSheet } from './c3-sheet.js';
|
|
15
|
-
import { icon, sect, pbtn, plural } from './c3-ini-ui.js';
|
|
15
|
+
import { icon, sect, pbtn, plural, ensureIniCss } from './c3-ini-ui.js';
|
|
16
16
|
import { APPS, planListen, rowsOf, recall, remember } from './listen-sources.js';
|
|
17
17
|
import { ensureListenCss } from './notes-shots.js';
|
|
18
18
|
|
|
@@ -27,7 +27,7 @@ function row(r, act) {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
export function askListen({ shots = true } = {}) {
|
|
30
|
-
ensureListenCss();
|
|
30
|
+
ensureListenCss(); ensureIniCss(); // its buttons and rows are the console's (components.css, c3-initiatives.css), which a premium page does not load on its own
|
|
31
31
|
return new Promise((resolve) => {
|
|
32
32
|
const c = recall(store());
|
|
33
33
|
if (!shots) c.shots = false;
|
|
@@ -74,7 +74,7 @@ export function askListen({ shots = true } = {}) {
|
|
|
74
74
|
|
|
75
75
|
/** The second share. The button makes the browser call itself, because that call needs a press of its own. */
|
|
76
76
|
export function askWindow(getStream) {
|
|
77
|
-
ensureListenCss();
|
|
77
|
+
ensureListenCss(); ensureIniCss(); // its buttons and rows are the console's (components.css, c3-initiatives.css), which a premium page does not load on its own
|
|
78
78
|
return new Promise((resolve) => {
|
|
79
79
|
let done = false;
|
|
80
80
|
const finish = (v) => { if (done) return; done = true; resolve(v); };
|
|
@@ -41,10 +41,17 @@ export function briefNeeds(b, page, agent) {
|
|
|
41
41
|
return { decisions, own, agentN: ordered.filter((x) => x.src === 'agent').length, ordered };
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
+
/** The driver target a drafts row is about, from its run id (lib/driver-needs.js: driver-needs:<drafts|blocked>:<kind>:<ws>:<id>). null when it does not parse. */
|
|
45
|
+
export function propTarget(r) {
|
|
46
|
+
const m = /:(?:drafts|blocked):(initiative|work):([^:]*):(.+)$/.exec(String((r && r.run_id) || ''));
|
|
47
|
+
if (m) return { kind: m[1], ws: m[2] || null, id: m[3] };
|
|
48
|
+
return r && r.initiative_id ? { kind: 'initiative', ws: r.ws || null, id: r.initiative_id } : null;
|
|
49
|
+
}
|
|
44
50
|
const lateWord = (d) => (d === 1 ? '1 day late' : d + ' days late');
|
|
45
51
|
const factText = (f) => (f && typeof f === 'object' ? f.text : f);
|
|
46
52
|
/** One row of "What you need to do" from one row of the console's Needs you. A row says only what the console row's own data says:
|
|
47
|
-
* no "If you skip" line (no record holds one). go: where a press goes, the item's own page; null opens the Briefing's dialog.
|
|
53
|
+
* no "If you skip" line (no record holds one). go: where a press goes, the item's own page; null opens the Briefing's dialog.
|
|
54
|
+
* prop: on a driver drafts row, the target whose proposals the Briefing's Agent proposals dialog shows. */
|
|
48
55
|
export function needsRowOf(x, ws) {
|
|
49
56
|
const r = x.raw, q = (k, v) => k + '=' + encodeURIComponent(v);
|
|
50
57
|
if (x.src === 'own') {
|
|
@@ -54,10 +61,15 @@ export function needsRowOf(x, ws) {
|
|
|
54
61
|
go: r.id ? '/premium-work.html?' + [q('item', r.id), ws ? q('ws', ws) : ''].filter(Boolean).join('&') : null };
|
|
55
62
|
}
|
|
56
63
|
if (x.src === 'agent') {
|
|
57
|
-
const blocked = r.kind === 'driver-blocked', ini = r.initiative_id || '';
|
|
58
|
-
|
|
59
|
-
prepared: blocked ? 'The agent will not go on until you decide.' :
|
|
60
|
-
|
|
64
|
+
const blocked = r.kind === 'driver-blocked', docs = r.kind === 'core-doc-drafts', ini = r.initiative_id || '';
|
|
65
|
+
const row = { key: 'agent:' + r.run_id, src: 'agent', title: r.question || '', subject: ['From the agent', blocked ? 'waiting on you' : 'drafts to review', ini].filter(Boolean).join(' · '),
|
|
66
|
+
prepared: blocked ? 'The agent will not go on until you decide.' : docs ? 'Review each draft, then issue it.' : 'Keep, send back or drop each draft.', go: null };
|
|
67
|
+
if (!docs) return { ...row, prop: propTarget(r) }; // the driver's drafts open the Briefing's own Agent proposals dialog, that target's only
|
|
68
|
+
const wsQ = r.ws || ws;
|
|
69
|
+
row.go = ini ? '/premium-initiative.html?' + [q('id', ini), wsQ ? q('ws', wsQ) : ''].filter(Boolean).join('&')
|
|
70
|
+
: r.board ? '/premium-board.html?' + [wsQ ? q('ws', wsQ) : '', q('board', r.board)].filter(Boolean).join('&')
|
|
71
|
+
: '/console.html'; // portfolio documents: no premium page holds them yet
|
|
72
|
+
return row;
|
|
61
73
|
}
|
|
62
74
|
const v = r.view || null;
|
|
63
75
|
const facts = v ? v.facts : (r.facts || []).map(factText).filter(Boolean);
|
|
@@ -569,7 +569,9 @@ function updWhatsNew(U) {
|
|
|
569
569
|
const open = U.open.has(g.k) || (i === 0 && !U.shut.has(g.k)), full = U.full.has(g.k);
|
|
570
570
|
const rows = open ? g.e.slice(0, full ? g.e.length : 5).map((e) => {
|
|
571
571
|
const newer = mine && cmpVer(e.v, mine) > 0, yours = mine && e.v === mine;
|
|
572
|
-
const lines = e.prs.length ? e.prs.map((p) =>
|
|
572
|
+
const lines = e.prs.length ? e.prs.map((p) => (p.t && p.t !== p.s
|
|
573
|
+
? `<p><b>${esc(p.t)}</b>${p.n ? ` <em>#${esc(p.n)}</em>` : ''}<span class="ks">${esc(p.s)}</span></p>`
|
|
574
|
+
: `<p>${esc(p.s)}${p.n ? ` <em>#${esc(p.n)}</em>` : ''}</p>`)).join('') : '<p class="note">No summary was recorded for this kit.</p>';
|
|
573
575
|
return `<li class="kver${newer ? ' new' : ''}"><span class="kv"><b>${esc(e.v)}</b>${yours ? '<i>yours</i>' : newer ? '<i class="nw">newer</i>' : ''}<em>${esc(updTime(e.at))}</em></span><div class="kp">${lines}</div></li>`;
|
|
574
576
|
}).join('') : '';
|
|
575
577
|
const more = open && !full && g.e.length > 5 ? `<button type="button" class="kmore" data-kfull="${esc(g.k)}">Show ${g.e.length - 5} more from ${esc(g.k.split(',')[0])}</button>` : '';
|
|
@@ -73,3 +73,6 @@
|
|
|
73
73
|
.fvst b{display:block;font-weight:600;font-size:var(--fs-2);overflow-wrap:anywhere}
|
|
74
74
|
.fvst small{font-size:var(--fs-1);color:var(--ink-3)}
|
|
75
75
|
@media (max-width:700px){.fvg{grid-template-columns:1fr}.recb span{display:none}}
|
|
76
|
+
/* a long highlight keeps its tag on one line (bug 2026-10-20: "decision" broke one letter per line) */
|
|
77
|
+
.rvhl li>span{flex:1 1 auto;min-width:0}
|
|
78
|
+
.rvhl em{flex:none;white-space:nowrap}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* /api/notes/private. The pure half (menuView, duringView, chipActs, focusPath) takes the routes' answers, so a test reads it without a DOM. */
|
|
10
10
|
import { vwOpen, vwStyle, vwConfirm, vwState } from './premium-viewer.js';
|
|
11
11
|
import { recordable, focusView, mmss, CONSENT_LINE, STOP_LINE, RECORD_LINE, FOCUS_LINE } from './premium-meeting.js';
|
|
12
|
+
import { setStage, duringHtml } from './premium-vw-meet.js';
|
|
12
13
|
|
|
13
14
|
const clip = (s, n) => { const t = String(s == null ? '' : s).replace(/\s+/g, ' ').trim(); return t.length > n ? t.slice(0, n - 1).trimEnd() + '…' : t; };
|
|
14
15
|
const esc = (s) => String(s == null ? '' : s).replace(/[&<>"]/g, (c) => ({ '&': '&', '<': '<', '>': '>', '"': '"' }[c]));
|
|
@@ -94,9 +95,11 @@ export async function openLive(id, d) {
|
|
|
94
95
|
return vwOpen({ id: 'rec:' + id, title: 'Live notes', icon: 'mic', render: (el) => renderDuring(el, id, d) });
|
|
95
96
|
}
|
|
96
97
|
|
|
97
|
-
|
|
98
|
-
|
|
98
|
+
let mineSeq = 0, DEPS = null; // DEPS: the Briefing's { openDlg, toast, pmGet, pmPost }, kept by mountRecord for the During stage
|
|
99
|
+
/** The During capture of one note: in the meeting sheet's During stage (stage: true, the sheet's head already names the note) and in the Live notes tab openLive opens. */
|
|
100
|
+
export function renderDuring(el, id, d, { stage = false } = {}) {
|
|
99
101
|
vwStyle('rec');
|
|
102
|
+
const mineId = 'rvMine' + (++mineSeq);
|
|
100
103
|
const ui = { v: null, ask: '', draft: null, saving: false };
|
|
101
104
|
let timer = null;
|
|
102
105
|
const read = async () => {
|
|
@@ -119,18 +122,18 @@ export function renderDuring(el, id, d) {
|
|
|
119
122
|
const ask = ui.ask === 'stop' ? `<div class="rvask" role="alert"><p><b>Stop “${esc(clip(v.title, 60))}” for good?</b> ${esc(STOP_LINE)}</p><div>${b('stopno', 'Cancel')}${v.mode === 'recording' ? b('pause', 'Pause instead') : ''}${b('stopgo', 'Stop for good', '', 'cta')}</div></div>` : '';
|
|
120
123
|
const opts = v.mode === 'ended' ? '' : `<div class="rvopts">${v.event ? b('fv', 'Focus', 'focus') : ''}<button type="button" class="rvb" data-rv="private" aria-pressed="${v.private}" title="${esc(PRIVATE_LINE)}">${ic('lock')}Private</button>${v.shots ? `<span class="note">${v.shots} screen ${v.shots === 1 ? 'shot' : 'shots'} kept</span>` : ''}</div>`;
|
|
121
124
|
const body = ui.draft == null ? v.body : ui.draft;
|
|
122
|
-
const mine = `<section class="rvsec"><label class="label" for="
|
|
125
|
+
const mine = `<section class="rvsec"><label class="label" for="${mineId}">Your notes</label><textarea id="${mineId}" class="rvta" rows="4" placeholder="Type a line. Each line keeps the time it was written." data-rv-mine>${esc(body)}</textarea><p class="note" data-rv-saved>${ui.saving ? 'Saving.' : 'Saved on this machine when you leave the box.'}</p></section>`;
|
|
123
126
|
const hls = v.highlights.length ? `<section class="rvsec"><span class="label">Highlights</span><ul class="rvhl">${v.highlights.map((h) => `<li><time>${esc(h.time)}</time><span>${esc(h.text)}</span>${h.cat ? `<em>${esc(h.cat)}</em>` : ''}</li>`).join('')}</ul></section>` : '';
|
|
124
127
|
const tr = v.private ? '<p class="note">This note is private, so it keeps no transcript.</p>' : v.lines.length ? `<div class="rvtr" data-rv-tr>${v.lines.map((l, i) => `<p${i === v.lines.length - 1 ? ' class="cur"' : ''}><time>${esc(l.time)}</time><b>${esc(l.who)}</b><span>${esc(l.text)}</span></p>`).join('')}</div>` : `<p class="note">${v.mode === 'recording' ? 'Nothing has been heard yet.' : 'The transcript starts when the note records.'}</p>`;
|
|
125
128
|
const keep = el.querySelector('[data-rv-mine]') === document.activeElement;
|
|
126
|
-
el.innerHTML = `<article class="paper doc rvw"
|
|
129
|
+
el.innerHTML = `<article class="paper doc rvw">${stage ? '' : `<h3 class="rvt">${esc(v.title)}</h3>`}${head}${ask}${opts}${mine}${hls}<section class="rvsec"><span class="label">${v.mode === 'recording' ? 'Live transcript' : 'Transcript'}</span>${tr}</section></article>`;
|
|
127
130
|
if (keep) { const t = el.querySelector('[data-rv-mine]'); t.focus(); t.setSelectionRange(t.value.length, t.value.length); }
|
|
128
131
|
const t = el.querySelector('[data-rv-tr]'); if (t) t.scrollTop = t.scrollHeight;
|
|
129
132
|
};
|
|
130
133
|
const loop = async () => {
|
|
131
134
|
clearTimeout(timer);
|
|
132
135
|
if (!el.isConnected) return;
|
|
133
|
-
if (!el.hidden) { await read(); if (!el.isConnected) return; if (el.querySelector('[data-rv-mine]') !== document.activeElement || !el.querySelector('.rvh')) draw(); }
|
|
136
|
+
if (!ui.v || !el.closest('[hidden]')) { await read(); if (!el.isConnected) return; if (el.querySelector('[data-rv-mine]') !== document.activeElement || !el.querySelector('.rvh')) draw(); }
|
|
134
137
|
timer = setTimeout(loop, 3000);
|
|
135
138
|
};
|
|
136
139
|
const tick = setInterval(() => { if (!el.isConnected) { clearInterval(tick); return; } const c = el.querySelector('[data-rv-clock]'); if (c) c.textContent = clock(); }, 1000);
|
|
@@ -217,6 +220,7 @@ function renderFocus(el, id, d) {
|
|
|
217
220
|
/** The Record control on the Briefing's top bar: Record (a new note now) and an arrow with today's meetings. Each start asks "Tell everyone first" once. */
|
|
218
221
|
export function mountRecord(here, d) {
|
|
219
222
|
if (here !== 'brief' || $('#recCtl')) return;
|
|
223
|
+
DEPS = d;
|
|
220
224
|
const at = $('.tools-top'); if (!at) return;
|
|
221
225
|
vwStyle('rec');
|
|
222
226
|
const w = document.createElement('div'); w.id = 'recCtl'; w.className = 'recctl';
|
|
@@ -255,3 +259,11 @@ export function mountRecord(here, d) {
|
|
|
255
259
|
document.addEventListener('click', (e) => { if (!e.target.closest('#recCtl')) close(); });
|
|
256
260
|
addEventListener('premium-rec', draw); draw();
|
|
257
261
|
}
|
|
262
|
+
|
|
263
|
+
/* The meeting sheet's During stage (premium-vw-meet.js setStage). On the Briefing, which holds the recorder, a note that records or is
|
|
264
|
+
* paused gets the live capture with its presses; anywhere else, and for a note that is not recording, the sheet's own transcript. */
|
|
265
|
+
const liveNote = (S) => !!(DEPS && S && (S.state === 'recording' || S.state === 'paused'));
|
|
266
|
+
setStage('during', {
|
|
267
|
+
html: (S, x) => (liveNote(S) ? '<div data-rv-stage></div>' : duringHtml(S, x.esc)),
|
|
268
|
+
wire: (el, S) => { const host = el.querySelector('[data-rv-stage]'); if (host && liveNote(S)) renderDuring(host, S.id, DEPS, { stage: true }); },
|
|
269
|
+
});
|
|
@@ -2104,6 +2104,24 @@ button.wl-row[aria-pressed="true"] .wl-tog{background:var(--solid);color:var(--o
|
|
|
2104
2104
|
.kv i{justify-self:start;font:600 var(--fs-1) var(--mono);font-style:normal;padding:0 7px;border-radius:999px;border:1px solid var(--hair);color:var(--ink-2)}
|
|
2105
2105
|
.kv i.nw{border-color:transparent;background:var(--spot);color:var(--ember-ink)}
|
|
2106
2106
|
.kv em{font:500 var(--fs-2) var(--mono);font-style:normal;color:var(--ink-3)}
|
|
2107
|
-
.kp{display:grid;gap:6px;min-width:0;overflow-wrap:anywhere}.doc .kp p{margin:0;color:var(--ink);max-width:none;line-height:1.5}.kp p em{font:500 var(--fs-2) var(--mono);font-style:normal;color:var(--ink-3)}
|
|
2107
|
+
.kp{display:grid;gap:6px;min-width:0;overflow-wrap:anywhere}.doc .kp p{margin:0;color:var(--ink);max-width:none;line-height:1.5}.kp p em{font:500 var(--fs-2) var(--mono);font-style:normal;color:var(--ink-3)}.kp p b{font-weight:600}.kp .ks{display:block;color:var(--ink-2)}
|
|
2108
2108
|
.kmore{min-height:44px;font-weight:600;color:var(--ink-2)}
|
|
2109
2109
|
@media (max-width:640px){.doc .kver{grid-template-columns:minmax(0,1fr)}.kv{grid-auto-flow:column;justify-content:start;align-items:center;gap:8px}}
|
|
2110
|
+
|
|
2111
|
+
/* ── menu rows grow with their text (bug 2026-10-20). A fixed row height (38, 42 or 44px) let a label that wraps run over the next
|
|
2112
|
+
* row, and the title and description of an action collide. The one-line height stays as the row's minimum. premium-menu-rows-test.js ── */
|
|
2113
|
+
.crmenu>button,.crmenu>a{height:auto;min-height:42px;padding-top:8px;padding-bottom:8px;line-height:1.35}
|
|
2114
|
+
.crmenu.tbmenu>button,.crmenu.tbmenu>a{height:auto;min-height:44px}
|
|
2115
|
+
.dsmn>button,.dsmn>a{height:auto;padding-top:9px;padding-bottom:9px;line-height:1.35}
|
|
2116
|
+
.dsmn.bam2>button{padding:8px 12px}
|
|
2117
|
+
.lmenu>button{padding-top:8px;padding-bottom:8px;line-height:1.35}
|
|
2118
|
+
|
|
2119
|
+
/* ── a console part on a premium page (the Listen sheet, any .c3 sheet): the console stylesheets read the console's colour tokens
|
|
2120
|
+
* (tokens.css), which a premium page does not load, so its chips, tags and buttons drew with no colour. Map them onto the premium tokens. ── */
|
|
2121
|
+
:root .c3{--background:var(--card-solid);--foreground:var(--ink);--card:var(--card-solid);--secondary:var(--well);--muted:var(--well);--muted-foreground:var(--ink-3);
|
|
2122
|
+
--accent:var(--well);--border:color-mix(in oklab,var(--ink) 12%,transparent);--input:color-mix(in oklab,var(--ink) 14%,transparent);--ring:var(--ink-3);--sidebar:var(--well);
|
|
2123
|
+
--primary:var(--solid);--primary-foreground:var(--on-solid);--on-accent:var(--on-solid);--brand-mark:var(--ink);--brand:var(--ink);
|
|
2124
|
+
--brand-wash:color-mix(in oklab,var(--ink) 8%,transparent);--success:var(--ok);--good:var(--ok);--warning:var(--ember-ink);--destructive:var(--bad);
|
|
2125
|
+
--acc:var(--ink);--accw:var(--well);--sh1:var(--card-shadow);--sh2:var(--card-shadow);--sh3:var(--card-shadow);--hi:none}
|
|
2126
|
+
/* the console sheet's body is .brief, which is the premium hero sentence here: give it back the console's plain text */
|
|
2127
|
+
:root .c3 .brief{margin-top:0;max-width:none;font-size:inherit;line-height:inherit;font-weight:inherit;letter-spacing:normal;color:inherit;text-wrap:wrap;transform:none;will-change:auto}
|
|
@@ -101,7 +101,8 @@ $('#rank').addEventListener('click', (e) => {
|
|
|
101
101
|
const h = e.target.closest('.rhd');
|
|
102
102
|
if (!h) return;
|
|
103
103
|
const r = LIST().rows.find((x) => x.key === h.closest('.rr').dataset.key);
|
|
104
|
-
if (r && r.
|
|
104
|
+
if (r && r.prop) { openPropsDlg(r.prop); return; } // the agent's drafts: the Agent proposals dialog, that target's proposals only
|
|
105
|
+
if (r && r.go) { location.assign(r.go); return; } // a console row opens its item on its own page: My work, the initiative or the board
|
|
105
106
|
openRow(r);
|
|
106
107
|
});
|
|
107
108
|
|
|
@@ -592,14 +593,20 @@ function propItem(it) {
|
|
|
592
593
|
} else act = bdActs(bdBtn('Keep', 'pkeep', id), bdBtn('Send back', 'pnote', id, true), bdBtn('Drop', 'pdrop', id, true)) + `<p class="bd-why">${esc(pKeep(p))} Drop counts as a correction. None of the three can be undone.</p>` + bdFail(id, PERR);
|
|
593
594
|
return `<div class="bd-it${d ? ' decided' : ''}" data-id="${esc(id)}"><div class="bd-h">${bdChip(pWhat(p))}${it.pname ? bdChip(it.pname, 'mono') : ''}</div><span class="bd-t">${esc(targetOf(it))}</span>${text ? `<p class="bd-q">${esc(text)}</p>` : ''}${p.why ? `<p class="bd-why">Why: ${esc(p.why)}</p>` : ''}${src ? `<p class="bd-why">Sources: ${src}</p>` : ''}${act}</div>`;
|
|
594
595
|
}
|
|
596
|
+
/* PFOCUS: the one target a "What you need to do" row opened the dialog on ({ kind, ws, id }), or null for every proposal. Show all clears it. */
|
|
597
|
+
let PFOCUS = null;
|
|
598
|
+
const inFocus = (it) => !PFOCUS || (it.kind === PFOCUS.kind && it.tid === PFOCUS.id && (!PFOCUS.ws || it.ws === PFOCUS.ws));
|
|
595
599
|
function propsHtml() {
|
|
596
600
|
const a = A.prop; if (!a.ok) return `<p class="nodef err" role="alert">Agent proposals ${esc(said(a))}</p>`;
|
|
597
|
-
const
|
|
598
|
-
|
|
601
|
+
const all = a.items.concat([...DEC.values()].map((d) => d.item).filter((it) => !a.items.some((o) => o.id === it.id)));
|
|
602
|
+
const L = all.filter(inFocus), open = a.items.filter(inFocus).length, rest = PFOCUS ? a.items.length - open : 0;
|
|
603
|
+
const more = PFOCUS ? bdActs(bdBtn('Show all proposals', 'pall', null, true)) + (rest ? `<p class="bd-why">${pl(rest, 'more proposal waits', 'more proposals wait')} on other work.</p>` : '') : '';
|
|
604
|
+
return (L.length ? `<p class="bd-top">${open ? pl(open, 'proposal waits', 'proposals wait') + ' for you.' : 'All decided.'} The agent drafts and asks you. Nothing it wrote has changed a record until you keep it.</p><div class="bd-list">${L.map(propItem).join('')}</div>` : `<p class="empty3">${CHECK}${PFOCUS ? 'No proposal waits on this one. It may have been decided since the list was read.' : 'No agent proposals wait.'}</p>`) + more
|
|
599
605
|
+ (a.errs.length ? `<p class="note">Not read: ${esc(a.errs[0])}</p>` : '') + '<p class="note">The agent mode (Off, Shadow, Approve) stays in the console. This list shows a kind only when its mode is Approve.</p>';
|
|
600
606
|
}
|
|
601
607
|
async function propPress(e, redraw) {
|
|
602
608
|
const b = e.target.closest('[data-bda]'); if (!b || BUSY) return;
|
|
609
|
+
if (b.dataset.bda === 'pall') { PFOCUS = null; redraw(); return; }
|
|
603
610
|
const act = b.dataset.bda, id = b.dataset.id, it = openProps().find((x) => x.id === id);
|
|
604
611
|
if (!it) return;
|
|
605
612
|
if (act === 'pnote') { PBACK.add(id); redraw(`[data-bdn="${CSS.escape(id)}"]`); return; }
|
|
@@ -615,8 +622,10 @@ async function propPress(e, redraw) {
|
|
|
615
622
|
toast(act === 'pkeep' ? 'Kept.' : act === 'pback' ? 'Sent back with your note.' : 'Dropped. It counts as a correction.');
|
|
616
623
|
await readAll(['prop']); redraw(`.bd-it[data-id="${CSS.escape(id)}"] .bd-done`);
|
|
617
624
|
}
|
|
618
|
-
const openPropsDlg = () => {
|
|
619
|
-
|
|
625
|
+
const openPropsDlg = async (focus) => {
|
|
626
|
+
PFOCUS = focus && focus.kind && focus.id ? focus : null;
|
|
627
|
+
if (PFOCUS && !A.prop) await readAll(['prop']); // pressed before Around you has read: read the proposals first
|
|
628
|
+
const n = openProps().filter(inFocus).length;
|
|
620
629
|
bdDlg('prop', 'Agent proposals · real data', 'Agent proposals', 'The Initiative Driver, read from each product\'s ledger',
|
|
621
630
|
A.prop && A.prop.ok ? (n ? pl(n, 'proposal waits', 'proposals wait') + ' for you. Keep one to record it, send it back with a note, or drop it.' : 'No proposal waits for you.') : 'The proposals could not be read.', propsHtml, propPress,
|
|
622
631
|
(e) => { const t = e.target.closest('[data-bdn]'); if (!t) return; PNOTE[t.dataset.bdn] = t.value; const k = $(`[data-bda="pback"][data-id="${CSS.escape(t.dataset.bdn)}"]`, $('#oMain')); if (k) k.disabled = !t.value.trim(); });
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "Bug 2026-10-20 (broken UI): premium menu rows grow with their text, a console sheet on a premium page has the console's colours, and a recording highlight keeps its tag on one line. No server: built in the browser on the real stylesheets.",
|
|
3
|
+
"panels": [
|
|
4
|
+
"premium-menu-rows-test.js"
|
|
5
|
+
],
|
|
6
|
+
"seconds": {
|
|
7
|
+
"premium-menu-rows-test.js": 20
|
|
8
|
+
}
|
|
9
|
+
}
|