create-pmos 0.399.0 → 0.401.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 (425) hide show
  1. package/package.json +30 -25
  2. package/payload/KIT-VERSION +1 -1
  3. package/payload/planning/evals/eval-calibration.md +1 -1
  4. package/payload/planning/okrs/health-budgets.md +1 -1
  5. package/payload/state/discoveries.md +1 -1
  6. package/workspace/briefing-premium-adddoc-test.js +2 -2
  7. package/workspace/briefing-premium-board-test.js +3 -3
  8. package/workspace/briefing-premium-doc-edit-test.js +2 -8
  9. package/workspace/briefing-premium-sources-test.js +2 -0
  10. package/workspace/briefing-premium-test.js +6 -2
  11. package/workspace/briefing-premium-work-test.js +9 -4
  12. package/workspace/c3-capture-test.js +0 -17
  13. package/workspace/changelog.json +29 -0
  14. package/workspace/guide/briefing-premium.md +2 -2
  15. package/workspace/guide/home.md +24 -3
  16. package/workspace/guide/layout.md +2 -2
  17. package/workspace/guide/notes.md +2 -2
  18. package/workspace/guide/phone-companion.md +1 -1
  19. package/workspace/lib/core-docs.js +2 -2
  20. package/workspace/lib/route-modules.js +1 -9
  21. package/workspace/lib/routes-phone-day.js +18 -9
  22. package/workspace/lib/routes-slash.js +95 -0
  23. package/workspace/package-lock.json +2 -2
  24. package/workspace/package.json +1 -2
  25. package/workspace/premium-chat-goal-view-test.js +1 -1
  26. package/workspace/premium-chat-term-test.js +0 -10
  27. package/workspace/premium-menu-rows-test.js +1 -1
  28. package/workspace/premium-phone-card-test.js +8 -3
  29. package/workspace/premium-vw-cal-test.js +4 -1
  30. package/workspace/premium-vw-doc-test.js +1 -8
  31. package/workspace/premium-work-depth-test.js +2 -3
  32. package/workspace/public/capture.html +23 -0
  33. package/workspace/public/pm/c3-base.js +47 -0
  34. package/workspace/public/pm/c3-capture.js +1 -1
  35. package/workspace/public/pm/c3-ini-ui.js +1 -1
  36. package/workspace/public/pm/c3-sheet.js +1 -1
  37. package/workspace/public/pm/c3-toast.js +1 -1
  38. package/workspace/public/pm/console3.css +3 -0
  39. package/workspace/public/pm/cozy-home.css +21 -6
  40. package/workspace/public/pm/cozy-today.css +4 -3
  41. package/workspace/public/pm/cozy-viewer.js +4 -2
  42. package/workspace/public/pm/cozy.css +9 -0
  43. package/workspace/public/pm/goal-chat.js +5 -1
  44. package/workspace/public/pm/home-app.js +65 -33
  45. package/workspace/public/pm/home-chat.js +34 -29
  46. package/workspace/public/pm/home-data.js +10 -2
  47. package/workspace/public/pm/home-dictate.js +7 -4
  48. package/workspace/public/pm/home-ini.js +13 -3
  49. package/workspace/public/pm/home-list.js +18 -10
  50. package/workspace/public/pm/home-more.js +2 -2
  51. package/workspace/public/pm/home-phone-card.js +9 -4
  52. package/workspace/public/pm/home-review.js +2 -3
  53. package/workspace/public/pm/home-today.js +11 -8
  54. package/workspace/public/pm/home-work.js +13 -8
  55. package/workspace/public/pm/note-dock.js +1 -2
  56. package/workspace/public/pm/notes-links.js +1 -2
  57. package/workspace/public/pm/notes-task.js +3 -4
  58. package/workspace/public/pm/premium-board.js +1 -1
  59. package/workspace/public/pm/premium-initiative-head.js +3 -3
  60. package/workspace/public/pm/premium-vw-doc.css +20 -2
  61. package/workspace/public/pm/premium-vw-doc.js +22 -7
  62. package/workspace/public/pm/premium-vw-item.css +6 -0
  63. package/workspace/public/pm/view-notes.js +2 -2
  64. package/workspace/replaced-tests.json +435 -0
  65. package/workspace/run-tests.js +323 -28
  66. package/workspace/server.js +15 -10
  67. package/workspace/test-files.json +4 -140
  68. package/workspace/test-lists/base.json +1 -2
  69. package/workspace/test-lists/c3-desktop-light-load.json +1 -2
  70. package/workspace/test-lists/c3-initiative-boards.json +1 -2
  71. package/workspace/test-lists/c3-meeting-focus.json +2 -12
  72. package/workspace/test-lists/c3-work-agent.json +1 -2
  73. package/workspace/test-lists/calendar-tidy-up.json +1 -2
  74. package/workspace/test-lists/console3-reports.json +1 -2
  75. package/workspace/test-lists/docs-three-way-sync.json +1 -2
  76. package/workspace/test-lists/extension-capture.json +5 -0
  77. package/workspace/test-lists/jira-wbs.json +1 -2
  78. package/workspace/test-lists/legacy-cleanup-a.json +9 -0
  79. package/workspace/test-lists/meeting-material.json +1 -2
  80. package/workspace/test-lists/meeting-notes.json +2 -36
  81. package/workspace/test-lists/meeting-replay.json +1 -2
  82. package/workspace/test-lists/mm-capture.json +2 -12
  83. package/workspace/test-lists/my-work.json +2 -10
  84. package/workspace/test-lists/onboarding-firstrun.json +2 -12
  85. package/workspace/test-lists/people-directory.json +1 -2
  86. package/workspace/test-lists/run2-a.json +1 -2
  87. package/workspace/test-lists/run2-d.json +2 -19
  88. package/workspace/test-lists/run3-b.json +1 -2
  89. package/workspace/test-lists/run3-c.json +2 -12
  90. package/workspace/test-lists/run4-b.json +1 -2
  91. package/workspace/test-lists/run4-d.json +1 -5
  92. package/workspace/test-lists/run5-c.json +1 -11
  93. package/workspace/test-lists/run6.json +1 -5
  94. package/workspace/test-lists/workspace-launch-flags.json +2 -12
  95. package/workspace/test-lists/workspace-profile-detection.json +2 -10
  96. package/workspace/test-timings.json +242 -123
  97. package/workspace/c3-briefing-test.js +0 -136
  98. package/workspace/c3-core-docs-test.js +0 -170
  99. package/workspace/c3-driver-fixture.js +0 -64
  100. package/workspace/c3-driver-test.js +0 -169
  101. package/workspace/c3-foundation-test.js +0 -163
  102. package/workspace/c3-ib-items-test.js +0 -114
  103. package/workspace/c3-ib-more-test.js +0 -146
  104. package/workspace/c3-ib-triage-backlog-test.js +0 -128
  105. package/workspace/c3-ini-harness.js +0 -66
  106. package/workspace/c3-ini-life-test.js +0 -167
  107. package/workspace/c3-initiatives-test.js +0 -186
  108. package/workspace/c3-light-load-test.js +0 -112
  109. package/workspace/c3-one-home-test.js +0 -149
  110. package/workspace/c3-phone-test.js +0 -289
  111. package/workspace/c3-quiet-test.js +0 -157
  112. package/workspace/c3-report-design-real-test.js +0 -264
  113. package/workspace/c3-report-design-test.js +0 -442
  114. package/workspace/c3-report-setup-test.js +0 -192
  115. package/workspace/c3-report-structure-real-test.js +0 -248
  116. package/workspace/c3-report-structure-test.js +0 -397
  117. package/workspace/c3-reports-test.js +0 -288
  118. package/workspace/c3-scan-test.js +0 -517
  119. package/workspace/c3-sessions-panel-test.js +0 -365
  120. package/workspace/c3-settings-test.js +0 -204
  121. package/workspace/c3-updates-test.js +0 -131
  122. package/workspace/c3-work-test.js +0 -260
  123. package/workspace/cut-stub.js +0 -40
  124. package/workspace/first-paint-audit.js +0 -160
  125. package/workspace/lib/c3-full-console.js +0 -15
  126. package/workspace/lib/engine/derived/trust.js +0 -3
  127. package/workspace/lib/engine/plan-forecast.js +0 -342
  128. package/workspace/lib/engine/report-families.js +0 -175
  129. package/workspace/lib/engine/truth-table.js +0 -57
  130. package/workspace/lib/routes-c3-init.js +0 -54
  131. package/workspace/lib/routes-c3-life.js +0 -120
  132. package/workspace/lib/routes-c3-timeline.js +0 -192
  133. package/workspace/lib/routes-forecast.js +0 -86
  134. package/workspace/lib/routes-releases.js +0 -130
  135. package/workspace/lib/routes-report-facts.js +0 -85
  136. package/workspace/lib/routes-report-families.js +0 -33
  137. package/workspace/lib/routes-signals.js +0 -51
  138. package/workspace/lib/routes-timeline.js +0 -197
  139. package/workspace/public/c3.html +0 -35
  140. package/workspace/public/index.html +0 -156
  141. package/workspace/public/pm/app.js +0 -831
  142. package/workspace/public/pm/bd-board.js +0 -159
  143. package/workspace/public/pm/bd-drag.js +0 -59
  144. package/workspace/public/pm/bd-model.js +0 -152
  145. package/workspace/public/pm/bd-timeline.js +0 -233
  146. package/workspace/public/pm/bd-tree.js +0 -244
  147. package/workspace/public/pm/board-copy.js +0 -59
  148. package/workspace/public/pm/board-read.js +0 -38
  149. package/workspace/public/pm/branches-sheet.js +0 -56
  150. package/workspace/public/pm/breakdown-api.js +0 -58
  151. package/workspace/public/pm/breakdown-copy.js +0 -138
  152. package/workspace/public/pm/briefing-deck.js +0 -441
  153. package/workspace/public/pm/briefing-model.js +0 -251
  154. package/workspace/public/pm/c3-ambient.js +0 -100
  155. package/workspace/public/pm/c3-audience-link.js +0 -21
  156. package/workspace/public/pm/c3-audience.js +0 -46
  157. package/workspace/public/pm/c3-boot.js +0 -13
  158. package/workspace/public/pm/c3-breakdown.js +0 -240
  159. package/workspace/public/pm/c3-brief-data.js +0 -11
  160. package/workspace/public/pm/c3-brief-mentions.js +0 -137
  161. package/workspace/public/pm/c3-brief-needs.js +0 -288
  162. package/workspace/public/pm/c3-brief-pulse.js +0 -112
  163. package/workspace/public/pm/c3-brief-summary.js +0 -139
  164. package/workspace/public/pm/c3-brief-today.js +0 -79
  165. package/workspace/public/pm/c3-brief.js +0 -279
  166. package/workspace/public/pm/c3-cal-strategy.js +0 -529
  167. package/workspace/public/pm/c3-calendar.js +0 -965
  168. package/workspace/public/pm/c3-calpop.js +0 -111
  169. package/workspace/public/pm/c3-case.js +0 -196
  170. package/workspace/public/pm/c3-core-docs.css +0 -18
  171. package/workspace/public/pm/c3-core-docs.js +0 -236
  172. package/workspace/public/pm/c3-daypart.js +0 -176
  173. package/workspace/public/pm/c3-demo-boards.js +0 -764
  174. package/workspace/public/pm/c3-demo-brief-ix.js +0 -350
  175. package/workspace/public/pm/c3-demo-brief-page.js +0 -70
  176. package/workspace/public/pm/c3-demo-cal-ix.js +0 -74
  177. package/workspace/public/pm/c3-demo-cal2.js +0 -66
  178. package/workspace/public/pm/c3-demo-cal3.js +0 -173
  179. package/workspace/public/pm/c3-demo-cal4.js +0 -169
  180. package/workspace/public/pm/c3-demo-cal5.js +0 -52
  181. package/workspace/public/pm/c3-demo-coredocs.js +0 -221
  182. package/workspace/public/pm/c3-demo-data.js +0 -552
  183. package/workspace/public/pm/c3-demo-focus.js +0 -181
  184. package/workspace/public/pm/c3-demo-init.js +0 -430
  185. package/workspace/public/pm/c3-demo-life.js +0 -77
  186. package/workspace/public/pm/c3-demo-material.js +0 -58
  187. package/workspace/public/pm/c3-demo-misc2.js +0 -34
  188. package/workspace/public/pm/c3-demo-phone.js +0 -48
  189. package/workspace/public/pm/c3-demo-plan2.js +0 -30
  190. package/workspace/public/pm/c3-demo-rd.js +0 -432
  191. package/workspace/public/pm/c3-demo-rep-ix.js +0 -126
  192. package/workspace/public/pm/c3-demo-rep2.js +0 -130
  193. package/workspace/public/pm/c3-demo-rep3.js +0 -138
  194. package/workspace/public/pm/c3-demo-rs.js +0 -287
  195. package/workspace/public/pm/c3-demo-term.js +0 -153
  196. package/workspace/public/pm/c3-demo-time.js +0 -49
  197. package/workspace/public/pm/c3-demo-work-ix.js +0 -32
  198. package/workspace/public/pm/c3-demo.js +0 -131
  199. package/workspace/public/pm/c3-design-studio.js +0 -369
  200. package/workspace/public/pm/c3-doc-formats.js +0 -153
  201. package/workspace/public/pm/c3-doc-sheet.js +0 -1230
  202. package/workspace/public/pm/c3-dock.js +0 -206
  203. package/workspace/public/pm/c3-docs.js +0 -291
  204. package/workspace/public/pm/c3-driver-work.js +0 -110
  205. package/workspace/public/pm/c3-driver.css +0 -18
  206. package/workspace/public/pm/c3-driver.js +0 -298
  207. package/workspace/public/pm/c3-focus.css +0 -304
  208. package/workspace/public/pm/c3-focus.js +0 -983
  209. package/workspace/public/pm/c3-ib-docs.js +0 -92
  210. package/workspace/public/pm/c3-ib-initiatives.js +0 -201
  211. package/workspace/public/pm/c3-ib-items.js +0 -210
  212. package/workspace/public/pm/c3-ib-releases.js +0 -48
  213. package/workspace/public/pm/c3-ib-sprints.js +0 -201
  214. package/workspace/public/pm/c3-ib-triage.js +0 -177
  215. package/workspace/public/pm/c3-ii-tabs.js +0 -252
  216. package/workspace/public/pm/c3-ini-life.css +0 -34
  217. package/workspace/public/pm/c3-ini-life.js +0 -379
  218. package/workspace/public/pm/c3-ini-records.js +0 -197
  219. package/workspace/public/pm/c3-ini-timeline.js +0 -278
  220. package/workspace/public/pm/c3-ini-work.js +0 -139
  221. package/workspace/public/pm/c3-init-extras.js +0 -170
  222. package/workspace/public/pm/c3-initiatives.js +0 -852
  223. package/workspace/public/pm/c3-lifecycle-panels.js +0 -479
  224. package/workspace/public/pm/c3-look.js +0 -27
  225. package/workspace/public/pm/c3-material.css +0 -22
  226. package/workspace/public/pm/c3-material.js +0 -321
  227. package/workspace/public/pm/c3-md.js +0 -3
  228. package/workspace/public/pm/c3-misc-panels.js +0 -89
  229. package/workspace/public/pm/c3-new-session.js +0 -110
  230. package/workspace/public/pm/c3-notes.js +0 -751
  231. package/workspace/public/pm/c3-phone-boot.js +0 -47
  232. package/workspace/public/pm/c3-phone-detail.js +0 -97
  233. package/workspace/public/pm/c3-phone-model.js +0 -3
  234. package/workspace/public/pm/c3-phone.css +0 -66
  235. package/workspace/public/pm/c3-phone.js +0 -444
  236. package/workspace/public/pm/c3-plan-panels.js +0 -163
  237. package/workspace/public/pm/c3-plan.js +0 -193
  238. package/workspace/public/pm/c3-quiet.css +0 -113
  239. package/workspace/public/pm/c3-quiet.js +0 -177
  240. package/workspace/public/pm/c3-replay.css +0 -133
  241. package/workspace/public/pm/c3-replay.js +0 -429
  242. package/workspace/public/pm/c3-report-deck.css +0 -163
  243. package/workspace/public/pm/c3-report-deck.js +0 -598
  244. package/workspace/public/pm/c3-report-frame.css +0 -20
  245. package/workspace/public/pm/c3-report-print.css +0 -20
  246. package/workspace/public/pm/c3-report-setup.css +0 -67
  247. package/workspace/public/pm/c3-report-setup.js +0 -298
  248. package/workspace/public/pm/c3-report-store.js +0 -244
  249. package/workspace/public/pm/c3-report-structure.css +0 -44
  250. package/workspace/public/pm/c3-report-structure.js +0 -473
  251. package/workspace/public/pm/c3-reports.css +0 -68
  252. package/workspace/public/pm/c3-reports.js +0 -377
  253. package/workspace/public/pm/c3-roadmap.js +0 -249
  254. package/workspace/public/pm/c3-scan-api.js +0 -167
  255. package/workspace/public/pm/c3-scan-next.js +0 -248
  256. package/workspace/public/pm/c3-scan-setup.js +0 -313
  257. package/workspace/public/pm/c3-scan-words.js +0 -41
  258. package/workspace/public/pm/c3-scan.css +0 -74
  259. package/workspace/public/pm/c3-scan.js +0 -93
  260. package/workspace/public/pm/c3-session-chat.js +0 -103
  261. package/workspace/public/pm/c3-session-conv.js +0 -165
  262. package/workspace/public/pm/c3-session-term.js +0 -216
  263. package/workspace/public/pm/c3-settings.css +0 -85
  264. package/workspace/public/pm/c3-settings.js +0 -1045
  265. package/workspace/public/pm/c3-shell.js +0 -628
  266. package/workspace/public/pm/c3-signals.js +0 -196
  267. package/workspace/public/pm/c3-strategy-panels.js +0 -45
  268. package/workspace/public/pm/c3-swipe.js +0 -230
  269. package/workspace/public/pm/c3-terminal-data.js +0 -48
  270. package/workspace/public/pm/c3-terminal-edge.js +0 -91
  271. package/workspace/public/pm/c3-terminal-icons.js +0 -40
  272. package/workspace/public/pm/c3-terminal-results.js +0 -141
  273. package/workspace/public/pm/c3-terminal.js +0 -52
  274. package/workspace/public/pm/c3-tickets.js +0 -163
  275. package/workspace/public/pm/c3-timeline.js +0 -201
  276. package/workspace/public/pm/calendar-views.js +0 -1049
  277. package/workspace/public/pm/console3-lift.md +0 -220
  278. package/workspace/public/pm/cozy-home.js +0 -172
  279. package/workspace/public/pm/cozy-initiative.css +0 -138
  280. package/workspace/public/pm/cycle-review.js +0 -125
  281. package/workspace/public/pm/data.js +0 -1577
  282. package/workspace/public/pm/dest-board.js +0 -444
  283. package/workspace/public/pm/dest-docs.js +0 -530
  284. package/workspace/public/pm/dest-initiatives.js +0 -162
  285. package/workspace/public/pm/dest-mywork.js +0 -307
  286. package/workspace/public/pm/dest-notes.js +0 -537
  287. package/workspace/public/pm/dest-people.js +0 -449
  288. package/workspace/public/pm/dest-reports.js +0 -383
  289. package/workspace/public/pm/dest-settings.js +0 -601
  290. package/workspace/public/pm/dest-today.js +0 -267
  291. package/workspace/public/pm/display-word.js +0 -56
  292. package/workspace/public/pm/doc-editor.js +0 -473
  293. package/workspace/public/pm/doc-graph.js +0 -272
  294. package/workspace/public/pm/doc-health-panel.js +0 -110
  295. package/workspace/public/pm/doc-rail.js +0 -167
  296. package/workspace/public/pm/doc-remote.js +0 -180
  297. package/workspace/public/pm/dock-sessions.js +0 -472
  298. package/workspace/public/pm/dock.js +0 -216
  299. package/workspace/public/pm/fixture.js +0 -821
  300. package/workspace/public/pm/flag-picker.js +0 -104
  301. package/workspace/public/pm/frame-copy.js +0 -278
  302. package/workspace/public/pm/freshness-line.js +0 -149
  303. package/workspace/public/pm/handoff-box.js +0 -82
  304. package/workspace/public/pm/initiative-list.js +0 -235
  305. package/workspace/public/pm/initiative-sheet.js +0 -331
  306. package/workspace/public/pm/initiatives-api.js +0 -95
  307. package/workspace/public/pm/initiatives-copy.js +0 -287
  308. package/workspace/public/pm/initiatives-timeline-copy.js +0 -59
  309. package/workspace/public/pm/initiatives-timeline.js +0 -410
  310. package/workspace/public/pm/initiatives-ui.js +0 -291
  311. package/workspace/public/pm/item-sheet.js +0 -268
  312. package/workspace/public/pm/keep-card.js +0 -204
  313. package/workspace/public/pm/lifecycle-lens-model.js +0 -246
  314. package/workspace/public/pm/lifecycle-lens.js +0 -276
  315. package/workspace/public/pm/lifecycle.js +0 -111
  316. package/workspace/public/pm/mobile.css +0 -366
  317. package/workspace/public/pm/mobile.js +0 -581
  318. package/workspace/public/pm/modes-live.js +0 -453
  319. package/workspace/public/pm/modes.js +0 -147
  320. package/workspace/public/pm/my-work-card.js +0 -51
  321. package/workspace/public/pm/my-work-data.js +0 -36
  322. package/workspace/public/pm/new-initiative-sheet.js +0 -169
  323. package/workspace/public/pm/next-step-ui.js +0 -190
  324. package/workspace/public/pm/outbox-panel.js +0 -125
  325. package/workspace/public/pm/palette-copy.js +0 -55
  326. package/workspace/public/pm/palette.js +0 -343
  327. package/workspace/public/pm/panel-breakdown.js +0 -702
  328. package/workspace/public/pm/panel-cockpit.js +0 -425
  329. package/workspace/public/pm/panel-detail.js +0 -1513
  330. package/workspace/public/pm/panel-initiatives.js +0 -929
  331. package/workspace/public/pm/panel-newsess.js +0 -709
  332. package/workspace/public/pm/panel-repos.js +0 -741
  333. package/workspace/public/pm/panel-tabs.js +0 -1506
  334. package/workspace/public/pm/panel-trees.js +0 -204
  335. package/workspace/public/pm/people-link.js +0 -106
  336. package/workspace/public/pm/phone-deck.js +0 -167
  337. package/workspace/public/pm/pm-work-view.js +0 -1533
  338. package/workspace/public/pm/portfolio-report.js +0 -61
  339. package/workspace/public/pm/premium-acts.js +0 -280
  340. package/workspace/public/pm/premium-brief.js +0 -111
  341. package/workspace/public/pm/premium-chat.js +0 -22
  342. package/workspace/public/pm/premium-doc-sheet.js +0 -312
  343. package/workspace/public/pm/premium-initiative.js +0 -324
  344. package/workspace/public/pm/premium-insights.css +0 -228
  345. package/workspace/public/pm/premium-metric-tiles.js +0 -68
  346. package/workspace/public/pm/premium-report-brief.js +0 -132
  347. package/workspace/public/pm/premium-vw-rec.js +0 -67
  348. package/workspace/public/pm/premium-wide.css +0 -30
  349. package/workspace/public/pm/print.css +0 -44
  350. package/workspace/public/pm/provider-cards.js +0 -136
  351. package/workspace/public/pm/registry.js +0 -203
  352. package/workspace/public/pm/release-card.js +0 -110
  353. package/workspace/public/pm/releases-view.js +0 -248
  354. package/workspace/public/pm/report-families-view.js +0 -505
  355. package/workspace/public/pm/report-slides.js +0 -438
  356. package/workspace/public/pm/report-tab.js +0 -33
  357. package/workspace/public/pm/report-view.js +0 -337
  358. package/workspace/public/pm/reports-copy.js +0 -134
  359. package/workspace/public/pm/roadmap.js +0 -294
  360. package/workspace/public/pm/run-card.js +0 -260
  361. package/workspace/public/pm/sessions-panel.js +0 -219
  362. package/workspace/public/pm/sheet-jira.js +0 -353
  363. package/workspace/public/pm/shell-bell.js +0 -163
  364. package/workspace/public/pm/shell-model.js +0 -83
  365. package/workspace/public/pm/shell-phone.js +0 -124
  366. package/workspace/public/pm/shell-readaloud.js +0 -53
  367. package/workspace/public/pm/shell-recording.js +0 -274
  368. package/workspace/public/pm/shell-ticker.js +0 -90
  369. package/workspace/public/pm/sig-watch.js +0 -41
  370. package/workspace/public/pm/slide-confirm.js +0 -163
  371. package/workspace/public/pm/slides-copy.js +0 -52
  372. package/workspace/public/pm/status-banner.js +0 -95
  373. package/workspace/public/pm/tab-doc.js +0 -859
  374. package/workspace/public/pm/tab-gone.js +0 -21
  375. package/workspace/public/pm/tab-term.js +0 -1210
  376. package/workspace/public/pm/tab-web.js +0 -90
  377. package/workspace/public/pm/timeline-copy.js +0 -48
  378. package/workspace/public/pm/timeline-forecast-view.js +0 -164
  379. package/workspace/public/pm/today-agenda.js +0 -331
  380. package/workspace/public/pm/today-cards.js +0 -244
  381. package/workspace/public/pm/today-copy.js +0 -506
  382. package/workspace/public/pm/today-day.js +0 -1371
  383. package/workspace/public/pm/today-goals.js +0 -297
  384. package/workspace/public/pm/today-jobs.js +0 -84
  385. package/workspace/public/pm/today-mentions.js +0 -50
  386. package/workspace/public/pm/topbar.js +0 -202
  387. package/workspace/public/pm/triage-card.js +0 -60
  388. package/workspace/public/pm/undo-hold.js +0 -103
  389. package/workspace/public/pm/view-addrepo.js +0 -208
  390. package/workspace/public/pm/view-files.js +0 -197
  391. package/workspace/public/pm/view-livenotes.js +0 -399
  392. package/workspace/public/pm/view-today.js +0 -13
  393. package/workspace/public/pm/view-validate.js +0 -171
  394. package/workspace/public/pm/welcome.js +0 -391
  395. package/workspace/public/pm/work-place.js +0 -68
  396. package/workspace/public/pm/xlsx-read.js +0 -117
  397. package/workspace/public/welcome.html +0 -22
  398. package/workspace/test-lists/browser-suites-green.json +0 -5
  399. package/workspace/test-lists/c3-core-docs.json +0 -9
  400. package/workspace/test-lists/c3-doc-sheet-rich.json +0 -6
  401. package/workspace/test-lists/c3-doc-sheet-size.json +0 -6
  402. package/workspace/test-lists/c3-doc-sheet-v2.json +0 -6
  403. package/workspace/test-lists/c3-ib-items.json +0 -9
  404. package/workspace/test-lists/c3-ib-more.json +0 -9
  405. package/workspace/test-lists/c3-ib-triage-backlog.json +0 -9
  406. package/workspace/test-lists/c3-ini-life.json +0 -9
  407. package/workspace/test-lists/c3-meeting-board.json +0 -5
  408. package/workspace/test-lists/c3-meeting-card.json +0 -5
  409. package/workspace/test-lists/c3-notes-place.json +0 -5
  410. package/workspace/test-lists/c3-notes-series.json +0 -5
  411. package/workspace/test-lists/calendar-time-page.json +0 -5
  412. package/workspace/test-lists/calpop.json +0 -4
  413. package/workspace/test-lists/console3-briefing.json +0 -9
  414. package/workspace/test-lists/console3-foundation.json +0 -9
  415. package/workspace/test-lists/console3-work-page.json +0 -9
  416. package/workspace/test-lists/premium-brief-parity.json +0 -9
  417. package/workspace/test-lists/report-design-studio-ui.json +0 -5
  418. package/workspace/test-lists/report-structure-ui.json +0 -11
  419. package/workspace/test-lists/report-workspace-ui.json +0 -5
  420. package/workspace/test-lists/run3-a.json +0 -5
  421. package/workspace/test-lists/run3-d.json +0 -6
  422. package/workspace/test-lists/run4-c.json +0 -13
  423. package/workspace/test-lists/today-goals-jobs-ui.json +0 -5
  424. package/workspace/test-lists/today-mentions-cards.json +0 -5
  425. package/workspace/test-lists/workspace-tabs-declutter.json +0 -13
