create-pmos 0.317.0 → 0.319.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 +1 -1
- 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-board-test.js +2 -2
- package/workspace/briefing-premium-initiative-test.js +5 -10
- package/workspace/briefing-premium-insights-test.js +1 -1
- package/workspace/briefing-premium-products-test.js +9 -4
- package/workspace/briefing-premium-test.js +12 -10
- package/workspace/briefing-premium-work-test.js +2 -10
- package/workspace/guide/briefing-premium.md +22 -19
- package/workspace/lib/briefing-premium-agent.js +5 -0
- package/workspace/lib/insights-premium.js +1 -1
- package/workspace/lib/my-work-premium.js +1 -24
- package/workspace/lib/routes-briefing-premium.js +1 -1
- package/workspace/lib/routes-my-work-premium.js +1 -3
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/premium-studio-test.js +4 -4
- package/workspace/public/pm/premium-board.js +3 -2
- package/workspace/public/pm/premium-initiative.js +2 -1
- package/workspace/public/pm/premium-insights.js +3 -2
- package/workspace/public/pm/premium-meeting.js +3 -3
- package/workspace/public/pm/premium-shell.js +147 -7
- package/workspace/public/pm/premium-work.js +5 -29
- package/workspace/public/pm/premium.css +47 -2
- package/workspace/public/pm/premium.js +16 -23
- package/workspace/public/premium-board.html +2 -6
- package/workspace/public/premium-initiative.html +1 -5
- package/workspace/public/premium-insights.html +1 -5
- package/workspace/public/premium-work.html +4 -14
- package/workspace/public/premium.html +3 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pmos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.319.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": {
|
package/payload/KIT-VERSION
CHANGED
|
@@ -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-19T14:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-19T14:43:52Z"}
|
|
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-19T14:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-19T14:43:52Z"}
|
|
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-19T14:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-19T14:43:52Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -65,7 +65,7 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
|
|
|
65
65
|
/* B1 */
|
|
66
66
|
const rail = await p.evaluate(() => ({ names: [...document.querySelectorAll('.rail .pl')].map((b) => b.textContent.trim()), cur: document.querySelector('.rail [aria-current="page"]').textContent.trim(), pi: getComputedStyle(document.querySelector('.rail')).getPropertyValue('--pi').trim(), title: document.title, name: document.querySelector('#crBoard').textContent, sw: document.querySelector('#crSw').hidden }));
|
|
67
67
|
ok('B1 the rail names four places, Board is current, the board is named and has no switcher for one board', rail.names.join() === 'Briefing,My work,Board,Insights' && rail.cur === 'Board' && rail.pi === '2' && rail.name === 'pmos' && rail.sw, JSON.stringify(rail));
|
|
68
|
-
{ const tc = await p.evaluate(() => { const a = document.querySelector('#toConsole'); if (!a) return null; const r = a.getBoundingClientRect(); return { href: a.getAttribute('href'), label: a.getAttribute('aria-label'), w: Math.round(r.width), h: Math.round(r.height), tab: a.tabIndex }; }); ok('B1 the
|
|
68
|
+
{ await p.click('#moreBtn'); const tc = await p.evaluate(() => { const a = document.querySelector('#toConsole'); if (!a) return null; const r = a.getBoundingClientRect(); return { href: a.getAttribute('href'), label: a.getAttribute('aria-label'), w: Math.round(r.width), h: Math.round(r.height), tab: a.tabIndex }; }); ok('B1 the ⋯ menu links to the console (premium-console-link, premium-topbar)', tc && tc.href === '/console.html' && tc.label === 'Open the console' && tc.w >= 44 && tc.h >= 44 && tc.tab === 0, JSON.stringify(tc)); await p.keyboard.press('Escape'); }
|
|
69
69
|
ok('B1 the page is served at /premium-board and /premium-board.html', (await fetch(BASE + '/premium-board')).status === 200 && (await fetch(BASE + '/premium-board.html')).status === 200);
|
|
70
70
|
for (const [go, re] of [['brief', /\/premium\.html$/], ['work', /\/premium-work\.html$/]]) {
|
|
71
71
|
const r2 = await open(); await r2.page.locator(`.rail [data-go="${go}"]`).click();
|
|
@@ -159,7 +159,7 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
|
|
|
159
159
|
const u = new URL(D.page.url());
|
|
160
160
|
ok('B14 a click on an initiative opens its page with the initiative, the workspace and the board', u.pathname === '/premium-initiative.html' && u.searchParams.get('id') === 'self-serve-v2' && u.searchParams.get('ws') === 'w1' && u.searchParams.get('board') === 'w1', D.page.url());
|
|
161
161
|
await D.page.goBack(); await until(() => D.page.evaluate(() => document.querySelectorAll('#ibBody .ini2').length > 0));
|
|
162
|
-
await D.page.click('#modeSeg [data-m="popup"]');
|
|
162
|
+
await D.page.click('#moreBtn'); await D.page.click('#modeSeg [data-m="popup"]'); await D.page.keyboard.press('Escape'); // premium-topbar: the switch is in the Board's ⋯ menu
|
|
163
163
|
await D.page.locator('#ibBody .ini2').first().click();
|
|
164
164
|
ok('B14 the Popup setting opens the dialog and stays on the Board', await until(() => D.page.evaluate(() => document.querySelector('#dlg').classList.contains('on'))) && new URL(D.page.url()).pathname === '/premium-board.html');
|
|
165
165
|
await D.page.keyboard.press('Escape'); await D.page.reload(); await until(() => D.page.evaluate(() => document.querySelectorAll('#ibBody .ini2').length > 0));
|
|
@@ -75,23 +75,18 @@ const HEALTH = { ok: true, path: 'planning/prd/self-serve-v2-prd.md', health: {
|
|
|
75
75
|
/* I1 place */
|
|
76
76
|
const rail = await p.evaluate(() => ({ names: [...document.querySelectorAll('.rail .pl')].map((b) => b.textContent.trim()), cur: document.querySelector('.rail [aria-current="page"]').textContent.trim() }));
|
|
77
77
|
ok('I1 the rail names the four places and marks Board', rail.names.join() === 'Briefing,My work,Board,Insights' && rail.cur === 'Board');
|
|
78
|
-
{ const tc = await p.evaluate(() => { const a = document.querySelector('#toConsole'); if (!a) return null; const r = a.getBoundingClientRect(); return { href: a.getAttribute('href'), label: a.getAttribute('aria-label'), w: Math.round(r.width), h: Math.round(r.height), tab: a.tabIndex }; }); ok('I1 the
|
|
79
|
-
ok('I1 the
|
|
78
|
+
{ await p.click('#moreBtn'); const tc = await p.evaluate(() => { const a = document.querySelector('#toConsole'); if (!a) return null; const r = a.getBoundingClientRect(); return { href: a.getAttribute('href'), label: a.getAttribute('aria-label'), w: Math.round(r.width), h: Math.round(r.height), tab: a.tabIndex }; }); ok('I1 the ⋯ menu links to the console (premium-console-link, premium-topbar)', tc && tc.href === '/console.html' && tc.label === 'Open the console' && tc.w >= 44 && tc.h >= 44 && tc.tab === 0, JSON.stringify(tc)); await p.keyboard.press('Escape'); }
|
|
79
|
+
ok('I1 the bar has a back button to the board, the initiative with its switcher, and Chat (premium-topbar)', await p.evaluate(() => document.querySelector('#crBoard').getAttribute('aria-label') === 'Back to Onboarding' && document.querySelector('#crIni').textContent === 'Self-serve onboarding v2' && !document.querySelector('#crSw') && !!document.querySelector('#crSw2') && document.querySelector('#crAsk').getAttribute('aria-label') === 'Ask about this initiative'));
|
|
80
80
|
await p.route('**/premium-board.html*', (r) => r.fulfill({ contentType: 'text/html', body: '<title>b</title>' }));
|
|
81
81
|
await p.route('**/premium-initiative.html?id=partner*', (r) => r.fulfill({ contentType: 'text/html', body: '<title>i</title>' }));
|
|
82
|
-
await p.click('#crSw'); const bm = await p.evaluate(() => ({ open: !document.querySelector('#crMenu').hidden, items: [...document.querySelectorAll('#crMenu button')].map((b) => b.textContent + (b.hasAttribute('aria-current') ? '*' : '')).join('|'), exp: document.querySelector('#crSw').getAttribute('aria-expanded') }));
|
|
83
|
-
ok('I1 the board switcher lists the boards and marks this one', bm.open && bm.items === 'Onboarding*|Payments' && bm.exp === 'true', JSON.stringify(bm));
|
|
84
|
-
await p.keyboard.press('Escape'); ok('I1 Escape closes the menu and gives the focus back to its button', await p.evaluate(() => document.querySelector('#crMenu').hidden && document.activeElement.id === 'crSw'));
|
|
85
82
|
await p.click('#crSw2'); const im = await p.evaluate(() => [...document.querySelectorAll('#crMenu button')].map((b) => b.textContent + (b.hasAttribute('aria-current') ? '*' : '')).join('|'));
|
|
86
83
|
ok('I1 the initiative switcher lists the board\'s initiatives and marks this one', im === 'Self-serve onboarding v2*|Partner API rate limits|Usage-based billing', im);
|
|
87
84
|
await p.click('#crMenu [data-swi="partner-rate-limits"]'); await sleep(500);
|
|
88
85
|
{ const u = new URL(p.url()); ok('I1 choosing an initiative opens its page on the same board', u.pathname === '/premium-initiative.html' && u.searchParams.get('id') === 'partner-rate-limits' && u.searchParams.get('board') === 'w1', p.url()); await p.goBack(); await until(() => p.evaluate(() => !!document.querySelector('#cIniTk'))); }
|
|
89
|
-
await p.click('#crSw'); await p.click('#crMenu [data-sw="w2|w2"]'); await sleep(500);
|
|
90
|
-
{ const u = new URL(p.url()); ok('I1 choosing a board opens that board\'s page', u.pathname === '/premium-board.html' && u.searchParams.get('ws') === 'w2' && u.searchParams.get('board') === 'w2', p.url()); await p.goBack(); await until(() => p.evaluate(() => !!document.querySelector('#cIniTk'))); }
|
|
91
86
|
await p.click('#crBoard'); await sleep(500);
|
|
92
|
-
{ const u = new URL(p.url()); ok('I1 the
|
|
87
|
+
{ const u = new URL(p.url()); ok('I1 the back button leads back to the Board', u.pathname === '/premium-board.html' && u.searchParams.get('board') === 'w1', p.url()); await p.goBack(); await until(() => p.evaluate(() => !!document.querySelector('#cIniTk'))); }
|
|
93
88
|
await p.click('#crAsk'); await until(() => p.evaluate(() => document.querySelector('#dlg').classList.contains('on'))); await sleep(500);
|
|
94
|
-
ok('I1
|
|
89
|
+
ok('I1 Chat opens the initiative in the dialog with the read-only agent beside it', await p.evaluate(() => document.querySelector('#dTitle').textContent === 'Self-serve onboarding v2' && /Lane\|feature/.test([...document.querySelectorAll('#oMain .kv2 span')].map((x) => x.textContent).join('|')) && !document.querySelector('#askF').hidden));
|
|
95
90
|
await p.keyboard.press('Escape'); await until(() => p.evaluate(() => !document.querySelector('#dlg').classList.contains('on')));
|
|
96
91
|
|
|
97
92
|
/* I3 header */
|
|
@@ -323,7 +318,7 @@ const HEALTH = { ok: true, path: 'planning/prd/self-serve-v2-prd.md', health: {
|
|
|
323
318
|
/* I12 fidelity against the mockup */
|
|
324
319
|
if (!fs.existsSync(MOCKUP)) ok('I12 the mockup is in the repository', false, MOCKUP);
|
|
325
320
|
else {
|
|
326
|
-
const PAIRS = [['rail', '.rail'], ['crumb', '.crumb'], ['
|
|
321
|
+
const PAIRS = [['rail', '.rail'], ['crumb', '.crumb'], ['lede', '#cIniOv .lede'], ['agr', '#cIniOv .agr2'], ['agc', '#cIniOv .agc'], ['tkadd', '.tkadd'], ['chip', '.ihead .chp'], ['meta', '.ihm'], ['strip', '.iws em'], ['segs', '.iws .sg2'], ['ov', '#cIniOv'], ['ovh', '#cIniOv h2'], ['todo', '#cIniOv .todo'], ['tdw', '#cIniOv .tdw'], ['tk', '#cIniTk'], ['tkq', '#cIniTk .tkq:last-child'], ['tki', '#cIniTk .tkq:last-child .tki'], ['tkn', '#cIniTk .tkq:last-child .tkn b'], ['tkp', '#cIniTk .tkq:last-child .tkp'], ['doc', '#cIniDoc'], ['dsum', '.dsum'], ['dprog', '.dprog'], ['dtool', '.dtool'], ['dmr', '#cIniDoc .dmr'], ['dmi', '#cIniDoc .dmi.c-Plan'], ['dock', '.dock']];
|
|
327
322
|
const SKIP_W = ['crumb', 'crb', 'lede', 'agr', 'agc', 'tkadd', 'ckrs', 'chip', 'meta', 'strip', 'segs', 'ov', 'ovh', 'todo', 'tdw', 'chk', 'ckr', 'tk', 'tkq', 'tki', 'tkn', 'tkp', 'doc', 'dsum', 'dprog', 'dtool', 'dmr', 'dmi'];
|
|
328
323
|
const SKIP_L = ['crumb', 'crb', 'cri', 'crask', 'lede', 'agr', 'agc', 'tkadd', 'ckrs', 'chip', 'meta', 'strip', 'segs', 'tdw', 'ovh', 'ckr', 'tkq', 'tki', 'tkn', 'tkp', 'dmr', 'dmi', 'dsum', 'dprog', 'dtool', 'todo'];
|
|
329
324
|
const PROPS = ['fontSize', 'fontWeight', 'fontFamily', 'color', 'backgroundColor', 'borderRadius', 'paddingTop', 'paddingLeft', 'letterSpacing', 'lineHeight', 'boxShadow', 'backdropFilter', 'borderTopColor'];
|
|
@@ -65,7 +65,7 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
|
|
|
65
65
|
/* I1 */
|
|
66
66
|
const rail = await p.evaluate(() => ({ names: [...document.querySelectorAll('.rail .pl')].map((b) => b.textContent.trim()), cur: document.querySelector('.rail [aria-current="page"]').textContent.trim(), pi: getComputedStyle(document.querySelector('.rail')).getPropertyValue('--pi').trim(), title: document.title, name: document.querySelector('#crBoard').textContent, sw: document.querySelector('#crSw').hidden }));
|
|
67
67
|
ok('I1 the rail names four places, Insights is current, the board is named and has no switcher for one board', rail.names.join() === 'Briefing,My work,Board,Insights' && rail.cur === 'Insights' && rail.pi === '3' && rail.name === 'pmos' && rail.sw, JSON.stringify(rail));
|
|
68
|
-
{ const tc = await p.evaluate(() => { const a = document.querySelector('#toConsole'); if (!a) return null; const r = a.getBoundingClientRect(); return { href: a.getAttribute('href'), label: a.getAttribute('aria-label'), w: Math.round(r.width), h: Math.round(r.height), tab: a.tabIndex }; }); ok('I1 the
|
|
68
|
+
{ await p.click('#moreBtn'); const tc = await p.evaluate(() => { const a = document.querySelector('#toConsole'); if (!a) return null; const r = a.getBoundingClientRect(); return { href: a.getAttribute('href'), label: a.getAttribute('aria-label'), w: Math.round(r.width), h: Math.round(r.height), tab: a.tabIndex }; }); ok('I1 the ⋯ menu links to the console (premium-console-link, premium-topbar)', tc && tc.href === '/console.html' && tc.label === 'Open the console' && tc.w >= 44 && tc.h >= 44 && tc.tab === 0, JSON.stringify(tc)); await p.keyboard.press('Escape'); }
|
|
69
69
|
ok('I1 the page is served at /premium-insights and /premium-insights.html', (await fetch(BASE + '/premium-insights')).status === 200 && (await fetch(BASE + '/premium-insights.html')).status === 200);
|
|
70
70
|
for (const [go, re] of [['brief', /\/premium\.html$/], ['work', /\/premium-work\.html$/], ['init', /\/premium-board\.html$/]]) {
|
|
71
71
|
const r2 = await open(); await r2.page.locator(`.rail [data-go="${go}"]`).click();
|
|
@@ -80,9 +80,14 @@ const product = (name, cond) => {
|
|
|
80
80
|
const page = await ctx.newPage(); const errors = [];
|
|
81
81
|
page.on('pageerror', (e) => errors.push(String(e.message || e)));
|
|
82
82
|
await page.goto(BASE + '/premium.html' + q, { waitUntil: 'domcontentloaded' });
|
|
83
|
-
await page.waitForSelector('#rank .rr, #calm:not([hidden]), #pkw:not([hidden])', { timeout: 30000 });
|
|
83
|
+
await page.waitForSelector('#rank .rr, #calm:not([hidden]), #pkw:not([hidden])', { state: 'attached', timeout: 30000 }); // the picker is parked for the Sources dialog (premium-topbar), so attached, not visible
|
|
84
84
|
return { ctx, page, errors };
|
|
85
85
|
};
|
|
86
|
+
// premium-topbar: the picker lives in the Sources dialog (the chip, or the ⋯ menu at phone width)
|
|
87
|
+
const pick = async (page) => {
|
|
88
|
+
if (!(await page.isVisible('#pick'))) { if (await page.isVisible('#srcChip')) await page.click('#srcChip'); else { await page.click('#moreBtn'); await page.click('#srcItem'); } await page.waitForSelector('#pick', { state: 'visible', timeout: 10000 }); }
|
|
89
|
+
await page.click('#pick');
|
|
90
|
+
};
|
|
86
91
|
const rowsOf = (page) => page.$$eval('#rank .rr', (els) => els.map((e) => ({ key: e.dataset.key, tag: (e.querySelector('.pn') || {}).textContent || '', title: e.querySelector('.rt').textContent })));
|
|
87
92
|
|
|
88
93
|
{
|
|
@@ -93,7 +98,7 @@ const product = (name, cond) => {
|
|
|
93
98
|
const snap = await page.textContent('#snap');
|
|
94
99
|
ok('P1 the header names what is read and what is not', /IDPF and microsites/.test(snap) && /not included/.test(snap) && /\b[Pp][Mm][Oo][Ss]\b|pmos/i.test(snap), snap);
|
|
95
100
|
ok('P2 the picker says how many of the workspaces are on', (await page.textContent('#pick')).replace(/\s+/g, '') === 'Products2of3', await page.textContent('#pick'));
|
|
96
|
-
await page
|
|
101
|
+
await pick(page);
|
|
97
102
|
const items = await page.$$eval('#pickMenu [role="menuitemcheckbox"]', (els) => els.map((e) => ({ name: e.textContent.trim(), on: e.getAttribute('aria-checked'), h: Math.round(e.getBoundingClientRect().height) })));
|
|
98
103
|
ok('P2 the menu lists every workspace, the home one included, unticked', items.length === 3 && items.filter((i) => i.on === 'true').length === 2 && items.some((i) => i.on === 'false' && /home/.test(i.name)), JSON.stringify(items));
|
|
99
104
|
const pickH = await page.$eval('#pick', (e) => Math.round(e.getBoundingClientRect().height));
|
|
@@ -107,7 +112,7 @@ const product = (name, cond) => {
|
|
|
107
112
|
ok('P13 keyboard: the menu stays open on the ticked item and Escape closes it', await page.evaluate((id) => document.activeElement && document.activeElement.dataset.ws === id, wB.id) && (await page.keyboard.press('Escape'), await until(async () => await page.$eval('#pickMenu', (e) => e.hidden), 3000)));
|
|
108
113
|
ok('P3 the choice survives a reload', await (async () => { await page.reload({ waitUntil: 'domcontentloaded' }); return until(async () => { const r = await rowsOf(page); return r.length === 1 && r[0].tag === 'IDPF' ? 1 : 0; }, 20000); })());
|
|
109
114
|
// tick the home workspace
|
|
110
|
-
await page
|
|
115
|
+
await pick(page); await page.click(`#pickMenu [data-ws="${home.id}"]`);
|
|
111
116
|
ok('P3 ticking the home workspace reads it', await until(async () => (await page.getAttribute(`#pickMenu [data-ws="${home.id}"]`, 'aria-checked')) === 'true' && new RegExp(home.name + ' and IDPF|IDPF and ' + home.name, 'i').test(await page.textContent('#snap')), 20000), await page.textContent('#snap'));
|
|
112
117
|
// back to the default
|
|
113
118
|
await page.click('#pickMenu [data-reset]');
|
|
@@ -152,7 +157,7 @@ const product = (name, cond) => {
|
|
|
152
157
|
for (const [w, th] of [[390, 'light'], [390, 'dark'], [1280, 'dark']]) {
|
|
153
158
|
const { ctx, page } = await open({ w, h: 800, theme: th });
|
|
154
159
|
await until(async () => (await rowsOf(page)).length >= 1, 20000);
|
|
155
|
-
await page
|
|
160
|
+
await pick(page);
|
|
156
161
|
const o = await page.evaluate(() => ({ sw: document.documentElement.scrollWidth, cw: document.documentElement.clientWidth, menu: (() => { const r = document.querySelector('#pickMenu').getBoundingClientRect(); return { l: Math.round(r.left), r: Math.round(r.right) }; })() }));
|
|
157
162
|
ok(`P13 at ${w} px, ${th}: no sideways scroll with the menu open, and the menu stays on screen`, o.sw <= o.cw && o.menu.l >= 0 && o.menu.r <= o.cw, JSON.stringify(o));
|
|
158
163
|
await ctx.close();
|
|
@@ -87,16 +87,18 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
|
|
|
87
87
|
const def = await fetch(BASE + '/').then((r) => r.text());
|
|
88
88
|
ok('R1 the premium Briefing is the default page', /class="rail/.test(def) && !/id="c3-root"/.test(def));
|
|
89
89
|
{ const con = await fetch(BASE + '/console.html').then((r) => r.text()); ok('R1 the console is served at /console.html', /id="c3-root"/.test(con)); const old = await fetch(BASE + '/c3.html', { redirect: 'manual' }); const oldQ = await fetch(BASE + '/c3.html?tab=rep', { redirect: 'manual' }); ok('R1 /c3.html goes to the premium Briefing, and with a query to the console with the same query', old.status === 302 && old.headers.get('location') === '/premium.html' && oldQ.status === 302 && oldQ.headers.get('location') === '/console.html?tab=rep', old.headers.get('location') + ' | ' + oldQ.headers.get('location')); }
|
|
90
|
-
{ const tc = await p.evaluate(() => { const a = document.querySelector('#toConsole'); if (!a) return null; const r = a.getBoundingClientRect(); return { href: a.getAttribute('href'), label: a.getAttribute('aria-label'), w: Math.round(r.width), h: Math.round(r.height), tab: a.tabIndex }; }); ok('R1 the
|
|
90
|
+
{ await p.click('#moreBtn'); const tc = await p.evaluate(() => { const a = document.querySelector('#toConsole'); if (!a) return null; const r = a.getBoundingClientRect(); return { href: a.getAttribute('href'), label: a.getAttribute('aria-label'), w: Math.round(r.width), h: Math.round(r.height), tab: a.tabIndex }; }); ok('R1 the ⋯ menu links to the console (premium-console-link, premium-topbar)', tc && tc.href === '/console.html' && tc.label === 'Open the console' && tc.w >= 44 && tc.h >= 44 && tc.tab === 0, JSON.stringify(tc)); await p.keyboard.press('Escape'); }
|
|
91
91
|
|
|
92
92
|
/* premium-search-bell: the Search button, the bell and Ctrl K, from the shared shell */
|
|
93
93
|
{
|
|
94
94
|
await p.route('**/api/boards/backlog*', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, ws: 'w1', board: 'b1', rows: [{ id: 'sb-alpha', title: 'Alpha launch plan', lane: 'feature', stage: 'Build' }] }) }));
|
|
95
95
|
await p.route('**/api/core-docs*', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, scope: { name: 'PMOS' }, docs: [{ key: 'roadmap', title: 'Roadmap' }] }) }));
|
|
96
96
|
await p.route('**/api/sessions', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ sessions: [{ id: 's1', name: 'Fix the footer', state: 'idle', cwd: '.' }, { id: 's2', name: 'Nightly run', state: 'idle', automatic: true }] }) }));
|
|
97
|
+
await p.click('#moreBtn');
|
|
97
98
|
const sb = await until(() => p.evaluate(() => { const s = document.querySelector('#pvSearch'), b = document.querySelector('#pvBell'), g = document.querySelector('#pvBdg'); if (!s || !b || !g || g.hidden) return null; const rs = s.getBoundingClientRect(), rb = b.getBoundingClientRect(); return { sw: Math.round(rs.width), sh: Math.round(rs.height), bw: Math.round(rb.width), bh: Math.round(rb.height), n: g.textContent, lab: b.getAttribute('aria-label') }; }), 8000);
|
|
98
99
|
const want = MODEL.list.count;
|
|
99
|
-
ok('SB1 the
|
|
100
|
+
ok('SB1 the ⋯ menu has Search and the header has the bell, 44 px, and the bell counts what the Briefing lists', sb && sb.sw >= 44 && sb.sh >= 44 && sb.bw >= 44 && sb.bh >= 44 && sb.n === String(want) && sb.lab === 'Needs you: ' + want, JSON.stringify(sb));
|
|
101
|
+
await p.keyboard.press('Escape');
|
|
100
102
|
await p.keyboard.press('Control+k');
|
|
101
103
|
const pal = await until(() => p.evaluate(() => { const o = document.querySelector('#pvOv'); return o && !o.hidden && document.activeElement && document.activeElement.id === 'pvQ' ? { rail: document.querySelector('.rail').inert, groups: [...document.querySelectorAll('#pvList .pv-grp')].map((x) => x.textContent) } : null; }), 6000);
|
|
102
104
|
ok('SB2 Ctrl K opens the search with the box focused and the page behind it inert', pal && pal.rail === true, JSON.stringify(pal));
|
|
@@ -107,8 +109,8 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
|
|
|
107
109
|
const ses = await until(() => p.evaluate(() => [...document.querySelectorAll('#pvList .pv-row b')].map((x) => x.textContent).join() === 'Fix the footer' ? 1 : 0), 6000);
|
|
108
110
|
ok('SB4 sessions are listed and automatic ones are left out', !!ses);
|
|
109
111
|
await p.keyboard.press('Escape');
|
|
110
|
-
const closed = await until(() => p.evaluate(() => document.querySelector('#pvOv').hidden && !document.querySelector('.rail').inert && document.activeElement.id === '
|
|
111
|
-
ok('SB5 Escape closes it and puts the focus back on the button', !!closed);
|
|
112
|
+
const closed = await until(() => p.evaluate(() => document.querySelector('#pvOv').hidden && !document.querySelector('.rail').inert && document.activeElement.id === 'moreBtn'), 4000);
|
|
113
|
+
ok('SB5 Escape closes it and puts the focus back on the ⋯ button', !!closed);
|
|
112
114
|
await p.click('#pvBell');
|
|
113
115
|
const rows = await until(() => p.evaluate(() => { const o = document.querySelector('#pvOv'); return !o.hidden ? document.querySelectorAll('#pvList .pv-row').length : 0; }), 6000);
|
|
114
116
|
ok('SB6 the bell lists the Briefing rows and a row opens the Briefing', rows === MODEL.list.rows.length, String(rows));
|
|
@@ -116,8 +118,8 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
|
|
|
116
118
|
ok('SB7 search and the bell only read: no POST left the page', !A.reqs.some((x) => x.startsWith('POST ')));
|
|
117
119
|
}
|
|
118
120
|
/* premium-settings: the dialog holds Workspaces and Connectors only; each press goes to its existing route */
|
|
119
|
-
{ const bt = await p.evaluate(() => { const b = document.querySelector('#settingsBtn'); if (!b) return null; const r = b.getBoundingClientRect(); return { label: b.
|
|
120
|
-
ok('S1 the
|
|
121
|
+
{ await p.click('#moreBtn'); const bt = await p.evaluate(() => { const b = document.querySelector('#settingsBtn'); if (!b) return null; const r = b.getBoundingClientRect(); return { label: b.textContent.trim(), w: Math.round(r.width), h: Math.round(r.height) }; });
|
|
122
|
+
ok('S1 the ⋯ menu has a Settings item of at least 44 px', bt && bt.label === 'Settings' && bt.w >= 44 && bt.h >= 44, JSON.stringify(bt));
|
|
121
123
|
await p.click('#settingsBtn');
|
|
122
124
|
const drawn = await until(() => p.evaluate(() => document.querySelectorAll('#oMain .sr').length > 0), 8000);
|
|
123
125
|
const labs = await p.evaluate(() => [...document.querySelectorAll('#oMain .label')].map((x) => x.textContent));
|
|
@@ -140,8 +142,8 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
|
|
|
140
142
|
let removes = 0, slowOnce = true;
|
|
141
143
|
await p.route('**/api/sessions', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ sessions: fake }) }));
|
|
142
144
|
await p.route('**/api/session/remove', (r) => { removes++; const id = JSON.parse(r.request().postData()).id; if (id === 'sess-2' && slowOnce) { slowOnce = false; return r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, removed: false, note: 'asked it to end' }) }); } const i = fake.findIndex((x) => x.id === id); if (i >= 0) fake.splice(i, 1); return r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, removed: true }) }); });
|
|
143
|
-
const bt = await p.evaluate(() => { const b = document.querySelector('#sessBtn'); if (!b) return null; const r = b.getBoundingClientRect(); return { w: Math.round(r.width), h: Math.round(r.height) }; });
|
|
144
|
-
ok('X1 the
|
|
145
|
+
await p.click('#moreBtn'); const bt = await p.evaluate(() => { const b = document.querySelector('#sessBtn'); if (!b) return null; const r = b.getBoundingClientRect(); return { w: Math.round(r.width), h: Math.round(r.height) }; });
|
|
146
|
+
ok('X1 the ⋯ menu has an Agent sessions item of at least 44 px', bt && bt.w >= 44 && bt.h >= 44, JSON.stringify(bt));
|
|
145
147
|
await p.click('#sessBtn');
|
|
146
148
|
const rows = await until(() => p.evaluate(() => document.querySelectorAll('#oMain .ssr').length), 8000);
|
|
147
149
|
ok('X2 the list shows the sessions that have not exited, and the title counts them', rows === 2 && (await p.evaluate(() => document.querySelector('#dTitle').textContent)) === '2 running', String(rows));
|
|
@@ -164,7 +166,7 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
|
|
|
164
166
|
let asking = true; const answers = [];
|
|
165
167
|
await p.route('**/api/runs', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, cards: asking ? { 'sess-1': { state: 'asking', asked: 'q-7', ask: { id: 'q-7', q: 'Which folder should the brief go in?', options: [{ label: 'planning/briefs', rec: true }, { label: 'planning/research' }] } } } : {} }) }));
|
|
166
168
|
await p.route('**/api/runs/answer', (r) => { answers.push({ ...JSON.parse(r.request().postData()), hasNonce: !!r.request().headers()['x-pmos-nonce'] }); asking = false; r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true }) }); });
|
|
167
|
-
await p.keyboard.press('Escape'); await p.click('#sessBtn');
|
|
169
|
+
await p.keyboard.press('Escape'); await p.click('#moreBtn'); await p.click('#sessBtn');
|
|
168
170
|
const q = await until(() => p.evaluate(() => { const b = document.querySelector('#oMain .ssq'); return b ? b.textContent : ''; }), 8000);
|
|
169
171
|
ok('Q1 a session that is asking shows its question and the options it offered, in its own words', /Which folder should the brief go in\?/.test(q) && /planning\/briefs/.test(q) && /planning\/research/.test(q), q);
|
|
170
172
|
ok('Q2 no question shows on a session that is not asking', (await p.evaluate(() => document.querySelectorAll('#oMain .ssq').length)) === 1);
|
|
@@ -527,7 +529,7 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
|
|
|
527
529
|
{
|
|
528
530
|
const t = await p.evaluate(() => {
|
|
529
531
|
const small = [];
|
|
530
|
-
for (const s of ['.rr .rhd', '.rr .rpin', '#tl .ev', '#srcChips .fchip', '.fbtn', '.rail .pl', '#
|
|
532
|
+
for (const s of ['.rr .rhd', '.rr .rpin', '#tl .ev', '#srcChips .fchip', '.fbtn', '.rail .pl', '#srcChip', '#moreBtn', '#pgChat', '#theme2']) document.querySelectorAll(s).forEach((e) => { const r = e.getBoundingClientRect(); if (r.width && (r.height < 44 || r.width < 44)) small.push(s + ' ' + Math.round(r.width) + 'x' + Math.round(r.height)); });
|
|
531
533
|
return small;
|
|
532
534
|
});
|
|
533
535
|
ok('R11 every control is at least 44 px', t.length === 0, t.join(' | '));
|
|
@@ -70,17 +70,9 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
|
|
|
70
70
|
/* M1 */
|
|
71
71
|
const rail = await p.evaluate(() => ({ names: [...document.querySelectorAll('.rail .pl')].map((b) => b.textContent.trim()), cur: document.querySelector('.rail [aria-current="page"]').textContent.trim(), go: [...document.querySelectorAll('.rail [data-go]')].map((b) => b.dataset.go), pi: getComputedStyle(document.querySelector('.rail')).getPropertyValue('--pi').trim(), title: document.title }));
|
|
72
72
|
ok('M1 the rail names four places, My work is current and the indicator sits on it', rail.names.join() === 'Briefing,My work,Board,Insights' && rail.cur === 'My work' && rail.go.join() === 'brief,work,init,rep' && rail.pi === '1', JSON.stringify(rail));
|
|
73
|
-
{ const tc = await p.evaluate(() => { const a = document.querySelector('#toConsole'); if (!a) return null; const r = a.getBoundingClientRect(); return { href: a.getAttribute('href'), label: a.getAttribute('aria-label'), w: Math.round(r.width), h: Math.round(r.height), tab: a.tabIndex }; }); ok('M1 the
|
|
73
|
+
{ await p.click('#moreBtn'); const tc = await p.evaluate(() => { const a = document.querySelector('#toConsole'); if (!a) return null; const r = a.getBoundingClientRect(); return { href: a.getAttribute('href'), label: a.getAttribute('aria-label'), w: Math.round(r.width), h: Math.round(r.height), tab: a.tabIndex }; }); ok('M1 the ⋯ menu links to the console (premium-console-link, premium-topbar)', tc && tc.href === '/console.html' && tc.label === 'Open the console' && tc.w >= 44 && tc.h >= 44 && tc.tab === 0, JSON.stringify(tc)); await p.keyboard.press('Escape'); }
|
|
74
74
|
const res = await fetch(BASE + '/premium-work').then((r) => r.status);
|
|
75
|
-
|
|
76
|
-
const cal = await until(() => p.evaluate(() => { const b = [...document.querySelectorAll('#weekBody [data-day]')]; return b.length === 5 && !/Reading/.test(document.querySelector('#wkList').textContent) ? { title: document.querySelector('#hWeek').textContent, pressed: b.filter((x) => x.getAttribute('aria-pressed') === 'true').length, list: !!document.querySelector('#wkList .wkd'), fold: document.querySelector('#weekCard .foldb').getAttribute('aria-expanded') } : null; }));
|
|
77
|
-
ok('M13 My work shows the same Calendar card: five day buttons, a day list and a chevron, open at 1280 px', cal && cal.title === 'Calendar' && cal.pressed <= 1 && cal.list && cal.fold === 'true', JSON.stringify(cal));
|
|
78
|
-
const other = await p.evaluate(() => { const b = document.querySelector('#weekBody [data-day][aria-pressed="false"]'); b.click(); return b.dataset.day; });
|
|
79
|
-
ok('M13 pressing a day lists that day', await until(() => p.evaluate((d) => document.querySelector('#weekBody [data-day="' + d + '"]').getAttribute('aria-pressed') === 'true' && !!document.querySelector('#wkList .wkd'), other)));
|
|
80
|
-
await p.click('#weekCard .foldb');
|
|
81
|
-
ok('M13 the chevron hides the card to one line', await p.evaluate(() => document.querySelector('#weekCard').classList.contains('calhid') && getComputedStyle(document.querySelector('#wkList')).display === 'none' && !document.querySelector('#weekCard .folds').hidden));
|
|
82
|
-
await p.click('#weekCard .folds');
|
|
83
|
-
}
|
|
75
|
+
ok('M13 My work has no Calendar card: the Briefing holds the calendar (premium-calendar-card A1)', await p.evaluate(() => !document.querySelector('#weekCard') && ![...document.querySelectorAll('h2')].some((h) => /Calendar|This week/.test(h.textContent))));
|
|
84
76
|
ok('M1 the page is served at /premium-work and /premium-work.html', res === 200 && (await fetch(BASE + '/premium-work.html')).status === 200);
|
|
85
77
|
{
|
|
86
78
|
const r2 = await open(); await r2.page.locator('.rail [data-go="brief"]').click();
|
|
@@ -13,18 +13,26 @@ Every premium page uses the console's type: Space Grotesk for text, IBM Plex Mon
|
|
|
13
13
|
|
|
14
14
|
A rail on the left names four places: Briefing, My work, Board and Insights. Each is a premium page.
|
|
15
15
|
|
|
16
|
-
Every premium page has
|
|
16
|
+
Every premium page has the same top bar. On the left is where you are, then a round **Chat** button. On the right are the **Sources** chip, the bell and one **⋯** menu.
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
- **Chat** opens the read-only agent about the page you are on: the Briefing, My work, the board, or the initiative. On Insights, Chat opens the Insight Studio, because the Studio is that page's chat.
|
|
19
|
+
- **Sources** has a green dot when every source was read recently, and an orange dot when a source is old, was never read, failed, or the page could not read it. Hover to see which. A press opens the Sources dialog (see "Sources" below).
|
|
20
|
+
- **The bell** counts the same things the Briefing lists under what you need to do, and a press opens the Briefing.
|
|
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 an agent session waits on you.
|
|
22
|
+
- **On a phone** the bar is one row: the page name, Chat, the bell and ⋯. Sources moves into the ⋯ menu.
|
|
19
23
|
|
|
20
|
-
|
|
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 with two sections. **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
|
+
**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
|
+
**Agent sessions** in the ⋯ menu shows a count of the sessions running. It opens a dialog that lists each running session and background run with its note, state and start time. **Stop** asks first and says what it ends, then ends the session and closes its terminal. If the session has not exited yet, the row says so and offers Stop again. When a session has asked a question, its row shows the question in the agent's own words with the options it offered; a press sends that option as your answer, and the question leaves the row. A permission request ("Wants to run"), terminals and new sessions stay in the console; the dialog links to it. Answering needs the page's launch nonce, so an agent session cannot call it.
|
|
21
29
|
|
|
22
30
|
## Products
|
|
23
31
|
|
|
24
32
|
You work across products, and a conversation in email, the calendar or Confluence cannot be tied to one product. So the Briefing reads more than one workspace and merges what needs you into one list.
|
|
25
33
|
|
|
26
34
|
- **By default** it reads every registered workspace except the home one (PMOS itself). PMOS is the tool, not a product you manage, so it is left out until you ask.
|
|
27
|
-
- **
|
|
35
|
+
- **Products**, at the top of the **Sources** dialog, lists every registered workspace, the home one included, each with a box. Tick a box to read that workspace, clear it to stop. The button says how many are on, for example "2 of 3". "Back to the default" returns to every workspace except the home one.
|
|
28
36
|
- **Your choice is saved** as the setting `ws.briefing.include` (a list of workspace ids) in this computer's state folder, so it stays when you reload or restart.
|
|
29
37
|
- **A workspace that is not ticked is not read at all.** Its decisions, blocked work, merges and runs do not count in the hero, the list or the dock.
|
|
30
38
|
- **Each row says which product it belongs to**, in a small tag before its line. Two products can hold an initiative or a kill condition of the same name. They stay separate rows, and a press is written into the journal of the product the row names.
|
|
@@ -68,12 +76,9 @@ Two reads feed the page. The quick read takes the kill conditions, the failed-re
|
|
|
68
76
|
|
|
69
77
|
## The header
|
|
70
78
|
|
|
71
|
-
The
|
|
79
|
+
The Briefing's **Sources** dialog has two more parts under the tracked sources. **Products** is the product picker (see "Products"). **What the Briefing read** lists each source the page reads, with its state: **Read**, **Not read**, **Not included** or **Off**, and the reason. Examples: `planning/runs/agent-runs.jsonl` is missing in that repository; the product is not chosen under **Products**; the source is switched off under **Settings → Connectors**; the morning brief could not reach it. A source that cannot be read adds nothing. The page does not guess.
|
|
72
80
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
- **Refresh** reads every included repository again now, without waiting for the 5-minute age. If a read is already running, Refresh does not start a second one. A read that failed is tried again at once. Mail, Jira and the calendar are read by skills, not by Refresh. To refresh them, use **Around you → Data freshness**.
|
|
76
|
-
- **Sources** lists each source that the pill names, with its state: **Read**, **Not read**, **Not included** or **Off**. For each source, it also gives the reason. Examples: `planning/runs/agent-runs.jsonl` is missing in that repository; the product is not chosen under **Products**; the source is switched off under **Settings → Connectors**; the morning brief could not reach it.
|
|
81
|
+
On the Briefing, **Refresh all** also reads every included repository again now, without waiting for the 5-minute age. If a read is already running, it does not start a second one. A read that failed is tried again at once.
|
|
77
82
|
|
|
78
83
|
## The hero sentence
|
|
79
84
|
|
|
@@ -102,7 +107,7 @@ The pin on a row keeps it at the top for this session.
|
|
|
102
107
|
|
|
103
108
|
## Calendar
|
|
104
109
|
|
|
105
|
-
The Calendar card holds the week and the day. Its top row is a strip of Monday to Friday: each day shows its meeting time from the calendar PMOS holds, and blocks for items done and due that day from your list. Today is picked when the page opens. Press another day to list its meetings; press today to come back.
|
|
110
|
+
The Calendar card holds the week and the day. Its top row is a strip of Monday to Friday: each day shows its meeting time from the calendar PMOS holds, and blocks for items done and due that day from your list. Today is picked when the page opens. Press another day to list its meetings; press today to come back. My work has no calendar: this card is the one place it shows.
|
|
106
111
|
|
|
107
112
|
The chevron in the card header hides the card down to one line: the next meeting today (or "Nothing more today"), the week's meeting count and the items due. Press the line or the chevron to show the card again. The page remembers this in this browser. With nothing remembered, the card starts open on a computer and hidden on a phone.
|
|
108
113
|
|
|
@@ -202,8 +207,6 @@ The Start button on a blocked row stays off. Starting an agent that writes needs
|
|
|
202
207
|
|
|
203
208
|
My work is the second place on the rail, at `/premium-work.html`. It reads the list the Work page reads, so the two pages show one list, and every press uses the Work page's own route. It adds no writer of its own.
|
|
204
209
|
|
|
205
|
-
**Calendar.** The same Calendar card as on the Briefing sits at the top of the right column. Its strip shows Monday to Friday. Each day has a grey bar for its meeting time, from your calendar, with black blocks for items done that day and orange hatched blocks for items due, from your list (at most three of each; they count items, not hours). A legend names the three. If PMOS cannot read the calendar, the card says so and draws no meeting bar. The mockup's hours done, hours free, warning line and Move to Friday need an estimate per item and working hours, which PMOS does not hold, so they are not drawn. It makes no "will not fit" note, because no item has a size and PMOS holds no working hours. Press a day to list its meetings below the strip; here the rows are for reading only. The chevron hides the card, as on the Briefing.
|
|
206
|
-
|
|
207
210
|
**Row suggestions and buttons.** A row shows a suggestion line only when a record backs it: an agent's offer on the item, a draft that is ready, or a date. A row has no button of its own. Press the row to open the item, where you review a draft, start the agent, or give the item a day. To act without opening it, swipe the row or press the right or left arrow key. A row in Today goes to Done (or opens its draft when one is ready) on the right and to Tomorrow on the left. Any other row goes to Today on the right and to Someday on the left. A row from Jira shows its Jira key.
|
|
208
211
|
|
|
209
212
|
**Weekly review.** A card lists five steps: sort the inbox, place what you added, check who owes you, review agent drafts, and look at what sat untouched. Each step shows a count from your list and opens its first item. **Start the review** opens the first step that has something. On a Friday the card reads Friday review. PMOS keeps no review schedule and no timing, so the card shows none. Answers, ideas and reports an agent files by itself are not shown, because PMOS holds no records for them.
|
|
@@ -246,9 +249,9 @@ Board is the third place on the rail, at `/premium-board.html`. It reads what th
|
|
|
246
249
|
- **List** and **Timeline** show ten tasks a page with Previous and Next; **By stage** shows six cards a column with Show more. **Timeline** draws a bar for each initiative that has both a start and an end date, with the days left or over, and counts the rest. With no dates on record it says so and draws nothing.
|
|
247
250
|
- **Sprint** appears when an agent session has read Jira for the board. Otherwise it says there is none. **Coming up** shows the next release, from the releases ledger.
|
|
248
251
|
- **Metrics** appears above the Initiatives card on the board of any workspace except the home one (PMOS itself), and counts from that workspace's own repository. It has four tiles. **Corrections per 100 runs** is the corrections logged on the week's runs in `planning/runs/agent-runs.jsonl`; a week with fewer than 10 runs is left blank. **Merged a week** counts the commits on the first-parent line of the trunk. **Blocked** and **Idle for a month** come from the workflow engine, which keeps no history. From the first day the card is read, PMOS keeps their counts once a day in the workspace's state folder (`board-metric-history.jsonl`), so their charts start on that day and their caption says **history starts today** (later, the date). Earlier weeks read **Not kept yet**. Move over a chart, or use the arrow keys, to read a week. A tile that cannot be counted says **Not read** and why; a repository with no run log says **No runs yet**. The line above the tiles starts with how many tiles need a look, and those tiles have a **Needs a look** chip and an orange outline. The line ends with **open Insights**, which opens the same board's Insights page. Press a tile for its definition and values, with the read-only agent beside it. A target is set on Insights, not here. A measure with a target shows it under the value, draws it as a dashed line, and carries **On target** or its gap (for example **2 short**); off target, it also has the orange outline. A measure without a target draws no line. Day and Month are off. It was tested only on made-up repositories, not on a real IDPF or microsite repository.
|
|
249
|
-
- **The
|
|
252
|
+
- **The top bar** names the page and the board. With more than one board a menu switches between them, and **Chat** opens the board in the dialog with the read-only agent.
|
|
250
253
|
- **Core documents** lists the board's documents with their state, cadence and writer, a summary (drafts to review, not started, up to date), a progress bar, a filter and a search. A document with a file opens in the dialog, read only, with its path and state; a draft there has **Issue it**, which marks it issued through the console's own route and sends nothing, and **Draft it again**, which starts a new draft that replaces this one (a board draft has no Edit tab). **Draft it** starts the existing read-only run that writes a draft and sends nothing; **Draft the N not started** does that for each document that can be drafted. **Set it up** and **Open** go to the console. **Add a document** opens a form (title, who writes it, where it lives) and saves a document the core set does not cover on the board's record, in `custom-docs.jsonl`. A document with no link reads "Not started". A document with a link to Confluence or Google Docs reads "Linked" and shows its address. PMOS does not read or sync the linked page, so a linked document is never counted as up to date. Issue and Drop are not on this page.
|
|
251
|
-
- **Opening an initiative.** A click on an initiative opens its page (see "Initiative page").
|
|
254
|
+
- **Opening an initiative.** A click on an initiative opens its page (see "Initiative page"). **Open initiatives** (Page or Popup) in the ⋯ menu changes that: Popup opens the initiative's dialog instead, which shows its record as a grid and the path of its file, with the read-only agent beside it. The choice is kept in this browser. The dialog holds no press.
|
|
252
255
|
- **New asks** sits at the top of the right column on a team board. Each ask shows where it came from and the drafted title, lane and anchor. **Accept** makes it an initiative in the first stage, through the console's accept route; **Decline** asks for a reason first. The card says when nothing is left to triage.
|
|
253
256
|
- **New initiative** (beside the Initiatives heading, team boards only) asks for a title, a lane and an anchor (a KR or a health budget). It writes an ask and accepts it, as the console does. An unanchored initiative is refused on the page.
|
|
254
257
|
- **⋯ on a row** (and the bar under an initiative page's heading) moves it to the next or another stage, puts it on hold with a reason and a check-back day, cancels it with a reason, or archives it. Each press writes one line through the console's route, says what it recorded, and offers Undo for a few seconds. An on-hold row offers Resume; a cancelled one offers Reopen; an archived one offers Restore. Cancelled and archived initiatives leave the list and sit under a fold below it. On the PMOS board the workflow engine places each initiative, so the moves are not offered and New asks and New initiative are hidden.
|
|
@@ -258,10 +261,10 @@ Not drawn, because PMOS holds no record for them: the mockup's demo measures (Ac
|
|
|
258
261
|
|
|
259
262
|
## Initiative page
|
|
260
263
|
|
|
261
|
-
The initiative page is at `/premium-initiative.html?id=<initiative>`. A click on a Board initiative opens it. The
|
|
264
|
+
The initiative page is at `/premium-initiative.html?id=<initiative>`. A click on a Board initiative opens it. The round back button at the top leads back to the Board. Like the Board it reads the records of the production Initiatives sheet, and the first read takes a few seconds, because the routes derive every initiative. Until they have, the page says so and shows nothing.
|
|
262
265
|
|
|
263
|
-
- **The
|
|
264
|
-
-
|
|
266
|
+
- **The top bar** has a back button to the board, then the initiative's name with a menu of the board's initiatives. **Chat** opens the initiative in the dialog with the read-only agent beside it.
|
|
267
|
+
- Long file names in the evidence of a check wrap inside the card instead of running past its edge.
|
|
265
268
|
- **The header** shows a status chip, the owner and the planned finish. Each appears only when a record holds it. Under it, the stage strip shows how far through the board's workflow the initiative is.
|
|
266
269
|
- **Overview** shows the description (the part of the record's title after " — "), then the next step with its reason, its action and what happens if you wait, as the workflow engine states them, and who it waits on. **PMOS can help** offers up to three presses that do something real: a draft of the first core document not started (the existing read-only run) and a question for the read-only agent. The health reasons and the board's warnings are shown as written.
|
|
267
270
|
- **Overview** is one full-width card, as in the mockup; there is no separate Checks card. A blocked step shows as a note, and "All N workflow steps" lists every step of the engine with the evidence each states.
|
|
@@ -277,7 +280,7 @@ Insights is the fourth place on the rail, at `/premium-insights.html`. It reads
|
|
|
277
280
|
|
|
278
281
|
- **Charts.** One chart for each KR metric that holds at least two readings. The line runs through the readings at their dates, so a month with no reading is a gap and not a zero. The dashed line is the metric's target. The chip is the record's own line status: on its line, behind it, or well behind it. Pressing a chart, or its Details link, opens the metric's record in the dialog with the read-only agent beside it.
|
|
279
282
|
- **Dashboards.** The switch lists All measures first, then your saved dashboards (the main one first, marked Main), then the pillars the metrics name. A saved dashboard draws its charts in the order you saved them. A chart whose record is gone, or that has fewer than two readings, is listed in its place with the reason and is not drawn.
|
|
280
|
-
- **Open the Studio from the top.**
|
|
283
|
+
- **Open the Studio from the top.** **Chat** beside the board name opens the Insight Studio: on the saved dashboard you are looking at, otherwise on a new dashboard, or in Report mode when no measure has a series yet.
|
|
281
284
|
- **Make or edit a dashboard.** **New dashboard**, or **Edit** on a saved one, opens the **Insight Studio**, a wide dialog. On the right, the brief shows the Name, Purpose, Charts and Main dashboard; press a chip to change it. **Library** lists the board's measures and saved dashboards to add. The preview draws the dashboard as the page will, and lists a measure with no series as not drawn. The checks (a name, a purpose, a chart, six or fewer, no repeat, a main dashboard on the board) say what fails, with a one-press fix. On the left you can say it instead: "add Partner activation", "remove …", "move … first", "call it …", "it is for …", "make it the main dashboard", "undo" or "start a new one". A turn changes the draft only. **Undo** steps back one change. **Save the dashboard** records it; **Remove the dashboard** asks once more and then removes it. In a chart's dialog, **On your dashboards** has a switch for each saved dashboard, which adds the chart to it or takes it off.
|
|
282
285
|
- **Make your own chart.** **New chart**, or **Edit** on one of your charts, opens the Insight Studio in **Chart** mode; the switch at the top moves between Chart and Dashboard, and each keeps its own draft. The brief shows the Question, Measure, Form (line, bars, number or meter), Range (all readings or the last few) and Target; **More** adds the Title, Better when, Note and Add to (a dashboard). The Studio suggests a form from the question and says why. The checks (a question, a target, enough readings, a form that fits the question, one scale) say what fails, with a one-press fix. You can say it instead: "show it as bars", "last 4 readings", "target 35", "lower is better", "call it …", "note: …", "add it to Weekly", or a question. A pie is declined, with the reason. **Save the chart** records it in the workspace's state folder, and adds it to the dashboard you named. Your charts are listed under **All measures**, and a dashboard can hold them beside the measures. **Remove the chart** asks once more; a dashboard that held it then says it was removed.
|
|
283
286
|
- **Set up a report in the Studio.** **New report** on the Reports card opens the Insight Studio in **Report** mode. The brief shows the Title, What it answers, Audience, Format, Schedule, Draw from (your work, or the board's dashboard) and the Sections. A new report always has the same sections, in the same order, so they are listed, not edited. The checks (what it answers, an audience, a format that fits the audience, a new title, the answer first) say what fails, with a one-press fix. You can say it instead: "it answers: …", "for leadership", "slides", "monthly", "every two weeks on Thursday", "call it …". **Set it up** records the report and writes its first draft as a file.
|
|
@@ -308,7 +311,7 @@ Welcome is the premium first-run page, at `/premium-welcome.html`. It is a page
|
|
|
308
311
|
|
|
309
312
|
## The default page
|
|
310
313
|
|
|
311
|
-
The premium Briefing is the default page: `/` and `/index.html` open it. The console is at `/console.html`, and
|
|
314
|
+
The premium Briefing is the default page: `/` and `/index.html` open it. The console is at `/console.html`, and **Console** in the ⋯ menu 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.
|
|
312
315
|
|
|
313
316
|
## The dialog on a phone and the document sheet's views
|
|
314
317
|
|
|
@@ -49,6 +49,11 @@ function threadOf(runtimeDir, key, now = Date.now()) {
|
|
|
49
49
|
/** The row as the server's own model has it, plus the files an answer should start from. null when the key names no row on the page. */
|
|
50
50
|
function rowFor(model, key) {
|
|
51
51
|
if (!model || !KEY_RE.test(String(key || ''))) return null;
|
|
52
|
+
if (/^(src|work):this-page$/.test(key)) { // the top bar's Chat: the whole page is the context, its summary and its first rows
|
|
53
|
+
const rows = model.rows || (model.list && model.list.rows) || [];
|
|
54
|
+
const say = (model.hero || []).map((s) => (s.parts || []).map((p) => p.t).join('')).join(' ');
|
|
55
|
+
return { title: key === 'work:this-page' ? 'The My work page' : 'The Briefing page', subject: clip(model.header && model.header.text, 240), say: clip(say, 600), facts: rows.slice(0, 12).map((r) => clip(r.kind || r.list || 'item', 40) + ': ' + clip(r.title, 240)), files: [] };
|
|
56
|
+
}
|
|
52
57
|
if (/^(work|board|init|doc|ins):/.test(key)) { // a My work item, a Board initiative, an Insights measure, an initiative page or one of its documents: the item's own record is the context
|
|
53
58
|
const w = (model.rows || []).find((r) => r.key === key); if (!w) return null;
|
|
54
59
|
const d = w.dialog || {};
|
|
@@ -189,7 +189,7 @@ function build(facts) {
|
|
|
189
189
|
const off = offOf(charts);
|
|
190
190
|
const board = f.board || {};
|
|
191
191
|
const model = {
|
|
192
|
-
header: { text: (f.pending ? 'Reading the records · ' : '') + 'Real data' + (missing.length ? ' · not read: ' + missing.join(', ') : '') },
|
|
192
|
+
header: { text: (f.pending ? 'Reading the records · ' : '') + 'Real data' + (missing.length ? ' · not read: ' + missing.join(', ') : ''), missing },
|
|
193
193
|
board: { ws: board.ws || null, id: board.id || null, name: board.name || 'Insights', switcher: (f.boards || []).map((b) => ({ ws: b.ws, id: b.id, name: b.name })) },
|
|
194
194
|
charts, mine, mineGone, mineSaved: mineAll, noSeries, dashboards, rows: charts,
|
|
195
195
|
findings: findings.length ? findings : [{ kind: 'calm', key: null, text: charts.length ? (charts.some((c) => c.target !== null) ? 'Nothing stands out. No measure moved much, and none is far behind its line.' : 'Nothing stands out. No measure here has a target, so the series can only be described.') : '' }],
|
|
@@ -93,28 +93,6 @@ function suggestOf(it, list, today, overdue) {
|
|
|
93
93
|
return { sug, cta };
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
/** This week, Monday to Friday, from three records: the meetings the calendar holds, the items marked done that day, and the open items with that due date.
|
|
97
|
-
* No effort, capacity or "won't fit" figure is made: no item carries a size and PMOS holds no working hours. */
|
|
98
|
-
function weekOf({ today, items, events }) {
|
|
99
|
-
const base = isoDay(today);
|
|
100
|
-
const dow = (base.getDay() + 6) % 7;
|
|
101
|
-
const iso = (d) => d.getFullYear() + '-' + pad(d.getMonth() + 1) + '-' + pad(d.getDate());
|
|
102
|
-
const days = [0, 1, 2, 3, 4].map((i) => { const d = new Date(base.getFullYear(), base.getMonth(), base.getDate() - dow + i); return { iso: iso(d), dow: WEEKDAYS[d.getDay()].slice(0, 3).toUpperCase(), n: d.getDate() }; });
|
|
103
|
-
const read = Array.isArray(events);
|
|
104
|
-
for (const d of days) {
|
|
105
|
-
const ev = read ? events.filter((e) => String(e.at || '').slice(0, 10) === d.iso) : [];
|
|
106
|
-
d.meetings = ev.length;
|
|
107
|
-
d.meet_min = ev.reduce((a, e) => { const m = Date.parse(e.end) - Date.parse(e.at); return a + (m > 0 && m < 86400000 ? Math.round(m / 60000) : 0); }, 0);
|
|
108
|
-
d.done = items.filter((it) => it.done && String(it.done_at || '').slice(0, 10) === d.iso).length;
|
|
109
|
-
d.due = items.filter((it) => !it.done && it.due === d.iso).length;
|
|
110
|
-
d.today = d.iso === today; d.past = d.iso < today;
|
|
111
|
-
}
|
|
112
|
-
const tot = (k) => days.reduce((a, d) => a + d[k], 0);
|
|
113
|
-
const bits = [read ? tot('meetings') + ' ' + plural(tot('meetings'), 'meeting', 'meetings') : null, tot('done') + ' done', tot('due') + ' due'].filter(Boolean);
|
|
114
|
-
return { title: 'This week', cap: bits.join(' · '), days, calendar: read,
|
|
115
|
-
note: (read ? 'The grey bar is meeting time from your calendar. ' : 'The calendar could not be read, so there is no meeting bar. ') + 'Each Done block is an item done that day and each Due block an item due, up to three of each; they count items, not hours. PMOS holds no estimate or working hours, so it does not say what will not fit.' };
|
|
116
|
-
}
|
|
117
|
-
|
|
118
96
|
/** The weekly review: a count and a first item for each place the PM sorts things. Every figure is a count of the list. No step time is made: PMOS does not time a review. */
|
|
119
97
|
function fridayOf({ today, work, tray, ready, review }) {
|
|
120
98
|
const first = (a) => (a[0] ? 'work:' + (a[0].it ? a[0].it.id : a[0].id) : null);
|
|
@@ -168,7 +146,7 @@ function rowOf(it, list, v, inReview, focusIds) {
|
|
|
168
146
|
};
|
|
169
147
|
}
|
|
170
148
|
|
|
171
|
-
function build({ v, now
|
|
149
|
+
function build({ v, now }) {
|
|
172
150
|
now = now || Date.now();
|
|
173
151
|
v = v || {};
|
|
174
152
|
const today = v.today || new Date(now).toISOString().slice(0, 10);
|
|
@@ -266,7 +244,6 @@ function build({ v, now, events }) {
|
|
|
266
244
|
dock: { needs: clear, label: 'to clear', next: firstToday ? firstToday.title : (sections[0].rows[0] ? sections[0].rows[0].title : null) },
|
|
267
245
|
queue,
|
|
268
246
|
friday: fridayOf({ today, work, tray, ready, review: v.review || [] }),
|
|
269
|
-
week: weekOf({ today, items: v.items || all.map((x) => x.it), events }),
|
|
270
247
|
focus, jobs,
|
|
271
248
|
rows: rowsAll,
|
|
272
249
|
};
|
|
@@ -75,7 +75,7 @@ async function post(req, res, url, ctx) {
|
|
|
75
75
|
}
|
|
76
76
|
if (act === 'ask') {
|
|
77
77
|
let wsId; try { const w = merged && sk ? { id: sk.ws } : ctx.getWs && ctx.getWs(url.searchParams.get('ws') || null); wsId = w && w.id; } catch { wsId = undefined; }
|
|
78
|
-
const a = Ag.ask({ runtimeDir, key: b.key, text: b.text, model: /^work:/.test(String(b.key || '')) ? WP.peekModel() : /^board:/.test(String(b.key || '')) ? BoardP.peekModel() : /^ins:/.test(String(b.key || '')) ? InsP.peekModel() : /^(init|doc):/.test(String(b.key || '')) ? InitP.peekModel() : sk || /^src:/.test(String(b.key || '')) ? Prod.peekModel() : BP.peekModel(root), spawnSession: ctx.spawnSession, wsId });
|
|
78
|
+
const a = Ag.ask({ runtimeDir, key: b.key, text: b.text, model: /^work:/.test(String(b.key || '')) ? WP.peekModel() : /^board:/.test(String(b.key || '')) ? BoardP.peekModel() : /^ins:/.test(String(b.key || '')) ? InsP.peekModel() : /^(init|doc):/.test(String(b.key || '')) ? InitP.peekModel() : sk || (/^src:/.test(String(b.key || '')) && !(b.key === 'src:this-page' && url.searchParams.get('ws'))) ? Prod.peekModel() : BP.peekModel(root), spawnSession: ctx.spawnSession, wsId });
|
|
79
79
|
ctx.json(res, a.body, a.status);
|
|
80
80
|
return true;
|
|
81
81
|
}
|
|
@@ -23,10 +23,8 @@ module.exports = {
|
|
|
23
23
|
let v = null, err = null;
|
|
24
24
|
try { v = await listView(req, ctx); } catch (e) { err = String((e && e.message) || e).slice(0, 200); }
|
|
25
25
|
if (!v || v.ok === false) { ctx.json(res, { ok: false, state: 'error', error: err || (v && v.error) || 'the list could not be read' }, 500); return true; }
|
|
26
|
-
let events = null;
|
|
27
|
-
try { events = require('./calendar-events.js').readAll(ctx.runtimeDir, { now: Date.now() }); } catch { events = null; }
|
|
28
26
|
let model;
|
|
29
|
-
try { model = WP.build({ v, now: Date.now()
|
|
27
|
+
try { model = WP.build({ v, now: Date.now() }); } catch (e) { ctx.json(res, { ok: false, state: 'error', error: 'the page could not be built: ' + String((e && e.message) || e).slice(0, 160) }, 500); return true; }
|
|
30
28
|
ctx.json(res, { ok: true, state: 'ready', model, as_of: Date.now() });
|
|
31
29
|
return true;
|
|
32
30
|
},
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmos-workspace",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.319.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.319.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@xterm/addon-fit": "^0.11.0",
|
package/workspace/package.json
CHANGED