create-pmos 0.419.0 → 0.421.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 (79) hide show
  1. package/package.json +25 -30
  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 +24 -0
  10. package/workspace/fixtures/report-api/draft.json +2 -1
  11. package/workspace/guide/briefing-premium.md +1 -1
  12. package/workspace/guide/home.md +3 -0
  13. package/workspace/home-other-product-test.js +18 -0
  14. package/workspace/home-rows-test.js +14 -0
  15. package/workspace/lib/board-premium.js +13 -3
  16. package/workspace/lib/brief.js +5 -0
  17. package/workspace/lib/briefing-premium-agent.js +8 -0
  18. package/workspace/lib/engine/lane-defs.js +14 -1
  19. package/workspace/lib/engine/workflow-state.js +2 -2
  20. package/workspace/lib/first-input.js +13 -6
  21. package/workspace/lib/hold-spans.js +64 -0
  22. package/workspace/lib/mention-store.js +49 -13
  23. package/workspace/lib/plan-tree.js +1 -1
  24. package/workspace/lib/report-draft.js +6 -0
  25. package/workspace/lib/routes-boards.js +22 -6
  26. package/workspace/lib/source-reads.js +5 -0
  27. package/workspace/lib/transcript-read.js +29 -1
  28. package/workspace/lib/vendor/scripts/lane-defs.js +14 -1
  29. package/workspace/lib/vendor/scripts/workflow-state.js +2 -2
  30. package/workspace/package-lock.json +2 -2
  31. package/workspace/package.json +1 -1
  32. package/workspace/premium-viewer-test.js +1 -1
  33. package/workspace/public/pm/bd-acts.js +49 -1
  34. package/workspace/public/pm/bd-ini-panel.js +15 -8
  35. package/workspace/public/pm/bd-next.js +119 -0
  36. package/workspace/public/pm/bd-prog.js +1 -1
  37. package/workspace/public/pm/bd-span.js +120 -22
  38. package/workspace/public/pm/bd-views.js +7 -5
  39. package/workspace/public/pm/cozy-board.css +54 -9
  40. package/workspace/public/pm/cozy-live-pill.js +1 -1
  41. package/workspace/public/pm/cozy-nav.js +1 -1
  42. package/workspace/public/pm/cozy-steps.js +1 -1
  43. package/workspace/public/pm/cozy-today.css +9 -0
  44. package/workspace/public/pm/cozy-viewer.js +7 -3
  45. package/workspace/public/pm/cozy-xv.js +1 -1
  46. package/workspace/public/pm/cozy.css +10 -0
  47. package/workspace/public/pm/home-app.js +39 -13
  48. package/workspace/public/pm/home-ask.js +7 -0
  49. package/workspace/public/pm/home-ini.js +44 -13
  50. package/workspace/public/pm/home-line.js +1 -1
  51. package/workspace/public/pm/home-list.js +22 -2
  52. package/workspace/public/pm/home-mentions.js +1 -1
  53. package/workspace/public/pm/home-today.js +13 -2
  54. package/workspace/public/pm/ini-tasks.js +363 -0
  55. package/workspace/public/pm/ini-view-model.js +19 -11
  56. package/workspace/public/pm/ini-view.css +160 -0
  57. package/workspace/public/pm/ini-view.js +40 -9
  58. package/workspace/public/pm/premium-board.js +54 -17
  59. package/workspace/public/pm/premium-insights.js +1 -1
  60. package/workspace/public/pm/premium-mtg-present.js +2 -2
  61. package/workspace/public/pm/premium-report-read.js +1 -1
  62. package/workspace/public/pm/premium-report-tab.js +1 -1
  63. package/workspace/public/pm/premium-viewer.js +3 -3
  64. package/workspace/public/pm/premium-vw-mtg.js +3 -1
  65. package/workspace/public/pm/premium-vw-open.js +1 -1
  66. package/workspace/public/pm/premium-vw-slides.js +1 -1
  67. package/workspace/public/pm/prog-order.js +1 -1
  68. package/workspace/public/pm/task-card.js +6 -0
  69. package/workspace/public/pm/tk-send.js +1 -1
  70. package/workspace/server.js +26 -2
  71. package/workspace/skills/day-check.skill +2 -2
  72. package/workspace/skills/morning-brief.skill +1 -1
  73. package/workspace/skills/sources-read.skill +8 -4
  74. package/workspace/task-press-test.js +120 -0
  75. package/workspace/task-views-test.js +245 -0
  76. package/workspace/test-lists/task-press.json +6 -0
  77. package/workspace/test-lists/task-views.json +6 -0
  78. package/workspace/test-lists/timeline-holds.json +6 -0
  79. package/workspace/timeline-holds-test.js +199 -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,16 +8,22 @@
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
- const CSS = '/pm/ini-view.css';
26
+ const CSS = new URL('./ini-view.css', import.meta.url).href;
21
27
  if (typeof document !== 'undefined' && document.head && !document.querySelector(`link[href="${CSS}"]`)) {
22
28
  const l = document.createElement('link'); l.rel = 'stylesheet'; l.href = CSS; document.head.appendChild(l);
23
29
  }
