create-pmos 0.552.0 → 0.553.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.552.0",
3
+ "version": "0.553.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,19 @@
33
33
  "audit"
34
34
  ],
35
35
  "pmosChanges": [
36
+ {
37
+ "v": "0.553.0",
38
+ "at": "2026-11-10T22:27:26.069Z",
39
+ "f": 4,
40
+ "prs": [
41
+ {
42
+ "n": 1282,
43
+ "t": "The Board groups By goal in every view and on a shared Board link",
44
+ "s": "The Board groups By goal in every view and on a shared Board link",
45
+ "k": "new"
46
+ }
47
+ ]
48
+ },
36
49
  {
37
50
  "v": "0.552.0",
38
51
  "at": "2026-11-10T22:15:08.780Z",
@@ -351,19 +364,6 @@
351
364
  "k": "fix"
352
365
  }
353
366
  ]
354
- },
355
- {
356
- "v": "0.533.0",
357
- "at": "2026-11-04T19:35:12.134Z",
358
- "f": 4,
359
- "prs": [
360
- {
361
- "n": 1249,
362
- "t": "Component slots on report slides",
363
- "s": "Component slots on report slides",
364
- "k": "new"
365
- }
366
- ]
367
367
  }
368
368
  ]
369
369
  }
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@8fe462f4
1
+ kernel-source: pmos@a240b60e
2
2
  assembled: 2026-11-10
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-10T22:15:06Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-10T22:27:20Z"}
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-10T22:15:06Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-10T22:27:20Z"}
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-10T22:15:06Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-10T22:27:20Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -1,4 +1,17 @@
1
1
  [
2
+ {
3
+ "v": "0.553.0",
4
+ "at": "2026-11-10T22:27:26.069Z",
5
+ "f": 4,
6
+ "prs": [
7
+ {
8
+ "n": 1282,
9
+ "t": "The Board groups By goal in every view and on a shared Board link",
10
+ "s": "The Board groups By goal in every view and on a shared Board link",
11
+ "k": "new"
12
+ }
13
+ ]
14
+ },
2
15
  {
3
16
  "v": "0.552.0",
4
17
  "at": "2026-11-10T22:15:08.780Z",
@@ -53,7 +53,7 @@ The weekly update in Home follows the same rules. Claude drafts it only when som
53
53
  - A program comes first. Its band shows the stage spread of its initiatives, the next milestone and how many initiatives are ready for it. Under the band, the initiatives sit under a small heading for each product. Then each product has its own group.
54
54
  - A product's group head works like a program's: press the product's tile or name to open its page in Home's Viewer. Press the chevron to fold the group. This works in every view: the stage track, Kanban, the timeline and List. On a shared board, the product's name is plain text.
55
55
  - To group by product only, press the tune button in the top row and choose **By product** under **Group**. A program member then shows a small layers icon and stays under its product in every view, the timeline included.
56
- - **By goal** is the stage track's first grouping. Each goal row shows the goal's name, its KR id and its reading ("KR-A1 · no reading yet"), the spread of its initiatives over the steps, and in the Next column its target and where the reading comes from. A health budget is a goal too: its cap is the target, and its share of the open initiatives is its reading. The goals come from your OKR file and your health budgets; nothing is typed here. An initiative whose anchor names no goal sits under **No goal yet**. Choose **Programs first** or **By product** under **Group** for the other groupings; Kanban, the timeline and List keep the programs.
56
+ - **By goal** is the Board's first grouping, in every view: the stage track, By stage, the timeline and List, and on a shared Board link. Each goal row shows the goal's name, its KR id and its reading ("KR-A1 · no reading yet"), the spread of its initiatives over the steps, and in the Next column its target and where the reading comes from. A health budget is a goal too: its cap is the target, and its share of the open initiatives is its reading. The goals come from your OKR file and your health budgets; nothing is typed here. An initiative whose anchor names no goal sits under **No goal yet**. On By stage each goal is a swimlane, on the timeline and in List a row over its initiatives; each one folds. Choose **Programs first** or **By product** under **Group** for the other groupings.
57
57
  - The **Next** column says what Claude does next, with ✦, for example "Claude writes the experiment" or "Claude reads the outcome". It does not ask you to write a document. Only your calls show in blue with a person icon: **Your call** · did it work?, move it to the next stage, send the drafted tickets to Jira, and the release sign-off. Ticket and task counts stay.
58
58
  - **Kanban** shows programs as swimlanes, then products. Press a column header to fold the column to a strip with its count. An empty column starts folded. The Board remembers each fold.
59
59
  - The **timeline** draws a program row that brackets its initiatives' bars, on every span. Program milestones are diamonds. Milestones that are close together merge into one diamond with a count.
@@ -6,7 +6,8 @@
6
6
  * 200 { ok, pack } | 202 { ok, state: 'reading' } | 400 { ok: false, error } (a selection the board does not hold, or too big)
7
7
  * The data pack of a selection (lib/board-pack.js): the Board's own GET answers, read from the routes the Board reads, whitelisted and swept for what the
8
8
  * selection does not hold. A program or a product also carries its one page (GET /api/ready-reports/dashboard, batch 21 item 2) and its tasks
9
- * (GET /api/boards/items), as a teammate may see them (lib/board-pack.js teammateDash). Read-only: it writes nothing and publishes nothing. Publishing is a page press that comes with slice 2, after D103. The
9
+ * (GET /api/boards/items), as a teammate may see them (lib/board-pack.js teammateDash). It carries the goals of the rows it keeps
10
+ * (GET /api/artefacts/goals?ws=, batch 29 item 4), so the copy draws By goal as the Board does. Read-only: it writes nothing and publishes nothing. Publishing is a page press that comes with slice 2, after D103. The
10
11
  * read-only Board opens a pack with ?pack=<url>. */
11
12
  const Pack = require('./board-pack.js');
12
13
  const BoardPremium = require('./routes-board-premium.js');
@@ -66,7 +67,22 @@ module.exports = {
66
67
  if (st.body && st.body.ok && st.body.story) answers[sk] = st.body;
67
68
  }
68
69
  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') || '' };
69
- ctx.json(res, { ok: true, pack: Pack.buildPack({ ws, board, selection, answers, meta }) });
70
+ const pack = Pack.buildPack({ ws, board, selection, answers, meta });
71
+ // By goal (board AwH, batch 29 item 4): the goals of the rows the copy keeps, read for those rows only, so a budget's share counts no row
72
+ // the copy does not hold. The copy asks it by ws alone (pm/bd-goal.js readGoals)
73
+ const gk = '/api/artefacts/goals?ws=' + encodeURIComponent(ws);
74
+ const kept = Object.keys(pack.responses).filter((k) => k.startsWith('/api/board-premium?')).map((k) => pack.responses[k]);
75
+ const anchors = [].concat(...kept.map((x) => ((x && x.model && x.model.initiatives && x.model.initiatives.list && x.model.initiatives.list.rows) || [])))
76
+ .filter((r) => r && !r.ended && r.anchor).map((r) => String(r.anchor));
77
+ if (anchors.length) {
78
+ const g = await via(require('./routes-artefacts.js'), gk + anchors.map((a) => '&a=' + encodeURIComponent(a)).join(''), req, ctx);
79
+ if (g.body && g.body.ok && (g.body.goals || []).length) {
80
+ pack.responses[gk] = { ok: true, ws, goals: g.body.goals, of: g.body.of || {} };
81
+ const sorted = {}; for (const k of Object.keys(pack.responses).sort()) sorted[k] = pack.responses[k];
82
+ pack.responses = sorted; Pack.assertSize(pack);
83
+ }
84
+ }
85
+ ctx.json(res, { ok: true, pack });
70
86
  } 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); }
