create-pmos 0.844.0 → 0.845.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-pmos",
3
- "version": "0.844.0",
3
+ "version": "0.845.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": {
@@ -33,6 +33,20 @@
33
33
  "audit"
34
34
  ],
35
35
  "pmosChanges": [
36
+ {
37
+ "v": "0.845.0",
38
+ "at": "2026-11-25T18:02:38.683Z",
39
+ "f": 4,
40
+ "prs": [
41
+ {
42
+ "n": 2041,
43
+ "t": "Main's browser reds — stage-card-tasks, adddoc, task-views, task-press T3, vw-jira dark, viewer-trail, vw-rec and day-run hold under load",
44
+ "s": "Main's browser reds — stage-card-tasks, adddoc, task-views, task-press T3, vw-jira dark, viewer-trail, vw-rec and day-run hold under load",
45
+ "k": "fix",
46
+ "i": "ci-main-unblock"
47
+ }
48
+ ]
49
+ },
36
50
  {
37
51
  "v": "0.844.0",
38
52
  "at": "2026-11-25T17:36:00.349Z",
@@ -43,6 +57,7 @@
43
57
  "t": "Copy and layout tests on an initiative, drafted from plain words (job #1905, A351)",
44
58
  "s": "Copy and layout tests on an initiative, drafted from plain words (job #1905, A351)",
45
59
  "k": "new",
60
+ "i": "copy-tests",
46
61
  "h": "Copy and layout tests on an initiative, drafted from plain words (job #1905, A351)",
47
62
  "try": {
48
63
  "steps": [
@@ -52,14 +67,14 @@
52
67
  ],
53
68
  "see": "With nothing typed in the chat, the Copy test block shows its ✦ offer; ✦ drafts A against B with Undo. Then a Copy test block with one table (Variant, Copy, the rate and how sure), one ✦ line such…",
54
69
  "open": "/premium-board.html"
55
- },
56
- "i": "copy-tests"
70
+ }
57
71
  },
58
72
  {
59
73
  "n": 2027,
60
74
  "t": "Events says what to bring on each meeting (job #2012, TbEvents)",
61
75
  "s": "Events says what to bring on each meeting (job #2012, TbEvents)",
62
76
  "k": "new",
77
+ "i": "tb-events-bring",
63
78
  "h": "Events says what to bring on each meeting (job #2012, TbEvents)",
64
79
  "try": {
65
80
  "steps": [
@@ -69,14 +84,14 @@
69
84
  ],
70
85
  "see": "Each meeting tied to your work says what to bring, for example \"Bring two calls: …\", naming dates that Events lists; a meeting with nothing to decide says \"Nothing new for this one yet.\"; focus time…",
71
86
  "open": "/premium-events.html"
72
- },
73
- "i": "tb-events-bring"
87
+ }
74
88
  },
75
89
  {
76
90
  "n": 1958,
77
91
  "t": "What each initiative and merged pull request cost, and a pause for a stall (job #1906)",
78
92
  "s": "What each initiative and merged pull request cost, and a pause for a stall (job #1906)",
79
93
  "k": "new",
94
+ "i": "initiative-cost",
80
95
  "h": "What each initiative and merged pull request cost, and a pause for a stall (job #1906)",
81
96
  "try": {
82
97
  "steps": [
@@ -86,14 +101,14 @@
86
101
  ],
87
102
  "see": "One row per initiative the factory worked on: agent hours, spend in dollars and how many pull requests merged. An initiative that spent for 7 days with no merge shows one ✦ asking to pause its jobs.…",
88
103
  "open": "/premium-board.html?work=cost"
89
- },
90
- "i": "initiative-cost"
104
+ }
91
105
  },
92
106
  {
93
107
  "n": 2022,
94
108
  "t": "This sprint's Summary card with a ✦ sentence per count, Ticket and Epic columns (job #2018)",
95
109
  "s": "This sprint's Summary card with a ✦ sentence per count, Ticket and Epic columns (job #2018)",
96
110
  "k": "new",
111
+ "i": "tb-sprint-balanced",
97
112
  "h": "This sprint, with a Summary that says what is going on",
98
113
  "try": {
99
114
  "steps": [
@@ -103,8 +118,7 @@
103
118
  ],
104
119
  "see": "The Summary card gives the same To do, In progress and Done counts as the Tasks tabs, all work in the sprint's dates, Jira and not. Each count with work has one ✦ sentence written from the tickets,…",
105
120
  "open": "/premium-board.html"
106
- },
107
- "i": "tb-sprint-balanced"
121
+ }
108
122
  }
109
123
  ]
110
124
  },
@@ -1060,54 +1074,6 @@
1060
1074
  "i": "report-three-audiences"
1061
1075
  }
1062
1076
  ]
1063
- },
1064
- {
1065
- "v": "0.822.0",
1066
- "at": "2026-11-25T09:18:15.859Z",
1067
- "f": 4,
1068
- "prs": [
1069
- {
1070
- "n": 1880,
1071
- "t": "Pmos hire drafts the next hire from the work that waits (job #1876)",
1072
- "s": "Pmos hire drafts the next hire from the work that waits (job #1876)",
1073
- "k": "new",
1074
- "i": "next-hire-draft",
1075
- "h": "Pmos hire drafts the next hire from the work that waits (job #1876)",
1076
- "try": {
1077
- "steps": [
1078
- "Open Today and ask the chat: draft the next hire",
1079
- "Open the file it names, under planning/hires",
1080
- "Read the role, why now, the 90-day outcomes and the work it takes"
1081
- ],
1082
- "see": "One page names the role most loaded or missing (open tasks and waiting asks per person, or work with no owner), why now with the numbers, three outcomes for 90 days from the initiatives that carry…",
1083
- "open": "/today.html"
1084
- }
1085
- },
1086
- {
1087
- "n": 1869,
1088
- "t": "A stage's sign-offs reach You on Today (job #1861, Factory page slice A)",
1089
- "s": "A stage's sign-offs reach You on Today (job #1861, Factory page slice A)",
1090
- "k": "new",
1091
- "i": "factory-signoffs-reach-you"
1092
- },
1093
- {
1094
- "n": 1886,
1095
- "t": "Pmos ai worth puts each run kind's cost beside what was kept (job #1884)",
1096
- "s": "Pmos ai worth puts each run kind's cost beside what was kept (job #1884)",
1097
- "k": "new",
1098
- "i": "worth-it-by-kind",
1099
- "h": "Pmos ai worth puts each run kind's cost beside what was kept (job #1884)",
1100
- "try": {
1101
- "steps": [
1102
- "Open Today and ask the chat: is each kind of AI run worth what it costs?",
1103
- "Read the line for each kind: its runs and cost this month, and what you kept of its work",
1104
- "Find any kind marked costs most, kept least"
1105
- ],
1106
- "see": "One line per kind of background run: its runs and cost this month, and how many of its ✦ proposals you kept of those you decided. A kind that costs a large share and is kept less than half the time…",
1107
- "open": "/today.html"
1108
- }
1109
- }
1110
- ]
1111
1077
  }
