create-pmos 0.417.0 → 0.418.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.
Files changed (35) hide show
  1. package/package.json +13 -13
  2. package/payload/KIT-VERSION +1 -1
  3. package/payload/planning/evals/eval-calibration.md +1 -1
  4. package/payload/planning/okrs/health-budgets.md +1 -1
  5. package/payload/state/discoveries.md +1 -1
  6. package/workspace/board-programs-test.js +68 -1
  7. package/workspace/briefing-premium-board-test.js +21 -19
  8. package/workspace/changelog.json +12 -0
  9. package/workspace/guide/workflows.md +1 -0
  10. package/workspace/lib/engine/boards.js +7 -2
  11. package/workspace/lib/initiative-chat.js +1 -1
  12. package/workspace/lib/initiative-premium.js +2 -1
  13. package/workspace/lib/routes-boards.js +36 -6
  14. package/workspace/lib/task-cli.js +27 -3
  15. package/workspace/lib/task-items.js +5 -1
  16. package/workspace/package-lock.json +2 -2
  17. package/workspace/package.json +1 -1
  18. package/workspace/public/pm/bd-acts.js +3 -2
  19. package/workspace/public/pm/bd-scroll.js +164 -0
  20. package/workspace/public/pm/bd-span.js +151 -188
  21. package/workspace/public/pm/bd-stages.js +3 -25
  22. package/workspace/public/pm/cozy-board.css +92 -71
  23. package/workspace/public/pm/home-app.js +2 -0
  24. package/workspace/public/pm/home-data.js +17 -4
  25. package/workspace/public/pm/home-ini-model.js +5 -1
  26. package/workspace/public/pm/home-ini.js +4 -2
  27. package/workspace/public/pm/home-list.js +3 -3
  28. package/workspace/public/pm/home-task.js +4 -1
  29. package/workspace/public/pm/ini-view-model.js +4 -2
  30. package/workspace/public/pm/premium-board.js +48 -37
  31. package/workspace/public/pm/premium-vw-item.js +5 -2
  32. package/workspace/public/pm/task-card.js +12 -0
  33. package/workspace/public/premium-board.html +3 -2
  34. package/workspace/server.js +3 -0
  35. package/workspace/task-card-test.js +7 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-pmos",
3
- "version": "0.417.0",
3
+ "version": "0.418.0",
4
4
  "description": "Scaffold the PMOS portable kit — run the PMOS product-management workflow (initiative → lane-fit spec → contract → build → three gates, with work-type lanes for features, research, maintenance, incidents, and content) entirely inside your own repo, with all state as git-versioned files. Includes `workflow-sweep`, which audits the state every board derives from and separates real defects from work you simply have not done. `create-pmos workspace` also installs + launches the local Terminal Workspace GUI. No database, no network, no telemetry.",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -32,6 +32,18 @@
32
32
  "audit"
33
33
  ],
34
34
  "pmosChanges": [
35
+ {
36
+ "v": "0.418.0",
37
+ "at": "2026-10-26T01:29:44.041Z",
38
+ "f": 2,
39
+ "prs": [
40
+ {
41
+ "n": 1051,
42
+ "t": "Seventh testing feedback batch (items 1–7)",
43
+ "s": "Chats PMOS ended stay on Home, the timeline's longer spans scroll like Quarter, tasks can be deleted with Undo, task rows show start and end dates, and a press on any task in the initiative page opens that task."
44
+ }
45
+ ]
46
+ },
35
47
  {
36
48
  "v": "0.417.0",
37
49
  "at": "2026-10-26T01:02:52.959Z",
@@ -264,18 +276,6 @@
264
276
  "s": "Build the uncovered features from the canvas review"
265
277
  }
266
278
  ]
267
- },
268
- {
269
- "v": "0.398.0",
270
- "at": "2026-10-23T04:45:54.728Z",
271
- "f": 2,
272
- "prs": [
273
- {
274
- "n": 1012,
275
- "t": "Rebuild Home, Viewer, Board and Insights to the Agreed design",
276
- "s": "Rebuild Home, Viewer, Board and Insights to the Agreed design"
277
- }
278
- ]
279
279
  }
280
280
  ]
281
281
  }
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@4510c3e0
1
+ kernel-source: pmos@86ec227a
2
2
  assembled: 2026-10-26
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-10-26T01:02:49Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-26T01:29:40Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -2,7 +2,7 @@
2
2
  type: Reference
3
3
  title: "Health budgets"
4
4
  description: "Closed registry of health-budget anchors (D59), edited only by the PM."
5
- generated: {by: process:create-pmos, at: "2026-10-26T01:02:49Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-26T01:29:40Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -2,7 +2,7 @@
2
2
  type: Reference
3
3
  title: "Discoveries and friction log"
4
4
  description: "Append-only record of what runs discovered and where the process rubbed."
5
- generated: {by: process:create-pmos, at: "2026-10-26T01:02:49Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-26T01:29:40Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -157,7 +157,7 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
157
157
  lgd: (document.querySelector('#bdChipset .tg-lgd') || {}).textContent || '',
158
158
  }));
159
159
  ok('T the program row comes first, with its title and products and a thin span over its initiatives\' dates', /tg-pg/.test(t.first) && /Project Ascent/.test(t.title) && /2 products/.test(t.title) && t.span, JSON.stringify(t));
160
- ok('T three milestones within a week merge into one counted diamond labelled "Pilot live +2 · Nov 18–21"', t.clu.length === 1 && /^3\|3 program milestones from Nov 18 to 21: Pilot live, Pilot users invited, Support ready/.test(t.clu[0]) && t.lab.join() === 'Pilot live +2 · Nov 18–21', JSON.stringify(t));
160
+ ok('T three milestones within a week merge into one counted diamond labelled "Pilot live +2 · Nov 18–21"', t.clu.length === 1 && /^3\|3 program milestones from Nov 18 to 21: Pilot live, Pilot users invited, Support ready/.test(t.clu[0]) && t.lab.includes('Pilot live +2 · Nov 18–21'), JSON.stringify(t));
161
161
  ok('T the program\'s initiatives sit under it as one-line rows: a status dot and the name', t.kids.join() === 'Descope feature parity,Legacy IdP sunset' && t.oneLine, JSON.stringify(t));
162
162
  ok('T a legend in the chip row names done, planned, the program milestone, Deliver or Evaluate and today', /Done in Jira/.test(t.lgd) && /Planned/.test(t.lgd) && /Program milestone/.test(t.lgd) && /Deliver or Evaluate/.test(t.lgd) && /Today/.test(t.lgd), t.lgd);
163
163
  await p.click('#ibBody .tg-pg .tg-pgo');
@@ -169,6 +169,73 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
169
169
  await ctx.close();
170
170
  }
171
171
 
