create-pmos 0.650.0 → 0.651.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.650.0",
3
+ "version": "0.651.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.651.0",
38
+ "at": "2026-11-20T07:19:20.677Z",
39
+ "f": 4,
40
+ "prs": [
41
+ {
42
+ "n": 1433,
43
+ "t": "Quick edit in a row and full popups for a task and a milestone",
44
+ "s": "Quick edit in a row and full popups for a task and a milestone",
45
+ "k": "new"
46
+ }
47
+ ]
48
+ },
36
49
  {
37
50
  "v": "0.650.0",
38
51
  "at": "2026-11-20T06:52:20.858Z",
@@ -297,25 +310,6 @@
297
310
  "k": "fix"
298
311
  }
299
312
  ]
300
- },
301
- {
302
- "v": "0.626.0",
303
- "at": "2026-11-19T05:42:19.332Z",
304
- "f": 4,
305
- "prs": [
306
- {
307
- "n": 1406,
308
- "t": "One product-name rule for desk and shared copy; no raw report ids on Events",
309
- "s": "One product-name rule for desk and shared copy; no raw report ids on Events",
310
- "k": "fix"
311
- },
312
- {
313
- "n": 1407,
314
- "t": "Sprint overview on Work > Backlog > This sprint",
315
- "s": "Sprint overview on Work > Backlog > This sprint",
316
- "k": "new"
317
- }
318
- ]
319
313
  }
320
314
  ]