1112
1078
  ]
1113
1079
  }
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@a76055a1e
1
+ kernel-source: pmos@4669bd89c
2
2
  assembled: 2026-11-25
3
3
  mode: vendor
@@ -2,7 +2,7 @@
2
2
  type: Reference
3
3
  title: "Eval calibration log"
4
4
  description: "Append-only record of every PM override of an evaluator verdict."
5
- generated: {by: process:create-pmos, at: "2026-11-25T17:35:56Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-25T18:02:34Z"}
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-11-25T17:35:56Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-25T18:02:34Z"}
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-11-25T17:35:56Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-25T18:02:34Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -87,15 +87,19 @@ function probe(port, ms = PROBE_MS) {
87
87
  // old 5 s limit made `pmos proactive day show` say the server was not running (day-run D8b, 2026-11-25). The same commands find the
88
88
  // server with discover(API_TIMEOUT_MS): the 2.5 s launcher probe alone still read a busy server as not running (Checker, 2026-11-25).
89
89
  const API_TIMEOUT_MS = 30000;
90
+ // Why the last request answered nothing: 'timeout', a socket error code (ECONNREFUSED: no server), or 'not JSON (HTTP n)'.
91
+ // A command says which, so "not running" is said only when nothing listens (lib/proactive-cli.js).
92
+ let LAST_API_ERR = null;
90
93
  function api(port, method, pathname, body, extraHeaders) {
94
+ LAST_API_ERR = null;
91
95
  return new Promise((res) => {
92
96
  const data = body ? JSON.stringify(body) : null;
93
97
  const req = http.request(`${urlOf(port)}${pathname}`, {
94
98
  method, timeout: API_TIMEOUT_MS,
95
99
  headers: { ...(data ? { 'Content-Type': 'application/json', 'Content-Length': Buffer.byteLength(data) } : {}), ...(extraHeaders || {}) },
96
- }, (r) => { let b = ''; r.on('data', (c) => (b += c)); r.on('end', () => { try { res(JSON.parse(b)); } catch { res(null); } }); });
97
- req.on('error', () => res(null));
98
- req.on('timeout', () => { req.destroy(); res(null); });
100
+ }, (r) => { let b = ''; r.on('data', (c) => (b += c)); r.on('end', () => { try { res(JSON.parse(b)); } catch { LAST_API_ERR = 'not JSON (HTTP ' + r.statusCode + ')'; res(null); } }); });
101
+ req.on('error', (e) => { if (!LAST_API_ERR) LAST_API_ERR = (e && e.code) || 'error'; res(null); });
102
+ req.on('timeout', () => { LAST_API_ERR = 'timeout'; req.destroy(); res(null); });
99
103
  if (data) req.write(data);
100
104
  req.end();
101
105
  });
@@ -608,7 +612,7 @@ function doctor() {
608
612
  else if (cmd === 'proactive') {
609
613
  const port = await serverPort();
610
614
  code = await require('../lib/proactive-cli').run(process.argv.slice(2), {
611
- say, call: async (m, p, b) => (port ? pressApi(port, m, p, b) : null) });
615
+ say, call: async (m, p, b) => (port ? pressApi(port, m, p, b) : null), port, why: () => LAST_API_ERR });
612
616
  }
613
617
  else if (cmd === 'kg') {
614
618
  // Reads tracked .md files straight from disk (lib/kg-cli.js); needs no running server.
@@ -16,7 +16,9 @@ const BASE = T.BASE;
16
16
  // the phone design (Ph2_init): a phone shows an initiative as the popup's phone page; the old page is ⋯ › Every part
17
17
  const everyPart = async (pg) => { await pg.waitForSelector('#czViewer .pw-ph', { state: 'attached', timeout: 20000 }); await pg.evaluate(() => { const r = (window.__czVwMore ? window.__czVwMore(document.body) : []).find((x) => x.label === 'Every part'); if (r) r.go(); }); await pg.waitForTimeout(800); };
18
18
  const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
19
- const until = async (fn, ms = 10000, step = 100) => { const t0 = Date.now(); for (;;) { const v = await fn(); if (v) return v; if (Date.now() - t0 > ms) return v; await sleep(step); } };
19
+ // 30 s by default: every wait here is for something to show, and with four browser suites at once on 4 cores the Viewer's
20
+ // form and redraws took over 10 s (2026-11-25); a pass returns as soon as it shows
21
+ const until = async (fn, ms = 30000, step = 100) => { const t0 = Date.now(); for (;;) { const v = await fn(); if (v) return v; if (Date.now() - t0 > ms) return v; await sleep(step); } };
20
22
  const results = [];
21
23
  const ok = (name, cond, extra = '') => { results.push({ name, cond: !!cond }); console.log(`${cond ? '✓' : '✗'} ${name}${!cond && extra !== '' ? ' — ' + extra : ''}`); };
22
24
  let srv = null; let browser = null;
@@ -59,9 +61,12 @@ const PAGES = {
59
61
  await page.route('**/api/briefing-premium/**', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, turns: [], working: false }) }));
60
62
  await page.goto(BASE + P.file + P.qs + theme);
61
63
  if (w <= 760 && kind === 'initiative') await everyPart(page);
