create-pmos 0.399.0 → 0.400.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 (421) hide show
  1. package/package.json +18 -13
  2. package/payload/KIT-VERSION +1 -1
  3. package/payload/planning/evals/eval-calibration.md +1 -1
  4. package/payload/planning/okrs/health-budgets.md +1 -1
  5. package/payload/state/discoveries.md +1 -1
  6. package/workspace/briefing-premium-adddoc-test.js +2 -2
  7. package/workspace/briefing-premium-board-test.js +2 -2
  8. package/workspace/briefing-premium-doc-edit-test.js +2 -8
  9. package/workspace/briefing-premium-test.js +3 -2
  10. package/workspace/briefing-premium-work-test.js +9 -4
  11. package/workspace/c3-capture-test.js +0 -17
  12. package/workspace/changelog.json +17 -0
  13. package/workspace/guide/briefing-premium.md +2 -2
  14. package/workspace/guide/home.md +20 -2
  15. package/workspace/guide/layout.md +2 -2
  16. package/workspace/guide/notes.md +2 -2
  17. package/workspace/guide/phone-companion.md +1 -1
  18. package/workspace/lib/route-modules.js +1 -9
  19. package/workspace/lib/routes-phone-day.js +18 -9
  20. package/workspace/lib/routes-slash.js +95 -0
  21. package/workspace/package-lock.json +2 -2
  22. package/workspace/package.json +1 -2
  23. package/workspace/premium-chat-goal-view-test.js +1 -1
  24. package/workspace/premium-chat-term-test.js +0 -10
  25. package/workspace/premium-menu-rows-test.js +1 -1
  26. package/workspace/premium-phone-card-test.js +2 -2
  27. package/workspace/premium-vw-doc-test.js +1 -8
  28. package/workspace/premium-work-depth-test.js +2 -3
  29. package/workspace/public/capture.html +23 -0
  30. package/workspace/public/pm/c3-base.js +47 -0
  31. package/workspace/public/pm/c3-capture.js +1 -1
  32. package/workspace/public/pm/c3-ini-ui.js +1 -1
  33. package/workspace/public/pm/c3-sheet.js +1 -1
  34. package/workspace/public/pm/c3-toast.js +1 -1
  35. package/workspace/public/pm/console3.css +3 -0
  36. package/workspace/public/pm/cozy-home.css +20 -5
  37. package/workspace/public/pm/cozy-today.css +5 -2
  38. package/workspace/public/pm/cozy-viewer.js +4 -2
  39. package/workspace/public/pm/cozy.css +9 -0
  40. package/workspace/public/pm/goal-chat.js +5 -1
  41. package/workspace/public/pm/home-app.js +47 -26
  42. package/workspace/public/pm/home-chat.js +10 -4
  43. package/workspace/public/pm/home-data.js +3 -1
  44. package/workspace/public/pm/home-dictate.js +7 -4
  45. package/workspace/public/pm/home-ini.js +12 -2
  46. package/workspace/public/pm/home-list.js +20 -7
  47. package/workspace/public/pm/home-more.js +2 -2
  48. package/workspace/public/pm/home-phone-card.js +9 -4
  49. package/workspace/public/pm/home-review.js +2 -3
  50. package/workspace/public/pm/home-today.js +10 -6
  51. package/workspace/public/pm/home-work.js +15 -8
  52. package/workspace/public/pm/note-dock.js +1 -2
  53. package/workspace/public/pm/notes-links.js +1 -2
  54. package/workspace/public/pm/notes-task.js +3 -4
  55. package/workspace/public/pm/premium-board.js +1 -1
  56. package/workspace/public/pm/premium-initiative-head.js +3 -3
  57. package/workspace/public/pm/premium-vw-doc.css +20 -2
  58. package/workspace/public/pm/premium-vw-doc.js +22 -7
  59. package/workspace/public/pm/view-notes.js +2 -2
  60. package/workspace/replaced-tests.json +435 -0
  61. package/workspace/run-tests.js +323 -28
  62. package/workspace/server.js +15 -10
  63. package/workspace/test-files.json +3 -140
  64. package/workspace/test-lists/base.json +1 -2
  65. package/workspace/test-lists/c3-desktop-light-load.json +1 -2
  66. package/workspace/test-lists/c3-initiative-boards.json +1 -2
  67. package/workspace/test-lists/c3-meeting-focus.json +2 -12
  68. package/workspace/test-lists/c3-work-agent.json +1 -2
  69. package/workspace/test-lists/calendar-tidy-up.json +1 -2
  70. package/workspace/test-lists/console3-reports.json +1 -2
  71. package/workspace/test-lists/docs-three-way-sync.json +1 -2
  72. package/workspace/test-lists/extension-capture.json +5 -0
  73. package/workspace/test-lists/jira-wbs.json +1 -2
  74. package/workspace/test-lists/legacy-cleanup-a.json +9 -0
  75. package/workspace/test-lists/meeting-material.json +1 -2
  76. package/workspace/test-lists/meeting-notes.json +2 -36
  77. package/workspace/test-lists/meeting-replay.json +1 -2
  78. package/workspace/test-lists/mm-capture.json +2 -12
  79. package/workspace/test-lists/my-work.json +2 -10
  80. package/workspace/test-lists/onboarding-firstrun.json +2 -12
  81. package/workspace/test-lists/people-directory.json +1 -2
  82. package/workspace/test-lists/run2-a.json +1 -2
  83. package/workspace/test-lists/run2-d.json +2 -19
  84. package/workspace/test-lists/run3-b.json +1 -2
  85. package/workspace/test-lists/run3-c.json +2 -12
  86. package/workspace/test-lists/run4-b.json +1 -2
  87. package/workspace/test-lists/run4-d.json +1 -5
  88. package/workspace/test-lists/run5-c.json +1 -11
  89. package/workspace/test-lists/run6.json +1 -5
  90. package/workspace/test-lists/workspace-launch-flags.json +2 -12
  91. package/workspace/test-lists/workspace-profile-detection.json +2 -10
  92. package/workspace/test-timings.json +242 -123
  93. package/workspace/c3-briefing-test.js +0 -136
  94. package/workspace/c3-core-docs-test.js +0 -170
  95. package/workspace/c3-driver-fixture.js +0 -64
  96. package/workspace/c3-driver-test.js +0 -169
  97. package/workspace/c3-foundation-test.js +0 -163
  98. package/workspace/c3-ib-items-test.js +0 -114
  99. package/workspace/c3-ib-more-test.js +0 -146
  100. package/workspace/c3-ib-triage-backlog-test.js +0 -128
  101. package/workspace/c3-ini-harness.js +0 -66
  102. package/workspace/c3-ini-life-test.js +0 -167
  103. package/workspace/c3-initiatives-test.js +0 -186
  104. package/workspace/c3-light-load-test.js +0 -112
  105. package/workspace/c3-one-home-test.js +0 -149
  106. package/workspace/c3-phone-test.js +0 -289
  107. package/workspace/c3-quiet-test.js +0 -157
  108. package/workspace/c3-report-design-real-test.js +0 -264
  109. package/workspace/c3-report-design-test.js +0 -442
  110. package/workspace/c3-report-setup-test.js +0 -192
  111. package/workspace/c3-report-structure-real-test.js +0 -248
  112. package/workspace/c3-report-structure-test.js +0 -397
  113. package/workspace/c3-reports-test.js +0 -288
  114. package/workspace/c3-scan-test.js +0 -517
  115. package/workspace/c3-sessions-panel-test.js +0 -365
  116. package/workspace/c3-settings-test.js +0 -204
  117. package/workspace/c3-updates-test.js +0 -131
  118. package/workspace/c3-work-test.js +0 -260
  119. package/workspace/cut-stub.js +0 -40
  120. package/workspace/first-paint-audit.js +0 -160
  121. package/workspace/lib/c3-full-console.js +0 -15
  122. package/workspace/lib/engine/derived/trust.js +0 -3
  123. package/workspace/lib/engine/plan-forecast.js +0 -342
  124. package/workspace/lib/engine/report-families.js +0 -175
  125. package/workspace/lib/engine/truth-table.js +0 -57
  126. package/workspace/lib/routes-c3-init.js +0 -54
  127. package/workspace/lib/routes-c3-life.js +0 -120
  128. package/workspace/lib/routes-c3-timeline.js +0 -192
  129. package/workspace/lib/routes-forecast.js +0 -86
  130. package/workspace/lib/routes-releases.js +0 -130
  131. package/workspace/lib/routes-report-facts.js +0 -85
  132. package/workspace/lib/routes-report-families.js +0 -33
  133. package/workspace/lib/routes-signals.js +0 -51
  134. package/workspace/lib/routes-timeline.js +0 -197
  135. package/workspace/public/c3.html +0 -35
  136. package/workspace/public/index.html +0 -156
  137. package/workspace/public/pm/app.js +0 -831
  138. package/workspace/public/pm/bd-board.js +0 -159
  139. package/workspace/public/pm/bd-drag.js +0 -59
  140. package/workspace/public/pm/bd-model.js +0 -152
  141. package/workspace/public/pm/bd-timeline.js +0 -233
  142. package/workspace/public/pm/bd-tree.js +0 -244
  143. package/workspace/public/pm/board-copy.js +0 -59
  144. package/workspace/public/pm/board-read.js +0 -38
  145. package/workspace/public/pm/branches-sheet.js +0 -56
  146. package/workspace/public/pm/breakdown-api.js +0 -58
  147. package/workspace/public/pm/breakdown-copy.js +0 -138
  148. package/workspace/public/pm/briefing-deck.js +0 -441
  149. package/workspace/public/pm/briefing-model.js +0 -251
  150. package/workspace/public/pm/c3-ambient.js +0 -100
  151. package/workspace/public/pm/c3-audience-link.js +0 -21
  152. package/workspace/public/pm/c3-audience.js +0 -46
  153. package/workspace/public/pm/c3-boot.js +0 -13
  154. package/workspace/public/pm/c3-breakdown.js +0 -240
  155. package/workspace/public/pm/c3-brief-data.js +0 -11
  156. package/workspace/public/pm/c3-brief-mentions.js +0 -137
  157. package/workspace/public/pm/c3-brief-needs.js +0 -288
  158. package/workspace/public/pm/c3-brief-pulse.js +0 -112
  159. package/workspace/public/pm/c3-brief-summary.js +0 -139
  160. package/workspace/public/pm/c3-brief-today.js +0 -79
  161. package/workspace/public/pm/c3-brief.js +0 -279
  162. package/workspace/public/pm/c3-cal-strategy.js +0 -529
  163. package/workspace/public/pm/c3-calendar.js +0 -965
  164. package/workspace/public/pm/c3-calpop.js +0 -111
  165. package/workspace/public/pm/c3-case.js +0 -196
  166. package/workspace/public/pm/c3-core-docs.css +0 -18
  167. package/workspace/public/pm/c3-core-docs.js +0 -236
  168. package/workspace/public/pm/c3-daypart.js +0 -176
  169. package/workspace/public/pm/c3-demo-boards.js +0 -764
  170. package/workspace/public/pm/c3-demo-brief-ix.js +0 -350
  171. package/workspace/public/pm/c3-demo-brief-page.js +0 -70
  172. package/workspace/public/pm/c3-demo-cal-ix.js +0 -74
  173. package/workspace/public/pm/c3-demo-cal2.js +0 -66
  174. package/workspace/public/pm/c3-demo-cal3.js +0 -173
  175. package/workspace/public/pm/c3-demo-cal4.js +0 -169
  176. package/workspace/public/pm/c3-demo-cal5.js +0 -52
  177. package/workspace/public/pm/c3-demo-coredocs.js +0 -221
  178. package/workspace/public/pm/c3-demo-data.js +0 -552
  179. package/workspace/public/pm/c3-demo-focus.js +0 -181
  180. package/workspace/public/pm/c3-demo-init.js +0 -430
  181. package/workspace/public/pm/c3-demo-life.js +0 -77
  182. package/workspace/public/pm/c3-demo-material.js +0 -58
  183. package/workspace/public/pm/c3-demo-misc2.js +0 -34
  184. package/workspace/public/pm/c3-demo-phone.js +0 -48
  185. package/workspace/public/pm/c3-demo-plan2.js +0 -30
  186. package/workspace/public/pm/c3-demo-rd.js +0 -432
  187. package/workspace/public/pm/c3-demo-rep-ix.js +0 -126
  188. package/workspace/public/pm/c3-demo-rep2.js +0 -130
  189. package/workspace/public/pm/c3-demo-rep3.js +0 -138
  190. package/workspace/public/pm/c3-demo-rs.js +0 -287
  191. package/workspace/public/pm/c3-demo-term.js +0 -153
  192. package/workspace/public/pm/c3-demo-time.js +0 -49
  193. package/workspace/public/pm/c3-demo-work-ix.js +0 -32
  194. package/workspace/public/pm/c3-demo.js +0 -131
  195. package/workspace/public/pm/c3-design-studio.js +0 -369
  196. package/workspace/public/pm/c3-doc-formats.js +0 -153
  197. package/workspace/public/pm/c3-doc-sheet.js +0 -1230
  198. package/workspace/public/pm/c3-dock.js +0 -206
  199. package/workspace/public/pm/c3-docs.js +0 -291
  200. package/workspace/public/pm/c3-driver-work.js +0 -110
  201. package/workspace/public/pm/c3-driver.css +0 -18
  202. package/workspace/public/pm/c3-driver.js +0 -298
  203. package/workspace/public/pm/c3-focus.css +0 -304
  204. package/workspace/public/pm/c3-focus.js +0 -983
  205. package/workspace/public/pm/c3-ib-docs.js +0 -92
  206. package/workspace/public/pm/c3-ib-initiatives.js +0 -201
  207. package/workspace/public/pm/c3-ib-items.js +0 -210
  208. package/workspace/public/pm/c3-ib-releases.js +0 -48
  209. package/workspace/public/pm/c3-ib-sprints.js +0 -201
  210. package/workspace/public/pm/c3-ib-triage.js +0 -177
  211. package/workspace/public/pm/c3-ii-tabs.js +0 -252
  212. package/workspace/public/pm/c3-ini-life.css +0 -34
  213. package/workspace/public/pm/c3-ini-life.js +0 -379
  214. package/workspace/public/pm/c3-ini-records.js +0 -197
  215. package/workspace/public/pm/c3-ini-timeline.js +0 -278
  216. package/workspace/public/pm/c3-ini-work.js +0 -139
  217. package/workspace/public/pm/c3-init-extras.js +0 -170
  218. package/workspace/public/pm/c3-initiatives.js +0 -852
  219. package/workspace/public/pm/c3-lifecycle-panels.js +0 -479
  220. package/workspace/public/pm/c3-look.js +0 -27
  221. package/workspace/public/pm/c3-material.css +0 -22
  222. package/workspace/public/pm/c3-material.js +0 -321
  223. package/workspace/public/pm/c3-md.js +0 -3
  224. package/workspace/public/pm/c3-misc-panels.js +0 -89
  225. package/workspace/public/pm/c3-new-session.js +0 -110
  226. package/workspace/public/pm/c3-notes.js +0 -751
  227. package/workspace/public/pm/c3-phone-boot.js +0 -47
  228. package/workspace/public/pm/c3-phone-detail.js +0 -97
  229. package/workspace/public/pm/c3-phone-model.js +0 -3
  230. package/workspace/public/pm/c3-phone.css +0 -66
  231. package/workspace/public/pm/c3-phone.js +0 -444
  232. package/workspace/public/pm/c3-plan-panels.js +0 -163
  233. package/workspace/public/pm/c3-plan.js +0 -193
  234. package/workspace/public/pm/c3-quiet.css +0 -113
  235. package/workspace/public/pm/c3-quiet.js +0 -177
  236. package/workspace/public/pm/c3-replay.css +0 -133
  237. package/workspace/public/pm/c3-replay.js +0 -429
  238. package/workspace/public/pm/c3-report-deck.css +0 -163
  239. package/workspace/public/pm/c3-report-deck.js +0 -598
  240. package/workspace/public/pm/c3-report-frame.css +0 -20
  241. package/workspace/public/pm/c3-report-print.css +0 -20
  242. package/workspace/public/pm/c3-report-setup.css +0 -67
  243. package/workspace/public/pm/c3-report-setup.js +0 -298
  244. package/workspace/public/pm/c3-report-store.js +0 -244
  245. package/workspace/public/pm/c3-report-structure.css +0 -44
  246. package/workspace/public/pm/c3-report-structure.js +0 -473
  247. package/workspace/public/pm/c3-reports.css +0 -68
  248. package/workspace/public/pm/c3-reports.js +0 -377
  249. package/workspace/public/pm/c3-roadmap.js +0 -249
  250. package/workspace/public/pm/c3-scan-api.js +0 -167
  251. package/workspace/public/pm/c3-scan-next.js +0 -248
  252. package/workspace/public/pm/c3-scan-setup.js +0 -313
  253. package/workspace/public/pm/c3-scan-words.js +0 -41
  254. package/workspace/public/pm/c3-scan.css +0 -74
  255. package/workspace/public/pm/c3-scan.js +0 -93
  256. package/workspace/public/pm/c3-session-chat.js +0 -103
  257. package/workspace/public/pm/c3-session-conv.js +0 -165
  258. package/workspace/public/pm/c3-session-term.js +0 -216
  259. package/workspace/public/pm/c3-settings.css +0 -85
  260. package/workspace/public/pm/c3-settings.js +0 -1045
  261. package/workspace/public/pm/c3-shell.js +0 -628
  262. package/workspace/public/pm/c3-signals.js +0 -196
  263. package/workspace/public/pm/c3-strategy-panels.js +0 -45
  264. package/workspace/public/pm/c3-swipe.js +0 -230
  265. package/workspace/public/pm/c3-terminal-data.js +0 -48
  266. package/workspace/public/pm/c3-terminal-edge.js +0 -91
  267. package/workspace/public/pm/c3-terminal-icons.js +0 -40
  268. package/workspace/public/pm/c3-terminal-results.js +0 -141
  269. package/workspace/public/pm/c3-terminal.js +0 -52
  270. package/workspace/public/pm/c3-tickets.js +0 -163
  271. package/workspace/public/pm/c3-timeline.js +0 -201
  272. package/workspace/public/pm/calendar-views.js +0 -1049
  273. package/workspace/public/pm/console3-lift.md +0 -220
  274. package/workspace/public/pm/cozy-home.js +0 -172
  275. package/workspace/public/pm/cozy-initiative.css +0 -138
  276. package/workspace/public/pm/cycle-review.js +0 -125
  277. package/workspace/public/pm/data.js +0 -1577
  278. package/workspace/public/pm/dest-board.js +0 -444
  279. package/workspace/public/pm/dest-docs.js +0 -530
  280. package/workspace/public/pm/dest-initiatives.js +0 -162
  281. package/workspace/public/pm/dest-mywork.js +0 -307
  282. package/workspace/public/pm/dest-notes.js +0 -537
  283. package/workspace/public/pm/dest-people.js +0 -449
  284. package/workspace/public/pm/dest-reports.js +0 -383
  285. package/workspace/public/pm/dest-settings.js +0 -601
  286. package/workspace/public/pm/dest-today.js +0 -267
  287. package/workspace/public/pm/display-word.js +0 -56
  288. package/workspace/public/pm/doc-editor.js +0 -473
  289. package/workspace/public/pm/doc-graph.js +0 -272
  290. package/workspace/public/pm/doc-health-panel.js +0 -110
  291. package/workspace/public/pm/doc-rail.js +0 -167
  292. package/workspace/public/pm/doc-remote.js +0 -180
  293. package/workspace/public/pm/dock-sessions.js +0 -472
  294. package/workspace/public/pm/dock.js +0 -216
  295. package/workspace/public/pm/fixture.js +0 -821
  296. package/workspace/public/pm/flag-picker.js +0 -104
  297. package/workspace/public/pm/frame-copy.js +0 -278
  298. package/workspace/public/pm/freshness-line.js +0 -149
  299. package/workspace/public/pm/handoff-box.js +0 -82
  300. package/workspace/public/pm/initiative-list.js +0 -235
  301. package/workspace/public/pm/initiative-sheet.js +0 -331
  302. package/workspace/public/pm/initiatives-api.js +0 -95
  303. package/workspace/public/pm/initiatives-copy.js +0 -287
  304. package/workspace/public/pm/initiatives-timeline-copy.js +0 -59
  305. package/workspace/public/pm/initiatives-timeline.js +0 -410
  306. package/workspace/public/pm/initiatives-ui.js +0 -291
  307. package/workspace/public/pm/item-sheet.js +0 -268
  308. package/workspace/public/pm/keep-card.js +0 -204
  309. package/workspace/public/pm/lifecycle-lens-model.js +0 -246
  310. package/workspace/public/pm/lifecycle-lens.js +0 -276
  311. package/workspace/public/pm/lifecycle.js +0 -111
  312. package/workspace/public/pm/mobile.css +0 -366
  313. package/workspace/public/pm/mobile.js +0 -581
  314. package/workspace/public/pm/modes-live.js +0 -453
  315. package/workspace/public/pm/modes.js +0 -147
  316. package/workspace/public/pm/my-work-card.js +0 -51
  317. package/workspace/public/pm/my-work-data.js +0 -36
  318. package/workspace/public/pm/new-initiative-sheet.js +0 -169
  319. package/workspace/public/pm/next-step-ui.js +0 -190
  320. package/workspace/public/pm/outbox-panel.js +0 -125
  321. package/workspace/public/pm/palette-copy.js +0 -55
  322. package/workspace/public/pm/palette.js +0 -343
  323. package/workspace/public/pm/panel-breakdown.js +0 -702
  324. package/workspace/public/pm/panel-cockpit.js +0 -425
  325. package/workspace/public/pm/panel-detail.js +0 -1513
  326. package/workspace/public/pm/panel-initiatives.js +0 -929
  327. package/workspace/public/pm/panel-newsess.js +0 -709
  328. package/workspace/public/pm/panel-repos.js +0 -741
  329. package/workspace/public/pm/panel-tabs.js +0 -1506
  330. package/workspace/public/pm/panel-trees.js +0 -204
  331. package/workspace/public/pm/people-link.js +0 -106
  332. package/workspace/public/pm/phone-deck.js +0 -167
  333. package/workspace/public/pm/pm-work-view.js +0 -1533
  334. package/workspace/public/pm/portfolio-report.js +0 -61
  335. package/workspace/public/pm/premium-acts.js +0 -280
  336. package/workspace/public/pm/premium-brief.js +0 -111
  337. package/workspace/public/pm/premium-chat.js +0 -22
  338. package/workspace/public/pm/premium-doc-sheet.js +0 -312
  339. package/workspace/public/pm/premium-initiative.js +0 -324
  340. package/workspace/public/pm/premium-insights.css +0 -228
  341. package/workspace/public/pm/premium-metric-tiles.js +0 -68
  342. package/workspace/public/pm/premium-report-brief.js +0 -132
  343. package/workspace/public/pm/premium-vw-rec.js +0 -67
  344. package/workspace/public/pm/premium-wide.css +0 -30
  345. package/workspace/public/pm/print.css +0 -44
  346. package/workspace/public/pm/provider-cards.js +0 -136
  347. package/workspace/public/pm/registry.js +0 -203
  348. package/workspace/public/pm/release-card.js +0 -110
  349. package/workspace/public/pm/releases-view.js +0 -248
  350. package/workspace/public/pm/report-families-view.js +0 -505
  351. package/workspace/public/pm/report-slides.js +0 -438
  352. package/workspace/public/pm/report-tab.js +0 -33
  353. package/workspace/public/pm/report-view.js +0 -337
  354. package/workspace/public/pm/reports-copy.js +0 -134
  355. package/workspace/public/pm/roadmap.js +0 -294
  356. package/workspace/public/pm/run-card.js +0 -260
  357. package/workspace/public/pm/sessions-panel.js +0 -219
  358. package/workspace/public/pm/sheet-jira.js +0 -353
  359. package/workspace/public/pm/shell-bell.js +0 -163
  360. package/workspace/public/pm/shell-model.js +0 -83
  361. package/workspace/public/pm/shell-phone.js +0 -124
  362. package/workspace/public/pm/shell-readaloud.js +0 -53
  363. package/workspace/public/pm/shell-recording.js +0 -274
  364. package/workspace/public/pm/shell-ticker.js +0 -90
  365. package/workspace/public/pm/sig-watch.js +0 -41
  366. package/workspace/public/pm/slide-confirm.js +0 -163
  367. package/workspace/public/pm/slides-copy.js +0 -52
  368. package/workspace/public/pm/status-banner.js +0 -95
  369. package/workspace/public/pm/tab-doc.js +0 -859
  370. package/workspace/public/pm/tab-gone.js +0 -21
  371. package/workspace/public/pm/tab-term.js +0 -1210
  372. package/workspace/public/pm/tab-web.js +0 -90
  373. package/workspace/public/pm/timeline-copy.js +0 -48
  374. package/workspace/public/pm/timeline-forecast-view.js +0 -164
  375. package/workspace/public/pm/today-agenda.js +0 -331
  376. package/workspace/public/pm/today-cards.js +0 -244
  377. package/workspace/public/pm/today-copy.js +0 -506
  378. package/workspace/public/pm/today-day.js +0 -1371
  379. package/workspace/public/pm/today-goals.js +0 -297
  380. package/workspace/public/pm/today-jobs.js +0 -84
  381. package/workspace/public/pm/today-mentions.js +0 -50
  382. package/workspace/public/pm/topbar.js +0 -202
  383. package/workspace/public/pm/triage-card.js +0 -60
  384. package/workspace/public/pm/undo-hold.js +0 -103
  385. package/workspace/public/pm/view-addrepo.js +0 -208
  386. package/workspace/public/pm/view-files.js +0 -197
  387. package/workspace/public/pm/view-livenotes.js +0 -399
  388. package/workspace/public/pm/view-today.js +0 -13
  389. package/workspace/public/pm/view-validate.js +0 -171
  390. package/workspace/public/pm/welcome.js +0 -391
  391. package/workspace/public/pm/work-place.js +0 -68
  392. package/workspace/public/pm/xlsx-read.js +0 -117
  393. package/workspace/public/welcome.html +0 -22
  394. package/workspace/test-lists/browser-suites-green.json +0 -5
  395. package/workspace/test-lists/c3-core-docs.json +0 -9
  396. package/workspace/test-lists/c3-doc-sheet-rich.json +0 -6
  397. package/workspace/test-lists/c3-doc-sheet-size.json +0 -6
  398. package/workspace/test-lists/c3-doc-sheet-v2.json +0 -6
  399. package/workspace/test-lists/c3-ib-items.json +0 -9
  400. package/workspace/test-lists/c3-ib-more.json +0 -9
  401. package/workspace/test-lists/c3-ib-triage-backlog.json +0 -9
  402. package/workspace/test-lists/c3-ini-life.json +0 -9
  403. package/workspace/test-lists/c3-meeting-board.json +0 -5
  404. package/workspace/test-lists/c3-meeting-card.json +0 -5
  405. package/workspace/test-lists/c3-notes-place.json +0 -5
  406. package/workspace/test-lists/c3-notes-series.json +0 -5
  407. package/workspace/test-lists/calendar-time-page.json +0 -5
  408. package/workspace/test-lists/calpop.json +0 -4
  409. package/workspace/test-lists/console3-briefing.json +0 -9
  410. package/workspace/test-lists/console3-foundation.json +0 -9
  411. package/workspace/test-lists/console3-work-page.json +0 -9
  412. package/workspace/test-lists/premium-brief-parity.json +0 -9
  413. package/workspace/test-lists/report-design-studio-ui.json +0 -5
  414. package/workspace/test-lists/report-structure-ui.json +0 -11
  415. package/workspace/test-lists/report-workspace-ui.json +0 -5
  416. package/workspace/test-lists/run3-a.json +0 -5
  417. package/workspace/test-lists/run3-d.json +0 -6
  418. package/workspace/test-lists/run4-c.json +0 -13
  419. package/workspace/test-lists/today-goals-jobs-ui.json +0 -5
  420. package/workspace/test-lists/today-mentions-cards.json +0 -5
  421. package/workspace/test-lists/workspace-tabs-declutter.json +0 -13