321
315
  }
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@efc39439
1
+ kernel-source: pmos@e9a16d4c
2
2
  assembled: 2026-11-20
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-20T06:52:18Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-20T07:19:17Z"}
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-20T06:52:18Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-20T07:19:17Z"}
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-20T06:52:18Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-20T07:19:17Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -1,4 +1,17 @@
1
1
  [
2
+ {
3
+ "v": "0.651.0",
4
+ "at": "2026-11-20T07:19:20.677Z",
5
+ "f": 4,
6
+ "prs": [
7
+ {
8
+ "n": 1433,
9
+ "t": "Quick edit in a row and full popups for a task and a milestone",
10
+ "s": "Quick edit in a row and full popups for a task and a milestone",
11
+ "k": "new"
12
+ }
13
+ ]
14
+ },
2
15
  {
3
16
  "v": "0.650.0",
4
17
  "at": "2026-11-20T06:52:20.858Z",
@@ -141,7 +141,9 @@ The left column has three blocks:
141
141
 
142
142
  - **Where it stands.** What is happening, in a few sentences. Then **Next**: the next three dates, a milestone as a diamond and the outcome check as a circle; press a milestone to open it. Then one suggestion from PMOS with **Why**, **PMOS will** and **Based on**. The pencil opens it so you can change it first, ✓ does it and ✕ drops it. Other suggestions are one link under it.
143
143
  - **Stages.** Each stage of the workflow, with its dates under its name or "no dates yet", on a month scale with a red line for today. A stage has a bar only when it has real dates. A milestone is a diamond on its stage's row.
144
- - **Work breakdown.** **List** or **Gantt**; PMOS keeps your choice on this computer. **List** has one box on top: type a task and press Enter. Say its stage ("… in Plan"), or it goes to the stage in progress; start with ◇ to add a milestone. Each stage with tasks is one group that says how much is done, for example "1 of 3 done". A done task stays in its stage, in grey with a check. Stages with no tasks fold into one line at the end. Press the box before a task to change its status, its name to rename it, and the rest of the row to open it; ↗ and ⋯ show when you point at the row. **Gantt** is the table described below, with its bars.
144
+ - **Work breakdown.** **List** or **Gantt**; PMOS keeps your choice on this computer. **List** has one box on top: type a task and press Enter. Say its stage ("… in Plan"), or it goes to the stage in progress; start with ◇ to add a milestone. Each stage with tasks is one group that says how much is done, for example "1 of 3 done". A done task stays in its stage, in grey with a check. Stages with no tasks fold into one line at the end. Press the box before a task to mark it done, with **Undo**. Press its name to rename it: Enter saves and Escape cancels. When you point at the row, four icons show: **Who** (You, the people on this initiative, or **PMOS does it**, which gives the task to PMOS), **Due date**, **Stage** (moves the task to another stage) and ⋯ (**Status**, **Make it a milestone** and **Open the task**). Each change has **Undo**. A Jira ticket keeps its owner and stage from Jira. **Gantt** is the table described below, with its bars.
145
+
146
+ Press the rest of a row, or a milestone, to open it as a full popup in place of the work side. Its top line has ←, the path (**Work › product › initiative**), the chat button, ⋯ and ×. ← or the initiative's name goes back to the initiative, where you left it. The chat button shows **Ask PMOS** beside it. × closes the popup. A task shows its status, dates, owner, notes and what changed. A milestone also shows its date and how many days are left, the done test, **Kill if**, and the suggestion from PMOS about it when there is one.
145
147
 
146
148
  The right column has two blocks:
147
149
 
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.650.0",
3
+ "version": "0.651.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pmos-workspace",
9
- "version": "0.650.0",
9
+ "version": "0.651.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.650.0",
3
+ "version": "0.651.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",
@@ -20,6 +20,7 @@ export const I = {
20
20
  plus: 'M12 5v14M5 12h14', more: 'M5 12h.01M12 12h.01M19 12h.01', open: 'M14 5h5v5M19 5l-8 8M18 14v5H5V6h5', box: 'M6 5h12a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1z',
21
21
  dia: 'M12 4l8 8-8 8-8-8z', doc: 'M7 3h7l4 4v14H7zM14 3v4h4M9.5 12h6M9.5 16h6', deck: 'M4 5h16v11H4zM12 16v4M8 20h8', link: 'M10 14a4 4 0 0 0 5.7 0l3-3a4 4 0 0 0-5.7-5.7l-1 1M14 10a4 4 0 0 0-5.7 0l-3 3a4 4 0 0 0 5.7 5.7l1-1',
22
22
  proto: 'M4 5h16v12H4zM9 21h6M12 17v4', right: 'M10 7l5 5-5 5',
23
+ who: 'M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM5 20a7 7 0 0 1 14 0', cal: 'M5 6h14v14H5zM5 10h14M9 4v4M15 4v4', stage: 'M5 7h14M5 12h10M5 17h6',
23
24
  };
24
25
  const MON = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
25
26
  const DAY = 864e5;
@@ -140,11 +141,18 @@ export function listHtml(rows, W, o = {}) {
140
141
  }
141
142
  const li = (x) => {
142
143
  const sub = [x.date, x.who && x.who !== 'You' ? x.who : ''].filter(Boolean).join(' · ');
144
+ // the tick (WorkStatesDS 3): marks it done, with Undo; a done task and a Jira ticket show their state only
143
145
  const box = x.done ? `<span class="pwd-ck dn" aria-label="Done" role="img">${SV(I.ok, 14)}</span>`
144
146
  : o.ro || x.jira ? `<span class="pwd-ck" aria-hidden="true">${SV(x.ms ? I.dia : I.box, 14)}</span>`
145
- : `<button type="button" class="pwd-ck" data-pw-status="${esc(x.uid)}" aria-haspopup="menu" aria-label="${esc('Status: ' + x.status + '. Change it')}" title="${esc(x.status)}">${SV(x.ms ? I.dia : I.box, 14)}</button>`;
147
+ : `<button type="button" class="pwd-ck" data-pw-tick="${esc(x.uid)}" aria-label="${esc('Mark ' + x.title + ' done')}" title="Mark it done">${SV(x.ms ? I.dia : I.box, 14)}</button>`;
146
148
  const title = x.jira || o.ro || x.done ? `<span class="t">${esc(x.title)}</span>` : `<button type="button" class="t pwd-tt" data-pw-name="${esc(x.uid)}" aria-label="${esc('Rename ' + x.title)}">${esc(x.title)}</button>`;
147
- const acts = o.ro ? '' : `<span class="acts"><button type="button" class="pm-btn" data-pw-open="${esc(x.uid)}" aria-label="Open the task" title="Open the task">${SV(I.open)}</button><button type="button" class="pm-btn" data-pw-row-more="${esc(x.uid)}" aria-haspopup="menu" aria-label="${esc('More for ' + x.title)}" title="More">${SV(I.more)}</button></span>`;
149
+ // on hover (WorkStatesDS 1): Who, Due date, Stage and More, each a small picker; a Jira ticket keeps Jira's owner and stage
150
+ const ab = (attr, label, d) => `<button type="button" class="pm-btn" ${attr} aria-label="${esc(label)}" title="${esc(label)}">${SV(d)}</button>`;
151
+ const acts = o.ro ? '' : '<span class="acts">'
152
+ + (x.jira || x.done ? '' : ab(`data-pw-who="${esc(x.uid)}" aria-haspopup="menu"`, 'Who: ' + (x.who || 'no one'), I.who))
153
+ + (x.done ? '' : ab(`data-pw-date="${esc(x.uid)}" aria-haspopup="dialog"`, x.date ? (x.ms ? 'Date: ' : 'Due: ') + x.date : 'Set a date', I.cal))
154
+ + (x.jira ? '' : ab(`data-pw-stage="${esc(x.uid)}" aria-haspopup="menu"`, 'Stage', I.stage))
155
+ + ab(`data-pw-row-more="${esc(x.uid)}" aria-haspopup="menu"`, 'More for ' + x.title, I.more) + '</span>';
148
156
  return `<div class="pm-li pwd-li${x.done ? ' dn' : ''}${x.lit ? ' now' : ''}" data-pwli="${esc(x.uid)}" data-pw-row="${esc(x.uid)}">${box}<span class="txt">${title}${sub ? `<span class="w${x.late ? ' late' : ''}">${esc(sub)}</span>` : ''}</span>${acts}</div>`;
149
157
  };
150
158
  const body = groups.map((G) => {
@@ -199,3 +207,33 @@ export function artsHtml(arts, o = {}) {
199
207
  const add = o.ro ? '' : `<button type="button" class="pm-btn" data-pw-addart aria-label="Add an artefact: a file, a link, or a new document" title="Add an artefact">${SV(I.plus)}</button>`;
200
208
  return `<section class="pm-block pwd-blk pwd-arts" aria-label="Artefacts"><div class="pm-row pwd-bh"><h2 class="pm-h-sm">Artefacts</h2>${add}</div>${o.merge || ''}${rows || '<p class="pm-meta">Nothing yet.</p>'}</section>`;
201
209
  }
210
+
211
+ /** Who can have a task (WorkStatesDS 1): You first, then the people who own tasks of this initiative, then PMOS. → [{ k, label, pmos? }] */
212
+ export function whoOf(rows, cur = '') {
213
+ const S = new Set();
214
+ for (const x of rows || []) if (x && x.kind === 'task' && !x.jira && x.who && x.who !== 'You') S.add(x.who);
215
+ return [{ k: 'You', label: 'You', on: cur === 'You' || cur === '' }].concat([...S].sort().map((n) => ({ k: n, label: n, on: n === cur })), [{ k: '', label: 'PMOS does it', pmos: true }]);
216
+ }
217
+ /** The stages a task can move to: the workflow's, in order. → [{ key, name, on }] */
218
+ export function stageList(st, cur) {
219
+ return (st || []).filter((x) => x && x.kind === 'stage' && x.key !== '').map((x) => ({ key: x.key, name: x.name, on: x.key === cur }));
220
+ }
221
+ /** The stage a task sits in: the last stage row above it in the breakdown. → key, or '' when it is in no stage */
222
+ export function stageOfTask(st, uid) {
223
+ let k = '';
224
+ for (const x of st || []) { if (x.kind === 'stage') k = x.key; else if (x.uid === uid) return k; }
225
+ return '';
226
+ }
227
+ /** A milestone's full popup, under its title (WorkStatesDS 6): its date and how far off, the initiative's done test and Kill if, then PMOS's
228
+ * suggestion about it when there is one. row: { uid, end, start, done }. o: { kill, ro } */
229
+ export function msHead(row, W, o = {}) {
230
+ const d = day(row.end || row.start), t = day(W.today);
231
+ const n = d != null && t != null ? Math.round((d - t) / DAY) : null;
232
+ const left = row.done || n == null ? '' : n === 0 ? 'today' : n > 0 ? 'in ' + n + (n === 1 ? ' day' : ' days') : (-n === 1 ? '1 day' : -n + ' days') + ' late';
233
+ const when = d == null ? 'No date yet' : [dayText(row.end || row.start, W.today), row.done ? 'done' : left].filter(Boolean).join(' · ');
234
+ const dt = ((W.overview && W.overview.lines) || []).find((l) => l.id === 'done');
235
+ const r = (k, v, cls = '') => `<dt>${k}</dt><dd${cls ? ` class="${cls}"` : ''}>${esc(v)}</dd>`;
236
+ const facts = `<dl class="pwd-facts">${r('Date', when, n != null && n < 0 && !row.done ? 'warn' : '')}${r('Done test', dt && dt.text ? dt.text : 'Not written yet', dt && dt.text ? '' : 'grey')}${o.kill ? r('Kill if', o.kill) : ''}</dl>`;
237
+ const s = W.rowSuggests && W.rowSuggests.get ? W.rowSuggests.get(row.uid) : null;
238
+ return `<div class="pwd-msh">${facts}${s && !o.ro ? sugHtml(s) : ''}</div>`;
239
+ }
@@ -508,6 +508,10 @@ export function wire(body, h0, x0) {
508
508
  if (d.pwMore != null) { S.moreOpen.add(d.pwMore); redraw(); return; }
509
509
  if (d.pwVer) { if (ARTOPEN.has(d.pwVer)) ARTOPEN.delete(d.pwVer); else ARTOPEN.add(d.pwVer); redraw(); return; }
510
510
  if (d.pwRowMore) { rowMenu(b, d.pwRowMore, c, h, body); return; }
511
+ // quick edit in the row (work-ds-quick-edit, WorkStatesDS 1 and 3): the tick, Who and Stage
512
+ if (d.pwTick) { b.disabled = true; if (h.status) await h.status(d.pwTick, 'Done'); return; }
513
+ if (d.pwWho) { whoMenu(b, d.pwWho, c, h, x); return; }
514
+ if (d.pwStage) { stageMenu(b, d.pwStage, c, h, x); return; }
511
515
  if ('pwAddty' in d) { S.msAdd = !S.msAdd; const f = b.closest('.pw-add'), k = f && f.querySelector('[data-pw-add]') && f.querySelector('[data-pw-add]').dataset.pwAdd; redraw(); if (k != null) setTimeout(() => { const i = body.querySelector(`[data-pw-add="${window.CSS.escape(k)}"]`); if (i) i.focus(); }, 0); return; }
512
516
  if (d.pwFact) { fact(d.pwFact, b, c, h); return; }
513
517
  if (d.pwStatus) { statusMenu(b, d.pwStatus, h, c); return; }
@@ -515,7 +519,8 @@ export function wire(body, h0, x0) {
515
519
  if (d.pwName) { rename(b, d.pwName, h); return; }
516
520
  if (d.pwOpen) { openSmall(d.pwOpen, c, h, x, body); return; }
517
521
  if ('pwBacklog' in d) { const o = x.o() || {}, w = h.where ? h.where() : {}, q = new URLSearchParams({ work: 'backlog' }); if (w.ws || o.ws) q.set('ws', w.ws || o.ws); if (o.id) q.set('ini', o.id); location.href = '/premium-board.html?' + q.toString(); return; }
518
- if (d.cbMs != null) { msPop(b, d.cbMs, W, h); return; }
522
+ // a milestone ◇ opens its full popup (WorkStatesDS 6); a Jira one and a phone keep the small card
523
+ if (d.cbMs != null) { const rw = W.rows.find((r) => r.uid === d.cbMs); if (rw && !rw.jira && !phone()) openSmall(d.cbMs, c, h, x, body); else msPop(b, d.cbMs, W, h); return; }
519
524
  if (d.pwArt != null) { openArt(W.artefacts[+d.pwArt], h, x); return; }
520
525
  if ('pwAddart' in d) { addArt(x, h); return; }
521
526
  });
@@ -699,13 +704,49 @@ function dateMenu(btn, uid, c, h) {
699
704
  }
700
705
  function rowMenu(btn, uid, c, h, body) {
701
706
  const row = c.W.rows.find((x) => x.uid === uid) || {};
702
- openPop(btn, 'pw-rowm', `<button type="button" class="hi-mi" role="menuitem" data-k="kind">${SVG(row.ms ? P.box : P.dia, 14, 2)} ${row.ms ? 'Make it a task' : 'Make it a milestone'}</button>`
707
+ openPop(btn, 'pw-rowm', `<button type="button" class="hi-mi" role="menuitem" data-k="status">${SVG(P.box, 14, 2)} Status: ${esc(row.status || 'To do')}</button>`
708
+ + `<button type="button" class="hi-mi" role="menuitem" data-k="kind">${SVG(row.ms ? P.box : P.dia, 14, 2)} ${row.ms ? 'Make it a task' : 'Make it a milestone'}</button>`
703
709
  + `<button type="button" class="hi-mi" role="menuitem" data-k="open">${SVG(P.open, 14)} Open the task</button>` + jiraNote(row), (b) => {
710
+ const k = b.dataset.k;
711
+ // Status opens its own list (and its "when did this happen" line) in place of this menu
712
+ if (k === 'status') { statusMenu(btn, uid, h, c); return; }
704
713
  closePop();
705
- if (b.dataset.k === 'kind') setKind(row, !row.ms, h);
706
- else if (b.dataset.k === 'open') openSmall(uid, c, h, body.__pwx, body);
714
+ if (k === 'kind') setKind(row, !row.ms, h);
715
+ else if (k === 'open') openSmall(uid, c, h, body.__pwx, body);
707
716
  }, { menu: true, label: 'Task' });
708
717
  }
718
+ /* Who (WorkStatesDS 1): You, the people who own this initiative's tasks, and "PMOS does it". A name writes the owner (Undo puts the old one
719
+ * back, POST /api/boards/tasks/edit with `from`); PMOS does it gives the task to PMOS (POST /api/backlog/give; Undo is /api/backlog/stop). */
720
+ function whoMenu(btn, uid, c, h, x) {
721
+ const row = c.W.rows.find((r) => r.uid === uid) || {};
722
+ const L = PD.whoOf(c.W.rows, row.who || '');
723
+ openPop(btn, 'pw-who', L.map((p, i) => `<button type="button" class="hi-mi" role="menuitemradio" aria-checked="${!!p.on}" data-i="${i}">${SVG(p.pmos ? P.spark : PD.I.who, 14, 2)} ${esc(p.label)}</button>`).join(''), async (b) => {
724
+ const p = L[+b.dataset.i]; closePop(); if (!p || p.on) return;
725
+ const o = (x && x.o && x.o()) || {}, w = h.where ? h.where() : {}, ws = w.ws || o.ws, board = w.board || o.board;
726
+ const say = (m) => (h.toast ? h.toast(m) : undoToast(m));
727
+ if (p.pmos) {
728
+ const r = await pmPost('/api/backlog/give', { ws, board, tasks: [uid] }).catch(() => null);
729
+ if (!r || r.ok === false) { say((r && r.error) || 'PMOS did not take it.'); return; }
730
+ undoToast('PMOS does ' + (row.title || 'it') + '.', async () => { const u = await pmPost('/api/backlog/stop', { ws, board, task: uid }).catch(() => null); if (!u || u.ok === false) say((u && u.error) || 'The undo did not land.'); if (h.reload) await h.reload(); });
731
+ if (h.reload) await h.reload();
732
+ return;
733
+ }
734
+ const owner = p.k === 'You' ? '' : p.k;
735
+ const r = await pmPost('/api/boards/tasks/edit', { ws, board, task: uid, owner }).catch(() => null);
736
+ if (!r || r.ok === false) { say((r && r.error) || 'The owner was not changed.'); return; }
737
+ const was = (r.from && r.from.owner) || '';
738
+ undoToast((owner ? owner + ' has ' : 'You have ') + (row.title || 'it') + '.', async () => { const u = await pmPost('/api/boards/tasks/edit', { ws, board, task: uid, owner: was }).catch(() => null); if (!u || u.ok === false) say((u && u.error) || 'The undo did not land.'); if (h.reload) await h.reload(); });
739
+ if (h.reload) await h.reload();
740
+ }, { menu: true, label: 'Who', focus: '[aria-checked="true"]' });
741
+ }
742
+ /* Stage (WorkStatesDS 1): the workflow's stages; a pick moves the task there through the host's move (its toast carries the Undo) */
743
+ function stageMenu(btn, uid, c, h, x) {
744
+ const st = stagesOf(c.r, c.v, { ...((x && x.o && x.o()) || {}), today: c.W.today }), cur = PD.stageOfTask(st, uid), L = PD.stageList(st, cur);
745
+ openPop(btn, 'pw-stage', L.map((s, i) => `<button type="button" class="hi-mi" role="menuitemradio" aria-checked="${s.on}" data-i="${i}">${esc(s.name)}</button>`).join('') || '<p class="hi-small">This work has no stages.</p>', (b) => {
746
+ const s = L[+b.dataset.i]; closePop(); if (!s || s.on || !h.move) return;
747
+ h.move(uid, { to: s.key, from: cur, name: s.name });
748
+ }, { menu: true, label: 'Stage', focus: '[aria-checked="true"]' });
749
+ }
709
750
  /* "Open the task" opens the small task popup on top (round 3 point 20, pm/cozy-task-pop.js); ↑ ↓ step through this list. A Jira ticket keeps its
710
751
  * ticket view. On close the row is lit for a moment. */
711
752
  async function openSmall(uid, c, h, x, body, bt) {
@@ -723,6 +764,24 @@ async function openSmall(uid, c, h, x, body, bt) {
723
764
  // the row behind changes at once (Wawan, 2026-11-19: a new date or status did not show until the board was read again); the reload follows
724
765
  patch: (u, p) => { const rr = x && x.r && x.r(), tk = rr && Array.isArray(rr.tasks) ? rr.tasks.find((q) => q && q.uid === u) : null; if (!tk) return; if (!p) { rr.tasks.splice(rr.tasks.indexOf(tk), 1); if (h.redraw) h.redraw(); return; } Object.assign(tk, { status: p.status || tk.status, end: p.end, start: p.start, milestone: p.milestone }); if (h.redraw) h.redraw(); },
725
766
  onChange: () => { if (h.reload) h.reload(); },
767
+ // the full popup over the work side (work-ds-quick-edit, WorkStatesDS 4 and 6): ← and the path go back to this initiative, the chat button
768
+ // shows the popup's chat, × closes the popup; a milestone shows its date, the done test and PMOS's suggestion about it
769
+ full: !phone(), path: [o.from || 'Work', o.product || '', ((x && x.v && x.v()) || {}).title || ''].filter(Boolean),
770
+ chat: () => { const a = document.querySelector('.cz-pop [data-pop="ask"]'); if (a) a.click(); },
771
+ closeAll: () => { const k = document.querySelector('.cz-pop [data-pop="close"]'); if (k) k.click(); },
772
+ head: (t) => {
773
+ if (!t.milestone) return '';
774
+ const cc = body.__pwx && body.__pwx.r() ? model(body.__pwx.r(), body.__pwx.v(), body.__pwx.o()) : c, rr = (x && x.r && x.r()) || {};
775
+ return PD.msHead({ uid: t.uid, end: t.due, start: t.start, done: /^done$/i.test(t.status || '') }, cc.W, { kill: rr.kill || (rr.outcome && rr.outcome.kill) || '' });
776
+ },
777
+ headPress: async (b, tp) => {
778
+ const d = b.dataset, cc = body.__pwx && body.__pwx.r() ? model(body.__pwx.r(), body.__pwx.v(), body.__pwx.o()) : c;
779
+ const sg = findSug(cc.W, d.pwKeep || d.pwDrop || d.pwSug || ''); if (!sg) return false;
780
+ if (d.pwKeep) { b.disabled = true; await keepSug(sg, x, h); tp.refresh(); return true; }
781
+ if (d.pwDrop) { b.disabled = true; await dropSug(sg, x, h); tp.refresh(); return true; }
782
+ if (d.pwSug) { tp.close(); openSug(sg, cc, x, h); return true; }
783
+ return false;
784
+ },
726
785
  onClose: (u) => { const r = body.querySelector(`[data-pw-row="${window.CSS.escape(u)}"]`); if (r) { r.classList.add('lit'); r.scrollIntoView({ block: 'nearest' }); setTimeout(() => r.classList.remove('lit'), 1600); } },
727
786
  });
728
787
  }
@@ -33,3 +33,22 @@ button.ctp-t:hover { background: var(--cz-well); }
33
33
  }
34
34
  .ctp-when .sw { border-top: 0; margin-top: 0; padding-top: 0; }
35
35
  .ctp-menu button.ctp-del { color: var(--cz-late); }
36
+ /* the full popup (work-ds-quick-edit, WorkStatesDS 4 and 6): it takes the place of the popup's work side, the same size; the chat beside it stays
37
+ * usable, so its scrim neither dims nor catches presses. Head: ← and the path, then chat, ⋯ and ×; under it the kind and the title. */
38
+ .ctp-scrim.ctp-full { background: transparent; pointer-events: none; }
39
+ .ctp.ctp-full { transform: none; max-height: none; width: auto; border-radius: 28px; padding: var(--space-16) var(--space-24) var(--space-24); box-shadow: 0 0 0 1px var(--cz-hair); }
40
+ .ctp-full .ctp-fh { margin-bottom: var(--space-16); }
41
+ .ctp-path { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--space-4); font-size: var(--fs-row); color: var(--cz-ink2); overflow: hidden; white-space: nowrap; }
42
+ .ctp-cr { border: 0; background: none; padding: 0; font: inherit; color: inherit; overflow: hidden; text-overflow: ellipsis; }
43
+ button.ctp-cr { cursor: pointer; color: var(--cz-ink); }
44
+ button.ctp-cr:hover { text-decoration: underline; }
45
+ .ctp-sep { color: var(--cz-ink2); }
46
+ .ctp-th { display: flex; align-items: center; gap: var(--space-8); margin: 0 0 var(--space-12); }
47
+ .ctp-full .ctp-t { font-size: var(--fs-panel); }
48
+ .ctp-full .ctp-b, .ctp-full .ctp-hx { max-width: 720px; }
49
+ .ctp-hx { margin: 0 0 var(--space-16); display: flex; flex-direction: column; gap: var(--space-12); }
50
+ .ctp-hx .pwd-facts { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: var(--space-4) var(--space-12); margin: 0; }
51
+ .ctp-hx .pwd-facts dt { color: var(--cz-ink2); }
52
+ .ctp-hx .pwd-facts dd { margin: 0; }
53
+ .ctp-hx .grey { color: var(--cz-ink2); }
54
+ .ctp-hx .warn { color: var(--cz-late); }
@@ -5,7 +5,11 @@
5
5
  * row?(uid) → the row the host drew (GET /api/boards/items adds the owner and notes when it answers), list?() → [uid] (↑ ↓ step through it),
6
6
  * rename?(task, title) → Promise (the title,
7
7
  * pressed, becomes a field; Enter or leaving it saves), onClose?(uid) (the host
8
- * lights the row), openIni?(id) }
8
+ * lights the row), openIni?(id),
9
+ * full?: true → the full popup over the work side of the popup (work-ds-quick-edit, WorkStatesDS 4 and 6): ← and the
10
+ * path (path?: [crumb]) go back to the initiative, chat?() shows the popup's chat, × closes the task and the popup
11
+ * (closeAll?()); head?(t) → html under the title (a milestone's date, done test and suggestion), its presses go to
12
+ * headPress?(button, { refresh, close }) }
9
13
  * closeTask() closes it, as ✕, Esc or a press outside do. Esc closes only the small popup.
