create-pmos 0.471.0 → 0.472.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 +14 -14
- package/payload/KIT-VERSION +2 -2
- 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/payload/state/log.md +1 -1
- package/workspace/board-publish-ui-test.js +9 -0
- package/workspace/changelog.json +13 -0
- package/workspace/guide/published-board.md +6 -5
- package/workspace/lib/board-pack-route.js +2 -2
- package/workspace/lib/board-pack.js +3 -1
- package/workspace/lib/routes-board-publish.js +1 -1
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/public/pm/bd-publish.css +1 -0
- package/workspace/public/pm/bd-publish.js +4 -4
- package/workspace/public/pm/bd-shared.js +2 -2
- package/workspace/public/pm/premium-board.js +5 -3
- package/workspace/public/pm/readonly.js +5 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pmos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.472.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,19 @@
|
|
|
32
32
|
"audit"
|
|
33
33
|
],
|
|
34
34
|
"pmosChanges": [
|
|
35
|
+
{
|
|
36
|
+
"v": "0.472.0",
|
|
37
|
+
"at": "2026-11-01T00:41:46.421Z",
|
|
38
|
+
"f": 3,
|
|
39
|
+
"prs": [
|
|
40
|
+
{
|
|
41
|
+
"n": 1126,
|
|
42
|
+
"t": "Popover in view, published copy opens on the publisher's view, stage track opens initiatives",
|
|
43
|
+
"s": "Popover in view, published copy opens on the publisher's view, stage track opens initiatives",
|
|
44
|
+
"k": "fix"
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
},
|
|
35
48
|
{
|
|
36
49
|
"v": "0.471.0",
|
|
37
50
|
"at": "2026-10-31T13:21:46.914Z",
|
|
@@ -284,19 +297,6 @@
|
|
|
284
297
|
"k": "new"
|
|
285
298
|
}
|
|
286
299
|
]
|
|
287
|
-
},
|
|
288
|
-
{
|
|
289
|
-
"v": "0.452.0",
|
|
290
|
-
"at": "2026-10-29T12:12:01.657Z",
|
|
291
|
-
"f": 3,
|
|
292
|
-
"prs": [
|
|
293
|
-
{
|
|
294
|
-
"n": 1098,
|
|
295
|
-
"t": "Settings > Claude: API key and Claude profile",
|
|
296
|
-
"s": "Settings > Claude: API key and Claude profile",
|
|
297
|
-
"k": "new"
|
|
298
|
-
}
|
|
299
|
-
]
|
|
300
300
|
}
|
|
301
301
|
]
|
|
302
302
|
}
|
package/payload/KIT-VERSION
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
kernel-source: pmos@
|
|
2
|
-
assembled: 2026-
|
|
1
|
+
kernel-source: pmos@68660133
|
|
2
|
+
assembled: 2026-11-01
|
|
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-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-01T00:41:42Z"}
|
|
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-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-01T00:41:42Z"}
|
|
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-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-01T00:41:42Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
package/payload/state/log.md
CHANGED
|
@@ -72,6 +72,15 @@ const ok = (name, cond, extra = '') => { n++; if (!cond) bad++; console.log(`${c
|
|
|
72
72
|
await ctx.close();
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
+
{
|
|
76
|
+
W.links = []; W.host = 'boards.test';
|
|
77
|
+
const s6 = await open(1440, 900, '/premium-board.html?ws=idpf&board=idpf');
|
|
78
|
+
await s6.p.locator('#bdPublish').click(); await s6.p.waitForSelector('.bppop', { timeout: 5000 }).catch(() => {}); await s6.p.waitForTimeout(300);
|
|
79
|
+
const g = await s6.p.evaluate(() => { const m = document.querySelector('.bppop').getBoundingClientRect(), b = document.querySelector('#bdPublish').getBoundingClientRect(); return { top: m.top, bottom: m.bottom, right: m.right, left: m.left, btnBottom: b.bottom, h: innerHeight, w: innerWidth }; });
|
|
80
|
+
ok('A6 the popover opens under the button and inside the viewport, not below the fold', g.top >= g.btnBottom && g.top < g.btnBottom + 40 && g.bottom <= g.h && g.left >= 0 && g.right <= g.w, JSON.stringify(g));
|
|
81
|
+
await s6.ctx.close();
|
|
82
|
+
}
|
|
83
|
+
|
|
75
84
|
console.log('B no host');
|
|
76
85
|
W.links = []; W.host = null; W.settings = []; W.settingsAnswer = null;
|
|
77
86
|
s = await open(1440, 900, '/premium-board.html?ws=idpf&board=idpf'); await s.p.click('#bdPublish'); await s.p.waitForSelector('#bpHost');
|
package/workspace/changelog.json
CHANGED
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"v": "0.472.0",
|
|
4
|
+
"at": "2026-11-01T00:41:46.421Z",
|
|
5
|
+
"f": 3,
|
|
6
|
+
"prs": [
|
|
7
|
+
{
|
|
8
|
+
"n": 1126,
|
|
9
|
+
"t": "Popover in view, published copy opens on the publisher's view, stage track opens initiatives",
|
|
10
|
+
"s": "Popover in view, published copy opens on the publisher's view, stage track opens initiatives",
|
|
11
|
+
"k": "fix"
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
},
|
|
2
15
|
{
|
|
3
16
|
"v": "0.471.0",
|
|
4
17
|
"at": "2026-10-31T13:21:46.914Z",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Guide
|
|
3
3
|
title: "Published board: a read-only copy of a Board"
|
|
4
4
|
description: "What a published board is, how to publish one from the Board, what a reader sees and cannot do, and how to preview one."
|
|
5
|
-
timestamp: 2026-
|
|
5
|
+
timestamp: 2026-11-01
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Published board: a read-only copy of a Board
|
|
@@ -13,7 +13,7 @@ This version has the **Publish** button on the Board, the **Shared** tab, the re
|
|
|
13
13
|
|
|
14
14
|
## Publish a board
|
|
15
15
|
|
|
16
|
-
Press the share icon on the Board's toolbar. A popover opens under it. The button shows a number when you have open links. It shows nothing when you have none.
|
|
16
|
+
Press the share icon on the Board's toolbar. A popover opens under it, inside the window. The button shows a number when you have open links. It shows nothing when you have none.
|
|
17
17
|
|
|
18
18
|
The button is not on a narrow screen (720 px or less) and not on the All products page. Open one product to publish from it.
|
|
19
19
|
|
|
@@ -61,10 +61,11 @@ The tab is not in the read-only Board. A reader sees no Shared tab.
|
|
|
61
61
|
|
|
62
62
|
## What a reader sees
|
|
63
63
|
|
|
64
|
-
- The
|
|
64
|
+
- The view that you were in when you published: the stage track or the Timeline. A reader can switch between the two with the buttons on the toolbar. A copy made before this change opens on the stage track. Republish a link to give it your view. By stage and List are not offered.
|
|
65
|
+
- On the Timeline, the view opens on today.
|
|
65
66
|
- The span picker, the Deliveries lane, and the folds of a program and a product.
|
|
66
67
|
- One line above the Board. It names the selection, the date of the copy, who shared it and when the link ends.
|
|
67
|
-
- A viewer for each initiative. Press the name of an initiative to open it. The viewer shows the stage card, About and Tasks. Tasks show as a List or as a Timeline, grouped by stage, owner or status.
|
|
68
|
+
- A viewer for each initiative. Press the name of an initiative to open it, on the stage track or on the Timeline. The viewer shows the stage card, About and Tasks. Tasks show as a List or as a Timeline, grouped by stage, owner or status.
|
|
68
69
|
- The panel divider and the panel layout: full screen, split or slide over.
|
|
69
70
|
|
|
70
71
|
While a viewer is open, the Timeline shows only the name of each initiative. The Stage, Status, Start and Next milestone columns are not shown.
|
|
@@ -73,7 +74,7 @@ While a viewer is open, the Timeline shows only the name of each initiative. The
|
|
|
73
74
|
|
|
74
75
|
A reader can only look. Nothing that a reader presses or types changes anything.
|
|
75
76
|
|
|
76
|
-
- The Board has no
|
|
77
|
+
- The Board has no board picker, no filters, no drag grips on the stage track and no **New initiative**.
|
|
77
78
|
- A viewer has no rename, no **More**, no **Discuss in chat**, and no **+** to add a task or a person.
|
|
78
79
|
- A task has no tick, no status and no date to change.
|
|
79
80
|
- A viewer lists no documents and no links. It has no offer of Claude's help.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
/* board-pack-route.js — GET /api/board-pack?ws=<id>&board=<id>&select=<kind>:<id>[,<kind>:<id>…][&by=&at=&ends=&hub=&viewer=]
|
|
2
|
+
/* board-pack-route.js — GET /api/board-pack?ws=<id>&board=<id>&select=<kind>:<id>[,<kind>:<id>…][&by=&at=&ends=&hub=&viewer=&view=]
|
|
3
3
|
* (initiative board-publish, planning/prd/board-publish-prd.md R1; slice 1). Answered by routes-board-premium.js, which lists the prefix and hands the request here:
|
|
4
4
|
* the pack is made from that route's own answer (the Board's model), so it is the Board's route that serves it.
|
|
5
5
|
*
|
|
@@ -51,7 +51,7 @@ module.exports = {
|
|
|
51
51
|
const t = await via(Trail, tk, req, ctx); if (t.body && t.body.ok) answers[tk] = t.body;
|
|
52
52
|
for (const id of rows) { const lk = '/api/initiative-layout?initiative=' + encodeURIComponent(id) + '&ws=' + encodeURIComponent(ws); const l = await via(Layout, lk, req, ctx); if (l.body && l.body.ok) answers[lk] = l.body; }
|
|
53
53
|
}
|
|
54
|
-
const meta = { by: q.get('by') || '', at: q.get('at') || '', ends: q.get('ends') || '', viewer: q.get('viewer') || '', hub: q.get('hub') || '' };
|
|
54
|
+
const meta = { by: q.get('by') || '', at: q.get('at') || '', ends: q.get('ends') || '', viewer: q.get('viewer') || '', hub: q.get('hub') || '', view: q.get('view') || '' };
|
|
55
55
|
ctx.json(res, { ok: true, pack: Pack.buildPack({ ws, board, selection, answers, meta }) });
|
|
56
56
|
} catch (e) { return bad(String((e && e.message) || e).slice(0, 240), /not on this board|Pick at least|at most 2 MB|product, a program/.test(String(e && e.message)) ? 400 : 500); }
|
|
57
57
|
return true;
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
const SCHEMA = 'board-pack/1';
|
|
20
20
|
const MAX_BYTES = 2 * 1024 * 1024;
|
|
21
21
|
const KINDS = ['product', 'program', 'initiative'];
|
|
22
|
+
const VIEWS = ['track', 'stages', 'time', 'list']; // the Board's views a pack can open on
|
|
22
23
|
|
|
23
24
|
// the parts of the Board's model that the Timeline and the viewer draw
|
|
24
25
|
const MODEL_KEYS = ['pending', 'workflows', 'today', 'header', 'board', 'initiatives', 'steps', 'rows'];
|
|
@@ -135,9 +136,10 @@ function buildPack({ ws, board, selection, answers, meta }) {
|
|
|
135
136
|
const m = meta || {};
|
|
136
137
|
const pack = { schema: SCHEMA, viewer: m.viewer || '', scope, by: m.by || '', at: m.at || '', ends: m.ends || '' };
|
|
137
138
|
if (m.hub) pack.hub = m.hub;
|
|
139
|
+
if (VIEWS.includes(m.view)) pack.view = m.view; // the publisher's view: the copy opens on it (board-publish R21)
|
|
138
140
|
pack.responses = sorted;
|
|
139
141
|
assertSize(pack);
|
|
140
142
|
return pack;
|
|
141
143
|
}
|
|
142
144
|
|
|
143
|
-
module.exports = { SCHEMA, MAX_BYTES, KINDS, MODEL_KEYS, buildPack, assertSize };
|
|
145
|
+
module.exports = { VIEWS, SCHEMA, MAX_BYTES, KINDS, MODEL_KEYS, buildPack, assertSize };
|
|
@@ -130,7 +130,7 @@ module.exports = {
|
|
|
130
130
|
if (!Host.DAYS.includes(days)) return send({ ok: false, error: 'Ends in 1, 7 or 30 days.' }, 400);
|
|
131
131
|
sel = { ws: body.ws, board: body.board || body.ws, select: Array.isArray(body.select) ? body.select.map((s) => s.kind + ':' + s.id).join(',') : String(body.select || ''), by: String(body.shared_by || '').slice(0, 60) || sharedBy(), ends: new Date(now + days * 86400000).toISOString() };
|
|
132
132
|
}
|
|
133
|
-
const pk = await makePack(req, ctx, Object.assign({}, sel, { at: new Date(now).toISOString(), viewer: viewerVersion() }));
|
|
133
|
+
const pk = await makePack(req, ctx, Object.assign({}, sel, { at: new Date(now).toISOString(), viewer: viewerVersion(), view: body.view }));
|
|
134
134
|
if (!pk.ok) return send({ ok: false, error: pk.error }, pk.status || 502);
|
|
135
135
|
const hits = secretScan.scan(JSON.stringify(pk.pack));
|
|
136
136
|
if (hits.length) return send({ ok: false, error: 'This board holds what looks like a secret (' + hits.join(', ') + '). Remove it, then publish again.', secrets: hits }, 422);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmos-workspace",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.472.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.472.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@anthropic-ai/sdk": "^1.3.0",
|
package/workspace/package.json
CHANGED
|
@@ -40,5 +40,6 @@
|
|
|
40
40
|
.bppop .bprow em{font-style:normal;color:var(--ink-3);font-size:12px}.bppop .bprow em.soon{color:var(--bad)}
|
|
41
41
|
.bppop .bpempty{display:grid;gap:10px;padding:12px 8px 10px;justify-items:start}.bppop .bpempty p{margin:0;color:var(--ink-2)}
|
|
42
42
|
.bppop :focus-visible{outline:2px solid var(--ember);outline-offset:2px}
|
|
43
|
+
.bd-tools:has(.bppop){position:relative}
|
|
43
44
|
#bdPublish{position:relative}#bdPublish .bpn{position:absolute;top:2px;right:0;min-width:16px;padding:0 5px;border-radius:99px;background:var(--solid);color:var(--on-solid);font:600 11px var(--mono);text-align:center;line-height:16px}
|
|
44
45
|
@media (max-width:640px){.bppop{position:fixed;left:0;right:0;bottom:0;top:auto;width:auto;max-width:none;max-height:85vh;border-radius:16px 16px 0 0;border-width:1px 0 0;padding:12px 12px calc(18px + env(safe-area-inset-bottom,0px));box-shadow:0 -8px 30px rgb(0 0 0 / .18)}}
|
|
@@ -31,7 +31,7 @@ export function publishHtml(S) {
|
|
|
31
31
|
if (S.phase === 'loading') return '<p class="bpnote">Reading your board…</p>';
|
|
32
32
|
if (!S.host) {
|
|
33
33
|
return `<div class="bpempty"><b>Publishing needs a board host</b><p>Ask whoever runs it for its address and add it here once. Nothing is sent before that.</p></div>`
|
|
34
|
-
+ `<div class="bpfield"><label for="bpHost">Board host address</label><div class="bpinp2"><input id="bpHost" type="url" inputmode="url" spellcheck="false" autocomplete="off" placeholder="
|
|
34
|
+
+ `<div class="bpfield"><label for="bpHost">Board host address</label><div class="bpinp2"><input id="bpHost" type="url" inputmode="url" spellcheck="false" autocomplete="off" placeholder="Paste the host address" value="${esc(S.hostIn || '')}"><button type="button" class="bpbtn sm pri" data-bp="savehost">Save</button></div></div>`
|
|
35
35
|
+ (S.err ? `<p class="bperr" role="alert">${esc(S.err)}</p>` : '');
|
|
36
36
|
}
|
|
37
37
|
const list = S.links && S.links.length
|
|
@@ -65,7 +65,7 @@ export function publishHtml(S) {
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
function css() {
|
|
68
|
-
for (const href of ['
|
|
68
|
+
for (const href of [new URL('./premium-vw-doc.css', import.meta.url).href, new URL('./bd-publish.css', import.meta.url).href]) {
|
|
69
69
|
if (document.querySelector(`link[href="${href}"]`)) continue;
|
|
70
70
|
const l = document.createElement('link'); l.rel = 'stylesheet'; l.href = href; document.head.appendChild(l);
|
|
71
71
|
}
|
|
@@ -130,13 +130,13 @@ export function open(btn, ctx) {
|
|
|
130
130
|
if (act === 'make') {
|
|
131
131
|
draw(); if (S.busy) return; S.busy = true; S.err = ''; draw();
|
|
132
132
|
const select = [...S.sel].map((k) => { const i = k.indexOf(':'); return { kind: k.slice(0, i), id: k.slice(i + 1) }; });
|
|
133
|
-
const r = await pmPost('/api/board-publish', { ws: ctx.ws, board: ctx.board || ctx.ws, select, team: S.team.trim(), password: S.pw ? S.pass : '', days: S.days }).catch(() => null);
|
|
133
|
+
const r = await pmPost('/api/board-publish', { ws: ctx.ws, board: ctx.board || ctx.ws, select, team: S.team.trim(), password: S.pw ? S.pass : '', days: S.days, view: ctx.view }).catch(() => null);
|
|
134
134
|
S.busy = false;
|
|
135
135
|
if (r && r.ok) { const l = (await pmGet('/api/board-publish').catch(() => null)) || {}; S.links = l.links || S.links; S.made = { url: r.url, pass: S.pw ? S.pass : '', ends: r.ends, team: S.team.trim(), name: (S.links.find((x) => x.id === r.id) || {}).name || 'Board' }; S.pass = ''; S.err = ''; draw('[data-bp="copy"]'); return refreshCount(btn); }
|
|
136
136
|
S.err = (r && r.error) || 'The workspace did not answer. Try again.'; return draw();
|
|
137
137
|
}
|
|
138
138
|
if (b.dataset.bpRe) {
|
|
139
|
-
S.busy = true; S.err = ''; draw(); const r = await pmPost('/api/board-publish/republish', { id: b.dataset.bpRe }).catch(() => null); S.busy = false;
|
|
139
|
+
S.busy = true; S.err = ''; draw(); const r = await pmPost('/api/board-publish/republish', { id: b.dataset.bpRe, view: ctx.view }).catch(() => null); S.busy = false;
|
|
140
140
|
S.err = r && r.ok ? '' : (r && r.error) || 'The workspace did not answer. Try again.'; const l = await pmGet('/api/board-publish').catch(() => null); if (l && l.ok) S.links = l.links; return draw();
|
|
141
141
|
}
|
|
142
142
|
if (b.dataset.bpOff) {
|
|
@@ -23,7 +23,7 @@ const SOON = 36 * 3600 * 1000;
|
|
|
23
23
|
const day = (iso) => { try { return new Date(iso).toLocaleDateString(undefined, { day: 'numeric', month: 'short' }); } catch { return ''; } };
|
|
24
24
|
|
|
25
25
|
export function css() {
|
|
26
|
-
const href = '
|
|
26
|
+
const href = new URL('./bd-shared.css', import.meta.url).href;
|
|
27
27
|
if (document.querySelector(`link[href="${href}"]`)) return;
|
|
28
28
|
const l = document.createElement('link'); l.rel = 'stylesheet'; l.href = href; document.head.appendChild(l);
|
|
29
29
|
}
|
|
@@ -58,7 +58,7 @@ function joinHtml(S) {
|
|
|
58
58
|
const inp = (id, ph, v, type) => `<input id="${id}" type="${type || 'text'}" class="bdsh-in" placeholder="${esc(ph)}" value="${esc(v || '')}" spellcheck="false" autocomplete="off" aria-label="${esc(ph)}">`;
|
|
59
59
|
const body = J.typed
|
|
60
60
|
? `<b>Join a team</b><p class="bd-amut">Type what the person who made the team gave you.</p>${inp('shHost', 'Board host address', J.host)}${inp('shTeam', 'Team name', J.team)}<div class="bdsh-fr">${inp('shPass', 'Team password', J.password, 'password')}<button type="button" class="bd-btn bdsh-go" data-sh="join"${J.busy ? ' disabled' : ''}>${J.busy ? 'Joining…' : 'Join'}</button></div>`
|
|
61
|
-
: `<b>${first ? 'Join a team to see its boards' : 'Join another team'}</b><p class="bd-amut">Ask whoever made the team for its invite link, then paste it here.</p><div class="bdsh-fr">${inp('shInvite', '
|
|
61
|
+
: `<b>${first ? 'Join a team to see its boards' : 'Join another team'}</b><p class="bd-amut">Ask whoever made the team for its invite link, then paste it here.</p><div class="bdsh-fr">${inp('shInvite', 'Paste the invite link', J.invite)}<button type="button" class="bd-btn bdsh-go" data-sh="join"${J.busy ? ' disabled' : ''}>${J.busy ? 'Joining…' : 'Join'}</button></div>`;
|
|
62
62
|
return `<div class="bdsh-join">${body}${J.err ? `<p class="cs s-risk" role="alert"><i class="cz-dot risk m-warn"></i>${esc(J.err)}</p>` : ''}<button type="button" class="bdsh-alt" data-sh="${J.typed ? 'paste' : 'typed'}">${J.typed ? 'Paste an invite link instead' : 'Type the team name and password instead'}</button><p class="bd-amut bdsh-fine">The team and its password are kept on this computer only.</p></div>`;
|
|
63
63
|
}
|
|
64
64
|
|
|
@@ -58,8 +58,10 @@ import * as BP2 from './bd-pane.js'; // the Board as the first panel: fit(), t
|
|
|
58
58
|
const VIEW_KEY = 'pmos.board.view', PVIEW_KEY = 'pmos.board.pview', SPAN_KEY = 'pmos.board.span', GROUPING_KEY = 'pmos.board.grouping';
|
|
59
59
|
let M = null; // the model
|
|
60
60
|
let TR = null; // the trail (GET /api/board-trail): { usual, themes, items: { [id]: item } }
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
const PACK_VIEW = window.PMOS_READONLY && window.PMOS_READONLY.view; // a published copy opens on the view the publisher was in (board-publish R21)
|
|
62
|
+
const VIEWS = ['track', 'stages', 'time', 'list'];
|
|
63
|
+
let view = window.PMOS_READONLY ? (VIEWS.includes(PACK_VIEW) ? PACK_VIEW : 'track') : VIEWS.includes(store.get(VIEW_KEY)) ? store.get(VIEW_KEY) : 'track';
|
|
64
|
+
let pview = window.PMOS_READONLY ? (view === 'time' ? 'time' : 'track') : ['list', 'stages', 'track', 'time'].includes(store.get(PVIEW_KEY)) ? store.get(PVIEW_KEY) : 'list'; // a phone's view (BdPhone)
|
|
63
65
|
let span = SPANS.some(([k]) => k === store.get(SPAN_KEY)) ? store.get(SPAN_KEY) : 'quarter';
|
|
64
66
|
let tab = 'ini';
|
|
65
67
|
let SH_N = 0; let SH_FULL = false; let SH_LOADED = false; // the Shared tab's number, whether it has read the teams, whether the first count was asked
|
|
@@ -850,7 +852,7 @@ $('#bdFilter').addEventListener('click', (e) => Acts.open.filter(e.currentTarget
|
|
|
850
852
|
$('#newIni').addEventListener('click', (e) => { if (e.isTrusted) Asks.openNewMenu(e.currentTarget); else Acts.open.new(e.currentTarget); });
|
|
851
853
|
$('#bdBell').addEventListener('click', (e) => { if (M) Acts.open.bell(e.currentTarget); });
|
|
852
854
|
// Publish a read-only copy (initiative board-publish, slice 2): one board at a time, so it is not drawn on the All products page
|
|
853
|
-
$('#bdPublish').addEventListener('click', (e) => { const btn = e.currentTarget; if (M && !ALL && M.board.ws) import('./bd-publish.js').then((P) => P.open(btn, { ws: M.board.ws, board: M.board.id || M.board.ws })); });
|
|
855
|
+
$('#bdPublish').addEventListener('click', (e) => { const btn = e.currentTarget; if (M && !ALL && M.board.ws) import('./bd-publish.js').then((P) => P.open(btn, { ws: M.board.ws, board: M.board.id || M.board.ws, view })); });
|
|
854
856
|
|
|
855
857
|
/* ── tabs: Initiatives and Documents (Documents has no frame yet: a plain list) ──────────────────────────────────────────────────────── */
|
|
856
858
|
function setTab(t) {
|
|
@@ -19,6 +19,8 @@ export const RO = !!PACK;
|
|
|
19
19
|
export const VIEW_CONTROLS = [
|
|
20
20
|
// the Timeline: the span, a column's sort, back to today, the Deliveries lane, the folds, an initiative's name (opens its viewer)
|
|
21
21
|
'#bdSpans button', '.tg-chd', '.tg-tback', '.dl-fb', '.dl-dn', '.dl-e[aria-label*="press to open"]', '.bd-fold', '.bd-prdb', 'label.tg-n', 'button.tg-n.ini2',
|
|
22
|
+
// the stage track: the switch between it and the Timeline (the two views a publisher shares), an initiative's name, the Monitor and Evaluate fold
|
|
23
|
+
'#ibTabs [data-v="track"]', '#ibTabs [data-v="time"]', 'button.bt-nm', '#fold',
|
|
22
24
|
// the viewer: the layout, the close, the folds, the Tasks view menu, a stage's fold and its done tasks
|
|
23
25
|
'.cz-vw-ib[aria-label="Arrange"]', '.cz-vw-ib[aria-label="Close the viewer"]', '.cz-pn-menu', '[class*="cz-dv"]',
|
|
24
26
|
'.iv-mctg', '.iv-gx-t', '.iv-ws', '.iv-grp', '.iv-ab-h', '.iv-fr', '.ivx-vb', '.tkc-pop [data-ivs-view]', '.tkc-pop [data-ivs-by]', '.tkc-pop [data-ivs-zoom]',
|
|
@@ -27,16 +29,17 @@ export const VIEW_CONTROLS = [
|
|
|
27
29
|
].join(',');
|
|
28
30
|
|
|
29
31
|
/** The Board's static toolbar and chips: hidden, so the page's own script keeps the elements it holds. */
|
|
30
|
-
const HIDE = ['
|
|
32
|
+
const HIDE = ['#ibTabs [data-v="stages"]', '#ibTabs [data-v="list"]', '#bdView', '#bdSpanPick', '.bd-title', '.bd-vr', '.bd-tabs', '#crumbHost', '#bdFind', '#bdColsw', '#bdSort', '#bdFilter', '#bdBell', '#bdPublish', '#chShared', '#newIni', '.tools-top', '#bdGrpw', '#czFab'];
|
|
31
33
|
/** Controls the code draws that write, or lead to something a share does not hold: removed. */
|
|
32
34
|
const REMOVE = [
|
|
35
|
+
'.po-grip', '.bd-nxa',
|
|
33
36
|
'#bdChipset > :not(.tg-lgd)', '#askDates', '.tg-ft',
|
|
34
37
|
'.cz-vw-ib[aria-label="Discuss in chat"]', '.cz-vw-ib[aria-label="More"]', '.iv-addp', '.iv-prog', '.iv-plus', '.iv-car', '.iv-scgn', '.iv-gx-a',
|
|
35
38
|
'.ab-lk', '[data-ivs-view="kanban"]', '.ivs-cols', '.ivs-h:has(+ .ivs-cols)', '[data-ivs-more]', '.iv-tasks:has(.iv-q)', '.iv-th .iv-ib', '.iv-th .iv-plus',
|
|
36
39
|
];
|
|
37
40
|
/** Controls whose words are the content (a title, a date, a name, a program's milestone in the Deliveries lane): set as plain text, same look. A program's
|
|
38
41
|
* milestone opens the program's charter in the workspace; a share does not hold the charter. */
|
|
39
|
-
const PLAIN = ['button.dl-e[aria-label*="Program milestone"]:not([aria-label*="press to open"])', 'button.cz-vw-rn', 'button.iv-tt', 'button.iv-dc', 'button.iv-stc', 'button.iv-dtc', 'button.iv-wf', 'button.iv-cb', 'button.tg-pgo', 'button.tg-end'];
|
|
42
|
+
const PLAIN = ['button.dl-e[aria-label*="Program milestone"]:not([aria-label*="press to open"])', 'button.cz-vw-rn', 'button.iv-tt', 'button.iv-dc', 'button.iv-stc', 'button.iv-dtc', 'button.iv-wf', 'button.iv-cb', 'button.tg-pgo', 'button.bt-pgo', 'button.tg-end'];
|
|
40
43
|
/** A fold whose body goes with it: Documents and Linked are not listed. */
|
|
41
44
|
const WITH_BODY = ['[data-iv-fold="docs"]', '[data-iv-docs]', '[data-iv-fold="linked"]'];
|
|
42
45
|
|