create-pmos 0.419.0 → 0.420.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 (58) hide show
  1. package/package.json +13 -18
  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/scripts/lane-defs.js +14 -1
  6. package/payload/scripts/workflow-state.js +2 -2
  7. package/payload/state/discoveries.md +1 -1
  8. package/workspace/briefing-premium-board-test.js +9 -13
  9. package/workspace/changelog.json +12 -0
  10. package/workspace/fixtures/report-api/draft.json +2 -1
  11. package/workspace/guide/home.md +2 -0
  12. package/workspace/home-other-product-test.js +18 -0
  13. package/workspace/home-rows-test.js +14 -0
  14. package/workspace/lib/board-premium.js +13 -3
  15. package/workspace/lib/brief.js +5 -0
  16. package/workspace/lib/engine/lane-defs.js +14 -1
  17. package/workspace/lib/engine/workflow-state.js +2 -2
  18. package/workspace/lib/hold-spans.js +64 -0
  19. package/workspace/lib/mention-store.js +49 -13
  20. package/workspace/lib/plan-tree.js +1 -1
  21. package/workspace/lib/report-draft.js +6 -0
  22. package/workspace/lib/routes-boards.js +22 -6
  23. package/workspace/lib/source-reads.js +5 -0
  24. package/workspace/lib/vendor/scripts/lane-defs.js +14 -1
  25. package/workspace/lib/vendor/scripts/workflow-state.js +2 -2
  26. package/workspace/package-lock.json +2 -2
  27. package/workspace/package.json +1 -1
  28. package/workspace/public/pm/bd-acts.js +49 -1
  29. package/workspace/public/pm/bd-ini-panel.js +15 -8
  30. package/workspace/public/pm/bd-next.js +119 -0
  31. package/workspace/public/pm/bd-prog.js +1 -1
  32. package/workspace/public/pm/bd-span.js +117 -22
  33. package/workspace/public/pm/bd-views.js +7 -5
  34. package/workspace/public/pm/cozy-board.css +54 -9
  35. package/workspace/public/pm/cozy-today.css +9 -0
  36. package/workspace/public/pm/cozy-viewer.js +7 -3
  37. package/workspace/public/pm/cozy.css +10 -0
  38. package/workspace/public/pm/home-app.js +39 -13
  39. package/workspace/public/pm/home-ini.js +42 -11
  40. package/workspace/public/pm/home-list.js +22 -2
  41. package/workspace/public/pm/home-mentions.js +1 -1
  42. package/workspace/public/pm/home-today.js +13 -2
  43. package/workspace/public/pm/ini-tasks.js +363 -0
  44. package/workspace/public/pm/ini-view-model.js +19 -11
  45. package/workspace/public/pm/ini-view.css +160 -0
  46. package/workspace/public/pm/ini-view.js +39 -8
  47. package/workspace/public/pm/premium-board.js +54 -17
  48. package/workspace/public/pm/premium-vw-mtg.js +2 -0
  49. package/workspace/public/pm/task-card.js +6 -0
  50. package/workspace/skills/day-check.skill +2 -2
  51. package/workspace/skills/morning-brief.skill +1 -1
  52. package/workspace/skills/sources-read.skill +8 -4
  53. package/workspace/task-press-test.js +120 -0
  54. package/workspace/task-views-test.js +245 -0
  55. package/workspace/test-lists/task-press.json +6 -0
  56. package/workspace/test-lists/task-views.json +6 -0
  57. package/workspace/test-lists/timeline-holds.json +6 -0
  58. package/workspace/timeline-holds-test.js +191 -0