@@ -1,249 +0,0 @@
1
- /* pm/c3-roadmap.js — the Roadmap sub-view of Initiatives on /c3.html, on the mockup's own markup and CSS (console3.html: rmRow line 3765, genRm 3778,
2
- * viewLeft 3840, viewRight 3848, roadSVG 3754, rmBar 4485, calSyncCard 3795).
3
- * Left: the Plan lens and deck, an intro card with the plus (add a bet), then Now, Next and Later (`.card.sect.rmcol`) with a row per bet and a
4
- * case file on tap. Right: By quarter (the SVG), Capacity (bets in flight, of the limit 4) and On your Calendar (dates that reach it).
5
- * REAL: bets from GET /api/c3-init/roadmap (the bets records; capacity derived from people), writes through pmPost to /api/roadmap-ops/bet/add,
6
- * /move and /take-off exactly as that route's header says. A move into a full column is answered with a PROPOSAL (which bet goes back); nothing
7
- * moves until the PM presses "Confirm the swap" (confirmSwap: true). No bet record yet: each column shows the repository's own roadmap rows
8
- * (ctx.rows) read-only and says so; nothing is invented. Dates on the Calendar card come from GET /api/forecast for the Now initiatives. */
9
- import { el } from './dom.js';
10
- import { pmGet, pmPost } from './http.js';
11
- import { c3ic, c3ib } from './pm-work-view.js';
12
- import { makeView, frame, hBars, card, emptyRow, short, dayLabel, rowShell, caseNode, markDone, say } from './c3-init-extras.js';
13
- import { mountSlide } from './slide-confirm.js';
14
-
15
- const COLS = ['now', 'next', 'later'];
16
- const CL = { now: 'Now', next: 'Next', later: 'Later' };
17
- const CS = { now: 'Committed, in build or about to be', next: 'Likely, one quarter out', later: 'Direction only, no date' };
18
- const CI = { now: 'bolt', next: 'next', later: 'moon' };
19
- const LIMIT = 4;
20
- const NSV = 'http://www.w3.org/2000/svg';
21
- const confColor = (c) => (c >= 0.7 ? 'var(--success)' : c >= 0.45 ? 'var(--warning)' : 'var(--destructive)');
22
- const q0Of = (b) => (b.q0 != null ? b.q0 : b.horizon === 'now' ? 0 : b.horizon === 'next' ? 1 : 2);
23
- const q1Of = (b) => (b.q1 != null ? b.q1 : b.horizon === 'later' ? 3 : q0Of(b));
24
- const quarters = () => { const d = new Date(); let q = Math.floor(d.getMonth() / 3); let y = d.getFullYear(); const out = []; for (let i = 0; i < 4; i++) { out.push('Q' + (q + 1) + ' ' + String(y).slice(2)); q++; if (q > 3) { q = 0; y++; } } return out; };
25
-
26
- /** A bet's delay word: the bet's own `risk` hint when it has one, else the repository row's health. Only Now bets show it. */
27
- function riskOf(V, b) {
28
- if (b.horizon !== 'now') return null;
29
- const r = b.risk || (() => { const row = (V.ctx.rows || []).find((x) => x.id === b.initiative); const l = row && row.health && row.health.level; return l === 'at-risk' ? 'risk' : /off|block|delay|late/.test(l || '') ? 'late' : ''; })();
30
- return r === 'late' ? { l: 'Delayed', c: 'bad', i: 'clock' } : r === 'risk' ? { l: 'At risk', c: 'warn', i: 'alert' } : null;
31
- }
32
- const krTitle = (V, id) => { const k = ((V.data.rd && V.data.rd.krs) || []).find((x) => x.id === id); return k ? k.title : id; };
33
- const betsIn = (V) => (((V.data.rd && V.data.rd.bets) || []).filter((b) => !b.off && (!V.scope || b.initiative === V.scope)));
34
-
35
- async function load(V) {
36
- const rd = await pmGet('/api/c3-init/roadmap').catch(() => null);
37
- if (V.disposed) return;
38
- V.data.rd = rd && rd.ok ? rd : null; V.data.err = rd && rd.ok ? null : (rd && rd.error) || 'The roadmap could not be read.';
39
- V.render();
40
- const ids = (V.ctx.rows || []).filter((r) => r.horizon === 'now').map((r) => r.id).slice(0, 4);
41
- const fcs = await Promise.all(ids.map((id) => pmGet('/api/forecast?initiative=' + encodeURIComponent(id)).catch(() => null)));
42
- if (V.disposed) return;
43
- V.data.fc = ids.map((id, i) => [id, fcs[i]]).filter(([, j]) => j && j.ok);
44
- V.render();
45
- }
46
-
47
- async function press(V, path, body, done, at) {
48
- const r = await pmPost(path, body);
49
- if (V.disposed) return r;
50
- if (r && r.ok && r.proposal) { V.proposal = { ...r.proposal }; V.open['rm:' + (r.proposal.move && r.proposal.move.id)] = true; V.note = ''; V.render(); return r; }
51
- if (r && r.ok) { V.proposal = null; V.note = done || 'Done.'; V.err = ''; V.errAt = null; await load(V); return r; }
52
- V.err = (r && r.error) || 'Not recorded.'; V.errAt = at || null; if (at) V.open['rm:' + at] = true; V.render(); return r;
53
- }
54
-
55
- const live = (V, col) => ((V.data.rd && V.data.rd.bets) || []).filter((x) => !x.off && x.horizon === col);
56
- /** The lowest-confidence bet of a column: the one a full column sends back (the route's own rule). */
57
- const weakest = (V, col, but) => live(V, col).filter((x) => x.rid !== but).sort((p, q) => (typeof p.confidence === 'number' ? p.confidence : 0.5) - (typeof q.confidence === 'number' ? q.confidence : 0.5))[0] || null;
58
-
59
- /** Move a bet one column (the page press). A full column answers with a proposal: it is shown on the row for the PM to confirm, never applied here. */
60
- async function moveBet(V, b, to, msg) {
61
- V.proposal = null; V.err = '';
62
- const from = b.horizon;
63
- const r = await press(V, '/api/roadmap-ops/bet/move', { id: b.rid, to }, msg, b.rid);
64
- if (r && r.ok && !r.proposal) say(msg, () => press(V, '/api/roadmap-ops/bet/move', { id: b.rid, to: from }, 'Moved back to ' + CL[from] + '.', b.rid));
65
- return r;
66
- }
67
-
68
- /* ── one row of a column ── */
69
- function betRow(V, b) {
70
- const risk = riskOf(V, b); const QL = quarters(); const key = 'rm:' + b.rid; const i = COLS.indexOf(b.horizon);
71
- const conf = typeof b.confidence === 'number' ? b.confidence : null;
72
- /* the swipe: right pulls it forward, left pushes it back (console3.html line 3881). A swipe never applies a swap: the route answers with a proposal and the row opens on it. */
73
- const edge = () => say('Already at the edge');
74
- const sw = {
75
- labelRight: i > 0 ? 'pull it forward to ' + CL[COLS[Math.max(0, i - 1)]] : 'already at the edge', labelLeft: i < 2 ? 'push it back to ' + CL[COLS[Math.min(2, i + 1)]] : 'already at the edge', iconRight: 'next', iconLeft: 'moon',
76
- onRight: () => (i > 0 ? moveBet(V, b, COLS[i - 1], 'Pulled forward to ' + CL[COLS[i - 1]] + '.') : edge()),
77
- onLeft: () => (i < 2 ? moveBet(V, b, COLS[i + 1], 'Pushed back to ' + CL[COLS[i + 1]] + '.') : edge()),
78
- };
79
- return rowShell(V, { key, attrs: { 'data-rm': b.rid, 'data-id': b.rid }, icon: CI[b.horizon], title: b.title, sw, xpContent: caseFile(V, b),
80
- chips: [conf == null ? null : el('span', { class: 'chip2', style: 'color:' + confColor(conf), title: 'Confidence' }, c3ic('target', 'sm'), Math.round(conf * 100) + '%'),
81
- b.parent_kr ? el('span', { class: 'chip2' }, c3ic('flag', 'sm'), short(krTitle(V, b.parent_kr), 26)) : el('span', { class: 'st bad' }, c3ic('alert', 'sm'), 'No anchor'),
82
- risk ? el('span', { class: 'st ' + risk.c }, c3ic(risk.i, 'sm'), risk.l) : null,
83
- el('span', { class: 'tag' }, QL[q0Of(b)] + (q1Of(b) > q0Of(b) ? ' to ' + QL[q1Of(b)] : ''))] });
84
- }
85
-
86
- /** The case file of a bet (console3.html genRm, line 3778): the situation, the evidence with the capacity check, and each move with what it costs.
87
- * The slide runs the picked move through the page-press routes; a move into a full column comes back as a swap proposal the PM confirms on its own slide. */
88
- function caseFile(V, b) {
89
- const i = COLS.indexOf(b.horizon); const conf = typeof b.confidence === 'number' ? b.confidence : null; const risk = riskOf(V, b); const key = 'rm:' + b.rid;
90
- const here = live(V, b.horizon).length;
91
- const chg = [['target', conf == null ? 'Confidence not rated (counts as 50 percent)' : 'Confidence ' + Math.round(conf * 100) + '%', 'agent'],
92
- ['flag', b.parent_kr ? 'Serves ' + krTitle(V, b.parent_kr) : 'No KR or health budget anchor', 'anchor', b.parent_kr ? '' : 'bad'],
93
- ['scale', CL[b.horizon] + ' holds ' + here + ' of ' + LIMIT + ' bets', 'capacity', here > LIMIT ? 'bad' : '']];
94
- if (b.why) chg.push(['info', b.why, 'evidence']);
95
- const sit = risk && b.horizon === 'now' ? 'This bet is on the roadmap as committed but its date is slipping. Decide whether the roadmap still believes the date.' : (b.why || 'Roadmap items move on evidence and capacity. Each option shows what it costs.');
96
- const opts = [];
97
- if (i > 0) {
98
- const T = COLS[i - 1]; const full = T !== 'later' && live(V, T).length >= LIMIT; const vic = full ? weakest(V, T, b.rid) : null;
99
- opts.push({ id: 'pf', l: 'Pull it forward to ' + CL[T], rec: !!b.parent_kr && conf != null && conf >= 0.7,
100
- fx: [b.parent_kr ? ['check', 'Gets capacity and dates', 'ok'] : ['alert', 'No anchor: refused until it has one', 'bad'], ...(full ? [['alert', 'Pushes ' + (vic ? '“' + short(vic.title, 22) + '”' : 'something else') + ' back', 'warn']] : [['scale', CL[T] + ' would hold ' + (live(V, T).length + 1) + ' of ' + LIMIT, 'ok']])] });
101
- }
102
- for (const x of (b.options || [])) opts.push({ id: 'x:' + x.id, l: x.l, rec: !!x.rec, fx: x.fx || [] });
103
- if (i < 2) opts.push({ id: 'pb', l: 'Push it back to ' + CL[COLS[i + 1]], rec: !b.parent_kr, fx: [['clock', 'Frees capacity in ' + CL[b.horizon], 'ok'], ...(b.horizon === 'now' ? [['alert', 'Dates already promised move too', 'warn']] : [])] });
104
- opts.push({ id: 'off', l: 'Take it off the roadmap', fx: [['clock', 'Frees a slot', 'ok'], ['info', 'A reason is kept in the record', '']] });
105
- opts.push({ id: 'k', l: 'Keep it where it is', rec: !opts.some((o) => o.rec) && !!b.parent_kr, fx: [] });
106
- const model = { sit, conf: Math.round(60 + (conf == null ? 0.5 : conf) * 30), chg, opts, cta: 'Slide to confirm' };
107
- const rm = V.reasons = V.reasons || {};
108
- const reason = el('input', { type: 'text', placeholder: 'Why is it coming off?', 'aria-label': 'Why it comes off the roadmap', 'data-rm-reason': b.rid, value: rm[b.rid] || '', onInput: (e) => { rm[b.rid] = e.target.value; } });
109
- const reasonBox = el('div', { class: 'wform', 'data-rm-off': b.rid }, reason, el('div', { class: 'dim', style: 'font-size:var(--fs-2)' }, 'The reason is kept in the record. Slide below to take it off.'));
110
- reasonBox.hidden = (V.pick && V.pick[key]) !== 'off';
111
- const onConfirm = async (o) => {
112
- if (o.id === 'pf') return moveBet(V, b, COLS[i - 1], 'Moved to ' + CL[COLS[i - 1]] + '. The Calendar and Plan follow.');
113
- if (o.id === 'pb') return moveBet(V, b, COLS[i + 1], 'Moved to ' + CL[COLS[i + 1]] + '.');
114
- if (o.id === 'off') {
115
- if (!(rm[b.rid] || '').trim()) { V.err = 'Say why it comes off: the reason is kept.'; V.errAt = b.rid; V.render(); return; }
116
- return press(V, '/api/roadmap-ops/bet/take-off', { id: b.rid, reason: rm[b.rid].trim() }, 'Taken off the roadmap. The record stays.', b.rid);
117
- }
118
- if (o.id.startsWith('x:')) { const x = (b.options || []).find((q) => 'x:' + q.id === o.id); return markDone(V, key, (x && x.msg) || 'Recorded.'); }
119
- return markDone(V, key, 'Kept where it is. No change.');
120
- };
121
- const mine = V.proposal && V.proposal.move && V.proposal.move.id === b.rid ? V.proposal : null;
122
- const node = el('div', { 'data-rm-case': b.rid, onClick: (e) => e.stopPropagation() },
123
- V.err && V.errAt === b.rid ? el('div', { class: 'fold w', role: 'alert' }, c3ic('alert', 'sm'), V.err) : null,
124
- mine ? swapProposal(V, b, mine) : null,
125
- caseNode(V, key, model, { onConfirm }),
126
- reasonBox);
127
- // the reason box shows only while "Take it off" is the picked option
128
- node.addEventListener('click', () => { reasonBox.hidden = (V.pick && V.pick[key]) !== 'off'; });
129
- return node;
130
- }
131
-
132
- /** The swap the route proposed: nothing has moved. Its own slide, bound to what the PM sees (the move and the bets sent back), applies it. */
133
- function swapProposal(V, b, mine) {
134
- const sendBack = mine.send_back.map((s) => '“' + s.title + '”' + (s.confidence == null ? '' : ' (' + Math.round(s.confidence * 100) + '%)') + ' to ' + CL[s.to]).join(', then ');
135
- const host = el('div', { class: 'c3slide' });
136
- const box = el('div', { class: 'fold w', role: 'status', 'data-rm-proposal': b.rid }, c3ic('scale', 'sm'),
137
- el('span', null, 'Proposal, nothing moved yet: ' + CL[mine.move.to] + ' is full. To make room, send back ' + sendBack + '.'),
138
- host,
139
- el('div', { class: 'chips2' }, el('button', { type: 'button', class: 'pill', onClick: () => { V.proposal = null; V.render(); } }, c3ic('x', 'sm'), 'Leave it')));
140
- mountSlide(host, { label: 'Slide to swap and move', hash: b.rid + '|' + mine.move.to + '|' + mine.send_back.map((s) => s.id).join(','),
141
- onConfirm: () => press(V, '/api/roadmap-ops/bet/move', { id: b.rid, to: mine.move.to, confirmSwap: true }, 'Swapped and moved to ' + CL[mine.move.to] + '.', b.rid) });
142
- return box;
143
- }
144
-
145
- /** A repository row (no bet records yet): read-only, from ctx.rows. */
146
- function repoRow(V, r) {
147
- return el('li', { class: 'nrow', 'data-rm-repo': r.id },
148
- el('span', { class: 'ki' }, c3ic(CI[r.horizon] || 'init')),
149
- el('div', { class: 'nb' }, el('span', { class: 'tt' }, r.title || r.id),
150
- el('div', { class: 'chips' }, r.anchor ? el('span', { class: 'chip2' }, c3ic('flag', 'sm'), short(r.anchor, 26)) : el('span', { class: 'st bad' }, c3ic('alert', 'sm'), 'No anchor'),
151
- r.health && r.health.level && r.health.level !== 'on' ? el('span', { class: 'st warn' }, c3ic('alert', 'sm'), String(r.health.level).replace('-', ' ')) : null,
152
- el('span', { class: 'tag' }, 'repository'))));
153
- }
154
-
155
- /* ── the add form ── */
156
- function addForm(V) {
157
- const title = el('input', { type: 'text', placeholder: 'What is the bet?', 'aria-label': 'What is the bet', 'data-rm-new': 'title' });
158
- const krs = (V.data.rd && V.data.rd.krs) || [];
159
- const dl = el('datalist', { id: 'c3-rm-anchors' }, krs.map((k) => el('option', { value: k.id }, k.title)));
160
- const anchor = el('input', { type: 'text', list: 'c3-rm-anchors', placeholder: 'Anchor: a KR id or health:<id>', 'aria-label': 'Anchor', 'data-rm-new': 'anchor' });
161
- const col = el('select', { 'aria-label': 'Column', 'data-rm-new': 'horizon' }, el('option', { value: 'later' }, 'Later'), el('option', { value: 'next' }, 'Next'), el('option', { value: 'now' }, 'Now'));
162
- const scoped = V.scope ? (V.ctx.rows || []).find((r) => r.id === V.scope) : null;
163
- return el('div', { class: 'wform', 'data-rm-form': '' }, el('b', { style: 'font-size:var(--fs-3)' }, 'Add a bet'), title, anchor, dl, col,
164
- el('div', { class: 'chips2' },
165
- el('button', { type: 'button', class: 'pill', 'data-rm-save': '', onClick: () => {
166
- if (!title.value.trim()) { V.err = 'Name the bet first.'; V.errAt = null; V.render(); return; }
167
- const body = { title: title.value.trim(), anchor: anchor.value.trim(), horizon: col.value, ...(scoped ? { initiative: scoped.id } : {}) };
168
- V.form = false; press(V, '/api/roadmap-ops/bet/add', body, 'Added to ' + CL[body.horizon] + '.', null);
169
- } }, c3ic('check', 'sm'), 'Add it'),
170
- el('button', { type: 'button', class: 'pill', onClick: () => { V.form = false; V.err = ''; V.render(); } }, c3ic('x', 'sm'), 'Cancel')));
171
- }
172
-
173
- /* ── By quarter: the mockup's roadSVG ── */
174
- function roadSVG(V, L) {
175
- const W = 560; const LW = 150; const QW = (W - LW) / 4; const rh = 34; const top = 26; const H = top + L.length * rh + 8; const QL = quarters();
176
- const s = document.createElementNS(NSV, 'svg');
177
- const add = (tag, a, txt) => { const n = document.createElementNS(NSV, tag); for (const k in a) n.setAttribute(k, a[k]); if (txt != null) n.textContent = txt; s.appendChild(n); return n; };
178
- for (const [k, v] of Object.entries({ class: 'pg', viewBox: `0 0 ${W} ${H}`, role: 'img', 'aria-label': 'Roadmap by quarter. Fainter bars are less certain.' })) s.setAttribute(k, v);
179
- QL.forEach((q, i) => { add('line', { x1: LW + i * QW, x2: LW + i * QW, y1: 18, y2: H - 4, stroke: 'var(--border)' }); add('text', { x: LW + i * QW + QW / 2, y: 14, 'text-anchor': 'middle' }, q); });
180
- add('rect', { x: LW + 3, y: 20, width: 6, height: H - 24, fill: 'var(--acc)', rx: 3 });
181
- L.forEach((b, i) => {
182
- const y = top + i * rh + rh / 2; const conf = typeof b.confidence === 'number' ? b.confidence : 0.5; const risk = riskOf(V, b);
183
- const col = b.horizon === 'now' && risk ? (risk.c === 'bad' ? 'var(--destructive)' : 'var(--warning)') : 'var(--acc)';
184
- const xs = LW + q0Of(b) * QW + 4; const xe = LW + (q1Of(b) + 1) * QW - 4;
185
- add('text', { x: 0, y: y + 4, class: 't' }, short(b.title, 19));
186
- add('rect', { x: xs, y: y - 8, width: xe - xs, height: 16, rx: 8, fill: col, 'fill-opacity': (0.15 + conf * 0.65).toFixed(2), ...(conf < 0.4 ? { stroke: col, 'stroke-dasharray': '4 3' } : {}) });
187
- if (!b.parent_kr) add('text', { x: xs + 8, y: y + 4, style: 'fill:var(--destructive)' }, 'no anchor'); else add('text', { x: xs + 8, y: y + 4, style: 'fill:var(--foreground)' }, Math.round(conf * 100) + '%');
188
- });
189
- return s;
190
- }
191
-
192
- /* ── On your Calendar: dated items from the forecast of the Now initiatives ── */
193
- function calendarCard(V) {
194
- const dated = ((V.data.rd && V.data.rd.dated) || []).slice(); // optional (demo): the dated rows as the mockup lists them; real mode derives them from the forecast
195
- for (const [id, j] of dated.length ? [] : V.data.fc || []) {
196
- if (V.scope && id !== V.scope) continue;
197
- const after = new Set((j.items || []).flatMap((x) => x.after || []));
198
- for (const x of j.items || []) {
199
- if (x.state === 'done') continue;
200
- const f = x.forecast || {}; const late = f.status && f.status !== 'on time';
201
- if (late || !after.has(x.id)) dated.push({ t: x.title, fe: f.end || x.due, plan: x.due, bad: !!late && f.status !== 'at risk' });
202
- }
203
- }
204
- dated.sort((a, b) => String(a.fe).localeCompare(String(b.fe)));
205
- return card('cal', 'On your Calendar', 'dates that reach it',
206
- el('ul', { class: 'chgl' }, dated.length ? dated.slice(0, 6).map((d) => el('li', { class: d.bad ? 'bad' : 'ok' }, c3ic(d.bad ? 'clock' : 'check', 'sm'), el('span', null, d.t + ' · ' + dayLabel(d.fe) + (d.bad ? ' (plan ' + dayLabel(d.plan) + ')' : '')))) : [el('li', null, c3ic('check', 'sm'), el('span', null, 'Nothing dated.'))]),
207
- el('div', { class: 'dim', style: 'font-size:var(--fs-2)' }, 'Milestones and late dates appear in Calendar week and month. Meetings carry their initiative back here.'));
208
- }
209
-
210
- function render(V) {
211
- V.more = V.more || {};
212
- const rd = V.data.rd; const bets = betsIn(V); const hasBets = !!(rd && (rd.bets || []).some((b) => !b.off));
213
- const byCol = (c) => bets.filter((b) => b.horizon === c).sort((a, z) => (a.rank || 0) - (z.rank || 0));
214
- const nowN = byCol('now').length; const nextN = byCol('next').length;
215
- const risky = byCol('now').find((b) => riskOf(V, b) && riskOf(V, b).c === 'bad') || byCol('now').find((b) => riskOf(V, b));
216
- const repoRows = (V.ctx.rows || []).filter((r) => !V.scope || r.id === V.scope);
217
- const total = hasBets ? bets.length : repoRows.length;
218
- const head = !rd ? { icon: 'flag', h: V.data.err || 'Reading the roadmap', s: V.data.err ? 'The bets are read from the repository records.' : 'The bets and their capacity are being read.', ring: [0, LIMIT] }
219
- : { icon: 'flag', h: hasBets ? nowN + ' bet' + (nowN === 1 ? '' : 's') + ' Now, room for ' + Math.max(0, LIMIT - nowN) + ' more' + (risky ? '. ' + risky.title + ' is the risk' : '') : 'No bets on the roadmap yet',
220
- s: hasBets ? 'Move items on evidence and capacity. Each one names its goal.' : 'Add one with the plus. A bet needs a goal: a KR or a health budget. The initiatives below are the repository\'s own roadmap.', ring: [nowN, LIMIT] };
221
-
222
- const intro = el('section', { class: 'card sect', 'data-rm-intro': '' },
223
- el('div', { class: 'sh2' }, el('h2', null, c3ic('flag', 'sm'), 'Roadmap ', el('span', { class: 'bdg g' }, String(total))), el('span', { class: 'chips2' }, c3ib('Add a bet', 'plus', { 'data-a': 'rmform', 'data-rm-add': '', 'aria-expanded': String(!!V.form), onClick: () => { V.form = !V.form; V.err = ''; V.render(); } }, 'sm'))),
224
- V.form ? addForm(V) : null,
225
- el('div', { class: 'dim', style: 'font-size:var(--fs-2)' }, 'Tap a bet to see where it can move and what each move costs. Swipe a row right to take the agent\u2019s suggestion, left to push it back. Every move checks the anchor and the capacity first.'),
226
- V.note ? el('div', { class: 'dim mono', style: 'font-size:var(--fs-2)', role: 'status', 'data-rm-note': '' }, V.note) : null,
227
- V.err && !V.errAt ? el('div', { class: 'fold w', role: 'alert' }, c3ic('alert', 'sm'), V.err) : null);
228
-
229
- const cols = COLS.map((c) => {
230
- const all = hasBets ? byCol(c).map((b) => betRow(V, b)) : repoRows.filter((r) => r.horizon === c).map((r) => repoRow(V, r));
231
- const rows = V.more[c] ? all : all.slice(0, 15); // a repository has hundreds of initiatives: the first 15, then "Show all"
232
- if (all.length > rows.length) rows.push(el('li', { class: 'fold' }, el('button', { type: 'button', class: 'pill', 'data-rm-showall': c, onClick: () => { V.more[c] = true; V.render(); } }, 'Show all ' + all.length)));
233
- return el('section', { class: 'card sect rmcol', 'data-rm-col': c },
234
- el('div', { class: 'sh2' }, el('h2', null, c3ic(CI[c], 'sm'), CL[c] + ' ', el('span', { class: 'bdg g' }, String(all.length))), el('span', { class: 'dim', style: 'font-size:var(--fs-2)' }, CS[c])),
235
- el('ul', { class: 'list' }, rows.length ? rows : [emptyRow('check', 'Nothing here.')]));
236
- });
237
-
238
- const right = [
239
- card('flag', 'By quarter', 'fainter means less certain', bets.length ? roadSVG(V, bets) : el('div', { class: 'fold' }, c3ic('moon', 'sm'), 'No bets to chart yet.')),
240
- card('user', 'Capacity', 'bets in flight', hBars([['Now', nowN / LIMIT, 'var(--acc)', nowN + ' of ' + LIMIT], ['Next', nextN / LIMIT, 'var(--purple)', nextN + ' of ' + LIMIT]]),
241
- rd && rd.capacity && rd.capacity.over ? el('div', { class: 'fold w' }, c3ic('alert', 'sm'), 'A column holds more than ' + LIMIT + ' bets.') : null),
242
- calendarCard(V),
243
- ];
244
- frame(V, { head, left: [intro, ...cols], right });
245
- }
246
-
247
- const view = makeView('roadmap', { init: (V) => load(V), render });
248
- export const mount = view.mount;
249
- export const dispose = view.dispose;
@@ -1,167 +0,0 @@
1
- /* pm/c3-scan-api.js — every call the portfolio Horizon scan makes to the server, in ONE place (initiative horizon-scan-portfolio, PRD section 7).
2
- * The pages never write a scan route name: they call a function here. If the server names a route or a field differently, change it here only.
3
- *
4
- * GET /api/scan/portfolio?ws getPortfolio(ws) the setting, watch list, last and next scan, open scan, reports, proposals
5
- * GET /api/scan/report?ws&id getReport(ws, id) { report, markdown, body, written, proposals }
6
- * POST /api/scan/watch postWatch(ws, body) { ws, op: keep|edit|remove|add, id?, name?, kind?, why?, boards?, restore? }
7
- * POST /api/scan/setting postSetting(ws, body) { ws, cadence?, repo?, types? } types is an array of type keys
8
- * POST /api/scan/now postNow(ws, sel) { ws, items: [id], repo, types: [key] }
9
- * POST /api/scan/stop postStop(ws) { ws }
10
- * POST /api/scan/proposal postProposal(ws, body) { ws, id, action: approve|change|dismiss|undo, fields?, why? } undo takes back a dismissal or a change, never an approval
11
- *
12
- * The page sends no `by`: the server takes the PM from the call path (http.js adds the nonce and the page Origin).
13
- * The answers are read into one shape (readPortfolio): a field the server leaves out reads as empty, never as a thrown error.
14
- * The names are the server's (lib/routes-scan.js header): items, proposals_waiting, open.scan, steps[].id, proposal.finding, dismissed_why, result.
15
- * Pure parts (Node-testable): readPortfolio, readProposal, readOut, evidenceKind, scanNowWords, typeKeys, proposalFields, frontOf.
16
- */
17
- import { pmGet, pmPost } from './http.js';
18
-
19
- export const ROUTES = Object.freeze({
20
- portfolio: '/api/scan/portfolio', report: '/api/scan/report', watch: '/api/scan/watch', setting: '/api/scan/setting',
21
- now: '/api/scan/now', stop: '/api/scan/stop', proposal: '/api/scan/proposal',
22
- });
23
-
24
- /** The report types, in the order the sheets show them. [key, name, help, repository only]. */
25
- export const TYPES = [
26
- ['benchmark', 'Benchmark report', 'Compares our flow with named products, point by point.', false],
27
- ['competitive', 'Competitive analysis', 'Positioning, features, pricing signals, threats and openings.', false],
28
- ['insight', 'Insight report', 'Themes across boards from Jira, friction, notes and Slack, plus web trends.', false],
29
- ['productivity', 'Productivity report', 'Delivery health from the repository and Jira. No web.', true],
30
- ];
31
- export const TYPE_KEYS = TYPES.map((t) => t[0]);
32
- export const typeName = (k) => (TYPES.find((t) => t[0] === k) || [0, k])[1];
33
- export const KINDS = ['product', 'domain', 'approach'];
34
-
35
- /** A types answer as a list of keys: an array of keys, or an object of key to on/off. */
36
- export function typeKeys(v) {
37
- if (Array.isArray(v)) return TYPE_KEYS.filter((k) => v.includes(k));
38
- if (v && typeof v === 'object') return TYPE_KEYS.filter((k) => v[k]);
39
- return TYPE_KEYS.slice();
40
- }
41
- /** The kind of an evidence pointer: a public page (http or https), a Jira key, a path in the repository, or a note. The backend keeps only { label, ref }. */
42
- export const evidenceKind = (ref) => {
43
- const r = String(ref || '').trim();
44
- return /^https?:\/\//i.test(r) ? 'web' : /^[A-Z][A-Z0-9_]+-\d+$/.test(r) ? 'jira' : /^[\w.-]+(\/[\w.@-]+)+$/.test(r) ? 'repo' : 'note';
45
- };
46
- /** The fields of a proposal under the backend's names, each as a string: create { title, board, lane, anchor, intent }, research { question, depth },
47
- * attach { initiative }. `title` is the proposal's own title (a change edits it through `fields.title`). */
48
- export function proposalFields(kind, f, title) {
49
- const o = f && typeof f === 'object' ? f : {};
50
- const str = (v) => (v == null ? '' : String(v));
51
- if (kind === 'create') return { title: str(title), board: str(o.board), lane: str(o.lane), anchor: str(o.anchor), intent: str(o.intent) };
52
- if (kind === 'research') return { question: str(o.question), depth: str(o.depth) || 'standard' };
53
- return { initiative: str(o.initiative) };
54
- }
55
- /** What an approved proposal made or started, from a proposal's `result` (or the answer of the approve press): { id, board, stage, scan, report }. The initiative is a
56
- * string on a stored proposal and an object in the approve answer. Null when there is none. */
57
- export function readOut(res) {
58
- if (!res || typeof res !== 'object') return null;
59
- const i = res.initiative;
60
- const id = typeof i === 'string' ? i : i && i.id ? String(i.id) : '';
61
- return { id, board: String(res.board || ''), stage: String(res.stage || ''), scan: String(res.scan || ''), report: String(res.report || '') };
62
- }
63
- /** One proposal as the page uses it: the backend's fields, `from` (the finding it came from), `reason` (the dismissal), `out` (what approve made) and a state of
64
- * open | done (approved) | dismissed. A research proposal that is approved while its scan is still open reads `running` (getReport sets that). */
65
- export function readProposal(p) {
66
- const kind = ['create', 'research', 'attach'].includes(p.kind) ? p.kind : 'create';
67
- const state = p.state === 'approved' ? 'done' : p.state === 'dismissed' ? 'dismissed' : 'open';
68
- return { id: String(p.id), report: String(p.report || ''), reportTitle: p.report_title || '', kind, title: p.title || '', why: p.why || '', from: p.finding || '',
69
- evidence: (Array.isArray(p.evidence) ? p.evidence : []).map((e) => ({ label: String((e && e.label) || ''), ref: String((e && e.ref) || ''), kind: evidenceKind(e && e.ref) })).filter((e) => e.ref),
70
- fields: proposalFields(kind, p.fields, p.title), state, changed: !!p.changed, reason: p.dismissed_why || '', out: readOut(p.result), steps: null, at: p.at || '', decidedAt: p.decided_at || '' };
71
- }
72
-
73
- /** The plain words for a refused Scan now: 409 running or quiet hours, 429 manual-limit. The server's own sentence is the fallback. */
74
- export function scanNowWords(r) {
75
- const why = r && r.why;
76
- if (why === 'running') return 'A scan is running now. Wait for it to end, or stop it.';
77
- if (why === 'quiet-hours') return 'Quiet hours hold, so a manual scan does not start now. Try again when they end.';
78
- if (why === 'manual-limit') return 'You used all ' + ((r && r.limit) || 3) + ' manual scans today. The scheduled scan still runs. Try again tomorrow.';
79
- return (r && r.error) || 'the workspace did not answer';
80
- }
81
- const readManual = (m) => ({ limit: Number(m && m.limit) || 3, used: Number(m && m.used) || 0, left: m && m.left != null ? Number(m.left) : 3, ok: !m || m.ok !== false, why: (m && m.why) || '', error: (m && m.error) || '' });
82
-
83
- /** The portfolio answer in one shape. The names are the server's: items (suggested | kept), proposals_waiting as `waiting`, open.scan, steps[].id. */
84
- export function readPortfolio(r) {
85
- const s = (r && r.setting) || {};
86
- const o = r && r.open;
87
- return {
88
- ok: !!(r && r.ok !== false), error: r && r.ok === false ? r.error || '' : '',
89
- setting: { cadence: ['daily', 'weekly', 'off'].includes(s.cadence) ? s.cadence : 'daily', repo: s.repo !== false, types: typeKeys(s.types) },
90
- items: (Array.isArray(r && r.items) ? r.items : []).map((w) => ({ id: String(w.id), kind: KINDS.includes(w.kind) ? w.kind : 'product', name: w.name || '', why: w.why || '',
91
- boards: Array.isArray(w.boards) ? w.boards.map(String) : [], ini: w.ini || '', added: !!w.added, state: w.state === 'kept' ? 'kept' : 'suggested' })),
92
- last: r && r.last ? { ...r.last } : null, next: (r && r.next) || '', manual: readManual(r && r.manual), switchedOff: !!(r && r.switched_off),
93
- open: o ? { scan: String(o.scan || ''), mode: o.mode || 'scan', stopping: !!o.stopping, steps: (Array.isArray(o.steps) ? o.steps : []).map((x) => ({ id: String(x.id || ''), label: x.label || x.id || '', state: x.state || 'pending' })),
94
- reports: Array.isArray(o.reports) ? o.reports : [], research: o.research || null } : null,
95
- reports: (Array.isArray(r && r.reports) ? r.reports : []).map((x) => ({ id: String(x.id), type: x.type || '', label: x.label || '', title: x.title || '', path: x.path || '', scan: x.scan || '', at: x.at || '', parent: x.parent || '',
96
- written: x.written === true, origin: x.origin || '', open: Number(x.proposals && x.proposals.open) || 0, total: Number(x.proposals && x.proposals.total) || 0 })),
97
- waiting: Number(r && r.proposals_waiting) || 0,
98
- proposals: (Array.isArray(r && r.proposals) ? r.proposals : []).map(readProposal),
99
- boards: Array.isArray(r && r.boards) ? r.boards : null,
100
- };
101
- }
102
-
103
- /** The front matter of a markdown text as { key: value }, or {} when it has none. */
104
- export function frontOf(text) {
105
- const m = /^---\r?\n([\s\S]*?)\r?\n---/.exec(String(text || ''));
106
- const out = {};
107
- if (!m) return out;
108
- for (const line of m[1].split(/\r?\n/)) { const k = /^([A-Za-z_][\w-]*):\s*(.*)$/.exec(line); if (k) out[k[1]] = k[2].replace(/^["']|["']$/g, '').trim(); }
109
- return out;
110
- }
111
-
112
- /* ── reads ── */
113
- const fail = (e) => ({ ok: false, error: (e && e.message) || 'the workspace did not answer' });
114
- const q = (o) => new URLSearchParams(o).toString();
115
- export async function getPortfolio(ws) {
116
- const r = await pmGet(ROUTES.portfolio + '?' + q({ ws })).catch(fail);
117
- return readPortfolio(r);
118
- }
119
- /** A report: { report, markdown, body, written, proposals }. A research proposal that was approved while its scan is still open reads `running`, with the steps of that scan. */
120
- export async function getReport(ws, id) {
121
- const r = await pmGet(ROUTES.report + '?' + q({ ws, id })).catch(fail);
122
- if (!r || r.ok === false) return { ok: false, error: (r && r.error) || 'the report could not be read', report: null, markdown: '', body: '', written: false, proposals: [] };
123
- const proposals = (Array.isArray(r.proposals) ? r.proposals : []).map(readProposal);
124
- const live = proposals.filter((p) => p.kind === 'research' && p.state === 'done' && p.out && p.out.scan);
125
- if (live.length) {
126
- const d = await getPortfolio(ws);
127
- if (d.ok && d.open) for (const p of live) if (d.open.scan === p.out.scan) { p.state = 'running'; p.steps = d.open.steps; }
128
- }
129
- return { ok: true, error: '', report: r.report || null, markdown: r.markdown || '', body: r.body || '', written: r.written === true, proposals };
130
- }
131
- /** The proposals the PM dismissed, newest first, read from the reports that hold a decided proposal (the portfolio answer lists only those still waiting). */
132
- export async function getDismissed(ws, reports) {
133
- const held = reports.filter((x) => x.total > x.open).slice(0, 12);
134
- const all = await Promise.all(held.map((x) => getReport(ws, x.id)));
135
- return all.flatMap((r) => (r.ok ? r.proposals : [])).filter((p) => p.state === 'dismissed').sort((a, b) => String(b.decidedAt).localeCompare(String(a.decidedAt)));
136
- }
137
-
138
- /* ── presses: each answers the server's JSON, or { ok:false, error } ── */
139
- const post = (route, ws, body) => pmPost(route, { ws, ...(body || {}) }).catch(fail);
140
- export const postWatch = (ws, body) => post(ROUTES.watch, ws, body);
141
- export const postSetting = (ws, body) => post(ROUTES.setting, ws, body);
142
- export const postNow = (ws, sel) => post(ROUTES.now, ws, { items: sel.items, repo: !!sel.repo, types: sel.types });
143
- export const postStop = (ws) => post(ROUTES.stop, ws, {});
144
- export const postProposal = (ws, body) => post(ROUTES.proposal, ws, body);
145
-
146
- /** The boards of the workspace as [{ id, name }] (the page already reads this list for the Portfolio). */
147
- export async function getBoards(ws) {
148
- const b = await pmGet('/api/boards?' + q({ ws })).catch(fail);
149
- return b && b.ok && Array.isArray(b.boards) ? b.boards.filter((x) => !ws || !x.ws || x.ws === ws).map((x) => ({ id: x.id, name: x.name || x.id })) : [];
150
- }
151
-
152
- /* ── choices for the Change first form: the boards, the anchors and the initiatives the page already reads elsewhere ── */
153
- export async function loadChoices(ws) {
154
- const boards = await getBoards(ws);
155
- const first = boards[0] ? boards[0].id : '';
156
- const a = first ? await pmGet('/api/boards/anchors?' + q({ ws, board: first })).catch(fail) : null;
157
- const anchors = a && a.ok && Array.isArray(a.anchors) ? a.anchors.map((x) => ({ value: x.value, label: x.label || x.value })) : [];
158
- const per = await Promise.all(boards.map((x) => pmGet('/api/boards/items?' + q({ ws, board: x.id })).catch(fail)));
159
- const initiatives = [];
160
- per.forEach((r) => { if (r && r.ok && Array.isArray(r.initiatives)) for (const i of r.initiatives) if (i.id && !initiatives.some((y) => y.id === i.id)) initiatives.push({ id: i.id, title: i.title || '' }); });
161
- return { boards, anchors, initiatives };
162
- }
163
-
164
- /* ── a change anywhere tells every part of the page that draws the scan ── */
165
- const subs = new Set();
166
- export const onScanChange = (fn) => { subs.add(fn); return () => subs.delete(fn); };
167
- export const scanChanged = () => { for (const fn of [...subs]) { try { fn(); } catch { /* one part failing never stops the rest */ } } };