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,90 +0,0 @@
1
- /* tab-web.js — the `web` tab kind (overhaul-r5, decision D69).
2
- *
3
- * A web page in a tab, opened ONLY by the PM: typed into the 🌐 control, or chosen with the ⧉ beside a
4
- * document's link. It never loads by itself — a tab restored after a reload shows its address and
5
- * waits for "load this page". The page is loaded by the browser, directly from its origin, in a
6
- * sandboxed frame; the PMOS server never fetches, proxies or stores it. Only http: and https:.
7
- */
8
- import { el, setChildren } from './dom.js';
9
- import { state, setState } from './state.js';
10
- import { askText } from './dialogs.js';
11
-
12
- const iv = (v) => el('span', null, v === null || v === undefined ? '' : String(v));
13
- const BTN = 'font-family:var(--mono);font-size:10.5px;padding:3px 9px;border:1px solid var(--border);color:var(--muted-foreground);min-height:26px';
14
- const SANDBOX = 'allow-scripts allow-forms allow-popups allow-same-origin';
15
-
16
- /* Tabs whose page the PM loaded IN THIS PAGE'S LIFETIME. Deliberately not persisted: after a reload
17
- * the set is empty, so every restored web tab waits for a press (D69 rule 2). */
18
- const loaded = new Set();
19
-
20
- /** `{ ok, url }` for a full http(s) URL, else `{ ok:false, error }`. No scheme is guessed: an
21
- * address without one (or a protocol-relative one) is refused with the reason, never completed. */
22
- export function checkUrl(raw) {
23
- const s = String(raw == null ? '' : raw).trim();
24
- if (!s) return { ok: false, error: 'no address given' };
25
- if (!/^[a-z][a-z0-9+.-]*:/i.test(s)) return { ok: false, error: `"${s}" has no scheme — type the full address, starting with http or https (D69)` };
26
- let u;
27
- try { u = new URL(s); } catch { return { ok: false, error: `"${raw}" is not a web address` }; }
28
- if (u.protocol !== 'http:' && u.protocol !== 'https:') {
29
- return { ok: false, error: `only http and https pages open in a tab — "${u.protocol}" is refused (D69)` };
30
- }
31
- return { ok: true, url: u.href };
32
- }
33
-
34
- /** Open (or focus) a web tab for `raw` — the PM's own action, so it loads immediately. */
35
- export async function openWeb(raw, opts) {
36
- const c = checkUrl(raw);
37
- if (!c.ok) { setState({ webNotice: c.error }); return c; }
38
- const ini = await import('./panel-initiatives.js');
39
- const id = 'web:' + c.url;
40
- loaded.add(id);
41
- let host = c.url;
42
- try { host = new URL(c.url).host; } catch { /* keep the href */ }
43
- ini.openTab({ id, kind: 'web', title: host, url: c.url, role: 'WEB', slug: (opts && opts.slug) || null,
44
- repo: (opts && opts.repo) || state.product || null });
45
- setState({ webNotice: null });
46
- return c;
47
- }
48
-
49
- /** The 🌐 control's action: ask for an address, then open it. */
50
- export async function promptWeb() {
51
- const raw = await askText({ title: 'Open a web page in a tab', label: 'The full address, starting with http or https.', placeholder: 'https://', confirmLabel: 'Open' });
52
- if (raw === null || !String(raw).trim()) return;
53
- openWeb(raw);
54
- }
55
-
56
- export function mountWeb(host, tab) {
57
- const c = checkUrl(tab.url);
58
- if (!c.ok) {
59
- setChildren(host, [el('div', { style: 'padding:20px 24px;color:var(--destructive);font-size:13px', 'data-r5': 'refused' },
60
- iv('This web tab was not loaded — ' + c.error))]);
61
- return;
62
- }
63
- const bar = el('div', { style: 'flex:none;display:flex;gap:6px;align-items:center;padding:6px 10px;border-bottom:1px solid var(--border);background:var(--background)' },
64
- el('span', { style: 'font-family:var(--mono);font-size:11px;color:var(--muted-foreground);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;flex:1', 'data-r5': 'address', title: c.url }, iv(c.url)),
65
- el('button', { onClick: () => { loaded.add(tab.id); frames.delete(tab.id); setState({}); }, style: BTN, hover: 'color:var(--foreground)', title: 'reload the page' }, '↻'),
66
- el('a', { href: c.url, target: '_blank', rel: 'noopener noreferrer', style: BTN + ';text-decoration:none', 'data-r5': 'open-browser' }, 'open in your browser'));
67
- if (!loaded.has(tab.id)) {
68
- setChildren(host, [bar, el('div', { style: 'flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;color:var(--muted-foreground);font-size:13px', 'data-r5': 'waiting' },
69
- iv('This page is not loaded. PMOS never opens a web page by itself (D69).'),
70
- el('button', { onClick: () => { loaded.add(tab.id); setState({}); }, style: BTN + ';font-size:12px;padding:6px 14px', hover: 'color:var(--foreground)', 'data-r5': 'load' }, 'load this page'))]);
71
- return;
72
- }
73
- setChildren(host, [bar, frameFor(tab.id, c.url)]);
74
- }
75
-
76
- /* One frame per tab for the tab's life, so switching tabs does not reload the page. */
77
- const frames = new Map();
78
- function frameFor(id, url) {
79
- let f = frames.get(id);
80
- if (!f || f.getAttribute('src') !== url) {
81
- // A page on the workspace's OWN origin must not get allow-same-origin: with allow-scripts it
82
- // could reach into the workspace itself. External origins keep it so real sites work.
83
- let same = false;
84
- try { same = typeof location !== 'undefined' && new URL(url).origin === location.origin; } catch { /* external */ }
85
- f = el('iframe', { src: url, sandbox: same ? 'allow-scripts allow-forms allow-popups' : SANDBOX, referrerpolicy: 'no-referrer', 'data-r5': 'frame',
86
- style: 'flex:1;width:100%;min-height:0;border:0;background:#fff', title: url });
87
- frames.set(id, f);
88
- }
89
- return f;
90
- }
@@ -1,48 +0,0 @@
1
- /* pm/timeline-copy.js — every word the Timelines show (pm-os-absorb Run 4: slice 4B writes it, 4C imports it).
2
- *
3
- * Pure data and pure functions. No DOM and no import, so `glossary.test.js` can load this file in Node and check every
4
- * string against the glossary rules (GLOSSARY below also holds guide/timeline.md to them). A string that a person reads
5
- * on Breakdown › Timeline is written here and nowhere else. Dates arrive already short ("20 Oct").
6
- */
7
-
8
- export const MONTHS = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
9
-
10
- /** "2026-10-20" -> "20 Oct". A date-only value is read as a calendar day, never shifted by the time zone. */
11
- export function shortDate(ymd) {
12
- const m = /^(\d{4})-(\d{2})-(\d{2})/.exec(String(ymd || ''));
13
- if (!m) return '';
14
- return Number(m[3]) + ' ' + MONTHS[Number(m[2]) - 1];
15
- }
16
-
17
- /** "2026-10" -> "Oct", and "Jan 2027" for a January, so the year shows where it changes. */
18
- export function monthLabel(ym) {
19
- const m = /^(\d{4})-(\d{2})/.exec(String(ym || ''));
20
- if (!m) return '';
21
- return Number(m[2]) === 1 ? 'Jan ' + m[1] : MONTHS[Number(m[2]) - 1];
22
- }
23
-
24
- export const COPY = {
25
- view: 'Timeline',
26
- chart: 'Timeline of the items',
27
- today: 'Today',
28
- all: 'All items',
29
- hint: 'Drag a bar to move its dates. Drag the end of a bar to change the due date.',
30
- noDates: 'No item has a start or a due date. Open an item in the Tree and set its dates. Its bar then shows here.',
31
- undated: (n) => (Number(n) === 1 ? '1 item has no dates. Set its dates in the item sheet.' : `${n} items have no dates. Set their dates in the item sheet.`),
32
- range: (from, to) => (!to || from === to ? String(from) : `${from} – ${to}`),
33
- stageRow: (stage, n) => (Number(n) === 1 ? `${stage}, 1 dated item` : `${stage}, ${n} dated items`),
34
- /** One stage's part of the first row, in that row's accessible name. */
35
- stageSpan: (stage, range) => `${stage}: ${range}.`,
36
- /** The bar's accessible name: what it is, its dates, its health and milestone, and how to move it without a pointer.
37
- * `notes` are full sentences without the full stop (the health text, `milestone(date)`). */
38
- bar: (title, range, notes = []) => [`${title}, ${range}.`, ...notes.filter(Boolean).map((n) => n + '.'),
39
- 'Press to open the item.', 'Use the arrow keys to move the dates by one day.',
40
- 'Use Shift and an arrow key to change the due date.', 'Press Enter to save.'].join(' '),
41
- milestone: (date) => `Milestone on ${date}`,
42
- /** R8 reasons. Each one is the text beside the dot. */
43
- overlap: (title, date) => `At risk: starts before ${title} ends on ${date}`,
44
- overdue: (date) => `At risk: due on ${date}, not done`,
45
- milestoneOverdue: (date) => `Off track: milestone due on ${date}, not done`,
46
- };
47
-
48
- export const GLOSSARY = { guide: 'timeline.md' };
@@ -1,164 +0,0 @@
1
- /* pm/timeline-forecast-view.js — the Timeline view of Initiatives (console3, read only), built like the mockup's Timeline (console3.html, patch21).
2
- *
3
- * One initiative at a time, as the mockup: the LEFT column is the Timeline-history card (the track of checks with Replay, the Gantt of every item with its
4
- * dependency elbows, the critical path, the promised line, the thin forecast bar, the dashed "where it was before"); the RIGHT column is What changed (who,
5
- * what, why), the forecast and the scope at each check, and the dates that reach the Calendar. The All scope shows the forecast of every initiative at every
6
- * check (tap a cell to replay it) and a chooser. The Gantt draws the plan items, the Breakdown tasks and the Jira tickets of the initiative TOGETHER.
7
- * Every check is a whole frame from GET /api/c3-timeline (the server folds the events and plans each check with plan.js), so a click on a check, and Replay,
8
- * REDRAW the Gantt from that frame; Replay steps through the checks every 1.3 seconds, as the mockup's isplay does, and stops on any press.
9
- * Capacity and the rebalance proposal were removed: the mockup's Timeline has neither (its capacity is on Breakdown).
10
- * Drawing lives in c3-timeline.js. Nothing here writes: the apply control is disabled and no write route is called.
11
- * Self-registers as the 'forecast' Initiatives view, like Releases. */
12
- import { el } from './dom.js';
13
- import { ensureComponentsCss } from './primitives.js';
14
- import { pmGet } from './http.js';
15
- import { registerInitiativesView } from './registry.js';
16
- import { ensureC3Css, c3ic, c3ring, c3Phone } from './pm-work-view.js';
17
- import { historyCard, whatChangedCard, driftSvg, creepSvg, calSyncCard, calSyncFromCommits, matrixCard, dlabS, short } from './c3-timeline.js';
18
- import { goInitiative } from './c3-init-extras.js';
19
- import { progressCard, whySlipsCard, dependenciesCard, slipFacts } from './c3-plan-panels.js';
20
-
21
- const views = new WeakMap();
22
- const qs = (V, path, params) => path + '?' + params + (V.ctx.ws ? '&ws=' + encodeURIComponent(V.ctx.ws) : '');
23
- const titleOf = (V, id) => ((V.ctx.rows || []).find((r) => r.id === id) || {}).title || id;
24
-
25
- function stopReplay(V) { if (V.timer) { clearInterval(V.timer); V.timer = null; } }
26
-
27
- function problems(fr) {
28
- if (!fr || !fr.problems || !fr.problems.length) return null;
29
- return el('ul', { class: 'chgl', 'data-fc-problems': '' }, fr.problems.map((p) => el('li', { class: 'warn' }, c3ic('alert', 'sm'),
30
- el('span', null, p.kind === 'cycle' ? 'Dependency cycle: ' + p.path.join(' > ') : p.item + ' waits for ' + p.dependency + ', which is not in this plan'), el('span', { class: 'tag' }, 'plan'))));
31
- }
32
-
33
- function handlers(V) {
34
- return {
35
- snap: (i) => { stopReplay(V); V.snap = i; render(V); },
36
- replay: () => {
37
- stopReplay(V);
38
- const d = V.data[V.scope]; if (!d || !d.frames || d.frames.length < 2) return;
39
- V.snap = 0; render(V);
40
- V.timer = setInterval(() => { if (V.disposed || V.snap >= d.frames.length - 1) { stopReplay(V); return; } V.snap++; render(V); }, 1300);
41
- },
42
- };
43
- }
44
-
45
- /** The mockup's lh header for one initiative: the answer first. */
46
- function lens(V, d, fr) {
47
- const name = titleOf(V, V.scope);
48
- const slip = fr.slip_days;
49
- const crit = fr.items.filter((t) => t.critical).slice(0, 3).map((t) => t.title);
50
- const done = fr.items.filter((t) => t.state === 'done').length;
51
- return el('div', { class: 'lh', 'data-tl-lh': '' }, el('span', { class: 'ki' }, c3ic('clock')),
52
- el('div', { style: 'min-width:0' }, el('b', null, slip > 0 ? name + ' ships ' + slip + ' day' + (slip === 1 ? '' : 's') + ' late' : fr.promised ? name + ' holds ' + dlabS(fr.promised) : name + ': ' + fr.items.length + ' item' + (fr.items.length === 1 ? '' : 's')),
53
- el('div', { class: 'dim' }, crit.length ? 'The critical path runs through ' + crit.join(', ') + '.' : 'No item waits on another, so there is no critical path yet.')),
54
- c3ring(done, Math.max(1, fr.items.length), 44, done + '/' + fr.items.length));
55
- }
56
-
57
- function emptyOne(V, d) {
58
- return el('div', { class: 'fold', 'data-fc-empty': '' }, c3ic('check', 'sm'), 'Nothing is planned for ' + titleOf(V, V.scope) + ' yet: no plan items, no Breakdown tasks and no Jira tickets. The timeline draws all three once they exist.' + (d && d.notes && d.notes.length ? ' ' + d.notes.join(' ') : ''));
59
- }
60
-
61
- function oneBody(V) {
62
- const d = V.data[V.scope];
63
- if (!d) return { head: null, body: null };
64
- const frames = d.frames || [];
65
- if (!frames.length || !frames.some((f) => f.items.length)) return { head: null, body: emptyOne(V, d) };
66
- const n = Math.max(0, Math.min(V.snap == null ? frames.length - 1 : V.snap, frames.length - 1));
67
- const fr = frames[n]; const h = handlers(V);
68
- const todayFr = frames[frames.length - 1];
69
- const notes = (d.notes || []).length ? el('div', { class: 'dim', style: 'font-size:var(--fs-2)', 'data-tl-notes': '' }, d.notes.join(' ')) : null;
70
- const srcs = d.sources || {};
71
- const where = el('div', { class: 'dim', style: 'font-size:var(--fs-2)', 'data-tl-sources': '' }, `Drawn together: ${srcs.plan || 0} plan item${srcs.plan === 1 ? '' : 's'}, ${srcs.breakdown || 0} Breakdown task${srcs.breakdown === 1 ? '' : 's'}, ${srcs.jira || 0} Jira ticket${srcs.jira === 1 ? '' : 's'}.`);
72
- const body = el('div', { class: 'brief sbb' }, el('div', { class: 'bcols' },
73
- el('div', { class: 'bcol l' }, problems(fr), historyCard(frames, n, h, d.today), where, notes),
74
- el('div', { class: 'bcol r' }, whatChangedCard(frames, n),
75
- el('section', { class: 'card' }, el('h3', null, c3ic('clock'), 'Forecast at each check'), driftSvg(frames, n)),
76
- el('section', { class: 'card' }, el('h3', null, c3ic('alert'), 'Scope at each check'), creepSvg(frames, n)),
77
- calSyncCard(todayFr))));
78
- return { head: lens(V, d, todayFr), body };
79
- }
80
-
81
- function allBody(V) {
82
- const d = V.data.all;
83
- if (!d) return { head: null, body: null };
84
- const titles = {}; (d.rows || []).forEach((r) => { titles[r.id] = titleOf(V, r.id); });
85
- const rows = (d.rows || []).filter((r) => r.cells.some(Boolean));
86
- const late = rows.filter((r) => { const c = r.cells[r.cells.length - 1]; return c && c.promised && c.forecast_end > c.promised; }).length;
87
- const head = el('div', { class: 'lh', 'data-tl-lh': '' }, el('span', { class: 'ki' }, c3ic('clock')), el('div', { style: 'min-width:0' }, el('b', null, rows.length ? (late ? late + ' of ' + rows.length + ' initiatives miss their date' : 'Every initiative holds its date') : 'No initiative has a plan yet'),
88
- el('div', { class: 'dim' }, 'Forecast dates are derived from the dependencies and never typed.')));
89
- if (!rows.length) return { head, body: el('div', { class: 'fold', 'data-fc-empty': '' }, c3ic('check', 'sm'), 'No initiative has plan items, Breakdown tasks or Jira tickets yet, so there is no forecast to compare.') };
90
- const pick = el('section', { class: 'card', 'data-tl-pick': '' }, el('h3', null, c3ic('tree'), 'Pick one to see its path'),
91
- el('div', { class: 'chips2' }, rows.map((r) => { const c = r.cells[r.cells.length - 1]; const sl = c && c.slip_days > 0 ? ' +' + c.slip_days + ' d' : '';
92
- return el('button', { type: 'button', class: 'pill', onClick: () => pickScope(V, r.id, null) }, titles[r.id] + sl); })));
93
- const fx = window.__c3demo && window.__c3planfx;
94
- const F = fx ? { causes: fx.why, deps: fx.deps } : V.facts;
95
- const cm = V.commits && V.commits.state === 'ready' && V.commits.rows.length ? V.commits.rows : null;
96
- const right = F ? [whySlipsCard(F.causes), cm ? calSyncFromCommits(cm) : null, dependenciesCard(F.deps)] : [el('section', { class: 'card', 'data-plan-loading': '' }, el('div', { class: 'fold' }, c3ic('clock', 'sm'), 'Reading the plan of each late initiative…'))];
97
- return { head, body: el('div', { class: 'brief sbb' }, el('div', { class: 'bcols' }, el('div', { class: 'bcol l' }, progressCard(V, 'All initiatives', 'promised, forecast and progress', { cap: 9, uid: 'all', onOpen: (id) => { if (!goInitiative(id)) pickScope(V, id, null); } }), pick, matrixCard({ checks: d.checks, rows }, titles, (id, i) => pickScope(V, id, i))), el('div', { class: 'bcol r' }, right))) };
98
- }
99
-
100
- /** Real mode: the plans of the late initiatives give Why it slips and Dependencies (GET /api/c3-timeline per initiative; at most four). */
101
- async function loadFacts(V) {
102
- const d = V.data.all; if (!d || window.__c3demo) return;
103
- const late = (d.rows || []).map((r) => { const c = r.cells[r.cells.length - 1]; return c && c.slip_days > 0 ? { id: r.id, slip: c.slip_days } : null; }).filter(Boolean).sort((a, b) => b.slip - a.slip).slice(0, 4);
104
- const seq = V.seq;
105
- const got = await Promise.all(late.map((l) => pmGet(qs(V, '/api/c3-timeline', 'initiative=' + encodeURIComponent(l.id))).catch(() => null)));
106
- if (V.disposed) return;
107
- const by = {}; late.forEach((l, i) => { if (got[i] && got[i].ok) by[l.id] = { title: titleOf(V, l.id), frames: got[i].frames }; });
108
- V.facts = slipFacts(by);
109
- if (V.scope === 'all') render(V);
110
- void seq;
111
- }
112
-
113
- function render(V) {
114
- const pills = el('div', { class: 'chips2', 'data-fc-scope': '', role: 'group', 'aria-label': 'Initiative' }, [['all', 'All'], ...V.ids.map((id) => [id, short(titleOf(V, id), 18)])].map(([id, lab]) => el('button', { type: 'button', class: 'pill', 'aria-pressed': String(V.scope === id), 'data-fc-pill': id, title: id === 'all' ? 'All initiatives' : id,
115
- onClick: () => pickScope(V, id, null) }, lab)));
116
- const { head, body } = V.scope === 'all' ? allBody(V) : oneBody(V);
117
- V.root.replaceChildren(el('div', { class: 'calwrap' }, el('div', { class: 'calbar', style: 'flex-wrap:wrap;gap:8px' }, pills),
118
- el('div', { class: 'calbody' }, head, V.error ? el('div', { class: 'fold', 'data-fc-error': '' }, c3ic('alert', 'sm'), V.error) : null, body)));
119
- }
120
-
121
- async function load(V, scope) {
122
- const seq = ++V.seq;
123
- const url = scope === 'all' ? qs(V, '/api/c3-timeline', 'initiatives=' + encodeURIComponent(V.ids.join(','))) : qs(V, '/api/c3-timeline', 'initiative=' + encodeURIComponent(scope));
124
- const a = await pmGet(url);
125
- if (V.disposed || seq !== V.seq) return;
126
- if (a && a.ok) { V.data[scope] = a; V.error = null; } else { V.data[scope] = null; V.error = (a && a.error) || 'The timeline could not be read.'; }
127
- render(V);
128
- if (scope === 'all' && a && a.ok) loadFacts(V);
129
- }
130
-
131
- function pickScope(V, id, snap) {
132
- stopReplay(V);
133
- V.scope = id; V.snap = snap;
134
- if (V.data[id]) render(V); else { V.error = null; render(V); }
135
- load(V, id);
136
- }
137
-
138
- export function mountForecast(host, ctx) {
139
- const ids = (ctx.rows || []).map((r) => r.id).filter(Boolean);
140
- let V = views.get(host);
141
- if (V && V.ctx.ws !== ctx.ws) { disposeForecast(host); V = null; }
142
- if (V) { V.ctx = ctx; V.ids = ids; if (host.firstChild !== V.root) host.replaceChildren(V.root); return; }
143
- ensureComponentsCss();
144
- ensureC3Css();
145
- V = { ctx, ids, scope: 'all', snap: null, data: {}, facts: null, root: el('div', { class: 'c3', 'data-in-view': 'forecast' }), error: null, timer: null, seq: 0, disposed: false };
146
- V.render = () => render(V);
147
- V.stopPhone = c3Phone(V.root);
148
- views.set(host, V);
149
- host.replaceChildren(V.root);
150
- render(V);
151
- load(V, V.scope);
152
- }
153
-
154
- export function disposeForecast(host) {
155
- const V = views.get(host);
156
- if (!V) return;
157
- V.disposed = true;
158
- stopReplay(V);
159
- if (V.stopPhone) V.stopPhone();
160
- views.delete(host);
161
- if (V.root.parentNode === host) V.root.remove();
162
- }
163
-
164
- registerInitiativesView('forecast', { label: 'Forecast', mount: mountForecast, dispose: disposeForecast });
@@ -1,331 +0,0 @@
1
- /* pm/today-agenda.js — the Agenda month in the left column of Today (initiative today-goals, PRD G25 to G27).
2
- *
3
- * agendaPanel(ctx, h) → the panel: the agenda of the picked day or week (today at first); the month shows above it on the Calendar press; null when the
4
- * server has no agenda route (an older workspace), so the day's calendar list shows instead
5
- * meetingDetail(ctx, id) → the right column for a remembered meeting: what it means, before it, the last time
6
- * memoryBlock(id) → the series part of that detail, for a meeting of today drawn from the brief
7
- * litSeries(sel) → the series key of the selected meeting, so the month marks the days it happens
8
- * refreshAgenda() · agendaSig() · onAgenda(fn)
9
- *
10
- * One read feeds it: GET /api/proactive/agenda?month=YYYY-MM. The server derives every answer (how full, the key
11
- * meeting, readiness, no notes); this file only draws them. A day cell is a button: it picks that day. A week number
12
- * picks the week.
13
- * The calendar memory changes only through the morning-brief session's brief. The one write here is the PM's key-meeting
14
- * mark (POST /api/proactive/agenda/mark): this time or every time, key or not key, over what the calendar says.
15
- * A meeting's detail shows its meeting notes, and an event row a notes chip, from pm/notes-links.js (meeting-notes Run 4);
16
- * Take notes writes there.
17
- */
18
-
19
- import { peopleLinks } from './people-link.js';
20
- import { el } from './dom.js';
21
- import { button, iconButton, badge, toast } from './primitives.js';
22
- import { pmGet, pmPost } from './http.js';
23
- import { COPY } from './today-copy.js';
24
- import { notesBlock, notesFor } from './notes-links.js';
25
-
26
- const A = COPY.day.ag;
27
-
28
- const cache = new Map(); // month -> { data, error, old }
29
- // pick and calOpen are the PM's view of this page only: neither is stored, so a reload opens on today's meetings, month hidden
30
- const ag = { month: null, pick: null, calOpen: false, showRoutine: false };
31
- let redraw = () => {};
32
- let inflight = new Set();
33
-
34
- export function onAgenda(fn) { redraw = fn; }
35
-
36
- const pad = (n) => String(n).padStart(2, '0');
37
- const ymOf = (date) => date.slice(0, 7);
38
- const shiftMonth = (ym, n) => { const [y, m] = ym.split('-').map(Number); const d = new Date(y, m - 1 + n, 1); return `${d.getFullYear()}-${pad(d.getMonth() + 1)}`; };
39
- const dateOf = (s) => { const [y, m, d] = s.split('-').map(Number); return new Date(y, m - 1, d); };
40
- const label = (s, opts) => { try { return dateOf(s).toLocaleDateString(undefined, opts); } catch { return s; } };
41
- const dayLabel = (s) => label(s, { weekday: 'short', day: 'numeric', month: 'short' });
42
- /** ISO 8601 week number of a YYYY-MM-DD date. */
43
- function isoWeek(s) {
44
- const d = dateOf(s);
45
- const t = new Date(Date.UTC(d.getFullYear(), d.getMonth(), d.getDate()));
46
- const wd = t.getUTCDay() || 7;
47
- t.setUTCDate(t.getUTCDate() + 4 - wd);
48
- const y0 = new Date(Date.UTC(t.getUTCFullYear(), 0, 1));
49
- return Math.ceil(((t - y0) / 86400000 + 1) / 7);
50
- }
51
-
52
- async function loadMonth(month) {
53
- const key = month || 'now';
54
- if (inflight.has(key)) return;
55
- inflight.add(key);
56
- const out = await pmGet('/api/proactive/agenda' + (month ? '?month=' + encodeURIComponent(month) : ''));
57
- inflight.delete(key);
58
- const m = out && out.ok ? out.month : month;
59
- const prev = cache.get(m);
60
- const next = out && out.ok ? { data: out, error: null, old: false }
61
- : { data: prev ? prev.data : null, error: (out && out.error) || A.unread, old: !!(out && out.status === 404) };
62
- if (!ag.month && out && out.ok) ag.month = out.month;
63
- if (!month && !(out && out.ok)) cache.set('now', next);
64
- if (m) cache.set(m, next);
65
- // `now` moves every read: compare it to the minute, so a read that changes nothing draws nothing
66
- if (!prev || sigOf(prev) !== sigOf(next)) redraw();
67
- }
68
-
69
- const sigOf = (c) => JSON.stringify({ ...c, data: c.data ? { ...c.data, now: String(c.data.now).slice(0, 16) } : null });
70
-
71
- /** Read the shown month again (the day read calls this, so the month follows the brief and the clock). */
72
- export function refreshAgenda() { loadMonth(ag.month); }
73
-
74
- function current() {
75
- const c = (ag.month && cache.get(ag.month)) || cache.get('now') || null;
76
- if (!c) { loadMonth(ag.month); return null; }
77
- return c;
78
- }
79
-
80
- // a short hash of the days, so a change that keeps the length (a key mark set or cleared) still redraws
81
- const hash = (t) => { let h = 0; for (let i = 0; i < t.length; i++) h = (h * 31 + t.charCodeAt(i)) | 0; return h; };
82
- export function agendaSig() {
83
- const c = ag.month ? cache.get(ag.month) : cache.get('now');
84
- return JSON.stringify([ag, c ? [c.error, c.data && c.data.now ? String(c.data.now).slice(0, 16) : null, c.data && Object.keys(c.data.days || {}).length, c.data && c.data.memory] : null])
85
- + (c && c.data ? hash(JSON.stringify(c.data.days)) : 0);
86
- }
87
-
88
- /* ── finding a meeting across the months read ─────────────────────────────────────────────────────────────────── */
89
-
90
- function findEvent(id) {
91
- for (const c of cache.values()) {
92
- if (!c.data) continue;
93
- for (const d of Object.values(c.data.days)) {
94
- const e = d.events.find((x) => x.id === id);
95
- if (e) return { e, day: d, data: c.data };
96
- }
97
- }
98
- return null;
99
- }
100
-
101
- /** The series key of the selected meeting (a remembered one, or today's from the brief), or null. */
102
- export function litSeries(sel) {
103
- if (!sel || (sel.type !== 'meeting' && sel.type !== 'event')) return null;
104
- const f = findEvent(sel.id);
105
- return f ? { key: f.e.key, title: f.e.title } : null;
106
- }
107
-
108
- /* ── the month ────────────────────────────────────────────────────────────────────────────────────────────────── */
109
-
110
- function readyBadge(day, withWord) {
111
- if (!day.need) return null;
112
- return el('span', { class: 'td-ag__ready', 'data-ag-ready': day.ready || 'ok', title: A.readyWord[day.ready || 'ok'] },
113
- A.readyBadge(day.done, day.need), withWord ? ' ' + A.readyWord[day.ready || 'ok'] : null);
114
- }
115
-
116
- /** How full a day is, as a step from 0 to 3: the meetings that are not repeating ones. The cell tints by it. */
117
- const loadOf = (day) => { const n = day.events.filter((e) => !e.routine).length; return n === 0 ? 0 : n === 1 ? 1 : n <= 3 ? 2 : 3; };
118
-
119
- /* A2: a cell is the day number, a tint for how many meetings the day has, and a star when it has a key meeting. */
120
- function cell(data, d, lit) {
121
- const day = data.days[d];
122
- const key = day.key ? day.events.find((x) => x.id === day.key) : null;
123
- const kids = [el('span', { class: 'td-ag__num' }, String(Number(d.slice(8)))), key ? el('span', { class: 'td-ag__star', 'aria-hidden': 'true' }, A.star) : null];
124
- const picked = ag.pick && ag.pick.type === 'day' && ag.pick.date === d;
125
- return button({ label: el('span', { class: 'td-ag__in' }, ...kids.filter(Boolean)), variant: 'ghost', onClick: () => pickDay(d),
126
- attrs: { class: 'td-ag__cell', 'data-ag-day': d, 'data-load': String(loadOf(day)), 'data-key': key ? 'true' : null, 'data-out': day.in_month ? null : 'true', 'data-past': day.past ? 'true' : null, 'data-today': day.today ? 'true' : null,
127
- 'data-weekend': day.weekend ? 'true' : null, 'data-lit': lit && lit.has(d) ? 'true' : null, 'aria-pressed': picked ? 'true' : 'false', title: A.dayHint(dayLabel(d), key ? key.title : null) } });
128
- }
129
-
130
- // A3: picking a day (or a week) closes the month and shows its meetings
131
- function pickDay(d) { ag.pick = { type: 'day', date: d }; ag.showRoutine = false; ag.calOpen = false; redraw(); }
132
- function pickWeek(i) { ag.pick = { type: 'week', i }; ag.showRoutine = false; ag.calOpen = false; redraw(); }
133
- function toggleCalendar(data) {
134
- ag.calOpen = !ag.calOpen;
135
- // closed with no day picked, the meetings are today's: the month goes back to today's month too
136
- if (!ag.calOpen && !ag.pick && ag.month && ag.month !== ymOf(data.today)) { ag.month = ymOf(data.today); if (!cache.has(ag.month)) loadMonth(ag.month); }
137
- redraw();
138
- }
139
- function goMonth(n, data) {
140
- ag.month = n === 0 ? ymOf(data.today) : shiftMonth(ag.month || data.month, n);
141
- ag.pick = null;
142
- if (!cache.has(ag.month)) loadMonth(ag.month);
143
- redraw();
144
- }
145
-
146
- function month(data, lit) {
147
- const head = el('div', { class: 'td-ag__mhead' },
148
- iconButton({ icon: 'chevron-left', ariaLabel: A.prev, size: 'sm', attrs: { 'data-ag': 'prev' }, onClick: () => goMonth(-1, data) }),
149
- el('b', { class: 'td-ag__mlabel', 'data-ag': 'month' }, label(data.month + '-01', { month: 'long', year: 'numeric' })),
150
- iconButton({ icon: 'chevron-right', ariaLabel: A.later, size: 'sm', attrs: { 'data-ag': 'later' }, onClick: () => goMonth(1, data) }),
151
- ymOf(data.today) !== data.month ? button({ label: A.thisMonth, size: 'sm', variant: 'ghost', attrs: { 'data-ag': 'this-month' }, onClick: () => goMonth(0, data) }) : null);
152
- const wd = el('div', { class: 'td-ag__wk td-ag__wk--head', 'aria-hidden': 'true' }, el('span', null, ''),
153
- ...data.weeks[0].map((d) => el('span', { class: 'td-ag__wd' }, label(d, { weekday: 'short' }))));
154
- const rows = data.weeks.map((w, i) => {
155
- const n = isoWeek(w[0]);
156
- const picked = ag.pick && ag.pick.type === 'week' && ag.pick.i === i;
157
- return el('div', { class: 'td-ag__wk', role: 'group', 'aria-label': A.weekOf(n) },
158
- button({ label: A.weekNo(n), variant: 'ghost', size: 'sm', onClick: () => pickWeek(i), attrs: { class: 'td-ag__wno', 'data-ag-week': String(n), 'aria-pressed': picked ? 'true' : 'false', title: A.weekHint(n) } }),
159
- ...w.map((d) => cell(data, d, lit)));
160
- });
161
- return el('div', { class: 'td-ag__month', 'data-ag': 'month-box' }, head, el('div', { class: 'td-ag__grid', 'data-ag': 'grid' }, wd, ...rows));
162
- }
163
-
164
- /* ── the agenda under the month ───────────────────────────────────────────────────────────────────────────────── */
165
-
166
- function tiles(day) {
167
- const key = day.key ? day.events.find((e) => e.id === day.key) : null;
168
- const t = (k, v, attrs) => el('div', { class: 'td-ag__tile', ...(attrs || {}) }, el('span', { class: 'td-ag__tk' }, A.tiles[k]), el('b', null, v));
169
- return el('div', { class: 'td-ag__tiles', 'data-ag': 'tiles' },
170
- t('busy', day.busy ? A.busy(day.busy) : A.noMeetings),
171
- t('key', key ? key.title : A.noKey),
172
- t('ready', day.need ? A.readyBadge(day.done, day.need) + ' · ' + A.readyWord[day.ready || 'ok'] : A.noPrep, day.need ? { 'data-ag-ready': day.ready || 'ok' } : null));
173
- }
174
-
175
- function eventRow(h, e) {
176
- const type = e.src === 'brief' ? 'event' : 'meeting';
177
- const chips = el('span', { class: 'td-day__chips' },
178
- e.imp ? badge({ text: A.star, tone: 'outline', attrs: { title: A.means } }) : null,
179
- e.prep ? el('span', { class: 'td-ag__ready', 'data-ag-ready': e.ready || 'ok' }, A.readyBadge(e.prep_done || 0, e.prep.length)) : null,
180
- notesFor(e).length ? badge({ text: 'notes', tone: 'outline', attrs: { 'data-ag-notes': e.id, title: 'Meeting notes are linked to this event' } })
181
- : e.ended && !e.notes && (e.imp || e.kind === 'one') ? el('span', { class: 'td-ag__nonotes' }, A.noNotes(1)) : null);
182
- return h.rowBtn(type, e.id, { lead: e.time, title: e.title, meta: A.kindWord[e.kind] + (e.attendees ? ' · ' + A.people(e.attendees) : ''), trail: chips },
183
- { 'data-past': e.ended ? 'true' : null, 'data-ag-event': e.id });
184
- }
185
-
186
- function rowsOf(h, evs) {
187
- const main = evs.filter((e) => !e.routine);
188
- const rout = evs.filter((e) => e.routine);
189
- return [
190
- main.length ? el('ul', { class: 'td-day__rows', 'data-day-list': 'agenda' }, ...main.map((e) => eventRow(h, e))) : null,
191
- rout.length ? button({ label: ag.showRoutine ? A.hideRoutine : A.routine(rout.length), variant: 'ghost', size: 'sm',
192
- attrs: { 'data-ag': 'routine', 'aria-expanded': ag.showRoutine ? 'true' : 'false' }, onClick: () => { ag.showRoutine = !ag.showRoutine; redraw(); } }) : null,
193
- rout.length && ag.showRoutine ? el('ul', { class: 'td-day__rows', 'data-day-list': 'routine' }, ...rout.map((e) => eventRow(h, e))) : null,
194
- ];
195
- }
196
-
197
- function agendaOf(data, h) {
198
- const pick = ag.pick || (data.days[data.today] ? { type: 'day', date: data.today } : { type: 'day', date: data.month + '-01' });
199
- if (pick.type === 'week') {
200
- const w = data.weeks[pick.i] || data.weeks[0];
201
- const all = w.flatMap((d) => data.days[d].events);
202
- const days = w.filter((d) => data.days[d].events.some((e) => !e.routine));
203
- const rout = all.filter((e) => e.routine);
204
- return el('div', { class: 'td-ag__agenda', 'data-ag': 'agenda', 'data-ag-pick': 'week:' + isoWeek(w[0]) },
205
- el('h3', { class: 'td-ag__ah' }, A.weekOf(isoWeek(w[0])), el('span', { class: 'td-day__dim' }, ' · ' + dayLabel(w[0]) + ' – ' + dayLabel(w[6]))),
206
- days.length ? days.map((d) => el('div', { class: 'td-ag__wday' }, el('h4', null, dayLabel(d), data.days[d].busy ? el('span', { class: 'td-day__dim' }, ' · ' + A.busy(data.days[d].busy)) : null, readyBadge(data.days[d])),
207
- el('ul', { class: 'td-day__rows' }, ...data.days[d].events.filter((e) => !e.routine).map((e) => eventRow(h, e))))) : el('p', { class: 'td-day__note' }, A.noMeetings),
208
- rout.length ? button({ label: ag.showRoutine ? A.hideRoutine : A.routine(rout.length), variant: 'ghost', size: 'sm',
209
- attrs: { 'data-ag': 'routine', 'aria-expanded': ag.showRoutine ? 'true' : 'false' }, onClick: () => { ag.showRoutine = !ag.showRoutine; redraw(); } }) : null,
210
- rout.length && ag.showRoutine ? el('ul', { class: 'td-day__rows', 'data-day-list': 'routine' }, ...rout.map((e) => eventRow(h, e))) : null);
211
- }
212
- const day = data.days[pick.date];
213
- if (!day) return null;
214
- // today keeps the day's calendar from the brief (the line at the current time, the goal ties, the prep chips)
215
- const todayList = day.today && h.todayRows ? h.todayRows() : null;
216
- return el('div', { class: 'td-ag__agenda', 'data-ag': 'agenda', 'data-ag-pick': 'day:' + pick.date },
217
- el('h3', { class: 'td-ag__ah' }, day.today ? A.today + ' · ' + dayLabel(pick.date) : dayLabel(pick.date)),
218
- tiles(day),
219
- todayList || (day.events.length ? rowsOf(h, day.events) : el('p', { class: 'td-day__note' }, A.noMeetings)));
220
- }
221
-
222
- /** The panel. `h` lends the day section's helpers: { panel, rowBtn(type, id, parts, mods), todayRows(), sel }. */
223
- export function agendaPanel(ctx, h) {
224
- const c = current();
225
- if (!c) return h.panel('agenda', null, el('p', { class: 'td-day__note' }, A.loading));
226
- if (!c.data) return c.old ? null : h.panel('agenda', null, el('p', { class: 'td-day__note', role: 'status' }, c.error || A.unread));
227
- const data = c.data;
228
- const lit = litSeries(h.sel);
229
- const litDays = lit && data.series[lit.key] ? new Set(data.series[lit.key].dates) : null;
230
- const empty = !data.memory || !data.memory.events;
231
- const calendar = button({ label: ag.calOpen ? A.hideCalendar : A.calendar, icon: 'calendar', variant: 'outline', size: 'sm',
232
- attrs: { 'data-ag': 'calendar', 'aria-expanded': ag.calOpen ? 'true' : 'false' }, onClick: () => toggleCalendar(data) });
233
- return h.panel('agenda', null,
234
- el('div', { class: 'td-ag__bar' }, calendar),
235
- ag.calOpen ? month(data, litDays) : null,
236
- ag.calOpen && litDays ? el('p', { class: 'td-day__note', 'data-ag': 'lit' }, A.lit(lit.title, [...litDays].filter((d) => data.days[d]).length)) : null,
237
- empty ? el('p', { class: 'td-day__note', 'data-ag': 'empty' }, A.empty) : null,
238
- agendaOf(data, h));
239
- }
240
-
241
- /* ── the right column ─────────────────────────────────────────────────────────────────────────────────────────── */
242
-
243
- function whyLines(e) {
244
- const out = [];
245
- if (e.role === 'present') out.push(A.why.present);
246
- if (e.role === 'decide') out.push(A.why.decide);
247
- if (e.external) out.push(A.why.external);
248
- if (e.exec) out.push(A.why.exec);
249
- if (e.attendees && e.attendees >= 8) out.push(A.why.many(e.attendees));
250
- if (e.routine) out.push(A.why.routine);
251
- return out;
252
- }
253
-
254
- async function setMark(e, scope, on) {
255
- const r = await pmPost('/api/proactive/agenda/mark', { title: e.title, start: e.start, scope, on });
256
- if (!r || r.ok === false) { toast({ text: A.key.failed((r && r.error) || 'the workspace did not answer'), tone: 'destructive' }); return; }
257
- for (const k of [...cache.keys()]) loadMonth(k === 'now' ? undefined : k);
258
- }
259
-
260
- /** The key-meeting line of a meeting: what the PM marked, and the presses that change it. */
261
- function keyBlock(e) {
262
- const K = A.key;
263
- const b = (label, scope, on, id) => button({ label, variant: 'outline', size: 'sm', attrs: { 'data-ag-mark': id }, onClick: () => setMark(e, scope, on) });
264
- const presses = e.mark ? [b(K.clear, e.mark, null, 'clear')]
265
- : e.imp ? [b(K.unmark, 'one', false, 'not-one'), e.repeats ? b(K.unmarkAll, 'series', false, 'not-series') : null]
266
- : [b(K.mark, 'one', true, 'one'), e.repeats ? b(K.markAll, 'series', true, 'series') : null];
267
- const said = e.mark ? K[(e.imp ? 'marked' : 'not') + e.mark] : null;
268
- return el('div', { class: 'td-day__phase', 'data-ag': 'key', 'data-ag-key': e.imp ? 'true' : 'false' },
269
- e.imp ? el('h4', null, A.star + ' ' + K.title) : null,
270
- said ? el('p', { class: 'td-day__note' }, said) : null,
271
- el('div', { class: 'td-day__acts' }, ...presses));
272
- }
273
-
274
- /** The series of a meeting: how often it met, what is to come, and the last time, folded. Null when unknown. */
275
- export function memoryBlock(id, { compact = false } = {}) {
276
- const f = findEvent(id);
277
- if (!f) return null;
278
- const s = f.data.series[f.e.key];
279
- if (!s) return null;
280
- const last = s.last && s.last.date !== f.day.date ? s.last : null;
281
- // compact (the meeting detail's Details, today-meeting-focus F5): no heading and no key presses; the presses are in More
282
- const said = compact && f.e.mark ? A.key[(f.e.imp ? 'marked' : 'not') + f.e.mark] : null;
283
- return el('div', { class: 'td-day__notes', 'data-ag': 'memory' },
284
- compact ? null : el('h4', null, A.means),
285
- el('p', null, A.kindWord[f.e.kind] + '. ' + (s.count > 1 ? A.series(s.past, s.coming) : A.once)),
286
- ...(f.e.mark ? [] : whyLines(f.e)).map((t) => el('p', null, t)),
287
- compact ? (said ? el('p', { class: 'td-day__note', 'data-ag': 'key', 'data-ag-key': f.e.imp ? 'true' : 'false' }, said) : null) : keyBlock(f.e),
288
- last ? el('details', { class: 'td-ag__last', 'data-ag': 'last' }, el('summary', null, A.lastTime(dayLabel(last.date))),
289
- last.notes ? el('p', null, last.notes) : el('p', { class: 'td-day__note' }, A.noLast),
290
- last.open && last.open.length ? el('ul', { class: 'td-day__chk' }, ...last.open.map((x) => el('li', null, x))) : null) : null);
291
- }
292
-
293
- /** What the meeting detail's one line needs: how many people join, and whether the meeting is key. Null when unknown. */
294
- export function meetingFacts(id) {
295
- const f = findEvent(id);
296
- return f ? { people: f.e.attendees || 0, key: !!f.e.imp } : null;
297
- }
298
-
299
- /** The key-mark presses of a meeting as menu items for More (the same presses as keyBlock, same marks). */
300
- export function keyItems(id) {
301
- const f = findEvent(id);
302
- if (!f) return [];
303
- const e = f.e;
304
- const K = A.key;
305
- const it = (label, scope, on, mark) => ({ label, attrs: { 'data-ag-mark': mark }, onSelect: () => setMark(e, scope, on) });
306
- const items = e.mark ? [it(K.clear, e.mark, null, 'clear')]
307
- : e.imp ? [it(K.unmark, 'one', false, 'not-one'), e.repeats ? it(K.unmarkAll, 'series', false, 'not-series') : null]
308
- : [it(K.mark, 'one', true, 'one'), e.repeats ? it(K.markAll, 'series', true, 'series') : null];
309
- return items.filter(Boolean);
310
- }
311
-
312
- export function meetingDetail(ctx, id, h) {
313
- const f = findEvent(id);
314
- if (!f) return null;
315
- const e = f.e;
316
- const end = (() => { const d = new Date(e.end); return `${pad(d.getHours())}:${pad(d.getMinutes())}`; })();
317
- return [
318
- h.dhead(A.kindWord[e.kind], e.title),
319
- el('p', { class: 'td-day__dim td-day__mono' }, `${dayLabel(f.day.date)} · ${e.time}–${end}${e.attendees ? ' · ' + A.people(e.attendees) : ''}${e.with ? ' · ' + e.with : ''}`),
320
- e.with ? peopleLinks(ctx && ctx.ws, e.with, { 'data-ag': 'people' }) : null,
321
- memoryBlock(id),
322
- e.prep ? el('div', { class: 'td-day__phase', 'data-ag': 'before' }, el('h4', null, A.before),
323
- el('p', null, A.prepLine(e.prep_done || 0, e.prep.length)),
324
- el('ul', { class: 'td-day__chk' }, ...e.prep.map((t, i) => el('li', { class: i < (e.prep_done || 0) ? 'td-day__ok' : '' }, t))),
325
- el('p', { class: e.ready === 'risk' ? 'td-day__warn' : 'td-day__note', 'data-ag-ready': e.ready || 'ok' }, A.readyNote[e.ready || 'ok'])) : null,
326
- e.ended ? el('div', { class: 'td-day__phase', 'data-ag': 'notes' }, el('h4', null, A.afterNotes),
327
- e.notes ? el('p', null, e.notes) : el('p', { class: 'td-day__note' }, A.noNotesYet),
328
- e.open && e.open.length ? [el('h4', null, A.openLines), el('ul', { class: 'td-day__chk' }, ...e.open.map((x) => el('li', null, x)))] : null) : null,
329
- notesBlock(e, { ws: ctx && ctx.ws }),
330
- ];
331
- }