@@ -120,3 +120,163 @@ button.iv-tt:hover { text-decoration: underline; text-decoration-color: var(--cz
120
120
  .iv-chips { display: flex; flex-wrap: wrap; gap: 6px; }
121
121
  .iv-chip { display: inline-flex !important; align-items: center; height: 30px; padding: 0 10px !important; border-radius: 999px !important; border: 1px solid var(--cz-hair) !important; font-size: 12.5px; font-weight: 700; color: var(--cz-ink2); }
122
122
  button.iv-chip:hover { background: var(--cz-well) !important; }
123
+
124
+ /* Tasks in three views and the quick changes (batch 9 item 5b; canvas In development, row "Tasks views"): pm/ini-tasks.js */
125
+ .iv-sp { flex: 1; }
126
+ .iv-th .iv-sp ~ .iv-ib { margin-left: 0; }
127
+ .ivx-seg { display: inline-flex; padding: 2px; border-radius: 999px; background: var(--cz-well); gap: 2px; flex: none; }
128
+ .ivx-sb { width: 32px; height: 30px; border-radius: 999px !important; display: inline-flex !important; align-items: center; justify-content: center; color: var(--cz-ink3) !important; }
129
+ .ivx-sb:hover { color: var(--cz-ink) !important; }
130
+ .ivx-sb[aria-pressed="true"] { background: var(--cz-card) !important; color: var(--cz-ink) !important; box-shadow: 0 1px 3px rgba(42,46,53,.12); }
131
+ .ivx-pick { display: inline-flex !important; align-items: center; gap: 4px; height: 30px; padding: 0 8px 0 12px !important; border-radius: 999px !important; background: var(--cz-well) !important; font-size: 12.5px; font-weight: 700; color: var(--cz-ink2) !important; white-space: nowrap; max-width: 180px; overflow: hidden; text-overflow: ellipsis; flex: none; }
132
+ .ivx-pick.on { background: var(--cz-bluebg) !important; color: var(--cz-blueink) !important; }
133
+
134
+ /* the box: one press marks done; the caret (hover or focus; a long press on a phone) opens the status picker */
135
+ .iv-bxw { position: relative; display: inline-flex; flex: none; align-self: flex-start; }
136
+ .iv-cb.pr { border-color: var(--cz-blue) !important; background: linear-gradient(90deg, var(--cz-card) 50%, var(--cz-bluebg) 50%) !important; }
137
+ .iv-cb.wo { background: var(--cz-well) !important; position: relative; }
138
+ .iv-cb.wo::after { content: ""; position: absolute; left: 2px; right: 2px; top: 50%; height: 1.6px; margin-top: -.8px; background: var(--cz-ink3); transform: rotate(-45deg); }
139
+ .iv-car { position: absolute; left: 11px; top: 11px; width: 16px; height: 16px; border-radius: 50% !important; background: var(--cz-card) !important; color: var(--cz-ink2) !important; display: inline-flex !important; align-items: center; justify-content: center;
140
+ box-shadow: 0 0 0 1px var(--cz-hair), 0 2px 4px rgba(42,46,53,.12); opacity: 0; z-index: 1; }
141
+ .iv-tr:hover .iv-car, .ivt-r:hover .iv-car, .ivk-d:hover .iv-car, .iv-car:focus-visible, .iv-car[aria-expanded="true"], .iv-tr.ar .iv-car { opacity: 1; }
142
+ .iv-car[aria-expanded="true"] { background: var(--cz-bluebg) !important; color: var(--cz-blueink) !important; }
143
+ @media (pointer: coarse) { .iv-car { display: none !important; } }
144
+ .iv-tr.wo .iv-tt, .ivk-d.wo .iv-tt, .ivt-r.wo .iv-tt { text-decoration: line-through; text-decoration-color: var(--cz-ink3); }
145
+ .iv-tr.ar .iv-tt { color: var(--cz-ink3); font-weight: 600; }
146
+ .iv-rm { font-size: 12.5px; color: var(--cz-ink3); display: block; min-height: 22px; line-height: 22px; }
147
+ .iv-rm .iv-late { color: var(--cz-risk); font-weight: 700; }
148
+ .iv-rm .iv-sep { white-space: pre; }
149
+ /* the date: a press; the start and due picker opens under it. No dates: a calendar icon on hover */
150
+ .iv-dc { display: inline-flex !important; align-items: center; vertical-align: top; white-space: nowrap; gap: 4px; height: 22px; padding: 0 6px !important; margin: 0 -6px !important; border-radius: 999px !important; color: var(--cz-ink3) !important; font-weight: 600; }
151
+ .iv-dc:hover, .iv-dc[aria-expanded="true"] { background: var(--cz-bluebg) !important; color: var(--cz-blueink) !important; }
152
+ .iv-dc.w { color: var(--cz-risk) !important; font-weight: 700; }
153
+ .iv-dc.none { margin-left: 0 !important; opacity: 0; }
154
+ .iv-tr:hover .iv-dc.none, .iv-dc.none:focus-visible, .iv-dc.none[aria-expanded="true"] { opacity: 1; }
155
+ .iv-jm { width: 18px; height: 18px; flex: none; display: inline-flex; align-items: center; justify-content: center; color: var(--cz-blueink); margin-top: 1px; }
156
+ .iv-tk { container-type: inline-size; }
157
+
158
+ /* Timeline: the List's groups, bars by start → due, the Today line. The geometry is set at run time as --tl-x and --tl-w (ini-tasks.js place) */
159
+ .ivt [data-tlx] { left: var(--tl-x); }
160
+ .ivt [data-tlw] { width: var(--tl-w); }
161
+ .ivt-in[data-tlw] { width: calc(var(--nw) + var(--tl-w)); }
162
+ .ivt-grid i[data-tlx], .ivt-today[data-tlx] { left: calc(var(--nw) + var(--tl-x)); }
163
+ .ivt { border: 1px solid var(--cz-hair); border-radius: 18px; overflow: hidden; background: var(--cz-card); --nw: clamp(150px, 36cqw, 320px); }
164
+ .ivt-sc { overflow-x: auto; overflow-y: hidden; }
165
+ .ivt-in { position: relative; min-width: 100%; }
166
+ .ivt-r { display: flex; min-height: 44px; border-top: 1px solid var(--cz-hair); position: relative; }
167
+ .ivt-r.ax { border-top: 0; min-height: 30px; background: var(--cz-well); }
168
+ .ivt-r.ax .ivt-n { background: var(--cz-well); }
169
+ .ivt-r.ax .ivt-c span { position: absolute; top: 8px; font-size: 11.5px; font-weight: 700; color: var(--cz-ink3); white-space: nowrap; padding-left: 4px; }
170
+ .ivt-r.ax .ivt-c span.b { color: var(--cz-ink2); font-weight: 800; }
171
+ .ivt-n { position: sticky; left: 0; z-index: 3; width: var(--nw); flex: none; background: var(--cz-card); display: flex; align-items: center; gap: 10px; padding: 0 10px 0 14px; min-width: 0; }
172
+ .ivt-r.k .ivt-n { padding-left: 34px; }
173
+ .ivt-n .iv-tt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; font-size: 13px; }
174
+ .ivt-r.x .iv-tt { color: var(--cz-ink3); font-weight: 600; }
175
+ .ivt-n .iv-bxw { align-self: center; }
176
+ .ivt-n .iv-cb { margin-top: 0 !important; }
177
+ /* a group's name is never cut short: its cell grows over the group's own band */
178
+ .ivt-r.g .ivt-n { width: auto; min-width: var(--nw); max-width: 100%; padding-right: 14px; }
179
+ .ivt-r.g .ivt-c { position: absolute; left: var(--nw); right: 0; top: 0; bottom: 0; }
180
+ .ivt-gh { display: flex !important; align-items: center; gap: 10px; width: 100%; min-height: 48px; }
181
+ .ivt-gh b { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
182
+ .ivt-gh.mut b { color: var(--cz-ink3); font-weight: 700; }
183
+ .ivt-gh .n, .ivt-df .n { font-size: 12px; color: var(--cz-ink3); font-weight: 700; white-space: nowrap; }
184
+ .ivt-gh .n.w { color: var(--cz-risk); }
185
+ .ivt-df { display: flex !important; align-items: center; gap: 8px; width: 100%; min-height: 40px; font-size: 13px; font-weight: 700; color: var(--cz-ink2); }
186
+ .ivt-df .n { margin-left: auto; }
187
+ .ivt-r.g .ivt-c { background: color-mix(in srgb, var(--cz-well) 40%, var(--cz-card)); }
188
+ .ivt-c { position: relative; flex: 1; min-width: 0; }
189
+ .ivt-grid { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
190
+ .ivt-grid i { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--cz-hair); }
191
+ .ivt-band { position: absolute; top: 50%; height: 8px; margin-top: -4px; border-radius: 4px; background: color-mix(in srgb, var(--cz-blue) 16%, transparent); }
192
+ .ivt-b { position: absolute !important; top: 50%; height: 20px; margin-top: -10px !important; border-radius: 999px !important; background: var(--cz-well2) !important; display: flex !important; align-items: center; justify-content: flex-end; padding: 0 3px !important; z-index: 1; touch-action: pan-y; }
193
+ .ivt-b[data-ivt-drag] { cursor: grab; }
194
+ .ivt-b.drag { cursor: grabbing; box-shadow: 0 0 0 2px var(--cz-blue); z-index: 4; }
195
+ .ivt-b.pr, .ivt-d.pr { background: color-mix(in srgb, var(--cz-blue) 30%, var(--cz-card)) !important; }
196
+ .ivt-b.lt { background: color-mix(in srgb, var(--cz-risk) 30%, var(--cz-card)) !important; }
197
+ .ivt-b.dn { background: color-mix(in srgb, var(--cz-ink3) 22%, var(--cz-card)) !important; }
198
+ .ivt-gp { position: absolute; top: 3px; bottom: 3px; width: 6px; border-radius: 3px; background: var(--cz-card); box-shadow: 0 0 0 1px var(--cz-hair); cursor: ew-resize; opacity: 0; }
199
+ .ivt-gp.l { left: 2px; } .ivt-gp.r { right: 2px; }
200
+ .ivt-b:hover .ivt-gp, .ivt-b.drag .ivt-gp { opacity: 1; }
201
+ .ivt-av { width: 16px; height: 16px; border-radius: 50%; background: var(--cz-card); color: var(--cz-ink2); font-size: 8px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex: none; }
202
+ .ivt-b .ivt-av { pointer-events: none; }
203
+ .ivt-d { position: absolute !important; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px !important; border-radius: 50% !important; background: var(--cz-card) !important; border: 2.5px solid var(--cz-ink3) !important; z-index: 1; }
204
+ .ivt-d.pr { border-color: var(--cz-blue) !important; }
205
+ .ivt-d.lt { border-color: var(--cz-risk) !important; }
206
+ .ivt-d.dn { border-color: color-mix(in srgb, var(--cz-ink3) 40%, var(--cz-card)) !important; }
207
+ .ivt-d.jr { border-color: var(--cz-blueink) !important; border-radius: 2px !important; transform: rotate(45deg); }
208
+ .ivt-g { position: absolute !important; top: 50%; height: 20px; width: 36px; margin-top: -10px !important; border-radius: 999px !important; border: 1.5px dashed color-mix(in srgb, var(--cz-ink3) 50%, var(--cz-card)) !important; display: inline-flex !important; align-items: center; justify-content: center; color: var(--cz-ink3) !important; z-index: 1; }
209
+ .ivt-g:hover { border-color: var(--cz-blue) !important; color: var(--cz-blueink) !important; }
210
+ .ivt-tip { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--cz-solid); color: var(--cz-onsolid); font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 8px; white-space: nowrap; pointer-events: none; }
211
+ .ivt-today { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--cz-blue); z-index: 2; pointer-events: none; }
212
+ .ivt-today i { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 10px; font-weight: 800; color: var(--cz-card); background: var(--cz-blue); border-radius: 999px; padding: 1px 6px; white-space: nowrap; }
213
+ .ivt-lg { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--cz-ink3); padding: 8px 4px 0; }
214
+ .ivt-lg span { display: inline-flex; align-items: center; gap: 6px; }
215
+ .ivt-lg i { display: inline-block; width: 18px; height: 8px; border-radius: 4px; background: var(--cz-well2); }
216
+ .ivt-lg i.pr { background: color-mix(in srgb, var(--cz-blue) 30%, var(--cz-card)); }
217
+ .ivt-lg i.lt { background: color-mix(in srgb, var(--cz-risk) 30%, var(--cz-card)); }
218
+ .ivt-lg i.dd { width: 10px; height: 10px; border-radius: 50%; background: var(--cz-card); border: 2px solid var(--cz-ink3); }
219
+ .ivt-lg .h { margin-left: auto; }
220
+ /* a phone: the title sits above its bar; no drag (tap a bar for the picker) */
221
+ @container (max-width: 520px) {
222
+ .ivt { --nw: 0px; }
223
+ .ivt-r { flex-wrap: wrap; }
224
+ .ivt-n { width: 100cqw; min-height: 40px; }
225
+ .ivt-r.ax .ivt-n { display: none; }
226
+ .ivt-r.k .ivt-n { padding-left: 14px; min-height: 34px; }
227
+ .ivt-r.k .ivt-c { flex: none; width: 100%; height: 28px; }
228
+ .ivt-r.g .ivt-c { display: none; }
229
+ .ivt-gp, .ivt-lg .h { display: none; }
230
+ }
231
+
232
+ /* a phone: the Timeline zoom or the Kanban stage takes its own line under the header */
233
+ @media (max-width: 520px) {
234
+ .iv-th:has(.ivx-pick) { flex-wrap: wrap; row-gap: 8px; }
235
+ .iv-th:has(.ivx-pick)::after { content: ""; order: 5; flex-basis: 100%; }
236
+ .iv-th .ivx-pick { order: 6; }
237
+ }
238
+
239
+ /* Kanban: one stage at a time, columns by status; Won't do a folded strip */
240
+ .ivk { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) 40px; gap: 8px; align-items: start; }
241
+ .ivk.w4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
242
+ .ivk-c { background: var(--cz-well); border-radius: 16px; padding: 6px; display: flex; flex-direction: column; gap: 6px; min-height: 160px; min-width: 0; }
243
+ .ivk-c h4, .ivk-wh { margin: 0; display: flex !important; align-items: center; gap: 8px; padding: 6px 6px 2px 8px !important; font-size: 13px; font-weight: 800; color: var(--cz-ink); }
244
+ .ivk-c h4 .n, .ivk-wh .n { font-weight: 600; color: var(--cz-ink3); }
245
+ .ivk-c.ivk-over, .ivk-w.ivk-over { box-shadow: inset 0 0 0 2px var(--cz-blue); }
246
+ .ivk-w { align-self: stretch; min-height: 160px; background: var(--cz-well) !important; border-radius: 16px !important; display: flex !important; justify-content: center; padding-top: 12px !important; color: var(--cz-ink3) !important; font-size: 12px; font-weight: 700; }
247
+ .ivk-w span { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; }
248
+ .ivk-d { background: var(--cz-card); border-radius: 12px; border: 1px solid var(--cz-hair); padding: 9px 9px 7px; display: flex; gap: 9px; align-items: flex-start; min-width: 0; }
249
+ .ivk-d[draggable="true"] { cursor: grab; }
250
+ .ivk-d.drag { opacity: .5; }
251
+ .ivk-d .w { flex: 1; min-width: 0; color: inherit; font-weight: 400; display: flex; flex-direction: column; gap: 2px; }
252
+ .ivk-d .iv-tt { font-size: 13px; line-height: 1.3; overflow-wrap: anywhere; }
253
+ .ivk-d.x .iv-tt { color: var(--cz-ink3); font-weight: 600; }
254
+ .ivk-m { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--cz-ink3); min-height: 22px; }
255
+ .ivk-m .ivt-av { margin-left: auto; width: 20px; height: 20px; font-size: 9px; background: var(--cz-well); }
256
+ .ivk-d:hover .iv-dc.none, .ivk-d .iv-dc.none:focus-visible { opacity: 1; }
257
+ .ivk-tabs { display: none; gap: 4px; margin-bottom: 8px; overflow-x: auto; }
258
+ .ivk-tabs button { height: 32px; padding: 0 12px !important; border-radius: 999px !important; font-size: 13px; font-weight: 800; color: var(--cz-ink3) !important; white-space: nowrap; }
259
+ .ivk-tabs button[aria-selected="true"] { background: var(--cz-card) !important; color: var(--cz-ink) !important; box-shadow: 0 1px 3px rgba(42,46,53,.12); }
260
+ .ivk-tabs .n { font-weight: 600; color: var(--cz-ink3); }
261
+ .ivk-h { padding: 8px 4px 0; }
262
+ /* a phone: one column a screen, tabs on top, the next column peeks */
263
+ @container (max-width: 520px) {
264
+ .ivk-tabs { display: flex; }
265
+ .ivk, .ivk.w4 { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; }
266
+ .ivk-c { flex: 0 0 84%; scroll-snap-align: start; }
267
+ .ivk-w { flex: 0 0 44px; }
268
+ .ivk-h { display: none; }
269
+ }
270
+ @media (pointer: coarse) { .ivk-h { display: none; } }
271
+
272
+ /* the quick pickers: the task card's status segment and date picker (task-card.css), fixed under the press */
273
+ .tkc.ivq { position: fixed; z-index: 1000; left: var(--tl-x, 8px); top: var(--tl-y, 8px); padding: 0; gap: 0; font-family: var(--cz-sans); }
274
+ .tkc.ivq .tkc-pop { position: static; min-width: 0; }
275
+ .tkc.ivq .ivq-st { padding: 4px; }
276
+ .tkc.ivq .seg { display: flex; gap: 2px; align-items: center; flex-wrap: nowrap; }
277
+ .tkc.ivq .seg button { width: 36px; height: 36px; }
278
+ .tkc.ivq .seg button.on { width: auto; }
279
+ .tkc.ivq .seg .vr { width: 1px; height: 20px; background: var(--cz-hair); margin: 0 3px; }
280
+ .tkc.ivq .ivq-m { min-width: 220px; }
281
+ .tkc.ivq .ivq-m .ck { width: 16px; display: inline-flex; color: var(--cz-blueink); }
282
+ .tkc.ivq .ivq-m .k { color: var(--cz-ink3); font-size: 12.5px; font-weight: 700; padding-left: 14px; }
@@ -8,14 +8,20 @@
8
8
  * number and name, how much of its section is done, the day clock, the ladder, the dates line that replaced the Plan