@@ -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
@@ -569,7 +569,7 @@ function copyText(text, said) { try { navigator.clipboard.writeText(text).then((
569
569
  let ovCss = false;
570
570
  function openGoalDetail(id, open0) {
571
571
  let g = goalById(id); if (!g) return;
572
- if (!ovCss) { ovCss = true; const l = document.createElement('link'); l.rel = 'stylesheet'; l.href = '/pm/ov-view.css'; document.head.append(l); } // the where row Moved by shares
572
+ if (!ovCss) { ovCss = true; const l = document.createElement('link'); l.rel = 'stylesheet'; l.href = new URL('./ov-view.css', import.meta.url).href; document.head.append(l); } // the where row Moved by shares
573
573
  const own = goalWs(g) === M.board.ws, st = { open: open0 || '', more: false, adding: false, own };
574
574
  const kr = krId(g);
575
575
  const more = [], stepsGoal = g.type === 'Done or not' && g.steps && g.steps.length;
@@ -176,7 +176,7 @@ export function presentHtml(V, slideHtml = () => '', deck = null) {
176
176
  }
177
177
 
178
178
  /* ── the page half ── */
179
- const CSS = ['/pm/premium-vw-slides.css', '/pm/cozy-mtg-present.css'];
179
+ const CSS = [new URL('./premium-vw-slides.css', import.meta.url).href, new URL('./cozy-mtg-present.css', import.meta.url).href];
180
180
  function sheets(doc, abs, again) {
181
181
  if (abs) return copySheets(doc, again);
182
182
  for (const h of CSS) if (!doc.querySelector(`link[href="${h}"]`)) { const l = doc.createElement('link'); l.rel = 'stylesheet'; l.href = h; doc.head.append(l); }
@@ -186,7 +186,7 @@ function sheets(doc, abs, again) {
186
186
  function copySheets(doc, again) {
187
187
  let st = doc.getElementById('vzxAudCss');
188
188
  if (st && st.dataset.full === '1') return;
189
- const want = CSS.concat(['/pm/cozy.css']).map((h) => h.replace(/^\/pm\//, '/'));
189
+ const want = CSS.concat([new URL('./cozy.css', import.meta.url).href]);
190
190
  const text = [], got = new Set();
191
191
  for (const sh of document.styleSheets) {
192
192
  const w = sh.href && want.find((x) => sh.href.split('?')[0].endsWith(x)); if (!w) continue;
@@ -76,7 +76,7 @@ const WAIT = (f) => `<span class="vz-wait" data-cz-placeholder="${esc(f)}">Waiti
76
76
  /** The reader's own sheet (cozy-vw-rp.css), added to the page once. */
77
77
  function rpStyle() {
78
78
  if (typeof document === 'undefined' || document.querySelector('link[data-rp-css]')) return;
79
- const l = document.createElement('link'); l.rel = 'stylesheet'; l.href = '/pm/cozy-vw-rp.css'; l.setAttribute('data-rp-css', ''); document.head.appendChild(l);
79
+ const l = document.createElement('link'); l.rel = 'stylesheet'; l.href = new URL('./cozy-vw-rp.css', import.meta.url).href; l.setAttribute('data-rp-css', ''); document.head.appendChild(l);
80
80
  }
81
81
  /** "Oct 21", from a cycle's YYYY-MM-DD slot. */
82
82
  export const shortSlot = (s) => { const m = /^(\d{4})-(\d{2})-(\d{2})$/.exec(String(s || '')); return m ? MONS[+m[2] - 1] + ' ' + +m[3] : String(s || ''); };
@@ -51,7 +51,7 @@ const T = new Map(); // view id → its state
51
51
  /** The report parts' sheet (cozy-vw-rp.css), added to the page once (premium-report-read.js adds the same one). */
52
52
  function rpStyle() {
53
53
  if (typeof document === 'undefined' || document.querySelector('link[data-rp-css]')) return;
54
- const l = document.createElement('link'); l.rel = 'stylesheet'; l.href = '/pm/cozy-vw-rp.css'; l.setAttribute('data-rp-css', ''); document.head.appendChild(l);
54
+ const l = document.createElement('link'); l.rel = 'stylesheet'; l.href = new URL('./cozy-vw-rp.css', import.meta.url).href; l.setAttribute('data-rp-css', ''); document.head.appendChild(l);
55
55
  }
56
56
  const SV = (d, n = 16) => `<svg viewBox="0 0 24 24" width="${n}" height="${n}" aria-hidden="true"><path d="${d}"/></svg>`;
57
57
  /** Open (or refresh) the view of a checked report block (report-chat.js cleanBlock). */
@@ -155,7 +155,7 @@ function onKey(e) {
155
155
  }
156
156
  export function vwStyle(name) {
157
157
  if (!/^[a-z0-9-]+$/.test(name || '') || document.querySelector(`link[data-vw-css="${name}"]`)) return;
158
- const l = document.createElement('link'); l.rel = 'stylesheet'; l.href = `/pm/premium-vw-${name}.css`; l.dataset.vwCss = name; document.head.append(l);
158
+ const l = document.createElement('link'); l.rel = 'stylesheet'; l.href = new URL(`./premium-vw-${name}.css`, import.meta.url).href; l.dataset.vwCss = name; document.head.append(l);
159
159
  }
160
160
  export function vwConfirm(el, o) {
161
161
  return new Promise((done) => {
@@ -170,7 +170,7 @@ export function vwConfirm(el, o) {
170
170
  }
171
171
  /* The Agreed design (initiative premium-agreed-design): the dialog and the Viewer take the cozy look on a page whose body has class cz.
172
172
  * The sheet is inert elsewhere, so it is loaded on every page that imports the viewer. */
173
- if (typeof document !== 'undefined' && document.head && !document.querySelector('link[href="/pm/cozy-viewer.css"]')) {
174
- const l = document.createElement('link'); l.rel = 'stylesheet'; l.href = '/pm/cozy-viewer.css'; document.head.append(l);
173
+ if (typeof document !== 'undefined' && document.head && !document.querySelector('link[href$="/cozy-viewer.css"]')) {
174
+ const l = document.createElement('link'); l.rel = 'stylesheet'; l.href = new URL('./cozy-viewer.css', import.meta.url).href; document.head.append(l);
175
175
  }
176
176
  if (typeof window !== 'undefined') window.__premiumViewer = { vwOpen, vwClose, vwShow, vwReset, vwState, vwStyle, vwConfirm, vwCount };
@@ -494,7 +494,7 @@ let WEEKS = new Map(); // date → weekView, read once per open
494
494
  const q = (o) => Object.entries(o).filter(([, v]) => v != null && v !== '').map(([k, v]) => k + '=' + encodeURIComponent(v)).join('&');
495
495
  const toast = (t) => { try { if (typeof window !== 'undefined' && window.pmToast) window.pmToast(t); } catch { /* none */ } };
496
496
  /** This module's sheet (the redesign's parts), added to the page once. */
497
- const CSS = '/pm/cozy-vw-mtg.css';
497
+ const CSS = new URL('./cozy-vw-mtg.css', import.meta.url).href;
498
498
  export function mtgStyle() { if (typeof document === 'undefined' || document.querySelector(`link[href="${CSS}"]`)) return; const l = document.createElement('link'); l.rel = 'stylesheet'; l.href = CSS; document.head.append(l); }
499
499
  /** The Viewer is wider for a meeting (MtReplay: 780px) while it shows one; the page's own rule sizes it otherwise. */
500
500
  export function widen(k) { const v = typeof document !== 'undefined' && document.getElementById('czViewer'); if (v) { if (k) v.dataset.vzw = k; else delete v.dataset.vzw; } }
@@ -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));
@@ -11,7 +11,7 @@
11
11
  * The modules load on first use (dynamic import), so this file has no import cycle with the view modules that import it.
12
12
  * It also adds the Viewer's style sheet (cozy-vw.css) to the page once. */
13
13
 
14
- const CSS = '/pm/cozy-vw.css';
14
+ const CSS = new URL('./cozy-vw.css', import.meta.url).href;
15
15
  export function vzStyle() {
16
16
  if (typeof document === 'undefined' || document.querySelector(`link[href="${CSS}"]`)) return;
17
17
  const l = document.createElement('link'); l.rel = 'stylesheet'; l.href = CSS; document.head.append(l);
@@ -112,7 +112,7 @@ export function present(deck, ws, start, opt = {}) {
112
112
  if (!w || w.closed) { toast('The browser blocked the audience window. Allow pop-ups for PMOS, then press Audience window again.'); return; }
113
113
  const d = w.document;
114
114
  d.title = 'Audience · ' + deck.title;
115
- if (!d.querySelector('link[data-sl]')) for (const h of ['/pm/cozy.css', '/pm/premium-vw-slides.css']) { const l = d.createElement('link'); l.rel = 'stylesheet'; l.href = location.origin + h; l.dataset.sl = ''; d.head.append(l); }
115
+ if (!d.querySelector('link[data-sl]')) for (const h of ['./cozy.css', './premium-vw-slides.css']) { const l = d.createElement('link'); l.rel = 'stylesheet'; l.href = new URL(h, import.meta.url).href; l.dataset.sl = ''; d.head.append(l); }
116
116
  d.documentElement.dataset.theme = 'dark'; d.body.className = 'cz sl-audw';
117
117
  w.onkeydown = (e) => key(e); w.onresize = drawWin; w.onclick = () => go(1);
118
118
  P.win = w; drawWin(); o.focus();
@@ -21,7 +21,7 @@ const SV = (d, w = 2) => `<svg viewBox="0 0 24 24" fill="none" stroke="currentCo
21
21
  const GRIP = 'M9 6h.01M9 12h.01M9 18h.01M15 6h.01M15 12h.01M15 18h.01';
22
22
  const SPARK = 'M12 3l1.8 4.7L18.5 9.5l-4.7 1.8L12 16l-1.8-4.7L5.5 9.5l4.7-1.8zM18 15l.7 1.8 1.8.7-1.8.7L18 20l-.7-1.8-1.8-.7 1.8-.7z';
23
23
  const X = 'M6 6l12 12M18 6L6 18', OK = 'M5 12l5 5 9-10', CAL = 'M4 6h16v14H4zM4 10h16M8 3v4M16 3v4M12 13v5M9.5 15.5h5';
24
- const CSS = '/pm/prog-order.css';
24
+ const CSS = new URL('./prog-order.css', import.meta.url).href;
25
25
 
26
26
  /* ── "not now", per program, until a date changes ── */
27
27
  const NN_KEY = 'pmos.order.notnow';
@@ -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. */