create-pmos 0.405.0 → 0.407.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 +25 -30
- 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-adddoc-test.js +4 -3
- package/workspace/briefing-premium-doc-edit-test.js +3 -5
- package/workspace/briefing-premium-initiative-test.js +46 -27
- package/workspace/changelog.json +24 -0
- package/workspace/guide/home.md +21 -4
- package/workspace/guide/programs.md +1 -0
- package/workspace/lib/engine/boards.js +2 -1
- package/workspace/lib/initiative-writer.js +45 -1
- package/workspace/lib/routes-boards.js +13 -0
- package/workspace/lib/routes-initiatives.js +12 -0
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/premium-board-actions-test.js +2 -2
- package/workspace/premium-core-doc-issue-test.js +4 -1
- package/workspace/premium-vw-backlog-test.js +3 -3
- package/workspace/premium-vw-doc-test.js +4 -6
- package/workspace/premium-vw-item-test.js +1 -1
- package/workspace/premium-vw-jira-test.js +2 -2
- package/workspace/public/pm/bd-ini-panel.js +2 -2
- package/workspace/public/pm/bd-prog-panel.js +15 -5
- package/workspace/public/pm/cozy-home.css +5 -0
- package/workspace/public/pm/cozy-nav.js +4 -0
- package/workspace/public/pm/cozy-today.css +2 -0
- package/workspace/public/pm/cozy-viewer.js +75 -10
- package/workspace/public/pm/cozy-vw-shell.css +20 -1
- package/workspace/public/pm/home-app.js +135 -61
- package/workspace/public/pm/home-ini.css +14 -0
- package/workspace/public/pm/home-ini.js +98 -81
- package/workspace/public/pm/home-task.js +5 -2
- package/workspace/public/pm/home-today.js +7 -5
- package/workspace/public/pm/premium-board.js +21 -2
- package/workspace/public/pm/premium-viewer.js +1 -1
- package/workspace/public/pm/premium-vw-item.js +1 -0
- package/workspace/public/pm/rename-press.js +81 -0
- package/workspace/public/premium.html +1 -1
- package/workspace/rename-test.js +166 -0
- package/workspace/test-lists/rename.json +9 -0
- package/workspace/tk-tasks-test.js +2 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pmos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.407.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": {
|
|
@@ -32,6 +32,30 @@
|
|
|
32
32
|
"audit"
|
|
33
33
|
],
|
|
34
34
|
"pmosChanges": [
|
|
35
|
+
{
|
|
36
|
+
"v": "0.407.0",
|
|
37
|
+
"at": "2026-10-24T11:09:31.378Z",
|
|
38
|
+
"f": 2,
|
|
39
|
+
"prs": [
|
|
40
|
+
{
|
|
41
|
+
"n": 1037,
|
|
42
|
+
"t": "The list stays put; an initiative, program or product opens as a page in the Viewer",
|
|
43
|
+
"s": "The list stays put; an initiative, program or product opens as a page in the Viewer"
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"v": "0.406.0",
|
|
49
|
+
"at": "2026-10-24T10:26:17.544Z",
|
|
50
|
+
"f": 2,
|
|
51
|
+
"prs": [
|
|
52
|
+
{
|
|
53
|
+
"n": 1036,
|
|
54
|
+
"t": "Tap the title to rename a program, an initiative or a task",
|
|
55
|
+
"s": "Tap the title to rename a program, an initiative or a task"
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
},
|
|
35
59
|
{
|
|
36
60
|
"v": "0.405.0",
|
|
37
61
|
"at": "2026-10-24T09:32:24.061Z",
|
|
@@ -257,35 +281,6 @@
|
|
|
257
281
|
"s": "Report templates reschedule and delete, drafts discard, issued reports stay"
|
|
258
282
|
}
|
|
259
283
|
]
|
|
260
|
-
},
|
|
261
|
-
{
|
|
262
|
-
"v": "0.387.0",
|
|
263
|
-
"at": "2026-10-21T15:59:17.829Z",
|
|
264
|
-
"f": 2,
|
|
265
|
-
"prs": [
|
|
266
|
-
{
|
|
267
|
-
"n": 998,
|
|
268
|
-
"t": "Remove a sample from a report's design",
|
|
269
|
-
"s": "Remove a sample from a report's design"
|
|
270
|
-
},
|
|
271
|
-
{
|
|
272
|
-
"n": 999,
|
|
273
|
-
"t": "Popup leads after each refresh, and a derived document's PRD section",
|
|
274
|
-
"s": "Popup leads after each refresh, and a derived document's PRD section"
|
|
275
|
-
}
|
|
276
|
-
]
|
|
277
|
-
},
|
|
278
|
-
{
|
|
279
|
-
"v": "0.386.0",
|
|
280
|
-
"at": "2026-10-21T14:59:05.016Z",
|
|
281
|
-
"f": 2,
|
|
282
|
-
"prs": [
|
|
283
|
-
{
|
|
284
|
-
"n": 997,
|
|
285
|
-
"t": "Board measure popup reads its numbers and the trunk fetch time",
|
|
286
|
-
"s": "Board measure popup reads its numbers and the trunk fetch time"
|
|
287
|
-
}
|
|
288
|
-
]
|
|
289
284
|
}
|
|
290
285
|
]
|
|
291
286
|
}
|
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-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-24T11:09:28Z"}
|
|
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-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-24T11:09:28Z"}
|
|
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-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-24T11:09:28Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -59,7 +59,7 @@ const PAGES = {
|
|
|
59
59
|
await page.route('**/api/briefing-premium/**', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, turns: [], working: false }) }));
|
|
60
60
|
await page.goto(BASE + P.file + P.qs + theme);
|
|
61
61
|
let up = await until(() => page.evaluate((s) => !!document.querySelector(s), P.ready), 20000);
|
|
62
|
-
if (up && kind === 'initiative') {
|
|
62
|
+
if (up && kind === 'initiative') { await page.click('#czViewer .hi-pgh [data-hi-addtask]'); /* the initiative's page (canvas HbC): its + drills into Tasks */ await docsView(page); up = await until(() => page.evaluate((s) => !!document.querySelector(s), P.btn), 20000); } // the Overview holds the button
|
|
63
63
|
if (up && P.file === '/premium-board.html') await page.click(w <= 720 ? '#chDocs' : '#tabDocs'); // a phone reaches the documents from its Docs chip // the Agreed design shows the documents on the Documents tab (premium-agreed-design)
|
|
64
64
|
return { ctx, page, errors, posts, up, calls: () => calls, setCustom: (c) => { current = c; }, reply: (a) => { reply = a; } };
|
|
65
65
|
};
|
|
@@ -68,7 +68,8 @@ const PAGES = {
|
|
|
68
68
|
// the Overview opens on Tasks; Add a document is on its Documents view (premium-uncovered-features, canvas InDocs)
|
|
69
69
|
// Documents is shell A (XvADocs): Add a document is under its ⋯, with Group by and Show
|
|
70
70
|
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
|
-
|
|
71
|
+
// 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-hi-open="docs"]')) await pg.click('#czViewer [data-hi-open="docs"]'); else if (await pg.$('#czViewer [data-hi-view="docs"]')) await pg.click('#czViewer [data-hi-view="docs"]'); else await viaMore(pg, 'Documents'); })(page); }
|
|
72
73
|
|
|
73
74
|
/* the Board (premium-uncovered-features, BdDocs): the Documents tab is a table with an Add a document form in the side panel;
|
|
74
75
|
the same route, the same fields, the same refusals */
|
|
@@ -145,7 +146,7 @@ const PAGES = {
|
|
|
145
146
|
ok(`${kind} A3 nothing else was posted`, A.posts.every((x) => x.path === '/api/custom-docs/add'));
|
|
146
147
|
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"]'))));
|
|
147
148
|
A.setCustom(CUSTOM.map((d) => Object.assign({}, d, { scope: P.scope }))); await p.reload();
|
|
148
|
-
await until(() => p.evaluate((s) => !!document.querySelector(s), P.ready), 20000); await p.click(P.ready); await docsView(p);
|
|
149
|
+
await until(() => p.evaluate((s) => !!document.querySelector(s), P.ready), 20000); if (!ini) await p.click(P.ready); await docsView(p);
|
|
149
150
|
await until(() => p.evaluate(() => !!document.querySelector('#czViewer [data-ov-doc="custom:cd-2"]')), 20000);
|
|
150
151
|
// a row: the title, its state pill, then what it is (when, who writes it, where it lives) and the link as text (InDocs)
|
|
151
152
|
// 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
|
|
@@ -76,11 +76,9 @@ const prop = (o) => Object.assign({ id: 'prop-a', state: 'proposed', prompt: 'ad
|
|
|
76
76
|
await page.route('**/api/docs/library*', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, kinds: [], files: [{ path: PATH, title: 'Self-serve PRD' }], edges: [] }) }));
|
|
77
77
|
await page.route('**/api/docs?*', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, docs: [{ path: PATH, links: [] }] }) }));
|
|
78
78
|
await page.goto(BASE + '/premium.html?ini=self-serve-v2&ws=w1&theme=' + theme);
|
|
79
|
-
|
|
80
|
-
await until(() => page.evaluate(() => !!document.querySelector('#
|
|
81
|
-
|
|
82
|
-
// the initiative's Core documents group (in place of the Files group, premium-uncovered-features InDocs) opens every document in the Viewer
|
|
83
|
-
await page.click('#hmList [data-hi-open="docs"]');
|
|
79
|
+
// the initiative's page in the Viewer (canvas HbC): its Documents' "Show all N" opens every document there
|
|
80
|
+
await until(() => page.evaluate(() => !!document.querySelector('#czViewer [data-hi-open="docs"]')), 15000);
|
|
81
|
+
await page.click('#czViewer [data-hi-open="docs"]');
|
|
84
82
|
await until(() => page.evaluate(() => !!document.querySelector('#czViewer [data-ov-open="planning/prd/self-serve-v2-prd.md"]')), 15000);
|
|
85
83
|
await page.click('#czViewer [data-ov-open="planning/prd/self-serve-v2-prd.md"]'); // the PRD opens as a page
|
|
86
84
|
await until(() => page.evaluate(() => document.querySelector('.vwdoc .cf') && document.querySelector('.vwdoc .vwside')));
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
'use strict';
|
|
3
3
|
/* briefing-premium-initiative-test.js — the initiative (initiative briefing-premium-initiative; planning/prd/briefing-premium-initiative-prd.md I1 to I12),
|
|
4
|
-
* re-pointed for premium-agreed-design
|
|
5
|
-
* /premium
|
|
6
|
-
* the
|
|
4
|
+
* re-pointed for premium-agreed-design and again for the Home list fix (canvas HbC): the initiative is a page in Home's Viewer
|
|
5
|
+
* (/premium.html?ini=<id>), the list stays the list, and the old /premium-initiative.html?id= link lands there. The page holds the stage card,
|
|
6
|
+
* three tasks and the documents that need a look; its + and "Show all N" drill into Tasks, Documents and Stage, with ← back to the page. What moved elsewhere has its own suite:
|
|
7
7
|
* a document's page premium-vw-doc-test.js, Add a document briefing-premium-adddoc-test.js, Issue it premium-core-doc-issue-test.js, the record and
|
|
8
8
|
* task views premium-vw-item-test.js, the Jira views premium-vw-jira-test.js. The old page's List / By stage / Timeline views, the document filter
|
|
9
9
|
* and search and the document sheet's tabs have no place in the Agreed design and are not drawn.
|
|
@@ -70,8 +70,9 @@ const WRITES = /^\/api\/(?:boards\/(?:move|tasks\/(?:add|state))|lifecycle|core-
|
|
|
70
70
|
return { ctx, page, errors, posts, up, calls: () => calls, setModel: (m) => { current = m; }, set: (a) => { answer = a; } };
|
|
71
71
|
};
|
|
72
72
|
const V = '#czViewer:not([hidden])';
|
|
73
|
-
// ready: the
|
|
74
|
-
|
|
73
|
+
// ready: the initiative's page is open in the Viewer (canvas HbC), its kind line from the board's row (kind · anchor) and, when the
|
|
74
|
+
// initiative reads, its card from the record (the ladder). Before the record reads, the page says it is reading.
|
|
75
|
+
async function ready(page, full = true) { return until(() => page.evaluate((f) => /·/.test((document.querySelector('#czViewer:not([hidden]) .cz-vw-kind') || {}).textContent || '') && (!f || (!!document.querySelector('#czViewer .hm-card [data-hm-ov]') && !!((document.querySelector('#czViewer .hm-card .hm-lad b') || {}).textContent || '').trim())), full), 30000); }
|
|
75
76
|
const txt = (p, s) => p.evaluate((q) => ((document.querySelector(q) || {}).textContent || '').replace(/\s+/g, ' ').trim(), s);
|
|
76
77
|
// the Overview opens on Tasks; a phone keeps the Tasks, Documents and Stage switch, and in shell A on a desktop the other views sit under ⋯ (XvATasks); view names the one to show
|
|
77
78
|
const LABEL = { tasks: 'Tasks', docs: 'Documents', stage: 'Stage' };
|
|
@@ -80,16 +81,22 @@ const WRITES = /^\/api\/(?:boards\/(?:move|tasks\/(?:add|state))|lifecycle|core-
|
|
|
80
81
|
else { await p.click('#czViewer [data-cz-vw="more"]'); await until(() => p.evaluate(() => !!document.querySelector('#czViewer .cz-vw-menu'))); await p.click(`#czViewer .cz-vw-menu [role="menuitem"]:has(> span:first-child:text-is("${LABEL[view]}"))`); }
|
|
81
82
|
return until(() => p.evaluate((a) => !!document.querySelector(a[0] + ` [data-hi-v="${a[1]}"]`), [V, view])); };
|
|
82
83
|
const moreLabels = (p) => p.evaluate(async () => { const b = document.querySelector('#czViewer [data-cz-vw="more"]'); if (!b) return []; b.click(); await new Promise((r) => setTimeout(r, 50)); const m = document.querySelector('#czViewer .cz-vw-menu'); const out = m ? [...m.querySelectorAll('[role="menuitem"] span:first-of-type')].map((x) => x.textContent) : []; b.click(); return out; });
|
|
84
|
+
// the initiative's page first (its list row opens it again when something else is shown), then Tasks from the page's + (HbCDrill)
|
|
83
85
|
const overview = async (p, view = 'stage') => {
|
|
84
|
-
if (!(await p.evaluate(() =>
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
if (!(await p.evaluate((v) => !!document.querySelector(v + ' [data-hi-v="page"]'), V))) {
|
|
87
|
+
if (!(await p.evaluate(() => { const b = document.querySelector('#hmList [data-hm-sel="i:self-serve-v2"]'); return !!b && !!b.offsetParent; }))) await p.click('#hmNeeds');
|
|
88
|
+
await p.click('#hmList [data-hm-sel="i:self-serve-v2"]');
|
|
89
|
+
}
|
|
90
|
+
const s = await until(() => p.evaluate((v) => { const o = document.querySelector(v); if (!o) return null; if (o.querySelector('[data-hi-v="page"]')) return 'ok'; return /could not be read/.test(o.textContent) ? 'err' : null; }, V), 30000);
|
|
91
|
+
if (s !== 'ok') return !!s;
|
|
92
|
+
await p.click(`${V} .hi-pgh [data-hi-addtask]`);
|
|
93
|
+
await until(() => p.evaluate((v) => !!document.querySelector(v + ' [data-hi-v="tasks"]'), V));
|
|
94
|
+
if (view && view !== 'tasks') await show(p, view);
|
|
95
|
+
return true; };
|
|
89
96
|
const writes = (X) => X.posts.filter((x) => WRITES.test(x.path));
|
|
90
97
|
|
|
91
98
|
const A = await open(), p = A.page;
|
|
92
|
-
ok('0 Home
|
|
99
|
+
ok('0 Home opens the initiative\'s page in the Viewer; the list stays the list, with its row selected (HbCDesk)', A.up && await p.evaluate(() => new URLSearchParams(location.search).get('ini') === 'self-serve-v2' && !!document.querySelector('#czViewer .hm-card') && !document.querySelector('#hmList .hm-card') && document.querySelector('#hmList [data-hm-sel="i:self-serve-v2"]').getAttribute('aria-current') === 'true'));
|
|
93
100
|
|
|
94
101
|
/* I1 place */
|
|
95
102
|
{
|
|
@@ -99,20 +106,23 @@ const WRITES = /^\/api\/(?:boards\/(?:move|tasks\/(?:add|state))|lifecycle|core-
|
|
|
99
106
|
await R.ctx.close();
|
|
100
107
|
}
|
|
101
108
|
ok('I1 the console is not linked from Home', await p.evaluate(() => ![...document.querySelectorAll('a[href]')].some((a) => /console(\.html)?/.test(a.getAttribute('href')))));
|
|
102
|
-
await p.
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
await p.
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
await p.
|
|
109
|
-
|
|
109
|
+
const sib = await p.evaluate(() => [...document.querySelectorAll('#hmList [data-hm-sel^="i:"]')].map((b) => b.dataset.hmSel));
|
|
110
|
+
ok('I1 the list keeps the board\'s other initiatives beside the open one', ['i:self-serve-v2', 'i:partner-rate-limits'].every((k) => sib.includes(k)), JSON.stringify(sib));
|
|
111
|
+
await p.click('#hmList [data-hm-sel="i:partner-rate-limits"]');
|
|
112
|
+
{ const u = new URL(p.url()); ok('I1 another initiative\'s name opens its page on the same board', await until(() => p.evaluate(() => new URLSearchParams(location.search).get('ini') === 'partner-rate-limits' && document.querySelector('#czVwTitle').textContent.trim() === 'Partner API rate limits')) && u.searchParams.get('ws') === 'w1' && u.searchParams.get('board') === 'w1', p.url()); }
|
|
113
|
+
await p.goBack();
|
|
114
|
+
ok('I1 the browser\'s Back closes the page and leads back to all work', await until(() => p.evaluate(() => !new URLSearchParams(location.search).get('ini') && !document.querySelector('#czViewer:not([hidden])') && !document.querySelector('#hmList [aria-current="true"][data-hm-sel^="i:"]'))), p.url());
|
|
115
|
+
await p.evaluate(() => { window.__noReload = 1; });
|
|
116
|
+
await p.click('#hmList [data-hm-prodopen]');
|
|
117
|
+
ok('I1 a product heading\'s name opens the product in the Viewer with its goals and this week, and its own chat (HbCProduct)', await until(() => p.evaluate(() => { const v = document.querySelector('#czViewer:not([hidden])'); return !!v && /Product/.test((v.querySelector('.cz-vw-kind') || {}).textContent || '') && !!v.querySelector('section.hi-pg[aria-label="Goals"]') && !!v.querySelector('[data-hp="update"]') && /^Message Claude about /.test(document.querySelector('#hmIn').placeholder) && !!document.querySelector('#hmList .hv-prg.sel [data-hm-prodopen]'); })));
|
|
118
|
+
await p.click('#czFab'); await p.click('#czMenu a[aria-current="page"]');
|
|
119
|
+
ok('I1 Menu > Home closes the page and clears the selection, without a reload', await until(() => p.evaluate(() => window.__noReload === 1 && !document.querySelector('#czViewer:not([hidden])') && !document.querySelector('#hmList .sel, #hmList [aria-current="true"]') && /^Message Claude$/.test(document.querySelector('#hmIn').placeholder))));
|
|
110
120
|
await p.goto(BASE + '/premium.html?ini=self-serve-v2&ws=w1&board=w1&theme=light'); await ready(p);
|
|
111
121
|
|
|
112
122
|
/* I3 header: the card */
|
|
113
|
-
const card = await p.evaluate(() => { const c = document.querySelector('.hm-card'); const q = (s) => ((c.querySelector(s) || {}).textContent || '').replace(/\s+/g, ' ').trim();
|
|
114
|
-
return { kind:
|
|
115
|
-
ok('I3 the
|
|
123
|
+
const card = await p.evaluate(() => { const c = document.querySelector('#czViewer .hm-card'); const q = (s) => ((c.querySelector(s) || {}).textContent || '').replace(/\s+/g, ' ').trim(), d = (s) => ((document.querySelector(s) || {}).textContent || '').trim();
|
|
124
|
+
return { kind: d('#czViewer .cz-vw-kind'), title: d('#czVwTitle'), turn: q('.hm-turn'), stage: q('.hm-br .st'), lad: q('.hm-lad'), cur: q('.hm-lad b'), bars: c.querySelectorAll('.hm-bars i').length, now: c.querySelectorAll('.hm-bars i.now').length, ckh: q('.hm-ckh'), items: [...c.querySelectorAll('.hm-it')].map((x) => x.textContent.replace(/\s+/g, ' ').trim()), then: q('.hm-then'), time: q('.hm-time'), cta: q('[data-hm-cta]') }; });
|
|
125
|
+
ok('I3 the page\'s header names the initiative, its lane and its anchor', card.title === 'Self-serve onboarding v2' && /^Feature · \S/.test(card.kind), JSON.stringify(card));
|
|
116
126
|
ok('I3 the card shows the stage the workflow engine derives, with the ladder\'s current step and one bar a step', /Build/.test(card.stage + card.cur) && card.bars === 8 && card.now === 1, JSON.stringify(card));
|
|
117
127
|
ok('I1 the card lists what finishes the step, says whose turn it is, and has one CTA', card.items.length > 0 && !!card.turn && !!card.cta && !/pull request|builder agent/i.test(card.items.join(' ')), JSON.stringify(card));
|
|
118
128
|
ok('I1 the card has the payoff line and the time in the stage when the record has them', (!card.then || /^Then:/.test(card.then)) && (card.then || card.time), JSON.stringify(card));
|
|
@@ -128,9 +138,9 @@ const WRITES = /^\/api\/(?:boards\/(?:move|tasks\/(?:add|state))|lifecycle|core-
|
|
|
128
138
|
ok('I3 it unfolds again', await until(() => p.evaluate(() => document.querySelector('.hm-card [data-hm-cfold]').getAttribute('aria-expanded') === 'true' && document.querySelectorAll('.hm-card .hm-it').length > 0)));
|
|
129
139
|
ok('I1 the card wrote nothing on its own', writes(A).length === 0, JSON.stringify(writes(A)));
|
|
130
140
|
|
|
131
|
-
/* I7 documents: the
|
|
132
|
-
ok('I7 the
|
|
133
|
-
await p.click(
|
|
141
|
+
/* I7 documents: the page's Documents shows the ones that need a look and "Show all N" drills into them all (HbCDesk, InDocs) */
|
|
142
|
+
ok('I7 the page holds Documents with its count and a Show all line; the list holds no Files or documents group', await until(() => p.evaluate((v) => { const g = document.querySelector(v + ' section.hi-pg[aria-label="Documents"]'); return !!g && /Documents/.test(g.textContent) && /^Show all \d+/.test((g.querySelector('[data-hi-open="docs"]') || {}).textContent || '') && !document.querySelector('#hmList section.hm-g[aria-label="Files"], #hmList [data-hi-open]'); }, V)));
|
|
143
|
+
await p.click(`${V} [data-hi-open="docs"]`);
|
|
134
144
|
await until(() => p.evaluate((v) => !!document.querySelector(v + ' [data-ov-open="planning/prd/self-serve-v2-prd.md"]'), V), 15000);
|
|
135
145
|
await p.click(`${V} [data-ov-open="planning/prd/self-serve-v2-prd.md"]`);
|
|
136
146
|
ok('I7 a file opens as its page in the Viewer, not a dialog', await until(() => p.evaluate((v) => !!document.querySelector(v + ' .obody.vw[data-vw="doc:planning/prd/self-serve-v2-prd.md"]') && !(document.querySelector('#dlg') && !!document.querySelector('#dlg.on')), V), 15000));
|
|
@@ -138,8 +148,16 @@ const WRITES = /^\/api\/(?:boards\/(?:move|tasks\/(?:add|state))|lifecycle|core-
|
|
|
138
148
|
/* I4 the Overview */
|
|
139
149
|
const i4 = await overview(p, null) && await p.evaluate((v) => /Tasks/.test(document.querySelector('#czViewer .cz-vw-kind').textContent) && !document.querySelector(v + ' [data-hi-view]') && !document.querySelector(v + ' .hx-wait'), V);
|
|
140
150
|
const i4m = await moreLabels(p);
|
|
141
|
-
ok('I4 the
|
|
151
|
+
ok('I4 the page\'s + opens the initiative\'s Tasks, with Documents and Stage under ⋯ on a desktop (XvATasks), and no Waiting for design marker', i4 && ['Group tasks by', 'Documents', 'Stage', 'Open the full record'].every((l) => i4m.includes(l)), JSON.stringify(i4m));
|
|
142
152
|
const tk = await p.evaluate((v) => { const o = document.querySelector(v); return { tasks: [...o.querySelectorAll('[data-ov-tkrow]')].map((r) => r.dataset.ovTkrow).sort(), checks: [...o.querySelectorAll('button[data-hi-chk]')].map((b) => b.dataset.hiChk).sort() }; }, V);
|
|
153
|
+
await p.click('#czViewer [data-cz-vw="back"]');
|
|
154
|
+
ok('I4 ← from Tasks comes back to the page (HbCDrill)', await until(() => p.evaluate((v) => !!document.querySelector(v + ' [data-hi-v="page"]'), V)));
|
|
155
|
+
await p.click(`${V} .hm-card [data-hm-ov]`);
|
|
156
|
+
ok('I4 Overview with Claude types the ask into the chat box and sends nothing', await until(() => p.evaluate(() => /^Give me an overview of Self-serve onboarding v2/.test(document.querySelector('#hmIn').value))));
|
|
157
|
+
const pm = await moreLabels(p);
|
|
158
|
+
ok('I4 the page\'s ⋯ holds the stage switch, the stakeholder, the program, the Board and the record, then hold and cancel last (HbCMore)', ['Moves on by itself', 'Add a stakeholder', 'Turn into a program', 'Open on the Board', 'The record', 'Put on hold', 'Cancel the initiative'].every((l) => pm.includes(l)) && pm[pm.length - 1] === 'Cancel the initiative', JSON.stringify(pm));
|
|
159
|
+
await p.click(`${V} .hi-pgh [data-hi-addtask]`);
|
|
160
|
+
await until(() => p.evaluate((v) => !!document.querySelector(v + ' [data-hi-v="tasks"]'), V));
|
|
143
161
|
await show(p, 'stage');
|
|
144
162
|
const st = await p.evaluate((v) => { const o = document.querySelector(v); return { moves: [...o.querySelectorAll('[data-ov-move]')].map((b) => b.dataset.ovMove), cur: (o.querySelector('[data-ov-move][aria-pressed="true"]') || {}).textContent, life: [...o.querySelectorAll('[data-ov-life]')].map((b) => b.dataset.ovLife) }; }, V);
|
|
145
163
|
await show(p, 'docs');
|
|
@@ -260,7 +278,8 @@ const WRITES = /^\/api\/(?:boards\/(?:move|tasks\/(?:add|state))|lifecycle|core-
|
|
|
260
278
|
if (!g.ctaAlt && ![g.solid, g.blue].includes(g.cta)) d.push('cta ' + g.cta + ' want ' + g.solid + ' or ' + g.blue);
|
|
261
279
|
if (![g.well, g.card].includes(g.box) && !/rgba/.test(g.box)) d.push('card box ' + g.box);
|
|
262
280
|
if (g.rad < 12) d.push('card radius ' + g.rad);
|
|
263
|
-
|
|
281
|
+
// on a phone the initiative's page is the Viewer, full screen over the list: the floating menu waits under it (HbCPhone)
|
|
282
|
+
if (w > 760 && (!g.fab || g.fab[0] !== 56 || g.fab[1] !== 56)) d.push('fab ' + JSON.stringify(g.fab));
|
|
264
283
|
if (g.over > 0) d.push('sideways scroll ' + g.over);
|
|
265
284
|
ok(`I12 the initiative follows the Agreed design at ${w} px, ${th}: Nunito, the cozy card, the CTA, the floating menu`, d.length === 0, d.join(' ; '));
|
|
266
285
|
ok(`I12 no page error at ${w} px, ${th}`, R.errors.length === 0, R.errors.join(' | '));
|
package/workspace/changelog.json
CHANGED
|
@@ -1,4 +1,28 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"v": "0.407.0",
|
|
4
|
+
"at": "2026-10-24T11:09:31.378Z",
|
|
5
|
+
"f": 2,
|
|
6
|
+
"prs": [
|
|
7
|
+
{
|
|
8
|
+
"n": 1037,
|
|
9
|
+
"t": "The list stays put; an initiative, program or product opens as a page in the Viewer",
|
|
10
|
+
"s": "The list stays put; an initiative, program or product opens as a page in the Viewer"
|
|
11
|
+
}
|
|
12
|
+
]
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"v": "0.406.0",
|
|
16
|
+
"at": "2026-10-24T10:26:17.544Z",
|
|
17
|
+
"f": 2,
|
|
18
|
+
"prs": [
|
|
19
|
+
{
|
|
20
|
+
"n": 1036,
|
|
21
|
+
"t": "Tap the title to rename a program, an initiative or a task",
|
|
22
|
+
"s": "Tap the title to rename a program, an initiative or a task"
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
},
|
|
2
26
|
{
|
|
3
27
|
"v": "0.405.0",
|
|
4
28
|
"at": "2026-10-24T09:32:24.061Z",
|
package/workspace/guide/home.md
CHANGED
|
@@ -13,8 +13,8 @@ Home is the page at `/premium.html`. It follows the Agreed design and the "Uncov
|
|
|
13
13
|
|
|
14
14
|
- The top line has **Good morning**, the product picker, the filter icon (on a desktop) and **New**. The line under it says how many items are yours, for example "4 are yours".
|
|
15
15
|
- Press **Good morning** to open **Your day**. Your day shows the date, the meetings of the day, **Your move** (the items that wait on you, with their count) and **This week** (the Weekly review). Your move shows only in Your day, not in the list.
|
|
16
|
-
- A **program** comes first, above the products. Its header shows the program icon, its name, the next milestone (◆ and the date) and how many of its initiatives are ready for that milestone. Inside it, the program's own tasks come first, then its initiatives under a small heading for each product. Each initiative shows once. Press the program's name to open the program
|
|
17
|
-
- Then the list is grouped by **product**. A product header shows a tile with the product's short name, the product name, one dot for each goal (green on track, amber off track) and a chevron. You set the short name in Settings.
|
|
16
|
+
- A **program** comes first, above the products. Its header shows the program icon, its name, the next milestone (◆ and the date) and how many of its initiatives are ready for that milestone. Inside it, the program's own tasks come first, then its initiatives under a small heading for each product. Each initiative shows once. Press the program's name to open the program in the Viewer. The chat then talks about the program. Press the chevron to close or open the group.
|
|
17
|
+
- Then the list is grouped by **product**. A product header shows a tile with the product's short name, the product name, one dot for each goal (green on track, amber off track) and a chevron. You set the short name in Settings. Press the product's name to open the product in the Viewer, with its goals and this week's update and metrics review. The chat then talks about the product.
|
|
18
18
|
- Each row is one line. A dot is a session: blue when it waits on you, a ring while it runs. A check box is a task: amber when it is late. The stage track on the right shows where the initiative is. A session that runs under an initiative shows indented under it. An initiative shows its 3 most urgent tasks, and **N more** shows the rest.
|
|
19
19
|
- **Not in an initiative** is one line at the end, with a blue dot, an amber square and a count. Press it to open the items that have no initiative.
|
|
20
20
|
- **Kept** and **Done** are in the filter icon's menu, on a desktop only.
|
|
@@ -25,12 +25,29 @@ Home is the page at `/premium.html`. It follows the Agreed design and the "Uncov
|
|
|
25
25
|
|
|
26
26
|
## An initiative
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
Press an initiative's name in the list, or open `?ini=<id>`. The list stays as it is and the initiative's row is selected. The chat talks about the initiative, and its page opens in the Viewer.
|
|
29
29
|
|
|
30
|
+
- The page's header shows the lane and the anchor, the name, **New session** (+), ⋯, Open wide and Close.
|
|
31
|
+
- The stage card shows the stage, the exit items, the next step and **Overview with Claude**. **Overview with Claude** types the question into the chat box. Nothing is sent until you press send.
|
|
32
|
+
- 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.
|
|
33
|
+
- ⋯ has **Moves on by itself**, **Move back a stage**, **Move to a stage**, **Add a stakeholder**, **Turn into a program**, **Open on the Board**, **The record**, **Put on hold** and **Cancel the initiative**.
|
|
34
|
+
- To go back to all work, press the browser's Back, or Menu > **Home**. Neither reloads the page. Close (×) closes the page but keeps the initiative's chat.
|
|
35
|
+
- If there is no room beside the chat, the Viewer shows on top of the chat. The list stays.
|
|
36
|
+
- On a phone the page fills the screen. **Message Claude about <name>** opens the chat.
|
|
30
37
|
- **Moves on by itself** is a switch, on by default. When every exit item is done, the stage moves to the next stage and a message shows **Undo**. A stage never moves by itself into a milestone (Deliver or Evaluate). This rule is a proposal that the PM has not confirmed yet.
|
|
31
38
|
- **Move to <next>** with open exit items asks first (**Move anyway**, with a note). **Back** always asks for a reason.
|
|
32
39
|
- **Tasks** in the Viewer can be grouped by stage, by groups that you name, by owner or by status. Drag a task to another group.
|
|
33
|
-
|
|
40
|
+
|
|
41
|
+
## Rename a program, an initiative or a task
|
|
42
|
+
|
|
43
|
+
Press the name in the Viewer's header. The name becomes a field.
|
|
44
|
+
|
|
45
|
+
- Type the new name. Press Enter or the check to save it. Press Esc to stop without a change. An empty name is not saved.
|
|
46
|
+
- The new name shows at once in the list, the chat header, the Viewer, the Board and the Timeline. The message **Renamed** has **Undo**.
|
|
47
|
+
- Only the name changes. The id, the record file, the links and the history stay the same.
|
|
48
|
+
- An initiative with a Jira epic shows **Rename the Jira epic too**. It is off by default. When you select it, Home opens the initiative's chat with the request typed. Send it to let your agent rename the epic in Jira. PMOS does not change Jira itself.
|
|
49
|
+
- A program has no Jira box. Its goal stays as it is.
|
|
50
|
+
- A Jira ticket keeps its Jira name. Rename it in Jira.
|
|
34
51
|
|
|
35
52
|
Some features are still not designed. Home keeps each one usable as a plain card in the Viewer with the label **Waiting for design**. The label means that the card works, but its look is not final.
|
|
36
53
|
|
|
@@ -28,6 +28,7 @@ Programs do not change how Insights, the weekly update or sprints count initiati
|
|
|
28
28
|
Press a program's name on the Board to open its panel. Home links to it with `?program=<id>`.
|
|
29
29
|
|
|
30
30
|
- The top shows the program's name, its owner and its span (for example "Sep 2026 to Jun 2028").
|
|
31
|
+
- Press the program's name to rename it (see Home, "Rename a program, an initiative or a task"). The panel saves the whole charter again with the same id, so the rename never makes a new program.
|
|
31
32
|
- The goal row shows the KRs of its initiatives for one half year, each with its name and a dot (met, on course or behind). Use the half-year picker to see another half. Earlier halves fold into one chip.
|
|
32
33
|
- The milestone track shows the next 3 milestones. The done cluster and the **N more** cluster open the **Milestones** tab, which lists Done, Next and Later.
|
|
33
34
|
- The rows that wait on you open in Home.
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
* new initiatives may pick, the template they start with)
|
|
37
37
|
* ini-workflow { id, template, stages: [{ name, cat, hint }], moved: { from, to } | null } one initiative's own workflow
|
|
38
38
|
* task { task, type: Task|Epic, initiative, title, epic, owner, state, start, due } a PMOS task (or PMOS epic) on the board
|
|
39
|
-
* task-update { task, state?, start?, due?, why }
|
|
39
|
+
* task-update { task, state?, start?, due?, title?, why } a status move, a reschedule or a rename
|
|
40
40
|
* Nothing is deleted. A line that is not an object with a known kind is skipped.
|
|
41
41
|
*
|
|
42
42
|
* STAGE OF AN INITIATIVE on a team board: the last move recorded for it on that board (a workflow edit's `moved` and an
|
|
@@ -253,6 +253,7 @@ function fold(events) {
|
|
|
253
253
|
if (typeof e.initiative === 'string' && e.initiative) t.initiative = e.initiative; // a merge moves the task (and its undo moves it back)
|
|
254
254
|
if (typeof e.start === 'string') t.start = e.start;
|
|
255
255
|
if (typeof e.due === 'string') t.due = e.due;
|
|
256
|
+
if (typeof e.title === 'string' && e.title.trim()) t.title = e.title.trim(); // a rename (canvas RnATask)
|
|
256
257
|
t.history.push({ at: e.at || null, by: e.by || null, state: e.state || null, start: e.start || null, due: e.due || null, why: e.why || '' });
|
|
257
258
|
} else if (e.kind === 'ini-epics' && typeof e.id === 'string' && Array.isArray(e.epics)) {
|
|
258
259
|
epics.set(e.id, e.epics.filter((k) => typeof k === 'string' && JIRA_KEY_RE.test(k)).map((k) => k.toUpperCase()));
|
|
@@ -30,6 +30,12 @@
|
|
|
30
30
|
* The file is opened O_CREAT|O_EXCL|O_NOFOLLOW inside the resolved initiatives folder, so an existing file or a
|
|
31
31
|
* symlink is never written through. When the placement line cannot be written, the new record is removed again and
|
|
32
32
|
* the refusal is returned: a record never lands without its place in Later.
|
|
33
|
+
*
|
|
34
|
+
* renameInitiative(root, id, title, { actor }) → { ok: true, id, path, from, title } | { ok: false, status, error, field }
|
|
35
|
+
*
|
|
36
|
+
* RENAME (testing feedback 2026-10-24, canvas RnAIni). Only the record's `title:` line changes, and its `# <title>` heading
|
|
37
|
+
* when that heading is the old title. The id, the file name and every other line stay as they are, so links, the
|
|
38
|
+
* placements and the gates keep reading the same record. Same refusals for the title as a new record; no record → 404.
|
|
33
39
|
*/
|
|
34
40
|
const fs = require('fs');
|
|
35
41
|
const path = require('path');
|
|
@@ -138,4 +144,42 @@ function createInitiative(root, input, { actor, now } = {}) {
|
|
|
138
144
|
return { ok: true, id, path: path.relative(realRoot, file).split(path.sep).join('/'), written: 1 + placed.written };
|
|
139
145
|
}
|
|
140
146
|
|
|
141
|
-
|
|
147
|
+
/** The quoted or plain YAML scalar of a `title:` line, read back as text. */
|
|
148
|
+
function unquote(v) {
|
|
149
|
+
const t = String(v || '').trim();
|
|
150
|
+
if (/^".*"$/.test(t)) return t.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
|
|
151
|
+
if (/^'.*'$/.test(t)) return t.slice(1, -1).replace(/''/g, "'");
|
|
152
|
+
return t;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
function renameInitiative(root, id, title, { actor } = {}) {
|
|
156
|
+
if (!actorLib.valid(actor)) return refuse(500, 'initiative-writer: the caller must pass the actor from pm-guard.js or actor.js');
|
|
157
|
+
if (typeof id !== 'string' || !ID_RE.test(id) || id.includes('..') || id.length > MAX_ID) return refuse(400, 'name the initiative by its id', 'id');
|
|
158
|
+
if (!ONE_LINE(title, 120)) return refuse(400, 'give a name of 1 to 120 characters on one line', 'title');
|
|
159
|
+
const name = title.trim();
|
|
160
|
+
const loaded = consoleState.loadEngine();
|
|
161
|
+
if (!loaded.ok) return refuse(500, loaded.error);
|
|
162
|
+
let realDir, realRoot;
|
|
163
|
+
try { realDir = fs.realpathSync(loaded.engine.layout(root).initiatives); realRoot = fs.realpathSync(path.resolve(root)); }
|
|
164
|
+
catch { return refuse(404, `no initiative ${id}`, 'id'); }
|
|
165
|
+
if (realDir !== realRoot && !realDir.startsWith(realRoot + path.sep)) return refuse(500, 'the initiatives folder resolves outside the repository — nothing was saved');
|
|
166
|
+
const file = path.join(realDir, `${id}.md`);
|
|
167
|
+
let st;
|
|
168
|
+
try { st = fs.lstatSync(file); } catch { return refuse(404, `no initiative ${id}`, 'id'); }
|
|
169
|
+
if (!st.isFile()) return refuse(409, `the record of ${id} is not a plain file — nothing was saved`, 'id');
|
|
170
|
+
const text = fs.readFileSync(file, 'utf8');
|
|
171
|
+
const m = /^---\r?\n([\s\S]*?)\r?\n---(\r?\n|$)/.exec(text);
|
|
172
|
+
if (!m) return refuse(409, `the record of ${id} has no front matter — nothing was saved`, 'id');
|
|
173
|
+
const lines = m[1].split(/\r?\n/);
|
|
174
|
+
const at = lines.findIndex((l) => /^title:/.test(l));
|
|
175
|
+
const from = at >= 0 ? unquote(lines[at].slice(6)) : '';
|
|
176
|
+
const line = `title: ${q(name)}`;
|
|
177
|
+
if (at >= 0) lines[at] = line; else lines.splice(Math.min(1, lines.length), 0, line);
|
|
178
|
+
let rest = text.slice(m[0].length);
|
|
179
|
+
if (from) rest = rest.replace(new RegExp('^(\\s*)# ' + from.replace(/[.*+?^${}()|[\]\\]/g, '\\$&') + '[ \\t]*$', 'm'), (_, sp) => sp + '# ' + name);
|
|
180
|
+
const out = '---\n' + lines.join('\n') + '\n---' + m[2] + rest;
|
|
181
|
+
try { fs.writeFileSync(file, out, { flag: 'w' }); } catch { return refuse(500, 'the record could not be written — nothing was saved'); }
|
|
182
|
+
return { ok: true, id, path: path.relative(realRoot, file).split(path.sep).join('/'), from, title: name };
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
module.exports = { createInitiative, renameInitiative, slugOf, ID_RE, INPUT_KEYS };
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
* POST /api/boards/tasks/add { ws, board, initiative, title, type?, epic?, start?, due?, owner? } → { ok, item }
|
|
28
28
|
* POST /api/boards/tasks/state { ws, board, task, state } → { ok, item }
|
|
29
29
|
* POST /api/boards/tasks/reschedule { ws, board, task, days } → { ok, item }
|
|
30
|
+
* POST /api/boards/tasks/rename { ws, board, task, title } → { ok, from, item } only the title changes
|
|
30
31
|
* POST /api/boards/archive { ws, board, id, archived, reason? } → { ok, row } archive (hidden everywhere, kept whole) or restore;
|
|
31
32
|
* restoring a merged initiative moves its epics and tasks back
|
|
32
33
|
* POST /api/boards/merge { ws, board, id, into, epics?, tasks? } → { ok, row, into } moves the picked Jira epic links and PMOS
|
|
@@ -825,6 +826,18 @@ const WRITES = {
|
|
|
825
826
|
const t2 = B.taskOf(B.fold(readLedger(ctx, p.w)), t.id);
|
|
826
827
|
ctx.json(res, { ok: true, item: B.rollupItems([B.taskItem(t2)])[0] });
|
|
827
828
|
},
|
|
829
|
+
'/api/boards/tasks/rename': (ctx, res, body, g) => {
|
|
830
|
+
// tap the title to rename it (canvas RnATask): only the title changes; Undo is the same press with the old name
|
|
831
|
+
const p = postFrame(ctx, res, body);
|
|
832
|
+
if (!p) return;
|
|
833
|
+
const t = B.taskOf(p.fr.folded, body.task);
|
|
834
|
+
if (!t || t.board !== p.board.id) return fail(ctx, res, 404, `no PMOS task ${body.task} on this board`);
|
|
835
|
+
if (!ONE_LINE(body.title, 200)) return fail(ctx, res, 400, 'title is one line of 1 to 200 characters');
|
|
836
|
+
if (!p.file) return fail(ctx, res, 409, NO_STATE);
|
|
837
|
+
append(p.file, g.actor, { kind: 'task-update', board: p.board.id, task: t.id, title: body.title.trim(), why: 'renamed' });
|
|
838
|
+
const t2 = B.taskOf(B.fold(readLedger(ctx, p.w)), t.id);
|
|
839
|
+
ctx.json(res, { ok: true, from: t.title, item: B.rollupItems([B.taskItem(t2)])[0] });
|
|
840
|
+
},
|
|
828
841
|
'/api/boards/tasks/reschedule': (ctx, res, body, g) => {
|
|
829
842
|
const p = postFrame(ctx, res, body);
|
|
830
843
|
if (!p) return;
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* GET /api/initiatives/<id>/export?ws= → { ok, id, markdown } (lib/breakdown-export.js; nothing is written)
|
|
8
8
|
* POST /api/initiatives { ws, title, lane, anchor, intent?, id?, from?, specimen_test?, surface_check? }
|
|
9
9
|
* → { ok, id, path, written, sig } New initiative (requirePagePress)
|
|
10
|
+
* POST /api/initiatives/rename { ws, id, title } → { ok, id, from, title, path, sig } rename: the record's title only (requirePagePress)
|
|
10
11
|
* POST /api/initiatives/rescan { ws } → { ok, started, running } read the repository again now (requirePagePress);
|
|
11
12
|
* nothing is written: the cached rows go stale and one derivation starts
|
|
12
13
|
* POST /api/initiatives/duplicates { ws } → { ok, profile, archive, groups } documents that share an initiative and a
|
|
@@ -650,6 +651,17 @@ async function handle(req, res, url, ctx) {
|
|
|
650
651
|
ctx.json(res, { ws: w.id, ...r });
|
|
651
652
|
return true;
|
|
652
653
|
}
|
|
654
|
+
if (p === '/api/initiatives/rename') {
|
|
655
|
+
// tap the title to rename it (canvas RnAIni): only the record's title changes; the id, the file and the links stay
|
|
656
|
+
const g = guard.requirePagePress(req, body);
|
|
657
|
+
if (!g.ok) return answer(ctx, res, g), true;
|
|
658
|
+
const r = writer.renameInitiative(w.root, body.id, body.title, { actor: g.actor });
|
|
659
|
+
if (!r.ok) { ctx.json(res, { ok: false, status: r.status, error: r.error, field: r.field }, r.status); return true; }
|
|
660
|
+
rowsLib.invalidate(w.root);
|
|
661
|
+
if (ctx.invalidateNeedsAgg) ctx.invalidateNeedsAgg(w.id);
|
|
662
|
+
ctx.json(res, { ok: true, id: r.id, from: r.from, title: r.title, path: r.path, sig: sigOf(w.root) });
|
|
663
|
+
return true;
|
|
664
|
+
}
|
|
653
665
|
if (p === '/api/initiatives') {
|
|
654
666
|
const g = guard.requirePagePress(req, body);
|
|
655
667
|
if (!g.ok) return answer(ctx, res, g), true;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmos-workspace",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.407.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.407.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@xterm/addon-fit": "^0.11.0",
|
package/workspace/package.json
CHANGED
|
@@ -190,7 +190,7 @@ const ALLOWED = /^\/api\/(?:boards\/(?:asks\/(?:add|accept|decline)|move|archive
|
|
|
190
190
|
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)
|
|
191
191
|
const landed = await until(() => ip.evaluate(() => { const q = new URLSearchParams(location.search); return location.pathname === '/premium.html' && q.get('ini') === 'pa-one' && !!q.get('ws') && !!q.get('board') && !!document.querySelector('.hm-card [data-hm-ov]'); }), 60000);
|
|
192
192
|
ok('I0 the expand link lands on Home with the initiative selected, ws and board kept', !!landed, await ip.evaluate(() => location.href));
|
|
193
|
-
await ip.click('.
|
|
193
|
+
await ip.click('#czViewer .hi-pgh [data-hi-addtask]'); // the initiative's page (canvas HbC): its + drills into Tasks
|
|
194
194
|
await until(() => ip.evaluate(() => !!document.querySelector('#czViewer:not([hidden]) [data-hi-v]')), 60000);
|
|
195
195
|
await (async (pg) => { if (await pg.$('#czViewer [data-hi-view="stage"]')) await pg.click('#czViewer [data-hi-view="stage"]'); else await viaMore(pg, 'Stage'); })(ip);
|
|
196
196
|
const bar = await until(() => ip.evaluate(() => { const v = document.querySelector('#czViewer:not([hidden])'); if (!v || !v.querySelector('[data-ov-move]')) return null; const cur = v.querySelector('[data-ov-move][aria-pressed="true"]'); return { moves: [...v.querySelectorAll('[data-ov-move]')].map((x) => x.dataset.ovMove), cur: cur ? cur.dataset.ovMove : '', life: [...v.querySelectorAll('[data-ov-life]')].map((x) => x.dataset.ovLife) }; }), 60000);
|
|
@@ -205,7 +205,7 @@ const ALLOWED = /^\/api\/(?:boards\/(?:asks\/(?:add|accept|decline)|move|archive
|
|
|
205
205
|
ok('I3 a lifecycle press asks its reason inline, records nothing yet and opens no browser dialog', await until(() => ip.evaluate(() => !!document.querySelector('#czViewer #ovWhy'))) && lines('lifecycle.jsonl').length === lif0 && !(await ip.evaluate(() => { const d = document.querySelector('#dlg'); return !!(d && d.classList.contains('on')); })));
|
|
206
206
|
await ip.click('#czViewer [data-ov-life-no]');
|
|
207
207
|
ok('I3 Not now takes the question back', await until(() => ip.evaluate(() => !document.querySelector('#czViewer #ovWhy') && !!document.querySelector('#czViewer [data-ov-life="on-hold"]'))));
|
|
208
|
-
await ip.
|
|
208
|
+
await ip.click('#czViewer [data-cz-vw="back"]'); // ← from Stage: the initiative's page again (canvas HbCDrill)
|
|
209
209
|
// the card: Back always asks for a reason, and the move line carries it (InStage)
|
|
210
210
|
const back = await until(() => ip.evaluate(() => !!document.querySelector('.hm-card [data-hi-back]')), 30000);
|
|
211
211
|
ok('I4 the card has Move to the next stage and Back', back && await ip.evaluate(() => /^Move to /.test((document.querySelector('.hm-card [data-hi-move]') || {}).textContent || '')));
|
|
@@ -115,7 +115,10 @@ const BODY = '## Purpose\n\nWhy this board exists.\n\n## Scope\n\nWhat it covers
|
|
|
115
115
|
// Documents is shell A (XvADocs): its groups after the first are folded, so a row is unfolded before it is pressed
|
|
116
116
|
const unfold = (p, sel) => p.evaluate((q) => { const n = document.querySelector(q); const f = n && !n.offsetParent && n.closest('.czs-sec') && n.closest('.czs-sec').querySelector('[data-czs-fold]'); if (f) f.click(); }, sel);
|
|
117
117
|
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)
|
|
118
|
-
|
|
118
|
+
// the initiative's page (canvas HbC): its list row opens it again when the Viewer shows something else
|
|
119
|
+
const ovOpen = async (p) => { await until(() => p.evaluate(() => !!document.querySelector('#hmList [data-hm-sel^="i:"][aria-current="true"]')), 60000);
|
|
120
|
+
if (!(await p.$('#czViewer:not([hidden]) [data-hi-v="page"]'))) await p.click('#hmList [data-hm-sel^="i:"][aria-current="true"]');
|
|
121
|
+
await until(() => p.evaluate(() => !!document.querySelector('#czViewer .hi-pgh [data-hi-addtask]')), 60000); await p.click('#czViewer .hi-pgh [data-hi-addtask]'); // the initiative's page (canvas HbC): its + drills into Tasks
|
|
119
122
|
// the Overview opens on Tasks; the core documents are its Documents view (premium-uncovered-features, canvas InDocs)
|
|
120
123
|
if (await until(() => p.evaluate(() => !!document.querySelector('#czViewer:not([hidden]) [data-hi-v]')), 30000)) await (async (pg) => { if (await pg.$('#czViewer [data-hi-view="docs"]')) await pg.click('#czViewer [data-hi-view="docs"]'); else await viaMore(pg, 'Documents'); })(p); };
|
|
121
124
|
const I = await open('/premium-initiative.html' + iq), ip = I.page;
|