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,61 +0,0 @@
1
- /* pm/portfolio-report.js — the portfolio report, as three ⌘K commands (pm-os-absorb Run 3, slice 3D; PRD R29).
2
- *
3
- * The Portfolio mode is cut (R29): "All repositories" is a choice in Repository ▾ and the per-repository numbers are in Today and
4
- * Initiatives. What the mode still did that nothing else does is write a report across every repository into the hub repository
5
- * (`POST /api/reports`: weekly, OKR, or the initiatives that match a question). That call keeps its one caller here, on a press:
6
- *
7
- * Portfolio report: weekly writes the weekly report
8
- * Portfolio report: OKR writes the OKR report
9
- * Portfolio report: matching… asks which initiatives to report on, then writes it
10
- *
11
- * Each command reads the server's answer and says what happened: the path it wrote and a note for anything it could not read, or
12
- * the server's own reason (for example, no hub repository is set up). The file opens as a document tab. Nothing is written
13
- * until the PM runs a command. Registered when this module loads (panel-cockpit.js imports it); never in fixture mode.
14
- */
15
-
16
- import { state, FIXTURE } from './state.js';
17
- import { pmPost } from './http.js';
18
- import { toast } from './primitives.js';
19
- import { askText } from './dialogs.js';
20
- import { registerCommand } from './registry.js';
21
- import { openDoc } from './panel-initiatives.js';
22
-
23
- export const REPORT_COPY = Object.freeze({
24
- weekly: 'Portfolio report: weekly',
25
- okr: 'Portfolio report: OKR',
26
- query: 'Portfolio report: matching…',
27
- hint: 'all repositories',
28
- askTitle: 'Report on matching initiatives',
29
- askLabel: 'Which initiatives? Type words from their names.',
30
- askConfirm: 'Write report',
31
- writing: 'Writing the report…',
32
- written: (path) => 'Report written to ' + path,
33
- unread: (names) => 'Not fully read: ' + names.join(', '),
34
- failed: 'The report was not written.',
35
- });
36
-
37
- /** Write one report. Resolves to the server's answer, or null when the PM backed out of the question. */
38
- export async function writeReport(kind) {
39
- let q = '';
40
- if (kind === 'query') {
41
- const asked = await askText({ title: REPORT_COPY.askTitle, label: REPORT_COPY.askLabel, value: state.q || '', confirmLabel: REPORT_COPY.askConfirm });
42
- if (asked === null || !String(asked).trim()) return null;
43
- q = String(asked).trim();
44
- }
45
- toast({ text: REPORT_COPY.writing, timeout: 2000 });
46
- const out = await pmPost('/api/reports', { kind, q });
47
- if (!out || out.ok === false) {
48
- toast({ text: (out && out.error) || REPORT_COPY.failed, tone: 'error' });
49
- return out || { ok: false };
50
- }
51
- const unread = Array.isArray(out.unread) ? out.unread : [];
52
- toast({ text: REPORT_COPY.written(out.path) + (unread.length ? '. ' + REPORT_COPY.unread(unread) : '') });
53
- if (out.path) openDoc(null, out.path, 'FILE', out.ws ? { ws: out.ws, branch: null, linked: true } : null);
54
- return out;
55
- }
56
-
57
- if (!FIXTURE) {
58
- for (const kind of ['weekly', 'okr', 'query']) {
59
- registerCommand({ id: 'portfolio-report-' + kind, label: REPORT_COPY[kind], hint: REPORT_COPY.hint, run: () => writeReport(kind) });
60
- }
61
- }
@@ -1,280 +0,0 @@
1
- /* pm/premium-acts.js — the board presses of the premium Board and initiative pages (initiative premium-board-actions).
2
- *
3
- * Every press is a route the console already uses, behind the launch nonce:
4
- * triage POST /api/boards/asks/accept { board, ask, title, lane, anchor } · /asks/decline { board, ask, why }
5
- * new POST /api/boards/asks/add { board, line, source } then /asks/accept, as the console's New initiative does
6
- * move POST /api/boards/move { board, id, to }; its warnings never block
7
- * hold, cancel POST /api/lifecycle { initiative_id, state: on-hold | cancelled | active, reason, back? }
8
- * archive POST /api/boards/archive { board, id, archived, reason? }
9
- * Each result has Undo, which writes the opposite line through the same route. The anchors of a new initiative are read from
10
- * GET /api/boards/anchors. Nothing here reads or writes anything else.
11
- *
12
- * C, the page's context: { ws, board, boardName, self, first, reload }. A row: { id, title, acts } with acts from lib/board-premium.js actsOf
13
- * (or lib/initiative-premium.js): { stages, stage, life: hold | cancelled | null, reason, back, backDay, archived: { reason, into } | null }. */
14
- import { pmPost, pmGet } from './http.js';
15
- import { $, $$, esc, openDlg, popKey, closeDlg, toast, turnA, ptx } from './premium-shell.js';
16
-
17
- const ICO = (p) => `<svg class="i" viewBox="0 0 24 24">${p}</svg>`;
18
- const CHK = '<path d="M5 12.5l4.5 4.5L19 7.5"/>';
19
- const SHD = '<path d="M12 3l8 3v6c0 5-3.5 8-8 9-4.5-1-8-4-8-9V6z"/>';
20
- const DOTS = '<circle cx="5" cy="12" r="1.4"/><circle cx="12" cy="12" r="1.4"/><circle cx="19" cy="12" r="1.4"/>';
21
- export const LANES = [['feature', 'Feature', 'PRD and rubric'], ['discovery', 'Discovery', 'Spike brief'], ['chore', 'Chore', 'One-paragraph intent'], ['incident', 'Incident', 'Post-hoc record'], ['content', 'Content', 'Content brief'], ['prototype', 'Prototype', 'Quick brief, grilled as dialogue']];
22
- const BACK = [['two', 'In 2 weeks', 14], ['month', 'In a month', 30], ['quarter', 'Next quarter', 80], ['none', 'No date', null]];
23
- const WHY = [['needed', 'No longer needed'], ['replaced', 'Replaced by another initiative'], ['worth', 'Not worth it now'], ['kill', 'Hit a kill condition'], ['other', 'Other']];
24
- const AWHY = [['unrelated', 'Not related to this board'], ['stale', 'Old idea, never started'], ['dup', 'Duplicate'], ['other', 'Other']];
25
- const errOf = (r, d) => (r && r.error) || d;
26
- const dayIso = (n) => { const t = new Date(Date.now() + n * 86400000); return t.getFullYear() + '-' + String(t.getMonth() + 1).padStart(2, '0') + '-' + String(t.getDate()).padStart(2, '0'); };
27
-
28
- /* ── the writes ── */
29
- const post = (C, path, body) => pmPost(path, { ws: C.ws, ...body });
30
- const life = (C, id, state, reason, back) => post(C, '/api/lifecycle', { initiative_id: id, state, reason: reason || '', ...(back ? { back } : {}) });
31
- const arch = (C, id, archived, reason) => post(C, '/api/boards/archive', { board: C.board, id, archived, ...(reason ? { reason } : {}) });
32
- const move = (C, id, to) => post(C, '/api/boards/move', { board: C.board, id, to });
33
-
34
- /* ── the result line with Undo, in the page's own toast ── */
35
- let undoT = null;
36
- export function undoToast(msg, undo) {
37
- const t = $('#toast'); clearTimeout(undoT);
38
- t.innerHTML = `<span>${esc(msg)}</span>${undo ? '<button type="button" class="undo" id="paUndo">Undo</button>' : ''}`;
39
- t.classList.add('on');
40
- if (undo) $('#paUndo').onclick = async () => { const b = $('#paUndo'); b.disabled = true; await undo(); };
41
- undoT = setTimeout(() => t.classList.remove('on'), undo ? 9000 : 4200);
42
- }
43
- async function done(C, r, msg, undo) {
44
- if (!r || r.ok !== true) { toast(errOf(r, 'Nothing was recorded. The server did not say why.')); return false; }
45
- undoToast(msg, undo); await C.reload(); return true;
46
- }
47
- const prevOf = (r) => ({ life: r.acts.life, reason: r.acts.reason, backDay: r.acts.backDay || null, archived: !!r.acts.archived });
48
- /** Write the state `p` the row had before a lifecycle press, through the lifecycle route. */
49
- const lifeBack = (C, r, p) => (p.life === 'hold' ? life(C, r.id, 'on-hold', p.reason, p.backDay) : p.life === 'cancelled' ? life(C, r.id, 'cancelled', p.reason) : life(C, r.id, 'active', 'undo'));
50
-
51
- /* ── what a row can do ── */
52
- export function items(C, r) {
53
- const a = r.acts, cur = a.stages.indexOf(a.stage), out = [];
54
- if (a.archived) return [['restore', 'Restore', 'Back in the lists, as it was']];
55
- if (a.life === 'cancelled') return [['reopen', 'Reopen', 'Back to ' + (a.stage || 'its stage') + ', active again']];
56
- if (!C.self && !a.life && cur >= 0) {
57
- if (a.stages[cur + 1]) out.push(['mv:' + (cur + 1), 'Move to ' + a.stages[cur + 1], 'The next stage of its workflow']);
58
- if (cur > 0) out.push(['mv:' + (cur - 1), 'Back to ' + a.stages[cur - 1], 'The stage before']);
59
- }
60
- if (a.life === 'hold') out.push(['resume', 'Resume', 'Back to ' + (a.stage || 'its stage') + ', active again']);
61
- else out.push(['hold', 'Put on hold', 'Pause it; keeps its stage and work']);
62
- out.push(['cancel', 'Cancel', 'Stop it for good, with a reason'], ['archive', 'Archive', 'Out of every list; restore any time']);
63
- return out;
64
- }
65
-
66
- export async function run(C, r, k) {
67
- const a = r.acts, p = prevOf(r);
68
- if (k.startsWith('mv:')) {
69
- const to = a.stages[+k.slice(3)], from = a.stage; if (!to) return;
70
- const res = await move(C, r.id, to);
71
- const w = res && res.ok && Array.isArray(res.warnings) && res.warnings.length ? ' Warning: ' + res.warnings.join('; ') + '. Warnings never block.' : '';
72
- await done(C, res, 'Moved to ' + to + '. Recorded as a move line in the board ledger.' + w, async () => done(C, await move(C, r.id, from), 'Back in ' + from + '. Recorded as a move line.'));
73
- return;
74
- }
75
- if (k === 'hold') return openHold(C, r);
76
- if (k === 'cancel') return openCancel(C, r);
77
- if (k === 'archive') return openArchive(C, r);
78
- if (k === 'resume' || k === 'reopen') {
79
- await done(C, await life(C, r.id, 'active', k === 'resume' ? 'resumed' : 'reopened'), r.title + ' is active again, in ' + (a.stage || 'its stage') + '. Recorded as a lifecycle line.', async () => done(C, await lifeBack(C, r, p), 'Undone. Recorded as a lifecycle line.'));
80
- return;
81
- }
82
- if (k === 'restore') await done(C, await arch(C, r.id, false), r.title + ' is restored. Recorded in the board ledger.', async () => done(C, await arch(C, r.id, true, a.archived.reason), r.title + ' is archived again.'));
83
- }
84
-
85
- /* ── the row's menu ── */
86
- let menu = null;
87
- export const dotsBtn = (r) => `<button type="button" class="inim" data-im="${esc(r.key)}" aria-haspopup="menu" aria-expanded="false" aria-label="Actions for ${esc(r.title)}">${ICO(DOTS)}</button>`;
88
- /** The key of the row whose menu is open, so a page that redraws can open it again on the new button. */
89
- export const menuKey = () => (menu ? menu.btn.dataset.im : null);
90
- export function closeMenu(back) {
91
- if (!menu) return; const { m, btn } = menu; m.remove(); btn.setAttribute('aria-expanded', 'false'); menu = null; if (back) btn.focus();
92
- }
93
- export function openMenu(btn, C, r) {
94
- if (menu && menu.btn === btn) { closeMenu(true); return; }
95
- closeMenu();
96
- const m = document.createElement('div'); m.className = 'dsmn bam2'; m.setAttribute('role', 'menu'); m.setAttribute('aria-label', 'Actions for ' + r.title);
97
- m.innerHTML = items(C, r).map(([k, l, s]) => `<button type="button" role="menuitem" data-pk="${esc(k)}"><span><b>${esc(l)}</b><small>${esc(s)}</small></span></button>`).join('');
98
- btn.parentElement.appendChild(m); btn.setAttribute('aria-expanded', 'true'); menu = { m, btn, C, r };
99
- // a card clips what leaves it: near the card's foot the menu opens upward
100
- const card = btn.closest('.card'); if (card && m.getBoundingClientRect().bottom > card.getBoundingClientRect().bottom - 8) m.classList.add('up');
101
- const f = $('button', m); if (f) f.focus();
102
- }
103
- document.addEventListener('keydown', (e) => {
104
- if (!menu) return;
105
- if (e.key === 'Escape') { e.stopPropagation(); e.preventDefault(); closeMenu(true); return; }
106
- if (e.key === 'ArrowDown' || e.key === 'ArrowUp') { e.preventDefault(); const L = $$('button', menu.m), k = L.indexOf(document.activeElement); L[(k + (e.key === 'ArrowDown' ? 1 : L.length - 1)) % L.length].focus(); }
107
- if (e.key === 'Tab') closeMenu();
108
- }, true);
109
- document.addEventListener('click', (e) => {
110
- if (!menu) return;
111
- const it = e.target.closest('.bam2 [data-pk]');
112
- if (it) { const { C, r } = menu; closeMenu(); run(C, r, it.dataset.pk); return; }
113
- if (!e.target.closest('.bam2') && !e.target.closest('[data-im]')) closeMenu();
114
- });
115
-
116
- /* ── the initiative page's bar ── */
117
- export function barHtml(C, r) {
118
- const a = r.acts, cur = a.stages.indexOf(a.stage), nx = a.stages[cur + 1], pv = cur > 0 ? a.stages[cur - 1] : null;
119
- if (a.archived) return `<div class="lifeb"><div><b>Archived</b><span>${esc(a.archived.into ? 'Merged into ' + a.archived.into : a.archived.reason || 'No reason was given')}. It is out of every list and count of the board. Nothing is deleted.</span></div><button type="button" class="dmcta alt" data-pk="restore">Restore</button></div>`;
120
- if (a.life === 'cancelled') return `<div class="lifeb"><div><b>Cancelled</b><span>${a.reason ? esc(a.reason) + '. ' : ''}It keeps its stage, work and history.</span></div><button type="button" class="dmcta alt" data-pk="reopen">Reopen</button></div>`;
121
- if (a.life === 'hold') return `<div class="lifeb"><div><b>On hold${a.back ? ' · check back ' + esc(a.back) : ''}</b><span>${a.reason ? esc(a.reason) + '. ' : ''}It keeps ${esc(a.stage || 'its stage')}, its work and its history.</span></div><span class="baact"><button type="button" class="dmcta alt" data-pk="resume">Resume</button><button type="button" class="dlink" data-pk="cancel">Cancel</button></span></div>`;
122
- const mv = C.self || cur < 0 ? `<span class="note">${C.self ? 'The stage comes from the repository. It moves when the files land.' : 'Its stage is not one of its workflow\'s stages, so it cannot move from here.'}</span>`
123
- : `${pv ? `<button type="button" class="dmcta alt" data-pk="mv:${cur - 1}">${ICO('<path d="M15 6l-6 6 6 6"/>')}Back to ${esc(pv)}</button>` : ''}${nx ? `<button type="button" class="dmcta alt" data-pk="mv:${cur + 1}">Move to ${esc(nx)}${ICO('<path d="M9 6l6 6-6 6"/>')}</button>` : ''}`;
124
- return `<div class="baiact">${mv}<span class="iamw">${dotsBtn({ key: 'bar', title: r.title }).replace('class="inim"', 'class="dmcta alt inmore"').replace(ICO(DOTS), 'More' + ICO('<path d="m6 9 6 6 6-6"/>'))}</span></div>`;
125
- }
126
- /** The bar's presses: a stage move or a lifecycle press runs at once, More opens the menu without the moves. */
127
- export function onBar(e, C, r) {
128
- if (e.target.closest('.bam2')) return false; // a menu item: the document's listener runs it
129
- const m = e.target.closest('[data-im="bar"]');
130
- if (m) { openMenu(m, C, { ...r, acts: { ...r.acts, stages: [] } }); return true; }
131
- const b = e.target.closest('.baiact [data-pk], .lifeb [data-pk]');
132
- if (!b || b.disabled) return false;
133
- b.disabled = true; run(C, r, b.dataset.pk).finally(() => { b.disabled = false; });
134
- return true;
135
- }
136
-
137
- /* ── the dialogs: one form in the standard dialog's pane, with the conversation beside it (premium-popup-context P1) ── */
138
- const happens = (L) => `<div class="bahp"><p class="label">What happens</p><ul>${L.map((t) => `<li>${ICO(CHK)}<span>${esc(t)}</span></li>`).join('')}</ul></div>`;
139
- const rec = (t) => `<p class="note barec">${ICO(SHD)}<span>${esc(t)}</span></p>`;
140
- const pills = (id, L, cur, lab) => `<div class="chq bapl" id="${id}" role="radiogroup" aria-label="${esc(lab)}">${L.map(([v, l]) => `<button type="button" role="radio" data-v="${v}" aria-checked="${v === cur}" aria-pressed="${v === cur}">${esc(l)}</button>`).join('')}</div>`;
141
- const pick = (e, id) => { const p = e.target.closest('#' + id + ' [data-v]'); if (!p) return null; $$('#' + id + ' [data-v]').forEach((q) => { q.setAttribute('aria-pressed', q === p); q.setAttribute('aria-checked', q === p); }); return p.dataset.v; };
142
- const msgP = (id) => `<p class="note" id="${id}" role="status"></p>`;
143
- function form(o) {
144
- openDlg({ eye: o.eye, title: o.title, sub: o.sub, say: o.say, stream: turnA(ptx(o.say)), noteKey: popKey('act', o.eye, o.title), pane: `<article class="paper doc"><div class="addf">${o.body}</div></article>`, label: o.label || 'Detail' });
145
- }
146
- async function press(go, m, fn) {
147
- go.disabled = true; m.textContent = '';
148
- const r = await fn();
149
- if (r && r.ok === true) return r;
150
- go.disabled = false; m.textContent = errOf(r, 'Nothing was recorded. The server did not say why.'); return null;
151
- }
152
-
153
- function openHold(C, r) {
154
- let back = 'month';
155
- form({ eye: 'Put on hold', title: 'Put on hold', sub: r.title, say: 'Say why it is paused, and when to look at it again.', body: `
156
- <label><span>Why is it paused <em>optional</em></span><textarea id="paHR" rows="2" maxlength="500" placeholder="For example: waiting for the Q1 budget decision"></textarea></label>
157
- <div><span class="label">Check back</span>${pills('paHB', BACK.map((q) => [q[0], q[1]]), back, 'Check back')}</div>
158
- ${happens(['Keeps its stage' + (r.acts.stage ? ' (' + r.acts.stage + ')' : '') + ', its work and its history.', 'Shows as On hold and leaves the on-track and need-a-look counts.', 'The check-back day shows on its page.'])}
159
- ${rec('Recorded: one on-hold line in lifecycle.jsonl, with your reason and the check-back day. Undo writes the state it had before.')}
160
- ${msgP('paHM')}<div class="cact"><button type="button" class="cta" id="paHGo">Put on hold</button><button type="button" class="cta alt" id="paHNo">Not now</button></div>` });
161
- $('#oMain').onclick = async (e) => {
162
- const v = pick(e, 'paHB'); if (v) { back = v; return; }
163
- if (e.target.closest('#paHNo')) { closeDlg(); return; }
164
- if (!e.target.closest('#paHGo')) return;
165
- const bk = BACK.find((q) => q[0] === back), day = bk[2] != null ? dayIso(bk[2]) : null, why = $('#paHR').value.trim(), p = prevOf(r);
166
- const res = await press($('#paHGo'), $('#paHM'), () => life(C, r.id, 'on-hold', why, day)); if (!res) return;
167
- closeDlg(); await done(C, res, r.title + ' is on hold. Recorded as a lifecycle line.', async () => done(C, await lifeBack(C, r, p), r.title + ' is back as it was.'));
168
- };
169
- }
170
- function openCancel(C, r) {
171
- let why = '';
172
- form({ eye: 'Cancel', title: 'Cancel the initiative', sub: r.title, say: 'Pick a reason. Cancel needs one before it can record.', body: `
173
- <div><span class="label">Why</span>${pills('paCW', WHY, '', 'Why')}</div>
174
- <label><span>Note <em>optional</em></span><textarea id="paCN" rows="2" maxlength="400" placeholder="What did we learn, and who was told"></textarea></label>
175
- ${happens(['Shows as Cancelled. The counts treat it as cancelled, not done.', 'It leaves the lists. Show them, under the list, brings it back into view.', 'Keeps its stage, its work and its history. Reopen it any time.'])}
176
- ${rec('Recorded: one cancelled line in lifecycle.jsonl, with the reason. Undo writes the state it had before.')}
177
- <p class="note" id="paCM" role="status">Pick a reason to cancel.</p><div class="cact"><button type="button" class="cta" id="paCGo" disabled>Cancel initiative</button><button type="button" class="cta alt" id="paCNo">Not now</button></div>` });
178
- $('#oMain').onclick = async (e) => {
179
- const v = pick(e, 'paCW'); if (v) { why = v; $('#paCGo').disabled = false; $('#paCM').textContent = ''; return; }
180
- if (e.target.closest('#paCNo')) { closeDlg(); return; }
181
- if (!e.target.closest('#paCGo')) return;
182
- if (!why) { $('#paCM').textContent = 'Pick a reason to cancel.'; return; }
183
- const n = $('#paCN').value.trim(), reason = WHY.find((q) => q[0] === why)[1] + (n ? ': ' + n : ''), p = prevOf(r);
184
- const res = await press($('#paCGo'), $('#paCM'), () => life(C, r.id, 'cancelled', reason)); if (!res) return;
185
- closeDlg(); await done(C, res, r.title + ' is cancelled. Recorded as a lifecycle line.', async () => done(C, await lifeBack(C, r, p), r.title + ' is back as it was.'));
186
- };
187
- }
188
- function openArchive(C, r) {
189
- let why = 'unrelated';
190
- form({ eye: 'Archive', title: 'Archive the initiative', sub: r.title, say: 'Archive takes it out of the board. It is not a status, and nothing is deleted.', body: `
191
- <div><span class="label">Why</span>${pills('paAW', AWHY, why, 'Why')}</div>
192
- <label><span>Note <em>optional</em></span><textarea id="paAN" rows="2" maxlength="200" placeholder="Anything you want to remember about it"></textarea></label>
193
- ${happens(['It leaves every list, count and timeline of the board.', 'Nothing is deleted. The record, its work and its history stay in the repository.', 'Restore it any time, as it was.'])}
194
- ${rec('Recorded: one archive line in the board ledger (boards.jsonl), with the reason. Undo and Restore write a restore line.')}
195
- ${msgP('paAM')}<div class="cact"><button type="button" class="cta" id="paAGo">Archive</button><button type="button" class="cta alt" id="paANo">Not now</button></div>` });
196
- $('#oMain').onclick = async (e) => {
197
- const v = pick(e, 'paAW'); if (v) { why = v; return; }
198
- if (e.target.closest('#paANo')) { closeDlg(); return; }
199
- if (!e.target.closest('#paAGo')) return;
200
- const n = $('#paAN').value.trim().replace(/\s+/g, ' '), reason = AWHY.find((q) => q[0] === why)[1] + (n ? ': ' + n : '');
201
- const res = await press($('#paAGo'), $('#paAM'), () => arch(C, r.id, true, reason)); if (!res) return;
202
- closeDlg(); await done(C, res, r.title + ' is archived. Recorded in the board ledger.', async () => done(C, await arch(C, r.id, false), r.title + ' is restored.'));
203
- };
204
- }
205
-
206
- /* ── new asks and New initiative ── */
207
- export function asksHtml(C, A) {
208
- const ic = ICO('<path d="M4 4h16v12H8l-4 4z"/>');
209
- if (C.self) return `<section class="card baask" id="cAsks" aria-labelledby="hAsks"><div class="ch"><span class="ic">${ic}</span><h2 id="hAsks">New asks</h2><small>none</small></div><p class="note">PMOS-self has no ask source. New work starts at the pmos-router skill.</p></section>`;
210
- const L = A.rows;
211
- const body = A.missing ? '<p class="note">The new asks could not be read, so none is shown.</p>' : L.length ? `<div class="bal" role="list">${L.map((a) => `<div class="baa" role="listitem"><p class="baq">“${esc(a.line)}”</p><small class="bam">${esc([a.source || 'Typed in the console', a.by, a.at].filter(Boolean).join(' · '))}</small><div class="bad2">${a.draft.lane ? `<span>${esc(LANES.find((l) => l[0] === a.draft.lane)[1])}</span>` : ''}<span>${a.draft.anchor ? 'Anchor: ' + esc(a.draft.anchor) : 'No anchor suggested'}</span></div><div class="baact"><button type="button" class="dmcta" data-ask="acc:${esc(a.id)}">Accept</button><button type="button" class="dmcta alt" data-ask="dec:${esc(a.id)}">Decline</button></div></div>`).join('')}</div>` : '<p class="note">Nothing new to triage on this board.</p>';
212
- return `<section class="card baask" id="cAsks" aria-labelledby="hAsks"><div class="ch"><span class="ic">${ic}</span><h2 id="hAsks">New asks</h2><small>${A.missing ? 'not read' : L.length + ' to triage'}</small></div>${body}
213
- <p class="note">Accept starts an initiative in ${esc(C.first || 'the first stage')}. Decline records why. The title, lane and anchor come from the intake draft, and you can change them.</p></section>`;
214
- }
215
- export function onAsks(e, C, A) {
216
- const b = e.target.closest('[data-ask]'); if (!b) return false;
217
- const [k, id] = [b.dataset.ask.slice(0, 3), b.dataset.ask.slice(4)], a = A.rows.find((x) => x.id === id); if (!a) return true;
218
- if (k === 'acc') openIniForm(C, a); else openDecline(C, a);
219
- return true;
220
- }
221
-
222
- let anchors = null;
223
- async function anchorsOf(C) {
224
- if (anchors && anchors.key === C.ws + '/' + C.board) return anchors;
225
- const r = await pmGet('/api/boards/anchors?ws=' + encodeURIComponent(C.ws || '') + '&board=' + encodeURIComponent(C.board || ''));
226
- anchors = { key: C.ws + '/' + C.board, list: r && r.ok && Array.isArray(r.anchors) ? r.anchors : null };
227
- return anchors;
228
- }
229
- /** The form of New initiative (a = null) and of Accept (a = the ask): title, lane and anchor, from the intake draft when there is one. */
230
- export async function openIniForm(C, a) {
231
- const d = a ? a.draft : { title: '', lane: 'feature', anchor: '' };
232
- const lane0 = d.lane || 'feature';
233
- form({ eye: a ? 'Accept an ask' : 'New initiative', title: a ? 'Accept ask' : 'New initiative', sub: C.boardName, label: 'Initiative',
234
- say: a ? 'The intake draft gives the title, lane and anchor. Change any of them, then accept.' : 'Give it a title, a lane and an anchor. It lands in ' + (C.first || 'the first stage') + '.',
235
- body: `${a ? `<p class="baq">“${esc(a.line)}”</p>` : ''}
236
- <label>Title<input id="paNT" maxlength="120" value="${esc(d.title)}" placeholder="For example: Per-key API usage for partners"></label>
237
- <div class="two"><label>Lane<select id="paNL">${LANES.map((l) => `<option value="${l[0]}"${l[0] === lane0 ? ' selected' : ''}>${l[1]}: ${l[2]}</option>`).join('')}</select></label>
238
- <label id="paNAw">Anchor<select id="paNA" disabled><option>Reading the anchors</option></select></label></div>
239
- <p class="note" id="paNAh">Every initiative anchors to a KR or a declared health budget. Unanchored work is rejected.</p>
240
- ${rec(a ? 'Recorded: an accept line for the ask in the board ledger, and a new initiative record with the title, lane and anchor.' : 'Recorded: the title as an ask in the board ledger, its accept line, and a new initiative record with the title, lane and anchor, as the console\'s New initiative does.')}
241
- ${msgP('paNM')}<div class="cact"><button type="button" class="cta" id="paNGo">${a ? 'Accept into ' : 'Create in '}${esc(C.first || 'the first stage')}</button><button type="button" class="cta alt" id="paNNo">Cancel</button></div>` });
242
- const A = await anchorsOf(C);
243
- if (!$('#paNA')) return;
244
- if (A.list && A.list.length) {
245
- const has = A.list.some((x) => x.value === d.anchor);
246
- $('#paNA').outerHTML = `<select id="paNA"><option value="">Choose a KR or a health budget</option>${d.anchor && !has ? `<option value="${esc(d.anchor)}" selected>Suggested: ${esc(d.anchor)}</option>` : ''}${A.list.map((x) => `<option value="${esc(x.value)}"${x.value === d.anchor ? ' selected' : ''}>${esc(x.label || x.value)}</option>`).join('')}</select>`;
247
- } else {
248
- $('#paNA').outerHTML = `<input id="paNA" maxlength="120" value="${esc(d.anchor)}" placeholder="For example: health:tech">`;
249
- $('#paNAh').textContent = 'The declared anchors could not be read, so type one: a KR id or health:<budget>. Unanchored work is rejected.';
250
- }
251
- $('#oMain').onclick = async (e) => {
252
- if (e.target.closest('#paNNo')) { closeDlg(); return; }
253
- if (!e.target.closest('#paNGo')) return;
254
- const title = $('#paNT').value.trim(), lane = $('#paNL').value, anchor = $('#paNA').value.trim(), m = $('#paNM');
255
- if (!title) { m.textContent = 'Give it a title.'; $('#paNT').focus(); return; }
256
- if (!anchor) { m.textContent = 'Choose an anchor. Unanchored work is rejected.'; $('#paNA').focus(); return; }
257
- const res = await press($('#paNGo'), m, async () => {
258
- let ask = a ? a.id : null;
259
- if (!ask) { const r0 = await post(C, '/api/boards/asks/add', { board: C.board, line: title, source: 'New initiative, typed by you' }); if (!r0 || r0.ok !== true) return r0; ask = r0.ask && r0.ask.id; }
260
- return post(C, '/api/boards/asks/accept', { board: C.board, ask, title, lane, anchor });
261
- });
262
- if (!res) return;
263
- closeDlg(); await done(C, res, '“' + title + '” is ' + (a ? 'accepted' : 'created') + ' in ' + (res.stage || C.first || 'the first stage') + ', anchored to ' + anchor + '.' + (res.initiative ? ' Its record is ' + res.initiative + '.' : ''));
264
- };
265
- }
266
- function openDecline(C, a) {
267
- form({ eye: 'Decline an ask', title: 'Decline ask', sub: [a.source, a.by].filter(Boolean).join(' · ') || C.boardName, say: 'Say why. The reason is kept with the ask.', body: `<p class="baq">“${esc(a.line)}”</p>
268
- <label>Reason<textarea id="paDW" rows="3" maxlength="500" placeholder="Why not? The reason is kept with the ask."></textarea></label>
269
- ${rec('Recorded: a decline line for the ask in the board ledger, with the reason.')}
270
- ${msgP('paDM')}<div class="cact"><button type="button" class="cta" id="paDGo" disabled>Decline</button><button type="button" class="cta alt" id="paDNo">Cancel</button></div>` });
271
- $('#oMain').oninput = (e) => { if (e.target.id === 'paDW') $('#paDGo').disabled = !e.target.value.trim(); };
272
- $('#oMain').onclick = async (e) => {
273
- if (e.target.closest('#paDNo')) { closeDlg(); return; }
274
- if (!e.target.closest('#paDGo')) return;
275
- const why = $('#paDW').value.trim().replace(/\s+/g, ' ');
276
- if (!why) { $('#paDM').textContent = 'Say why. A decline needs a reason.'; return; }
277
- const res = await press($('#paDGo'), $('#paDM'), () => post(C, '/api/boards/asks/decline', { board: C.board, ask: a.id, why })); if (!res) return;
278
- closeDlg(); await done(C, res, 'Ask declined. The reason is kept in the board ledger.');
279
- };
280
- }
@@ -1,111 +0,0 @@
1
- /* pm/premium-brief.js — the premium Briefing's headline paragraph is the console's "The brief" (parity rule: the console is the content baseline).
2
- *
3
- * consoleBrief(now?) → Promise of { parts: [{ t, go? }], sources } | null reads what the console Briefing reads, composes with composeBrief
4
- * briefNeeds(b, page, agent) → { decisions, own, agentN } PURE. The rows the console's Needs you holds, in its ranked order (c3-brief-needs.js)
5
- * briefInputOf(...) → the composeBrief input PURE
6
- * needsListOf(reads, ws) → the rows of "What you need to do", one per console Needs you row, in its order PURE
7
- * The same five reads, the same row rules and the same composer as the console: GET /api/briefing, GET /api/brief-page, GET /api/needs (agent drafts),
8
- * the calendar quarter, and the day part of the clock. A read that fails leaves its sentence out. null when the needs reads failed, so the page keeps
9
- * its own records-only hero rather than guess. No write, no model call. */
10
- import { composeBrief } from './c3-brief-summary.js';
11
- import { isDecision, fromCard } from './c3-brief-needs.js';
12
- import { rank, fromOwn, fromDecision, fromAgent, rankMentions } from './priority-model.js';
13
- import { dayPartFor } from './briefing-model.js';
14
- import { loadBriefing } from './shell-ticker.js';
15
- import { loadBriefPage } from './c3-brief-data.js';
16
- import { loadDriverNeeds } from './c3-driver.js';
17
- import { readQuarter } from './c3-plan.js';
18
- import { pulseRows } from './c3-brief-pulse.js';
19
- import { cardView, TAG_STYLE } from './briefing-model.js';
20
-
21
- /** The rows Needs you shows, ranked together as the console does: group rows are not counted, a row held back is not shown. */
22
- export function briefNeeds(b, page, agent) {
23
- const decide = ((b && b.cards) || []).filter(isDecision);
24
- const needs = b && Array.isArray(b.needs) && b.needs.length ? b.needs.map(fromCard) : null;
25
- const decRows = needs || decide.map(cardView).map((v, i) => { const T = TAG_STYLE[v.tag] || TAG_STYLE['Just in']; return { key: v.key || String(i), headline: v.headline, kind: v.tag, icon: T.icon, color: T.color, time: v.deadline && v.deadline.text ? v.deadline.text : null, src: v.tag, view: v }; });
26
- const meta = new Map(decRows.map((n) => {
27
- const late = /^(\d+) days? overdue$/.exec(String(n.dueText || ''));
28
- return [String(n.key), { time: n.time || null, decide: !!n.view || /^decide$/i.test(String(n.kind || '')), overdue: n.kind === 'Overdue', days_late: late ? Number(late[1]) : 0 }];
29
- }));
30
- const ownRows = (page && page.ok !== false ? (page.needs || []) : []).filter((r) => r.kind !== 'decision');
31
- const pool = [
32
- ...ownRows.map((r) => ({ src: 'own', raw: r, rank: fromOwn(r) })),
33
- ...(agent || []).map((r) => ({ src: 'agent', raw: r, rank: fromAgent(r) })),
34
- ...decRows.map((n) => ({ src: 'decision', raw: n, rank: fromDecision(n) })),
35
- ];
36
- const byKey = new Map(pool.map((x) => [x.rank.key, x]));
37
- const R = rank(pool.map((x) => x.rank), { held: page && page.held && typeof page.held === 'object' ? page.held : null });
38
- const ordered = [...R.first, ...R.rest].filter((r) => !(R.byKey.get(r.key) || {}).members).map((r) => byKey.get(r.key)).filter(Boolean);
39
- const decisions = ordered.filter((x) => x.src === 'decision').map((x) => { const m = meta.get(String(x.raw.key)) || {}; return { key: String(x.raw.key), headline: x.raw.headline || '', time: m.time || null, decide: !!m.decide, overdue: !!m.overdue, days_late: m.days_late || 0 }; });
40
- const own = ordered.filter((x) => x.src === 'own').map((x) => ({ key: String(x.raw.key), headline: x.raw.headline || '', kind: x.raw.kind, days_late: x.raw.days_late || 0 }));
41
- return { decisions, own, agentN: ordered.filter((x) => x.src === 'agent').length, ordered };
42
- }
43
-
44
- /** The driver target a drafts row is about, from its run id (lib/driver-needs.js: driver-needs:<drafts|blocked>:<kind>:<ws>:<id>). null when it does not parse. */
45
- export function propTarget(r) {
46
- const m = /:(?:drafts|blocked):(initiative|work):([^:]*):(.+)$/.exec(String((r && r.run_id) || ''));
47
- if (m) return { kind: m[1], ws: m[2] || null, id: m[3] };
48
- return r && r.initiative_id ? { kind: 'initiative', ws: r.ws || null, id: r.initiative_id } : null;
49
- }
50
- const lateWord = (d) => (d === 1 ? '1 day late' : d + ' days late');
51
- const factText = (f) => (f && typeof f === 'object' ? f.text : f);
52
- /** One row of "What you need to do" from one row of the console's Needs you. A row says only what the console row's own data says:
53
- * no "If you skip" line (no record holds one). go: where a press goes, the item's own page; null opens the Briefing's dialog.
54
- * prop: on a driver drafts row, the target whose proposals the Briefing's Agent proposals dialog shows.
55
- * docs: on a portfolio documents drafts row, { scope, ws, path }: the Briefing opens that draft in the document sheet. */
56
- export function needsRowOf(x, ws) {
57
- const r = x.raw, q = (k, v) => k + '=' + encodeURIComponent(v);
58
- if (x.src === 'own') {
59
- const when = r.kind === 'overdue' ? lateWord(Math.max(1, Number(r.days_late) || 1)) : r.kind === 'due-today' ? 'Due today' : r.offline ? 'Outside PMOS' : '';
60
- return { key: 'own:' + r.key, src: 'own', title: r.headline || '', subject: ['Yours', when, r.person ? 'with ' + r.person : ''].filter(Boolean).join(' · '),
61
- prepared: r.evidence && r.evidence.text ? 'Looks done: ' + r.evidence.text + '. Confirm it in My work.' : 'Open it in My work to mark it done, put it off or drop it.',
62
- go: r.id ? '/premium.html?' + [q('item', r.id), ws ? q('ws', ws) : ''].filter(Boolean).join('&') : null };
63
- }
64
- if (x.src === 'agent') {
65
- const blocked = r.kind === 'driver-blocked', docs = r.kind === 'core-doc-drafts', ini = r.initiative_id || '';
66
- const row = { key: 'agent:' + r.run_id, src: 'agent', title: r.question || '', subject: ['From the agent', blocked ? 'waiting on you' : 'drafts to review', ini].filter(Boolean).join(' · '),
67
- prepared: blocked ? 'The agent will not go on until you decide.' : docs ? 'Review each draft, then issue it.' : 'Keep, send back or drop each draft.', go: null };
68
- if (!docs) return { ...row, prop: propTarget(r) }; // the driver's drafts open the Briefing's own Agent proposals dialog, that target's only
69
- const wsQ = r.ws || ws;
70
- row.go = ini ? '/premium-initiative.html?' + [q('id', ini), wsQ ? q('ws', wsQ) : ''].filter(Boolean).join('&')
71
- : r.board ? '/premium-board.html?' + [wsQ ? q('ws', wsQ) : '', q('board', r.board)].filter(Boolean).join('&')
72
- : null;
73
- if (!row.go) row.docs = { scope: r.scope || 'portfolio', ws: wsQ || null, path: r.doc || null }; // portfolio documents: the document sheet, on the Briefing
74
- return row;
75
- }
76
- const v = r.view || null;
77
- const facts = v ? v.facts : (r.facts || []).map(factText).filter(Boolean);
78
- const say = (v ? v.why : r.why) || '';
79
- return { key: 'dec:' + r.key, src: 'decision', title: r.headline || '', subject: [v ? v.tag : r.kind, r.dueText || (v && v.deadline && v.deadline.text) || r.time || '', r.src && r.src !== (v && v.tag) ? r.src : ''].filter(Boolean).join(' · '),
80
- prepared: say || facts[0] || '', facts, options: v ? v.options.map((o) => o.label) : [], url: (v ? v.url : r.url) || null, urlLabel: (v ? v.urlLabel : r.url_label) || null, go: null };
81
- }
82
-
83
- /** "What you need to do" in the console's Needs you order. null when the needs reads failed. */
84
- export function needsListOf({ b, page, agent }, ws) {
85
- if (!page || page.ok === false) return null;
86
- const { ordered } = briefNeeds(b, page, agent);
87
- return ordered.map((x) => needsRowOf(x, ws));
88
- }
89
-
90
- export function briefInputOf({ b, page, agent, quarter, now }) {
91
- const p = page && page.ok !== false ? page : null;
92
- const n = p ? briefNeeds(b, p, agent) : null;
93
- return { lens: dayPartFor(now || new Date()), decisions: n ? n.decisions : null, own: n ? n.own : null, agentN: n ? n.agentN : 0,
94
- mentions: p && Array.isArray(p.mentions) ? rankMentions(p.mentions) : null, agenda: p ? (p.today || []) : null,
95
- pulse: quarter && quarter.ok !== false ? pulseRows(quarter.gantt) : null };
96
- }
97
-
98
- /** The console Briefing's reads, once. */
99
- export async function consoleReads() {
100
- const [b, page, agent, quarter] = await Promise.all([loadBriefing(true), loadBriefPage(), loadDriverNeeds().catch(() => []), readQuarter().catch(() => null)]);
101
- return { b, page, agent, quarter };
102
- }
103
-
104
- export function briefOf(reads, now) {
105
- const { page } = reads;
106
- if (!page || page.ok === false) return null; // the needs reads failed: keep the records-only hero rather than half a brief
107
- const r = composeBrief(briefInputOf({ ...reads, now }));
108
- return r.parts.length ? r : null;
109
- }
110
-
111
- export async function consoleBrief(now) { return briefOf(await consoleReads(), now); }
@@ -1,22 +0,0 @@
1
- /* pm/premium-chat.js — the chat of Home (initiative premium-agreed-design, H2 and H3). It was the Chat page (initiative premium-chat-page);
2
- * /premium-chat.html now opens Home with the same query, and this file opens the chat there.
3
- * On a desktop the chat is docked beside Home's list, so it always opens: ?about=<key>&label=<name> is the conversation the PM came from, and
4
- * without it, the PM's own chat (chat:main). On a phone the list is the page and the chat is a popup: it opens only when the address asks for it.
5
- * premium-reports-from-chat (slice C): ?open=report:<id> | chart:<id> | dashboard:<id> opens that one in its tab beside the chat, and ?say=<words>
6
- * puts a first message in the box for the PM to send. Insights links here for New, Edit and Shape it. */
7
- import { openChatPage, openBlockTab, growAsk, homeDock } from './premium-shell.js';
8
-
9
- const q = new URLSearchParams(location.search);
10
- // a conversation key as the ask route takes it (lib/briefing-premium-agent.js KEY_RE); anything else is the PM's own chat
11
- // Board's and Insights' "Ask about this" / "Ask why" land here as ?ask=<initiative id> | board:<key> | insights | verdict, with the question in q
12
- const ask = q.get('ask') || '';
13
- const asked = !ask ? '' : /^board:/.test(ask) ? ask : /^(insights|verdict)$/.test(ask) ? 'ins:' + ask : 'init:' + ask;
14
- const KEY = /^(decision|blocked|waited|src|ev|work|board|init|doc|ins):[A-Za-z0-9][A-Za-z0-9._:-]{0,100}$/;
15
- const about = KEY.test(q.get('about') || '') ? q.get('about') : KEY.test(asked) ? asked : null;
16
- const open = /^(report|chart|dashboard):([A-Za-z0-9][A-Za-z0-9._:-]{0,119})$/.exec(q.get('open') || '');
17
- const say = (q.get('say') || q.get('q') || '').slice(0, 500);
18
- if (homeDock() || about || open || say) {
19
- openChatPage(about || 'chat:main', about ? (q.get('label') || '').slice(0, 80) : '');
20
- if (open) openBlockTab({ kind: open[1], id: open[2] });
21
- if (say) { const inp = document.querySelector('#askIn'); if (inp) { inp.value = say; growAsk(); inp.focus(); inp.setSelectionRange(say.length, say.length); } }
22
- }