62
- let up = await until(() => page.evaluate((s) => !!document.querySelector(s), P.ready), 20000);
63
- if (up && kind === 'initiative') { /* the page holds the Tasks (batch 11 item 20) */ await docsView(page); up = await until(() => page.evaluate((s) => !!document.querySelector(s), P.btn), 20000); } // the Overview holds the button
64
- return { ctx, page, errors, posts, up, calls: () => calls, setCustom: (c) => { current = c; }, reply: (a) => { reply = a; } };
64
+ // 40 s, not 20: with four browser suites at once on 4 cores the first draw of today.html can take over 20 s (2026-11-25)
65
+ let up = await until(() => page.evaluate((s) => !!document.querySelector(s), P.ready), 40000);
66
+ if (up && kind === 'initiative') { /* the page holds the Tasks (batch 11 item 20) */ await docsView(page); up = await until(() => page.evaluate((s) => !!document.querySelector(s), P.btn), 40000); } // the Overview holds the button
67
+ // when it did not draw: what was on screen, so a failure says which step stopped
68
+ const seen = up ? '' : await page.evaluate(() => { const v = document.querySelector('#czViewer'); return JSON.stringify({ url: location.pathname + location.search, viewer: v ? (v.hidden ? 'hidden' : 'open') : 'none', mc: !!document.querySelector('#czViewer .iv-mc'), views: [...document.querySelectorAll('#czViewer [data-hi-v], #czViewer [data-hi-view]')].map((x) => x.dataset.hiV || x.dataset.hiView), head: ((v && v.querySelector('.cz-vw-hd')) || {}).textContent || '' }); }).catch((e) => String(e));
69
+ return { ctx, page, errors, posts, up, seen, calls: () => calls, setCustom: (c) => { current = c; }, reply: (a) => { reply = a; } };
65
70
  };
66
71
  const txt = (p, s) => p.evaluate((q) => (document.querySelector(q) || {}).textContent || '', s);
67
72
  const viaMore = async (pg, label) => { await pg.click('#czViewer:not([hidden]) [data-cz-vw="more"]'); await until(() => pg.evaluate(() => !!document.querySelector('#czViewer .cz-vw-menu'))); await pg.click(`#czViewer .cz-vw-menu [role="menuitem"]:has(> span:first-child:text-is("${label}"))`); }; // the Overview's other views, Open the full record and Sprint sit under ⋯ (XvATasks)