10
14
  *
11
15
  * Inside: the kind (Task or Milestone, pressed to switch) and the title; the one task card (pm/task-card.js mountCard: status, due, owner, notes,
@@ -22,6 +26,7 @@ if (typeof document !== 'undefined' && document.head && !document.querySelector(
22
26
  const esc = (s) => String(s == null ? '' : s).replace(/[&<>"']/g, (c) => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#39;' }[c]));
23
27
  const SVG = (d) => `<svg aria-hidden="true" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="${d}"/></svg>`;
24
28
  const P = {
29
+ back: 'M19 12H5M11 6l-6 6 6 6',
25
30
  x: 'M6 6l12 12M18 6L6 18', up: 'M7 14l5-5 5 5', down: 'M7 10l5 5 5-5', chat: 'M4 5h16v11H9l-5 4z', more: 'M5 12h.01M12 12h.01M19 12h.01',
26
31
  dia: 'M12 4l8 8-8 8-8-8z', box: 'M6 5h12a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1z',
27
32
  };
@@ -40,15 +45,24 @@ async function rowOf(uid, ctx) {
40
45
 
41
46
  export function closeTask() {
42
47
  if (!S) return;
43
- const { el, scrim, uid, ctx, prevFocus } = S;
48
+ const S0 = S, { el, scrim, uid, ctx, prevFocus } = S;
44
49
  S = null;
45
50
  document.removeEventListener('keydown', onKey, true);
51
+ if (S0.ro) S0.ro.disconnect(); if (S0.offPop) document.removeEventListener('click', S0.offPop, true); window.removeEventListener('resize', place);
46
52
  el.remove(); scrim.remove();
47
53
  document.body.classList.remove('ctp-on');
48
54
  if (ctx.onClose) ctx.onClose(uid);
49
55
  if (prevFocus && prevFocus.isConnected) prevFocus.focus();
50
56
  }
51
57
 
58
+ /** The full popup takes the place of the popup's work side; with no popup open it stays centred. */
59
+ function place() {
60
+ if (!S || !S.el.classList.contains('ctp-full')) return;
61
+ const L = document.querySelector('.cz-pop .cz-pop-l'), r = L && L.getBoundingClientRect();
62
+ if (!r || !r.width) { S.el.removeAttribute('style'); return; }
63
+ Object.assign(S.el.style, { left: r.left + 'px', top: r.top + 'px', width: r.width + 'px', height: r.height + 'px' });
64
+ }
65
+
52
66
  function onKey(e) {
53
67
  if (!S) return;
54
68
  if (e.key === 'Escape') {
@@ -71,6 +85,16 @@ export async function openTask(uid, ctx = {}) {
71
85
  document.body.append(scrim, el);
72
86
  document.body.classList.add('ctp-on');
73
87
  S = { el, scrim, ctx, uid, prevFocus: document.activeElement };
88
+ // the full popup lies over the work side of the popup and follows its size (the chat opening beside it narrows it)
89
+ if (ctx.full) {
90
+ el.classList.add('ctp-full'); scrim.classList.add('ctp-full');
91
+ const L = document.querySelector('.cz-pop .cz-pop-l');
92
+ if (L && typeof ResizeObserver !== 'undefined') { S.ro = new ResizeObserver(place); S.ro.observe(L); }
93
+ window.addEventListener('resize', place); place();
94
+ // the popup behind closing (its scrim or its own ×) takes the full popup with it
95
+ S.offPop = (e) => { if (e.target.closest && e.target.closest('.cz-pop [data-pop="close"]')) closeTask(); };
96
+ document.addEventListener('click', S.offPop, true);
97
+ }
74
98
  document.addEventListener('keydown', onKey, true);
75
99
  el.addEventListener('click', press);
76
100
  // the status pick waits for the day (point 18): the card's own press is held here, the line opens under the card
@@ -96,9 +120,20 @@ async function show(uid) {
96
120
  const title = !t.jira && ctx.rename ? `<button type="button" class="ctp-t" data-ctp-rename aria-label="${esc('Rename ' + t.title)}">${esc(t.title)}</button>` : `<span class="ctp-t">${esc(t.title)}</span>`;
97
121
  const step = L.length > 1 && i >= 0 ? ib(`data-ctp-step="-1"${i === 0 ? ' disabled' : ''}`, 'Previous task', P.up) + ib(`data-ctp-step="1"${i === L.length - 1 ? ' disabled' : ''}`, 'Next task', P.down) : '';
98
122
  const more = !t.jira ? ib('data-ctp-more aria-haspopup="menu"', 'More for this task', P.more) : '';
99
- S.el.setAttribute('aria-label', 'Task: ' + t.title);
100
- S.el.innerHTML = `<div class="ctp-h">${kind}${title}<span class="ctp-tools">${step}${more}${ib('data-ctp-close', 'Close', P.x)}</span></div>`
101
- + '<div class="ctp-b"></div><div class="ctp-when" hidden></div>';
123
+ S.el.setAttribute('aria-label', (t.milestone ? 'Milestone: ' : 'Task: ') + t.title);
124
+ if (ctx.full) {
125
+ // WorkStatesDS 4 and 6: ← and the path back to the initiative, then chat, ⋯ and ×; the kind and the title under it
126
+ const path = ctx.path || [], last = path.length - 1;
127
+ const crumbs = path.map((p, k) => (k === last ? `<button type="button" class="ctp-cr" data-ctp-close>${esc(p)}</button>` : `<span class="ctp-cr">${esc(p)}</span>`)).join('<span class="ctp-sep" aria-hidden="true">›</span>');
128
+ const head = ctx.head ? ctx.head(t) : '';
129
+ S.el.innerHTML = `<div class="ctp-h ctp-fh">${ib('data-ctp-close', 'Back to ' + (path[last] || 'the initiative'), P.back)}<nav class="ctp-path" aria-label="Where this is">${crumbs}</nav>`
130
+ + `<span class="ctp-tools">${step}${ctx.chat ? ib('data-ctp-chat', 'Ask PMOS about this', P.chat) : ''}${more}${ib('data-ctp-x', 'Close', P.x)}</span></div>`
131
+ + `<div class="ctp-th">${kind}${title}</div>${head ? `<div class="ctp-hx">${head}</div>` : ''}`
132
+ + '<div class="ctp-b"></div><div class="ctp-when" hidden></div>';
133
+ } else {
134
+ S.el.innerHTML = `<div class="ctp-h">${kind}${title}<span class="ctp-tools">${step}${more}${ib('data-ctp-close', 'Close', P.x)}</span></div>`
135
+ + '<div class="ctp-b"></div><div class="ctp-when" hidden></div>';
136
+ }
102
137
  const base = boardSaver({ ws: ctx.ws, board: raw.board || ctx.board, t, post: (p, b) => ctx.pmPost(p, b) });
103
138
  const save = (patch) => {
104
139
  // a status the PM dated earlier carries that day; Undo and every other change go as they always did
@@ -147,7 +182,10 @@ async function press(e) {
147
182
  if (!S) return;
148
183
  const b = e.target.closest('button'); if (!b || b.disabled || !S.el.contains(b)) return;
149
184
  const d = b.dataset, ctx = S.ctx, t = S.t;
185
+ if (b.closest('.ctp-hx')) { if (ctx.headPress) { const s0 = S; await ctx.headPress(b, { refresh: () => { if (S === s0) show(s0.uid); }, close: closeTask }); } return; }
150
186
  if ('ctpClose' in d) { closeTask(); return; }
187
+ if ('ctpChat' in d) { if (ctx.chat) ctx.chat(); return; }
188
+ if ('ctpX' in d) { const all = ctx.closeAll; closeTask(); if (all) all(); return; }
151
189
  if (d.ctpStep) { const L = ctx.list ? ctx.list() : [], j = L.indexOf(S.uid) + Number(d.ctpStep); if (j >= 0 && j < L.length) show(L[j]); return; }
152
190
  if ('ctpRename' in d && t && ctx.rename) { renameField(b); return; }
153
191
  if ('ctpKind' in d && t) { kindOf(!t.milestone); return; }