172
+ /* S the timeline scrolls sideways from Quarter on (feedback batch 7, timeline spans C: TsCOpen, TsCDesk, TsCEdges, TsCGrill, TsCPhone) */
173
+ {
174
+ const { ctx, page: p, errors } = await open({ view: 'time', store: { 'pmos.board.span': 'quarter' } });
175
+ const geo = () => p.evaluate(() => { const el = document.querySelector('#ibBody .tg-s'), sc = el.querySelector('.tg-sc'), nw = el.querySelector('.tg-h > .tg-n').getBoundingClientRect().width, vw = sc.clientWidth - nw, tw = sc.scrollWidth - nw;
176
+ const xOf = (ms) => ((ms - +el.dataset.from) / (+el.dataset.to - +el.dataset.from)) * tw, tx = xOf(+el.dataset.now);
177
+ const mid = +el.dataset.from + ((sc.scrollLeft + vw / 2) / tw) * (+el.dataset.to - +el.dataset.from);
178
+ const vis = (b) => !b.hidden && getComputedStyle(b).display !== 'none';
179
+ return { span: el.dataset.span, l: sc.scrollLeft, vw, tw, at: (tx - sc.scrollLeft) / vw, mid, back: [...el.querySelectorAll('.tg-tback')].filter(vis).map((b) => b.className), pill: !!el.querySelector('.tg-tpill'),
180
+ tabs: [...el.querySelectorAll('.tg-edge')].filter(vis).map((b) => b.dataset.edge + ':' + b.textContent.trim()), out: el.querySelectorAll('.tg-out').length, first: (el.querySelector('.tg-h .tg-p > span.pin') || {}).textContent || '', label: sc.getAttribute('aria-label') }; });
181
+ const DAY = 86400000;
182
+ let g = await geo();
183
+ ok('S Quarter opens with today a quarter of the way in, wider than the screen, the ends shaded, Today on its line', g.tw > g.vw * 1.5 && Math.abs(g.at - 0.25) < 0.03 && g.pill && !g.back.length && g.out > 0, JSON.stringify(g));
184
+ ok('S the first column on screen carries the year, and the scroller names its range', /2026/.test(g.first) && /^Timeline, Oct 2026 to (Nov|Dec) 2026/.test(g.label), JSON.stringify(g));
185
+ ok('S the next program milestone past the view waits on the right edge in the program colour', g.tabs.some((x) => /^m:Legacy IdP off · Feb ’27$/.test(x)), JSON.stringify(g.tabs));
186
+ await p.focus('#ibBody .tg-sc'); const l0 = g.l; await p.keyboard.press('ArrowRight'); await p.waitForTimeout(700);
187
+ g = await geo();
188
+ ok('S → moves half a screen', Math.abs(g.l - l0 - g.vw / 2) < 6, JSON.stringify({ l0, l: g.l, vw: g.vw }));
189
+ await p.evaluate(() => { const sc = document.querySelector('#ibBody .tg-sc'); sc.scrollLeft = sc.scrollWidth; }); await p.waitForTimeout(200);
190
+ g = await geo();
191
+ ok('S scrolled to the end: Today waits beside "Initiative" pointing back, unfinished work behind leaves its due date at the left edge', g.back.length === 1 && /\bl\b/.test(g.back[0]) && g.tabs.includes('l:Nov ’26'), JSON.stringify(g));
192
+ // from a place in the middle of the range (at the far end the next span's track can be shorter and stops short)
193
+ await p.evaluate(() => { const sc = document.querySelector('#ibBody .tg-sc'); sc.scrollLeft = (sc.scrollWidth - sc.clientWidth) / 2; }); await p.waitForTimeout(200);
194
+ const mid = (await geo()).mid;
195
+ await p.click('#bdSpans [data-sp="half"]'); await p.waitForTimeout(250);
196
+ g = await geo();
197
+ ok('S switching span keeps the date in the middle in the middle', g.span === 'half' && Math.abs(g.mid - mid) < 3 * DAY, JSON.stringify({ mid: new Date(mid), now: new Date(g.mid) }));
198
+ await p.click('#ibBody .tg-tback'); await p.waitForTimeout(800);
199
+ g = await geo();
200
+ ok('S the Today button scrolls back to today, a quarter of the way in, and hides', Math.abs(g.at - 0.25) < 0.03 && !g.back.length, JSON.stringify(g));
201
+ await p.click('#bdSpans [data-sp="y2"]'); await p.waitForTimeout(250);
202
+ g = await geo();
203
+ ok('S with today in view, a span switch keeps today in its place', g.span === 'y2' && (g.l === 0 || Math.abs(g.at - 0.25) < 0.03), JSON.stringify(g));
204
+ const lab2 = await p.evaluate(() => [...document.querySelectorAll('#ibBody .tg-endl, #ibBody .tg-pdl')].map((e) => e.textContent));
205
+ ok('S 2 yr names dates by month and year ("Nov ’26")', lab2.some((x) => /Nov ’26/.test(x)) && !lab2.some((x) => /\b[A-Z][a-z]{2} \d{1,2}\b/.test(x)), JSON.stringify(lab2));
206
+ await p.click('#bdSpans [data-sp="sprint"]'); await p.waitForTimeout(200);
207
+ await p.evaluate(() => { const sc = document.querySelector('#ibBody .tg-sc'); if (sc) sc.scrollLeft = 0; });
208
+ await p.click('#bdSpans [data-sp="quarter"]'); await p.waitForTimeout(250);
209
+ g = await geo();
210
+ ok('S Sprint does not scroll, and going from Sprint to Quarter opens at today', !(await p.evaluate(() => !!document.querySelector('.sp .tg-sc'))) && Math.abs(g.at - 0.25) < 0.03, JSON.stringify(g));
211
+ // a drag on empty track scrolls; a press on a bar still opens the initiative
212
+ const box = await p.evaluate(() => { const el = document.querySelector('#ibBody .tg-s'), r = el.querySelector('.tg-sc').getBoundingClientRect(), nw = el.querySelector('.tg-h > .tg-n').getBoundingClientRect().width, y = el.querySelector('.tg-pg .tg-p').getBoundingClientRect().top; return { x: r.left + nw + 40, y: y + 6 }; });
213
+ const l1 = (await geo()).l;
214
+ await p.mouse.move(box.x + 300, box.y); await p.mouse.down(); await p.mouse.move(box.x + 200, box.y, { steps: 4 }); await p.mouse.move(box.x + 100, box.y, { steps: 4 }); await p.mouse.up();
215
+ g = await geo();
216
+ ok('S a drag on empty track scrolls the timeline', Math.abs(g.l - l1 - 200) < 12, JSON.stringify({ l1, l: g.l }));
217
+ // Find scrolls an off-screen bar into view and tints its row (TsCEdges 4)
218
+ await p.evaluate(() => { document.querySelector('#ibBody .tg-sc').scrollLeft = 0; }); await p.waitForTimeout(150);
219
+ await p.click('#bdFind'); await p.fill('#bdQ', 'Legacy'); await p.keyboard.press('Enter'); await p.waitForTimeout(700);
220
+ const f = await p.evaluate(() => { const row = [...document.querySelectorAll('#ibBody .tg-r[data-row]')].find((r) => /Legacy IdP sunset/.test(r.textContent)); const sc = document.querySelector('#ibBody .tg-sc'), b = row.querySelector('.tg-bar').getBoundingClientRect(), s = sc.getBoundingClientRect(); return { tint: row.classList.contains('tint'), inView: b.right > s.left + 250 && b.left < s.right }; });
221
+ ok('S Find scrolls the bar into view and tints its row for a moment', f.tint && f.inView, JSON.stringify(f));
222
+ ok('S the scroll threw nothing', !errors.length, errors.join('\n'));
223
+ await ctx.close();
224
+ }
225
+ {
226
+ // the phone (TsCPhone, TsCPhoneSpan): the timeline is a view; the span buttons become one picker beside the product picker
227
+ const { ctx, page: p, errors } = await open({ view: 'time', w: 390, h: 844, store: { 'pmos.board.pview': 'time', 'pmos.board.span': 'quarter' } });
228
+ const ph = await p.evaluate(() => ({ spans: !document.querySelector('#bdSpans').hidden, pick: (document.querySelector('#bdSpanBtn') || {}).textContent || '', rows: [...document.querySelectorAll('#ibBody .tgq-r .tgq-n b')].map((b) => b.textContent), names: document.querySelectorAll('#ibBody .tgq-r[data-row] .tgq-n').length }));
229
+ ok('S phone: one span picker beside the product, no span row; each row carries its name above its bar', !ph.spans && ph.pick === 'Quarter' && ph.names === 2 && ph.rows.includes('Legacy IdP sunset'), JSON.stringify(ph));
230
+ await p.click('#bdSpanBtn'); await p.click('#bdSpanMenu [data-spick="year"]'); await p.waitForTimeout(200);
231
+ ok('S phone: the picker changes the span', await p.evaluate(() => document.querySelector('#ibBody .tg-s').dataset.span === 'year' && document.querySelector('#bdSpanBtn').textContent === 'Year' && localStorage.getItem('pmos.board.span') === 'year'));
232
+ await p.evaluate(() => { const sc = document.querySelector('#ibBody .tg-sc'); sc.scrollLeft = sc.scrollWidth; }); await p.waitForTimeout(200);
233
+ const pb = await p.evaluate(() => ({ back: [...document.querySelectorAll('#ibBody .tg-tback')].filter((b) => !b.hidden).map((b) => b.className), tabs: [...document.querySelectorAll('#ibBody .tg-edge')].filter((b) => !b.hidden).length }));
234
+ ok('S phone: swiped ahead, Today docks at the axis edge; only late work leaves an edge tab', pb.back.length === 1 && pb.tabs === 0, JSON.stringify(pb));
235
+ ok('S phone threw nothing', !errors.length, errors.join('\n'));
236
+ await ctx.close();
237
+ }
238
+
172
239
  /* L List (PgList) */