9
9
  * card, the next stage), Tasks as the WBS (sections in workflow order), then Documents and Linked as folds.
10
10
  * o: { add (the Tasks + icon), adding (the inline field is open), next (the next stage is a press: Home's move sheet), openTask, docs: { n, html? } | null,
11
+ * quick (each task's box carries the status caret and its date is a press: the host has h.status and h.dates),
11
12
  * draft (the empty breakdown's Draft it), program (the chip opens the program), wf (the workflow on the meta line opens the Change picker) }
12
13
  * wireView(body, h) the presses, once per body: h.check(uid, btn), h.openTask(uid), h.openTicket(key), h.add(btn) (the + icon: the host
13
14
  * redraws with o.adding, an inline field), h.addTask(title, input), h.addCancel(), h.next(btn),
14
- * h.primary(act, btn), h.program(id), h.docs(), h.doc(path) (a linked document), h.draft(btn), h.wf(btn), h.redraw() (after a fold opens or closes)
15
+ * h.primary(act, btn), h.program(id), h.docs(), h.doc(path) (a linked document), h.draft(btn), h.wf(btn), h.redraw() (after a fold opens or closes),
16
+ * h.status(uid, state) and h.dates(uid, { start?, due? }) (the quick changes, each saved at once with Undo in the host's toast)
17
+ *
18
+ * Tasks has three views (batch 9 item 5b; canvas In development, row "Tasks views"): the List (the WBS below), Timeline and Kanban
19
+ * (pm/ini-tasks.js). The icon segment in the Tasks header switches them, and the last one is remembered for the PM.
15
20
  *
16
21
  * Folds keep their state per initiative for the session (a section, the Later line, a WBS group, the done tasks). Icon-only presses carry
17
22
  * their words in aria-label and title. Zero is silence: a part with nothing on record draws nothing. */
18
23
  import { wfIcon } from './wf-model.js';
24
+ import * as TV from './ini-tasks.js'; // Tasks as List, Timeline or Kanban, and the quick status and dates (batch 9 item 5b)
19
25
 
20
26
  const CSS = '/pm/ini-view.css';
21
27
  if (typeof document !== 'undefined' && document.head && !document.querySelector(`link[href="${CSS}"]`)) {
@@ -30,6 +36,7 @@ const P = {
30
36
  };
31
37
  const FOLD = new Map(); // `${id}|${key}` → true (open) | false (shut): the PM's own fold, for the session
32
38
  const isOpen = (v, key, dflt) => { const k = (v.id || v.key) + '|' + key; return FOLD.has(k) ? FOLD.get(k) : !!dflt; };
39
+ const SHOWN = new Map(); // id → the view last drawn, for the Kanban's stage picker
33
40
 
34
41
  /* ── the summary card ── */
35
42
  function summaryHtml(s, o = {}) {
@@ -61,11 +68,21 @@ function stageHtml(st, o) {
61
68
  }
62
69
 
63
70
  /* ── the WBS ── */
64
- function taskHtml(x, o) {
65
- const chk = x.canCheck ? `<button type="button" class="iv-cb${x.done ? ' on' : ''}" data-iv-check="${esc(x.uid)}" aria-pressed="${x.done}" aria-label="${esc((x.done ? 'Reopen: ' : 'Mark done: ') + x.title)}" title="${x.done ? 'Reopen' : 'Mark done'}">${x.done ? SVG(P.check, 12, 3) : ''}</button>`
66
- : `<span class="iv-cb off${x.done ? ' on' : ''}" aria-hidden="true">${x.done ? SVG(P.check, 12, 3) : ''}</span>`;
71
+ function taskHtml(x, o, arch) {
72
+ // the box marks done in one press; its caret opens the status picker right under it (an archived task has only the caret)
73
+ const car = o.quick && x.uid ? `<button type="button" class="iv-car" data-iv-stat="${esc(x.uid)}" data-st="${esc(x.status)}" aria-haspopup="dialog" aria-label="${esc('Change the status: ' + x.title)}" title="Status">${SVG(P.down, 10, 2.6)}</button>` : '';
74
+ const cls = ['iv-cb', x.done ? 'on' : '', x.prog ? 'pr' : '', x.wont ? 'wo' : ''].filter(Boolean).join(' ');
75
+ const chk = x.canCheck && !arch ? `<span class="iv-bxw"><button type="button" class="${cls}" data-iv-check="${esc(x.uid)}" aria-pressed="${x.done}" aria-label="${esc((x.done ? 'Reopen: ' : 'Mark done: ') + x.title)}" title="${x.done ? 'Reopen' : 'Mark done'}">${x.done ? SVG(P.check, 12, 3) : ''}</button>${car}</span>`
76
+ : `<span class="iv-bxw"><span class="iv-cb off${x.done ? ' on' : ''}" aria-hidden="true">${x.done ? SVG(P.check, 12, 3) : ''}</span>${arch ? car : ''}</span>`;
67
77
  const t = o.openTask && x.uid ? `<button type="button" class="iv-tt" data-iv-task="${esc(x.uid)}">${esc(x.title)}</button>` : `<b class="iv-tt">${esc(x.title)}</b>`;
68
- return `<div class="iv-tr${x.closed ? ' done' : ''}">${chk}<span class="w">${t}${x.sub ? `<span class="${x.late ? 'w' : ''}">${esc(x.sub)}</span>` : ''}</span></div>`;
78
+ // the meta: In progress, the dates (a press: the start and due picker opens under them), the late days, the owner
79
+ let meta = x.sub ? `<span class="${x.late ? 'w' : ''}">${esc(x.sub)}</span>` : '';
80
+ if (o.quick && x.uid) {
81
+ // no dates: the calendar icon sits last and shows on hover, so an undated row reads the same as before
82
+ const parts = [x.prog ? 'In progress' : '', x.days ? TV.dateBtn(x, o) + (x.lateText ? `<span class="iv-late">, ${esc(x.lateText)}</span>` : '') : '', x.owner && x.owner !== 'You' ? esc(x.owner) : ''];
83
+ meta = `<span class="iv-rm">${parts.filter(Boolean).join('<span class="iv-sep" aria-hidden="true"> · </span>')}${x.days ? '' : TV.dateBtn(x, o)}</span>`;
84
+ }
85
+ return `<div class="iv-tr${x.closed ? ' done' : ''}${x.wont ? ' wo' : ''}${arch ? ' ar' : ''}">${chk}<span class="w">${t}${meta}</span></div>`;
69
86
  }
70
87
  const chev = (open) => `<span class="iv-cv" aria-hidden="true">${SVG(open ? P.down : P.right, 15, 2)}</span>`;
71
88
  function bodyHtml(v, sec, o) {
@@ -93,6 +110,12 @@ function bodyHtml(v, sec, o) {
93
110
  if (op) h += `<div class="iv-sub">${sec.done.map((x) => taskHtml(x, o)).join('')}</div>`;
94
111
  }
95
112
  }
113
+ // archived tasks show nowhere but here: a fold after Done, only when there is one (batch 9 item 5b)
114
+ if ((sec.archived || []).length) {
115
+ const k = sec.key + ':arch', op = isOpen(v, k, false);
116
+ h += `<button type="button" class="iv-grp" data-iv-fold="${esc(k)}" aria-expanded="${op}"><b>Archived</b><span class="n">${sec.archived.length}</span>${chev(op)}</button>`;
117
+ if (op) h += `<div class="iv-sub">${sec.archived.map((x) => taskHtml(x, o, true)).join('')}</div>`;
118
+ }
96
119
  return h;
97
120
  }
98
121
  function markOf(sec) {
@@ -105,7 +128,7 @@ function markOf(sec) {
105
128
  }
106
129
  function sectionHtml(v, sec, o, inner) {
107
130
  const key = 'sec:' + (sec.key || 'none'), op = isOpen(v, key, sec.open);
108
- const has = sec.top.length || sec.groups.length || sec.done.length || sec.jira || (sec.stages && sec.stages.length);
131
+ const has = sec.top.length || sec.groups.length || sec.done.length || (sec.archived || []).length || sec.jira || (sec.stages && sec.stages.length);
109
132
  const name = sec.label || sec.name;
110
133
  const row = `<button type="button" class="iv-ws${sec.kind !== 'stage' && sec.kind !== 'none' ? ' mut' : ''}${inner ? ' in' : ''}" ${has ? `data-iv-fold="${esc(key)}" aria-expanded="${op}"` : 'disabled'}>${markOf(sec)}`
111
134
  + `<span class="w"><b>${esc(name)}</b>${sec.sub ? `<small class="${sec.subWarn ? 'w' : ''}">${esc(sec.sub)}</small>` : ''}</span>${sec.count ? `<span class="n${sec.warn ? ' w' : ''}">${esc(sec.count)}</span>` : ''}${has ? chev(op) : ''}</button>`;
@@ -117,13 +140,19 @@ function sectionHtml(v, sec, o, inner) {
117
140
  function tasksHtml(v, o) {
118
141
  const T = v.tasks;
119
142
  const add = o.add ? `<button type="button" class="iv-ib" data-iv-add aria-label="Add a task to ${esc(v.title)}" title="Add a task">${SVG(P.plus, 16, 2.2)}</button>` : '';
120
- const head = `<div class="iv-th"><b>Tasks</b>${T.count ? `<span class="n">${esc(T.count)}</span>` : ''}${add}</div>`
143
+ // the view switch shows once there is a task to see another way (zero is silence)
144
+ const mode = T.empty ? 'list' : TV.viewMode();
145
+ const head = `<div class="iv-th"><b>Tasks</b>${T.count ? `<span class="n">${esc(T.count)}</span>` : ''}<span class="iv-sp"></span>${T.empty ? '' : TV.headExtraHtml(v, mode) + TV.switchHtml(mode)}${add}</div>`
121
146
  + (o.adding ? `<form class="iv-addf" data-iv-addform><input id="ivAddTask" type="text" maxlength="160" autocomplete="off" placeholder="A task for ${esc(v.title)}" aria-label="New task"><button type="submit" class="iv-go" aria-label="Add the task" title="Add (Enter). Esc cancels.">${SVG(P.check, 16, 2.2)}</button></form>` : '');
122
147
  if (T.empty) {
123
148
  const sk = T.empty.stages.map((s) => `<span class="iv-sk"><span class="iv-no dash${s.ms ? ' ms' : ''}" aria-hidden="true">${s.ms ? '' : s.n}</span>${esc(s.name)}${s.now ? ' <i>· now</i>' : ''}</span>`).join('');
124
149
  return head + `<div class="iv-empty">${sk}<p class="iv-q">Claude drafts the breakdown, one section per stage. Nothing is saved until you keep it.</p>`
125
150
  + (o.draft ? `<button type="button" class="iv-pbtn" data-iv-draft>${SVG(P.draft, 16, 2)}Draft it</button>` : '') + '</div>';
126
151
  }
152
+ SHOWN.set(v.id || v.key || '', v);
153
+ const fold = (k, d) => isOpen(v, k, d), q = { ...o, mark: markOf };
154
+ if (mode === 'timeline') return head + `<div class="iv-tk">${TV.timelineHtml(v, q, fold)}</div>`;
155
+ if (mode === 'kanban') return head + `<div class="iv-tk">${TV.kanbanHtml(v, q, fold)}</div>`;
127
156
  return head + `<div class="iv-wbs">${T.sections.map((s) => sectionHtml(v, s, o)).join('')}</div>`;
128
157
  }
129
158
  function foldsHtml(v, o) {
@@ -155,6 +184,7 @@ export function wireView(body, h) {
155
184
  const root = b.closest('[data-iv]'); if (!root) return;
156
185
  const id = root.dataset.iv;
157
186
  const d = b.dataset;
187
+ if (TV.press(b, d, root, { ...H, __v: SHOWN.get(id) }, e)) return;
158
188
  if (d.ivFold) { e.preventDefault(); const k = id + '|' + d.ivFold; FOLD.set(k, b.getAttribute('aria-expanded') !== 'true'); if (H.redraw) H.redraw(); return; }
159
189
  if (d.ivCheck && H.check) { e.preventDefault(); H.check(d.ivCheck, b); return; }
160
190
  if (d.ivTask && H.openTask) { e.preventDefault(); H.openTask(d.ivTask, b); return; }
@@ -174,7 +204,8 @@ export function wireView(body, h) {
174
204
  e.preventDefault(); const H = body.__iv || {}, inp = f.querySelector('input'), t = inp ? inp.value.trim() : '';
175
205
  if (t && H.addTask) H.addTask(t, inp);
176
206
  });
207
+ TV.wireDrag(body);
177
208
  body.addEventListener('keydown', (e) => { if (e.key === 'Escape' && e.target.id === 'ivAddTask') { e.stopPropagation(); const H = body.__iv || {}; if (H.addCancel) H.addCancel(); } });
178
209
  }
179
210
  /** For the tests: forget every fold the PM opened or shut. */
180
- export const resetFolds = () => FOLD.clear();
211
+ export const resetFolds = () => { FOLD.clear(); TV.resetViews(); };
@@ -22,7 +22,7 @@ import { $, $$, esc, store, crumbHtml, wireCrumb, chatAbout, setPageGaps } from
22
22
  import { mountNav } from './cozy-nav.js';
23
23
  import { mountLivePill } from './cozy-live-pill.js';
24
24
  import { stepsHelpHtml } from './bd-stages.js';
25
- import { timelineHtml, legendHtml, SPANS, md } from './bd-span.js';
25
+ import { timelineHtml, legendHtml, hasHold, SPANS, md } from './bd-span.js';
26
26
  import * as TL from './bd-scroll.js';
27
27
  import * as Acts from './bd-acts.js';
28
28
  import * as V from './bd-views.js';
@@ -35,8 +35,9 @@ import * as VW from './cozy-viewer.js';
35
35
  import * as PP from './bd-prog-panel.js';
36
36
  import * as PO from './prog-order.js'; // the order of a program's initiatives: the grip and Claude's order from the dates (canvas RoADrag, RoASuggest)
37
37
  import * as BI from './bd-ini-panel.js';
38
+ import { nextHtml } from './bd-next.js';
38
39
  import { statusOf as ivStatus } from './ini-view-model.js';
39
- import { initiativeRename } from './rename-press.js';
40
+ import { initiativeRename, taskRename } from './rename-press.js';
40
41
  import { setSay } from './cozy-xv.js';
41
42
 
42
43
  const VIEW_KEY = 'pmos.board.view', PVIEW_KEY = 'pmos.board.pview', SPAN_KEY = 'pmos.board.span', GROUPING_KEY = 'pmos.board.grouping';
@@ -168,8 +169,9 @@ function drawChips() {
168
169
  $('#bdChipset').innerHTML = thisSprint + jiraChip + askChip + flt(['late', 'risk', 'blocked', 'idle']) + `<button type="button" class="bd-chip" id="chDocs">Docs ${docs}</button>`;
169
170
  return;
170
171
  }
171
- // the timeline's legend sits at the end of the chip row (PgTimeline), with a program milestone only where a program is drawn
172
- const lgd = view === 'time' && span !== 'sprint' ? '<span class="bd-sp"></span>' + legendHtml(!byProduct && !!groups(visible())) : '';
172
+ // the timeline's legend sits at the end of the chip row (PgTimeline), with a program milestone only where a program is drawn and "On hold" only
173
+ // where a hold is drawn (feedback batch 9 item 8: zero is silence)
174
+ const lgd = view === 'time' && span !== 'sprint' ? '<span class="bd-sp"></span>' + legendHtml(!byProduct && !!groups(visible()), hasHold(visible())) : '';
173
175
  $('#bdChipset').innerHTML = jiraChip
174
176
  + (ALL ? '' : `<button type="button" class="bd-chip" id="chSprint" aria-haspopup="dialog">${SV(I.cal)}<span>${esc(sprint)}</span></button>`)
175
177
  + askChip + '<span class="bd-vr"></span>' + flt(['late', 'risk', 'blocked', 'idle'])
@@ -277,9 +279,6 @@ function segHtml(r, big) {
277
279
  ? `<button type="button" class="bt-tk ${esc(s.cls || 'td')}" data-tk="${esc(s.tk)}" data-ini="${esc(r.key)}" aria-label="${esc(s.tk + ': ' + ((t.tickets.find((k) => k.key === s.tk) || {}).title || '') + ', ' + ((t.tickets.find((k) => k.key === s.tk) || {}).blocked ? 'blocked' : (t.tickets.find((k) => k.key === s.tk) || {}).status))}" title="${esc(s.tk)}"></button>`
278
280
  : `<i class="${esc(s.cls || '')}"${fill(i)}></i>`)).join('')}</div>`;
279
281
  }
280
- // the next step leads (PgBoard, the nextfirst layer): "Next: <the part>" with the part in blue ink; an output is named by its noun ("BRD", not "BRD complete")
281
- const lineHtml = (r) => ((r.track && r.track.line) || []).map((x) => (x.tone ? `<em class="s-${x.tone}">${esc(x.text)}</em>` : /^Next: /.test(x.text) ? `Next: <em class="nx">${esc(x.text.slice(6))}</em>` : esc(x.text))).join(' · ');
282
- const outName = (s) => String(s || '').replace(/ complete$/, '');
283
282
  /** The committed date under a milestone (PgBoard .eta): the planned end under ◆ Deliver until the initiative passes it, then under ◆ Evaluate;
284
283
  * amber when it is past and the milestone is not reached. At the milestone itself the date replaces the days count. */
285
284
  function etaOf(r, t) {
@@ -290,7 +289,6 @@ function etaOf(r, t) {
290
289
  }
291
290
 
292
291
  /* ── the stage track (AgBoard, AgBoardPhone) ──────────────────────────────────────────────────────────────────────────── */
293
- const LEGEND = '<span class="lg" aria-hidden="true"><span><i class="sk"></i>Skipped</span><span><i class="dn"></i>Done</span><span><i class="rv"></i>Review</span><span><i class="ip"></i>Doing</span><span><i class="yo"></i>You</span><span><i class="bl"></i>Blocked</span></span>';
294
292
  const DAYS = (t) => (t.days != null ? t.days + 'd' : '—');
295
293
  /** "usually N days": the median of past initiatives in that step (lib/board-trail.js), shown only from 3 samples on. */
296
294
  const usualOf = (t) => { const u = TR && TR.usual && t && TR.usual[t.key]; return u && u.n >= 3 && u.days != null ? u : null; };
@@ -334,7 +332,7 @@ function trackRow(r, cls = '', po = false) {
334
332
  return `<div class="bt-r bt-l${cls}${peek && peek.key === r.key && peek.kind !== 'acts' ? ' sel' : ''}${r.acts && r.acts.life === 'hold' ? ' held' : ''}" role="row" data-row="${esc(r.key)}"${po ? ` data-po-id="${esc(r.id)}"` : ''}>${po ? PO.gripHtml(r.title) : ''}`
335
333
  + `<button type="button" class="ini2 bt-nm" data-key="${esc(r.key)}" role="rowheader" aria-haspopup="dialog"><b>${r.inProgram ? PG.memberIcon(PGS, r.inProgram) : ''}${many ? WF.wfIcon(WF.wfOf(r), 18) : ''}${esc(r.title)}</b><span class="cs s-${s.tone}"><i class="cz-dot ${s.tone}"></i>${esc(s.text)}</span><span class="bt-pst">${t.ms ? '<i class="cz-ms" aria-hidden="true"></i>' : ''}${esc(t.label)} · ${DAYS(t)}</span></button>`
336
334
  + `<div class="${cellsCls()}" role="presentation"${cellsStyle()}>${cells}</div>`
337
- + `<div class="bt-dl" role="cell"><div class="t1"><b>${esc(outName(t.output))}</b><span>${esc(t.count || '')}</span></div>${segHtml(r)}<div class="t3">${lineHtml(r)}</div></div></div>`;
335
+ + `<div class="bt-dl" role="cell">${nextHtml(r, { self: M.board.self, icon: !PHONE.matches })}</div></div>`; // the Next cell (XocA): what finishes the step next
338
336
  }
339
337
  const cellsCls = () => 'bt-cells' + (TK.mode === 'cats' ? ' bands' : TK.mode === 'wf' ? ' wfn' : '');
340
338
  const cellsStyle = () => (TK.mode === 'wf' ? ` style="--n:${Math.max(1, TK.steps.length)}"` : '');
@@ -353,7 +351,7 @@ function drawTrack(L) {
353
351
  const hcell = (s) => (TK.mode === 'pf' ? `<div role="columnheader" class="${s.ms ? 'msh' : ''}" data-steps title="What finishes each step" aria-haspopup="dialog" tabindex="0">` : `<div role="columnheader" class="${s.ms ? 'msh' : ''}">`)
354
352
  + `<span class="bt-hl">${s.ms ? '<i class="cz-ms" aria-hidden="true"></i>' : ''}${esc(s.label)}</span><span>${s.count}</span></div>`;
355
353
  const hcells = TK.mode === 'cats' ? WF.CATS.map(([k, label]) => hcell({ label, count: V.catCount(L, k) })) : S.map(hcell);
356
- const head = `<div class="bt-r bt-h" role="row"><div class="bt-nmh" role="columnheader">Initiative <span>${n}</span></div><div class="${cellsCls()}" role="presentation"${cellsStyle()}>${hcells.join('')}</div><div class="bt-oh" role="columnheader">Output ${LEGEND}</div></div>`;
354
+ const head = `<div class="bt-r bt-h" role="row"><div class="bt-nmh" role="columnheader">Initiative <span>${n}</span></div><div class="${cellsCls()}" role="presentation"${cellsStyle()}>${hcells.join('')}</div><div class="bt-oh" role="columnheader">Next</div></div>`;
357
355
  const tf = more > 0 && !foldOpen ? `<button type="button" class="dlink" id="fold" aria-expanded="false">${SV(I.chev)}${more} more in Monitor and Evaluate</button>`
358
356
  : foldOpen && meTotal > 1 ? `<button type="button" class="dlink" id="fold" aria-expanded="true">${SV(I.chevUp)}Fold Monitor and Evaluate${meTotal > meShown ? ` · ${meTotal - meShown} more are not loaded` : ''}</button>` : '<span></span>';
359
357
  if (!L.length) return `<div class="bt" role="table" aria-label="Initiatives by stage">${head}<p class="bt-empty">${filtered() ? 'No initiative matches the chips, Find or Filter. <button type="button" class="dlink" id="fClear">Clear them</button>' : 'No initiatives are on this board\'s now view.'}</p></div>`;
@@ -466,12 +464,13 @@ $('#ibBody').addEventListener('click', (e) => {
466
464
  const pv = e.target.closest('[data-pv]'); if (pv) { setView(pv.dataset.pv); const b = $(`#ibBody [data-pv="${pv.dataset.pv}"]`); if (b) b.focus(); return; }
467
465
  const so = e.target.closest('[data-sort]'); if (so) { V.setSort(so.dataset.sort); drawInit(); const b = $(`#ibBody [data-sort="${so.dataset.sort}"]`); if (b) b.focus(); return; }
468
466
  if (e.target.closest('[data-me]')) { V.toggleME(); drawInit(); const b = $('#ibBody [data-me]'); if (b) b.focus(); return; }
467
+ const nx = e.target.closest('[data-nx]'); if (nx) { nextAct(nx); return; }
469
468
  const rm = e.target.closest('[data-rowmenu]'); if (rm) { const r = rowOf(rm.dataset.rowmenu); if (r) Acts.open.row(r, rm); return; }
470
469
  if (e.target.closest('[data-backlog]')) return; // pm/bd-acts.js opens the backlog
471
470
  const op = e.target.closest('[data-open]'); if (op) { Acts.open[op.dataset.open](op); return; }
472
471
  const st = e.target.closest('[data-steps]'); if (st) { togglePop('popSteps', st); return; }
473
472
  const tk = e.target.closest('[data-tk]'); if (tk) { openTicket(tk.dataset.ini, tk.dataset.tk, tk); return; }
474
- if (e.target.closest('[data-act]')) return; // pm/bd-acts.js handles its own presses
473
+ if (e.target.closest('[data-act], [data-hold]')) return; // pm/bd-acts.js handles its own presses (a ⏸ on the timeline opens its hold there)
475
474
  const pg = e.target.closest('[data-prog]'); if (pg) { PG.openProgram(pg.dataset.prog, pg); return; }
476
475
  const b = e.target.closest('[data-key]'); if (b) openIni(rowOf(b.dataset.key), b, view === 'time' ? 'time' : 'track');
477
476
  });
@@ -791,17 +790,55 @@ async function setTask(r, uid, state) {
791
790
  const k = (r.tasks || []).find((x) => x.uid === uid), body = { ws: r.ws || M.board.ws, board: r.boardId || M.board.id, task: uid };
792
791
  const res = await pmPost('/api/boards/tasks/state', { ...body, state }).catch(() => null);
793
792
  if (!res || res.ok === false) { say((res && res.error) || 'Nothing was changed.'); return; }
794
- // a breakdown item closed as Won't do is withdrawn, which the ledger cannot undo; Done can go back
795
- say(state + ': ' + (k ? k.title : uid) + '.', k && state === 'Done' ? async () => { const u = await pmPost('/api/boards/tasks/state', { ...body, state: k.status }).catch(() => null); say(u && u.ok ? 'Back to ' + k.status + '.' : (u && u.error) || 'The undo did not land.'); load(); } : undefined);
793
+ // a breakdown item closed as Won't do is withdrawn, which the ledger cannot undo; every other change can go back (batch 9 item 5b)
794
+ const undo = k && k.status !== state && !(k.item && state === "Won't do");
795
+ say(state + ': ' + (k ? k.title : uid) + '.', undo ? async () => { const u = await pmPost('/api/boards/tasks/state', { ...body, state: k.status }).catch(() => null); say(u && u.ok ? 'Back to ' + k.status + '.' : (u && u.error) || 'The undo did not land.'); load(); } : undefined);
796
796
  load();
797
797
  }
798
- /** A new task from the initiative view's + (the same box Home's page draws): POST /api/boards/tasks/add. → true when it was added. */
799
- async function addTask(r, title) {
800
- const res = await pmPost('/api/boards/tasks/add', { ws: r.ws || M.board.ws, board: r.boardId || M.board.id, initiative: r.id, title }).catch(() => null);
798
+ /** A task's start and due from the panel's Tasks (the date press, a Timeline drag): POST /api/boards/tasks/edit; Undo puts the old days back. */
799
+ async function setDates(r, uid, patch) {
800
+ const k = (r.tasks || []).find((x) => x.uid === uid), body = { ws: r.ws || M.board.ws, board: r.boardId || M.board.id, task: uid };
801
+ const res = await pmPost('/api/boards/tasks/edit', { ...body, ...patch }).catch(() => null);
802
+ if (!res || res.ok === false) { say((res && res.error) || 'Nothing was changed.'); return; }
803
+ const back = {}; for (const f of Object.keys(patch)) back[f] = k ? (f === 'due' ? k.end : k[f]) || '' : '';
804
+ say('Dates saved' + (k ? ': ' + k.title : '') + '.', k ? async () => { const u = await pmPost('/api/boards/tasks/edit', { ...body, ...back }).catch(() => null); say(u && u.ok !== false ? 'Dates put back.' : (u && u.error) || 'The undo did not land.'); load(); } : undefined);
805
+ load();
806
+ }
807
+ /** A task's title on the initiative view: the one task editor (task-card.js through home-task.js), as Home opens it; ← is the initiative. */
808
+ function openTask(r, k) {
809
+ const ws = r.ws || M.board.ws, board = r.boardId || M.board.id;
810
+ import('./home-task.js').then((T) => T.openTask({ ...k, ini: r.id, ws, board }, {
811
+ VW, pmPost, toast: (m) => say(m), toastUndo: (m, undo) => say(m, undo), now: () => (M.today ? Date.parse(M.today) || Date.now() : Date.now()), ws, board,
812
+ iniTitle: (id) => ((M.rows || []).find((x) => x.id === id) || {}).title || id,
813
+ owners: () => [...new Set((M.rows || []).flatMap((x) => (x.tasks || []).map((t) => t.owner)).filter(Boolean))],
814
+ inis: () => (M.rows || []).filter((x) => x.id && x.track).map((x) => ({ id: x.id, title: x.title })),
815
+ openIni: (id) => openIni((M.rows || []).find((x) => x.id === id && x.track)),
816
+ askInChat: (t) => location.assign(askHref(r, 'About the task "' + t.title + '": ')),
817
+ onChange: () => load(),
818
+ rename: (t) => taskRename({ pmPost, ws, board, uid: t.uid, ref: null, onSaved: (o) => { t.title = o.title; say('Renamed', async () => { const u = await o.undo(); if (u.ok) { t.title = u.title; load(); } return u; }); load(); } }),
819
+ }));
820
+ }
821
+ /** A new task from the initiative view's + (the same box Home's page draws): POST /api/boards/tasks/add. → true when it was added.
822
+ * section: the stage it finishes (the Next cell's +, "Add what finishes <stage>"): the task is placed under it (POST /api/boards/tasks/edit). */
823
+ async function addTask(r, title, section) {
824
+ const body = { ws: r.ws || M.board.ws, board: r.boardId || M.board.id };
825
+ const res = await pmPost('/api/boards/tasks/add', { ...body, initiative: r.id, title }).catch(() => null);
801
826
  if (!res || res.ok === false) { say((res && res.error) || 'The task was not added.'); return false; }
827
+ const uid = res.item && res.item.uid;
828
+ if (section && uid) { const s2 = await pmPost('/api/boards/tasks/edit', { ...body, task: uid, section }).catch(() => null); if (!s2 || s2.ok === false) { say('Task added, but not under its stage: ' + ((s2 && s2.error) || 'the server did not say why') + '.'); load(); return true; } }
802
829
  say('Task added.'); load();
803
830
  return true;
804
831
  }
832
+ /** The Next cell's icon (pm/bd-next.js): draft with Claude in Home's chat, move to the next stage, add a task to the stage, link the epic, read Jira. */
833
+ function nextAct(b) {
834
+ const r = rowOf(b.dataset.nxrow); if (!r) return;
835
+ const k = b.dataset.nx;
836
+ if (k === 'draft') location.assign(askHref(r, (b.dataset.q || 'Draft it') + ' for ' + r.title));
837
+ else if (k === 'move') Acts.moveNext(r, b);
838
+ else if (k === 'add') BI.openIni(r, b, { addTo: b.dataset.stage || '' });
839
+ else if (k === 'epic') import('./tk-send.js').then((S) => S.openSend({ ws: r.ws || M.board.ws || null, board: r.boardId || M.board.id, initiative: r.id, toast: say }));
840
+ else if (k === 'jira') refreshJira(b);
841
+ }
805
842
  const viewDoc = (path) => { const a = document.createElement('button'); a.dataset.doc = path; a.hidden = true; document.body.appendChild(a); a.click(); a.remove(); };
806
843
  const anchors = async (ws, board) => { try { const r = await (await fetch('/api/boards/anchors?ws=' + encodeURIComponent(ws || M.board.ws || '') + '&board=' + encodeURIComponent(board || M.board.id || ''), { credentials: 'same-origin' })).json(); return r && r.ok ? r.anchors || [] : []; } catch { return []; } };
807
844
  // Find and the other jumps: on the timeline the row's bar scrolls into view and the row tints for a moment (TsCEdges 4)
@@ -816,7 +853,7 @@ Acts.init({ M: () => M, wf: wfState, load, say, panel: actsPanel, close: closePa
816
853
  BI.mount({ M: () => M, statusOf, dayTitle, usual: usualOf, fmt, md, ago, segHtml, barHtml: V.barHtml, grill: (id) => GR[id], rowOf, pageHref, askHref, refreshJira: () => refreshJira(), viewDoc,
817
854
  send: (r) => import('./tk-send.js').then((S) => S.openSend({ ws: r.ws || M.board.ws || null, board: r.boardId || M.board.id, initiative: r.id, toast: say })),
818
855
  acts: (r, b) => Acts.open.row(r, b), grillOpen: (r, b) => Asks.openGrill(r.id, r.title, (r.track && r.track.label) || 'Triage', false, b), onShow: iniShown, onHide: iniHidden,
819
- programOf: (r) => programOf(PGS, r.ws || M.board.ws || '', r.id), openProgram: (id, b) => PG.openProgram(id, b), rename: renameIni, setTask, addTask, turnProgram });
856
+ programOf: (r) => programOf(PGS, r.ws || M.board.ws || '', r.id), openProgram: (id, b) => PG.openProgram(id, b), rename: renameIni, setTask, setDates, addTask, openTask, turnProgram });
820
857
  /** Tap the title to rename (canvas RnAIni): the list, the Timeline and the panel show the new name at once; Undo is the same press.
821
858
  * The Jira box opens Home's chat about it with the request typed, for the PM to send (PMOS holds no Jira credential, D53). */
822
859
  // a name the PM just saved holds over a read that predates it (the board derives off the request path) until a read says it too
@@ -536,6 +536,8 @@ export async function openMeeting(ref, o = {}) {
536
536
  await load(me);
537
537
  if (MT !== me) return;
538
538
  if (o.about) await openAbout(me);
539
+ // opened by Home's Record (batch 9 item 2): ask for consent at once, as the page's own Record does, when this meeting can still record
540
+ if (o.record && me.D && me.D.canRecord && !(me.D.rec && me.D.rec.held)) { me.ui.ask = 'consent'; repaint(me); }
539
541
  me.timers.push(setInterval(() => tick(me), 1000));
540
542
  me.timers.push(setInterval(() => { if (me.model && me.model.mk === 'live') load(me, true); }, 4000));
541
543
  me.timers.push(setInterval(() => { if (me.model && me.model.mk !== 'live') load(me, true); }, 30000));
@@ -271,6 +271,12 @@ export function mountCard(el, t, h) {
271
271
  return { draw, setStatus: (s) => change('status', { status: s }), task: t };
272
272
  }
273
273
 
274
+ /** For the initiative's Tasks views (pm/ini-tasks.js, batch 9 item 5b): the same five status icons and the same start and due picker, opened
275
+ * right under a task's box or its date instead of in the card. */
276
+ export const stateIcon = (s) => ico(SICON[SKEY[s] || 'todo']);
277
+ export const stateKey = (s) => SKEY[s] || 'todo';
278
+ export const datePickerHtml = (t, o = {}, now = Date.now()) => picker(t, o, now);
279
+
274
280
  /** The page's toast with Undo, in the shape Home draws (home-app.js toastUndo): #toast with one .undo press, kept 8 seconds. */
275
281
  /** The ⋯ menu's Delete for a task added by mistake (batch 7 item 5), or null for a Jira ticket or a breakdown item (Won't do withdraws
276
282
  * those). o: { ws, board, t, post(path, body), toast(msg, undo), done() — the Viewer closes and the list re-reads }. Undo restores it. */
@@ -25,13 +25,13 @@ Procedure:
25
25
  1. Run `pmos proactive day`. It shows the stage, the tasks, and the check state (when the last check was, and why this one runs). Run `pmos proactive brief` to read the stored brief: its items with their ids, its events with their ids, and its digests. Run `pmos proactive settings` for the sources, the scopes, the websites and, when it prints them, the PM's role, work and job description: use those to judge what matters to this PM. Run `pmos proactive goals` for the goal ids.
26
26
  2. Read what changed, from the sources that are on and reachable:
27
27
  - Calendar: today's events. Note a new event, a moved one, a cancelled one, and a new link or agenda in one.
28
- - Mentions of the PM since the last check, in Slack, Jira and Confluence, in every place that is not ignored. Keep where, who, the link to the conversation itself and a short paraphrase of what is asked. To tie a Jira issue to an initiative, run `pmos jira which <KEY>` (it reads local files only) and use the initiative it names. A status change of a ticket that `pmos jira which` names is not an item: the Jira status check shows it on the initiative's Jira tickets tab.
28
+ - Mentions of the PM since the last check, in Slack, Jira and Confluence, in every place that is not ignored, as the sources-read skill defines them: an @handle ("via": "at"), a Slack direct message ("via": "dm", in any place), or a Slack message or a mail that names the PM with no @ ("via": "name"). A message the PM wrote is never one. Keep where, who, the link to the conversation itself and a short paraphrase of what is asked. To tie a Jira issue to an initiative, run `pmos jira which <KEY>` (it reads local files only) and use the initiative it names. A status change of a ticket that `pmos jira which` names is not an item: the Jira status check shows it on the initiative's Jira tickets tab.
29
29
  - Places with scope watch: read every message or comment since the last check. Update the digest of the place (decisions, open questions, what touches a goal). A digest you submit replaces the stored digest of that place, so carry over what still holds.
30
30
  - GitHub, Drive, Figma and websites, if on: only what changed since the last check and matters to a goal or a meeting.
31
31
  - The open items of the stored brief: look once at each item that has a link, in a source that is on. Note an item that is now done or no longer true, and an item whose facts changed: a new ask, a new due date, a new owner, or an answer that changes what the PM must do.
32
32
  - Wispr Flow: notes for meetings that ended since the last check. Read the summary, the decisions and the actions. Read the related mail for the same meeting only if mail is on, and keep the subject, the sender and a gist.
33
33
  3. Decide what the brief needs.
34
- - New items: a thing the PM should act on that is not in the stored brief. Fill the fields as the morning-brief skill does: link, where, who, about, ask, reply_needed, how and kind (you, approve or auto, with the same meaning). Set "mention": true on an item that comes from a mention. Only give an item a source that is "read".
34
+ - New items: a thing the PM should act on that is not in the stored brief. Fill the fields as the morning-brief skill does: link, where, who, about, ask, reply_needed, how and kind (you, approve or auto, with the same meaning). Set "mention": true and its "via" on an item that comes from a mention. Only give an item a source that is "read".
35
35
  - Resolved items: an item in the stored brief that is now done, answered or no longer true, for example a thread the PM answered, an issue that was closed, a meeting that was cancelled. List its id in "resolved". Never resolve an item only because it is old.
36
36
  - Changed items: an open item whose facts changed. Submit it again with the SAME "title" and "source" as in the stored brief, because the workspace derives its id from them, and with the fields updated. The workspace replaces the stored item. Do not submit an item that did not change.
37
37
  - Event notes: for a meeting that ended, add "notes": {"wispr": {"link", "summary", "decisions", "actions"}, "mail": {"subject", "from", "gist", "link"}} to that event, and mark the "after" steps that are now done with "done": true. Give the event by the same "start", "end" and "title" it has in the stored brief, because the workspace derives its id from them.
@@ -35,7 +35,7 @@ Procedure:
35
35
  2. Read the calendar, and take everything else from the saved reads.
36
36
  - Calendar: today's events. Then the CALENDAR MEMORY: every event in the window that `pmos proactive calendar` named (at most 1000 events, at most 140 days). For each event keep the start, the end, the title, the calendar's recurring-event id as "series" if it has one, the number of attendees, "external": true when someone outside the PM's company attends, "exec": true when an executive attends, and the PM's "role" ("present" when the PM presents, "decide" when the PM decides, else "attend"). For an event that has ended, add "notes": one line in your own words of what happened, from the saved Wispr Flow read, only when it has notes for that meeting; and "open": up to 3 points still open from it. For a coming event that needs work first, add "prep": up to 6 steps, and "prep_done": how many of them are already done. Read only titles, times and attendee counts. Never copy an invitation's text.
37
37
  - THE SAVED READS. Run `pmos source show --json`. It prints one read per tool: its "state" (read, not-reached or off), its "read_at", its "items" (who, where, what is asked, the link, "mention" when it mentions the PM), its "digests" (one per watched Slack channel, Jira project or Confluence space) and its "places". In the brief, give each tool the state of its saved read. A tool with no saved read, or whose read is older than yesterday morning, is "not-reached": say in the evidence of one item that its read is old. Never add an item of a tool whose state is not "read".
38
- - Turn the saved items into brief items (step 3). Keep their link, where, who, about, ask, mention, reply_needed, due and thread as they are, and give the item the tool as its "source". Copy each saved digest into "digests" with its tool as "source", and each saved place into "places".
38
+ - Turn the saved items into brief items (step 3). Keep their link, where, who, about, ask, mention, via, reply_needed, due and thread as they are, and give the item the tool as its "source". Copy each saved digest into "digests" with its tool as "source", and each saved place into "places".
39
39
  - Jira issues assigned to the PM are not in the saved reads: My work owns them. Run `pmos my-work list --top 5 --json` and add each item it prints as a priority with "source": "jira" (or "github" for a WBS item), "owner": "pm", the item's key in the title, and "how": "Brief it in My work". Never make one of them an agent item: the PM briefs the agent in My work. If the command fails, say so in the evidence of one item and go on. To tie a Jira issue to an initiative, run `pmos jira which <KEY>` (it reads local files only) and use the initiative it names. A status change of a ticket that `pmos jira which` names is not an item: the Jira status check shows it on the initiative's Jira tickets tab.
40
40
  3. PLAN EACH OPEN GOAL. For each open goal, find what moves it today in what you read and in `pmos proactive today`: a meeting where it is decided, a mention that blocks it, an issue or page it needs, a step an agent can prepare. Write each as an item with "goal": "<the goal id>". An agent step names the initiative it advances, so the PM can prepare it from Today. A calendar event that belongs to a goal also gets "goal". If you find nothing for a goal, write nothing for it: the workspace shows that goal as needing a plan. Never invent a step.
41
41
  Then ANTICIPATE: for each other thing the PM should act on today (a mention waiting on them, a meeting to prepare for, an issue due), write one item with no goal.
@@ -25,10 +25,14 @@ Procedure:
25
25
  1. Run `pmos proactive settings`. Note which sources are on, the websites and the scopes.
26
26
  2. Read each source that is on, since yesterday morning (or since its last read, which `pmos source status` prints, if that is later than yesterday morning):
27
27
  - Wispr Flow: today's and yesterday's meeting notes. One item per meeting: the title, when, and in "about" what was decided and what is still open.
28
- - Mail: subjects and senders of threads waiting on the PM. No bodies.
28
+ - Mail: subjects and senders of threads waiting on the PM. You may read a body to see whether it names the PM or asks the PM something; never copy it.
29
29
  - Slack, Jira and Confluence take a scope for each place. "watch": read every message or comment, then write one digest for the place (decisions and open questions, in your words). "search": do not read the place; look only for mentions of the PM and for the words of the PM's goals (`pmos proactive goals`). "ignore": do not read, search or report the place. A place with no scope is "search".
30
- - Mentions of the PM in Slack, Jira and Confluence, and mail threads that ask the PM something by name: one item each, with "mention": true, where it is, who wrote it, the link to the conversation itself, and in "ask" what is asked. Do not read the Jira issues assigned to the PM: My work owns them.
31
- - For each mention, keep the last messages of its thread in "thread" with who wrote each one, including the PM's own replies. Set "replied": true when the PM answered in the thread after the last ask. Set "broadcast": true when the mention is @channel, @here, a team handle or a bot: it is for the PM's information, never an ask. Home's Mentions keeps every mention until the PM answers it, so a mention you read once is not lost when the next read no longer has it.
30
+ - Mentions of the PM: one item each, with "mention": true, "via", where it is, who wrote it, the link to the conversation itself, and in "ask" what is asked. Do not read the Jira issues assigned to the PM: My work owns them. A mention is any of these:
31
+ - "via": "at": an @handle of the PM in Slack, Jira or Confluence.
32
+ - "via": "dm": a Slack direct message to the PM, or a group DM the PM is in, with no @. Set "where": "DM". Read the DMs since the last read in every scope; a DM has no scope.
33
+ - "via": "name": a Slack message or a mail that names the PM with no @: the PM's first name, full name, or an alias. The PM's names are the name `pmos proactive settings` prints, and the real name and display name of the PM's own Slack profile and mail address. Look for them in the places with scope watch or search, and in the mail since the last read. A name that clearly means another person with the same name is not a mention.
34
+ A message the PM wrote is never a mention of the PM.
35
+ - For each mention, keep the last messages of its thread in "thread" with who wrote each one, including the PM's own replies. Set "replied": true when the PM answered in the thread after the last ask. Set "broadcast": true when the mention is @channel, @here, a team handle or a bot: it is for the PM's information, never an ask. Set "reply_needed": true only when the message asks the PM something: a question, a request or a decision. A DM or a name mention that only tells the PM something (FYI, thanks, a link) is "reply_needed": false. Home's Mentions keeps every mention until the PM answers it, so a mention you read once is not lost when the next read no longer has it.
32
36
  - Jira: issues due soon that are not assigned to the PM. Confluence: pages changed since the last read.
33
37
  - GitHub: pull requests that wait on the PM for review, the PM's pull requests with a review or a failed check, and issues assigned to the PM.
34
38
  - Drive: files shared with the PM or changed since the last read. Figma: files the PM owns or was asked to look at, with new comments.
@@ -38,7 +42,7 @@ Procedure:
38
42
  ```
39
43
  {"reads": [
40
44
  {"source": "slack", "state": "read",
41
- "items": [{"title": "…", "link": "https://…", "where": "#pm-team", "who": "…", "at": "<ISO or HH:MM>", "about": "…", "ask": "…", "mention": true, "reply_needed": true, "replied": false, "broadcast": false, "due": "…",
45
+ "items": [{"title": "…", "link": "https://…", "where": "#pm-team", "who": "…", "at": "<ISO or HH:MM>", "about": "…", "ask": "…", "mention": true, "via": "at|dm|name", "reply_needed": true, "replied": false, "broadcast": false, "due": "…",
42
46
  "thread": [{"who": "…", "at": "09:12", "text": "…"}], "initiative_id": "<only when `pmos jira which` or the text names one>"}],
43
47
  "digests": [{"name": "#launch", "link": "https://…", "decisions": ["…"], "open": ["…"]}],
44
48
  "places": [{"name": "#pm-team", "link": "https://…"}]},