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,240 +0,0 @@
1
- /* pm/c3-breakdown.js — the Breakdown sub-view of Initiatives on /c3.html, on the mockup's own markup and CSS (console3.html wbTree 3986, wbRow 3990 and
2
- * patch 25 at line 4406: wbEd, capCard, the wform; wbsRight 3997). PMOS-ONLY non-development work in three phases (Discovery, Design, Launch); the
3
- * engineering tickets are in the Tickets view and are never mixed in here.
4
- * Left: the tree (initiative, phase, item). An item shows its phase, source and owner chips, who added it and how often it changed, and on tap its
5
- * history and an editor: phase, owner, points, the Jira tickets it waits on, delete (with an 8 second undo). Right: Capacity for PMOS work, Who
6
- * shaped the plan, Latest changes, Rules.
7
- * REAL: GET /api/c3-init/breakdown (items, people, capacity per person over two weeks, the events of the ledger: who and why) and the writes
8
- * through pmPost to /api/roadmap-ops/breakdown/{add,edit,delete,undo,dependency} and /people. A change to a field Jira owns comes back as a proposal and
9
- * is shown as one. Nothing is invented: with no items the page says so. */
10
- import { el } from './dom.js';
11
- import { pmGet, pmPost } from './http.js';
12
- import { c3ic, c3ib } from './pm-work-view.js';
13
- import { makeView, frame, hBars, card, emptyRow, dayLabel, say } from './c3-init-extras.js';
14
- import { openSheet, closeSheet } from './c3-sheet.js';
15
- import { attachExpand } from './c3-expand.js';
16
-
17
- const PHASES = ['discovery', 'design', 'launch'];
18
- const PL = { discovery: 'Discovery', design: 'Design', launch: 'Launch' };
19
- const PC = { discovery: 'var(--purple)', design: 'var(--acc)', launch: 'var(--warning)' };
20
- const SRC = { local: 'Local', figma: 'Figma', calendar: 'Calendar', gmail: 'Gmail', notes: 'Notes' };
21
- const AGENTISH = /^(agent|claude)/i;
22
-
23
- /** who a ledger `by` is: { l: label, c: colour, i: icon }, as the mockup's orig(). */
24
- function orig(by) {
25
- const b = String(by || '');
26
- if (AGENTISH.test(b) || /^claude-code/.test(b)) return { l: 'Agent', c: 'var(--purple)', i: 'spark' };
27
- if (/^human:wawan$/i.test(b) || b === 'You' || b === '') return { l: 'You', c: 'var(--acc)', i: 'user' };
28
- return { l: b.replace(/^human:/, ''), c: 'var(--muted-foreground)', i: 'user' };
29
- }
30
- const bucket = (by) => { const l = orig(by).l; return l === 'You' || l === 'Agent' ? l : 'Team'; };
31
- const evOf = (V, rid) => ((V.data.bd && V.data.bd.events) || []).filter((e) => e.rid === rid);
32
- const isOwnerPerson = (p) => p && !AGENTISH.test(p);
33
-
34
- async function load(V) {
35
- const bd = await pmGet('/api/c3-init/breakdown').catch(() => null);
36
- if (V.disposed) return;
37
- V.data.bd = bd && bd.ok ? bd : null; V.data.err = bd && bd.ok ? null : (bd && bd.error) || 'The breakdown could not be read.';
38
- V.render();
39
- if (V.sheet) V.sheet.draw();
40
- }
41
- async function write(V, path, body, note, at) {
42
- const r = await pmPost(path, body);
43
- if (V.disposed) return r;
44
- if (r && r.ok) { V.err = ''; V.note = r.proposal ? (r.note || 'Jira owns those fields: the change is a proposal, nothing was applied.') : note || ''; await load(V); return r; }
45
- V.err = (r && r.error) || 'Not recorded.'; V.errAt = at || null; V.render(); return r;
46
- }
47
- const iniName = (V, id) => { const r = (V.ctx.rows || []).find((x) => x.id === id); return r ? r.title : id || 'No initiative'; };
48
-
49
- /** the tree: initiatives (in the order of first appearance), each with the phases that hold items. */
50
- function tree(V) {
51
- const items = ((V.data.bd && V.data.bd.items) || []).filter((x) => !V.scope || x.initiative === V.scope);
52
- const ids = []; items.forEach((x) => { const k = x.initiative || ''; if (!ids.includes(k)) ids.push(k); });
53
- return ids.map((id, ii) => {
54
- const mine = items.filter((x) => (x.initiative || '') === id);
55
- const firsts = mine.map((x) => evOf(V, x.rid)[0]).filter(Boolean); const youN = firsts.filter((e) => orig(e.by).l === 'You').length;
56
- const first = firsts.length ? (youN * 2 >= firsts.length ? firsts.find((e) => orig(e.by).l === 'You') || firsts[0] : firsts[0]) : null; // who added most of it
57
- const pts = (l) => [l.filter((x) => x.done).reduce((n, x) => n + (x.points || 1), 0), l.reduce((n, x) => n + (x.points || 1), 0)];
58
- return { id: 'i-' + id, type: 'ini', code: String(ii + 1), name: iniName(V, id), by: first && first.by, pts: pts(mine), kids: PHASES.map((ph, pi) => {
59
- const l = mine.filter((x) => x.phase === ph); if (!l.length) return null;
60
- return { id: 'p-' + id + '-' + ph, type: 'ph', code: (ii + 1) + '.' + (pi + 1), name: PL[ph], pts: pts(l), kids: l.map((x, xi) => ({ id: x.rid, type: 'it', code: (ii + 1) + '.' + (pi + 1) + '.' + (xi + 1), name: x.title, item: x, pts: [x.done ? x.points || 1 : 0, x.points || 1], kids: [] })) };
61
- }).filter(Boolean) };
62
- });
63
- }
64
-
65
- const collapsed = (V, n) => ((V.col = V.col || {})[n.id] != null ? V.col[n.id] : n.type === 'ini' && !V.scope);
66
- const pill = (label, on, attrs, fn) => el('button', { type: 'button', class: 'pill', 'aria-pressed': String(on), onClick: fn, ...(attrs || {}) }, label);
67
-
68
- function history(V, rid) {
69
- const ev = evOf(V, rid).slice().reverse();
70
- if (!ev.length) return el('div', { class: 'dim', style: 'font-size:var(--fs-2)' }, 'No history is recorded for this item.');
71
- const KI = { add: 'plus', edit: 'notes', dependency: 'org', delete: 'x' };
72
- return el('ul', { class: 'hx' }, ev.map((e) => { const o = orig(e.by); return el('li', null, el('span', { class: 'chip2', style: 'color:' + o.c }, c3ic(o.i, 'sm'), o.l),
73
- el('span', null, c3ic(KI[e.kind] || 'notes', 'sm'), ' ' + (e.kind === 'add' ? 'Added. ' : ''), e.why, ''), el('span', { class: 'w' }, dayLabel(String(e.at).slice(0, 10)))); }));
74
- }
75
-
76
- function editor(V, x) {
77
- const ppl = ((V.data.bd && V.data.bd.people) || []).map((p) => p.id);
78
- const owners = [...new Set([...ppl, ...(x.owner && !ppl.includes(x.owner) ? [x.owner] : []), 'Agent'])];
79
- /* an edit saves at once and keeps an undo: the toast puts the old values back (a page press on the same route) */
80
- const edit = async (fields, note) => {
81
- const prev = {}; Object.keys(fields).forEach((k) => { prev[k] = x[k]; });
82
- const r = await write(V, '/api/roadmap-ops/breakdown/edit', { rid: x.rid, fields }, note, x.rid);
83
- if (r && r.ok && !r.proposal) say(note || 'Saved.', () => write(V, '/api/roadmap-ops/breakdown/edit', { rid: x.rid, fields: prev }, 'Undone.', x.rid));
84
- return r;
85
- };
86
- const title = el('input', { type: 'text', value: x.title, 'aria-label': 'Title', onChange: (e) => { const v = e.target.value.trim(); if (v && v !== x.title) edit({ title: v }, 'Renamed.'); } });
87
- const dep = el('input', { type: 'text', placeholder: 'Jira key, such as CHK-144', 'aria-label': 'Add a dependency on a Jira ticket', 'data-bd-dep': x.rid });
88
- return el('div', { class: 'wbed', onClick: (e) => e.stopPropagation() },
89
- el('div', { class: 'chips2' }, el('span', { class: 'lb' }, 'Title'), title),
90
- el('div', { class: 'chips2' }, el('span', { class: 'lb' }, 'Phase'), PHASES.map((p) => pill(PL[p], x.phase === p, { 'data-bd-phase': p }, () => x.phase !== p && edit({ phase: p }, 'Phase is now ' + PL[p] + '.')))),
91
- el('div', { class: 'chips2' }, el('span', { class: 'lb' }, 'Owner'), owners.map((o) => pill(o, x.owner === o, { 'data-bd-owner': o }, () => x.owner !== o && edit({ owner: o }, 'Owner is now ' + o + '.')))),
92
- el('div', { class: 'chips2' }, el('span', { class: 'lb' }, 'Points'),
93
- c3ib('Fewer points', 'prev', { 'data-bd-pts': '-1', onClick: () => (x.points || 1) > 1 && edit({ points: (x.points || 1) - 1 }) }, 'sm'), el('b', null, String(x.points || 1)),
94
- c3ib('More points', 'next', { 'data-bd-pts': '1', onClick: () => edit({ points: (x.points || 1) + 1 }) }, 'sm')),
95
- el('div', { class: 'chips2' }, el('span', { class: 'lb' }, 'Waits on'),
96
- (x.deps || []).length ? (x.deps || []).map((k) => el('span', { class: 'chip2', title: 'Waits on ' + k }, c3ic('lock', 'sm'), k,
97
- el('button', { type: 'button', class: 'chv', 'aria-label': 'Stop waiting on ' + k, 'data-bd-undep': k, onClick: async () => { const r = await write(V, '/api/roadmap-ops/breakdown/dependency', { rid: x.rid, jira: k, remove: true }, 'No longer waits on ' + k + '.', x.rid); if (r && r.ok && !r.proposal) say('No longer waits on ' + k + '.', () => write(V, '/api/roadmap-ops/breakdown/dependency', { rid: x.rid, jira: k }, 'Waits on ' + k + ' again.', x.rid)); } }, c3ic('x', 'sm')))) : el('span', { class: 'dim', style: 'font-size:var(--fs-2)' }, 'Nothing'),
98
- dep, c3ib('Add the dependency', 'plus', { 'data-bd-adddep': x.rid, onClick: async () => { const k = dep.value.trim().toUpperCase(); if (!k) return; const r = await write(V, '/api/roadmap-ops/breakdown/dependency', { rid: x.rid, jira: k }, x.title + ' now waits on ' + k + '.', x.rid); if (r && r.ok && !r.proposal) say(x.title + ' now waits on ' + k + '.', () => write(V, '/api/roadmap-ops/breakdown/dependency', { rid: x.rid, jira: k, remove: true }, 'No longer waits on ' + k + '.', x.rid)); } }, 'sm')),
99
- el('div', { class: 'chips2' },
100
- el('button', { type: 'button', class: 'pill', style: 'color:var(--destructive)', 'data-bd-del': x.rid, onClick: async () => {
101
- const r = await write(V, '/api/roadmap-ops/breakdown/delete', { rid: x.rid }, '', x.rid);
102
- if (r && r.ok) { if (V.sheet) V.sheet.ui.close(); startUndo(V, x); say('Deleted “' + x.title + '”.', () => write(V, '/api/roadmap-ops/breakdown/undo', { rid: x.rid }, 'Brought back “' + x.title + '”.', null)); }
103
- } }, c3ic('x', 'sm'), 'Delete'), el('span', { class: 'dim', style: 'font-size:var(--fs-2)' }, 'Created here, so delete removes it. Undo brings it back for 8 seconds.')));
104
- }
105
- function startUndo(V, x) {
106
- clearTimeout(V.undoT); V.undo = { rid: x.rid, title: x.title };
107
- V.undoT = setTimeout(() => { V.undo = null; V.render(); }, 8000);
108
- V.render();
109
- }
110
-
111
- /** The edit sheet of an item (the mockup's wbEd, console3.html line 4427, on the shared sheet): title, phase, owner, points, the Jira tickets it waits on, delete with an undo, and its history. */
112
- function openItem(V, rid) {
113
- const find = () => ((V.data.bd && V.data.bd.items) || []).find((x) => x.rid === rid);
114
- const first = find(); if (!first) return;
115
- let ui = null;
116
- const draw = () => {
117
- const x = find(); if (!x) { ui.close(); return; }
118
- ui.body.replaceChildren(el('div', { class: 'dpn', 'data-bd-sheet': rid },
119
- V.err && V.errAt === rid ? el('div', { class: 'fold w', role: 'alert' }, c3ic('alert', 'sm'), V.err) : null,
120
- V.note ? el('div', { class: 'dim mono', style: 'font-size:var(--fs-2)', role: 'status' }, V.note) : null,
121
- editor(V, x), el('h4', { style: 'margin:0;font-size:var(--fs-3)' }, 'History'), history(V, rid)));
122
- };
123
- ui = openSheet({ title: first.title, icon: 'tree', body: el('div'), onClose: () => { if (V.sheet && V.sheet.ui === ui) V.sheet = null; } });
124
- V.sheet = { rid, ui, draw };
125
- draw();
126
- }
127
-
128
- function row(V, n) {
129
- const x = n.item; const open = !!V.open['bd' + n.id]; const has = n.kids.length > 0; const col = collapsed(V, n);
130
- const first = x ? evOf(V, x.rid)[0] : null; const o = orig(x ? first && first.by : n.by); const edits = x ? Math.max(0, evOf(V, x.rid).length - 1) : 0;
131
- const pr = n.pts[1] ? n.pts[0] / n.pts[1] : 0;
132
- const chips = [el('span', { class: 'chip2 mono' }, n.code)];
133
- if (n.type !== 'ph') chips.push(el('span', { class: 'chip2', style: 'color:' + o.c, title: 'Who added it' }, c3ic(o.i, 'sm'), (o.l === 'Agent' ? 'Added by agent' : o.l === 'You' ? 'Added by you' : 'Added by ' + o.l)));
134
- if (edits) chips.push(el('span', { class: 'chip2', title: 'Last change' }, c3ic('clock', 'sm'), edits + ' edit' + (edits > 1 ? 's' : '') + ', last ' + orig(evOf(V, x.rid).slice(-1)[0].by).l));
135
- if (x && x.owner) chips.push(el('span', { class: 'chip2' }, x.owner));
136
- chips.push(el('span', { class: 'chip2' }, n.pts[1] + ' pts'));
137
- if (x) {
138
- chips.push(el('span', { class: 'chip2', style: 'color:' + (PC[x.phase] || 'inherit'), title: 'Phase' }, PL[x.phase] || x.phase), el('span', { class: 'chip2', title: 'Where it comes from' }, SRC[x.source] || x.source));
139
- if (x.done) chips.push(el('span', { class: 'chip2', style: 'color:var(--success)' }, 'Done'));
140
- (x.deps || []).forEach((k) => chips.push(el('span', { class: 'chip2', title: 'Waits on the Jira ticket ' + k }, c3ic('lock', 'sm'), k)));
141
- }
142
- const li = el('li', { class: 'nrow', 'data-bd': n.id, tabindex: '0', style: 'margin-left:' + (n.type === 'ini' ? 0 : n.type === 'ph' ? 18 : 36) + 'px', ...(x ? { 'aria-haspopup': 'dialog' } : {}) });
143
- const xp = x ? null : el('div', { class: 'xp' }, el('div', { class: 'xi' }, el('div', { class: 'dim', style: 'font-size:var(--fs-2)' }, n.type === 'ini' ? 'Work that lives only in PMOS for this initiative.' : 'Items of this phase.')));
144
- if (x) {
145
- /* an item is one object: a tap or Enter opens its edit sheet */
146
- const openIt = () => openItem(V, x.rid);
147
- li.addEventListener('click', (e) => { if (!e.target.closest('.chv,button,a')) openIt(); });
148
- li.addEventListener('keydown', (e) => { if (e.target === li && (e.key === 'Enter' || e.key === ' ')) { e.preventDefault(); openIt(); } });
149
- } else attachExpand(li, xp, { key: 'bd' + n.id, initial: !!V.open['bd' + n.id], onToggle: (on) => { V.open['bd' + n.id] = on; } });
150
- li.append(el('span', { class: 'ki' }, has ? el('button', { type: 'button', class: 'chv', 'aria-expanded': String(!col), 'aria-label': 'Show or hide ' + n.name, 'data-bd-tog': n.id, onClick: (e) => { e.stopPropagation(); V.col[n.id] = !collapsed(V, n); V.render(); } }, c3ic('next', 'sm')) : c3ic('check')),
151
- el('div', { class: 'nb' }, el('span', { class: 'tt', style: n.type !== 'it' ? 'font-weight:600' : '', tabindex: '-1' }, n.name), el('div', { class: 'chips' }, chips),
152
- n.type !== 'it' ? el('div', { class: 'tk', style: 'margin-top:6px' }, el('u', { style: 'width:' + Math.max(2, pr * 100) + '%;background:var(--success)' })) : null, xp));
153
- return [li, ...(has && !col ? n.kids.flatMap((k) => row(V, k)) : [])];
154
- }
155
-
156
- function addForm(V) {
157
- const rows = V.ctx.rows || [];
158
- const title = el('input', { type: 'text', placeholder: 'What is the work?', 'aria-label': 'What is the work', 'data-bd-new': 'title' });
159
- const ini = el('select', { 'aria-label': 'Initiative', 'data-bd-new': 'initiative' }, el('option', { value: '' }, 'No initiative'), rows.map((r) => el('option', { value: r.id, selected: r.id === V.scope }, r.title)));
160
- const ph = el('select', { 'aria-label': 'Phase', 'data-bd-new': 'phase' }, PHASES.map((p) => el('option', { value: p }, PL[p])));
161
- const src = el('select', { 'aria-label': 'Where it comes from', 'data-bd-new': 'source' }, Object.keys(SRC).map((s) => el('option', { value: s }, SRC[s])));
162
- const own = el('input', { type: 'text', placeholder: 'Owner (optional)', 'aria-label': 'Owner', 'data-bd-new': 'owner' });
163
- const pts = el('input', { type: 'number', min: '1', step: '1', value: '1', 'aria-label': 'Points', 'data-bd-new': 'points' });
164
- return el('div', { class: 'wform', 'data-bd-form': '' }, el('b', { style: 'font-size:var(--fs-3)' }, 'Add a work item'), title, ini, ph, src, own, pts,
165
- el('div', { class: 'chips2' },
166
- el('button', { type: 'button', class: 'pill', 'data-bd-save': '', onClick: () => {
167
- if (!title.value.trim()) { V.err = 'Name the work first.'; V.errAt = null; V.render(); return; }
168
- const body = { title: title.value.trim(), phase: ph.value, source: src.value, ...(own.value.trim() ? { owner: own.value.trim() } : {}), points: Math.max(1, Number(pts.value) || 1), ...(ini.value ? { initiative: ini.value } : {}) };
169
- V.form = false; write(V, '/api/roadmap-ops/breakdown/add', body, 'Added “' + body.title + '”.', null);
170
- } }, c3ic('check', 'sm'), 'Add it'),
171
- el('button', { type: 'button', class: 'pill', onClick: () => { V.form = false; V.err = ''; V.render(); } }, c3ic('x', 'sm'), 'Cancel')));
172
- }
173
-
174
- function capacityCard(V) {
175
- const bd = V.data.bd || {}; const people = bd.people || [];
176
- const all = (bd.capacity || []).filter((r) => r.person && isOwnerPerson(r.person));
177
- const rows = all.filter((r) => people.some((p) => p.id === r.person) || r.pmos_points > 0); // a row for someone with no points per week and no open work is Jira load only
178
- const un = (bd.capacity || []).find((r) => r.unassigned);
179
- const setPpw = (id, cur, d) => write(V, '/api/roadmap-ops/people', { id, points_per_week: Math.max(0, cur + d) }, 'Points per week for ' + id + ': ' + Math.max(0, cur + d) + '.', null);
180
- const jira = all.filter((r) => r.jira_points > 0).map((r) => r.person + ' ' + r.jira_points + ' pts');
181
- return card('user', 'Capacity for PMOS work', 'next 2 weeks, points open of points available',
182
- ...rows.map((r) => {
183
- const ppw = (people.find((p) => p.id === r.person) || {}).points_per_week || r.capacity / 2; const pct = r.capacity ? Math.min(100, Math.round(r.pmos_points / r.capacity * 100)) : 0;
184
- const colr = r.over ? 'var(--destructive)' : r.pmos_points > r.capacity * 0.85 ? 'var(--warning)' : 'var(--success)';
185
- return el('div', { class: 'chips2', 'data-bd-cap': r.person, style: 'justify-content:space-between;gap:10px' }, el('span', { style: 'width:60px' }, r.person), el('div', { class: 'tk', style: 'flex:1' }, el('u', { style: 'width:' + Math.max(2, pct) + '%;background:' + colr })),
186
- el('span', { class: 'mono dim', style: 'font-size:var(--fs-2);' + (r.over ? 'color:var(--destructive)' : '') }, r.pmos_points + ' of ' + r.capacity),
187
- c3ib('Less capacity for ' + r.person, 'prev', { onClick: () => setPpw(r.person, ppw, -1) }, 'sm'), c3ib('More capacity for ' + r.person, 'next', { onClick: () => setPpw(r.person, ppw, 1) }, 'sm'));
188
- }),
189
- rows.length ? null : el('div', { class: 'fold' }, c3ic('moon', 'sm'), 'No one has points per week yet, so there is no capacity to compare.'),
190
- rows.length ? el('div', { class: 'dim', style: 'font-size:var(--fs-2)' }, 'Points per person per week: ' + rows.map((r) => r.person + ' ' + ((people.find((p) => p.id === r.person) || {}).points_per_week || r.capacity / 2)).join(', ') + '. Use the arrows to change them.') : null,
191
- un ? el('div', { class: 'dim', style: 'font-size:var(--fs-2)' }, un.pmos_points + ' points have no owner yet.') : null,
192
- el('div', { class: 'dim', style: 'font-size:var(--fs-2)' }, c3ic('lock', 'sm'), ' Engineering load comes from Jira and is read-only here: ' + (jira.join(', ') || 'none') + '.'));
193
- }
194
-
195
- function render(V) {
196
- const bd = V.data.bd; const items = ((bd && bd.items) || []).filter((x) => !V.scope || x.initiative === V.scope);
197
- const agents = items.filter((x) => { const f = evOf(V, x.rid)[0]; return f && orig(f.by).l === 'Agent'; }).length;
198
- const done = items.filter((x) => x.done).length;
199
- const head = !bd ? { icon: 'tree', h: V.data.err || 'Reading the breakdown', s: 'Work that lives only in PMOS: discovery, design and launch.', ring: [0, 1] }
200
- : { icon: 'tree', h: items.length ? items.length + ' work item' + (items.length === 1 ? '' : 's') + '. Agents added ' + agents + ', you added ' + (items.length - agents) : 'No work items yet',
201
- s: 'Work that lives only in PMOS: discovery, design and launch. Engineering work is in Tickets.', ring: [done, items.length] };
202
- const T = tree(V);
203
- const list = el('ul', { class: 'list wbs' }, T.length ? T.flatMap((n) => row(V, n)) : [emptyRow('check', bd ? 'No work items yet. Add one with the plus.' : 'Reading the breakdown.')]);
204
- const left = el('section', { class: 'card sect', 'data-bd-list': '' },
205
- el('div', { class: 'sh2' }, el('h2', null, c3ic('tree', 'sm'), 'Work breakdown ', el('span', { class: 'bdg g' }, String(items.length))),
206
- el('span', { class: 'chips2' }, V.scope ? null : el('span', { class: 'dim', style: 'font-size:var(--fs-2)' }, 'pick an initiative to add'), c3ib('Add a work item', 'plus', { 'data-bd-add': '', 'aria-expanded': String(!!V.form), onClick: () => { V.form = !V.form; V.err = ''; V.render(); } }, 'sm'))),
207
- V.form ? addForm(V) : null,
208
- V.note ? el('div', { class: 'dim mono', style: 'font-size:var(--fs-2)', role: 'status', 'data-bd-note': '' }, V.note) : null,
209
- V.undo ? el('div', { class: 'fold', role: 'status', 'data-bd-undo': '' }, c3ic('undo', 'sm'), 'Deleted “' + V.undo.title + '”. ',
210
- el('button', { type: 'button', class: 'chip2 lk', onClick: async () => { const u = V.undo; V.undo = null; clearTimeout(V.undoT); await write(V, '/api/roadmap-ops/breakdown/undo', { rid: u.rid }, 'Brought back “' + u.title + '”.', null); } }, c3ic('undo', 'sm'), 'Undo')) : null,
211
- V.err && !V.errAt ? el('div', { class: 'fold w', role: 'alert' }, c3ic('alert', 'sm'), V.err) : null,
212
- list,
213
- el('div', { class: 'pgl' }, el('span', { style: 'color:var(--acc)' }, 'you'), el('span', { style: 'color:var(--purple)' }, 'agent'), el('span', null, 'teammates in grey'), el('span', null, 'tap a row for its history')));
214
-
215
- const evs = ((bd && bd.events) || []).filter((e) => !V.scope || items.some((x) => x.rid === e.rid));
216
- const adds = evs.filter((e) => e.kind === 'add' && items.some((x) => x.rid === e.rid)); const chg = evs.filter((e) => e.kind !== 'add');
217
- const cnt = (l) => { const o = { You: 0, Agent: 0, Team: 0 }; l.forEach((e) => { o[bucket(e.by)]++; }); return o; };
218
- const A = cnt(adds); const C = cnt(chg); const mxA = Math.max(1, adds.length); const mxC = Math.max(1, chg.length);
219
- const day0 = evs.length ? String(evs[0].at).slice(0, 10) : '';
220
- let feed = evs.filter((e) => e.kind !== 'add' || String(e.at).slice(0, 10) !== day0); if (!feed.length) feed = evs;
221
- feed = feed.slice().reverse().slice(0, 6);
222
- const right = [
223
- capacityCard(V),
224
- card('user', 'Who shaped the plan', '', el('div', { class: 'dim', style: 'font-size:var(--fs-2)' }, 'Items added'),
225
- hBars([['You', A.You / mxA, 'var(--acc)', A.You], ['Agent', A.Agent / mxA, 'var(--purple)', A.Agent], ['Team', A.Team / mxA, 'var(--muted-foreground)', A.Team]]),
226
- el('div', { class: 'dim', style: 'font-size:var(--fs-2)' }, 'Changes made'),
227
- hBars([['You', C.You / mxC, 'var(--acc)', C.You], ['Agent', C.Agent / mxC, 'var(--purple)', C.Agent], ['Team', C.Team / mxC, 'var(--muted-foreground)', C.Team]])),
228
- card('clock', 'Latest changes', 'who, what and why', feed.length ? el('ul', { class: 'hx' }, feed.map((e) => { const o = orig(e.by); return el('li', null, el('span', { class: 'chip2', style: 'color:' + o.c }, c3ic(o.i, 'sm'), o.l),
229
- el('span', null, (e.title || (((bd.items || []).find((x) => x.rid === e.rid) || {}).title) || e.rid) + ': ' + (e.kind === 'add' ? 'added' : e.kind === 'delete' ? 'deleted' : 'edited'), el('small', null, e.why)), el('span', { class: 'w' }, dayLabel(String(e.at).slice(0, 10)))); })) : el('div', { class: 'fold' }, c3ic('moon', 'sm'), 'No changes are recorded yet.')),
230
- card('shield', 'Rules', '', el('ul', { class: 'chgl' },
231
- el('li', { class: 'ok' }, c3ic('check', 'sm'), el('span', null, 'Every item records who changed it and why.')),
232
- el('li', { class: 'ok' }, c3ic('check', 'sm'), el('span', null, 'Agent additions are proposals until you accept them.')),
233
- el('li', { class: 'warn' }, c3ic('alert', 'sm'), el('span', null, 'A fourth scope change re-baselines the plan.')))),
234
- ];
235
- frame(V, { head, left: [left], right });
236
- }
237
-
238
- const view = makeView('breakdown', { init: (V) => { V.dispose = () => { if (V.sheet) closeSheet(); clearTimeout(V.undoT); }; return load(V); }, render });
239
- export const mount = view.mount;
240
- export const dispose = view.dispose;
@@ -1,11 +0,0 @@
1
- /* pm/c3-brief-data.js — the one read behind the Briefing's Today agenda and the own-item rows of Needs you: GET /api/brief-page
2
- * (lib/routes-brief-page.js). Both sections subscribe; one request answers both. A failed read is kept as { ok:false, error } so each
3
- * section can say so; nothing here invents a row. */
4
- import { pmGet } from './http.js';
5
-
6
- let cache = null; const subs = new Set();
7
- export function onBriefPage(fn) { subs.add(fn); if (cache) fn(cache); return () => subs.delete(fn); }
8
- export function loadBriefPage() {
9
- return pmGet('/api/brief-page').then((j) => (j && j.ok !== false ? j : { ok: false, error: (j && j.error) || 'unreadable' }), (e) => ({ ok: false, error: String((e && e.message) || e) }))
10
- .then((j) => { cache = j; subs.forEach((f) => f(j)); return j; });
11
- }
@@ -1,137 +0,0 @@
1
- /* pm/c3-brief-mentions.js — the Briefing's "Mentions" (initiative c3-brief-summary-mentions).
2
- *
3
- * Everything today's brief marks as a mention of the PM (Slack, Jira, Confluence, mail), from GET /api/brief-page `mentions`
4
- * (routes-brief-page.js mentionsOf). Quiet by default: one line that names who waits on a reply. "Show all" opens the list, with a tab for
5
- * each source that has a mention. A row: the person, the quoted text, the source and place, the time, "needs your reply" or "for your
6
- * information", the initiative. Its actions:
7
- * Open in <source> the mention's own https link, in a new tab (no link, no button)
8
- * Add to Work POST /api/pm-items/add { line: "Reply to <who> (<source>) by today" } (a reply) or "Read <who>'s note (<source>)"
9
- * Mark read POST /api/mentions/read { id, read: true }; Undo sends read: false
10
- * A mention that is a worth-asking item (in_needs) is not listed: Needs you shows it (its row is need_key), and that row carries a "mentioned you" tag
11
- * (tagNeeds, called after every Needs you redraw). Nothing here replies, reacts or posts in Slack, Jira, Confluence or mail. */
12
- import { el } from './dom.js';
13
- import { c3ic } from './pm-work-view.js';
14
- import { pmPost } from './http.js';
15
- import { toast } from './c3-toast.js';
16
- import { onBriefPage, loadBriefPage } from './c3-brief-data.js';
17
- import { button, tabs, SEL, ensureComponentsCss } from './primitives.js';
18
- import { ensureSprite } from './icons.js';
19
- import { srcName, waitingMentions } from './c3-brief-summary.js';
20
- import { rankMentions } from './priority-model.js';
21
-
22
- const p2 = (n) => String(n).padStart(2, '0');
23
- const first = (s) => String(s || '').trim().split(/\s+/)[0];
24
- const ICON = { slack: 'reply', jira: 'org', confluence: 'doc', mail: 'mail' };
25
- const ORDER = ['slack', 'jira', 'confluence', 'mail'];
26
- const post = (p, b) => pmPost(p, b).catch((e) => ({ ok: false, error: String((e && e.message) || e) }));
27
-
28
- /** When, said the way the Briefing says times: "09:15" today, "yesterday 17:05" before. */
29
- function whenOf(iso, now = new Date()) {
30
- if (!iso) return null;
31
- const d = new Date(iso); const hm = p2(d.getHours()) + ':' + p2(d.getMinutes());
32
- const day = (x) => x.getFullYear() * 400 + x.getMonth() * 32 + x.getDate();
33
- if (day(d) === day(now)) return hm;
34
- const y = new Date(now); y.setDate(y.getDate() - 1);
35
- return day(d) === day(y) ? 'yesterday ' + hm : d.getDate() + '/' + (d.getMonth() + 1) + ' ' + hm;
36
- }
37
-
38
- /** The closed line: who waits on a reply, then how many are for information. Pure. */
39
- export function waitingLine(shown) {
40
- const w = waitingMentions(shown); const rest = shown.length - w.length;
41
- if (!w.length) return shown.length + (shown.length === 1 ? ' mention, for your information.' : ' mentions, all for your information.');
42
- const names = w.map((m) => (m.who ? first(m.who) : 'Someone') + ' in ' + srcName(m.source));
43
- const said = names.length < 2 ? names[0] : names.slice(0, -1).join(', ') + ' and ' + names[names.length - 1];
44
- return said + (w.length === 1 ? ' is' : ' are') + ' waiting on your reply.' + (rest ? ' ' + rest + (rest === 1 ? ' more is' : ' more are') + ' for your information.' : '');
45
- }
46
-
47
- export function mentionsSection(S) {
48
- ensureComponentsCss(); ensureSprite();
49
- const st = { open: false, tab: 'all', local: new Map(), list: null };
50
- const count = el('span', { class: 'bdg g' }, '0');
51
- const right = el('span', { class: 'chips2' });
52
- const body = el('div', { 'data-mentions-body': '' });
53
- const box = el('section', { class: 'card sect', 'data-c3pg': 'mentions', 'aria-label': 'Mentions' },
54
- el('div', { class: 'sh2' }, el('h2', null, c3ic('reply', 'sm'), 'Mentions ', count), right), body);
55
- box.hidden = true;
56
-
57
- const all = () => (st.list || []).map((m) => (st.local.has(m.id) ? { ...m, read: st.local.get(m.id) } : m));
58
- const shown = () => all().filter((m) => !m.in_needs && !m.read);
59
-
60
- const markRead = (m, read) => post('/api/mentions/read', { id: m.id, read }).then((r) => {
61
- if (!r || r.ok === false) { toast('That did not go through' + (r && r.error ? ': ' + r.error : '.')); return false; }
62
- st.local.set(m.id, read); draw(); if (S.briefRedraw) S.briefRedraw(); return true;
63
- });
64
- const addToWork = (m) => {
65
- const who = m.who ? first(m.who) : 'the sender';
66
- const line = m.reply ? 'Reply to ' + who + ' (' + srcName(m.source) + ') by today' : 'Read ' + who + '\'s note (' + srcName(m.source) + ')';
67
- return post('/api/pm-items/add', { line }).then((r) => {
68
- if (!r || r.ok === false) { toast('That did not go through' + (r && r.error ? ': ' + r.error : '.')); return; }
69
- toast('Added to Work: ' + line.replace(/ by today$/, ''));
70
- if (S.workChanged) S.workChanged();
71
- });
72
- };
73
-
74
- const rowOf = (m) => {
75
- const when = whenOf(m.at);
76
- const chips = [m.reply ? el('span', { class: 'tag warn', 'data-mention-reply': '' }, 'needs your reply') : el('span', { class: 'tag', 'data-mention-fyi': '' }, 'for your information'),
77
- el('span', { class: 'chip2', 'data-mention-where': '' }, srcName(m.source) + (m.where ? ' · ' + m.where : '')),
78
- when ? el('span', { class: 'chip2' }, c3ic('clock', 'sm'), when) : null,
79
- m.initiative ? el('span', { class: 'chip2' }, c3ic('init', 'sm'), m.initiative) : null];
80
- const acts = el('div', { class: 'mn-acts' },
81
- m.link ? el('a', { class: 'chip2 mn-open', href: m.link, target: '_blank', rel: 'noopener noreferrer', 'data-mention-open': m.id }, c3ic('out', 'sm'), 'Open in ' + srcName(m.source)) : null,
82
- button({ label: 'Add to Work', variant: 'ghost', size: 'sm', icon: 'plus', attrs: { 'data-mention-work': m.id }, onClick: () => addToWork(m) }),
83
- button({ label: 'Mark read', variant: 'ghost', size: 'sm', icon: 'check', attrs: { 'data-mention-read': m.id },
84
- onClick: () => markRead(m, true).then((done) => { if (done) toast('Marked read', () => markRead(m, false)); }) }));
85
- return el('li', { class: 'nrow mn-row', 'data-mention': m.id, 'data-source': m.source },
86
- el('span', { class: 'ki' + (m.reply ? ' hot' : '') }, c3ic(ICON[m.source] || 'reply')),
87
- el('div', { class: 'nb' }, el('span', { class: 'tt' }, m.who || srcName(m.source)), el('div', { class: 'mn-q' }, '"' + m.text + '"'),
88
- el('div', { class: 'chips' }, ...chips.filter(Boolean)), acts),
89
- el('span'));
90
- };
91
-
92
- const toggle = button({ label: 'Show all', variant: 'ghost', size: 'sm', attrs: { 'data-mentions-toggle': '', 'aria-expanded': 'false' }, onClick: () => { st.open = !st.open; draw(); } });
93
- function draw() {
94
- if (!st.list) { box.hidden = st.list === undefined; body.replaceChildren(el('p', { class: 'dim c3s2', 'data-mentions-state': 'none' }, 'PMOS has no brief for today, so no mentions were read.')); count.textContent = '0'; right.replaceChildren(); return; }
95
- box.hidden = false;
96
- const list = shown(); const wait = waitingMentions(list);
97
- count.textContent = String(list.length);
98
- toggle.querySelector(SEL.btnLabel).textContent = st.open ? 'Hide' : 'Show all';
99
- toggle.setAttribute('aria-expanded', String(st.open));
100
- right.replaceChildren(...(wait.length ? [el('span', { class: 'tag warn', 'data-mentions-wait': String(wait.length) }, wait.length + (wait.length === 1 ? ' needs a reply' : ' need a reply'))] : []), ...(list.length ? [toggle] : []));
101
- if (!list.length) { body.replaceChildren(el('p', { class: 'dim c3s2', 'data-mentions-state': 'empty' }, 'No one has mentioned you today.')); return; }
102
- if (!st.open) { body.replaceChildren(el('p', { class: 'mn-line', 'data-mentions-line': '' }, waitingLine(list))); return; }
103
- const srcs = ORDER.filter((k) => list.some((m) => m.source === k)).concat([...new Set(list.map((m) => m.source))].filter((k) => !ORDER.includes(k)));
104
- if (st.tab !== 'all' && !srcs.includes(st.tab)) st.tab = 'all';
105
- const bar = tabs({ ariaLabel: 'Mentions by source', value: st.tab, attrs: { class: 'mn-tabs', 'data-mentions-tabs': '' },
106
- items: ['all', ...srcs].map((k) => ({ id: k, label: k === 'all' ? 'All' : srcName(k), count: k === 'all' ? list.length : list.filter((m) => m.source === k).length })),
107
- onChange: (k) => { // the list draws again; keep the focus on the chosen tab
108
- const had = bar.contains(document.activeElement); st.tab = k; draw();
109
- const now = had && body.querySelector('[data-mentions-tabs] [data-tab="' + k + '"]'); if (now) now.focus();
110
- } });
111
- const rows = list.filter((m) => st.tab === 'all' || m.source === st.tab).sort((a, b) => (b.reply - a.reply) || ((b.at ? Date.parse(b.at) : 0) - (a.at ? Date.parse(a.at) : 0)));
112
- body.replaceChildren(bar, el('ul', { class: 'list', role: 'list', 'data-mentions-list': '' }, ...rows.map(rowOf)));
113
- }
114
-
115
- /* Needs you shows a worth-asking mention as its need_key row: tag it, first among its chips so the quiet layout keeps it */
116
- S.tagNeeds = (host) => {
117
- const by = new Map(all().filter((m) => m.in_needs && m.need_key).map((m) => [m.need_key, m]));
118
- if (!by.size) return;
119
- (host || document).querySelectorAll('[data-needs-row]').forEach((row) => {
120
- const m = by.get(row.dataset.needsRow); const chips = row.querySelector('.nb > .chips');
121
- if (!m || !chips || chips.querySelector('[data-mentioned-you]')) return;
122
- chips.prepend(el('span', { class: 'tag', 'data-mentioned-you': '', title: (m.who ? m.who + ' mentioned you' : 'You were mentioned') + ' in ' + srcName(m.source) }, 'mentioned you'));
123
- });
124
- };
125
-
126
- st.list = undefined;
127
- onBriefPage((j) => {
128
- st.list = j && j.ok !== false ? (Array.isArray(j.mentions) ? rankMentions(j.mentions) : null) : null; // a reply that is needed first, then the one who has waited longest (priority-model.js)
129
- st.local.clear();
130
- draw();
131
- if (S.tagNeeds) S.tagNeeds(S.needsBox);
132
- if (S.briefRedraw) S.briefRedraw();
133
- });
134
- S.mentionsNow = () => (st.list === undefined ? null : st.list ? all() : null);
135
- S.reloadMentions = () => loadBriefPage();
136
- return box;
137
- }