@@ -69,7 +74,7 @@ const PAGES = {
69
74
  // Documents is shell A (XvADocs): Add a document is under its ⋯, with Group by and Show
70
75
  async function addDoc(page) { await page.click('#czViewer [data-cz-vw="more"]'); await page.click('#czViewer .cz-vw-menu button:has-text("Add a document")'); }
71
76
  // the initiative's page (canvas HbC): its Documents' "Show all N" drills into the Documents view
72
- async function docsView(page) { if (await until(() => page.evaluate(() => !!document.querySelector('#czViewer:not([hidden]) [data-hi-v]')), 20000)) await (async (pg) => { if (await pg.$('#czViewer [data-hi-v="page"] [data-iv-docs]')) await pg.click('#czViewer [data-iv-docs]'); else if (await pg.$('#czViewer [data-hi-view="docs"]')) await pg.click('#czViewer [data-hi-view="docs"]'); else await viaMore(pg, 'Documents'); })(page); }
77
+ async function docsView(page) { if (await until(() => page.evaluate(() => !!document.querySelector('#czViewer:not([hidden]) [data-hi-v]')), 40000)) await (async (pg) => { if (await pg.$('#czViewer [data-hi-v="page"] [data-iv-docs]')) await pg.click('#czViewer [data-iv-docs]'); else if (await pg.$('#czViewer [data-hi-view="docs"]')) await pg.click('#czViewer [data-hi-view="docs"]'); else await viaMore(pg, 'Documents'); })(page); }
73
78
 
74
79
  /* the Board had its own Add a document on its Documents tab; batch 24 item 7 took that tab off the Board, so only the initiative's is checked */
75
80
  for (const kind of ['initiative']) {
@@ -77,7 +82,7 @@ const PAGES = {
77
82
  const A = await open(kind), p = A.page;
78
83
  const F = '#czViewer:not([hidden])';
79
84
  const dlgShut = () => p.evaluate(() => { const d = document.querySelector('#dlg'); return !d || !d.classList.contains('on'); });
80
- ok(`${kind} 0 the page draws (Home with the initiative, its Overview open)`, A.up);
85
+ ok(`${kind} 0 the page draws (Home with the initiative, its Overview open)`, A.up, A.seen + (A.errors.length ? ' errors: ' + A.errors.join(' | ') : ''));
81
86
  if (!A.up) return finish(1);
82
87
  await p.click('#czViewer [data-cz-vw="more"]');
83
88
  ok(`${kind} A1 the Overview's Documents view has Add a document under ⋯`, await p.evaluate(() => [...document.querySelectorAll('#czViewer .cz-vw-menu button')].some((b) => /^Add a document/.test(b.textContent.trim()))));
@@ -106,8 +111,8 @@ const PAGES = {
106
111
  ok(`${kind} A3 nothing else was posted`, A.posts.every((x) => x.path === '/api/custom-docs/add'));
107
112
  ok(`${kind} A1 the form closes, the initiative is read again and its Overview comes back`, await until(() => A.calls() > calls0) && await until(() => p.evaluate(() => !document.querySelector('#czViewer #adT') && !!document.querySelector('#czViewer [data-hi-v="docs"]'))));
108
113
  A.setCustom(CUSTOM.map((d) => Object.assign({}, d, { scope: P.scope }))); await p.reload();
109
- await until(() => p.evaluate((s) => !!document.querySelector(s), P.ready), 20000); if (!ini) await p.click(P.ready); await docsView(p);
110
- await until(() => p.evaluate(() => !!document.querySelector('#czViewer [data-ov-doc="custom:cd-2"]')), 20000);
114
+ await until(() => p.evaluate((s) => !!document.querySelector(s), P.ready), 40000); if (!ini) await p.click(P.ready); await docsView(p);
115
+ await until(() => p.evaluate(() => !!document.querySelector('#czViewer [data-ov-doc="custom:cd-2"]')), 40000);
111
116
  // a row: the title, its state pill, then what it is (when, who writes it, where it lives) and the link as text (InDocs)
112
117
  // shell A (XvADocs): a row is one press, its title then one quiet line (when, who writes it, the state) and the link as text
113
118
  const rows = await p.evaluate(() => [...document.querySelectorAll('#czViewer [data-ov-doc]')].map((r) => { const w = r.querySelector('.w') || r, sub = [...w.querySelectorAll(':scope > span')].map((x) => x.textContent); return { t: (w.firstChild && w.firstChild.nodeType === 3 ? w.firstChild.textContent : '').trim(), meta: sub.filter((x) => !/: https?:/.test(x)).join(' · '), small: sub.filter((x) => /: https?:/.test(x)).join(' '), btn: r.querySelectorAll('button:not([disabled]):not([data-ov-none])').length, none: !!r.querySelector('[data-ov-none]') }; })); // a document with no file says so when pressed (testing fixes); it opens nothing
@@ -122,8 +127,9 @@ const PAGES = {
122
127
  ok(`${kind} A8 Escape closes the form`, await p.evaluate(() => !document.querySelector('#czViewer #adT')));
123
128
  ok(`${kind} no page error`, A.errors.length === 0, A.errors.join(' | '));
124
129
  await A.ctx.close();
125
- const N = await open(kind, { w: 390, h: 844 }); await addDoc(N.page); await until(() => N.page.evaluate(() => !!document.querySelector('#czViewer #adT')));
126
- const floors = await N.page.evaluate(() => { const h = (s) => Math.round(document.querySelector('#czViewer ' + s).getBoundingClientRect().height); return { go: h('.cz-vw-hd [data-cz-vw-p="add"]'), no: h('.cz-vw-hd [data-cz-vw="back"]'), t: h('#adT'), k: h('#adK'), w: h('#adW button'), fs: getComputedStyle(document.querySelector('#czViewer #adT')).fontSize }; });
130
+ const N = await open(kind, { w: 390, h: 844 }); if (N.up) await addDoc(N.page); await until(() => N.page.evaluate(() => !!document.querySelector('#czViewer #adT')), 30000);
131
+ // a part that is not there reads 0 (a miss with its name), not a TypeError that stops the suite
132
+ const floors = await N.page.evaluate(() => { const h = (s) => { const e = document.querySelector('#czViewer ' + s); return e ? Math.round(e.getBoundingClientRect().height) : 0; }; return { go: h('.cz-vw-hd [data-cz-vw-p="add"]'), no: h('.cz-vw-hd [data-cz-vw="back"]'), t: h('#adT'), k: h('#adK'), w: h('#adW button'), fs: document.querySelector('#czViewer #adT') ? getComputedStyle(document.querySelector('#czViewer #adT')).fontSize : '0' }; });
127
133
  ok(`${kind} A8 at 390 px the presses and fields are at least 44 px and the fields do not zoom the page`, [floors.go, floors.no, floors.t, floors.k, floors.w].every((v) => v >= 44) && parseFloat(floors.fs) >= 16, JSON.stringify(floors));
128
134
  ok(`${kind} A8 no sideways scroll at 390 px with the form open`, await N.page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1 && document.querySelector('#czViewer').getBoundingClientRect().right <= innerWidth + 1));
129
135
  await N.ctx.close();
@@ -1,4 +1,18 @@
1
1
  [
2
+ {
3
+ "v": "0.845.0",
4
+ "at": "2026-11-25T18:02:38.683Z",
5
+ "f": 4,
6
+ "prs": [
7
+ {
8
+ "n": 2041,
9
+ "t": "Main's browser reds — stage-card-tasks, adddoc, task-views, task-press T3, vw-jira dark, viewer-trail, vw-rec and day-run hold under load",
10
+ "s": "Main's browser reds — stage-card-tasks, adddoc, task-views, task-press T3, vw-jira dark, viewer-trail, vw-rec and day-run hold under load",
11
+ "k": "fix",
12
+ "i": "ci-main-unblock"
13
+ }
14
+ ]
15
+ },
2
16
  {
3
17
  "v": "0.844.0",
4
18
  "at": "2026-11-25T17:36:00.349Z",
@@ -9,6 +23,7 @@
9
23
  "t": "Copy and layout tests on an initiative, drafted from plain words (job #1905, A351)",
10
24
  "s": "Copy and layout tests on an initiative, drafted from plain words (job #1905, A351)",
11
25
  "k": "new",
26
+ "i": "copy-tests",
12
27
  "h": "Copy and layout tests on an initiative, drafted from plain words (job #1905, A351)",
13
28
  "try": {
14
29
  "steps": [
@@ -18,14 +33,14 @@
18
33
  ],
19
34
  "see": "With nothing typed in the chat, the Copy test block shows its ✦ offer; ✦ drafts A against B with Undo. Then a Copy test block with one table (Variant, Copy, the rate and how sure), one ✦ line such…",
20
35
  "open": "/premium-board.html"
21
- },
22
- "i": "copy-tests"
36
+ }
23
37
  },
24
38
  {
25
39
  "n": 2027,
26
40
  "t": "Events says what to bring on each meeting (job #2012, TbEvents)",
27
41
  "s": "Events says what to bring on each meeting (job #2012, TbEvents)",
28
42
  "k": "new",
43
+ "i": "tb-events-bring",
29
44
  "h": "Events says what to bring on each meeting (job #2012, TbEvents)",
30
45
  "try": {
31
46
  "steps": [
@@ -35,14 +50,14 @@
35
50
  ],
36
51
  "see": "Each meeting tied to your work says what to bring, for example \"Bring two calls: …\", naming dates that Events lists; a meeting with nothing to decide says \"Nothing new for this one yet.\"; focus time…",
37
52
  "open": "/premium-events.html"
38
- },
39
- "i": "tb-events-bring"
53
+ }
40
54
  },
41
55
  {
42
56
  "n": 1958,
43
57
  "t": "What each initiative and merged pull request cost, and a pause for a stall (job #1906)",
44
58
  "s": "What each initiative and merged pull request cost, and a pause for a stall (job #1906)",
45
59
  "k": "new",
60
+ "i": "initiative-cost",
46
61
  "h": "What each initiative and merged pull request cost, and a pause for a stall (job #1906)",
47
62
  "try": {
48
63
  "steps": [
@@ -52,14 +67,14 @@
52
67
  ],
53
68
  "see": "One row per initiative the factory worked on: agent hours, spend in dollars and how many pull requests merged. An initiative that spent for 7 days with no merge shows one ✦ asking to pause its jobs.…",
54
69
  "open": "/premium-board.html?work=cost"
55
- },
56
- "i": "initiative-cost"
70
+ }
57
71
  },
58
72
  {
59
73
  "n": 2022,
60
74
  "t": "This sprint's Summary card with a ✦ sentence per count, Ticket and Epic columns (job #2018)",
61
75
  "s": "This sprint's Summary card with a ✦ sentence per count, Ticket and Epic columns (job #2018)",
62
76
  "k": "new",
77
+ "i": "tb-sprint-balanced",
63
78
  "h": "This sprint, with a Summary that says what is going on",
64
79
  "try": {
65
80
  "steps": [
@@ -69,8 +84,7 @@
69
84
  ],
70
85
  "see": "The Summary card gives the same To do, In progress and Done counts as the Tasks tabs, all work in the sprint's dates, Jira and not. Each count with work has one ✦ sentence written from the tickets,…",
71
86
  "open": "/premium-board.html"
72
- },
73
- "i": "tb-sprint-balanced"
87
+ }
74
88
  }
75
89
  ]
