create-pmos 0.766.0 → 0.767.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.766.0",
3
+ "version": "0.767.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.767.0",
38
+ "at": "2026-11-24T07:34:38.820Z",
39
+ "f": 4,
40
+ "prs": [
41
+ {
42
+ "n": 1727,
43
+ "t": "Let the work breakdown Gantt scroll sideways",
44
+ "s": "Let the work breakdown Gantt scroll sideways",
45
+ "k": "fix"
46
+ }
47
+ ]
48
+ },
36
49
  {
37
50
  "v": "0.766.0",
38
51
  "at": "2026-11-24T07:23:50.157Z",
@@ -357,19 +370,6 @@
357
370
  "k": "x"
358
371
  }
359
372
  ]
360
- },
361
- {
362
- "v": "0.747.0",
363
- "at": "2026-11-23T13:39:39.287Z",
364
- "f": 4,
365
- "prs": [
366
- {
367
- "n": 1676,
368
- "t": "A guided tour, press Next to walk through a workspace",
369
- "s": "A guided tour, press Next to walk through a workspace",
370
- "k": "new"
371
- }
372
- ]
373
373
  }
374
374
  ]
375
375
  }
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@e6956da5
1
+ kernel-source: pmos@33c3874f
2
2
  assembled: 2026-11-24
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-24T07:23:46Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-24T07:34:35Z"}
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-24T07:23:46Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-24T07:34:35Z"}
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-24T07:23:46Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-24T07:34:35Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -1,4 +1,17 @@
1
1
  [
2
+ {
3
+ "v": "0.767.0",
4
+ "at": "2026-11-24T07:34:38.820Z",
5
+ "f": 4,
6
+ "prs": [
7
+ {
8
+ "n": 1727,
9
+ "t": "Let the work breakdown Gantt scroll sideways",
10
+ "s": "Let the work breakdown Gantt scroll sideways",
11
+ "k": "fix"
12
+ }
13
+ ]
14
+ },
2
15
  {
3
16
  "v": "0.766.0",
4
17
  "at": "2026-11-24T07:23:50.157Z",
@@ -2,7 +2,7 @@
2
2
  type: Guide
3
3
  title: "Layout and first run: the places, the navigation, the Viewer, the launcher and Adler"
4
4
  description: "The places, the navigation at the left, the Viewer, the keys and the phone; the first run; when features appear; the PMOS app; and Adler."
5
- timestamp: 2026-11-23
5
+ timestamp: 2026-11-24
6
6
  ---
7
7
 
8
8
  # Layout and first run
@@ -188,7 +188,7 @@ Press the rest of a row, or a milestone, to open it as a full popup in place of
188
188
  On a phone, in a shared read-only copy and in a breakdown given the whole popup, the work side keeps the three parts below. They use the full width of the popup: in a wide popup the timeline gets the extra width. A done task shows in grey text, never struck through.
189
189
 
190
190
  - **Overview.** Three short lines from the initiative's own records: **Problem**, **Goal** (with the goal it serves, by name) and **Done when**. A line with no record says **Not written yet.** and offers a draft with ✓ and ✕. Press a line to change it; it saves when you leave the field, with **Undo**. Then one line on where it stands, **PMOS suggests** (at most three, each with ✓ and ✕), and **Details ›** for the facts: Stage, Status, Start, Target end, Next milestone, Goal, Product, Program, Workflow and Open. A fact with no value is not shown. Goal, Product, Program and Next milestone are in the link colour and open their thing; the others are plain text. An initiative that is closed or done but has open tasks shows one suggestion: **Close them** or **Reopen**.
191
- - **Work breakdown.** Each stage is a row that folds and says how much is done, for example "3 of 9 done". Only the stage in progress opens by itself, and a stage whose tasks are all done stays folded until you open it. In a stage, the tasks are in date order, a late task first; a done task stays in its place, in grey. In a long stage you see the late tasks, the tasks in progress and the next five, then **N more tasks**. The stages after the next one fold to one row. A task in no stage is not in the breakdown: it is in Work › Backlog, and one quiet line under the breakdown says how many, for example **2 tasks with no stage are in the Backlog ›**. A task with no date shows no date and is never late. The timeline is on the right, with **Today** on it. Drag the grip between the columns and the timeline to make the timeline wider or narrower; a double press puts it back. Choose its span (Quarter to Full) beside the tune icon, which shows or hides columns. The four-corners icon gives the breakdown the whole popup. Type in the last row of a stage to add a task; the **Task** choice beside it makes the next one a milestone.
191
+ - **Work breakdown.** Each stage is a row that folds and says how much is done, for example "3 of 9 done". Only the stage in progress opens by itself, and a stage whose tasks are all done stays folded until you open it. In a stage, the tasks are in date order, a late task first; a done task stays in its place, in grey. In a long stage you see the late tasks, the tasks in progress and the next five, then **N more tasks**. The stages after the next one fold to one row. A task in no stage is not in the breakdown: it is in Work › Backlog, and one quiet line under the breakdown says how many, for example **2 tasks with no stage are in the Backlog ›**. A task with no date shows no date and is never late. The timeline is on the right, with **Today** on it. Drag the grip between the columns and the timeline to make the timeline wider or narrower; a double press puts it back. Choose its span (Quarter to Full) beside the tune icon, which shows or hides columns. A span shorter than the work opens on the period that holds today; scroll the timeline sideways to see the rest, with a sideways swipe on a trackpad, Shift and the mouse wheel, or by dragging its empty part. The item, status and date columns stay in place, and a thin bar under the dates shows where you are. A program's or a product's initiatives scroll the same way. The four-corners icon gives the breakdown the whole popup. Type in the last row of a stage to add a task; the **Task** choice beside it makes the next one a milestone.
192
192
  - **Status.** Press a task's status and pick the new one. **When did this happen?** shows under the list, with **Today** chosen: press the status again, or Enter, to keep today. Press **Yesterday**, or **Pick a date**, when the work moved earlier than you noted it. A day in the future, or a day before the task's previous move, cannot be picked. The toast says both days, for example "Done on 14 Nov, noted today.", with **Undo**.
193
193
  - **Open the task.** The ↗ on a row, or **Open the task** in its ⋯, opens a small popup on top: Task or Milestone, the name (press it to rename), status, dates, owner and notes. Its status asks **When did this happen?** too. ↑ and ↓ go to the task before or after it, and ⋯ has **Make it a milestone**, **Archive** and **Delete**, each with **Undo**. A change shows on the task's row at once. Escape, × or a press outside closes only the small popup, and the task's row lights for a moment.
194
194
  - **Dates.** Press a task's date. **Task | Milestone** on top turns it into a milestone (one Date) or back into a task (Start and Due). Write a day as "15 Oct 2026", or press the calendar icon. The row's ⋯ also has **Make it a milestone** and **Open the task**.
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.766.0",
3
+ "version": "0.767.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pmos-workspace",
9
- "version": "0.766.0",
9
+ "version": "0.767.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.766.0",
3
+ "version": "0.767.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",
@@ -82,7 +82,8 @@ const look = () => {
82
82
  const tag = `(${width} ${scheme})`;
83
83
  // M1, M2: the question and its method
84
84
  { const { p, ctx, errs, st } = await open(width, scheme, { goal: { id: 'g1', state: 'grilling' }, messages: grill.concat({ role: 'assistant', text: QUESTION }) });
85
- const s0 = await p.evaluate(look);
85
+ // the box's words follow the question a beat later on a slow runner: wait for them, as the other steps do
86
+ const s0 = await poll(p, (v) => v.methBtn && v.chips.length && v.ph === 'Answer, or pick one above');
86
87
  ok(`M1 ${tag} the question names its method in one line with Change, and why it fits`, s0.methBtn && /Method: Done criteria/.test(s0.meth || '') && /it ends in a document/.test(s0.meth || ''), JSON.stringify(s0));
87
88
  ok(`M1 ${tag} one dot per point the method needs, filled as agreed; no S M A R T letters`, s0.dots === 4 && s0.dotsOn === 1 && !s0.letters, JSON.stringify(s0));
88
89
  ok(`M1 ${tag} tap answers, the recommended one marked; the box says so`, s0.chips.length === 2 && /recommended/.test(s0.rec || '') && s0.ph === 'Answer, or pick one above', JSON.stringify(s0));
@@ -129,6 +129,13 @@ body.pw-drag, body.pw-drag * { cursor: col-resize !important; user-select: none;
129
129
  .pw-span { flex: none; height: 26px; display: inline-flex; align-items: center; gap: 2px; border: 0; border-radius: var(--radius-sm); background: var(--cz-card); color: var(--cz-ink); font: inherit; font-size: var(--fs-meta); padding: 2px 6px; cursor: pointer; box-shadow: 0 0 0 1px var(--cz-hair); }
130
130
  .pw-mk { position: absolute; top: 50%; transform: translate(-1px, -50%); font-size: var(--fs-meta); color: var(--cz-ink2); padding-left: 6px; border-left: 1px solid var(--cz-hair); line-height: 18px; pointer-events: none; }
131
131
  .pw-tday { position: absolute; top: 50%; margin-top: calc(-1 * var(--space-8)); transform: translateX(-50%); font-size: var(--fs-badge); font-weight: var(--fw-strong); color: var(--cz-onsolid); background: var(--cz-solid); padding: 0 6px; border-radius: 99px; line-height: 16px; pointer-events: none; z-index: 1; }
132
+ /* the track (gantt-scroll): the timeline's content is --pw-z timelines wide and moved left by --pw-sx of them; a period shorter than the work
133
+ * scrolls sideways (a trackpad swipe, Shift and the wheel, or a drag on the empty part) while Item, Status and Date stay put */
134
+ .pw-tlin { position: absolute; top: 0; bottom: 0; left: 0; width: calc(var(--pw-z, 1) * 100%); transform: translateX(calc(var(--pw-sx, 0) / var(--pw-z, 1) * -100%)); }
135
+ .pw-wbs[data-pw-track] .pw-tl { touch-action: pan-y; cursor: grab; }
136
+ .pw-wbs[data-pw-track] .pw-tlh { overflow: hidden; }
137
+ .pw-wbs.pw-pan, .pw-wbs.pw-pan * { cursor: grabbing !important; user-select: none; }
138
+ .pw-tlbar { position: absolute; bottom: 3px; height: 3px; left: calc(var(--pw-sx, 0) / var(--pw-z, 1) * 100%); width: calc(100% / var(--pw-z, 1)); border-radius: 99px; background: color-mix(in srgb, var(--cz-ink3) 45%, transparent); pointer-events: none; }
132
139
  .pw-now { position: absolute; top: 0; bottom: 0; width: 1.5px; background: var(--cz-ink2); transform: translateX(-.75px); pointer-events: none; }
133
140
  .pw-key { display: flex; gap: 18px; flex-wrap: wrap; margin: 0; font-size: var(--fs-meta); color: var(--cz-ink2); }
134
141
  .pw-key span { display: inline-flex; align-items: center; gap: 6px; }
@@ -210,16 +210,37 @@ function sugLine(s, under) {
210
210
  + `<span class="pw-sugb">${acts}</span></div>`;
211
211
  }
212
212
  function headCells(C, W, mode, kind) {
213
- const mk = M.marksOf(W.span, W.today), td = mk.today;
214
- // the Today pill is always on the line when today is in the window (round 3 point 8); a month mark too close to it gives way
215
- const tl = C.tl ? `<div class="pw-tl pw-tlh" aria-hidden="true">`
216
- + mk.months.filter((m) => m.x > 3 && m.x < 90 && !(td != null && Math.abs(m.x - td) < 7)).map((m) => `<span class="pw-mk" style="left:${m.x.toFixed(2)}%">${esc(m.label)}</span>`).join('')
217
- + (td != null ? `<span class="pw-tday" style="left:clamp(24px, ${td.toFixed(2)}%, calc(100% - 24px))">Today</span>` : '') + '</div>' : '';
213
+ const mk = M.marksOf(W.span, W.today, W.view), td = mk.today, z = W.zoom || 1;
214
+ // the Today pill is always on the line when today is in the window (round 3 point 8); a month mark too close to it gives way. On a track
215
+ // (gantt-scroll) the distances are a window's, so they shrink as the track grows
216
+ const tl = C.tl ? `<div class="pw-tl pw-tlh" aria-hidden="true"><div class="pw-tlin">`
217
+ + mk.months.filter((m) => m.x > 3 / z && m.x < 100 - 10 / z && !(td != null && Math.abs(m.x - td) < 7 / z)).map((m) => `<span class="pw-mk" style="left:${m.x.toFixed(2)}%">${esc(m.label)}</span>`).join('')
218
+ + (td != null ? `<span class="pw-tday" style="left:clamp(24px, ${td.toFixed(2)}%, calc(100% - 24px))">Today</span>` : '') + '</div>'
219
+ + (z > 1.001 ? '<i class="pw-tlbar"></i>' : '') + '</div>' : ''; // the thumb: where the window is on the track, so the scroll is seen
218
220
  return `<div class="pw-tr pw-th" role="row"><span role="columnheader">${kind || 'Item'}</span>${W.jc ? '<span class="pw-jc" role="columnheader">Jira</span>' : ''}${C.status ? '<span role="columnheader">Status</span>' : ''}${C.date ? '<span role="columnheader">Date</span>' : ''}${tl}</div>`;
219
221
  }
220
222
  /* the grip between the item columns and the timeline (round 3 point 1): drag it left or right; the item columns keep about 220 px (the name)
221
223
  * and the timeline about 240 px. Double press or Home: back to the default. The width is remembered on this computer. */
222
- const tlStyle = (gc = '') => { const w = +store.get(TLW, 0), s = (w > 0 ? `--pw-tlw:${Math.round(w)}px;` : '') + (gc ? `--pw-gc:${gc};` : ''); return s ? ` style="${s}"` : ''; };
224
+ const tlStyle = (gc = '', W = null) => { const w = +store.get(TLW, 0), s = (w > 0 ? `--pw-tlw:${Math.round(w)}px;` : '') + (gc ? `--pw-gc:${gc};` : '') + trackStyle(W); return s ? ` style="${s}"` : ''; };
225
+ /* the track (gantt-scroll, Wawan 2026-11-24): a period shorter than the work scrolls sideways along the whole track, while Item, Status and
226
+ * Date stay put. --pw-z is the track's width in timeline widths; --pw-sx how far it has scrolled, in timeline widths (0 to z - 1). It opens
227
+ * on the period's window, which holds today; where the PM scrolled to is kept until the period changes. */
228
+ const SX = new Map();
229
+ const sxKey = (W) => (W ? [W.title || '', W.view ? W.view.a : '', W.span ? W.span.a + W.span.b : ''].join('|') : '');
230
+ const trackStyle = (W) => {
231
+ const z = W && W.zoom > 1.001 ? W.zoom : 1; if (z === 1) return '';
232
+ const k = sxKey(W), sx = SX.has(k) ? SX.get(k) : ((W.at || 0) / 100) * z;
233
+ return `--pw-z:${z.toFixed(4)};--pw-sx:${Math.max(0, Math.min(z - 1, sx)).toFixed(4)};`;
234
+ };
235
+ const trackAttr = (W) => (W && W.zoom > 1.001 ? ` data-pw-track="${esc(sxKey(W))}"` : '');
236
+ /** Scroll a card's track by dx timeline widths; it stops at either end. */
237
+ function scrollTrack(card, dx) {
238
+ const z = parseFloat(card.style.getPropertyValue('--pw-z')) || 1; if (z <= 1) return false;
239
+ const now = parseFloat(card.style.getPropertyValue('--pw-sx')) || 0, sx = Math.max(0, Math.min(z - 1, now + dx));
240
+ if (Math.abs(sx - now) < 1e-4) return false;
241
+ card.style.setProperty('--pw-sx', sx.toFixed(4)); SX.set(card.dataset.pwTrack || '', sx);
242
+ return true;
243
+ }
223
244
  /* the Gantt's Jira column (WorkJiraDS, work-subtasks-followups): the grid's columns when it shows, Item · Jira · Status · Date · Timeline */
224
245
  const gridOf = (C) => [C.tl ? 'minmax(220px, 1fr)' : 'minmax(0, 1fr)', 'minmax(0, 132px)', C.status ? (C.tl ? 'minmax(0, 112px)' : '110px') : '', C.date ? (C.tl ? 'minmax(0, 168px)' : '160px') : '', C.tl ? 'var(--pw-tl)' : ''].filter(Boolean).join(' ');
225
246
  const gripHtml = () => `<div class="pw-tlgrip" role="separator" aria-orientation="vertical" tabindex="0" data-pw-grip aria-label="Drag to make the timeline wider or narrower. Double press to reset." title="Drag to make the timeline wider or narrower. Double press to reset."><i></i></div>`;
@@ -235,6 +256,25 @@ function wireGrip(root) {
235
256
  const up = () => { g.removeEventListener('pointermove', mv); g.removeEventListener('pointerup', up); g.removeEventListener('pointercancel', up); document.body.classList.remove('pw-drag'); if (w) store.set(TLW, w); };
236
257
  g.addEventListener('pointermove', mv); g.addEventListener('pointerup', up); g.addEventListener('pointercancel', up);
237
258
  });
259
+ // the track (gantt-scroll): a sideways trackpad swipe, or Shift and the wheel, over the timeline scrolls it; a press on its empty part and a
260
+ // drag pans it (a bar keeps its own drag, which moves the dates)
261
+ root.addEventListener('wheel', (e) => {
262
+ const tl = e.target.closest && e.target.closest('.pw-wbs[data-pw-track] .pw-tl'); if (!tl) return;
263
+ const dx = Math.abs(e.deltaX) > Math.abs(e.deltaY) ? e.deltaX : e.shiftKey ? e.deltaY : 0; if (!dx) return;
264
+ const card = tl.closest('.pw-wbs'), px = e.deltaMode === 1 ? dx * 16 : e.deltaMode === 2 ? dx * tl.clientWidth : dx;
265
+ if (scrollTrack(card, px / Math.max(1, tl.clientWidth)) || Math.abs(e.deltaX) > Math.abs(e.deltaY)) e.preventDefault();
266
+ }, { passive: false });
267
+ root.addEventListener('pointerdown', (e) => {
268
+ if (e.button !== 0) return;
269
+ const tl = e.target.closest && e.target.closest('.pw-wbs[data-pw-track] .pw-tl'); if (!tl) return;
270
+ if (e.target.closest('button, a, input, [data-cb-ms], .iva-tb, .pw-pbar, .iva-md, .iva-b, .cb-md')) return;
271
+ const card = tl.closest('.pw-wbs'), w = Math.max(1, tl.clientWidth);
272
+ let x0 = e.clientX, moved = false;
273
+ try { tl.setPointerCapture(e.pointerId); } catch { /* fine */ }
274
+ const mv = (ev) => { const d = ev.clientX - x0; if (!moved && Math.abs(d) < 4) return; if (!moved) { moved = true; card.classList.add('pw-pan'); } x0 = ev.clientX; scrollTrack(card, -d / w); };
275
+ const up = () => { tl.removeEventListener('pointermove', mv); tl.removeEventListener('pointerup', up); tl.removeEventListener('pointercancel', up); card.classList.remove('pw-pan'); if (moved) root.__pwQuiet = Date.now(); };
276
+ tl.addEventListener('pointermove', mv); tl.addEventListener('pointerup', up); tl.addEventListener('pointercancel', up);
277
+ });
238
278
  root.addEventListener('dblclick', (e) => { const g = e.target.closest('[data-pw-grip]'); if (!g) return; store.set(TLW, 0); const c = g.closest('.pw-wbs'); if (c) c.style.removeProperty('--pw-tlw'); });
239
279
  root.addEventListener('keydown', (e) => {
240
280
  const g = e.target.closest && e.target.closest('[data-pw-grip]'); if (!g) return;
@@ -266,7 +306,7 @@ function rowHtml(x, W, C, sugRows) {
266
306
  // what the row lets the PM change, the same for every Jira row (jira-row-edit): a published copy changes nothing and shows no ✦
267
307
  const E = WT.editOf(x, RO);
268
308
  if (RO) sugRows = new Map();
269
- const tl = C.tl ? `<div class="pw-tl">${(x.kind === 'stage' || x.kind === 'task') ? barHtml(x, W) : ''}${W.tx != null ? `<i class="pw-now" style="left:${W.tx.toFixed(2)}%"></i>` : ''}</div>` : '';
309
+ const tl = C.tl ? `<div class="pw-tl"><div class="pw-tlin">${(x.kind === 'stage' || x.kind === 'task') ? barHtml(x, W) : ''}${W.tx != null ? `<i class="pw-now" style="left:${W.tx.toFixed(2)}%"></i>` : ''}</div></div>` : '';
270
310
  // the status: a PMOS task's opens its list; a Jira ticket's moves it in Jira, and says "Moving in Jira" until Jira answers
271
311
  const jst = E.status === 'jira' ? `<button type="button" class="pw-cell" data-pw-jstat="${esc(x.uid)}" aria-haspopup="menu" aria-label="${esc('Status in Jira: ' + (x.jst || x.status) + '. Move it in Jira')}" title="Status, moved in Jira">${esc(x.status)}${x.jmv ? ' <small class="pw-jmv">Moving in Jira</small>' : ''}</button>` : '';
272
312
  const stc = C.status ? `<span class="pw-st">${jst || (E.status === 'pmos' ? `<button type="button" class="pw-cell" data-pw-status="${esc(x.uid)}" aria-haspopup="menu" aria-label="${esc('Status: ' + x.status + '. Change it')}">${esc(x.status)}</button>` : esc(x.status || ''))}</span>` : '';
@@ -306,7 +346,7 @@ function breakdownHtml(W, C, mode, full, S) {
306
346
  // the tasks in no stage are not in the breakdown (Wawan, 2026-11-19): they live in Work › Backlog; one quiet line says so and goes there
307
347
  const loose = W.looseN && !RO ? `<p class="pw-loose"><button type="button" class="pw-lk" data-pw-backlog>${esc(W.looseN === 1 ? '1 task with no stage is in the Backlog' : W.looseN + ' tasks with no stage are in the Backlog')}${SVG(P.right, 13)}</button></p>` : '';
308
348
  return `<section class="pw-sec" aria-label="Work breakdown">${full ? `<div class="pw-sech">${tools}</div>` : `<div class="pw-sech"><h3>Work breakdown</h3>${show}${tools}</div>`}`
309
- + `<div class="pw-card pw-wbs${C.tl ? '' : ' notl'}${C.status ? '' : ' nost'}${C.date ? '' : ' nodt'}${W.jc ? ' jc' : ''}" role="table" aria-label="Work breakdown"${tlStyle(W.jc ? gridOf(C) : '')}>${C.tl ? gripHtml() : ''}${headCells(C, W, mode)}${out || '<div class="pw-tr pw-empty" role="row"><span>No task yet.</span></div>'}</div>`
349
+ + `<div class="pw-card pw-wbs${C.tl ? '' : ' notl'}${C.status ? '' : ' nost'}${C.date ? '' : ' nodt'}${W.jc ? ' jc' : ''}" role="table" aria-label="Work breakdown"${tlStyle(W.jc ? gridOf(C) : '', C.tl ? W : null)}${C.tl ? trackAttr(W) : ''}>${C.tl ? gripHtml() : ''}${headCells(C, W, mode)}${out || '<div class="pw-tr pw-empty" role="row"><span>No task yet.</span></div>'}</div>`
310
350
  + (C.tl ? '<p class="pw-key"><span><i class="k-tb pr"></i>In progress</span><span><i class="k-tb"></i>To do</span><span><i class="k-tb dn"></i>Done</span><span><i class="k-md"></i>Milestone</span><span><i class="k-late"></i>Late</span><span><i class="k-gap"></i>No activity</span></p>' : '') + loose + '</section>';
311
351
  }
312
352
  /* the Artefacts (round 3 point 16): one row per Kind, in lifecycle order. Kind | Artefact (the current one) | Version | Updated. Versions and the
@@ -355,7 +395,7 @@ function model(r, v0, o) {
355
395
  const g = o.goal || goalOf(o.ws, o.board, r.anchor || v.anchor);
356
396
  const W = M.workOf(r, v, { ...o, goal: M.idShaped(g) ? '' : g, product: productName(o.product, o.ws), art: artOf(id, o.ws), open: S.open, shut: S.shut, moreOpen: S.moreOpen, farOpen: S.farOpen, focus: S.focus, subOpen: S.subOpen, subShut: S.subShut, mode: store.get(SPAN, 'full'), items: it || [], dropped: dropped() });
357
397
  if (pd && W.overview) for (const L of W.overview.lines || []) if (pd.lines[L.id] != null) { L.text = pd.lines[L.id]; delete L.ask; delete L.miss; }
358
- const mk = M.marksOf(W.span, W.today); W.tx = mk.today;
398
+ const mk = M.marksOf(W.span, W.today, W.view); W.tx = mk.today;
359
399
  W.epics = (r.epics || []).filter(Boolean); RSEL = S.sel; // the epic check and the picked rows, for the Gantt rows (initiative work-subtasks)
360
400
  // the Gantt's Jira column (work-subtasks-followups): on unless Choose columns hides it, and only when the work has a Jira row
361
401
  W.jc = !!cols().jira && W.rows.some((x) => x.kind === 'task' && WT.keyOf(x));
@@ -1188,7 +1228,7 @@ function wireMoves(body, cur, redraw) {
1188
1228
  body.addEventListener('pointerdown', (e) => {
1189
1229
  if (e.pointerType !== 'mouse' || e.button !== 0) return;
1190
1230
  const bar = e.target.closest && e.target.closest('.pw-kr .pw-tl .iva-tb, .pw-kr .pw-tl .pw-pbar'); if (!bar) return;
1191
- const rw = bar.closest('[data-pw-row]'), tl = bar.closest('.pw-tl'), c = cur(); if (!rw || !tl || !c) return;
1231
+ const rw = bar.closest('[data-pw-row]'), tl = bar.closest('.pw-tlin') || bar.closest('.pw-tl'), c = cur(); if (!rw || !tl || !c) return;
1192
1232
  const all = allOf(c), ids = SEL.shiftIds(c.S.sel, rw.dataset.pwRow, all);
1193
1233
  const span = (Date.parse(c.W.span.b) - Date.parse(c.W.span.a)) / 864e5, w = tl.getBoundingClientRect().width, x0 = e.clientX;
1194
1234
  const els = [...new Set(ids.concat(String(rw.dataset.pwRow)))].map((u) => body.querySelector(`.pw-kr[data-pw-row="${window.CSS.escape(u)}"] .pw-tl`)).filter(Boolean)
@@ -1413,7 +1453,7 @@ function artItems(body) {
1413
1453
  /* ── one level up: a program or a product (boards 26, 27) ── */
1414
1454
  export function levelHtml(L, o = {}) {
1415
1455
  const W = M.levelOf(L, { today: o.today, mode: store.get(SPAN, 'full') }), C = cols(), mode = store.get(SPAN, 'full');
1416
- const mk = M.marksOf(W.span, W.today); W.tx = mk.today;
1456
+ const mk = M.marksOf(W.span, W.today, W.view); W.tx = mk.today;
1417
1457
  const sug = !RO && W.suggests.length ? `<div class="pw-sugs" role="list" aria-label="PMOS suggests"><p class="pw-sugh">PMOS suggests</p>${W.suggests.map((s) => sugLine(s)).join('')}</div>` : '';
1418
1458
  // the same Overview shape as an initiative (round 3 point 10): what it is for, its goal, done when; then the status line and Details ›
1419
1459
  const lk = 'level:' + W.kind + ':' + (W.title || ''), S = stOf(lk), open = !!S.details;
@@ -1424,12 +1464,12 @@ export function levelHtml(L, o = {}) {
1424
1464
  const ov = `<section class="pw-ov" aria-label="Overview"><div class="pw-ovh"><h3>Overview</h3>${mark}${det}</div>${ovLines(W.overview, lk, false)}${W.overview.status ? `<p class="pw-ostat">${esc(W.overview.status)}</p>` : ''}${sug}${facts}</section>`;
1425
1465
  const head = o.rowsTitle || (W.kind === 'product' ? 'Programs and initiatives' : 'Initiatives');
1426
1466
  const rows = W.rows.map((x) => {
1427
- const tl = C.tl ? `<div class="pw-tl">${barHtml({ ...x, kind: 'stage', tone: x.done ? 'dn' : '' }, W)}${W.tx != null ? `<i class="pw-now" style="left:${W.tx.toFixed(2)}%"></i>` : ''}</div>` : '';
1467
+ const tl = C.tl ? `<div class="pw-tl"><div class="pw-tlin">${barHtml({ ...x, kind: 'stage', tone: x.done ? 'dn' : '' }, W)}${W.tx != null ? `<i class="pw-now" style="left:${W.tx.toFixed(2)}%"></i>` : ''}</div></div>` : '';
1428
1468
  const lead = x.group ? `<b class="pw-grp">${esc(x.title)}</b>` : `<button type="button" class="pw-stg lv${x.sub ? ' sub' : ''}" data-pw-go="${esc(x.kind + ':' + x.id)}"><b>${esc(x.title)}</b>${SVG(P.right, 14)}${x.count ? `<small>${esc(x.count)}</small>` : ''}</button>`;
1429
1469
  return `<div class="pw-tr pw-sr" role="row"><span class="pw-it">${lead}</span>${C.status ? `<span class="pw-st">${esc(x.stage || '')}</span>` : ''}${C.date ? `<span class="pw-dt${x.late ? ' warn' : ''}">${esc(x.date || '')}</span>` : ''}${tl}</div>`;
1430
1470
  }).join('');
1431
1471
  const wbs = `<section class="pw-sec" aria-label="${esc(head)}"><div class="pw-sech"><h3>${esc(head)}</h3>${!C.tl && !RO ? ib('data-pw-tl', 'Show the timeline', P.show, 'xs') : ''}<span class="pw-tools">${C.tl ? `<button type="button" class="pw-span" data-pw-span aria-haspopup="menu">${esc((M.MODES.find((m) => m[0] === mode) || M.MODES[5])[1])}${SVG(P.down, 12)}</button>` : ''}${RO ? '' : ib('data-pw-tune="wbs" aria-haspopup="menu"', 'Show or hide columns', P.tune)}</span></div>`
1432
- + `<div class="pw-card pw-wbs${C.tl ? '' : ' notl'}${C.status ? '' : ' nost'}${C.date ? '' : ' nodt'}" role="table"${tlStyle()}>${C.tl ? gripHtml() : ''}${headCells(C, W, mode, W.kind === 'product' ? 'Program or initiative' : 'Initiative').replace('<span role="columnheader">Status</span>', '<span role="columnheader">Stage</span>')}${rows || '<div class="pw-tr pw-empty" role="row"><span>Nothing one level down yet.</span></div>'}</div></section>`;
1472
+ + `<div class="pw-card pw-wbs${C.tl ? '' : ' notl'}${C.status ? '' : ' nost'}${C.date ? '' : ' nodt'}" role="table"${tlStyle('', C.tl ? W : null)}${C.tl ? trackAttr(W) : ''}>${C.tl ? gripHtml() : ''}${headCells(C, W, mode, W.kind === 'product' ? 'Program or initiative' : 'Initiative').replace('<span role="columnheader">Status</span>', '<span role="columnheader">Stage</span>')}${rows || '<div class="pw-tr pw-empty" role="row"><span>Nothing one level down yet.</span></div>'}</div></section>`;
1433
1473
  return `<div class="pw" data-pw-level>${ov}${wbs}${W.artefacts.length || o.add !== false ? artefactsHtml(W.artefacts, C, o.add !== false, { scope: lk }) : ''}</div>`;
1434
1474
  }
1435
1475
  export function wireLevel(body, h0, L0) {
@@ -10,6 +10,7 @@
10
10
  * goal (the goal's name, else the anchor), mode ('full' | 'quarter' | 'half' | 'year' | '2y' | '5y': the timeline's span), open (Set of
11
11
  * stage keys the PM unfolded), shut (Set of stage keys the PM folded), openAll (the List: every stage with tasks opens by itself), farOpen (bool) }
12
12
  * levelOf(L, o) → the same parts one level up: a program or a product (boards 26, 27). L: { kind, title, path, summary, facts, rows, docs, props }
13
+ * trackOf(dates, mode, today) → { span, view, zoom, at } the track the timeline scrolls along; view is the window that shows on open
13
14
  * spanOf(dates, mode, today) → { a, b } ISO the window of the timeline: Full runs from the earliest start to the latest end (no bar is cut)
14
15
  * barOf(x, span, today) → { l, w, pass, late, ms, dot } in % of the window one bar: the plan, the part that has passed, the missed date
15
16
  * dayText(iso, today) → "4 Nov", "13 Jan 2027" dateLate(iso, today) → "4 Nov · 14 days late" | "4 Nov"
@@ -75,6 +76,23 @@ export function spanOf(dates, mode, today) {
75
76
  const months = { quarter: 3, half: 6, year: 12, '2y': 24, '5y': 60 }[mode] || 12;
76
77
  return { a: iso(start), b: iso(new Date(start.getFullYear(), start.getMonth() + months, 0)) };
77
78
  }
79
+ /** The track a period scrolls along (gantt-scroll, Wawan 2026-11-24: "I should be able to scroll gantt here"): the period's window is what
80
+ * shows when the page opens (it holds today), and the track runs on, month by month, to the earliest and the latest date, so no bar is cut
81
+ * and the rest is a sideways scroll away. Full is its own window: nothing to scroll. The track stops 5 years either side of the window.
82
+ * → { span (the whole track), view (the window), zoom (track width / window width, ≥ 1), at (where the window starts, % of the track) } */
83
+ export function trackOf(dates, mode, today) {
84
+ const view = spanOf(dates, mode, today);
85
+ if (!mode || mode === 'full') return { span: view, view, zoom: 1, at: 0 };
86
+ const va = day(view.a), vb = day(view.b);
87
+ const lo = new Date(va.getFullYear() - 5, va.getMonth(), 1), hi = new Date(vb.getFullYear() + 5, vb.getMonth() + 1, 0);
88
+ let a = va, b = vb;
89
+ for (const d of (dates || []).map(day).filter(Boolean)) {
90
+ if (d < a) a = new Date(Math.max(lo, new Date(d.getFullYear(), d.getMonth(), 1)));
91
+ if (d > b) b = new Date(Math.min(hi, new Date(d.getFullYear(), d.getMonth() + 1, 0)));
92
+ }
93
+ const span = { a: iso(a), b: iso(b) };
94
+ return { span, view, zoom: Math.max(1, (b - a) / Math.max(DAY, vb - va)), at: Math.max(0, pct(va, span)) };
95
+ }
78
96
  const pct = (d, S) => { const a = day(S.a), b = day(S.b); return ((d - a) / Math.max(DAY, b - a)) * 100; };
79
97
  const clamp = (n) => Math.max(0, Math.min(100, n));
80
98
  /** One bar in the window. x: { start, end, done, open }. A row with neither date has no bar (null). */
@@ -92,9 +110,11 @@ export function barOf(x, S, today) {
92
110
  late: missed ? { l: clamp(pct(b0, S)), w: Math.max(0.3, tx - clamp(pct(b0, S))) } : null, ms: missed ? clamp(pct(b0, S)) : null };
93
111
  }
94
112
  /** The month marks on the header: the first of each month that fits, thinned to about six. */
95
- export function marksOf(S, today) {
113
+ export function marksOf(S, today, view) {
96
114
  const a = day(S.a), b = day(S.b), t = today instanceof Date ? today : day(today) || new Date(), out = [];
97
- const n = (b.getFullYear() - a.getFullYear()) * 12 + b.getMonth() - a.getMonth();
115
+ // on a track (trackOf) the marks are as close as the window that shows needs, not as the whole track would
116
+ const va = view ? day(view.a) : a, vb = view ? day(view.b) : b;
117
+ const n = (vb.getFullYear() - va.getFullYear()) * 12 + vb.getMonth() - va.getMonth();
98
118
  const step = n <= 6 ? 1 : n <= 14 ? 3 : n <= 30 ? 6 : 12;
99
119
  for (let d = new Date(a.getFullYear(), a.getMonth() + 1, 1); d < b; d = new Date(d.getFullYear(), d.getMonth() + 1, 1)) {
100
120
  if (d.getMonth() % step) continue;
@@ -531,8 +551,8 @@ export function workOf(r, v, o = {}) {
531
551
  const all = sug.top.concat(dv.top), rowS = new Map(sug.rows);
532
552
  for (const [k, s] of dv.rows) if (!rowS.has(k)) rowS.set(k, s);
533
553
  const dates = [r.start, r.end].concat(bd.rows.flatMap((x) => [x.start, x.end])).filter(Boolean);
534
- const span = spanOf(dates, o.mode || 'full', t);
535
- return { title: v.title || r.title || '', summary: sum, overview: overviewOf(r, v, o), suggests: all.slice(0, MAX_SUGGEST), more: sug.more + Math.max(0, all.length - MAX_SUGGEST), rowSuggests: rowS, facts: factsOf(r, v, o),
554
+ const tk = trackOf(dates, o.mode || 'full', t), span = tk.span;
555
+ return { view: tk.view, zoom: tk.zoom, at: tk.at, title: v.title || r.title || '', summary: sum, overview: overviewOf(r, v, o), suggests: all.slice(0, MAX_SUGGEST), more: sug.more + Math.max(0, all.length - MAX_SUGGEST), rowSuggests: rowS, facts: factsOf(r, v, o),
536
556
  rows: bd.rows, many: bd.many, looseN: bd.looseN || 0, span, today: iso(t), artefacts: arts };
537
557
  }
538
558
 
@@ -545,7 +565,7 @@ export function levelOf(L, o = {}) {
545
565
  const dl = x.end ? dateLate(x.end, t, !x.done) : { text: '', late: false };
546
566
  return { ...x, date: dl.text, late: dl.late };
547
567
  });
548
- const span = spanOf(rows.flatMap((x) => [x.start, x.end]).filter(Boolean), o.mode || 'full', t);
568
+ const tk = trackOf(rows.flatMap((x) => [x.start, x.end]).filter(Boolean), o.mode || 'full', t), span = tk.span;
549
569
  const late = rows.filter((x) => x.late).length;
550
570
  // the same Overview shape as an initiative (round 3 point 10): what it is for, its goal, done when; a line with no source offers a draft.
551
571
  // A program reads its charter's why and goal, and Done when from its last milestone and target (initiative chat-saves-to-cards). A draft is
@@ -556,6 +576,6 @@ export function levelOf(L, o = {}) {
556
576
  ask: 'Draft ' + what + ' for the ' + nm + ' ' + who + ', in two short sentences, for me to read. Say what you read. Do not invent anything the records do not say.' + save(f) } : {}) });
557
577
  const sum = L.why ? firstSentences(L.why, 2) : L.summary && !importNote(L.summary) ? firstSentences(L.summary, 2) : '';
558
578
  const overview = { lines: [line('for', 'For', sum, 'what the ' + nm + ' is for', 'why'), line('goal', 'Goal', L.goal || '', 'the goal of the ' + nm, 'goal'), line('done', 'Done when', L.done || '', 'how we will know the ' + nm + ' worked', '')], status: L.status || '' };
559
- return { kind: L.kind, title: L.title, summary: L.summary || '', overview, facts: L.facts || [], rows, span, today: iso(t), late, artefacts: (L.docs || []).map((d) => ({ ...d, when: whenOf(d.when, t) })),
579
+ return { view: tk.view, zoom: tk.zoom, at: tk.at, kind: L.kind, title: L.title, summary: L.summary || '', overview, facts: L.facts || [], rows, span, today: iso(t), late, artefacts: (L.docs || []).map((d) => ({ ...d, when: whenOf(d.when, t) })),
560
580
  suggests: suggestsOf({ props: L.props || null }).top };
561
581
  }