71
87
  return true;
72
88
  },
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.552.0",
3
+ "version": "0.553.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pmos-workspace",
9
- "version": "0.552.0",
9
+ "version": "0.553.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.552.0",
3
+ "version": "0.553.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",
@@ -5,6 +5,12 @@
5
5
  * then "No goal yet". null when no row's anchor names a goal (zero is silence)
6
6
  * goalHeadHtml(g, o) → the Track's goal row: the goal icon, its name, "KR-A1 · no reading yet", the spread of its initiatives over the steps,
7
7
  * and in the Next column its target and where the reading comes from. o: { steps, plain, open }
8
+ * asGroups(rows, R, sort) → [{ kind: 'goal', key, goal, name, rows }] | null goalGroups shaped as the Board's groups, so every view draws them
9
+ * (batch 29 item 4): By stage, the Timeline and the List, and the shared Board link, as the Track does
10
+ * laneHtml(g, open) → By stage: a goal's swimlane head (the goal icon, its name, its meta, its target), and its fold
11
+ * cellHtml(g, dots) → the Timeline: a goal's name cell (pm/bd-span.js laneRow, as a product's prodCell), the fold over the whole of it
12
+ * listHeadHtml(g, open) → the List: a goal's head row over its initiatives
13
+ * labelHtml(g) → a phone's By stage: the small label over a goal's cards
8
14
  *