@@ -1,203 +0,0 @@
1
- /* pm/registry.js — where the planning layer's page modules plug into the shell (pm-os-absorb Runs 2 to 5).
2
- *
3
- * Four runs add screens at once. If each one edited app.js, panel-cockpit.js, view-today.js and panel-tabs.js, every
4
- * merge would collide on the same lines. So the shell reads this registry once, in a few hook lines, and each run adds
5
- * its own module files.
6
- *
7
- * ── DESTINATIONS: the four places of PRD R9, plus ⚙ ─────────────────────────────────────────────────────────────────
8
- * Listed below before their modules exist. Run 3 (slice 3A) builds the frame that shows them as top-level places. Until
9
- * that frame is the default, each one opens as a tab in panel 4 (kind 'dest', its id in the tab's `view` field), from
10
- * ⌘K or from `window.pmApp.open(id)`. Wherever it is drawn, its host carries data-dest="<id>" (mountDestTab sets it; the
11
- * frame mounts through mountDestTab too). A DESTINATION MODULE exports:
12
- * mountDestination(host, ctx) called on EVERY render with the same host element. Idempotent: keep one persistent
13
- * root per host, rebuild only when its own data changed, never while a drag is live.
14
- * disposeDestination(host) optional; the tab closed or the frame let go of the host.
15
- * ctx = { state, setState, FIXTURE, tab, openInitiative }
16
- *
17
- * ── EXTENSIONS: modules that only register ──────────────────────────────────────────────────────────────────────────
18
- * Loaded at boot with the destinations, so a view or a Today source is in place before its host renders.
19
- *
20
- * ── THE REGISTRIES (call these from your own module, at import time) ─────────────────────────────────────────────────
21
- * registerTodaySource({ id, kind, rank, cards(ctx) → Element[], count(ctx) → number })
22
- * kind is the R12 card kind (1 to 8); rank orders sources inside Today (lower first). ctx = { all, repos,
23
- * setState, open(repo, slug) }. count must equal cards().length for the same ctx: the nav badge and Today's
24
- * header add the counts, and they must agree (Run 1 finding F8).
25
- * registerTodayCard(rowKind, render(row, ctx) → Element)
26
- * how ONE needs-row kind of a server provider (lib/needs-providers.js) is drawn on Today. The rows themselves come
27
- * from /api/needs through provider-cards.js, the one Today source for every provider row, so the count is the
28
- * server's row count and a run never counts its rows twice. A kind with no renderer is drawn from its `today`
29
- * payload (cause, evidence, act). Use registerTodaySource only for a card the page computes itself.
30
- * registerCommand({ id, label, hint, cli, run(), when() }) a ⌘K row; `cli` is the same act's CLI form (R11)
31
- * registerBreakdownView(id, { label, mount(host, ctx), dispose(host) }) a Breakdown view next to Tree and Board
32
- * registerInitiativesView(id, { label, mount(host, ctx), dispose(host) }) a view in Initiatives (Roadmap, List, …)
33
- * ctx is ALWAYS initiativesViewCtx(…): { repo, ws, rows, sig, openInitiative, setState } — rows = the roadmap.json
34
- * horizons rows (fixtures/initiatives-api/roadmap.json), sig = that GET's sig. 2D builds it; 4C reads it.
35
- * setInitiativeOpener(fn) Run 2 points openInitiative at the initiative sheet; nobody else calls it
36
- * openInitiative(repo, slug) the one way to open an initiative from any module
37
- * An id registered twice keeps the first and logs an error: two runs must not claim one id.
38
- *
39
- * Fixture mode (the parity boards) loads nothing and registers nothing, so the prototype renders are unchanged.
40
- */
41
-
42
- import { state, setState, FIXTURE } from './state.js';
43
- import { pmGet } from './http.js';
44
- import { empty, ensureComponentsCss } from './primitives.js';
45
-
46
- export const DESTINATIONS = Object.freeze([
47
- Object.freeze({ id: 'today', label: 'Agenda', key: 'g t', module: 'dest-today.js', run: 3 }),
48
- // Not a pm-os-absorb run (run: null): initiative my-work added it — the work assigned to the PM, ranked and briefed.
49
- Object.freeze({ id: 'mywork', label: 'My work', key: 'g w', module: 'dest-mywork.js', run: null }),
50
- Object.freeze({ id: 'initiatives', label: 'Initiatives', key: 'g i', module: 'dest-initiatives.js', run: 2 }),
51
- Object.freeze({ id: 'board', label: 'Board', key: 'g b', module: 'dest-board.js', run: 4 }),
52
- Object.freeze({ id: 'reports', label: 'Reports', key: 'g r', module: 'dest-reports.js', run: 5 }),
53
- // Not a pm-os-absorb run (run: null): docs-three-way-sync added it — is each linked document the same as its copies.
54
- Object.freeze({ id: 'docs', label: 'Docs', key: 'g d', module: 'dest-docs.js', run: null }),
55
- // Not a pm-os-absorb run (run: null): people-directory added it — the people the PM works with in a repository.
56
- // Not a pm-os-absorb run (run: null): meeting-notes Run 12 added it — every meeting note by initiative, and the note.
57
- Object.freeze({ id: 'notes', label: 'Notes', key: 'g n', module: 'dest-notes.js', run: null }),
58
- Object.freeze({ id: 'people', label: 'People', key: 'g p', module: 'dest-people.js', run: null }),
59
- Object.freeze({ id: 'settings', label: 'Settings', key: null, module: 'dest-settings.js', run: 3 }),
60
- ]);
61
- export const EXTENSIONS = Object.freeze([
62
- 'provider-cards.js', // the base: every needs provider's rows as Today cards (Run 3, 3B, owns it after)
63
- 'bd-timeline.js', // Run 4 (4B): Breakdown › Timeline
64
- 'initiatives-timeline.js', // Run 4 (4C): Initiatives › Timeline
65
- 'my-work-card.js', // initiative my-work: Agenda's one card for the items that need a brief
66
- ]);
67
-
68
- const loaded = {}; // module file name -> the module
69
- const loadErrors = {}; // module file name -> why it did not load
70
- const todaySources = [];
71
- const commandList = [];
72
- const bdViews = [];
73
- const initViews = [];
74
- const rowCards = new Map(); // needs-row kind -> render(row, ctx)
75
- let opener = null;
76
-
77
- const dup = (list, id, what) => {
78
- if (!list.some((x) => x.id === id)) return false;
79
- console.error('[pm] ' + what + ' ' + id + ' is registered twice; the first one is kept');
80
- return true;
81
- };
82
-
83
- export function registerTodaySource(src) {
84
- if (FIXTURE || !src || typeof src.id !== 'string' || typeof src.cards !== 'function' || dup(todaySources, src.id, 'Today source')) return;
85
- todaySources.push({ rank: 100, count: (ctx) => src.cards(ctx).length, ...src });
86
- todaySources.sort((a, b) => a.rank - b.rank || (a.id < b.id ? -1 : 1));
87
- }
88
- export function registerTodayCard(rowKind, render) {
89
- if (FIXTURE || typeof rowKind !== 'string' || typeof render !== 'function') return;
90
- if (rowCards.has(rowKind)) { console.error('[pm] Today card ' + rowKind + ' is registered twice; the first one is kept'); return; }
91
- rowCards.set(rowKind, render);
92
- }
93
- export function registerCommand(cmd) {
94
- if (FIXTURE || !cmd || typeof cmd.id !== 'string' || typeof cmd.run !== 'function' || dup(commandList, cmd.id, 'command')) return;
95
- commandList.push(cmd);
96
- }
97
- export function registerBreakdownView(id, view) {
98
- if (FIXTURE || typeof id !== 'string' || !view || typeof view.mount !== 'function' || dup(bdViews, id, 'Breakdown view')) return;
99
- bdViews.push({ id, ...view });
100
- }
101
- export function registerInitiativesView(id, view) {
102
- if (FIXTURE || typeof id !== 'string' || !view || typeof view.mount !== 'function' || dup(initViews, id, 'Initiatives view')) return;
103
- initViews.push({ id, ...view });
104
- }
105
- /** The frozen keys of an Initiatives view's mount ctx, and the one way to build it (a missing key is null). */
106
- export const INITIATIVES_VIEW_CTX_KEYS = Object.freeze(['repo', 'ws', 'rows', 'sig', 'openInitiative', 'setState']);
107
- export function initiativesViewCtx(src) {
108
- const o = {};
109
- for (const k of INITIATIVES_VIEW_CTX_KEYS) o[k] = src && src[k] !== undefined ? src[k] : null;
110
- return Object.freeze(o);
111
- }
112
- export function setInitiativeOpener(fn) { if (typeof fn === 'function') opener = fn; }
113
-
114
- export function openInitiative(repo, slug) {
115
- if (opener) return opener(repo, slug);
116
- const repos = typeof window !== 'undefined' && window.pmApp && window.pmApp.mods ? window.pmApp.mods.repos : null;
117
- if (repos && typeof repos.selectRepo === 'function' && repo) repos.selectRepo(repo);
118
- setState({ sel: slug, detail: { kind: 'init' }, col2: true });
119
- }
120
-
121
- /* ── readers, for the shell's hook lines ───────────────────────────────────────────────────────────────────────────── */
122
-
123
- const safe = (what, fn, fallback) => { try { return fn(); } catch (e) { console.error('[pm] ' + what + ' failed:', e); return fallback; } };
124
- export const todayCards = (ctx) => (FIXTURE ? [] : todaySources.flatMap((s) => safe('Today source ' + s.id, () => s.cards(ctx) || [], [])));
125
- export const todayCount = (ctx) => (FIXTURE ? 0 : todaySources.reduce((n, s) => n + safe('Today source ' + s.id, () => Number(s.count(ctx)) || 0, 0), 0));
126
- export const commands = () => commandList.filter((c) => !c.when || safe('command ' + c.id, () => !!c.when(), false));
127
- /** The renderer registered for a needs-row kind, or null (provider-cards.js then draws the row's `today` payload). */
128
- export const todayCardFor = (rowKind) => rowCards.get(rowKind) || null;
129
- export const breakdownViews = () => bdViews.slice();
130
- export const initiativesViews = () => initViews.slice();
131
- /** The destinations whose module is loaded, in order. */
132
- export const destinations = () => DESTINATIONS.filter((d) => loaded[d.module]);
133
- export const extensionErrors = () => ({ ...loadErrors });
134
-
135
- /** Load every listed module that is on disk (the server says which: GET /api/pm-modules), once, at boot. */
136
- let loading = null;
137
- export function loadExtensions() {
138
- if (FIXTURE) return Promise.resolve();
139
- if (loading) return loading;
140
- const want = [...DESTINATIONS.map((d) => d.module), ...EXTENSIONS];
141
- loading = (async () => {
142
- const j = await pmGet('/api/pm-modules?want=' + encodeURIComponent(want.join(',')));
143
- const present = Array.isArray(j && j.present) ? j.present.filter((n) => want.includes(n)) : [];
144
- await Promise.all(present.map(async (name) => {
145
- try { loaded[name] = await import('./' + name); }
146
- catch (e) { loadErrors[name] = String((e && e.message) || e); console.error('[pm] ' + name + ' failed to load:', e); }
147
- }));
148
- })();
149
- return loading;
150
- }
151
-
152
- /* ── the home of a destination: the frame, or (outside it) a tab in panel 4 ────────────────────────────────────────── */
153
-
154
- const tabId = (id) => 'dest:' + id;
155
- const hosts = new Map(); // tab id -> { host, mod }
156
- let frameHome = null; // set by app.js when the frame is on (Run 3, slice 3A)
157
-
158
- /** app.js (the frame): from now on a destination opens as a top-level place of the frame, not as a panel-4 tab. */
159
- export function setFrameHome(fn) { frameHome = typeof fn === 'function' ? fn : null; }
160
-
161
- /** Open destination `id`: in the frame, as the place on screen; outside it (fixture mode does not load this module, so
162
- * this is ?layout=legacy), as a panel-4 tab, opened or focused. `params` may carry { repo, slug } for a destination that
163
- * opens on one. Returns false for an id that names no destination. */
164
- export function openDestination(id, params) {
165
- const d = DESTINATIONS.find((x) => x.id === id);
166
- if (!d) return false;
167
- if (frameHome) return frameHome(id, params || {}) !== false;
168
- const p = params || {};
169
- const tid = tabId(id);
170
- setState((s) => {
171
- const tabs = s.tabs || [];
172
- const tab = { id: tid, kind: 'dest', view: id, title: d.label, role: d.label.toLowerCase(), repo: p.repo || null, slug: p.slug || null };
173
- return { tabs: tabs.some((t) => t.id === tid) ? tabs.map((t) => (t.id === tid ? { ...t, repo: tab.repo, slug: tab.slug } : t)) : [...tabs, tab], active: tid };
174
- });
175
- return true;
176
- }
177
-
178
- /** Draw destination `tab.view` into its persistent host: the frame's host for that place (tab id 'frame:<id>'), or a
179
- * 'dest' tab's pane (panel-tabs.js paneFor). The frame's tab also carries `scope`: 'repo', or 'all' when Repository ▾ is
180
- * on All repositories (then `repo` is null). */
181
- export function mountDestTab(host, tab) {
182
- const d = DESTINATIONS.find((x) => x.id === tab.view);
183
- host.setAttribute('data-dest', tab.view || ''); // the one hook a test finds a destination by, in a tab or the frame
184
- const mod = d ? loaded[d.module] : null;
185
- if (!mod || typeof mod.mountDestination !== 'function') {
186
- const text = !d ? 'This tab names no destination.'
187
- : loadErrors[d.module] ? d.label + ' could not load: ' + loadErrors[d.module]
188
- : d.label + ' arrives in Run ' + d.run + '.';
189
- ensureComponentsCss();
190
- host.replaceChildren(empty({ text, attrs: { 'data-dest-missing': tab.view || '' } }));
191
- return;
192
- }
193
- hosts.set(tab.id, { host, mod });
194
- safe('destination ' + d.id, () => mod.mountDestination(host, { state, setState, FIXTURE, tab, openInitiative }), null);
195
- }
196
-
197
- /** panel-tabs.js reapClosedPanes: the tab closed. */
198
- export function disposeDestTab(id) {
199
- const h = hosts.get(id);
200
- if (!h) return;
201
- hosts.delete(id);
202
- if (typeof h.mod.disposeDestination === 'function') safe('dispose ' + id, () => h.mod.disposeDestination(h.host), null);
203
- }
@@ -1,110 +0,0 @@
1
- /* pm/release-card.js — the Release card, on the Board and on Today (pm-os-absorb Run 4, slice 4D; PRD R12 kind 4, D86 point 2).
2
- *
3
- * releaseButton({ ws, initiative, batch, items, onDone }) the one Release button; a press posts /api/board/release
4
- * releaseCard(release, { ws, onDone }) one ready batch as a card, for the Board
5
- * grantScopes(onReady) the scopes a press can grant now, or null until they are read
6
- *
7
- * Importing this file registers the Today renderers for the needs-row kinds of lib/work-check-needs.js (registry.js
8
- * registerTodayCard): `release`, `item-review` and `item-no-evidence`, so dest-board.js imports it and the cards exist at
9
- * boot. An item row shows the item's title (the row's question) and opens the initiative that holds it. A Release is the PM's press: the page sends the press with
10
- * pmPost, which carries the page's Origin (and, from Run 2, the launch nonce). The server mints ONE grant for the whole
11
- * batch. Nothing here writes a record or starts a factory run, and the button never acts on its own.
12
- *
13
- * Until the grant writer is merged, /api/pm-modules lists no `release` scope. The button then shows disabled, with
14
- * "Release arrives in Run 2." beside it, so a press is never made to fail on purpose.
15
- */
16
-
17
- import { el } from './dom.js';
18
- import { button, card, toast, ensureComponentsCss } from './primitives.js';
19
- import { pmGet, pmPost } from './http.js';
20
- import { FIXTURE, setState } from './state.js';
21
- import { registerTodayCard } from './registry.js';
22
- import { COPY } from './board-copy.js';
23
-
24
- let scopes = null;
25
- let reading = false;
26
- const waiting = [];
27
-
28
- /** The grant scopes a press can mint now (GET /api/pm-modules), or null until the first read ends. */
29
- export function grantScopes(onReady) {
30
- if (scopes) return scopes;
31
- if (typeof onReady === 'function') waiting.push(onReady);
32
- if (!reading && !FIXTURE) {
33
- reading = true;
34
- pmGet('/api/pm-modules?want=').then((j) => {
35
- scopes = Array.isArray(j && j.grantScopes) ? j.grantScopes : [];
36
- reading = false;
37
- for (const fn of waiting.splice(0)) { try { fn(scopes); } catch (e) { console.error('[release-card]', e); } }
38
- setState({});
39
- });
40
- }
41
- return scopes;
42
- }
43
-
44
- /** True when the page knows the release scope cannot be granted yet. Unknown (not read) counts as grantable. */
45
- const notYet = () => Array.isArray(scopes) && !scopes.includes('release');
46
-
47
- /** One Release button. `onDone(out)` runs after a press that was granted. */
48
- export function releaseButton({ ws, initiative, batch, items, onDone } = {}) {
49
- const b = button({
50
- label: COPY.release.press, variant: 'outline', size: 'sm',
51
- attrs: { 'data-bo-release-press': `${initiative}:${batch}`, 'aria-label': COPY.release.pressLabel(initiative, batch) },
52
- disabled: notYet(),
53
- onClick: async () => {
54
- if (b.disabled) return;
55
- b.disabled = true;
56
- const out = await pmPost('/api/board/release', { ws, initiative, batch });
57
- if (!out || out.ok === false) {
58
- toast({ text: COPY.release.failed((out && out.error) || 'the server did not answer'), tone: 'error' });
59
- b.disabled = notYet();
60
- return;
61
- }
62
- toast({ text: COPY.release.pressed(out.items || items || 0) });
63
- if (onDone) onDone(out);
64
- },
65
- });
66
- return b;
67
- }
68
-
69
- /** One ready batch as a card: the initiative, the batch, how many work items, and the Release button. */
70
- export function releaseCard(r, { ws, onDone } = {}) {
71
- ensureComponentsCss();
72
- const waitingForRun = notYet();
73
- return el('div', { class: 'bo-rel', 'data-bo-release': `${r.initiative}:${r.batch}` },
74
- el('div', { class: 'bo-rel__main' },
75
- el('div', { class: 'bo-rel__title' }, COPY.release.title(r.initiativeTitle || r.initiative)),
76
- el('div', { class: 'bo-rel__meta' }, [COPY.release.batch(r.batch), COPY.release.items((r.items || []).length)].join(' · ')),
77
- waitingForRun ? el('div', { class: 'bo-rel__wait', 'data-bo-release-wait': '' }, COPY.release.waiting) : null),
78
- releaseButton({ ws, initiative: r.initiative, batch: r.batch, items: (r.items || []).length, onDone }));
79
- }
80
-
81
- /* Today: a needs row of kind `release` (lib/work-check-needs.js). Its run_id is work-check-needs:release:<initiative>:<batch>. */
82
- function todayRelease(row, ctx) {
83
- const m = /^work-check-needs:release:([^:]+):(.+)$/.exec(String(row.run_id || ''));
84
- if (!m) return null;
85
- const t = row.today && typeof row.today === 'object' ? row.today : {};
86
- grantScopes();
87
- return el('div', { class: 'bo-rel bo-rel--today', 'data-today-row': 'release', 'data-provider': row.provider || '', 'data-initiative': m[1] },
88
- el('div', { class: 'bo-rel__main' },
89
- el('div', { class: 'bo-rel__title', 'data-today-cause': '' }, row.question || t.cause || COPY.release.head),
90
- el('div', { class: 'bo-rel__meta' }, [m[1], COPY.release.batch(m[2])].join(' · ')),
91
- notYet() ? el('div', { class: 'bo-rel__wait', 'data-bo-release-wait': '' }, COPY.release.waiting) : null),
92
- releaseButton({ ws: (ctx && ctx.ws) || row.ws, initiative: m[1], batch: m[2], onDone: () => setState({}) }));
93
- }
94
- registerTodayCard('release', todayRelease);
95
-
96
- /* Today: an item row (item-review, item-no-evidence). The row's question names the item; the card opens its initiative. */
97
- function todayItem(row, ctx) {
98
- const t = row.today && typeof row.today === 'object' ? row.today : {};
99
- const slug = row.initiative_id || null;
100
- ensureComponentsCss();
101
- return card({
102
- title: row.question || t.cause || row.kind,
103
- meta: [t.cause, slug, t.evidence].filter(Boolean),
104
- onOpen: slug && ctx && ctx.open ? () => ctx.open(ctx.repo, slug) : undefined,
105
- openLabel: slug ? COPY.aria.open(row.question || slug) : undefined,
106
- attrs: { 'data-today-row': row.kind, 'data-provider': row.provider || '', 'data-initiative': slug || '' },
107
- });
108
- }
109
- registerTodayCard('item-review', todayItem);
110
- registerTodayCard('item-no-evidence', todayItem);
@@ -1,248 +0,0 @@
1
- /* pm/releases-view.js — the Releases view of Initiatives (console3 wave A4, read side; R4b: on the console3 mockup's own markup and CSS).
2
- *
3
- * Lifted from console3.html (the Releases view, lines 4867 to 4945): the lens header `.lh` (iniInfo, line 4941), `.brief.sbb > .bcols`, the list
4
- * `section.card.sect > .sh2 + ul.list` with a "New release" row (`.ki` with the soft accent and the plus) and one `li.nrow`
5
- * per release (`.ki`, `.nb > .tt + .chips` with initiative chips, `.tag` tags, date chips and `.st` flags, `.xp > .xi` with the
6
- * case file: `.case > .sit + .c3rel`), the create form as `.c3rel` (initiative pills, date and time `.c3dt` labels), the
7
- * tag detection line, the gap flags as `.chgl` rows and the summary lines with their source `.tag`. Styles: pm/console3.css.
8
- *
9
- * What is real: GET /api/releases (releases, their tags, gap flags, summary lines, acceptance) and the writes through pmPost
10
- * (/api/releases/create, /edit, /delete, /summary). A refused summary line is shown, not stored. There is no freeze warning here
11
- * until a rule exists, and a release never creates a Jira tag: the PM's acceptance comes first, and that is recorded, not
12
- * acted on. Not lifted: the mockup's invented releases and tags (C3.REL, C3.JV), the ticket table (the payload has no tickets),
13
- * "shipped" (acceptance is not shipping), the ready-to-ship checks, the freeze chip and its example rule, the sync-from-Jira
14
- * chips and demo buttons, the outward options (tag in Jira, update to a person, calendar hold: each needs the slide and the
15
- * outbox, and none exists for a release), the promises card and the "Jira release tags" bars (no ticket counts per tag).
16
- * Self-registers as the 'releases' Initiatives view, like Timeline. */
17
- import { el } from './dom.js';
18
- import { ensureComponentsCss } from './primitives.js';
19
- import { pmGet, pmPost } from './http.js';
20
- import { registerInitiativesView } from './registry.js';
21
- import { ensureC3Css, c3ic, c3ring, c3Phone } from './pm-work-view.js';
22
- import { card, hBars } from './c3-init-extras.js';
23
-
24
- const views = new WeakMap();
25
- const TYPES = [{ value: 'deploy', label: 'Deploy' }, { value: 'customer', label: 'Customer' }, { value: 'both', label: 'Deploy and customer' }];
26
- const SOURCES = ['fact', 'estimate', 'assumption', 'reported'];
27
- const FLAG_TEXT = { initiative_ticket_without_tag: 'Ticket without a release tag', tagged_ticket_without_initiative: 'Tagged ticket with no initiative' };
28
- const iso = (d, t) => (d ? new Date(d + 'T' + (t || '00:00')).toISOString() : null);
29
- const dim = (t, extra) => el('span', { class: 'dim mono', style: 'font-size:var(--fs-2)' + (extra || '') }, t);
30
- const when = (v) => (v ? v.replace('T', ' ').replace(/:\d\dZ$/, 'Z') : 'not set');
31
- const DOW = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; const MON = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
32
- /** The mockup's c3dfmt: "Thu 1 Oct, 12:00" in the viewer's time. */
33
- const dfmt = (v) => { const d = v ? new Date(v) : null; if (!d || isNaN(d)) return 'no date'; return DOW[d.getDay()] + ' ' + d.getDate() + ' ' + MON[d.getMonth()] + ', ' + String(d.getHours()).padStart(2, '0') + ':' + String(d.getMinutes()).padStart(2, '0'); };
34
- const nameOfRel = (V, r) => r.name || (r.initiative_ids.length ? r.initiative_ids.map((id) => titleOf(V, id)).join(' and ') : r.id);
35
-
36
- function scopeIds(ctx) { return (ctx.rows || []).map((r) => r.id).filter(Boolean); }
37
- const shown = (V, r) => !r.initiative_ids.length || r.initiative_ids.some((id) => V.ids.includes(id));
38
- const titleOf = (V, id) => { const r = (V.ctx.rows || []).find((x) => x.id === id); return (r && r.title) || id; };
39
-
40
- function summaryEditor(V, r) {
41
- const lines = (r.summary && r.summary.length ? r.summary : [{ text: '', source: 'estimate' }]).map((l) => ({ ...l }));
42
- const box = el('div', { class: 'c3rel', 'data-rel-summary': r.id });
43
- const note = el('div', { class: 'fold w', 'data-rel-refused': '' });
44
- note.hidden = true;
45
- const draw = (refused = []) => {
46
- box.replaceChildren(...lines.map((l, i) => {
47
- const input = el('input', { type: 'text', value: l.text || '', 'aria-label': 'Line ' + (i + 1), autocomplete: 'off' });
48
- input.addEventListener('change', () => { l.text = input.value; });
49
- const sel = el('select', { 'aria-label': 'Source of line ' + (i + 1) },
50
- [{ value: '', label: 'Source needed' }, ...SOURCES.map((s) => ({ value: s, label: s })), ...(l.source && !SOURCES.includes(l.source) ? [{ value: l.source, label: l.source }] : [])].map((o) => el('option', { value: o.value }, o.label)));
51
- sel.value = l.source || '';
52
- sel.addEventListener('change', () => { l.source = sel.value || undefined; });
53
- return el('div', { class: 'form row', 'data-rel-line': i, 'data-refused': refused.includes(i) ? 'true' : null }, input, sel);
54
- }));
55
- note.hidden = !refused.length;
56
- if (refused.length) note.replaceChildren(c3ic('alert', 'sm'), 'Not saved. Line ' + refused.map((i) => i + 1).join(', ') + ' needs a source: fact, estimate, assumption, reported or a ticket key.');
57
- };
58
- draw();
59
- const save = async () => {
60
- const a = await pmPost('/api/releases/summary', { id: r.id, lines });
61
- if (a && a.ok) { await load(V); return; }
62
- draw(a && a.refused ? a.refused : []);
63
- if (!(a && a.refused)) { note.hidden = false; note.replaceChildren(c3ic('alert', 'sm'), (a && a.error) || 'Not saved.'); }
64
- };
65
- return el('div', { class: 'c3rel' },
66
- el('div', { class: 'dim mono', style: 'font-size:var(--fs-2)' }, 'Summary: each line cites a source'), box, note,
67
- el('div', { class: 'chips2' },
68
- el('button', { type: 'button', class: 'pill', onClick: () => { lines.push({ text: '', source: 'estimate' }); draw(); } }, c3ic('plus', 'sm'), 'Add line'),
69
- el('button', { type: 'button', class: 'pill', 'data-rel-save-summary': r.id, onClick: save }, c3ic('check', 'sm'), 'Save summary')));
70
- }
71
-
72
- /** The release's case file (the mockup's C3.cases.rl): what the release is, the tag, the gaps, the summary, and the presses. */
73
- function caseFile(V, r) {
74
- const flags = r.gapFlags || [];
75
- const t = r.tags || { detected: [], reason: 'board not set' };
76
- return el('div', { class: 'case', style: '--tc:var(--acc)' },
77
- el('p', { class: 'sit' }, 'Deploy ' + when(r.deploy_at) + '. Release ' + when(r.release_at) + '. Initiatives: ' + (r.initiative_ids.map((id) => titleOf(V, id)).join(', ') || 'none') + '.'),
78
- el('div', { class: 'c3rel' },
79
- el('div', { class: 'chips2', 'data-rel-tags': r.id }, dim('Jira tag'), t.detected.length ? t.detected.map((x) => el('span', { class: 'tag', title: 'Jira release tag' }, x)) : dim(t.reason)),
80
- el('div', { 'data-rel-flags': r.id }, flags.length
81
- ? el('ul', { class: 'chgl' }, flags.map((f) => el('li', { class: 'warn' }, c3ic('alert', 'sm'), el('span', null, (FLAG_TEXT[f.flag] || f.flag) + ': ' + f.ticket), el('span', { class: 'tag' }, 'gap'))))
82
- : el('div', { class: 'fold' }, c3ic('check', 'sm'), 'No gaps between tickets and tags.')),
83
- summaryEditor(V, r),
84
- el('div', { class: 'chips2' },
85
- el('button', { type: 'button', class: 'pill', 'data-rel-accept': r.id,
86
- onClick: async () => { await pmPost('/api/releases/edit', { id: r.id, fields: { accepted: !r.accepted_at } }); await load(V); } }, c3ic(r.accepted_at ? 'undo' : 'check', 'sm'), r.accepted_at ? 'Withdraw acceptance' : 'Record acceptance'),
87
- !r.initiative_ids.length ? el('button', { type: 'button', class: 'pill', 'data-rel-delete': r.id,
88
- onClick: async () => { await pmPost('/api/releases/delete', { id: r.id }); await load(V); } }, c3ic('trash', 'sm'), 'Delete') : null)),
89
- el('div', { class: 'cft' }, el('span', null, c3ic('shield', 'sm'), 'A release never creates a Jira tag. The PM’s acceptance comes first, and that is recorded, not acted on.')));
90
- }
91
-
92
- function toggler(V, id, li, xp) {
93
- const flip = () => { V.open[id] = !V.open[id]; li.setAttribute('aria-expanded', String(!!V.open[id])); xp.classList.toggle('open', !!V.open[id]); };
94
- li.addEventListener('click', (e) => { if (!e.target.closest('.xi')) flip(); });
95
- li.addEventListener('keydown', (e) => { if (e.target === li && (e.key === 'Enter' || e.key === ' ')) { e.preventDefault(); flip(); } });
96
- }
97
-
98
- function relRow(V, r) {
99
- const flags = r.gapFlags || [];
100
- const t = r.tags || { detected: [] };
101
- const op = !!V.open[r.id];
102
- const li = el('li', { class: 'nrow', 'data-row': '', 'data-rel': r.id, tabindex: '0', 'aria-expanded': String(op) });
103
- const xp = el('div', { class: 'xp' + (op ? ' open' : '') }, el('div', { class: 'xi' }, caseFile(V, r)));
104
- toggler(V, r.id, li, xp);
105
- li.append(
106
- el('span', { class: 'ki', style: r.accepted_at ? 'color:var(--success)' : null }, c3ic(r.accepted_at ? 'check' : 'out')),
107
- el('div', { class: 'nb' },
108
- el('span', { class: 'tt' }, nameOfRel(V, r)),
109
- el('div', { class: 'chips' },
110
- r.initiative_ids.map((id) => el('span', { class: 'chip2' }, c3ic('init', 'sm'), titleOf(V, id))),
111
- (t.detected || []).map((x) => el('span', { class: 'tag', title: 'Jira release tag' }, x)),
112
- el('span', { class: 'chip2' }, c3ic('cal', 'sm'), dfmt(r.release_at)),
113
- r.accepted_at ? el('span', { class: 'st ok' }, c3ic('check', 'sm'), 'accepted by the PM') : (t.detected || []).length ? null : el('span', { class: 'st warn' }, c3ic('alert', 'sm'), 'not accepted: no Jira tag yet'),
114
- flags.length ? el('span', { class: 'st warn' }, c3ic('alert', 'sm'), flags.length + ' gap' + (flags.length === 1 ? '' : 's')) : null,
115
- r.progress && r.progress.total ? [el('div', { class: 'pbar', style: 'width:70px' }, el('i', { style: 'width:' + Math.round(r.progress.done / r.progress.total * 100) + '%' })), el('span', { class: 'mono dim', style: 'font-size:var(--fs-2)' }, r.progress.done + ' of ' + r.progress.total)] : null),
116
- xp));
117
- return li;
118
- }
119
-
120
- /** The mockup's "New release" row and its wizard (c3wizard, line 4903) as a form: initiatives, type, deploy and release times. */
121
- function newRow(V) {
122
- const F = V.form;
123
- const op = !!V.open.__new;
124
- const li = el('li', { class: 'nrow', 'data-row': '', tabindex: '0', 'aria-expanded': String(op), 'data-rel-new': '' });
125
- const err = el('div', { class: 'fold w', 'data-rel-error': '' });
126
- err.hidden = true;
127
- const pickRow = el('div', { class: 'chips2', role: 'group', 'aria-label': 'Initiatives' }, dim('initiatives'), V.ctx.rows.map((r) => {
128
- const b = el('button', { type: 'button', class: 'pill', 'aria-pressed': String(F.picked.has(r.id)), 'data-rel-pick': r.id, onClick: () => { F.picked.has(r.id) ? F.picked.delete(r.id) : F.picked.add(r.id); b.setAttribute('aria-pressed', String(F.picked.has(r.id))); } }, r.title || r.id);
129
- return b;
130
- }));
131
- const typeRow = el('div', { class: 'chips2', role: 'group', 'aria-label': 'Type' }, dim('type'), TYPES.map((t) => {
132
- const b = el('button', { type: 'button', class: 'pill', 'aria-pressed': String(F.type === t.value), 'data-rel-type': t.value, onClick: () => { F.type = t.value; typeRow.querySelectorAll('button').forEach((x) => x.setAttribute('aria-pressed', String(x === b))); } }, t.label);
133
- return b;
134
- }));
135
- const dt = (label, key, note) => {
136
- const d = el('input', { type: 'date', value: F[key][0], 'aria-label': label + ' date' }); d.addEventListener('change', () => { F[key][0] = d.value; });
137
- const t = el('input', { type: 'time', value: F[key][1], 'aria-label': label + ' time' }); t.addEventListener('change', () => { F[key][1] = t.value; });
138
- return el('label', { class: 'c3dt' }, el('span', { class: 'dim mono' }, label), d, t, el('span', { class: 'dim mono' }, note));
139
- };
140
- const create = el('button', { type: 'button', class: 'pill', 'data-rel-create-go': '', onClick: async () => {
141
- const a = await pmPost('/api/releases/create', { initiative_ids: [...F.picked], type: F.type, deploy_at: iso(F.deploy[0], F.deploy[1]), release_at: iso(F.rel[0], F.rel[1]) });
142
- if (a && a.ok) { V.form = newForm(); V.open.__new = false; await load(V); } else { err.hidden = false; err.replaceChildren(c3ic('alert', 'sm'), (a && a.error) || 'Not created.'); }
143
- } }, c3ic('plus', 'sm'), 'Create release');
144
- const xp = el('div', { class: 'xp' + (op ? ' open' : '') }, el('div', { class: 'xi' }, el('div', { class: 'case', 'data-rel-create': '', style: '--tc:var(--acc)' },
145
- el('p', { class: 'sit' }, 'Which initiatives ship together? Pick one, or several. The release is recorded here only; nothing changes in Jira.'),
146
- el('div', { class: 'c3rel' }, pickRow, typeRow, dt('Deploy', 'deploy', 'engineering ships it'), dt('Release', 'rel', 'customers see it'), err, el('div', { class: 'chips2' }, create)))));
147
- toggler(V, '__new', li, xp);
148
- li.append(el('span', { class: 'ki', style: 'background:var(--accw);color:var(--acc)' }, c3ic('plus')),
149
- el('div', { class: 'nb' }, el('span', { class: 'tt' }, 'New release'), el('div', { class: 'chips' }, dim('pick initiatives, a type and the deploy and release times')), xp));
150
- return li;
151
- }
152
-
153
- const newForm = () => ({ picked: new Set(), type: 'deploy', deploy: ['', ''], rel: ['', ''] });
154
-
155
- /** The mockup's Releases list (c3relList): the New release row and one row per release. */
156
- function listCard(V) {
157
- const list = V.releases.filter((r) => shown(V, r));
158
- const rows = [newRow(V), ...(list.length ? list.map((r) => relRow(V, r)) : [el('li', { class: 'fold', 'data-rel-empty': '' }, c3ic('check', 'sm'), 'No releases yet.')])];
159
- return el('section', { class: 'card sect', 'data-rel-list': '' },
160
- el('div', { class: 'sh2' }, el('h2', null, c3ic('out', 'sm'), 'Releases ', el('span', { class: 'bdg g' }, String(list.length))), el('span', { class: 'dim', style: 'font-size:var(--fs-2)' }, 'tied to initiatives and a Jira tag')),
161
- el('ul', { class: 'list' }, rows));
162
- }
163
- const TAG_COLORS = ['var(--acc)', 'var(--success)', 'var(--purple)', 'var(--warning)'];
164
- /** The mockup's "Jira release tags: tickets per tag". The ticket counts come from `tag_tickets` where the server sends them (the demo does); otherwise the tags
165
- * the releases carry are listed with no count, and with no board set the card says so. Nothing is counted here. */
166
- function tagsCard(V) {
167
- const tt = V.tagTickets;
168
- let body;
169
- if (tt && tt.length) body = hBars(tt.map((v, i) => [v.tag, v.total ? v.done / v.total || 0.03 : 0.03, TAG_COLORS[i % 4], v.done + ' of ' + v.total + ' done' + (v.date ? ' · ' + v.date : '')]));
170
- else {
171
- const tags = [...new Set(V.releases.flatMap((r) => (r.tags && r.tags.detected) || []))];
172
- body = tags.length ? el('div', { class: 'chips2', 'data-rel-tag-list': '' }, tags.map((t) => el('span', { class: 'tag', title: 'Jira release tag' }, t)))
173
- : el('div', { class: 'fold', 'data-rel-tags-empty': '' }, c3ic('moon', 'sm'), V.board ? 'No release tag is detected on the board yet.' : 'Jira board: not set, so no release tag is read.');
174
- }
175
- const s = card('out', 'Jira release tags', 'tickets per tag', body, el('div', { class: 'dim', style: 'font-size:var(--fs-2)' }, tt && tt.length ? 'Read from Jira. Fact.' : 'Ticket counts per tag are not read here.'));
176
- s.setAttribute('data-rel-tags-card', '');
177
- return s;
178
- }
179
- function rulesCard(V) {
180
- const demo = V.rules;
181
- const rows = demo
182
- ? [['clock', 'Change freeze: ' + demo.freeze, 'example'], ['doc', 'Tag name: ' + demo.tag, 'example'], ['shield', 'Acceptance before a tag is created: not decided', 'open']]
183
- : [['clock', 'Change freeze: no rule is set, so none is checked', 'open'], ['doc', 'Tag name: no rule is set, and no tag is created from here', 'open'], ['shield', 'Acceptance before a tag is created: the PM’s acceptance is recorded, and no tag is created from here', 'recorded']];
184
- const s = card('lock', 'Open rules', demo ? 'example values, yours to set' : 'yours to set', el('ul', { class: 'chgl' }, rows.map((r) => el('li', { class: 'warn' }, c3ic(r[0], 'sm'), el('span', null, r[1]), el('span', { class: 'tag' }, r[2])))));
185
- s.setAttribute('data-rel-rules', '');
186
- return s;
187
- }
188
-
189
- function render(V) {
190
- if (V.redraw) { V.redraw(); return; }
191
- const list = V.releases.filter((r) => shown(V, r));
192
- const accepted = list.filter((r) => r.accepted_at).length;
193
- const head = el('div', { class: 'lh' },
194
- el('span', { class: 'ki' }, c3ic('out')),
195
- el('div', { style: 'min-width:0' },
196
- el('b', null, list.length + ' release' + (list.length === 1 ? '' : 's') + ', ' + accepted + ' accepted by the PM'),
197
- el('div', { class: 'dim', 'data-rel-board': '' }, V.board ? 'Jira board: ' + V.board.name : 'Jira board: not set')),
198
- c3ring(accepted, Math.max(1, list.length), 44, accepted + '/' + list.length));
199
- V.root.replaceChildren(el('div', { class: 'calwrap' }, el('div', { class: 'calbody' },
200
- head,
201
- V.error ? el('div', { class: 'fold w', role: 'alert' }, c3ic('alert', 'sm'), V.error) : null,
202
- el('div', { class: 'brief sbb' }, el('div', { class: 'bcols' }, el('div', { class: 'bcol l' }, listCard(V)), el('div', { class: 'bcol r' }, tagsCard(V), rulesCard(V)))))));
203
- }
204
-
205
- async function load(V) {
206
- const fx = window.__c3demo && window.__c3planfx && window.__c3planfx.releases;
207
- const a = fx ? JSON.parse(JSON.stringify(fx)) : await pmGet('/api/releases');
208
- if (V.disposed) return;
209
- if (a && a.ok) { V.releases = a.releases || []; V.board = a.board || null; V.tagTickets = a.tag_tickets || null; V.rules = fx ? fx.rules : null; V.error = null; V.ready = true; } else V.error = (a && a.error) || 'Releases could not be read.';
210
- render(V);
211
- }
212
-
213
- /** The Lifecycle Deliver stage: the same list, tags and rules, drawn inside that lens (c3-lifecycle-panels.js). `host` is the lens's V; `scope` an initiative id or null.
214
- * The state lives on host.__rel, so a write (create, summary, acceptance) reloads and asks the lens to draw again. */
215
- export function releasePanels(host, scope) {
216
- let V = host.__rel;
217
- if (!V) {
218
- V = host.__rel = { ctx: host.ctx, ids: scopeIds(host.ctx), releases: [], board: null, tagTickets: null, rules: null, error: null, ready: false, disposed: false, open: {}, form: newForm(), redraw: () => { if (!host.disposed && host.render) host.render(); } };
219
- load(V);
220
- }
221
- V.ctx = host.ctx; V.ids = scope ? [scope] : scopeIds(host.ctx);
222
- if (!V.ready && !V.error) return { left: [el('section', { class: 'card sect' }, el('div', { class: 'fold', 'data-rel-loading': '' }, c3ic('clock', 'sm'), 'Reading the releases…'))], right: [] };
223
- return { left: [listCard(V)], right: [tagsCard(V), rulesCard(V)] };
224
- }
225
-
226
- export function mountReleases(host, ctx) {
227
- let V = views.get(host);
228
- if (V && V.ctx.ws !== ctx.ws) { disposeReleases(host); V = null; }
229
- if (V) { V.ctx = ctx; V.ids = scopeIds(ctx); if (host.firstChild !== V.root) host.replaceChildren(V.root); return; }
230
- ensureComponentsCss();
231
- ensureC3Css();
232
- V = { ctx, ids: scopeIds(ctx), root: el('div', { class: 'c3', 'data-in-view': 'releases' }), releases: [], board: null, error: null, disposed: false, open: {}, form: newForm() };
233
- V.stopPhone = c3Phone(V.root);
234
- views.set(host, V);
235
- host.replaceChildren(V.root);
236
- load(V);
237
- }
238
-
239
- export function disposeReleases(host) {
240
- const V = views.get(host);
241
- if (!V) return;
242
- V.disposed = true;
243
- if (V.stopPhone) V.stopPhone();
244
- views.delete(host);
245
- if (V.root.parentNode === host) V.root.remove();
246
- }
247
-
248
- registerInitiativesView('releases', { label: 'Releases', mount: mountReleases, dispose: disposeReleases });