173
240
  {
174
241
  const { ctx, page: p } = await open({ view: 'list' });
@@ -320,14 +320,13 @@ const IVREAD = () => {
320
320
  await R.ctx.close();
321
321
  }
322
322
 
323
- /* B6 (premium-agreed-design B2) the timeline: plan against the Jira forecast; Quarter, Year and 5 yr are drawn, the other spans wait for design */
323
+ /* B6 (premium-agreed-design B2) the timeline: plan against the Jira forecast; every span from Quarter on draws the same rows (feedback batch 7,
324
+ * timeline spans C: TsAllSpans); the scroll itself is checked in board-programs-test.js (T) */
324
325
  await view(p, 'time');
325
- const tl = await p.evaluate(() => ({ spans: [...document.querySelectorAll('#bdSpans button')].map((b) => b.textContent + (b.getAttribute('aria-pressed') === 'true' ? '*' : '')).join(), shown: !document.querySelector('#bdSpans').hidden, rows: [...document.querySelectorAll('#ibBody .tg-r .tg-n.ini2 b')].map((b) => b.textContent), bars: document.querySelectorAll('#ibBody .tg-bar').length, none: (document.querySelector('.tg-none') || {}).textContent || '', ask: (document.querySelector('#askDates') || {}).href || '', hid: (document.querySelector('.tg-hid') || {}).textContent || '', lgd: (document.querySelector('.tg-lgd') || {}).textContent || '', today: [...document.querySelectorAll('#ibBody .tg-axl, #ibBody .tg-ax *')].some((e) => e.textContent === 'Today') }));
326
+ const tl = await p.evaluate(() => ({ spans: [...document.querySelectorAll('#bdSpans button')].map((b) => b.textContent + (b.getAttribute('aria-pressed') === 'true' ? '*' : '')).join(), shown: !document.querySelector('#bdSpans').hidden, rows: [...document.querySelectorAll('#ibBody .tg-r .tg-n.ini2 b')].map((b) => b.textContent), bars: document.querySelectorAll('#ibBody .tg-bar').length, none: (document.querySelector('.tg-none') || {}).textContent || '', ask: (document.querySelector('#askDates') || {}).href || '', hid: (document.querySelector('.tg-hid') || {}).textContent || '', lgd: (document.querySelector('.tg-lgd') || {}).textContent || '', today: (document.querySelector('#ibBody .tg-tpill') || {}).textContent === 'Today' }));
326
327
  ok('B6 the timeline has six spans and starts on Quarter, one row per initiative with dates; the others are named, with an ask to propose dates', tl.shown && tl.spans === 'Sprint,Quarter*,Half,Year,2 yr,5 yr' && tl.rows.length === 3 && tl.bars === 3 && /^2 have no dates: Usage-based billing, Docs search/.test(tl.none) && /\/premium\.html\?ask=board%3Aw1&q=Propose/.test(tl.ask), JSON.stringify(tl));
327
328
  ok('B6 Monitor and Evaluate are hidden on the Quarter and the footer says how many; the legend (PgTimeline: done, planned, the Jira forecast, Deliver or Evaluate, today) and Today are drawn', tl.hid === 'Monitor and Evaluate hidden · 22' && /Done in Jira/.test(tl.lgd) && /Planned/.test(tl.lgd) && /Jira forecast/.test(tl.lgd) && /Deliver or Evaluate/.test(tl.lgd) && /Today/.test(tl.lgd) && tl.today, JSON.stringify(tl));
328
- await p.click('#ibBody [data-rules]');
329
- ok('B6 the timeline\'s first head opens "The longer the span, the higher the grouping", with the spans and the example themes', await until(() => p.evaluate(() => !document.querySelector('#popRules').hidden && /The longer the span, the higher the grouping/.test(document.querySelector('#popRules').textContent) && document.querySelectorAll('#popRules .bd-tbl4 .bd-tr').length === 5 && document.querySelectorAll('#popRules .bd-tbl3 .bd-tr').length === 5)));
330
- await p.keyboard.press('Escape');
329
+ ok('B6 the spans help popover went with the theme grouping (TsCGrill): the first head is a plain "Initiative"', await p.evaluate(() => !document.querySelector('#popRules') && !document.querySelector('#ibBody [data-rules]') && /^Initiative/.test(document.querySelector('#ibBody .tg-h .tg-n').textContent)));
331
330
  await p.click('#ibBody .tg-n[data-key="board:partner-rate-limits"]');
332
331
  /* re-pointed (the one view, item 3): the timeline opens the same initiative in the Viewer as every other view. The stage card names the step
333
332
  * over the eight; the old Plan card is the dates line (start, plan end, days left; no Jira date without a Jira forecast); the progress says
@@ -344,15 +343,14 @@ const IVREAD = () => {
344
343
  ok('B6 Escape closes the menu first and leaves the Viewer open', await p.evaluate(() => document.querySelector('#bdPop').hidden) && await vwOn(p, 'Initiative'));
345
344
  await p.keyboard.press('Escape'); await vwShut(p);
346
345
  await spanTo(p, 'year');
347
- const yr = await p.evaluate(() => ({ th: document.querySelectorAll('#ibBody .tg-th').length, lines: document.querySelectorAll('#ibBody .tg-th .tg-line').length, cell: document.querySelector('#ibBody .tg-th .tg-tn').textContent.replace(/\s+/g, ' ').trim(), today: (document.querySelector('#ibBody .tg-today') || {}).textContent, group: (document.querySelector('#chGroup') || {}).textContent, jira: !!document.querySelector('#chJira') }));
348
- ok('B6 Year groups by theme, with the initiatives as bars inside; with no trail the theme falls back to its anchor\'s objective', yr.th === 1 && yr.lines === 3 && /^Objective 1Q3 2026 objective7 initiatives · KR 1\.1 · 1 late · 2 at risk$/.test(yr.cell) && /^Today · /.test(yr.today || '') && /Group: ?Theme/.test(yr.group || '') && !yr.jira, JSON.stringify(yr));
349
- await p.click('#ibBody [data-span-go="quarter"]');
350
- ok('B6 "Switch to Quarter" goes back to one row per initiative', await p.evaluate(() => document.querySelector('#bdSpans [aria-pressed="true"]').dataset.sp === 'quarter' && document.querySelectorAll('#ibBody .tg-n.ini2').length === 3));
346
+ const yr = await p.evaluate(() => ({ rows: [...document.querySelectorAll('#ibBody .tg-q[data-span="year"] .tg-n.ini2 b')].map((b) => b.textContent), bars: document.querySelectorAll('#ibBody .tg-bar').length, themes: document.querySelectorAll('#ibBody .tg-th, #ibBody .tg-tn, #ibBody .tg-phase').length, group: !!document.querySelector('#chGroup'), lgd: !!document.querySelector('#bdChipset .tg-lgd'), jira: !!document.querySelector('#chJira'), heads: [...document.querySelectorAll('#ibBody .tg-h .tg-p > span[data-y] b')].map((b) => b.textContent) }));
347
+ ok('B6 Year draws Quarter\'s rows (TsAllSpans): one row per initiative with its bar, months as columns; no themes, no Group chip; the chips and the legend stay', yr.rows.join() === tl.rows.join() && yr.bars === 3 && !yr.themes && !yr.group && yr.lgd && yr.jira && yr.heads.length >= 12 && yr.heads.every((h) => /^[A-Z][a-z]{2}$/.test(h)), JSON.stringify(yr));
351
348
  await spanTo(p, 'y5');
352
- ok('B6 5 yr shows themes only, as phases, with the directional part past 18 months', await p.evaluate(() => document.querySelectorAll('#ibBody .tg-phase').length === 1 && document.querySelectorAll('#ibBody .tg-line').length === 0 && /Beyond 18 months · directional/.test(document.querySelector('#ibBody').textContent)));
349
+ const y5 = await p.evaluate(() => ({ rows: document.querySelectorAll('#ibBody .tg-q[data-span="y5"] .tg-n.ini2').length, heads: [...document.querySelectorAll('#ibBody .tg-h .tg-p > span[data-y] b')].map((b) => b.textContent), dates: [...document.querySelectorAll('#ibBody .tg-endl, #ibBody .tg-lab')].map((e) => e.textContent) }));
350
+ ok('B6 5 yr draws the same rows with years as columns, and a date reads "Nov ’26"', y5.rows === 3 && y5.heads.length >= 5 && y5.heads.every((h) => /^\d{4}$/.test(h)) && y5.dates.some((d) => /^[A-Z][a-z]{2} ’\d\d$/.test(d)) && !y5.dates.some((d) => /\b[A-Z][a-z]{2} \d{1,2}\b/.test(d)), JSON.stringify(y5));
353
351
  const sp = [];
354
- for (const [k, sel, re] of [['sprint', '.sp[data-span="sprint"]', /Initiative and ticket.*Backlog · \d+ not in/], ['half', '.tg-y[data-span="half"]', /Theme/], ['y2', '.tg-5y[data-span="y2"]', /Only themes and their phases/]]) { await spanTo(p, k); sp.push(await p.evaluate(([q2, r]) => { const e = document.querySelector('#ibBody ' + q2); return !!e && !document.querySelector('#ibBody .bd-wtag') && new RegExp(r).test(e.textContent); }, [sel, re.source])); }
355
- ok('B6 Sprint (BdSpans: tickets and the backlog row), Half (the Year view) and 2 yr (themes as phases) are drawn, with no "Waiting for design" tag', sp.every(Boolean), JSON.stringify(sp));
352
+ for (const [k, sel, re] of [['sprint', '.sp[data-span="sprint"]', /Initiative and ticket.*Backlog · \d+ not in/], ['half', '.tg-q[data-span="half"]', /Self-serve onboarding v2/], ['y2', '.tg-q[data-span="y2"]', /Self-serve onboarding v2/]]) { await spanTo(p, k); sp.push(await p.evaluate(([q2, r]) => { const e = document.querySelector('#ibBody ' + q2); return !!e && !document.querySelector('#ibBody .bd-wtag') && new RegExp(r).test(e.textContent); }, [sel, re.source])); }
353
+ ok('B6 Sprint (BdSpans: tickets and the backlog row), Half and 2 yr (Quarter\'s rows) are drawn, with no "Waiting for design" tag', sp.every(Boolean), JSON.stringify(sp));
356
354
  await spanTo(p, 'quarter');
357
355
  {
358
356
  const f = F.facts(); f.rows = f.rows.map((r) => ({ ...r, start: null, end: null }));
@@ -421,7 +419,7 @@ const IVREAD = () => {
421
419
  ok(`B13 at 390 px (${theme}) the page has no sideways scroll, the top bar is one line with "Board", the menu sits bottom right, and every control is 44 px`, !m.over && m.small.length === 0 && m.fabRight < 40 && m.top <= 56 && m.title !== 'none', JSON.stringify(m));
422
420
  ok(`B13 at 390 px (${theme}) the chips lead with This sprint, then the Jira read time and the new asks, and end with the documents`, m.chips[0] === 'Sprint 24 only' && /^Jira \d+ days$/.test(m.chips[1]) && m.chips[2] === '1 new ask' && m.chips[m.chips.length - 1] === 'Docs 6', JSON.stringify(m.chips));
423
421
  const pl = await q.evaluate(() => ({ groups: [...document.querySelectorAll('#ibBody .bd-ghd')].map((g) => g.textContent.replace(/\s+/g, ' ').trim()), seg: [...document.querySelectorAll('#ibBody [data-pv]')].map((b) => b.textContent + (b.getAttribute('aria-pressed') === 'true' ? '*' : '')).join(), note: /Timeline needs a wider screen/.test(document.querySelector('#ibBody').textContent), small: [...document.querySelectorAll('#ibBody [data-pv], #ibBody .bd-lrow')].filter((b) => b.getBoundingClientRect().height < 44).length }));
424
- ok(`B13 at 390 px (${theme}) the phone opens on the List, grouped your turn first, with List, By stage and Track and no timeline (BdPhone)`, pl.groups.join('|') === 'At risk or late4|On track3' && pl.seg === 'List*,By stage,Track' && pl.note && pl.small === 0, JSON.stringify(pl));
422
+ ok(`B13 at 390 px (${theme}) the phone opens on the List, grouped your turn first, with List, By stage, Track and Timeline (BdPhone, TsCPhone)`, pl.groups.join('|') === 'At risk or late4|On track3' && pl.seg === 'List*,By stage,Track,Timeline' && !pl.note && pl.small === 0, JSON.stringify(pl));
425
423
  await q.click('#bdView'); const s2 = await q.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1 && document.querySelectorAll('#ibBody .bd-scols.ph .bd-scol').length + (((document.querySelector('#ibBody .bd-sempty') || {}).textContent || '').replace(/^Nothing on screen in /, '').match(/[A-Z][a-z]+/g) || []).length === 8);
426
424
  ok(`B13 at 390 px (${theme}) the one view button switches to By stage, every step a column down the page (the empty steps named on one line), with no sideways scroll`, s2);
427
425
  await q.click('#bdView'); await q.locator('#ibBody .bt-l[data-row="board:sso-partners"] .bt-nm').click();
@@ -463,13 +461,17 @@ const IVREAD = () => {
463
461
  await q.click('.bt-l[data-row="board:sso-partners"] .bt-nm'); await until(() => vwOn(q, 'Initiative')); await q.click('#czViewer [data-iv-ticket="SSO-12"]');
464
462
  ok('T the ticket counts its subtasks from the Jira reading (the Subtasks fold: "1 of 3 done")', await until(() => q.evaluate(() => { const x = document.querySelector('#czViewer [data-czs-id="sub"]'); if (!x) return false; const t = x.textContent.replace(/\s+/g, ' '); return (x.querySelector('.czs-n') || {}).textContent === '1 of 3 done' && (x.querySelector('.czs-body') ? /1 done, 2 open/.test(t) : true) && !document.querySelector('#czViewer .seg5'); })));
465
463
  await q.keyboard.press('Escape'); await vwShut(q);
466
- /* the long spans: themes from the trail, the Group control, milestones */
464
+ /* the long spans draw Quarter's rows (timeline spans C): the trail's themes group nothing there any more, and there is no Group control */
467
465
  await view(q, 'time'); await spanTo(q, 'year');
468
- const y1 = await q.evaluate(() => ({ cells: [...document.querySelectorAll('#ibBody .tg-tn')].map((c) => c.textContent.replace(/\s+/g, ' ').trim()), sw: getComputedStyle(document.querySelector('#ibBody .tg-sw')).backgroundColor, rel: [...document.querySelectorAll('#ibBody .tg-axl.rl')].map((e) => e.textContent).join() }));
469
- ok('T Year groups by the trail\'s themes: the PRD\'s theme: name and theme_note:, and its colour', /^FoundationMake PMOS reliable to run6 initiatives/.test(y1.cells[0] || '') && /^Health budgetsUpkeep anchored to a health budget1 initiative/.test(y1.cells[1] || '') && y1.rel === '', JSON.stringify(y1)); // re-pointed: AgBoardTlYear draws no release flag
470
- await q.click('#chGroup'); await q.click('#grpMenu [data-grp="lane"]');
471
- ok('T the Group control groups the long spans by lane (and keeps the choice)', await until(() => q.evaluate(() => [...document.querySelectorAll('#ibBody .tg-tn b')].map((b) => b.textContent).join() === 'Feature,Chore' && /Group: ?Lane/.test(document.querySelector('#chGroup').textContent) && localStorage.getItem('pmos.board.group') === 'lane')));
472
- await q.click('#chGroup'); await q.click('#grpMenu [data-grp="theme"]');
466
+ const y1 = await q.evaluate(() => ({ rows: document.querySelectorAll('#ibBody .tg-q[data-span="year"] .tg-n.ini2').length, themes: document.querySelectorAll('#ibBody .tg-tn, #ibBody .tg-sw').length, group: !!document.querySelector('#chGroup') }));
467
+ ok('T with the trail read, Year still draws one row per initiative: no theme groups and no Group control', y1.rows > 0 && !y1.themes && !y1.group, JSON.stringify(y1));
468
+ // TsSprintFilter: the sprint filter (the "Sprint N only" chip and Filter's Sprint group) shows on the Sprint span only; the stage track keeps its chip
469
+ const sfY = await q.evaluate(() => !document.querySelector('#bdChipset [data-f="sprint"]'));
470
+ await q.click('#bdFilter'); const fgY = await q.evaluate(() => [...document.querySelectorAll('#bdPop .bd-mlbl')].map((e) => e.textContent)); await q.keyboard.press('Escape');
471
+ await spanTo(q, 'sprint');
472
+ const sfS = await q.evaluate(() => !!document.querySelector('#bdChipset [data-f="sprint"]'));
473
+ await q.click('#bdFilter'); const fgS = await q.evaluate(() => [...document.querySelectorAll('#bdPop .bd-mlbl')].map((e) => e.textContent)); await q.keyboard.press('Escape');
474
+ ok('T the sprint filter shows on the Sprint span only: no chip and no Sprint group in Filter on Year, both on Sprint', sfY && !fgY.includes('Sprint') && sfS && fgS.includes('Sprint'), JSON.stringify({ sfY, fgY, sfS, fgS }));
473
475
  await spanTo(q, 'quarter');
474
476
  ok('T the Quarter marks a release sign-off and a dependency on the bars', await q.evaluate(() => /v2\.4 sign-off/.test(document.querySelector('#ibBody').textContent) && /after SSO for partners/.test(document.querySelector('#ibBody').textContent)));
475
477
  await view(q, 'track');
@@ -1,4 +1,16 @@
1
1
  [
2
+ {
3
+ "v": "0.418.0",
4
+ "at": "2026-10-26T01:29:44.041Z",
5
+ "f": 2,
6
+ "prs": [
7
+ {
8
+ "n": 1051,
9
+ "t": "Seventh testing feedback batch (items 1–7)",
10
+ "s": "Chats PMOS ended stay on Home, the timeline's longer spans scroll like Quarter, tasks can be deleted with Undo, task rows show start and end dates, and a press on any task in the initiative page opens that task."
11
+ }
12
+ ]
13
+ },
2
14
  {
3
15
  "v": "0.417.0",
4
16
  "at": "2026-10-26T01:02:52.959Z",
@@ -72,5 +72,6 @@ An agent adds and closes tasks when you ask, so you do not have to find the task
72
72
  - `pmos task list <initiative>` lists the initiative's open tasks (To do and In progress) with their ids. `--all` adds the Done, Won't do and Archived tasks.
73
73
  - `pmos task state <task> [<task> …] --to <state>` sets the state of one or more tasks: To do, In progress, Done, Won't do or Archived. `--why` adds the reason, and for Done it is the evidence you read. Each change writes the same line as the page's press, under the agent's name. Won't do on a breakdown item withdraws it, and it cannot come back.
74
74
  - `pmos task set <task> [<task> …] --stage <stage>` puts one or more tasks under a stage of the initiative's workflow, by the stage's key or name. `--stage none` takes them out of every stage. The Tasks section groups the tasks by these stages. A task's stage is its place in the plan: it does not change the task's state, and it does not move the initiative. `set` also takes `--due`, `--start`, `--owner` and `--notes`; `--due none` and `--start none` clear a day.
75
+ - `pmos task remove <task> [<task> …]` deletes a task that was added by mistake, such as a placeholder or a duplicate. The task goes from every list, and the Undo on the page brings it back. For work that stopped, use Archived or Won't do instead. A breakdown item cannot be deleted: set it to Won't do.
75
76
 
76
77
  When an initiative reaches a stage, each entry of that stage's To finish list becomes one task, once. Closing that task, on the stage card, in the Tasks section or with `pmos task state`, marks the entry done on the stage card.
@@ -161,7 +161,7 @@ function foundOf(f) {
161
161
  const sources = Array.isArray(f.sources) ? f.sources.filter((x) => x && typeof x.ref === 'string').slice(0, 8).map((x) => ({ label: String(x.label || ''), ref: x.ref })) : [];
162
162
  return { why: typeof f.why === 'string' ? f.why : '', sources, match: typeof f.match === 'string' && f.match ? f.match : null, scan: typeof f.scan === 'string' ? f.scan : null, run: typeof f.run === 'string' ? f.run : null };
163
163
  }
164
- const KINDS = new Set(['board', 'workflow', 'move', 'assign', 'ask', 'ask-accept', 'ask-decline', 'ask-more', 'ini-workflow', 'task', 'task-update', 'task-remove', 'ticket-note', 'ini-epics', 'ini-archive', 'ini-notdup', 'ini-wf', 'ini-end', 'stage-judge', 'ini-auto', 'task-section']);
164
+ const KINDS = new Set(['board', 'workflow', 'move', 'assign', 'ask', 'ask-accept', 'ask-decline', 'ask-more', 'ini-workflow', 'task', 'task-update', 'task-remove', 'task-restore', 'ticket-note', 'ini-epics', 'ini-archive', 'ini-notdup', 'ini-wf', 'ini-end', 'stage-judge', 'ini-auto', 'task-section']);
165
165
  // A task's state is its only stage (Wawan, 2026-10-25): the same five every workflow ends in. An old 'In review' reads as In progress (taskState).
166
166
  const TASK_STATES = Object.freeze(['To do', 'In progress', 'Done', "Won't do", 'Archived']);
167
167
  const taskState = (s) => (s === 'In review' ? 'In progress' : TASK_STATES.includes(s) ? s : null);
@@ -191,6 +191,7 @@ function fold(events) {
191
191
  const iniWorkflows = new Map(); // key(board, id) → { template, stages } (the initiative's own workflow)
192
192
  const tasks = new Map(); // task id → { id, board, initiative, title, epic, owner, state, start, due, at, by, history }
193
193
  const sections = new Map(); // task id → the stage key its breakdown section is ('' = Not in a stage); the last task-section line wins
194
+ const removed = new Map(); // task id → the task a task-remove took out, so a task-restore (Delete's Undo) puts it back
194
195
  const ticketNotes = new Map(); // key(board, Jira key) → the PM's notes on that ticket (the last ticket-note line wins)
195
196
  const epics = new Map(); // initiative id → the Jira epic keys the PM linked to it (the last ini-epics line wins)
196
197
  const archives = new Map(); // initiative id → { at, by, reason, into, moved } while archived (an `archived: false` line restores it)
@@ -277,7 +278,11 @@ function fold(events) {
277
278
  } else if (e.kind === 'ticket-note' && b && typeof e.ref === 'string' && typeof e.notes === 'string') {
278
279
  if (e.notes) ticketNotes.set(key(b, e.ref), e.notes); else ticketNotes.delete(key(b, e.ref));
279
280
  } else if (e.kind === 'task-remove' && typeof e.task === 'string' && tasks.has(e.task)) {
280
- tasks.delete(e.task); // the Undo of a task just added (routes-boards.js tasks/undo-add)
281
+ removed.set(e.task, tasks.get(e.task));
282
+ tasks.delete(e.task); // the Undo of a task just added (routes-boards.js tasks/undo-add), or the PM's Delete (tasks/delete, pmos task remove)
283
+ } else if (e.kind === 'task-restore' && typeof e.task === 'string' && removed.has(e.task) && !tasks.has(e.task)) {
284
+ tasks.set(e.task, removed.get(e.task)); // Delete's Undo (batch 7 item 5)
285
+ removed.delete(e.task);
281
286
  } else if (e.kind === 'ini-epics' && typeof e.id === 'string' && Array.isArray(e.epics)) {
282
287
  epics.set(e.id, e.epics.filter((k) => typeof k === 'string' && JIRA_KEY_RE.test(k)).map((k) => k.toUpperCase()));
283
288
  } else if (e.kind === 'ini-archive' && typeof e.id === 'string') {
@@ -41,7 +41,7 @@ function rule(info, id) {
41
41
  `The workflow stage is on the initiative: the stage card and the Board show it. \`pmos workflow of ${ini}\` reads it. When the PM asks to move the initiative, run \`pmos workflow move ${ini} --stage <key> --why "<reason>"\`. When the PM asks to change its workflow, run \`pmos workflow switch ${ini} --to <workflow id>\`. Both write what the page's press writes, under your name.`,
42
42
  'There is one kind of task: the ones the PM sees in the initiative\'s Tasks section. The stage card\'s To finish entries and the older breakdown items are tasks too. '
43
43
  + 'A task\'s state is To do, In progress, Done, Won\'t do or Archived. The Tasks section groups the tasks under the stages of this initiative\'s workflow: a task\'s group is its place in the breakdown, never its state. When the PM asks to add, close, group or change a task, '
44
- + `do it yourself, never send the PM to the Board: \`pmos task add ${ini} "<title>" [--stage <stage>] [--due YYYY-MM-DD]\` adds one, \`pmos task list ${ini}\` names them all, \`pmos task state <task> [<task> …] --to "<state>" --why "<what shows it>"\` sets their state and \`pmos task set <task> [<task> …] --stage <stage>|none\` groups them (it also takes --due, --start, --owner, --notes; none clears a date). Never use \`pmos item add\` for new work, and never change tasks to move the initiative.`,
44
+ + `do it yourself, never send the PM to the Board: \`pmos task add ${ini} "<title>" [--stage <stage>] [--due YYYY-MM-DD]\` adds one, \`pmos task list ${ini}\` names them all, \`pmos task state <task> [<task> …] --to "<state>" --why "<what shows it>"\` sets their state and \`pmos task set <task> [<task> …] --stage <stage>|none\` groups them (it also takes --due, --start, --owner, --notes; none clears a date). \`pmos task remove <task> [<task> …]\` deletes a task added by mistake when the PM asks; work that stopped is Archived instead. Never use \`pmos item add\` for new work, and never change tasks to move the initiative.`,
45
45
  );
46
46
  return out;
47
47
  }
@@ -93,7 +93,8 @@ function build(f) {
93
93
 
94
94
  // ── tasks: PRD requirements (no result per requirement) and the board's items: its Board tasks, the initiative's breakdown items and its
95
95
  // stage's To finish tasks are one kind of task (feedback batch 5, lib/task-items.js), Jira rows are read-only ──
96
- const items = (f.items || []).filter((t) => t && t.ini === id).slice(0, MAX_TASKS);
96
+ // every task the page draws (batch 7 item 7): a cap here left the 61st and later tasks with no editor, so a press fell back to the old list
97
+ const items = (f.items || []).filter((t) => t && t.ini === id);
97
98
  const tracker = items.map((t, n) => ({ key: 'task:' + (t.uid || t.key || n), uid: t.uid || '', pmos: t.src === 'pmos', ref: t.key || t.ref || '', title: clip(t.title, 160), state: t.status || 'To do', src: t.src === 'jira' ? 'Jira (read-only)' : 'PMOS task', owner: t.owner || '', start: t.start || '', end: t.end || '', blocked: !!t.blocked, kind: t.kind || 'Task', notes: t.notes || '', readAt: t.readAt || '',
98
99
  ...(t.from ? { from: { stage: t.from.stage, finish: t.from.finish } } : {}), ...(t.store === 'item' ? { store: 'item' } : {}) }));
99
100
  const dv = sheet && sheet.derived;
@@ -310,8 +310,8 @@ function workflowRowOf(board, base, folded, lib, legacyStage) {
310
310
  } else {
311
311
  const byName = WF.stageByRef(wf, legacyStage);
312
312
  const read = WF.stageByRef(wf, base.reading);
313
- // an older board's merged column ("Build & Deliver") names two stages: the reading when it is one of them, else the first (it fell
314
- // back to the reading, so a move to Build & Deliver showed Triage)
313
+ // an older board's merged column ("Build & Deliver") names two stages: the reading when it is one of them, else the first (batch 7 item 2;
314
+ // it fell back to the reading, so a move to Build & Deliver showed Triage)
315
315
  cur = (byName || mergedStage(wf, legacyStage, read) || read || wf.stages[0]).key;
316
316
  }
317
317
  const judged = (folded && folded.judged && folded.judged.get(k)) || {};
@@ -467,6 +467,7 @@ function itemsOf(w, fr, board, rows) {
467
467
  const ids = new Set(rows.map((x) => x.id));
468
468
  const out = [];
469
469
  const jiraKeys = new Set();
470
+ let planOf = null;
470
471
  if (board.build) {
471
472
  for (const row of rows) {
472
473
  let d = null;
@@ -484,8 +485,10 @@ function itemsOf(w, fr, board, rows) {
484
485
  for (const t of d.tickets || []) {
485
486
  if (!t.jira || jiraKeys.has(t.jira)) continue;
486
487
  const rd = reading(t.jira);
488
+ // the breakdown item the ticket was drafted from keeps the plan's days: the row shows them (batch 7 item 6; it showed none). Jira owns the assignee
489
+ const it = (planOf || (planOf = TI.itemsById(w.root)))[t.id] || null;
487
490
  out.push({ uid: t.jira, key: t.jira, kind: ['Story', 'Task', 'Bug'].includes(t.type) ? t.type : 'Task', src: 'jira', title: (rd && rd.summary) || t.summary || t.jira,
488
- status: B.itemStatus(rd && rd.status, rd && rd.category), blocked: !!(rd && rd.flagged), owner: null, ini: row.id, epic: epicKey, start: null, end: null, ref: null, board: board.id, readAt: (snap && snap.fetchedAt) || null });
491
+ status: B.itemStatus(rd && rd.status, rd && rd.category), blocked: !!(rd && rd.flagged), owner: null, ini: row.id, epic: epicKey, start: (it && it.start) || null, end: (it && it.due) || null, ref: null, board: board.id, readAt: (snap && snap.fetchedAt) || null });
489
492
  jiraKeys.add(t.jira);
490
493
  }
491
494
  }
@@ -847,8 +850,8 @@ const WRITES = {
847
850
  const own = typeof body.id === 'string' && p.fr.folded.iniWf ? p.fr.folded.iniWf.get(B.key(p.board.id, body.id)) : null;
848
851
  if (own) return moveOnWorkflow(ctx, res, body, g, p, own);
849
852
  const wfOwn = typeof body.id === 'string' ? B.workflowOf(p.board, body.id, p.fr.folded) : p.board.workflow;
850
- // an initiative on Product feature shows its eight stages, but an older board's columns merge them ("Build & Deliver"). A Product
851
- // feature stage that is not a column pins the initiative to Product feature at that stage, so it lands where it was sent.
853
+ // batch 7 item 2: an initiative on Product feature shows its eight stages, but an older board's columns merge them ("Build & Deliver").
854
+ // A Product feature stage that is not a column pins the initiative to Product feature at that stage, so it lands where it was sent.
852
855
  const pf = typeof body.to === 'string' && !wfOwn.some((s) => s.name === body.to) ? WF.stageByRef(WF.PRODUCT_FEATURE, body.to) : null;
853
856
  if (pf) return moveToProductStage(ctx, res, body, g, p, pf);
854
857
  if (typeof body.to !== 'string' || !wfOwn.some((s) => s.name === body.to)) {
@@ -1112,6 +1115,30 @@ const WRITES = {
1112
1115
  append(p.file, g.actor, { kind: 'task-remove', board: p.board.id, task: t.id, why: 'undo of add' });
1113
1116
  ctx.json(res, { ok: true });
1114
1117
  },
1118
+ '/api/boards/tasks/delete': (ctx, res, body, g) => {
1119
+ // a task added by mistake (batch 7 item 5): the task-remove line takes it out everywhere; tasks/restore is its Undo. Archived stays for
1120
+ // work that stopped. A breakdown item is withdrawn (Won't do), never deleted.
1121
+ const p = postFrame(ctx, res, body);
1122
+ if (!p) return;
1123
+ if (TI.isItemId(body.task)) return fail(ctx, res, 409, `${body.task} is a breakdown item: set it to Won't do instead`);
1124
+ const t = B.taskOf(p.fr.folded, body.task);
1125
+ if (!t || t.board !== p.board.id) return fail(ctx, res, 404, `no PMOS task ${body.task} on this board`);
1126
+ if (body.why != null && (typeof body.why !== 'string' || body.why.length > 500)) return fail(ctx, res, 400, 'why is text of at most 500 characters');
1127
+ if (!p.file) return fail(ctx, res, 409, NO_STATE);
1128
+ append(p.file, g.actor, { kind: 'task-remove', board: p.board.id, task: t.id, why: body.why ? String(body.why).trim() : 'deleted' });
1129
+ ctx.json(res, { ok: true, task: t.id, title: t.title });
1130
+ },
1131
+ '/api/boards/tasks/restore': (ctx, res, body, g) => {
1132
+ const p = postFrame(ctx, res, body);
1133
+ if (!p) return;
1134
+ if (typeof body.task !== 'string' || !body.task) return fail(ctx, res, 400, 'task is required');
1135
+ if (B.taskOf(p.fr.folded, body.task)) return fail(ctx, res, 409, `${body.task} is not deleted`);
1136
+ const ev = [...p.fr.folded.events].reverse().find((e) => e.kind === 'task-remove' && e.task === body.task);
1137
+ if (!ev || ev.board !== p.board.id) return fail(ctx, res, 404, `no deleted task ${body.task} on this board`);
1138
+ if (!p.file) return fail(ctx, res, 409, NO_STATE);
1139
+ append(p.file, g.actor, { kind: 'task-restore', board: p.board.id, task: body.task });
1140
+ ctx.json(res, { ok: true, task: body.task });
1141
+ },
1115
1142
  '/api/boards/tasks/rename': (ctx, res, body, g) => {
1116
1143
  // tap the title to rename it (canvas RnATask): only the title changes; Undo is the same press with the old name
1117
1144
  const p = postFrame(ctx, res, body);
@@ -1352,6 +1379,9 @@ function taskState(ctx, body, g) { return writeAs(ctx, '/api/boards/tasks/state'
1352
1379
  function taskAdd(ctx, body, g) { return writeAs(ctx, '/api/boards/tasks/add', body, g); }
1353
1380
  /** A task's edit, by the same function as the Viewer's (POST /api/boards/tasks/edit; `pmos task set`). body: { ws, board, task, section?, start?, due?, owner?, notes? }. */
1354
1381
  function taskEdit(ctx, body, g) { return writeAs(ctx, '/api/boards/tasks/edit', body, g); }
1382
+ /** Delete a task added by mistake, and its Undo (POST /api/boards/tasks/delete|restore; `pmos task remove`; batch 7 item 5). */
1383
+ function taskDelete(ctx, body, g) { return writeAs(ctx, '/api/boards/tasks/delete', body, g); }
1384
+ function taskRestore(ctx, body, g) { return writeAs(ctx, '/api/boards/tasks/restore', body, g); }
1355
1385
 
1356
1386
  /** The workflow one initiative runs and where it stands in it, as the Board's row has it (boardRow: wf, wfStage, wfStages, ended), with the
1357
1387
  * board it is on. For `pmos workflow of|move|switch` and the initiative chat's opening (bug 2026-10-25: an agent that could not see the
@@ -1439,4 +1469,4 @@ function meetingBoards(ctx) {
1439
1469
  return { list, detail };
1440
1470
  }
1441
1471
 
1442
- module.exports = { prefixes: ['/api/boards'], handle, move, switchWorkflow, taskState, taskAdd, taskEdit, initiativeWorkflow, seedInitiative, stageTasks, itemsOf, boardIndex, appendScanAsk, scanDeclineSignal, createAndPlace, ledgerFile, append, frameFor, boardIdOf, meetingBoards, boardsOf, baseRows, boardRow, workflowRowOf, foldOf, portfolio, SELF_REFUSAL, NO_STATE };
1472
+ module.exports = { prefixes: ['/api/boards'], handle, move, switchWorkflow, taskState, taskAdd, taskEdit, taskDelete, taskRestore, initiativeWorkflow, seedInitiative, stageTasks, itemsOf, boardIndex, appendScanAsk, scanDeclineSignal, createAndPlace, ledgerFile, append, frameFor, boardIdOf, meetingBoards, boardsOf, baseRows, boardRow, workflowRowOf, foldOf, portfolio, SELF_REFUSAL, NO_STATE };
@@ -27,14 +27,17 @@ const B = require(repoScript('boards.js'));
27
27
  const TI = require('./task-items.js');
28
28
  const rowsLib = require('./initiative-rows.js');
29
29
 
30
- const COMMANDS = { task: ['add', 'list', 'state', 'set'] };
30
+ const COMMANDS = { task: ['add', 'list', 'state', 'set', 'remove'] };
31
31
  const USAGE = [
32
- 'usage: pmos task add|list|state|set — an initiative\'s tasks, the ones the PM sees in its Tasks section',
32
+ 'usage: pmos task add|list|state|set|remove — an initiative\'s tasks, the ones the PM sees in its Tasks section',
33
33
  ' pmos task add <initiative> "<title>" [--stage <stage>] [--due YYYY-MM-DD] [--start YYYY-MM-DD] [--owner <who>] [--notes <text>]',
34
34
  ' Add a task. Every new task goes here; pmos item add is the older breakdown record.',
35
35
  ' pmos task set <task> [<task> …] [--stage <stage>|none] [--due YYYY-MM-DD|none] [--start YYYY-MM-DD|none] [--owner <who>] [--notes <text>]',
36
36
  ' Group tasks under a stage of the initiative\'s workflow (key or name; none takes it out), or change dates, owner or notes.',
37
37
  ' pmos task list <initiative> [--all] its open tasks; --all adds Done, Won\'t do and Archived',
38
+ ' pmos task remove <task> [<task> …] [--why <text>]',
39
+ ' Delete a task added by mistake (a placeholder, a duplicate) when the PM asks. It goes from every list; the page\'s Undo brings',
40
+ ' it back. Work that stopped is Archived or Won\'t do instead. A breakdown item is not deleted: set it to Won\'t do.',
38
41
  ' pmos task state <task> [<task> …] --to <state> [--why <text>]',
39
42
  ' Set each task\'s state when the PM asks: To do, In progress, Done, Won\'t do or Archived. The page shows it at once.',
40
43
  ' Give --why with Done: it is the evidence the PM reads.',
@@ -45,7 +48,7 @@ const USAGE = [
45
48
  ];
46
49
  const BOOL = new Set(['json', 'help', 'all']);
47
50
  const VALUE = new Set(['to', 'why', 'root', 'due', 'start', 'owner', 'notes', 'stage']);
48
- const ONLY = { add: ['due', 'start', 'owner', 'notes', 'stage'], list: ['all'], state: ['to', 'why'], set: ['due', 'start', 'owner', 'notes', 'stage'] };
51
+ const ONLY = { add: ['due', 'start', 'owner', 'notes', 'stage'], list: ['all'], state: ['to', 'why'], remove: ['why'], set: ['due', 'start', 'owner', 'notes', 'stage'] };
49
52
  const OPEN = new Set(['To do', 'In progress']);
50
53
  /** The PM's words for a state: any case, with or without the apostrophe or the space. */
51
54
  function stateOf(s) {
@@ -206,6 +209,27 @@ async function run(argv, { say = (s) => console.log(s), cwd = process.cwd(), isT
206
209
  return refused.length ? 1 : 0;
207
210
  }
208
211
 
212
+ if (verb === 'remove') {
213
+ // batch 7 item 5: a task added by mistake goes from every list (POST /api/boards/tasks/delete, the page's ⋯ Delete)
214
+ if (!pos.length) { say('usage: pmos task remove <task> [<task> …] [--why <text>]'); return 2; }
215
+ const folded = boards.foldOf(ctx, w);
216
+ const done = [], refused = [];
217
+ for (const id of pos) {
218
+ const t = findTask(folded, id);
219
+ if (!t) { refused.push({ task: id, error: `no task ${id}; pmos task list <initiative> --all names them` }); continue; }
220
+ const r = boards.taskDelete(ctx, { ws: w.id, board: t.board, task: id, ...(flags.why ? { why: flags.why } : {}) }, g);
221
+ if (!r.body || r.body.ok !== true) refused.push({ task: id, error: (r.body && r.body.error) || 'the write was refused' });
222
+ else done.push({ task: id, title: t.title });
223
+ }
224
+ if (json) say(JSON.stringify({ ok: !refused.length, done, refused }));
225
+ else {
226
+ for (const d of done) say(`✓ ${d.task} deleted: ${d.title}`);
227
+ for (const x of refused) say(`✗ ${x.task}: ${x.error}`);
228
+ if (done.length) say(' It is gone from the page. Nothing was sent.');
229
+ }
230
+ return refused.length ? 1 : 0;
231
+ }
232
+
209
233
  // state
210
234
  if (!pos.length || !flags.to) { say('usage: pmos task state <task> [<task> …] --to <state> [--why <text>]'); return 2; }
211
235
  const to = stateOf(flags.to);
@@ -37,6 +37,10 @@ function ownerOf(text) {
37
37
  return 'person:' + t.slice(0, 60);
38
38
  }
39
39
 
40
+ /** Every breakdown item by id, read once (a Jira ticket drafted from an item takes its plan dates: batch 7 item 6). */
41
+ function itemsById(root) {
42
+ try { return planItems.readFold(root).items || {}; } catch { return {}; }
43
+ }
40
44
  function itemOf(root, id) {
41
45
  try { return planItems.readFold(root).items[id] || null; } catch { return null; }
42
46
  }
@@ -85,4 +89,4 @@ function write(root, events, actor, cli) {
85
89
  return planItems.appendFromUi(root, events, { actor: actor && actor.by ? { by: actor.by, via: 'ui' } : undefined });
86
90
  }
87
91
 
88
- module.exports = { STATE_OF, isItemId, ownerName, ownerOf, itemOf, rowsOf, stateEvents, editEvents, write };
92
+ module.exports = { STATE_OF, isItemId, ownerName, ownerOf, itemOf, itemsById, rowsOf, stateEvents, editEvents, write };
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.417.0",
3
+ "version": "0.418.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pmos-workspace",
9
- "version": "0.417.0",
9
+ "version": "0.418.0",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@xterm/addon-fit": "^0.11.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.417.0",
3
+ "version": "0.418.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",
@@ -185,7 +185,8 @@ function openFind(from) {
185
185
  function pickFind() {
186
186
  const b = $$('#bdQr .bd-mi')[findAt]; if (b) b.click();
187
187
  }
188
- /** The Filter's groups: owner, workflow and category (WfAElse: Kind became Workflow), sprint (from the Jira reading, and the backlog).
188
+ /** The Filter's groups: owner, workflow and category (WfAElse: Kind became Workflow), sprint (from the Jira reading, and the backlog; on the
189
+ * timeline only on the Sprint span, TsSprintFilter).
189
190
  * The workflow is one choice, the same one the chip row picks (pm/bd-wf.js); it shows only with more than one workflow on the board. */
190
191
  function filterHtml() {
191
192
  const rows = M().initiatives.list.rows, F = A.F;
@@ -200,7 +201,7 @@ function filterHtml() {
200
201
  return grp + `<p class="bd-mlbl">Owner</p><div class="bd-fg">${owners.map((o) => chip('owners', o, (o === 'No owner' ? '' : V.avatar(o, 'xs')) + esc(o))).join('')}</div>`
201
202
  + (W.list.length > 1 ? `<p class="bd-mlbl">Workflow</p><div class="bd-fg" role="radiogroup" aria-label="Workflow">${W.list.map((w) => { const on = WF.narrowed(W.list) && W.cur.id === w.id; return `<button type="button" class="bd-chip${on ? ' on' : ''}" role="radio" aria-checked="${on}" data-fwf="${esc(w.id)}">${WF.wfIcon(w, 16)}${esc(w.name)}</button>`; }).join('')}</div>` : '')
202
203
  + (cats.length ? `<p class="bd-mlbl">Category</p><div class="bd-fg">${cats.map((k) => chip('cats', k, esc(WF.catLabel(k)))).join('')}</div>` : '')
203
- + (sprints.length ? `<p class="bd-mlbl">Sprint</p><div class="bd-fg">${sprints.map((s) => chip('sprints', s.name, esc(s.name + (s.now ? ' · now' : '')))).join('')}${chip('sprints', 'Backlog')}</div>` : '')
204
+ + (sprints.length && (!A.sprintFilter || A.sprintFilter()) ? `<p class="bd-mlbl">Sprint</p><div class="bd-fg">${sprints.map((s) => chip('sprints', s.name, esc(s.name + (s.now ? ' · now' : '')))).join('')}${chip('sprints', 'Backlog')}</div>` : '')
204
205
  + `<div class="bd-arow bd-ffoot"><button type="button" class="bd-btn sm ghost" data-fclear>Clear</button><span class="bd-amut bd-push">Applies as you pick</span></div>`;
205
206
  }
206
207
  function openFilter(from) { Pop.open(filterHtml(), from, { label: 'Filter', width: 340, align: 'right', cls: 'bd-filter' }); }