9
15
  * A goal is never typed here: it is read from the OKR file and the health budgets (lib/board-goals.js). The stages stay derived. */
10
16
  import { pmGet } from './http.js';
@@ -15,6 +21,7 @@ const TARGET = 'M12 4a8 8 0 1 0 0 16a8 8 0 0 0 0-16zM12 8.5a3.5 3.5 0 1 0 0 7a3.
15
21
  const CHEV_D = 'M7 10l5 5 5-5', CHEV_R = 'M10 7l5 5-5 5';
16
22
  const plural = (n, a, b) => (n === 1 ? a : b);
17
23
  const NONE = 'goal:none';
24
+ const NONE_META = 'PMOS anchors each one to a goal';
18
25
 
19
26
  const CACHE = new Map(); // ws|anchors → { goals, of }
20
27
  /** Each open row's anchor goes once per row, so a budget's share counts the rows. */
@@ -22,7 +29,9 @@ export async function readGoals(ws, rows) {
22
29
  const A = (rows || []).filter((r) => r && !r.ended).map((r) => String(r.anchor || ''));
23
30
  const key = (ws || '') + '|' + A.join(',');
24
31
  if (CACHE.has(key)) return CACHE.get(key);
25
- const q = new URLSearchParams(); if (ws) q.set('ws', ws); for (const a of A) q.append('a', a);
32
+ // a shared Board link (pm/readonly.js): its pack holds one goals answer for the rows it keeps, asked by ws alone (lib/board-pack-route.js)
33
+ const ro = typeof window !== 'undefined' && !!window.PMOS_READONLY;
34
+ const q = new URLSearchParams(); if (ws) q.set('ws', ws); if (!ro) for (const a of A) q.append('a', a);
26
35
  const r = await pmGet('/api/artefacts/goals?' + q.toString()).catch(() => null);
27
36
  const v = r && r.ok ? { goals: r.goals || [], of: r.of || {} } : null;
28
37
  if (v) CACHE.set(key, v);
@@ -51,7 +60,7 @@ export function goalHeadHtml(g, o = {}) {
51
60
  const band = lo >= 0 && !o.plain ? `<span class="bd-spb" style="left:calc(${pc(lo)} + 4px);width:calc(${pc(hi - lo + 1)} - 8px)"></span>` : '';
52
61
  const lab = `<span class="bd-spl" style="left:calc(${pc(lo >= 0 && !o.plain ? lo : 0)} + 14px)">${esc(words)}</span>`;
53
62
  const title = x ? x.title : 'No goal yet';
54
- const meta = x ? x.meta : 'Claude anchors each one to a goal';
63
+ const meta = x ? x.meta : NONE_META;
55
64
  const dl = x ? `<div class="bd-pm"><b>${esc(x.target || '')}</b></div>${x.from ? `<div class="t3">${esc(x.from)}</div>` : ''}` : '';
56
65
  return `<div class="bt-r bt-pg bt-goal${x && x.over ? ' over' : ''}" role="row" data-goal="${esc(g.key)}">`
57
66
  + `<div class="bt-pgn" role="rowheader"><span class="bt-pgo bt-gln" title="${esc(x && x.objective ? x.objective : title)}"><span class="bd-pti">${SV(TARGET)}</span><span class="tt"><b>${esc(title)}</b><span class="m">${esc(meta)}</span></span></span>`
@@ -59,3 +68,31 @@ export function goalHeadHtml(g, o = {}) {
59
68
  + `<div class="bt-spread" role="cell">${band}${lab}</div>`
60
69
  + `<div class="bt-dl" role="cell">${dl}</div></div>`;
61
70
  }
71
+
72
+ /** goalGroups as the Board's groups (pm/bd-prog.js groupsOf shape): kind 'goal', the goal's name as the group's name. sort(rows) orders each goal's rows. */
73
+ export function asGroups(rows, R, sort) {
74
+ const G = goalGroups(rows, R);
75
+ return G ? G.map((g) => ({ kind: 'goal', key: g.key, goal: g.goal, name: g.goal ? g.goal.title : 'No goal yet', rows: sort ? sort(g.rows) : g.rows })) : null;
76
+ }
77
+ export const goalIcon = (n) => `<span class="bd-pti">${SV(TARGET, n)}</span>`;
78
+ const words = (g) => { const x = g.goal; return { title: x ? x.title : 'No goal yet', meta: x ? x.meta : NONE_META, target: x ? x.target || '' : '', tip: x && x.objective ? x.objective : '' }; };
79
+ const foldBtn = (g, open, label, cls = 'bd-ib sm bd-fold') => `<button type="button" class="${cls}" data-fold="${esc(g.key)}" aria-expanded="${open}" aria-label="${open ? 'Fold' : 'Show'} ${esc(label)}" title="${open ? 'Fold' : 'Show'}">${SV(open ? CHEV_D : CHEV_R)}</button>`;
80
+ /** By stage: the goal's swimlane head. The name opens nothing (a goal's page is in Intelligence), so it is plain text. */
81
+ export function laneHtml(g, open) {
82
+ const w = words(g);
83
+ return `<span class="bd-gln${g.goal && g.goal.over ? ' over' : ''}"${w.tip ? ` title="${esc(w.tip)}"` : ''}>${goalIcon()}<span class="tt"><b>${esc(w.title)}</b><span class="m">${esc(w.meta)}</span></span></span>`
84
+ + `<span class="bd-sp"></span>${w.target ? `<span class="bd-glt">${esc(w.target)}</span>` : ''}${foldBtn(g, open, w.title)}`;
85
+ }
86
+ /** The Timeline: the goal's name cell. The whole of it folds, as a product's fold part does; folded, it counts its initiatives. */
87
+ export function cellHtml(g, open, dots) {
88
+ const w = words(g), n = g.rows.length;
89
+ return `<span class="bd-prdb bd-glb"><button type="button" class="bd-prdf bd-fold" data-fold="${esc(g.key)}" aria-expanded="${open}" aria-label="${esc(w.title)}, ${n} ${plural(n, 'initiative', 'initiatives')}. ${open ? 'Fold' : 'Show'}" title="${esc(w.tip || (open ? 'Fold' : 'Show'))}">`
90
+ + `${goalIcon()}<span class="tt"><b>${esc(w.title)}</b><span class="m">${esc(w.meta)}</span></span><span class="bd-sp"></span>${dots || ''}${open || dots !== undefined ? '' : `<span class="n">${n}</span>`}${SV(open ? CHEV_D : CHEV_R)}</button></span>`;
91
+ }
92
+ /** The List: the goal's head row over its rows. */
93
+ export function listHeadHtml(g, open) {
94
+ const w = words(g);
95
+ return `<div class="bd-lt gh${g.goal && g.goal.over ? ' over' : ''}" role="row"><span role="rowheader" class="bd-gln"${w.tip ? ` title="${esc(w.tip)}"` : ''}>${goalIcon()}<span class="tt"><b>${esc(w.title)}</b><span class="m">${esc(w.meta)}${w.target ? ' · ' + esc(w.target) : ''}</span></span></span>${foldBtn(g, open, w.title)}</div>`;
96
+ }
97
+ /** A phone's By stage: the small label over a goal's cards in a stage. */
98
+ export const labelHtml = (g) => `<p class="bd-sl gl">${goalIcon(14)}${esc(words(g).title)}</p>`;
@@ -11,6 +11,7 @@
11
11
  import { nameHtml } from './split-merge.js'; // Claude suggests a split or a merge: the purple dot after the name (batch 11 item 14)
12
12
  import { esc } from './premium-shell.js';
13
13
  import * as WF from './bd-wf.js';
14
+ import * as GL from './bd-goal.js'; // By goal in every view (batch 29 item 4): a goal's head over its rows
14
15
  import { nextHtml } from './bd-next.js';
15
16
  import { stageName, stageChip } from './stage-chip.js'; // W1: the one stage
16
17
  import { provenStatus, NO_SIGNAL } from './status-proof.js'; // T3: a status renders only with its source and read time
@@ -92,7 +93,9 @@ function listRow(r, pg) {
92
93
  }
93
94
  export function listHtml(L, filtered) {
94
95
  const S = M().steps || [];
95
- const pg = !!(A.groups && A.groups(L)), C = pg ? PCOLS : COLS;
96
+ // the Product and Program columns: when a program holds a row here. By goal (batch 29 item 4) puts each goal's rows under its head row
97
+ const G = A.groups ? A.groups(L) : null, GG = G && G[0] && G[0].kind === 'goal' ? G : null;
98
+ const pg = !!(GG ? A.progGroups && A.progGroups(L) : G), C = pg ? PCOLS : COLS;
96
99
  if (!pg && (sortBy === 'product' || sortBy === 'program')) sortBy = 'need';
97
100
  const by = sortBy || (pg && M().board.all ? 'product' : 'need');
98
101
  const all = L.slice().sort(SORTS[by] || SORTS.need);
@@ -103,7 +106,9 @@ export function listHtml(L, filtered) {
103
106
  const fold = meTotal ? (meOpen
104
107
  ? me.map((r) => listRow(r, pg)).join('') + `<div class="bd-lt foot" role="row"><span class="bd-amut">Monitor and Evaluate · ${meTotal}${meTotal > me.length ? ' · ' + (meTotal - me.length) + ' more are not loaded' : ''}</span><button type="button" class="bd-btn sm" data-me aria-expanded="true">Fold them</button></div>`
105
108
  : `<div class="bd-lt foot" role="row"><span class="bd-amut">${meTotal} more in Monitor and Evaluate · sorted below</span><button type="button" class="bd-btn sm" data-me aria-expanded="false">Show them</button></div>`) : '';
106
- return `<div class="bd-ltw${pg ? ' pg' : ''}" role="table" aria-label="Initiatives">${head}${top.map((r) => listRow(r, pg)).join('')}${fold}</div><p class="bd-foot">${by === 'product' ? 'Sorted by product. Press Program to sort by program instead; a row with no program leaves the cell empty.' : 'Press a column title to sort. Press a row to open its panel, the same panel as the stage track.'}</p>`;
109
+ const body = GG ? GG.map((g) => { const rs = top.filter((r) => g.rows.includes(r)), open = !A.folded(g.key); return rs.length ? GL.listHeadHtml(g, open) + (open ? rs.map((r) => listRow(r, pg)).join('') : '') : ''; }).join('')
110
+ : top.map((r) => listRow(r, pg)).join('');
111
+ return `<div class="bd-ltw${pg ? ' pg' : ''}${GG ? ' gg' : ''}" role="table" aria-label="Initiatives">${head}${body}${fold}</div><p class="bd-foot">${by === 'product' ? 'Sorted by product. Press Program to sort by program instead; a row with no program leaves the cell empty.' : 'Press a column title to sort. Press a row to open its panel, the same panel as the stage track.'}</p>`;
107
112
  }
108
113
 
109
114
  /* ── By stage (BdByStage, PgKanban; WfABoard, WfABoardOne, WfAPhone): programs as swimlanes, then the product; any column folds to a strip ──── */
@@ -170,7 +175,7 @@ const msI = (ms) => (ms ? '<i class="cz-ms" aria-hidden="true"></i>' : '');
170
175
  function phoneStages(L, C) {
171
176
  const { cur } = WFS();
172
177
  const G = A.groups ? A.groups(L) : null;
173
- const lanes = G ? G.map((g) => ({ g, label: g.kind === 'program' ? `<p class="bd-sl pg">${A.progTile('bd-pti s')}${esc(g.program.title)}</p>` : `<p class="bd-sl">${A.subTile(g.name)}${esc(g.name)}</p>`, rows: g.rows })) : [{ g: null, label: '', rows: L }];
178
+ const lanes = G ? G.map((g) => ({ g, label: g.kind === 'program' ? `<p class="bd-sl pg">${A.progTile('bd-pti s')}${esc(g.program.title)}</p>` : g.kind === 'goal' ? GL.labelHtml(g) : `<p class="bd-sl">${A.subTile(g.name)}${esc(g.name)}</p>`, rows: g.rows })) : [{ g: null, label: '', rows: L }];
174
179
  const empty = [];
175
180
  const secs = C.filter((c) => !c.end).map((c) => {
176
181
  const at = (rows) => rows.filter(c.has).sort((a, b) => needOf(a) - needOf(b));
@@ -225,7 +230,7 @@ export function stagesHtml(L, o = {}) {
225
230
  let body = '';
226
231
  lanes.forEach((ln, li) => {
227
232
  const g = ln.g, open = !g || !A.folded(g.key);
228
- if (g) { body += `<div class="bd-lh ${g.kind === 'program' ? 'pg' : 'pd'}" style="grid-row:${row}">${A.laneHead(g)}</div>`; row++; }
233
+ if (g) { body += `<div class="bd-lh ${g.kind === 'program' ? 'pg' : g.kind === 'goal' ? 'pd gl' : 'pd'}" style="grid-row:${row}">${A.laneHead(g)}</div>`; row++; }
229
234
  if (!open) return;
230
235
  ln.subs.forEach((sub, si) => {
231
236
  if (sub.sub) { body += `<div class="bd-ls" style="grid-row:${row}">${A.subTile(sub.name)}${esc(sub.name)}</div>`; row++; }
@@ -1565,3 +1565,18 @@ span.tg-ng { cursor: default; }
1565
1565
  #moreMenu #bdPublish .bpn[hidden] { display: none; }
1566
1566
  /* a row the Board takes out of the shared ⋯ (UI grill U2) stays out: the shell draws its rows as flex */
1567
1567
  #moreMenu [hidden] { display: none !important; }
1568
+
1569
+ /* batch 29 item 4: By goal in every view. A goal's head on By stage (a swimlane), the Timeline (a name cell) and the List (a head row).
1570
+ * A goal opens nothing here, so its name is plain text and the head folds */
1571
+ .bd-gln { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
1572
+ .bd-gln .tt, .bd-glb .tt { min-width: 0; display: flex; flex-direction: column; gap: 1px; line-height: 1.3; text-align: left; }
1573
+ .bd-gln .tt b, .bd-glb .tt b { font-size: var(--fs-row); font-weight: var(--fw-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--cz-ink); line-height: var(--lh-row); }
1574
+ .bd-gln .tt .m, .bd-glb .tt .m { font-size: var(--fs-badge); color: var(--cz-ink2); font-weight: var(--fw-strong); line-height: var(--lh-badge); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
1575
+ .over > .bd-gln .tt .m, .bd-gln.over .tt .m { color: var(--cz-late); }
1576
+ .bd-lh.gl .bd-glt { font-size: var(--fs-meta); color: var(--cz-ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: var(--lh-meta); }
1577
+ .bd-glb .bd-prdf { justify-content: flex-start; min-width: 0; }
1578
+ .bd-glb .bd-sp { flex: 1; }
1579
+ .bd-glb .bd-prdf > svg { margin-left: 6px; }
1580
+ .bd-lt.gh { grid-template-columns: minmax(0, 1fr) auto; min-height: 50px; background: var(--bd-row); }
1581
+ .bd-ltw.pg .bd-lt.gh { grid-template-columns: minmax(0, 1fr) auto; }
1582
+ .bd-gln .bd-pti, .bd-glb .bd-pti { background: var(--bd-progbg); }
@@ -136,7 +136,10 @@ const rowOf = (key) => (M && M.rows || []).find((r) => r.key === key) || goneRow
136
136
  /** The rows on screen grouped (pm/bd-prog.js groupsOf): programs first, then the product; or By product. null when no program holds a row here. */
137
137
  /** In the PM's sort or own order, the same as Home's (batch 14 item 8): the programs and products, then each product's initiatives. A
138
138
  * program's own initiatives keep the program's order. */
139
- const groups = (L) => {
139
+ const groups = (L) => (goalOn() ? goalGroupsOf(L) : progGroups(L));
140
+ /** By goal (board AwH, every view since batch 29 item 4): the goals' groups, each goal's rows in the PM's sort or own order. */
141
+ const goalGroupsOf = (L) => { const pk = prodKey((M.board && (M.board.product || M.board.name)) || ''), lay = SO.layout(); return GL.asGroups(L, GOALS, (rs) => sortInis(pk, rs, lay, INI_ACC)); };
142
+ const progGroups = (L) => {
140
143
  const G = PG.groupsOf(PGS, L, M, byProduct);
141
144
  if (!G) return G;
142
145
  const lay = SO.layout();
@@ -509,9 +512,10 @@ function trackRow(r, cls = '', po = false) {
509
512
  const cellsCls = () => 'bt-cells' + (TK.mode === 'cats' ? ' bands' : TK.mode === 'wf' ? ' wfn' : '');
510
513
  const cellsStyle = () => (TK.mode === 'wf' ? ` style="--n:${Math.max(1, TK.steps.length)}"` : '');
511
514
  const isME = (r) => r.track && r.track.k >= 6;
512
- /** By goal (board AwH): on the Track, when a goal resolves for a row here; else the programs-first grouping draws as before. */
515
+ /** By goal (board AwH): in every view (batch 29 item 4) and on a shared Board link, when a goal resolves for a row here; else the
516
+ * programs-first grouping draws as before. */
513
517
  const goalsHere = () => !!(GOALS && GOALS.goals.length && M && GL.goalGroups(M.initiatives.list.rows, GOALS));
514
- const goalOn = () => grouping === 'goal' && curView() === 'track' && goalsHere();
518
+ const goalOn = () => grouping === 'goal' && goalsHere();
515
519
  function readGoals() {
516
520
  if (!M) return;
517
521
  const rows = M.initiatives.list.rows, sig = ((M.board && M.board.ws) || '') + '|' + rows.map((r) => r.anchor || '').join(',');
@@ -521,7 +525,6 @@ function readGoals() {
521
525
  }
522
526
  function drawTrack(L) {
523
527
  TK = trackMode(L);
524
- readGoals();
525
528
  const S = TK.mode === 'pf' ? M.steps || [] : TK.steps || [];
526
529
  // one product and no program: its initiatives in the PM's sort or own order, the same as Home's (batch 14 item 8); grouped, groups() sorts each
527
530
  const sorted = sortInis(prodKey((M.board && (M.board.product || M.board.name)) || ''), L, SO.layout(), INI_ACC);
@@ -542,7 +545,7 @@ function drawTrack(L) {
542
545
  // Grouped, each product folds its own Monitor and Evaluate rows after the first of each, under "N more" (PgBoard .tf); the foot keeps
543
546
  // only the ones this page has not loaded
544
547
  const GG = goalOn() && TK.mode !== 'cats' ? GL.goalGroups(sorted, GOALS) : null;
545
- const G = GG ? null : groups(sorted);
548
+ const G = GG ? null : progGroups(sorted);
546
549
  let inGroups = 0;
547
550
  const meFold = (rs) => { const seen2 = new Set(), on = [], off = []; for (const r of rs) { if (isME(r) && seen2.has(r.track.k) && !foldOpen) off.push(r); else { if (isME(r)) seen2.add(r.track.k); on.push(r); } } return { on, off }; };
548
551
  // the programs and products are one list the grip arranges, and each product's initiatives another, shared with Home (batch 14 item 8)
@@ -578,7 +581,10 @@ function drawTime(L) {
578
581
  const cols = phone ? null : CO.colsFor(bw - 2, { avatar: (n) => V.avatar(n, 'sm') });
579
582
  colsFit = cols ? cols.keys.length : 1;
580
583
  const nameW = cols ? cols.nw : phone ? 0 : matchMedia('(max-width: 980px)').matches ? 180 : 250;
581
- const T = timelineHtml(L, M, span, { groups: groups(L), progState, folded: PG.folded, prodHtml: (g) => PG.prodHtml(g, 'tg-prd'), prodCell: (g, dots) => PG.prodCell(g, dots), msMode: msMode(), subHtml: (n) => PG.subHtml(n, 'tg-psb'), progTile: () => PG.progTile(), productsOf: PG.productsOf,
584
+ // By goal: a goal's head takes a product's place (pm/bd-goal.js cellHtml); a goal is never a program, so the program rows stay as they are
585
+ const T = timelineHtml(L, M, span, { groups: groups(L), progState, folded: PG.folded,
586
+ prodHtml: (g) => (g.kind === 'goal' ? `<div class="tg-prd tg-gl${PG.folded(g.key) ? ' closed' : ''}" role="row">${GL.cellHtml(g, !PG.folded(g.key))}</div>` : PG.prodHtml(g, 'tg-prd')),
587
+ prodCell: (g, dots) => (g.kind === 'goal' ? GL.cellHtml(g, !PG.folded(g.key), dots) : PG.prodCell(g, dots)), msMode: msMode(), subHtml: (n) => PG.subHtml(n, 'tg-psb'), progTile: () => PG.progTile(), productsOf: PG.productsOf,
582
588
  progRisk: (id) => (M.programForecasts || []).find((x) => x.id === id) || null,
583
589
  foldBtn: (g) => PG.foldBtn(g.key, g.program.title), memberIcon: (id) => PG.memberIcon(PGS, id), sel: peek && peek.kind !== 'acts' ? peek.key : null, status: statusOf, phone, cols, trackPx: bw - 2 - nameW, avatar: (n) => V.avatar(n, 'sm'),
584
590
  askHref: (none) => askHref(null, 'Propose start and end dates for ' + none.map((r) => r.title).join(', ')),
@@ -613,6 +619,7 @@ $('#bdVieww').addEventListener('change', (e) => { const c = e.target.closest('[d
613
619
  $('#bdVieww').addEventListener('keydown', (e) => { if (e.key === 'Escape' && closeMenu('bdViewMenu', 'bdView')) { e.stopPropagation(); $('#bdView').focus(); } });
614
620
  document.addEventListener('click', (e) => { if (!e.target.closest('#bdVieww')) closeMenu('bdViewMenu', 'bdView'); });
615
621
  function drawInit() {
622
+ readGoals(); // By goal in every view (batch 29 item 4): the goals of the rows on screen, read once per set of anchors
616
623
  const phone = small(), L = visible(), v = curView();
617
624
  const body = $('#ibBody');
618
625
  body.dataset.view = v; body.dataset.span = v === 'time' ? span : '';
@@ -1214,12 +1221,12 @@ function openFindings(r, from) {
1214
1221
  FCC.init({ rowOf: (k) => rowOf(k), openFindings });
1215
1222
  const openIniAny = (r) => { if (r && curView() === 'time') TL.reveal(r.key); openIni(r, $('#chNeed') || $('#bdFind'), 'track'); };
1216
1223
  V.init({ M: () => M, wf: wfState, statusOf, usual: usualOf, trail: TI, docMeta, sel: () => (peek && peek.kind !== 'acts' ? peek.key : null), docSel: () => Acts.docSel(),
1217
- groups: (L) => groups(L), folded: PG.folded, laneHead: (g) => PG.laneHtml(g, g.kind === 'program' ? progState(g.program) : null), subTile: (n) => PG.tileHtml(n, 'bd-ti s'),
1224
+ groups: (L) => groups(L), folded: PG.folded, laneHead: (g) => (g.kind === 'goal' ? GL.laneHtml(g, !PG.folded(g.key)) : PG.laneHtml(g, g.kind === 'program' ? progState(g.program) : null)), progGroups: (L) => progGroups(L), subTile: (n) => PG.tileHtml(n, 'bd-ti s'),
1218
1225
  memberIcon: (id) => PG.memberIcon(PGS, id), product: () => (M.board.product || M.board.name || ''), programOf: (r) => programOf(PGS, r.ws || M.board.ws || '', r.id), tileHtml: PG.tileHtml, progTile: PG.progTile });
1219
1226
  Asks.init({ M: () => M, load, say, panel: actsPanel, close: closePanel, rowOf, openIni: openIniAny, openDoc: viewDoc, anchors, programs: () => PGS, reloadPrograms: loadPrograms });
1220
1227
  Acts.init({ M: () => M, wf: wfState, load, say, panel: actsPanel, close: closePanel, redraw: () => { drawChips(); drawInit(); }, F, rowOf, statusOf, openIni: openIniAny,
1221
1228
  openTicket: (ini, tk) => openTicket(ini, tk, $('#bdFind')), askHref, pageHref, trail: TI, docMeta, loadDocMeta, viewDoc,
1222
- grouping: () => ({ on: groupingOn(), byProduct, by: grouping === 'goal' && !(curView() === 'track' && goalsHere()) ? (groupingOn() ? 'program' : 'product') : grouping, goal: curView() === 'track' && goalsHere() }), setGrouping, sprintFilter: sprintFilterOn, timeline: () => curView() === 'time',
1229
+ grouping: () => ({ on: groupingOn(), byProduct, by: grouping === 'goal' && !goalsHere() ? (groupingOn() ? 'program' : 'product') : grouping, goal: goalsHere() }), setGrouping, sprintFilter: sprintFilterOn, timeline: () => curView() === 'time',
1223
1230
  tune: tuneParts, sprintOnly, toggleSprintOnly: () => { if (F.chips.has('sprint')) F.chips.delete('sprint'); else F.chips.add('sprint'); }, sortPick, refreshJira: () => refreshJira() });
1224
1231
  BI.mount({ M: () => M, statusOf, dayTitle, usual: usualOf, fmt, md, ago, segHtml, barHtml: V.barHtml, grill: (id) => GR[id], rowOf, pageHref, askHref, refreshJira: () => refreshJira(), viewDoc,
1225
1232
  send: (r) => import('./tk-send.js').then((S) => S.openSend({ ws: r.ws || M.board.ws || null, board: r.boardId || M.board.id, initiative: r.id, toast: say })),