76
90
  },
@@ -105,6 +105,8 @@ Press an initiative's name in the list, or open `?ini=<id>`. The list stays as i
105
105
  - On a phone the line shows only the next open milestone's name. Press the line to unfold the stages and milestones as a list under it.
106
106
  - On a wide Viewer the stage's dates, ⋯ and the next stage always show under the picture, and the milestones are in their own **Milestones** card under it. When the dates are too long for the row, they take their own line. They are never cut.
107
107
  - **Group by** (Stage, Owner, Status or Epic) is saved for the initiative. It stays after you change a task.
108
+ - The view button stays marked as open while its sheet is open, also when the list refreshes behind it.
109
+ - When you add a task with **+** on a stage, the field stays open and keeps your text and the cursor, also when another change saves at the same time.
108
110
  - When the list is folded, the Live pill above the menu button shows its marks in a column.
109
111
  - The picture spans the card from edge to edge. The telescope stands at the left, the launch pad in the middle and the dish at the right, whatever the stages' dates. The rocket gets smaller as it flies toward the planet.
110
112
  - Under the card are the 3 most urgent tasks and the documents that need a look. **Show N more** opens all the tasks and **Show all N** opens all the documents. ← goes back to the page. A task or a document that you open from the page also has ← back to the page.
@@ -41,14 +41,21 @@ const COMMANDS = { proactive: ['today', 'scan', 'settings', 'feedback', 'brief',
41
41
  const BRIEF_SOURCES = ['calendar', 'wispr', 'mail', 'slack', 'jira', 'confluence', 'github', 'drive', 'figma', 'website'];
42
42
  const onOff = (v, what) => (v === 'on' || v === 'true' ? true : v === 'off' || v === 'false' ? false : { err: `${what} takes on or off` });
43
43
 
44
- async function run(argv, { call, say, cwd = process.cwd() }) {
44
+ async function run(argv, { call, say, cwd = process.cwd(), port = null, why = () => null }) {
45
45
  const [group, verb, ...rest] = argv;
46
46
  const { pos, flags } = parseArgs(rest);
47
47
  const fail = (m) => { say('✗ ' + m); return 1; };
48
48
  if (group !== 'proactive' || !verb || flags.help || verb === 'help') { say(`usage: pmos proactive <${COMMANDS.proactive.join('|')}> …`); return verb ? 0 : 1; }
49
49
  if (!COMMANDS.proactive.includes(verb)) return fail(`unknown command "${verb}" — use ${COMMANDS.proactive.join(', ')}`);
50
- const probe = await call('GET', '/api/proactive/settings');
51
- if (!probe) return fail('the workspace server is not running — start it with: pmos');
50
+ // A server that is not running refuses at once. A busy one can let an ask run past its 30 s wait while agent sessions start
51
+ // (day-run D8b in CI, 2026-11-25), so a timeout is asked again, up to three times, and only a refusal is called not running.
52
+ let probe = null;
53
+ for (let i = 0; i < 3 && !probe; i++) { probe = await call('GET', '/api/proactive/settings'); if (!probe && why() !== 'timeout') break; }
54
+ if (!probe) {
55
+ const w = why();
56
+ if (!w || w === 'ECONNREFUSED' || !port) return fail('the workspace server is not running — start it with: pmos');
57
+ return fail(`the workspace server on port ${port} did not answer (${w === 'timeout' ? 'no answer in 30 s, three times' : w}) — try again`);
58
+ }
52
59
 
53
60
  if (verb === 'today') {
54
61
  const t = await call('GET', '/api/proactive/today');
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.844.0",
3
+ "version": "0.845.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pmos-workspace",
9
- "version": "0.844.0",
9
+ "version": "0.845.0",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@anthropic-ai/sdk": "^1.3.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.844.0",
3
+ "version": "0.845.0",
4
4
  "private": true,
5
5
  "description": "PMOS Terminal Workspace — local companion hosting real PTYs beside the library and gates (D62)",
6
6
  "license": "MIT",
@@ -62,11 +62,10 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
62
62
  ok('R3 a paused note offers Resume in its recording line, with no Waiting for design marker', await until(async () => !!(await p.$('#czViewer .czs-sum [data-a="resume"]')) && !(await p.$('#czViewer [data-cz-placeholder]'))));
63
63
  await tap(p, '.czs-sum [data-a="resume"]');
64
64
  ok('R3 Resume records again', await until(() => posted(A.S, '/api/notes/record').length === 2));
65
- await until(async () => !!(await p.$('#czViewer .czs-sum [data-a="stop"]')));
66
- await tap(p, '.czs-sum [data-a="stop"]');
67
- ok('R3 Stop asks first', await until(async () => /Stop for good/.test(await text(p))));
68
- await tap(p, '[data-a="stopgo"]');
69
- ok('R3 Stop and write the notes stops the recorder', await until(() => posted(A.S, '/api/notes/stop').length === 1));
65
+ // Resume's answer redraws the card: a press that lands on the old card, or just before the redraw, is lost. Press again until it takes.
66
+ const pressUntil = (sel, done, ms = 20000) => until(async () => { if (await done()) return true; await tap(p, sel).catch(() => {}); return until(done, 2000); }, ms);
67
+ ok('R3 Stop asks first', await pressUntil('.czs-sum [data-a="stop"]', async () => /Stop for good/.test(await text(p))));
68
+ ok('R3 Stop and write the notes stops the recorder', await pressUntil('[data-a="stopgo"]', () => posted(A.S, '/api/notes/stop').length >= 1) && posted(A.S, '/api/notes/stop').length === 1, JSON.stringify(posted(A.S, '/api/notes/stop')));
70
69
  ok('R3 no page error', A.errors.length === 0, A.errors.join(' | '));
71
70
  await A.ctx.close();
72
71
 
@@ -617,8 +617,11 @@ function redrawView() {
617
617
  if (cur.id === 'all:' + X.ctx.S.ini) { if (ALLB && ALLB.isConnected) { const M = curM(), st = ALLB.scrollTop; ALLB.innerHTML = M ? pageHtml(X.ctx.S.ini, M) : ''; light(ALLB, X.ctx.S.ini); ALLB.scrollTop = st; } return; }
618
618
  if (cur.id !== 'ov:' + X.ctx.S.ini) return;
619
619
  const ae = document.activeElement, keep = ae && BODY.contains(ae) && ae.id ? ae.id : null, val = keep && ae.value != null ? ae.value : null;
620
+ // a stage's New task field has no id: a redraw while it is typed in (another save landing) keeps its text and the focus
621
+ const addv = !keep && ae && BODY.contains(ae) && ae.matches('[data-iv-addinp]') ? ae.value : null;
620
622
  const st = BODY.scrollTop; draw(BODY); BODY.scrollTop = st;
621
623
  if (keep) { const n = BODY.querySelector('#' + keep); if (n) { if (val != null) n.value = val; n.focus(); } }
624
+ else if (addv != null) { const n = BODY.querySelector('[data-iv-addinp]'); if (n) { n.value = addv; n.focus({ preventScroll: true }); } }
622
625
  else if (ADDING && X.view === 'page') { const f = BODY.querySelector('#ivAddTask'); if (f) f.focus(); } // New → A task on a page still reading
623
626
  }
624
627
  /** ⋯ of the initiative in the Viewer (xvMore order: change it, then look back). */
@@ -154,9 +154,18 @@ function onKey(e) {
154
154
  else if ((e.key === 'Delete' || e.key === 'Backspace') && tabs[i].dataset.vw !== 'main') { vwClose(tabs[i].dataset.vw); return; }
155
155
  if (n < 0) return; e.preventDefault(); vwShow(tabs[n].dataset.vw); const f = q(`#vTabs .vtab[data-vw="${CSS.escape(tabs[n].dataset.vw)}"]`); if (f) f.focus();
156
156
  }
157
+ /** Loads a view's stylesheet once. Returns a promise that settles when it has loaded (or failed, or after 3 s), so a view can
158
+ * draw its content styled, never as bare buttons for a moment. Callers that do not wait keep working as before. */
159
+ const VW_CSS = new Map();
157
160
  export function vwStyle(name) {
158
- if (!/^[a-z0-9-]+$/.test(name || '') || document.querySelector(`link[data-vw-css="${name}"]`)) return;
159
- const l = document.createElement('link'); l.rel = 'stylesheet'; l.href = new URL(`./premium-vw-${name}.css`, import.meta.url).href; l.dataset.vwCss = name; document.head.append(l);
161
+ if (!/^[a-z0-9-]+$/.test(name || '')) return Promise.resolve();
162
+ if (VW_CSS.has(name)) return VW_CSS.get(name);
163
+ const have = document.querySelector(`link[data-vw-css="${name}"]`);
164
+ if (have) { const p = Promise.resolve(); VW_CSS.set(name, p); return p; }
165
+ const l = document.createElement('link'); l.rel = 'stylesheet'; l.href = new URL(`./premium-vw-${name}.css`, import.meta.url).href; l.dataset.vwCss = name;
166
+ const p = new Promise((done) => { l.onload = l.onerror = () => done(); setTimeout(done, 3000); });
167
+ VW_CSS.set(name, p); document.head.append(l);
168
+ return p;
160
169
  }
161
170
  export function vwConfirm(el, o) {
162
171
  return new Promise((done) => {
@@ -130,10 +130,10 @@ export async function openSprint(o) {
130
130
  const { ws, board } = o || {};
131
131
  let name = (o && o.name) || '';
132
132
  let past = false; // the Past sprints fold, open or shut, kept across a redraw of the tab
133
- vwStyle('jira');
133
+ const css = vwStyle('jira');
134
134
  const draw = async (el) => {
135
135
  el.innerHTML = '<div class="jv"><p class="jnote">Reading the sprint</p></div>';
136
- const sprints = await getJson('/api/boards/sprints', { ws, board });
136
+ const [sprints] = await Promise.all([getJson('/api/boards/sprints', { ws, board }), css]); // the cards draw styled, never as bare buttons
137
137
  const m = sprintModel(sprints, name, { today: new Date().toISOString() });
138
138
  el.innerHTML = sprintHtml(m, past); bars(el);
139
139
  el.querySelectorAll('[data-sp]').forEach((b) => { b.onclick = () => { name = b.dataset.sp; draw(el); }; });
@@ -234,12 +234,13 @@ const TICKETS = [{ key: 'IDPF-3387', title: 'Refactor the AppAuthService', statu
234
234
  ok('S6 Move to a stage lists the workflow\'s stages, the task\'s own checked', sl && sl.includes('Build*') && sl.includes('Deliver') && sl[sl.length - 1] === 'Not in a stage', JSON.stringify(sl));
235
235
  await p.click('.tkc.ivq [data-ive-to="deliver"]');
236
236
  const mv = await until(() => { const x = lastPost(A, '/api/boards/tasks/edit'); return x && x.body.section === 'deliver' ? x : null; });
237
- // 10 s, not 4: with three browser suites at once on 4 cores the toast and the moved row came after 4 s (2026-11-25). The toast stays 9 s.
238
- const t6 = await until(async () => { const t = await toast(p); return /Moved to Deliver/.test(t) ? t : null; }, 10000);
237
+ // 30 s: the toast shows only after the reload and redraw (ini-edit.js move), which took over 10 s with four browser suites at once
238
+ // on 4 cores (2026-11-25). The toast then stays 9 s. Any toast that says it (an earlier pill can still be the first visible one); its own Undo is kept for the Undo step below
239
+ const t6 = await until(() => p.evaluate(() => { const e = [...document.querySelectorAll('#bdToast, .cz-toast, #czToast, #hiToast, [class*="toast"]')].find((x) => !x.hidden && x.getClientRects().length > 0 && /Moved to Deliver/.test(x.textContent)); if (!e) return null; window.__u6 = [...e.querySelectorAll('button')].find((b) => b.textContent.trim() === 'Undo') || null; return e.textContent; }), 30000);
239
240
  const inD = await until(async () => ((await rowsOf(p, 'deliver')).includes('task-b1') ? true : null), 10000);
240
241
  ok('S6 a stage picked there moves the task (section), "Moved to Deliver" with Undo, and it shows under Deliver', mv && /Undo/.test(t6 || '') && inD, JSON.stringify({ mv, t6 }));
241
- await undo(p);
242
- const mu = await until(() => { const x = lastPost(A, '/api/boards/tasks/edit'); return x && x.body.section === 'build' ? x : null; });
242
+ await p.evaluate(() => { if (window.__u6) window.__u6.click(); });
243
+ const mu = await until(() => { const x = lastPost(A, '/api/boards/tasks/edit'); return x && x.body.section === 'build' ? x : null; }, 10000);
243
244
  ok('S6 Undo puts it back in Build', !!mu, JSON.stringify(A.posts.slice(-2)));
244
245
 
245
246
  /* S7 a milestone has one date */
@@ -274,13 +275,20 @@ const TICKETS = [{ key: 'IDPF-3387', title: 'Refactor the AppAuthService', statu
274
275
  await p.keyboard.type('Release note for app teams'); await p.keyboard.press('Enter');
275
276
  const ad = await until(() => lastPost(A, '/api/boards/tasks/add'));
276
277
  ok('S8 Enter adds the task into that stage (section build)', ad && ad.body.title === 'Release note for app teams' && ad.body.section === 'build', JSON.stringify(ad));
277
- const t8 = await until(async () => { const t = await toast(p); return /Added to Build/.test(t) ? t : null; }, 4000);
278
+ // any toast that says it: an earlier one (S7's date Undo) can still be the first visible pill
279
+ const t8 = await until(() => p.evaluate(() => { const e = [...document.querySelectorAll('#bdToast, .cz-toast, #czToast, #hiToast, [class*="toast"]')].find((x) => !x.hidden && x.getClientRects().length > 0 && /Added to Build/.test(x.textContent)); if (!e) return null; window.__u8 = [...e.querySelectorAll('button')].find((b) => b.textContent.trim() === 'Undo') || null; return e.textContent; }), 15000);
280
+ // The field is disabled while the add is saved and gets the focus back only after the host's reload and redraw (home-ini.js
281
+ // addTask); with four browser suites at once on 4 cores that took over 10 s (2026-11-25). Read it before Undo, whose own redraw
282
+ // draws the field again without the focus.
283
+ const k8 = await until(() => p.evaluate(() => { const i = document.querySelector('#czViewer .iv-addin input'); return i && i.value === '' && document.activeElement === i ? true : null; }), 30000)
284
+ || await p.evaluate(() => { const a = document.activeElement, i = document.querySelector('#czViewer .iv-addin input'); return { field: !!i, value: i ? i.value : null, disabled: i ? i.disabled : null, active: a ? a.tagName + '.' + a.className : null }; });
285
+ ok('S8 the toast says "Added to Build" with Undo; the field stays open, empty and focused', /Undo/.test(t8 || '') && k8 === true, JSON.stringify({ t8, k8 }));
278
286
  await shot(p, 'S8-add-390');
279
- // Undo first: the toast holds it for 9 s (hi-pop.js undoToast), and on a busy runner the waits before it ran past that (2026-11-25).
280
- const u8 = await undo(p);
281
- const k8 = await until(() => p.evaluate(() => { const i = document.querySelector('#czViewer .iv-addin input'); return i && i.value === '' && document.activeElement === i ? true : null; }), 10000);
282
- ok('S8 the toast says "Added to Build" with Undo; the field stays open, empty and focused', /Undo/.test(t8 || '') && k8, JSON.stringify({ t8, k8 }));
283
- const du = await until(() => lastPost(A, '/api/boards/tasks/delete'));
287
+ // the toast's own Undo: once the list is drawn again, the new row carries an Undo of its own too, which undo() would pick
288
+ // kept when the toast showed: a later toast reuses the same pill and replaces its button, whose own handler still runs the delete
289
+ const u8 = await p.evaluate(() => { const b = window.__u8; if (b) b.click(); return !!b; });
290
+ // the delete queues behind the reload's reads, which took over 10 s under the same load
291
+ const du = await until(() => lastPost(A, '/api/boards/tasks/delete'), 30000);
284
292
  ok('S8 Undo takes the new task out', du && /^task-n/.test(du.body.task || ''), JSON.stringify({ u8, du, last: A.posts.slice(-3) }));
285
293
  await p.keyboard.press('Escape');
286
294
  ok('S8 Esc closes the field', await until(() => p.evaluate(() => !document.querySelector('#czViewer .iv-addin')), 3000));
@@ -109,7 +109,8 @@ const back = (p) => p.evaluate(() => { const b = document.querySelector('#czView
109
109
  const n0 = H.posts.length;
110
110
  await hp.click(`${V} [data-iv-check="t1"]`);
111
111
  ok('T3 the check box saves Done and opens nothing', await until(() => H.posts.slice(n0).some((x) => x.path === '/api/boards/tasks/state' && x.body.task === 't1' && x.body.state === 'Done'), 5000)
112
- && await until(() => hp.evaluate((v) => !!document.querySelector(v + ' [data-hi-v="page"]'), V), 3000), JSON.stringify(H.posts.slice(n0))); // the save redraws the page: a slow runner can look mid-redraw
112
+ && await until(() => hp.evaluate((v) => !!document.querySelector(v + ' [data-hi-v="page"]'), V), 15000), // the save reloads and redraws the page: a slow runner can look mid-redraw
113
+ await hp.evaluate((v) => JSON.stringify({ open: !!(window.czViewer && window.czViewer.isOpen && window.czViewer.isOpen()), cur: window.czViewer && window.czViewer.current && (window.czViewer.current() || {}).kind, shown: !!document.querySelector(v), hv: [...document.querySelectorAll('#czViewer [data-hi-v]')].map((e) => e.getAttribute('data-hi-v')), url: location.href.slice(-120) }), V).catch((e) => String(e)) + ' ' + JSON.stringify(H.posts.slice(n0)));
113
114
  ok('T0 no page error on Home', H.errors.length === 0, H.errors.join(' | '));
114
115
  await H.ctx.close();
115
116
 
@@ -514,14 +514,15 @@ const everyPart = async (pg) => { await pg.waitForSelector('#czViewer .pw-ph', {
514
514
  ok('H8 Undo moves it back the same way', !!a2 && a2.key === 'MSD-4376' && a2.to === 'Done' && a2.from === 'In progress' && a2.fromRaw === 'In Review', JSON.stringify(a2));
515
515
  const n0 = J.posts.filter((x) => x.path === '/api/boards/tasks/state').length;
516
516
  await j.dragAndDrop('#czViewer [data-ivk-jira="MSD-4377"]', '#czViewer .ivk-w');
517
- await sleep(300);
518
- const w1 = await j.evaluate(() => (document.querySelector('#bdToast') || {}).textContent || '');
517
+ // a wait, not 300 ms: under load the Undo toast above was still showing when the drop's own line was read (CI, 2026-11-25)
518
+ const w1 = (await until(() => j.evaluate(() => { const t = (document.querySelector('#bdToast') || {}).textContent || ''; return /moves to To do, In progress or Done/.test(t) ? t : null; }), 10000))
519
+ || await j.evaluate(() => (document.querySelector('#bdToast') || {}).textContent || '');
519
520
  ok('H8 a Jira card dropped on Won\'t do asks nothing and says so', asks.length === 2 && /moves to To do, In progress or Done/.test(w1) && J.posts.filter((x) => x.path === '/api/boards/tasks/state').length === n0, JSON.stringify({ n: asks.length, w1 }));
520
521
  // the List: the status press beside the Jira square offers three states and says the pick moves the ticket in Jira
521
522
  await sheetPick(j, 'view', 'list');
522
- await until(() => j.evaluate(() => !!document.querySelector('#czViewer [data-iv-jstat="MSD-4377"]')));
523
+ await until(() => j.evaluate(() => !!document.querySelector('#czViewer [data-iv-jstat="MSD-4377"]')), 20000);
523
524
  await j.click('#czViewer [data-iv-jstat="MSD-4377"]');
524
- const pop = await until(() => j.evaluate(() => { const q = document.querySelector('.tkc.ivq .ivq-st.jq'); return q ? { st: [...q.querySelectorAll('[data-ivq-state]')].map((b) => b.dataset.ivqState).join('|'), on: (q.querySelector('[aria-checked="true"]') || {}).textContent, line: (q.querySelector('.ivq-jn') || {}).textContent } : null; }));
525
+ const pop = await until(() => j.evaluate(() => { const q = document.querySelector('.tkc.ivq .ivq-st.jq'); return q ? { st: [...q.querySelectorAll('[data-ivq-state]')].map((b) => b.dataset.ivqState).join('|'), on: (q.querySelector('[aria-checked="true"]') || {}).textContent, line: (q.querySelector('.ivq-jn') || {}).textContent } : null; }), 20000);
525
526
  ok('H8 List: a Jira row\'s status press: To do, In progress, Done; "Moves MSD-4377 in Jira"', !!pop && pop.st === 'To do|In progress|Done' && pop.on === 'In progress' && pop.line === 'Moves MSD-4377 in Jira', JSON.stringify(pop));
526
527
  await j.click('.tkc.ivq .ivq-st.jq [data-ivq-state="Done"]');
527
528
  const a3 = await until(() => asks[2]);
@@ -47,7 +47,8 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
47
47
  page.on('pageerror', (e) => S.errors.push(String((e && e.message) || e)));
48
48
  await page.route('**/api/briefing-premium*', (r) => r.fulfill({ status: 200, contentType: 'application/json', body: JSON.stringify({ ok: true, state: 'ready', model: B.build(F.facts()), as_of: Date.now() }) }));
49
49
  await page.goto(BASE + '/today.html?theme=light');
50
- S.up = await until(() => page.evaluate(() => document.querySelectorAll('#hmList .hm-r').length > 0 && !!window.czViewer), 20000);
50
+ S.up = await until(() => page.evaluate(() => document.querySelectorAll('#hmList .hm-r').length > 0 && !!window.czViewer), 60000); // a cold CI runner can take over 20 s to draw Home's first rows
51
+ if (!S.up) S.seen = await page.evaluate(() => JSON.stringify({ list: !!document.querySelector('#hmList'), rows: document.querySelectorAll('#hmList .hm-r').length, vw: !!window.czViewer, text: ((document.querySelector('#hmList') || document.body).textContent || '').replace(/\s+/g, ' ').slice(0, 200) })).catch((e) => String(e));
51
52
  await page.evaluate(() => {
52
53
  const item = (x) => ({ id: 't:' + x, kind: 'Ticket', title: 'Item ' + x, icon: 'jira',
53
54
  html: `<p>${x}</p>${['A', 'B', 'C', 'D', 'E'].filter((y) => y !== x).map((y) => `<button type="button" data-tgo="${y}">${y}</button>`).join('')}` });
@@ -69,7 +70,7 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
69
70
 
70
71
  {
71
72
  const { page, ctx, S } = await open();
72
- ok('0 Home loads with the Viewer', S.up);
73
+ ok('0 Home loads with the Viewer', S.up, S.seen);
73
74
  const len0 = await page.evaluate(() => history.length), s0 = (await st(page)).s; // the page's own entry (Home may draw its day in the Viewer)
74
75
  let s = await press(page, 'A', false);
75
76
  ok('N a press on the page opens a new trail: on a desk no ← at its first item', s && s.back === null && s.fwd === null && s.h === 0 && s.len === len0 + 1, JSON.stringify(s));