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,537 +0,0 @@
1
- /* pm/dest-notes.js — the Notes place: every meeting note, grouped by initiative, and the note itself (meeting-notes Run 12,
2
- * the "Notes: next features" mockup the PM approved on 2026-10-07, board 1 "Notes menu").
3
- *
4
- * A DESTINATION MODULE (registry.js): mountDestination(host, ctx) on every render with the same host, disposeDestination(host).
5
- * It keeps ONE persistent root per host and redraws its two cards only when what they show changed, so a title being typed
6
- * keeps its focus. A link from another place (a calendar event, an initiative's Notes tab) opens a note through the tab's slug.
7
- *
8
- * Layout, as the mockup: the page title and a search field, then two cards side by side.
9
- * left BY INITIATIVE · n notes. One group per initiative, then "No initiative"; each row is the meeting time or day,
10
- * the title, and an amber dot when a statement in the note differs from a file in the repository.
11
- * right THE FULL NOTE (meeting-notes Run 13: the pop-up note is gone). One meta line (Meeting note · day time · length ·
12
- * initiative) with an icon that shows the exact times and dates, the title with its icons (Resume and Stop, or Stop
13
- * while recording; Copy as Markdown; ⋯), the Meeting context card (people, agenda, what it is for, details), the live
14
- * block while the meeting is recording or paused (status, Your notes, the live transcript), then only what is there:
15
- * Conflicts with other files, Highlights, the Overview, Decisions, Next steps (owner · due, and Make task), Open
16
- * questions, and the discussion and transcript folded at the end. Every button is an icon with a tooltip.
17
- *
18
- * WHERE EACH PART COMES FROM. After Stop and the final pass, the agent's final notes (note.final_notes: grounded in quotes);
19
- * before that, what was caught live (view-notes.js caughtItems: the agent's minute bullets, else the labelled lines) and
20
- * the overview the agent or this machine wrote. Conflicts are the lines, bullets and highlights whose repository check says
21
- * the file differs (lib/notes.js conflictsOf). The overview and the final items are edited in place: a click puts the
22
- * cursor in the text and leaving it saves (POST /api/notes/final-edit), as the mockup shows. Make task adds the next step
23
- * to the note's initiative as a plan item in its first stage (POST /api/plan-items, the Breakdown's own writer), with Undo.
24
- */
25
-
26
- import { el, patchChildren } from './dom.js';
27
- import { button, iconButton, field, row, menu, toast, empty, ensureComponentsCss } from './primitives.js';
28
- import { onNotes } from './notes-links.js';
29
- import { screenStrip, shotButton, shotFor } from './notes-screen-view.js';
30
- import { agendaHeard, peopleOf } from './notes-context.js';
31
- import { ensureSprite, icon } from './icons.js';
32
- import { pmGet, pmPost } from './http.js';
33
- import { registerCommand, openDestination } from './registry.js';
34
- import { askConfirm } from './dialogs.js';
35
- import * as dock from './note-dock.js';
36
- import * as V from './view-notes.js';
37
- import { makeTask as makeTaskFrom } from './notes-task.js';
38
-
39
- export const COPY = Object.freeze({
40
- title: 'Notes',
41
- fixture: 'Notes shows your meeting notes in a real session.',
42
- search: 'Search notes',
43
- byInitiative: 'By initiative',
44
- count: (n) => `${n} ${n === 1 ? 'note' : 'notes'}`,
45
- noInitiative: 'No initiative',
46
- none: 'No notes yet. Press Record at the top right to start one.',
47
- noMatch: (q) => `No note matches “${q}”.`,
48
- pick: 'Choose a note to read it.',
49
- reading: 'Reading…',
50
- readError: 'The notes could not be read.',
51
- meetingNote: 'Meeting note',
52
- record: 'Record this note', resume: 'Resume', stop: 'Stop for good (cannot be resumed)', copy: 'Copy as Markdown (with the meeting context)', timeInfo: 'Exact times and dates',
53
- conflicts: 'Conflicts with other files',
54
- conflictWith: 'conflicts with',
55
- openFile: 'Open file',
56
- linkMeeting: 'Link to a meeting', linkInitiative: 'Link to an initiative',
57
- context: 'Meeting context', people: 'People', agenda: 'Agenda', about: 'What it is for', details: 'Details',
58
- noMeeting: 'Not linked to a meeting. Link it to add the meeting’s people, agenda and details to the note.',
59
- noContext: 'The calendar gave no more about this meeting.',
60
- highlights: 'Highlights',
61
- overview: 'Overview',
62
- noOverview: 'No overview yet. It is written when you stop recording.',
63
- decisions: 'Decisions', actions: 'Next steps', questions: 'Open questions',
64
- makeTask: 'Make task',
65
- taskAdded: (ini, stage) => `Added to ${ini}, under ${stage}`,
66
- taskNoInitiative: 'Link the note to an initiative first. Make task adds the step to its breakdown.',
67
- taskFailed: 'The task was not made',
68
- undo: 'Undo',
69
- discussion: 'Discussion',
70
- transcript: (n) => `${n} transcript ${n === 1 ? 'line' : 'lines'}`,
71
- del: 'Delete note',
72
- delAsk: (t) => `Delete “${t}”?`,
73
- delBody: 'The note, its transcript, its audio and its screenshots are deleted from this machine.',
74
- delShots: 'Delete screenshots',
75
- delShotsAsk: 'Delete this note\'s screenshots?',
76
- delShotsBody: 'The screenshots of the shared screen are deleted from this machine. The notes, the transcript and the audio stay. This cannot be undone.',
77
- saved: 'Saved',
78
- notSaved: 'Not saved',
79
- edited: 'edited',
80
- });
81
-
82
- registerCommand({ id: 'notes-open', label: 'Notes', hint: 'Your meeting notes, by initiative', cli: null, run: () => openDestination('notes') });
83
- registerCommand({ id: 'notes-menu-open', label: 'notes menu', hint: 'All notes by initiative', cli: null, run: () => openDestination('notes') });
84
-
85
- /* ── words ───────────────────────────────────────────────────────────────────────────────────────────────────────── */
86
-
87
- const dayStart = (d) => { const t = new Date(d); t.setHours(0, 0, 0, 0); return t.getTime(); };
88
- /** The left column's time: "14:00" today, "Mon" this week, else "1 Oct". */
89
- export function whenShort(iso, now = Date.now()) {
90
- const t = Date.parse(iso);
91
- if (!Number.isFinite(t)) return '';
92
- const d = new Date(t);
93
- const days = Math.round((dayStart(now) - dayStart(t)) / 86400000);
94
- if (days === 0) return d.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit', hour12: false });
95
- if (days > 0 && days < 7) return d.toLocaleDateString('en-GB', { weekday: 'short' });
96
- return d.toLocaleDateString('en-GB', { day: 'numeric', month: 'short' });
97
- }
98
- /** "Today 14:00", "Mon 6 Oct 14:00". */
99
- function whenLong(iso, now = Date.now()) {
100
- const t = Date.parse(iso);
101
- if (!Number.isFinite(t)) return '';
102
- const d = new Date(t);
103
- const hm = d.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit', hour12: false });
104
- return (dayStart(now) === dayStart(t) ? 'Today' : d.toLocaleDateString('en-GB', { weekday: 'short', day: 'numeric', month: 'short' })) + ' ' + hm;
105
- }
106
- const minutes = (ms) => (ms >= 60000 ? Math.round(ms / 60000) + ' min' : '');
107
- const startOf = (n) => (n.meeting && n.meeting.start) || n.recorded_from || n.created_at || n.updated_at;
108
- const iniName = (i) => (i ? i.title || i.id : null);
109
- const lengthOf = (n) => {
110
- const ts = (n.transcript || []).map((x) => x.t || 0);
111
- return ts.length ? Math.max(...ts) : 0;
112
- };
113
-
114
- /** The notes, grouped by initiative title, "No initiative" last; each group newest first. Pure. */
115
- export function groupNotes(rows) {
116
- const groups = new Map();
117
- for (const r of rows) {
118
- const k = iniName(r.initiative) || '';
119
- if (!groups.has(k)) groups.set(k, []);
120
- groups.get(k).push(r);
121
- }
122
- return [...groups.entries()]
123
- .sort((a, b) => (a[0] === '' ? 1 : b[0] === '' ? -1 : a[0].localeCompare(b[0])))
124
- .map(([k, list]) => ({ key: k, label: k || COPY.noInitiative, rows: list }));
125
- }
126
-
127
- /** What the note shows, from the final notes when there are some, else from what was caught live. Pure. */
128
- export function partsOf(n) {
129
- const f = n.final_notes;
130
- if (f) {
131
- return {
132
- from: 'final',
133
- overview: f.overview || f.purpose || '',
134
- decisions: (f.decisions || []).map((x, i) => ({ ...x, sec: 'decision', i })),
135
- actions: (f.actions || []).map((x, i) => ({ ...x, sec: 'action', i })),
136
- questions: (f.questions || []).map((x, i) => ({ ...x, sec: 'question', i })),
137
- topics: f.topics || [],
138
- };
139
- }
140
- const c = V.caughtItems(n);
141
- let overview = '';
142
- if (n.agent && n.agent.markdown) overview = String(n.agent.markdown).split(/\r?\n/).map((l) => l.replace(/^\s*(?:#+|[-*]|\d+[.)])\s*/, '').replace(/\*\*|__|`/g, '').trim()).filter((l) => l && !/^(summary|overview)$/i.test(l)).join(' ');
143
- else {
144
- const ov = n.summary && n.summary.sections && n.summary.sections.overview;
145
- if (Array.isArray(ov)) overview = ov.map((x) => String((x && x.text) || '')).filter(Boolean).join(' ');
146
- }
147
- if (n.overview_pm) overview = n.overview_pm; // the PM's own summary, written before the final notes
148
- return { from: 'live', overview, decisions: c.decision, actions: c.action, questions: c.question, topics: [] };
149
- }
150
-
151
- /** The statements that differ from a repository file (lib/notes.js conflictsOf, read on the page). Pure. */
152
- export function conflictsOf(n) {
153
- const out = []; const seen = new Set();
154
- const add = (x) => {
155
- const c = x && !x.dropped && x.check;
156
- if (!c || c.verdict !== 'differs' || !c.doc) return;
157
- const k = c.doc + ':' + (c.line || 0);
158
- if (seen.has(k)) return;
159
- seen.add(k);
160
- out.push({ text: x.text, doc: c.doc, line: c.line || null, t: typeof x.t === 'number' ? x.t : null });
161
- };
162
- (n.highlights || []).forEach(add); (n.transcript || []).forEach(add); (n.bullets || []).forEach(add);
163
- return out;
164
- }
165
-
166
- /* ── mount ───────────────────────────────────────────────────────────────────────────────────────────────────────── */
167
-
168
- const insts = new WeakMap();
169
- const REREAD_MS = 4000;
170
-
171
- export function mountDestination(host, ctx) {
172
- let inst = insts.get(host);
173
- if (!inst) {
174
- inst = { host, root: el('div', { class: 'rp-page nt-pg', 'data-notes-page': '' }), head: null, left: el('section', { class: 'nt-pg-card nt-pg-list', 'data-ntm': 'list' }),
175
- right: el('section', { class: 'nt-pg-card nt-pg-note', 'data-ntm': 'note' }), rows: null, error: null, q: '', open: null, note: null, slug: null,
176
- readAt: 0, seq: 0, leftSig: '', rightSig: '', repo: null, ctx };
177
- insts.set(host, inst);
178
- }
179
- inst.ctx = ctx;
180
- ensureComponentsCss();
181
- if (!inst.root.isConnected || inst.root.parentNode !== host) host.replaceChildren(inst.root);
182
- if (ctx && ctx.FIXTURE) { inst.root.replaceChildren(empty({ text: COPY.fixture })); return; }
183
- ensureSprite();
184
- if (!inst.head) {
185
- const find = field({ label: COPY.search, kind: 'text', hideLabel: true, placeholder: COPY.search, attrs: { 'data-ntm': 'search', class: 'nt-pg-search' } });
186
- find.control.addEventListener('input', () => { inst.q = find.control.value; drawLeft(inst, true); });
187
- inst.head = el('div', { class: 'rp-head nt-pg-head' }, el('h1', { class: 'rp-head__title' }, COPY.title), find);
188
- inst.root.replaceChildren(inst.head, el('div', { class: 'nt-pg-grid' }, inst.left, inst.right));
189
- }
190
- if (!inst.unsub) inst.unsub = onNotes(() => { if (insts.get(host) === inst) refresh(inst); });
191
- inst.repo = (ctx && ctx.tab && ctx.tab.repo) || (ctx && ctx.state && ctx.state.product) || null;
192
- const slug = (ctx && ctx.tab && ctx.tab.slug) || null;
193
- if (slug !== inst.slug) { inst.slug = slug; if (slug) { inst.open = slug; inst.note = null; inst.ctxOpen = null; inst.info = false; loadOpen(inst); } }
194
- if (!inst.rows || Date.now() - inst.readAt > REREAD_MS) refresh(inst);
195
- drawLeft(inst);
196
- drawRight(inst);
197
- }
198
-
199
- export function disposeDestination(host) {
200
- const inst = insts.get(host);
201
- if (!inst) return;
202
- inst.seq++;
203
- if (inst.unsub) inst.unsub();
204
- inst.root.remove();
205
- insts.delete(host);
206
- }
207
-
208
- async function refresh(inst) {
209
- const seq = ++inst.seq;
210
- inst.readAt = Date.now();
211
- const [r, one] = await Promise.all([pmGet('/api/notes'), inst.open ? pmGet('/api/notes/one?id=' + encodeURIComponent(inst.open)) : null]);
212
- if (seq !== inst.seq) return;
213
- if (r && r.ok) { inst.rows = r.notes || []; inst.error = null; } else { inst.rows = inst.rows || []; inst.error = (r && r.error) || COPY.readError; }
214
- if (!inst.open && inst.rows.length) inst.open = inst.rows[0].id;
215
- if (one && one.ok && one.note && one.note.id === inst.open) { inst.note = one.note; inst.rec = one.recording || null; }
216
- else if (inst.open && !one) loadOpen(inst);
217
- drawLeft(inst);
218
- drawRight(inst);
219
- }
220
- async function loadOpen(inst) {
221
- const id = inst.open;
222
- const r = await pmGet('/api/notes/one?id=' + encodeURIComponent(id));
223
- if (inst.open !== id) return;
224
- inst.note = r && r.ok ? r.note : null;
225
- inst.rec = r && r.ok ? r.recording || null : null;
226
- inst.shots = r && r.ok && r.screen ? r.screen.frames || [] : [];
227
- inst.aside = r && r.ok && r.screen ? r.screen.aside || 0 : 0;
228
- drawRight(inst);
229
- }
230
- /** The replay of the note's kept audio: one <audio> per note, kept across redraws so playback goes on. Null when no audio is kept. */
231
- function replayFor(inst, n) {
232
- const rec = inst.rec;
233
- if (!rec || n.private) { inst.audio = null; return null; }
234
- const key = n.id + ':' + rec.bytes + ':' + (rec.cleaned ? 1 : 0);
235
- if (inst.audio && inst.audio.key === key) return inst.audio.el;
236
- if (inst.audio && !inst.audio.el.paused) return inst.audio.el; // never cut a replay that is playing
237
- const a = el('audio', { controls: true, preload: 'metadata', class: 'nt-audio', 'data-ntm-audio': '', src: '/api/notes/recording?id=' + encodeURIComponent(n.id) + '&b=' + rec.bytes + (rec.cleaned ? '&c=1' : '') });
238
- inst.audio = { key, el: a };
239
- return a;
240
- }
241
- function seekReplay(inst, ms) {
242
- const a = inst.audio && inst.audio.el;
243
- if (!a) return;
244
- try { a.currentTime = Math.max(0, ms / 1000); a.play(); } catch { /* the audio is not ready */ }
245
- }
246
- function choose(inst, id) {
247
- if (inst.open === id) return;
248
- inst.open = id; inst.note = null; inst.ctxOpen = null; inst.info = false;
249
- drawLeft(inst, true); drawRight(inst);
250
- loadOpen(inst);
251
- }
252
-
253
- /* ── the left card: notes by initiative ──────────────────────────────────────────────────────────────────────────── */
254
-
255
- function drawLeft(inst, force) {
256
- const rows = inst.rows;
257
- const q = inst.q.trim().toLowerCase();
258
- const sig = JSON.stringify([rows && rows.map((r) => [r.id, r.title, r.updated_at, iniName(r.initiative), r.conflicts]), q, inst.open, inst.error]);
259
- if (!force && sig === inst.leftSig) return;
260
- inst.leftSig = sig;
261
- const shown = (rows || []).filter((r) => !q || String(r.title || '').toLowerCase().includes(q) || String(iniName(r.initiative) || '').toLowerCase().includes(q));
262
- const head = el('h2', { class: 'nt-pg-label' }, el('span', null, COPY.byInitiative), el('span', { class: 'nt-pg-label__n' }, rows ? COPY.count(shown.length) : ''));
263
- let body;
264
- if (!rows) body = el('p', { class: 'nt-hint' }, COPY.reading);
265
- else if (!rows.length) body = empty({ text: inst.error || COPY.none });
266
- else if (!shown.length) body = empty({ text: COPY.noMatch(inst.q.trim()) });
267
- else {
268
- body = el('div', { class: 'nt-pg-groups' }, groupNotes(shown).map((g) => el('div', { class: 'nt-pg-group', 'data-ntm-group': g.label },
269
- el('h3', { class: 'nt-pg-group__h' }, el('span', null, g.label), el('span', { class: 'nt-pg-label__n' }, String(g.rows.length))),
270
- g.rows.map((r) => row({ title: r.title || 'Untitled note', compact: true,
271
- lead: [el('span', { class: 'nt-pg-row__at' }, whenShort(startOf(r)))],
272
- trail: r.conflicts ? [el('span', { class: 'nt-pg-warn-dot', 'data-ntm-conflict-dot': '', title: r.conflicts + (r.conflicts === 1 ? ' conflict' : ' conflicts') })] : null,
273
- onOpen: () => choose(inst, r.id), openLabel: 'Open ' + (r.title || 'Untitled note'),
274
- openAttrs: { 'aria-current': r.id === inst.open ? 'true' : 'false' },
275
- attrs: { class: 'nt-pg-row', 'data-ntm-row': r.id, title: 'Started ' + fullAt((r.sessions && r.sessions[0] && r.sessions[0].from) || startOf(r)) } })))));
276
- }
277
- inst.left.replaceChildren(head, body);
278
- }
279
-
280
- /* ── the right card: the note ────────────────────────────────────────────────────────────────────────────────────── */
281
-
282
- function drawRight(inst, force) {
283
- const n = inst.note;
284
- const live = dock.recordState();
285
- const held = !!n && live.mode !== 'idle' && live.id === n.id;
286
- const sig = JSON.stringify([inst.open, n && [n.updated_at, n.title, n.final_notes && n.final_notes.at, (n.transcript || []).length, (n.highlights || []).length, n.agent && n.agent.markdown, iniName(n.initiative), n.state, n.resume_until, n.ended_at, (n.sessions || []).length, n.meeting && n.meeting.context && n.meeting.context.taken_at], inst.rec && [inst.rec.bytes, inst.rec.cleaned], (inst.shots || []).length, inst.aside || 0, live.mode, live.id, !!inst.rows, inst.ctxOpen, inst.info]);
287
- // a held note draws again on every render: the clock, the lines and the paused minutes move. Nothing else draws without a change.
288
- if (!force && !held && sig === inst.rightSig) return;
289
- // a field being typed in is not redrawn under the cursor, except in the live block, whose fields are kept across redraws
290
- const active = typeof document !== 'undefined' ? document.activeElement : null;
291
- if (active && inst.right.contains(active) && active.matches('input, textarea, [contenteditable="true"]') && !active.closest('[data-nt-part="live"]')) return;
292
- inst.rightSig = sig;
293
- const fresh = el('div');
294
- if (!inst.open) fresh.appendChild(empty({ text: inst.rows && inst.rows.length ? COPY.pick : COPY.none }));
295
- else if (!n) fresh.appendChild(el('p', { class: 'nt-hint' }, COPY.reading));
296
- else for (const part of noteParts(inst, n, live)) fresh.appendChild(part);
297
- // a live transcript read to its end follows the new lines; one the PM scrolled up in stays where they left it
298
- const was = inst.right.querySelector('[data-nt-transcript]');
299
- const atEnd = !!was && was.scrollTop + was.clientHeight >= was.scrollHeight - 8;
300
- patchChildren(inst.right, fresh);
301
- const box = inst.right.querySelector('[data-nt-transcript]');
302
- if (atEnd && box && box.isConnected) box.scrollTop = box.scrollHeight;
303
- }
304
-
305
- const pad2 = (v) => String(v).padStart(2, '0');
306
- const fullAt = (t) => { const d = new Date(t); return Number.isFinite(d.getTime()) ? d.toLocaleDateString('en-GB', { weekday: 'short', day: 'numeric', month: 'short', year: 'numeric' }) + ', ' + pad2(d.getHours()) + ':' + pad2(d.getMinutes()) + ':' + pad2(d.getSeconds()) : ''; };
307
- const hmAt = (t) => { const d = new Date(t); return Number.isFinite(d.getTime()) ? pad2(d.getHours()) + ':' + pad2(d.getMinutes()) : ''; };
308
- const TZ = (() => { try { return Intl.DateTimeFormat().resolvedOptions().timeZone; } catch { return ''; } })();
309
-
310
- /** The exact times and dates of a note (R56): the calendar event, each recording stretch, the total, the status, the resume deadline. */
311
- function infoPanel(n) {
312
- const rows = [];
313
- const m = n.meeting && n.meeting.kind === 'event' ? n.meeting : null;
314
- if (m && m.start) rows.push(['Calendar event', fullAt(m.start).replace(/:\d\d$/, '') + (m.end ? '–' + hmAt(m.end) : '')]);
315
- (n.sessions || []).forEach((x, i) => rows.push(['Recording ' + (i + 1), fullAt(x.from) + (x.to ? ' → ' + fullAt(x.to) : ' → now')]));
316
- const total = (n.sessions || []).reduce((a, x) => a + Math.max(0, (x.to ? Date.parse(x.to) : Date.now()) - Date.parse(x.from)), 0);
317
- if (total) rows.push(['Total recorded', V.fmtTime(total)]);
318
- rows.push(['Status', ({ recording: 'Recording', paused: 'Paused', ended: 'Ended', idle: 'Not recorded' })[n.state] || '']);
319
- if (n.state === 'paused' && n.resume_until) rows.push(['Can be resumed', 'yes, until ' + fullAt(n.resume_until)]);
320
- else if (n.state === 'ended') rows.push(['Can be resumed', 'no: ' + (n.ended_by === 'stop' ? 'stopped for good' : 'paused over an hour, so it ended') + (n.ended_at ? ' at ' + fullAt(n.ended_at) : '')]);
321
- if (TZ) rows.push(['Time zone', TZ]);
322
- return el('dl', { class: 'nt-pg-info', 'data-ntm': 'info' }, rows.map(([k, v]) => [el('dt', null, k), el('dd', null, v)]));
323
- }
324
-
325
- /** The Meeting context card (R59): what the note kept of its meeting. Only what the calendar and the brief gave; nothing is made up. */
326
- function contextCard(inst, n, held) {
327
- const m = n.meeting && n.meeting.kind === 'event' ? n.meeting : null;
328
- if (!m) {
329
- return el('section', { class: 'nt-pg-ctx', 'data-ntm': 'context', 'data-ntm-context': 'none' },
330
- el('div', { class: 'nt-pg-ctx__h' }, el('h3', { class: 'nt-pg-sec__h' }, COPY.context), el('span', { class: 'nt-pg-ctx__sum' }, COPY.noMeeting),
331
- iconButton({ icon: 'link', ariaLabel: COPY.linkMeeting, onClick: () => V.linkMeeting({ state: inst.ctx.state, setState: inst.ctx.setState }, n.id), attrs: { 'data-ntm-link-meeting': '' } })));
332
- }
333
- const c = m.context || null;
334
- const lines = (n.final && n.final.segments && n.final.segments.length ? n.final.segments : (n.transcript || []).filter((x) => !x.dropped)).map((x) => ({ t: x.t, text: x.text }));
335
- const heard = c ? agendaHeard(c, lines) : [];
336
- const names = peopleOf(c);
337
- const open = inst.ctxOpen == null ? (held || !(n.transcript || []).length) : inst.ctxOpen;
338
- const sum = [names.length ? names.length + (names.length === 1 ? ' person' : ' people') : c && c.attendees ? c.attendees + ' attendees' : null,
339
- c && c.agenda && c.agenda.length ? heard.filter((x) => x !== null).length + ' of ' + c.agenda.length + ' agenda items heard' : null].filter(Boolean).join(' · ') || m.title;
340
- const head = el('div', { class: 'nt-pg-ctx__h' }, el('h3', { class: 'nt-pg-sec__h' }, COPY.context), el('span', { class: 'nt-pg-ctx__sum' }, sum),
341
- iconButton({ icon: 'chevron-down', ariaLabel: open ? 'Hide the meeting context' : 'Show the meeting context', expanded: open,
342
- onClick: () => { inst.ctxOpen = !open; drawRight(inst, true); }, attrs: { class: 'nt-pg-ctx__toggle' + (open ? ' nt-pg-ctx__toggle--open' : ''), 'data-ntm-context-toggle': '' } }));
343
- if (!open) return el('section', { class: 'nt-pg-ctx', 'data-ntm': 'context', 'data-ntm-context': 'folded' }, head);
344
- const cols = [];
345
- if (names.length) cols.push(el('div', { class: 'nt-pg-ctx__col', 'data-ntm-ctx': 'people' }, el('h4', null, COPY.people),
346
- el('ul', null, names.map((x) => el('li', null, el('span', { class: 'nt-pg-av', 'aria-hidden': 'true' }, x.split(/\s+/).map((w) => w[0]).slice(0, 2).join('').toUpperCase()), el('span', null, x))))));
347
- else if (c && c.attendees) cols.push(el('div', { class: 'nt-pg-ctx__col', 'data-ntm-ctx': 'people' }, el('h4', null, COPY.people), el('p', null, c.attendees + ' attendees. Names are not kept while calendar names are off.')));
348
- if (c && c.agenda && c.agenda.length) cols.push(el('div', { class: 'nt-pg-ctx__col', 'data-ntm-ctx': 'agenda' }, el('h4', null, COPY.agenda),
349
- el('ul', null, c.agenda.map((a, i) => el('li', { class: heard[i] !== null ? 'nt-pg-ag nt-pg-ag--heard' : 'nt-pg-ag', 'data-ntm-agenda': heard[i] !== null ? 'heard' : 'open' },
350
- el('span', { class: 'nt-pg-ag__mk', 'aria-hidden': 'true' }, heard[i] !== null ? icon('check') : null), el('span', null, a),
351
- heard[i] !== null ? el('span', { class: 'nt-pg-li__at' }, V.fmtTime(heard[i])) : null)))));
352
- const about = [];
353
- if (c && c.purpose) about.push(el('p', null, c.purpose));
354
- if (c && c.prep) about.push(el('p', { class: 'nt-pg-dim' }, 'To be ready: ' + c.prep));
355
- const tags = [];
356
- if (n.initiative) tags.push(el('span', { class: 'nt-pg-chip' }, 'Initiative · ' + iniName(n.initiative)));
357
- for (const r of (c && c.refs) || []) tags.push(r.link ? el('a', { class: 'nt-pg-chip', href: r.link, target: '_blank', rel: 'noopener noreferrer' }, r.label) : el('span', { class: 'nt-pg-chip' }, r.label));
358
- if (about.length || tags.length) cols.push(el('div', { class: 'nt-pg-ctx__col', 'data-ntm-ctx': 'about' }, el('h4', null, COPY.about), ...about, tags.length ? el('div', { class: 'nt-pg-chips' }, tags) : null));
359
- const det = [['When', fullAt(m.start).replace(/:\d\d$/, '') + (m.end ? '–' + hmAt(m.end) : '')]];
360
- if (c && c.series) det.push(['Series', c.series]);
361
- if (c && c.role) det.push(['Your role', c.role]);
362
- if (c && c.external) det.push(['Outside', 'someone from outside the company attends']);
363
- const links = ((c && c.links) || []).map((l) => el('a', { class: 'nt-pg-chip', href: l.url, target: '_blank', rel: 'noopener noreferrer' }, l.label));
364
- cols.push(el('div', { class: 'nt-pg-ctx__col', 'data-ntm-ctx': 'details' }, el('h4', null, COPY.details),
365
- el('dl', { class: 'nt-pg-dl' }, det.map(([k, v]) => [el('dt', null, k), el('dd', null, v)])), links.length ? el('div', { class: 'nt-pg-chips' }, links) : null));
366
- return el('section', { class: 'nt-pg-ctx nt-pg-ctx--open', 'data-ntm': 'context', 'data-ntm-context': 'open' }, head,
367
- el('div', { class: 'nt-pg-ctx__b' }, cols, c ? null : el('p', { class: 'nt-pg-dim nt-pg-ctx__note' }, COPY.noContext)));
368
- }
369
-
370
- function noteParts(inst, n, live) {
371
- const p = partsOf(n);
372
- const held = live.mode !== 'idle' && live.id === n.id;
373
- const recording = held && live.mode === 'recording';
374
- const meta = [COPY.meetingNote, whenLong(startOf(n)), minutes(lengthOf(n)), iniName(n.initiative)].filter(Boolean).join(' · ');
375
- const title = field({ label: 'Title', kind: 'title', hideLabel: true, value: n.title || '', placeholder: 'Untitled note',
376
- attrs: { 'data-ntm': 'title', class: 'nt-pg-title' },
377
- onCommit: async (v) => { const r = await pmPost('/api/notes/save', { id: n.id, title: v }); if (r && r.ok) { n.title = v; V.noteTitled(n.id, v); refresh(inst); } else toast({ text: COPY.notSaved, tone: 'destructive' }); } });
378
- // the icons (R54): recording shows Stop only (Highlight and Pause are in the top bar); paused shows Resume and Stop; a stopped
379
- // meeting shows neither; a note never recorded shows Record
380
- const acts = [];
381
- if (!n.private) {
382
- if (held && !recording) acts.push(iconButton({ icon: 'play', ariaLabel: 'Resume ' + (n.title || 'the note'), onClick: () => dock.resumeNow(), attrs: { class: 'nt-pg-resume', 'data-ntm': 'resume' } }));
383
- if (held) acts.push(iconButton({ icon: 'square', ariaLabel: COPY.stop, onClick: () => dock.stopNow(), attrs: { class: 'nt-pg-stop', 'data-ntm': 'stop' } }));
384
- else if (n.state === 'idle' || (n.state === undefined && !(n.transcript || []).length)) {
385
- const busy = live.mode === 'recording';
386
- const b = iconButton({ icon: 'mic', ariaLabel: busy ? 'Pause or stop the meeting being recorded first' : COPY.record, onClick: () => { if (!busy) dock.recordNote(n.id); }, attrs: { 'data-ntm': 'record' } });
387
- if (busy) b.setAttribute('aria-disabled', 'true');
388
- acts.push(b);
389
- }
390
- }
391
- acts.push(iconButton({ icon: 'file-text', ariaLabel: COPY.copy, onClick: () => copyMarkdown(n), attrs: { 'data-ntm': 'copy' } }));
392
- const more = iconButton({ icon: 'ellipsis', ariaLabel: 'More', attrs: { 'data-ntm': 'more' },
393
- onClick: () => menu({ anchor: more, ariaLabel: 'Note actions', items: [
394
- { label: COPY.linkMeeting, icon: 'link', onSelect: () => V.linkMeeting({ state: inst.ctx.state, setState: inst.ctx.setState }, n.id), attrs: { 'data-ntm-more-meeting': '' } },
395
- { label: COPY.linkInitiative, icon: 'target', onSelect: () => V.linkInitiative({ state: inst.ctx.state, setState: inst.ctx.setState }, n.id), attrs: { 'data-ntm-more-initiative': '' } },
396
- { sep: true },
397
- (inst.shots || []).length ? { label: COPY.delShots, danger: true, onSelect: () => deleteShots(inst, n), attrs: { 'data-ntm-del-shots': '' } } : null,
398
- { label: COPY.del, danger: true, onSelect: () => deleteNote(inst, n) },
399
- ].filter(Boolean) }) });
400
- acts.push(more);
401
- const out = [
402
- el('div', { class: 'nt-pg-top' },
403
- el('div', { class: 'nt-pg-metarow' }, el('span', { class: 'nt-pg-meta', 'data-ntm': 'meta' }, meta),
404
- iconButton({ icon: 'clock', ariaLabel: COPY.timeInfo, expanded: !!inst.info, size: 'sm', onClick: () => { inst.info = !inst.info; drawRight(inst, true); }, attrs: { 'data-ntm': 'time-info' } })),
405
- inst.info ? infoPanel(n) : null,
406
- el('div', { class: 'nt-pg-titlerow' }, el('div', { class: 'nt-pg-titlewrap' }, title), el('div', { class: 'nt-pg-acts' }, acts))),
407
- ];
408
- if (n.private) out.push(el('p', { class: 'nt-hint' }, 'This note is private: it is not recorded, and nothing from it goes to Jev or to any agent.'));
409
- out.push(contextCard(inst, n, held));
410
- if (held) {
411
- const liveHost = el('div', { class: 'nt-pg-live', 'data-ntm': 'live' });
412
- if (V.renderLive(liveHost, { state: inst.ctx.state, setState: inst.ctx.setState, FIXTURE: inst.ctx.FIXTURE }, n.id)) out.push(liveHost);
413
- }
414
-
415
- const replay = held ? null : replayFor(inst, n);
416
- if (replay) out.push(el('section', { class: 'nt-pg-sec nt-pg-sec--first nt-pg-replay', 'data-ntm': 'replay' },
417
- el('h3', { class: 'nt-pg-sec__h' }, el('span', null, 'Replay')), replay,
418
- el('p', { class: 'nt-hint' }, 'Kept on this machine. Press a time in the discussion to play from there.')));
419
- // the screenshots of the shared screen, on the same clock as the replay and the transcript (notes-screen-capture)
420
- const shots = held || n.private ? [] : inst.shots || [];
421
- const asideN = held || n.private ? 0 : inst.aside || 0;
422
- if (shots.length || asideN) out.push(screenStrip({ id: n.id, frames: shots, aside: asideN, seek: replay ? (ms) => seekReplay(inst, ms) : null, replay }));
423
-
424
- const cf = conflictsOf(n);
425
- if (cf.length) {
426
- out.push(el('section', { class: 'nt-pg-conflicts', 'data-ntm': 'conflicts' },
427
- el('h3', { class: 'nt-pg-sec__h nt-pg-sec__h--warn' }, el('span', null, COPY.conflicts), el('span', { class: 'nt-pg-label__n' }, String(cf.length))),
428
- cf.map((c) => el('div', { class: 'nt-pg-li', 'data-ntm-conflict': c.doc },
429
- el('span', { class: 'nt-pg-warn-dot' }),
430
- el('span', { class: 'nt-pg-li__text' }, '“' + c.text + '” ', el('span', { class: 'nt-pg-dim' }, COPY.conflictWith + ' '), el('span', { class: 'nt-pg-mono' }, c.doc + (c.line ? ':' + c.line : ''))),
431
- iconButton({ icon: 'file-text', ariaLabel: COPY.openFile + ': ' + c.doc, onClick: () => openFile(inst, c.doc), attrs: { 'data-ntm-open-file': c.doc } })))));
432
- }
433
-
434
- const hl = n.highlights || [];
435
- if (hl.length) {
436
- out.push(el('section', { class: 'nt-pg-sec nt-pg-sec--first', 'data-ntm': 'highlights' },
437
- el('h3', { class: 'nt-pg-sec__h' }, el('span', null, COPY.highlights), el('span', { class: 'nt-pg-label__n' }, String(hl.length))),
438
- hl.map((h) => el('div', { class: 'nt-pg-li', 'data-ntm-highlight': h.id },
439
- el('span', { class: 'nt-pg-li__at' }, typeof h.t === 'number' ? V.fmtTime(h.t) : ''),
440
- el('span', { class: 'nt-pg-tag' }, h.label || 'Highlight'),
441
- el('span', { class: 'nt-pg-li__text' }, h.text,
442
- h.check && h.check.doc ? el('span', { class: 'nt-pg-sub' }, (h.check.verdict === 'differs' ? 'Differs from ' : h.check.verdict === 'agrees' ? 'Agrees with ' : 'Closest file: ') + h.check.doc + (h.check.line ? ':' + h.check.line : '')) : null)))));
443
- }
444
-
445
- out.push(el('section', { class: 'nt-pg-sec nt-pg-sec--overview', 'data-ntm': 'overview' },
446
- el('h3', { class: 'nt-pg-sec__h nt-pg-sr' }, COPY.overview),
447
- p.overview
448
- ? editable(p.from === 'final' ? { tag: 'p', cls: 'nt-pg-para', text: p.overview, label: 'Overview', save: (t) => saveFinal(inst, n, 'overview', 0, t) } : { tag: 'p', cls: 'nt-pg-para', text: p.overview })
449
- : el('p', { class: 'nt-hint' }, COPY.noOverview)));
450
-
451
- const section = (key, label, items, mark, trail) => {
452
- if (!items.length) return null;
453
- return el('section', { class: 'nt-pg-sec', 'data-ntm-sec': key },
454
- el('h3', { class: 'nt-pg-sec__h' }, el('span', null, label), el('span', { class: 'nt-pg-label__n' }, String(items.length))),
455
- items.map((x) => el('div', { class: 'nt-pg-li', 'data-ntm-item': key },
456
- el('span', { class: 'nt-pg-li__mk', 'aria-hidden': 'true' }, mark),
457
- p.from === 'final' ? editable({ tag: 'span', cls: 'nt-pg-li__text', text: x.text, label: label, save: (t) => saveFinal(inst, n, x.sec, x.i, t) }) : el('span', { class: 'nt-pg-li__text' }, x.text),
458
- x.orig_text !== undefined ? el('span', { class: 'nt-pg-dim', title: 'First written as: ' + x.orig_text }, COPY.edited) : null,
459
- trail ? trail(x) : null)));
460
- };
461
- out.push(section('decision', COPY.decisions, p.decisions, '—'));
462
- out.push(section('action', COPY.actions, p.actions, '○', (x) => [
463
- x.owner || x.due ? el('span', { class: 'nt-pg-li__who' }, [x.owner, x.due].filter(Boolean).join(' · ')) : null,
464
- iconButton({ icon: 'list-checks', ariaLabel: COPY.makeTask, onClick: (e) => makeTaskFrom(n, x, { repo: inst.repo, btn: e && e.currentTarget }), attrs: { 'data-ntm-make-task': '' } }),
465
- ]));
466
- out.push(section('question', COPY.questions, p.questions, '?'));
467
-
468
- const tr = (n.final && n.final.segments && n.final.segments.length ? n.final.segments.map((g) => ({ t: g.t, text: g.text })) : (n.transcript || []).filter((x) => !x.dropped));
469
- // while the meeting is held the live block already shows the transcript, so the fold waits for the end
470
- if (!held && (p.topics.length || tr.length)) {
471
- const bits = [p.topics.length ? p.topics.length + (p.topics.length === 1 ? ' topic' : ' topics') : null, tr.length ? COPY.transcript(tr.length) : null].filter(Boolean).join(' · ');
472
- out.push(el('details', { class: 'nt-pg-sec nt-pg-fold', 'data-ntm': 'discussion' },
473
- el('summary', { class: 'nt-pg-fold__sum' }, COPY.discussion + ' · ' + bits),
474
- p.topics.map((tp) => el('div', { class: 'nt-pg-topic' }, el('h4', { class: 'nt-pg-topic__h' }, tp.title), (tp.points || []).map((pt) => el('p', { class: 'nt-pg-topic__p' }, pt)))),
475
- tr.length ? el('div', { class: 'nt-pg-trans' }, tr.map((x, k) => {
476
- // the shot that came up while this line was said, as a small picture beside it
477
- const sh = shots.length ? shotFor(shots, x.t || 0, k + 1 < tr.length ? tr[k + 1].t || 0 : Infinity) : null;
478
- return el('div', { class: 'nt-pg-li' }, inst.audio && !held ? button({ label: V.fmtTime(x.t || 0), variant: 'ghost', size: 'sm', onClick: () => seekReplay(inst, x.t || 0), attrs: { 'data-ntm-seek': '', title: 'Play from here' } }) : el('span', { class: 'nt-pg-li__at' }, V.fmtTime(x.t || 0)), el('span', { class: 'nt-pg-li__text' }, x.text),
479
- sh ? shotButton({ id: n.id, frames: shots, frame: sh, seek: inst.audio ? (ms) => seekReplay(inst, ms) : null }) : null);
480
- })) : null));
481
- }
482
- return out.filter(Boolean);
483
- }
484
-
485
- /** A text the PM corrects in place: a click puts the cursor in it, leaving it saves, Esc puts the words back. */
486
- function editable({ tag, cls, text, label, save }) {
487
- if (!save) return el(tag, { class: cls }, text);
488
- const node = el(tag, { class: cls + ' nt-pg-edit', contenteditable: 'true', spellcheck: 'true', role: 'textbox', 'aria-label': 'Edit ' + label, 'data-ntm-edit': '' }, text);
489
- let last = text;
490
- node.addEventListener('keydown', (e) => {
491
- if (e.key === 'Enter' && tag !== 'p') { e.preventDefault(); node.blur(); }
492
- if (e.key === 'Escape') { e.preventDefault(); node.textContent = last; node.blur(); }
493
- });
494
- node.addEventListener('blur', async () => {
495
- const v = node.textContent.replace(/\s+/g, ' ').trim();
496
- if (!v || v === last) { node.textContent = last; return; }
497
- if (await save(v)) last = v; else node.textContent = last;
498
- });
499
- return node;
500
- }
501
- async function saveFinal(inst, n, sec, i, text) {
502
- const r = await pmPost('/api/notes/final-edit', { id: n.id, sec, i, text });
503
- if (!r || !r.ok) { toast({ text: COPY.notSaved + ((r && r.error) ? ': ' + r.error : ''), tone: 'destructive' }); return false; }
504
- n.final_notes = r.final_notes;
505
- toast({ text: COPY.saved, timeout: 1500 });
506
- return true;
507
- }
508
-
509
- async function copyMarkdown(n) {
510
- try { await navigator.clipboard.writeText(V.noteMarkdown(n)); toast({ text: 'The note is on the clipboard as Markdown, with its meeting context.', timeout: 2500 }); }
511
- catch { toast({ text: 'The clipboard was not available.', tone: 'destructive' }); }
512
- }
513
- function openFile(inst, doc) {
514
- if (!inst.repo) return;
515
- import('./panel-tabs.js').then((m) => m.openDoc(inst.repo, doc, 'notes')).catch(() => toast({ text: 'The file could not be opened.', tone: 'destructive' }));
516
- }
517
-
518
- async function deleteShots(inst, n) {
519
- const sure = await askConfirm({ title: COPY.delShotsAsk, body: COPY.delShotsBody, confirmLabel: 'Delete', cancelLabel: 'Keep them' });
520
- if (!sure) return;
521
- const r = await pmPost('/api/notes/screen-delete', { id: n.id });
522
- if (!r || !r.ok) { toast({ text: (r && r.error) || 'The screenshots were not deleted.', tone: 'destructive' }); return; }
523
- inst.shots = [];
524
- drawRight(inst, true);
525
- }
526
- async function deleteNote(inst, n) {
527
- const sure = await askConfirm({ title: COPY.delAsk(n.title || 'Untitled note'), body: COPY.delBody, confirmLabel: 'Delete', cancelLabel: 'Keep it' });
528
- if (!sure) return;
529
- const r = await pmPost('/api/notes/delete', { id: n.id });
530
- if (!r || !r.ok) { toast({ text: (r && r.error) || 'The note was not deleted.', tone: 'destructive' }); return; }
531
- dock.forget(n.id);
532
- inst.open = null; inst.note = null;
533
- refresh(inst);
534
- }
535
-
536
- /** Open the Notes place on one note. */
537
- export function openNoteHere(id) { return openDestination('notes', { slug: id }); }