create-pmos 0.398.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 (515) hide show
  1. package/package.json +30 -25
  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 +19 -15
  7. package/workspace/briefing-premium-board-test.js +82 -50
  8. package/workspace/briefing-premium-calendar-2-test.js +36 -36
  9. package/workspace/briefing-premium-calendar-3-test.js +39 -39
  10. package/workspace/briefing-premium-calendar-test.js +23 -24
  11. package/workspace/briefing-premium-doc-edit-test.js +8 -10
  12. package/workspace/briefing-premium-initiative-test.js +38 -16
  13. package/workspace/briefing-premium-insights-test.js +114 -37
  14. package/workspace/briefing-premium-metrics-test.js +6 -4
  15. package/workspace/briefing-premium-products-test.js +10 -7
  16. package/workspace/briefing-premium-sources-test.js +25 -22
  17. package/workspace/briefing-premium-test.js +48 -43
  18. package/workspace/briefing-premium-work-test.js +16 -11
  19. package/workspace/c3-capture-test.js +0 -17
  20. package/workspace/changelog.json +29 -0
  21. package/workspace/ev-everywhere-test.js +210 -0
  22. package/workspace/fixtures/premium-viewer-fixtures.js +11 -6
  23. package/workspace/guide/briefing-premium.md +2 -2
  24. package/workspace/guide/home.md +58 -19
  25. package/workspace/guide/index.md +1 -1
  26. package/workspace/guide/layout.md +2 -2
  27. package/workspace/guide/notes.md +2 -2
  28. package/workspace/guide/phone-companion.md +1 -1
  29. package/workspace/lib/board-grill.js +63 -0
  30. package/workspace/lib/board-premium.js +36 -5
  31. package/workspace/lib/initiative-layout.js +77 -0
  32. package/workspace/lib/insights-premium.js +3 -2
  33. package/workspace/lib/insights-records.js +21 -7
  34. package/workspace/lib/meeting-points.js +52 -0
  35. package/workspace/lib/news-for-you.js +88 -0
  36. package/workspace/lib/notes-series.js +29 -6
  37. package/workspace/lib/report-confirm.js +48 -0
  38. package/workspace/lib/route-modules.js +9 -9
  39. package/workspace/lib/routes-board-docs.js +46 -0
  40. package/workspace/lib/routes-board-grill.js +90 -0
  41. package/workspace/lib/routes-home-review.js +108 -0
  42. package/workspace/lib/routes-initiative-layout.js +57 -0
  43. package/workspace/lib/routes-insights-premium.js +4 -1
  44. package/workspace/lib/routes-insights-records.js +8 -4
  45. package/workspace/lib/routes-meeting-points.js +37 -0
  46. package/workspace/lib/routes-news.js +57 -0
  47. package/workspace/lib/routes-notes.js +2 -1
  48. package/workspace/lib/routes-phone-day.js +18 -9
  49. package/workspace/lib/routes-report-confirm.js +31 -0
  50. package/workspace/lib/routes-search.js +38 -0
  51. package/workspace/lib/routes-slash.js +95 -0
  52. package/workspace/lib/search-index.js +176 -0
  53. package/workspace/package-lock.json +2 -2
  54. package/workspace/package.json +1 -2
  55. package/workspace/premium-board-actions-test.js +86 -50
  56. package/workspace/premium-briefing-depth-test.js +55 -54
  57. package/workspace/premium-chat-chart-tab-test.js +4 -2
  58. package/workspace/premium-chat-goal-view-test.js +1 -1
  59. package/workspace/premium-chat-report-tab-test.js +16 -2
  60. package/workspace/premium-chat-term-test.js +0 -10
  61. package/workspace/premium-core-doc-issue-test.js +15 -13
  62. package/workspace/premium-menu-rows-test.js +1 -1
  63. package/workspace/premium-phone-card-test.js +7 -5
  64. package/workspace/premium-report-read-test.js +55 -18
  65. package/workspace/premium-vw-backlog-test.js +2 -2
  66. package/workspace/premium-vw-cal-test.js +50 -35
  67. package/workspace/premium-vw-doc-test.js +10 -11
  68. package/workspace/premium-vw-item-test.js +1 -1
  69. package/workspace/premium-vw-jira-test.js +2 -2
  70. package/workspace/premium-vw-meet-test.js +37 -40
  71. package/workspace/premium-vw-notes-test.js +21 -19
  72. package/workspace/premium-vw-rec-test.js +11 -12
  73. package/workspace/premium-welcome-test.js +3 -3
  74. package/workspace/premium-work-depth-test.js +5 -6
  75. package/workspace/public/capture.html +23 -0
  76. package/workspace/public/pm/bd-acts.js +303 -225
  77. package/workspace/public/pm/bd-asks.js +261 -0
  78. package/workspace/public/pm/bd-pop.js +59 -0
  79. package/workspace/public/pm/bd-span.js +49 -13
  80. package/workspace/public/pm/bd-views.js +169 -0
  81. package/workspace/public/pm/c3-base.js +47 -0
  82. package/workspace/public/pm/c3-capture.js +1 -1
  83. package/workspace/public/pm/c3-ini-ui.js +1 -1
  84. package/workspace/public/pm/c3-sheet.js +1 -1
  85. package/workspace/public/pm/c3-toast.js +1 -1
  86. package/workspace/public/pm/console3.css +3 -0
  87. package/workspace/public/pm/cozy-board.css +301 -0
  88. package/workspace/public/pm/cozy-ev.css +228 -0
  89. package/workspace/public/pm/cozy-evmodel.js +106 -0
  90. package/workspace/public/pm/cozy-evui.js +47 -0
  91. package/workspace/public/pm/cozy-home.css +20 -5
  92. package/workspace/public/pm/cozy-insights.css +148 -10
  93. package/workspace/public/pm/cozy-nav.js +103 -39
  94. package/workspace/public/pm/cozy-news.js +140 -0
  95. package/workspace/public/pm/cozy-search.js +203 -0
  96. package/workspace/public/pm/cozy-settings.js +198 -0
  97. package/workspace/public/pm/cozy-sources.js +89 -0
  98. package/workspace/public/pm/cozy-today.css +220 -0
  99. package/workspace/public/pm/cozy-viewer.js +5 -2
  100. package/workspace/public/pm/cozy-vw-mtg.css +350 -0
  101. package/workspace/public/pm/cozy-vw-rp.css +152 -0
  102. package/workspace/public/pm/cozy.css +9 -0
  103. package/workspace/public/pm/goal-chat.js +5 -1
  104. package/workspace/public/pm/home-adddoc.js +5 -5
  105. package/workspace/public/pm/home-app.js +365 -70
  106. package/workspace/public/pm/home-around.js +24 -126
  107. package/workspace/public/pm/home-chat.js +77 -18
  108. package/workspace/public/pm/home-data.js +9 -7
  109. package/workspace/public/pm/home-dictate.js +57 -0
  110. package/workspace/public/pm/home-draft.js +6 -6
  111. package/workspace/public/pm/home-ini-model.js +190 -0
  112. package/workspace/public/pm/home-ini.css +171 -0
  113. package/workspace/public/pm/home-ini.js +466 -0
  114. package/workspace/public/pm/home-list.js +289 -0
  115. package/workspace/public/pm/home-more.js +18 -135
  116. package/workspace/public/pm/home-phone-card.js +13 -8
  117. package/workspace/public/pm/home-review.js +103 -0
  118. package/workspace/public/pm/home-task.js +67 -0
  119. package/workspace/public/pm/home-today.js +148 -0
  120. package/workspace/public/pm/home-work.js +63 -28
  121. package/workspace/public/pm/note-dock.js +1 -2
  122. package/workspace/public/pm/notes-links.js +1 -2
  123. package/workspace/public/pm/notes-task.js +3 -4
  124. package/workspace/public/pm/premium-board.js +164 -40
  125. package/workspace/public/pm/premium-chart-tab.js +4 -5
  126. package/workspace/public/pm/premium-first.js +5 -7
  127. package/workspace/public/pm/premium-initiative-head.js +3 -3
  128. package/workspace/public/pm/premium-insights.js +499 -202
  129. package/workspace/public/pm/premium-mtg-present.js +138 -0
  130. package/workspace/public/pm/premium-mtg-replay.js +142 -0
  131. package/workspace/public/pm/premium-report-read.js +216 -52
  132. package/workspace/public/pm/premium-report-tab.js +44 -19
  133. package/workspace/public/pm/premium-shell.js +7 -7
  134. package/workspace/public/pm/premium-vw-cal.js +150 -60
  135. package/workspace/public/pm/premium-vw-doc.css +20 -2
  136. package/workspace/public/pm/premium-vw-doc.js +22 -7
  137. package/workspace/public/pm/premium-vw-mtg.js +488 -261
  138. package/workspace/public/pm/premium-vw-notes.js +61 -0
  139. package/workspace/public/pm/rp-parts.js +269 -0
  140. package/workspace/public/pm/view-notes.js +2 -2
  141. package/workspace/public/premium-board.html +4 -3
  142. package/workspace/public/premium-insights.html +10 -10
  143. package/workspace/public/premium.html +3 -1
  144. package/workspace/r/m1.png +0 -0
  145. package/workspace/r/m2.png +0 -0
  146. package/workspace/r/m3.png +0 -0
  147. package/workspace/r/nl.png +0 -0
  148. package/workspace/replaced-tests.json +435 -0
  149. package/workspace/run-tests.js +323 -28
  150. package/workspace/server.js +15 -10
  151. package/workspace/test-files.json +3 -140
  152. package/workspace/test-lists/base.json +1 -2
  153. package/workspace/test-lists/c3-desktop-light-load.json +1 -2
  154. package/workspace/test-lists/c3-initiative-boards.json +1 -2
  155. package/workspace/test-lists/c3-meeting-focus.json +2 -12
  156. package/workspace/test-lists/c3-work-agent.json +1 -2
  157. package/workspace/test-lists/calendar-tidy-up.json +1 -2
  158. package/workspace/test-lists/console3-reports.json +1 -2
  159. package/workspace/test-lists/docs-three-way-sync.json +1 -2
  160. package/workspace/test-lists/extension-capture.json +5 -0
  161. package/workspace/test-lists/initiative-layout.json +9 -0
  162. package/workspace/test-lists/jira-wbs.json +1 -2
  163. package/workspace/test-lists/legacy-cleanup-a.json +9 -0
  164. package/workspace/test-lists/meeting-material.json +1 -2
  165. package/workspace/test-lists/meeting-notes.json +2 -36
  166. package/workspace/test-lists/meeting-replay.json +1 -2
  167. package/workspace/test-lists/mm-capture.json +2 -12
  168. package/workspace/test-lists/my-work.json +2 -10
  169. package/workspace/test-lists/onboarding-firstrun.json +2 -12
  170. package/workspace/test-lists/people-directory.json +1 -2
  171. package/workspace/test-lists/premium-uncovered-meetings.json +9 -0
  172. package/workspace/test-lists/premium-uncovered-reports.json +9 -0
  173. package/workspace/test-lists/run2-a.json +1 -2
  174. package/workspace/test-lists/run2-d.json +2 -19
  175. package/workspace/test-lists/run3-b.json +1 -2
  176. package/workspace/test-lists/run3-c.json +2 -12
  177. package/workspace/test-lists/run4-b.json +1 -2
  178. package/workspace/test-lists/run4-d.json +1 -5
  179. package/workspace/test-lists/run5-c.json +1 -11
  180. package/workspace/test-lists/run6.json +1 -5
  181. package/workspace/test-lists/uf-everywhere.json +15 -0
  182. package/workspace/test-lists/uf-home.json +9 -0
  183. package/workspace/test-lists/uncovered-board.json +9 -0
  184. package/workspace/test-lists/workspace-launch-flags.json +2 -12
  185. package/workspace/test-lists/workspace-profile-detection.json +2 -10
  186. package/workspace/test-timings.json +242 -123
  187. package/workspace/c3-briefing-test.js +0 -136
  188. package/workspace/c3-core-docs-test.js +0 -170
  189. package/workspace/c3-driver-fixture.js +0 -64
  190. package/workspace/c3-driver-test.js +0 -169
  191. package/workspace/c3-foundation-test.js +0 -163
  192. package/workspace/c3-ib-items-test.js +0 -114
  193. package/workspace/c3-ib-more-test.js +0 -146
  194. package/workspace/c3-ib-triage-backlog-test.js +0 -128
  195. package/workspace/c3-ini-harness.js +0 -66
  196. package/workspace/c3-ini-life-test.js +0 -167
  197. package/workspace/c3-initiatives-test.js +0 -186
  198. package/workspace/c3-light-load-test.js +0 -112
  199. package/workspace/c3-one-home-test.js +0 -149
  200. package/workspace/c3-phone-test.js +0 -289
  201. package/workspace/c3-quiet-test.js +0 -157
  202. package/workspace/c3-report-design-real-test.js +0 -264
  203. package/workspace/c3-report-design-test.js +0 -442
  204. package/workspace/c3-report-setup-test.js +0 -192
  205. package/workspace/c3-report-structure-real-test.js +0 -248
  206. package/workspace/c3-report-structure-test.js +0 -397
  207. package/workspace/c3-reports-test.js +0 -288
  208. package/workspace/c3-scan-test.js +0 -517
  209. package/workspace/c3-sessions-panel-test.js +0 -365
  210. package/workspace/c3-settings-test.js +0 -204
  211. package/workspace/c3-updates-test.js +0 -131
  212. package/workspace/c3-work-test.js +0 -260
  213. package/workspace/cut-stub.js +0 -40
  214. package/workspace/first-paint-audit.js +0 -160
  215. package/workspace/lib/c3-full-console.js +0 -15
  216. package/workspace/lib/engine/derived/trust.js +0 -3
  217. package/workspace/lib/engine/plan-forecast.js +0 -342
  218. package/workspace/lib/engine/report-families.js +0 -175
  219. package/workspace/lib/engine/truth-table.js +0 -57
  220. package/workspace/lib/routes-c3-init.js +0 -54
  221. package/workspace/lib/routes-c3-life.js +0 -120
  222. package/workspace/lib/routes-c3-timeline.js +0 -192
  223. package/workspace/lib/routes-forecast.js +0 -86
  224. package/workspace/lib/routes-releases.js +0 -130
  225. package/workspace/lib/routes-report-facts.js +0 -85
  226. package/workspace/lib/routes-report-families.js +0 -33
  227. package/workspace/lib/routes-signals.js +0 -51
  228. package/workspace/lib/routes-timeline.js +0 -197
  229. package/workspace/public/c3.html +0 -35
  230. package/workspace/public/index.html +0 -156
  231. package/workspace/public/pm/app.js +0 -831
  232. package/workspace/public/pm/bd-board.js +0 -159
  233. package/workspace/public/pm/bd-drag.js +0 -59
  234. package/workspace/public/pm/bd-model.js +0 -152
  235. package/workspace/public/pm/bd-timeline.js +0 -233
  236. package/workspace/public/pm/bd-tree.js +0 -244
  237. package/workspace/public/pm/board-copy.js +0 -59
  238. package/workspace/public/pm/board-read.js +0 -38
  239. package/workspace/public/pm/branches-sheet.js +0 -56
  240. package/workspace/public/pm/breakdown-api.js +0 -58
  241. package/workspace/public/pm/breakdown-copy.js +0 -138
  242. package/workspace/public/pm/briefing-deck.js +0 -441
  243. package/workspace/public/pm/briefing-model.js +0 -251
  244. package/workspace/public/pm/c3-ambient.js +0 -100
  245. package/workspace/public/pm/c3-audience-link.js +0 -21
  246. package/workspace/public/pm/c3-audience.js +0 -46
  247. package/workspace/public/pm/c3-boot.js +0 -13
  248. package/workspace/public/pm/c3-breakdown.js +0 -240
  249. package/workspace/public/pm/c3-brief-data.js +0 -11
  250. package/workspace/public/pm/c3-brief-mentions.js +0 -137
  251. package/workspace/public/pm/c3-brief-needs.js +0 -288
  252. package/workspace/public/pm/c3-brief-pulse.js +0 -112
  253. package/workspace/public/pm/c3-brief-summary.js +0 -139
  254. package/workspace/public/pm/c3-brief-today.js +0 -79
  255. package/workspace/public/pm/c3-brief.js +0 -279
  256. package/workspace/public/pm/c3-cal-strategy.js +0 -529
  257. package/workspace/public/pm/c3-calendar.js +0 -965
  258. package/workspace/public/pm/c3-calpop.js +0 -111
  259. package/workspace/public/pm/c3-case.js +0 -196
  260. package/workspace/public/pm/c3-core-docs.css +0 -18
  261. package/workspace/public/pm/c3-core-docs.js +0 -236
  262. package/workspace/public/pm/c3-daypart.js +0 -176
  263. package/workspace/public/pm/c3-demo-boards.js +0 -764
  264. package/workspace/public/pm/c3-demo-brief-ix.js +0 -350
  265. package/workspace/public/pm/c3-demo-brief-page.js +0 -70
  266. package/workspace/public/pm/c3-demo-cal-ix.js +0 -74
  267. package/workspace/public/pm/c3-demo-cal2.js +0 -66
  268. package/workspace/public/pm/c3-demo-cal3.js +0 -173
  269. package/workspace/public/pm/c3-demo-cal4.js +0 -169
  270. package/workspace/public/pm/c3-demo-cal5.js +0 -52
  271. package/workspace/public/pm/c3-demo-coredocs.js +0 -221
  272. package/workspace/public/pm/c3-demo-data.js +0 -552
  273. package/workspace/public/pm/c3-demo-focus.js +0 -181
  274. package/workspace/public/pm/c3-demo-init.js +0 -430
  275. package/workspace/public/pm/c3-demo-life.js +0 -77
  276. package/workspace/public/pm/c3-demo-material.js +0 -58
  277. package/workspace/public/pm/c3-demo-misc2.js +0 -34
  278. package/workspace/public/pm/c3-demo-phone.js +0 -48
  279. package/workspace/public/pm/c3-demo-plan2.js +0 -30
  280. package/workspace/public/pm/c3-demo-rd.js +0 -432
  281. package/workspace/public/pm/c3-demo-rep-ix.js +0 -126
  282. package/workspace/public/pm/c3-demo-rep2.js +0 -130
  283. package/workspace/public/pm/c3-demo-rep3.js +0 -138
  284. package/workspace/public/pm/c3-demo-rs.js +0 -287
  285. package/workspace/public/pm/c3-demo-term.js +0 -153
  286. package/workspace/public/pm/c3-demo-time.js +0 -49
  287. package/workspace/public/pm/c3-demo-work-ix.js +0 -32
  288. package/workspace/public/pm/c3-demo.js +0 -131
  289. package/workspace/public/pm/c3-design-studio.js +0 -369
  290. package/workspace/public/pm/c3-doc-formats.js +0 -153
  291. package/workspace/public/pm/c3-doc-sheet.js +0 -1230
  292. package/workspace/public/pm/c3-dock.js +0 -206
  293. package/workspace/public/pm/c3-docs.js +0 -291
  294. package/workspace/public/pm/c3-driver-work.js +0 -110
  295. package/workspace/public/pm/c3-driver.css +0 -18
  296. package/workspace/public/pm/c3-driver.js +0 -298
  297. package/workspace/public/pm/c3-focus.css +0 -304
  298. package/workspace/public/pm/c3-focus.js +0 -983
  299. package/workspace/public/pm/c3-ib-docs.js +0 -92
  300. package/workspace/public/pm/c3-ib-initiatives.js +0 -201
  301. package/workspace/public/pm/c3-ib-items.js +0 -210
  302. package/workspace/public/pm/c3-ib-releases.js +0 -48
  303. package/workspace/public/pm/c3-ib-sprints.js +0 -201
  304. package/workspace/public/pm/c3-ib-triage.js +0 -177
  305. package/workspace/public/pm/c3-ii-tabs.js +0 -252
  306. package/workspace/public/pm/c3-ini-life.css +0 -34
  307. package/workspace/public/pm/c3-ini-life.js +0 -379
  308. package/workspace/public/pm/c3-ini-records.js +0 -197
  309. package/workspace/public/pm/c3-ini-timeline.js +0 -278
  310. package/workspace/public/pm/c3-ini-work.js +0 -139
  311. package/workspace/public/pm/c3-init-extras.js +0 -170
  312. package/workspace/public/pm/c3-initiatives.js +0 -852
  313. package/workspace/public/pm/c3-lifecycle-panels.js +0 -479
  314. package/workspace/public/pm/c3-look.js +0 -27
  315. package/workspace/public/pm/c3-material.css +0 -22
  316. package/workspace/public/pm/c3-material.js +0 -321
  317. package/workspace/public/pm/c3-md.js +0 -3
  318. package/workspace/public/pm/c3-misc-panels.js +0 -89
  319. package/workspace/public/pm/c3-new-session.js +0 -110
  320. package/workspace/public/pm/c3-notes.js +0 -751
  321. package/workspace/public/pm/c3-phone-boot.js +0 -47
  322. package/workspace/public/pm/c3-phone-detail.js +0 -97
  323. package/workspace/public/pm/c3-phone-model.js +0 -3
  324. package/workspace/public/pm/c3-phone.css +0 -66
  325. package/workspace/public/pm/c3-phone.js +0 -444
  326. package/workspace/public/pm/c3-plan-panels.js +0 -163
  327. package/workspace/public/pm/c3-plan.js +0 -193
  328. package/workspace/public/pm/c3-quiet.css +0 -113
  329. package/workspace/public/pm/c3-quiet.js +0 -177
  330. package/workspace/public/pm/c3-replay.css +0 -133
  331. package/workspace/public/pm/c3-replay.js +0 -429
  332. package/workspace/public/pm/c3-report-deck.css +0 -163
  333. package/workspace/public/pm/c3-report-deck.js +0 -598
  334. package/workspace/public/pm/c3-report-frame.css +0 -20
  335. package/workspace/public/pm/c3-report-print.css +0 -20
  336. package/workspace/public/pm/c3-report-setup.css +0 -67
  337. package/workspace/public/pm/c3-report-setup.js +0 -298
  338. package/workspace/public/pm/c3-report-store.js +0 -244
  339. package/workspace/public/pm/c3-report-structure.css +0 -44
  340. package/workspace/public/pm/c3-report-structure.js +0 -473
  341. package/workspace/public/pm/c3-reports.css +0 -68
  342. package/workspace/public/pm/c3-reports.js +0 -377
  343. package/workspace/public/pm/c3-roadmap.js +0 -249
  344. package/workspace/public/pm/c3-scan-api.js +0 -167
  345. package/workspace/public/pm/c3-scan-next.js +0 -248
  346. package/workspace/public/pm/c3-scan-setup.js +0 -313
  347. package/workspace/public/pm/c3-scan-words.js +0 -41
  348. package/workspace/public/pm/c3-scan.css +0 -74
  349. package/workspace/public/pm/c3-scan.js +0 -93
  350. package/workspace/public/pm/c3-session-chat.js +0 -103
  351. package/workspace/public/pm/c3-session-conv.js +0 -165
  352. package/workspace/public/pm/c3-session-term.js +0 -216
  353. package/workspace/public/pm/c3-settings.css +0 -85
  354. package/workspace/public/pm/c3-settings.js +0 -1045
  355. package/workspace/public/pm/c3-shell.js +0 -628
  356. package/workspace/public/pm/c3-signals.js +0 -196
  357. package/workspace/public/pm/c3-strategy-panels.js +0 -45
  358. package/workspace/public/pm/c3-swipe.js +0 -230
  359. package/workspace/public/pm/c3-terminal-data.js +0 -48
  360. package/workspace/public/pm/c3-terminal-edge.js +0 -91
  361. package/workspace/public/pm/c3-terminal-icons.js +0 -40
  362. package/workspace/public/pm/c3-terminal-results.js +0 -141
  363. package/workspace/public/pm/c3-terminal.js +0 -52
  364. package/workspace/public/pm/c3-tickets.js +0 -163
  365. package/workspace/public/pm/c3-timeline.js +0 -201
  366. package/workspace/public/pm/calendar-views.js +0 -1049
  367. package/workspace/public/pm/console3-lift.md +0 -220
  368. package/workspace/public/pm/cozy-home.js +0 -172
  369. package/workspace/public/pm/cozy-initiative.css +0 -138
  370. package/workspace/public/pm/cycle-review.js +0 -125
  371. package/workspace/public/pm/data.js +0 -1577
  372. package/workspace/public/pm/dest-board.js +0 -444
  373. package/workspace/public/pm/dest-docs.js +0 -530
  374. package/workspace/public/pm/dest-initiatives.js +0 -162
  375. package/workspace/public/pm/dest-mywork.js +0 -307
  376. package/workspace/public/pm/dest-notes.js +0 -537
  377. package/workspace/public/pm/dest-people.js +0 -449
  378. package/workspace/public/pm/dest-reports.js +0 -383
  379. package/workspace/public/pm/dest-settings.js +0 -601
  380. package/workspace/public/pm/dest-today.js +0 -267
  381. package/workspace/public/pm/display-word.js +0 -56
  382. package/workspace/public/pm/doc-editor.js +0 -473
  383. package/workspace/public/pm/doc-graph.js +0 -272
  384. package/workspace/public/pm/doc-health-panel.js +0 -110
  385. package/workspace/public/pm/doc-rail.js +0 -167
  386. package/workspace/public/pm/doc-remote.js +0 -180
  387. package/workspace/public/pm/dock-sessions.js +0 -472
  388. package/workspace/public/pm/dock.js +0 -216
  389. package/workspace/public/pm/fixture.js +0 -821
  390. package/workspace/public/pm/flag-picker.js +0 -104
  391. package/workspace/public/pm/frame-copy.js +0 -278
  392. package/workspace/public/pm/freshness-line.js +0 -149
  393. package/workspace/public/pm/handoff-box.js +0 -82
  394. package/workspace/public/pm/initiative-list.js +0 -235
  395. package/workspace/public/pm/initiative-sheet.js +0 -331
  396. package/workspace/public/pm/initiatives-api.js +0 -95
  397. package/workspace/public/pm/initiatives-copy.js +0 -287
  398. package/workspace/public/pm/initiatives-timeline-copy.js +0 -59
  399. package/workspace/public/pm/initiatives-timeline.js +0 -410
  400. package/workspace/public/pm/initiatives-ui.js +0 -291
  401. package/workspace/public/pm/item-sheet.js +0 -268
  402. package/workspace/public/pm/keep-card.js +0 -204
  403. package/workspace/public/pm/lifecycle-lens-model.js +0 -246
  404. package/workspace/public/pm/lifecycle-lens.js +0 -276
  405. package/workspace/public/pm/lifecycle.js +0 -111
  406. package/workspace/public/pm/mobile.css +0 -366
  407. package/workspace/public/pm/mobile.js +0 -581
  408. package/workspace/public/pm/modes-live.js +0 -453
  409. package/workspace/public/pm/modes.js +0 -147
  410. package/workspace/public/pm/my-work-card.js +0 -51
  411. package/workspace/public/pm/my-work-data.js +0 -36
  412. package/workspace/public/pm/new-initiative-sheet.js +0 -169
  413. package/workspace/public/pm/next-step-ui.js +0 -190
  414. package/workspace/public/pm/outbox-panel.js +0 -125
  415. package/workspace/public/pm/palette-copy.js +0 -55
  416. package/workspace/public/pm/palette.js +0 -343
  417. package/workspace/public/pm/panel-breakdown.js +0 -702
  418. package/workspace/public/pm/panel-cockpit.js +0 -425
  419. package/workspace/public/pm/panel-detail.js +0 -1513
  420. package/workspace/public/pm/panel-initiatives.js +0 -929
  421. package/workspace/public/pm/panel-newsess.js +0 -709
  422. package/workspace/public/pm/panel-repos.js +0 -741
  423. package/workspace/public/pm/panel-tabs.js +0 -1506
  424. package/workspace/public/pm/panel-trees.js +0 -204
  425. package/workspace/public/pm/people-link.js +0 -106
  426. package/workspace/public/pm/phone-deck.js +0 -167
  427. package/workspace/public/pm/pm-work-view.js +0 -1533
  428. package/workspace/public/pm/portfolio-report.js +0 -61
  429. package/workspace/public/pm/premium-acts.js +0 -280
  430. package/workspace/public/pm/premium-brief.js +0 -111
  431. package/workspace/public/pm/premium-chat.js +0 -22
  432. package/workspace/public/pm/premium-doc-sheet.js +0 -312
  433. package/workspace/public/pm/premium-initiative.js +0 -324
  434. package/workspace/public/pm/premium-insights.css +0 -228
  435. package/workspace/public/pm/premium-metric-tiles.js +0 -68
  436. package/workspace/public/pm/premium-report-brief.js +0 -132
  437. package/workspace/public/pm/premium-vw-rec.js +0 -67
  438. package/workspace/public/pm/premium-wide.css +0 -30
  439. package/workspace/public/pm/print.css +0 -44
  440. package/workspace/public/pm/provider-cards.js +0 -136
  441. package/workspace/public/pm/registry.js +0 -203
  442. package/workspace/public/pm/release-card.js +0 -110
  443. package/workspace/public/pm/releases-view.js +0 -248
  444. package/workspace/public/pm/report-families-view.js +0 -505
  445. package/workspace/public/pm/report-slides.js +0 -438
  446. package/workspace/public/pm/report-tab.js +0 -33
  447. package/workspace/public/pm/report-view.js +0 -337
  448. package/workspace/public/pm/reports-copy.js +0 -134
  449. package/workspace/public/pm/roadmap.js +0 -294
  450. package/workspace/public/pm/run-card.js +0 -260
  451. package/workspace/public/pm/sessions-panel.js +0 -219
  452. package/workspace/public/pm/sheet-jira.js +0 -353
  453. package/workspace/public/pm/shell-bell.js +0 -163
  454. package/workspace/public/pm/shell-model.js +0 -83
  455. package/workspace/public/pm/shell-phone.js +0 -124
  456. package/workspace/public/pm/shell-readaloud.js +0 -53
  457. package/workspace/public/pm/shell-recording.js +0 -274
  458. package/workspace/public/pm/shell-ticker.js +0 -90
  459. package/workspace/public/pm/sig-watch.js +0 -41
  460. package/workspace/public/pm/slide-confirm.js +0 -163
  461. package/workspace/public/pm/slides-copy.js +0 -52
  462. package/workspace/public/pm/status-banner.js +0 -95
  463. package/workspace/public/pm/tab-doc.js +0 -859
  464. package/workspace/public/pm/tab-gone.js +0 -21
  465. package/workspace/public/pm/tab-term.js +0 -1210
  466. package/workspace/public/pm/tab-web.js +0 -90
  467. package/workspace/public/pm/timeline-copy.js +0 -48
  468. package/workspace/public/pm/timeline-forecast-view.js +0 -164
  469. package/workspace/public/pm/today-agenda.js +0 -331
  470. package/workspace/public/pm/today-cards.js +0 -244
  471. package/workspace/public/pm/today-copy.js +0 -506
  472. package/workspace/public/pm/today-day.js +0 -1371
  473. package/workspace/public/pm/today-goals.js +0 -297
  474. package/workspace/public/pm/today-jobs.js +0 -84
  475. package/workspace/public/pm/today-mentions.js +0 -50
  476. package/workspace/public/pm/topbar.js +0 -202
  477. package/workspace/public/pm/triage-card.js +0 -60
  478. package/workspace/public/pm/undo-hold.js +0 -103
  479. package/workspace/public/pm/view-addrepo.js +0 -208
  480. package/workspace/public/pm/view-files.js +0 -197
  481. package/workspace/public/pm/view-livenotes.js +0 -399
  482. package/workspace/public/pm/view-today.js +0 -13
  483. package/workspace/public/pm/view-validate.js +0 -171
  484. package/workspace/public/pm/welcome.js +0 -391
  485. package/workspace/public/pm/work-place.js +0 -68
  486. package/workspace/public/pm/xlsx-read.js +0 -117
  487. package/workspace/public/welcome.html +0 -22
  488. package/workspace/test-lists/browser-suites-green.json +0 -5
  489. package/workspace/test-lists/c3-core-docs.json +0 -9
  490. package/workspace/test-lists/c3-doc-sheet-rich.json +0 -6
  491. package/workspace/test-lists/c3-doc-sheet-size.json +0 -6
  492. package/workspace/test-lists/c3-doc-sheet-v2.json +0 -6
  493. package/workspace/test-lists/c3-ib-items.json +0 -9
  494. package/workspace/test-lists/c3-ib-more.json +0 -9
  495. package/workspace/test-lists/c3-ib-triage-backlog.json +0 -9
  496. package/workspace/test-lists/c3-ini-life.json +0 -9
  497. package/workspace/test-lists/c3-meeting-board.json +0 -5
  498. package/workspace/test-lists/c3-meeting-card.json +0 -5
  499. package/workspace/test-lists/c3-notes-place.json +0 -5
  500. package/workspace/test-lists/c3-notes-series.json +0 -5
  501. package/workspace/test-lists/calendar-time-page.json +0 -5
  502. package/workspace/test-lists/calpop.json +0 -4
  503. package/workspace/test-lists/console3-briefing.json +0 -9
  504. package/workspace/test-lists/console3-foundation.json +0 -9
  505. package/workspace/test-lists/console3-work-page.json +0 -9
  506. package/workspace/test-lists/premium-brief-parity.json +0 -9
  507. package/workspace/test-lists/report-design-studio-ui.json +0 -5
  508. package/workspace/test-lists/report-structure-ui.json +0 -11
  509. package/workspace/test-lists/report-workspace-ui.json +0 -5
  510. package/workspace/test-lists/run3-a.json +0 -5
  511. package/workspace/test-lists/run3-d.json +0 -6
  512. package/workspace/test-lists/run4-c.json +0 -13
  513. package/workspace/test-lists/today-goals-jobs-ui.json +0 -5
  514. package/workspace/test-lists/today-mentions-cards.json +0 -5
  515. package/workspace/test-lists/workspace-tabs-declutter.json +0 -13
@@ -1,19 +1,17 @@
1
- /* pm/home-around.js — Around you on Home: what the agents and the outside world left for you (initiative premium-briefing-depth;
2
- * moved onto Home by premium-agreed-design). The Agreed design does not draw it, so it is a plain minimal card in the Viewer with a
3
- * "Waiting for design" marker, opened from More. It keeps every feature of the old Briefing card:
4
- * the six rows, in the PRD order: agent proposals · mentions · portfolio pulse · horizon scan · report found · data freshness
5
- * the prep line (the meetings left today and how many are prepped) and today's digests from the morning brief
6
- * each row opens its own view in the same card, with Back to the rows; Escape closes the Viewer
1
+ /* pm/home-around.js — the views Around you held on Home (initiative premium-briefing-depth; moved onto Home by premium-agreed-design).
2
+ * premium-uncovered-features (canvas HmAround): Around you is gone, and what it showed lives in one place each. New for you (cozy-news.js)
3
+ * holds the mentions, the finished results and today's digests, and its "Where the rest went" rows open these views, which keep every press
4
+ * of the old card: agent proposals · mentions · portfolio pulse · horizon scan · report found. Data freshness is Sources (cozy-sources.js).
5
+ * Each view opens in the Viewer with Back to New for you; Escape closes the Viewer.
7
6
  * Every read is a route the console already uses and every write is a press that says what it does first (pmPost carries the launch nonce).
8
- * A source that cannot be read is named in its row, never shown as empty. Which products: ?ws=<id> that one, otherwise every product Home reads.
7
+ * A source that cannot be read is named in its view, never shown as empty. Which products: ?ws=<id> that one, otherwise every product Home reads.
9
8
  * Nothing here posts to Slack, Jira, Confluence or mail.
10
- * openAround(key?) → the body element; key opens one row's view at once (prop | men | pulse | scan | rep | src) */
9
+ * openAround(key?) → the body element; key opens one view (prop | men | pulse | scan | rep); no key opens New for you, src opens Sources
10
+ * prepHtmlOf(brief) → the prep line (the meetings left today and how many are prepped), from one GET /api/brief-page answer; New for you shows it */
11
11
  import { pmGet, pmPost } from './http.js';
12
- import { open as vwOpen } from './cozy-viewer.js';
13
- import { lineItems, behindOf, refreshTargets, whenRead } from './freshness-words.js';
12
+ import { open as vwOpen, current as vwCurrent } from './cozy-viewer.js';
14
13
 
15
14
  const esc = (s) => String(s == null ? '' : s).replace(/[&<>"']/g, (c) => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#39;' }[c]));
16
- const WAIT = '<p class="hx-wait"><i aria-hidden="true"></i>Waiting for design</p>';
17
15
  const STAMP = (n) => String(n).padStart(2, '0');
18
16
  const toast = (t) => { const el = document.getElementById('toast'); if (!el) return; el.textContent = t; el.classList.add('on'); clearTimeout(toast.t); toast.t = setTimeout(() => el.classList.remove('on'), 4200); };
19
17
  const CHECK = '<svg class="i" viewBox="0 0 24 24" aria-hidden="true"><path d="M5 12l4.5 4.5L19 7"/></svg>';
@@ -34,13 +32,13 @@ const bdIco = (d) => `<svg class="i" viewBox="0 0 24 24" aria-hidden="true">${d}
34
32
  const H2 = (t) => `<h4>${esc(t)}</h4>`;
35
33
  const kv = (rows) => `<dl class="hv-facts">${rows.map(([k, v]) => `<div><dt>${esc(k)}</dt><dd>${esc(v)}</dd></div>`).join('')}</dl>`;
36
34
 
37
- const A = { prop: null, men: null, pulse: null, scan: null, rep: null, src: null, prep: null, dig: null }; // the last answer of each read
35
+ const A = { prop: null, men: null, pulse: null, scan: null, rep: null }; // the last answer of each read
38
36
  const DEC = new Map(); // proposals decided on this visit: id → { item, st: 'kept' | 'back' | 'dropped', note, wrote, warnings }
39
37
  const PNOTE = {}, PERR = {}, PBACK = new Set();
40
38
  const MREAD = new Map(), MADD = new Set();
41
39
  const SDEC = new Map();
42
40
  const SERR = {}, SWHY = {}, SOPEN = new Set();
43
- const REC = new Map(), RERR = {}, SNOTE = {};
41
+ const REC = new Map(), RERR = {};
44
42
  const PMORE = new Set();
45
43
  let MTAB = 'all', BUSY = '', PSEL = '', PINFO = false, VIEW = '', PRODS = null;
46
44
  const getj = async (p) => { const r = await pmGet(p); return r && r.ok !== false ? r : { ok: false, error: (r && r.error) || 'the server did not answer' }; };
@@ -118,17 +116,9 @@ async function readReps(P) {
118
116
  if (!got.length && errs.length) return { ok: false, error: errs[0] };
119
117
  return { ok: true, prods: got, errs };
120
118
  }
121
- const readSrc = () => getj('/api/sources' + (wsParam() ? '?' + wq(wsParam()) : ''));
122
- /** Today's digests from the morning brief (the Briefing model's Today items of kind digest). */
123
- async function readDig() {
124
- const r = await getj('/api/briefing-premium' + (wsParam() ? '?' + wq(wsParam()) : ''));
125
- if (!r.ok || !r.model) return { ok: false, error: r.error || 'the Briefing is not read yet' };
126
- const T = r.model.today || {};
127
- return { ok: true, items: [].concat(T.earlier || [], T.ahead || []).filter((e) => e && e.kind === 'digest') };
128
- }
129
119
  async function readAll(which) {
130
120
  const P = await prods(), all = !which;
131
- const job = { prop: () => readProps(P), men: () => readMen(), pulse: () => readPulse(P), scan: () => readScan(P), rep: () => readReps(P), src: () => readSrc(), prep: () => briefPage(), dig: () => readDig() };
121
+ const job = { prop: () => readProps(P), men: () => readMen(), pulse: () => readPulse(P), scan: () => readScan(P), rep: () => readReps(P) };
132
122
  await Promise.all(Object.keys(job).filter((k) => all || which.includes(k)).map(async (k) => { try { A[k] = await job[k](); } catch (e) { A[k] = { ok: false, error: String((e && e.message) || e) }; } }));
133
123
  redraw();
134
124
  }
@@ -174,71 +164,15 @@ const dayWord = (iso) => {
174
164
  };
175
165
  const scanOpen = () => (A.scan && A.scan.ok ? A.scan.scans.reduce((n, s) => n + (s.proposals_waiting || 0), 0) : 0);
176
166
  const repFound = () => (A.rep && A.rep.ok ? A.rep.prods.flatMap((q) => q.findings.map((f) => ({ ...f, ws: q.ws, pname: q.pname }))) : []);
177
- const behindSrc = () => { if (!A.src || !A.src.ok) return []; const ids = behindOf(lineItems(A.src.sources)).map((i) => i.id); return A.src.sources.filter((s) => ids.includes(s.id)); };
178
- const joinN = (a) => (a.length < 2 ? a.join('') : a.slice(0, -1).join(', ') + ' and ' + a[a.length - 1]);
179
- function scanNowLine(S) {
180
- if (S.length && S.every((x) => x.switched_off)) return ' · Scan now is off here';
181
- const M = S.map((x) => x.manual).filter((m) => m && m.limit);
182
- if (!M.length) { const no = S.map((x) => x.manual).find((m) => m && m.ok === false && m.error); return no ? ' · ' + no.error : ''; }
183
- const left = M.reduce((n, m) => n + (m.left || 0), 0), lim = M.reduce((n, m) => n + m.limit, 0);
184
- return M.every((m) => m.ok === false) ? ' · Scan now: ' + (M[0].error || 'not now') : ' · Scan now: ' + left + ' of ' + lim + ' left today';
185
- }
186
- /** Refresh all's step, in words (the same run as the Sources card). */
187
- function allText(a) {
188
- if (!a) return '';
189
- const S = a.steps || [], reads = S.filter((x) => x.step === 'read'), der = S.filter((x) => x.step === 'derived');
190
- const left = reads.filter((x) => x.state === 'running' || x.state === 'waiting'), bad = S.filter((x) => x.state === 'failed').map((x) => x.label);
191
- if (a.phase === 'read') return 'Step 1 of 2: reading ' + left.map((x) => x.label).join(', ') + '. Home\'s list is written after them.';
192
- if (a.phase === 'derived') return 'Step 2 of 2: writing Home\'s list from the reads' + (bad.length ? ' (' + bad.join(', ') + ' failed, so its last read is used)' : '') + '.';
193
- const ok = der.length && der.every((x) => x.state === 'done');
194
- return 'Refresh all ended: ' + (ok ? 'the sources were read and Home\'s list was written again' : 'Home\'s list was not written again') + '.' + (bad.length ? ' Failed: ' + bad.join(', ') + '.' : '');
195
- }
196
-
197
- /** The six rows: { k, ic, t, s, m (count html), bar, wait }. Every word comes from A. */
198
- function aroundRows() {
199
- const R = [], rd = 'Reading…';
200
- { const a = A.prop, n = a && a.ok ? a.items.length : 0;
201
- R.push({ k: 'prop', ic: BDI.prop, wait: n > 0, t: !a ? rd : !a.ok ? 'Agent proposals ' + said(a) : n ? pl(n, 'agent proposal waits', 'agent proposals wait') + ' on you' : 'No agent proposals wait',
202
- s: !a || !a.ok ? '' : n ? 'Keep, send back or drop each one' : 'The agent files a draft here when it has one', m: n ? `<span class="due">${n}</span>` : '' }); }
203
- { const a = A.men, l = shownMen(), w = waitM(l);
204
- R.push({ k: 'men', ic: BDI.at, wait: w.length > 0, t: !a ? rd : !a.ok ? 'Mentions ' + said(a) : a.list === null ? 'No brief for today, so no mentions were read' : l.filter((m) => !m.read).length ? menLine(l) : 'No one has mentioned you today',
205
- s: !a || !a.ok || !l.filter((m) => !m.read).length ? '' : [...new Set(l.filter((m) => !m.read).map((m) => srcName(m.source)))].join(', '), m: w.length ? '<span class="due od">Reply</span>' : '' }); }
206
- { const a = A.pulse, g = a && a.ok ? groups(a.rows) : null, n = a && a.ok ? a.rows.length + a.none : 0;
207
- R.push({ k: 'pulse', ic: BDI.pulse, wait: !!(g && g.bad.length), t: !a ? rd : !a.ok ? 'Portfolio pulse ' + said(a) : n ? `Portfolio pulse: ${g.bad.length} late, ${g.warn.length} at risk` : 'Portfolio pulse: nothing to compare yet',
208
- s: !a || !a.ok ? '' : n ? `${g.ok.length} on plan · ${g.none.length + a.none} with no plan date` : 'No initiative has a promised date or a Jira read.', bar: n ? bar(g, n, a.none) : '', m: '' }); }
209
- { const a = A.scan, S = a && a.ok ? a.scans : [], w = scanOpen(), run = S.some((x) => x.open), last = S.map((x) => x.last && x.last.at).filter(Boolean).sort().pop(), nrep = S.reduce((n, x) => n + x.reports.filter((r) => r.written && !r.parent).length, 0);
210
- R.push({ k: 'scan', ic: BDI.scan, wait: w > 0, t: !a ? rd : !a.ok ? 'Horizon scan ' + said(a) : run ? 'Horizon scan: scanning now' : w ? 'Horizon scan: ' + pl(w, 'proposal waits', 'proposals wait') + ' for you' : S.every((x) => x.switched_off) ? 'Horizon scan: switched off' : last ? 'Horizon scan: nothing waits' : 'Horizon scan: no scan has run yet',
211
- s: !a || !a.ok ? '' : run ? 'Reading the web and the repository' : (last ? 'Ran ' + dayWord(last).toLowerCase() + (nrep ? ' · ' + pl(nrep, 'report', 'reports') : '') : 'Start one from here') + scanNowLine(S), m: w ? `<span class="due">${w}</span>` : '' }); }
212
- { const a = A.rep, L = repFound(), n = L.length, fd = a && a.ok ? a.prods.map((q) => q.finder).filter(Boolean) : [], off = fd.length > 0 && fd.every((x) => x.cadence === 'off'), nx = fd.map((x) => x.next_run).filter(Boolean).sort()[0];
213
- R.push({ k: 'rep', ic: BDI.rep, wait: n > 0, t: !a ? rd : !a.ok ? 'Report finder ' + said(a) : n === 1 ? 'Report found: ' + L[0].name : n ? pl(n, 'report', 'reports') + ' found in your work' : off ? 'The report finder is off' : 'No report found',
214
- s: !a || !a.ok ? '' : n ? 'Set it up, or say it is not a report' : nx ? 'The finder looks next ' + dayWord(nx) : off ? 'Switch it on in Settings' : 'It reads your calendar, Slack and the subjects of mail you sent', m: n ? `<span class="due">${n}</span>` : '' }); }
215
- { const a = A.src, b = behindSrc();
216
- R.push({ k: 'src', ic: BDI.src, wait: b.length > 0, t: !a ? rd : !a.ok ? 'Data freshness ' + said(a) : b.length > 2 ? b.length + ' sources need a new read' : b.length ? joinN(b.map((s) => s.label)) + (b.length === 1 ? ' needs' : ' need') + ' a new read' : 'Every source was read recently',
217
- s: !a || !a.ok ? '' : b.length > 2 ? joinN(b.map((s) => s.label)) + '. Read on a schedule, not live' : 'Sources are read on a schedule, not live', m: b.length ? `<span class="due">${b.length}</span>` : '' }); }
218
- return R;
219
- }
220
167
  const pHm = (iso) => { const d = new Date(iso); return STAMP(d.getHours()) + ':' + STAMP(d.getMinutes()); };
221
168
  /** The prep line: of the meetings still ahead today, how many have nothing left to do before them (/api/brief-page, `before` is the open items linked to a meeting). */
222
- function prepHtml() {
223
- const p = A.prep, t = p && p.ok ? p.today || [] : [], left = t.filter((m) => m.state !== 'past'), ok = left.filter((m) => !(m.before || []).length).length;
169
+ export function prepHtmlOf(p) {
170
+ const t = p && p.ok !== false ? p.today || [] : [], left = t.filter((m) => m.state !== 'past'), ok = left.filter((m) => !(m.before || []).length).length;
224
171
  if (!left.length) return '<div id="prep" class="ar-prep" hidden></div>';
225
172
  const cur = t.find((m) => m.state === 'now'), nxt = cur || t.find((m) => m.state === 'next'), R = 17, C = 2 * Math.PI * R;
226
173
  return `<div id="prep" class="ar-prep"><svg width="44" height="44" viewBox="0 0 44 44" role="img" aria-label="${ok} of ${left.length} prepped"><circle class="rb" cx="22" cy="22" r="${R}" fill="none" stroke-width="6"/><circle class="rg" cx="22" cy="22" r="${R}" fill="none" stroke-width="6" stroke-linecap="round" stroke-dasharray="${(C * ok / left.length).toFixed(2)} ${C.toFixed(2)}" transform="rotate(-90 22 22)"/><text class="rt" x="22" y="26" text-anchor="middle">${ok}/${left.length}</text></svg><div>${nxt ? `<b>${esc(nxt.title)}${cur ? ' is on now' : ' at ' + pHm(nxt.start) + ' is next'}</b>` : ''}<span>${pl(left.length, 'meeting', 'meetings')} left today. ${ok} of ${left.length} prepped.</span></div></div>`;
227
174
  }
228
175
  const bdLink = (href) => (/^https:\/\/\S+$/i.test(String(href || '')) ? href : '');
229
- /** Today's digests: each with its lines and its link (the morning brief's summary, not a copy of the source). */
230
- function digHtml() {
231
- const a = A.dig; if (!a || !a.ok || !a.items.length) return '';
232
- return `<section class="hx-sec" id="aroundDig"><h4>Digests ${a.items.length}</h4>${a.items.map((e) => { const d = e.dialog || {}, p = d.pane || {}, l = bdLink(d.link);
233
- return `<div class="bd-it ar-dig"><span class="bd-t">${esc(e.title)}</span><p class="bd-why">${esc(e.sub || '')}</p>${(p.paras || []).map((x) => `<p class="bd-q">${esc(x)}</p>`).join('')}${l ? `<div class="bd-acts"><a class="hx-b cta alt srcLink" href="${esc(l)}" target="_blank" rel="noopener noreferrer">${esc(d.linkLabel || 'Open it')}</a></div>` : ''}</div>`; }).join('')}</section>`;
234
- }
235
- function listHtml() {
236
- const R = aroundRows(), n = R.filter((r) => r.wait).length;
237
- const cap = [A.prop, A.men, A.pulse, A.scan, A.rep, A.src].some((x) => x === null) ? 'Reading' : n ? n + ' to look at' : 'quiet';
238
- return WAIT + `<div class="ar-hd"><b>Around you</b><small id="aroundCap">${esc(cap)}</small></div>` + prepHtml()
239
- + `<div id="aroundBody" class="ar-rows">${R.map((r) => `<button type="button" class="ar-row" data-bd="${r.k}"><span class="ar-ic">${bdIco(r.ic)}</span><span class="wtx"><span class="wtit">${esc(r.t)}</span>${r.s ? `<span class="ws">${esc(r.s)}</span>` : ''}${r.bar || ''}</span>${r.m ? `<span class="wm">${r.m}</span>` : ''}</button>`).join('')}</div>`
240
- + digHtml() + '<p class="hx-n">Nothing here posts to Slack, Jira, Confluence or mail. A button that records something says what, before you press it.</p>';
241
- }
242
176
 
243
177
  /* ── the pieces of a view ── */
244
178
  const bdActs = (...b) => `<div class="bd-acts">${b.join('')}</div>`;
@@ -425,44 +359,6 @@ async function repPress(b) {
425
359
  await readAll(['rep']); draw(`.bd-it[data-id="${CSS.escape(id)}"] .bd-done`);
426
360
  }
427
361
 
428
- /* ── data freshness ── */
429
- const SSTATE = { fresh: 'Recent', stale: 'Old', never: 'Never read', building: 'Reading now…', failed: 'Failed', off: 'Off' };
430
- const limitWord = (ms) => (ms >= 48 * 3600000 ? Math.round(ms / 86400000) + ' days' : Math.round(ms / 3600000) + ' hours');
431
- function srcHtml() {
432
- const a = A.src; if (!a || !a.ok) return `<p class="nodef err" role="alert">Data freshness ${esc(said(a))}</p>`;
433
- const b = behindSrc(), many = refreshTargets(a.sources);
434
- const row = (s) => {
435
- const when = s.id === 'repository' && s.state === 'fresh' ? 'watching' : s.as_of ? whenRead(s.as_of) : 'never';
436
- const sch = s.schedule ? [s.schedule.cadence, s.schedule.day, s.schedule.time].filter(Boolean).join(' ') : s.skill ? 'no schedule' : 'on every change';
437
- return `<div class="bd-src"><span><b>${esc(s.label)}</b><small><span class="bd-st ${esc(s.state)}">${esc(SSTATE[s.state] || s.state)}</span> · ${esc(when)} · ${esc(sch)}${s.stale_after_ms ? ' · old after ' + esc(limitWord(s.stale_after_ms)) : ''}</small><small>${s.skill ? 'Refresh starts the ' + esc(s.skill) + ' skill in an agent session, with your own connection.' : 'Refresh rebuilds the facts on this machine.'}</small>${SNOTE[s.id] ? `<small role="status">${esc(SNOTE[s.id])}</small>` : ''}</span>${bdBtn('Refresh', 'sfone', s.id, true, (s.state === 'off' || s.state === 'building' ? ' disabled' : '') + ` aria-label="Refresh ${esc(s.label)}"`)}</div>`;
438
- };
439
- return `<div class="bd-top"><p class="hx-n">Sources are read on a schedule, not live. ${b.length ? pl(b.length, 'source needs', 'sources need') + ' a new read.' : 'None is old.'}</p>${bdBtn('Refresh all', 'sfall', '', false, many.length ? '' : ' disabled')}</div>${a.sources.map(row).join('')}<p class="hx-n">Refresh all reads every source, then writes Home's list from those reads. The server calls nothing outside this machine: an outside source is read by a skill, with your own connection.</p>`;
440
- }
441
- let FPOLL = null;
442
- function srcPoll(n) {
443
- clearTimeout(FPOLL);
444
- if (!n || !A.src || !A.src.ok || !A.src.sources.some((s) => s.state === 'building')) return;
445
- FPOLL = setTimeout(async () => { if (VIEW !== 'src') return; await readAll(['src']); srcPoll(n - 1); }, 3000);
446
- }
447
- async function srcPress(b) {
448
- const act = b.dataset.bda; if (!['sfone', 'sfall'].includes(act)) return;
449
- const ids = act === 'sfall' ? refreshTargets(A.src.sources) : [b.dataset.id];
450
- BUSY = 'src'; b.disabled = true;
451
- if (act === 'sfall') {
452
- const r = await pmPost('/api/sources/refresh-all', { ws: A.src.ws || wsParam() || '' });
453
- BUSY = '';
454
- toast(!r || !r.ok ? 'Refresh all did not start: ' + ((r && r.error) || 'the server did not answer') + '.' : r.joined ? 'Refresh all is already running. ' + allText(r.all) : allText(r.all));
455
- await readAll(['src']); draw('[data-bda="sfall"]'); srcPoll(8);
456
- return;
457
- }
458
- const got = await Promise.all(ids.map(async (id) => [id, await pmPost('/api/sources/refresh', { ws: A.src.ws || wsParam() || '', source: id })]));
459
- BUSY = '';
460
- let bad = 0;
461
- for (const [id, r] of got) { if (r && r.ok) SNOTE[id] = r.started === 'session' ? 'An agent session started to read it.' : 'Rebuilding the facts on this machine.'; else { bad++; SNOTE[id] = 'It did not start: ' + ((r && r.error) || 'the server did not answer') + '.'; } }
462
- toast(bad ? bad + ' of ' + ids.length + ' did not start.' : 'Reading again.');
463
- await readAll(['src']); draw(`[data-bda="sfone"][data-id="${CSS.escape(ids[0])}"]`); srcPoll(8);
464
- }
465
-
466
362
  /* ── the card ── */
467
363
  const VIEWS = {
468
364
  prop: { kind: 'Agent proposals', title: propTitle, html: propsHtml, press: propPress, say: () => (A.prop && A.prop.ok ? (A.prop.items.length ? pl(A.prop.items.length, 'proposal waits', 'proposals wait') + ' for you. Keep one to record it, send it back with a note, or drop it.' : 'No proposal waits for you.') : 'The proposals could not be read.') },
@@ -470,17 +366,17 @@ const VIEWS = {
470
366
  pulse: { kind: 'Portfolio pulse', title: () => 'Portfolio pulse', html: pulseHtml, press: async () => {}, say: () => { const a = A.pulse, g = a && a.ok ? groups(a.rows) : null; return g ? `${g.bad.length} late and ${g.warn.length} at risk, of ${a.rows.length + a.none}. The late and at-risk ones are listed first.` : 'The initiatives could not be read.'; } },
471
367
  scan: { kind: 'Horizon scan', title: () => 'Horizon scan', html: scanHtml, press: scanPress, say: () => (A.scan && A.scan.ok ? (scanOpen() ? pl(scanOpen(), 'proposal waits', 'proposals wait') + ' for you. Nothing acts until you approve it.' : 'No proposal waits for you. Nothing acts until you approve it.') : 'The scan could not be read.') },
472
368
  rep: { kind: 'Report finder', title: () => 'Report found', html: repHtml, press: repPress, say: () => (A.rep && A.rep.ok ? (repFound().length ? pl(repFound().length, 'report was', 'reports were') + ' found in your work. Set it up, or say it is not a report. PMOS drafts only.' : 'No report waits for you.') : 'The findings could not be read.') },
473
- src: { kind: 'Data freshness', title: () => 'Data freshness', html: srcHtml, press: srcPress, say: () => { const b = behindSrc(); return A.src && A.src.ok ? (b.length ? joinN(b.map((s) => s.label)) + (b.length === 1 ? ' needs' : ' need') + ' a new read. Refresh one, or all.' : 'Every source was read recently.') : 'The sources could not be read.'; } },
474
369
  };
475
370
  let BODY = null;
476
371
  /** Draw the card: the rows, or the open view. focus: a selector to focus after the draw. */
477
372
  function draw(focus) {
478
373
  if (!BODY || !BODY.isConnected) return;
374
+ { const c = vwCurrent(); if (!c || !/^more:around/.test(c.id || '')) return; } // the Viewer moved on to another item: a late read draws nothing
479
375
  const V = VIEWS[VIEW];
480
- if (!V) BODY.innerHTML = `<div class="ar">${listHtml()}</div>`;
481
- else {
376
+ if (V) {
482
377
  const t = document.getElementById('czVwTitle'); if (t) t.textContent = V.title();
483
- BODY.innerHTML = `<div class="ar">${WAIT}<div class="ar-hd"><button type="button" class="hx-b alt" data-bda="back">Back to Around you</button></div><p class="hx-n ar-say">${esc(V.say())}</p><div class="bd-a" data-bd-view="${VIEW}">${V.html()}</div></div>`;
378
+ BODY.innerHTML = `<div class="ar"><div class="ar-hd"><button type="button" class="hx-b alt" data-bda="back">Back to New for you</button></div>${A[VIEW] === null ? '<p class="hx-n ar-say" role="status">Reading</p>' // the view opens before its first read ends
379
+ : `<p class="hx-n ar-say">${esc(V.say())}</p><div class="bd-a" data-bd-view="${VIEW}">${V.html()}</div>`}</div>`;
484
380
  }
485
381
  BODY.querySelectorAll('.bd-bar i[data-w]').forEach((i) => i.style.setProperty('--bd-w', i.dataset.w + '%')); // each part of the pulse bar is as wide as its share
486
382
  if (focus) { const f = BODY.querySelector(focus) || BODY.querySelector('.bd-a button:not([disabled]), .bd-a a'); if (f) f.focus(); }
@@ -490,16 +386,15 @@ function show(k) {
490
386
  VIEW = VIEWS[k] ? k : '';
491
387
  PSEL = ''; PINFO = false;
492
388
  BODY = vwOpen({ id: 'more:around' + (VIEW ? ':' + VIEW : ''), kind: VIEW ? VIEWS[VIEW].kind : 'Around you', title: VIEW ? VIEWS[VIEW].title() : 'What the agents and others left for you', icon: 'info',
493
- render: (b) => { b.classList.add('hx'); BODY = b; draw(); wire(b); }, onClose: () => { clearTimeout(SPOLL); clearTimeout(FPOLL); } });
389
+ render: (b) => { b.classList.add('hx'); BODY = b; draw(); wire(b); }, onClose: () => { clearTimeout(SPOLL); } });
494
390
  if (VIEW === 'scan') scanPoll();
495
- if (VIEW === 'src') srcPoll(8);
496
391
  return BODY;
497
392
  }
498
393
  function wire(b) {
499
394
  b.onclick = async (e) => {
500
395
  const r = e.target.closest('[data-bd]'); if (r && !VIEW) { show(r.dataset.bd); return; }
501
396
  const t = e.target.closest('[data-bda]'); if (!t || BUSY) return;
502
- if (t.dataset.bda === 'back') { show(''); return; }
397
+ if (t.dataset.bda === 'back') { import('./cozy-news.js').then((M) => M.openNews({})); return; } // Around you is gone: its views come from New for you
503
398
  if (t.disabled) return;
504
399
  if (VIEWS[VIEW]) await VIEWS[VIEW].press(t);
505
400
  };
@@ -508,8 +403,11 @@ function wire(b) {
508
403
  const s = e.target.closest('[data-bds]'); if (s) { SWHY[s.dataset.bds] = s.value; const k = b.querySelector(`[data-bda="sdis"][data-id="${CSS.escape(s.dataset.bds)}"]`); if (k) k.disabled = !s.value.trim(); }
509
404
  };
510
405
  }
406
+ /** premium-uncovered-features (HmAround): Around you is gone. No key opens New for you, src opens Sources; the other keys open their view. */
511
407
  export function openAround(key) {
512
- const body = show(key || '');
408
+ if (key === 'src') return import('./cozy-sources.js').then((M) => M.openSources());
409
+ if (!key || !VIEWS[key]) return import('./cozy-news.js').then((M) => M.openNews({}));
410
+ const body = show(key);
513
411
  readAll();
514
412
  return body;
515
413
  }
@@ -5,7 +5,10 @@
5
5
  * checklist while it works (from its own TodoWrite list); a permission card with the change before → after, Allow and Deny. Over the box: the
6
6
  * run strip with Stop, and "Also waiting on you". Two boxes: the basic one on Home (In: chip above, → send, the hint under it) and the rich
7
7
  * one in an initiative (+, /, @, the In:/To: chip, the key hint, ↑ send). The + menu holds Attach a file, and the Notes and the terminal of
8
- * the conversation (not in the design yet: marked Waiting for design).
8
+ * the conversation.
9
+ * The mic is part of the input (canvas HmMic): press it and speak, the words appear as text in the box with a small blue dot while it
10
+ * listens, press it again to stop, edit, send. On a phone it opens the "Speak to Claude" sheet (HmPhone): Discard, or stop and send.
11
+ * Nothing is saved as audio (home-dictate.js). A card the target brings (intro.card, the decision card of HmDecide) draws under the intro.
9
12
  *
10
13
  * The words are Claude Code's own transcript. A conversation is either a chat key (GET /api/briefing-premium/thread?key=, the session it
11
14
  * started, POST /ask and /press) or a session with no chat key (GET /api/sessions/conversation?id=, POST /api/session/say and /keys).
@@ -16,12 +19,13 @@
16
19
  * viewerClosed(), reopenViewer() } */
17
20
  import { mdHtml, userHtml, toolLine, webKind } from './chat-md.js';
18
21
  import { streamOf, runOf, roleOf, tintOf, hm } from './home-data.js';
19
- import { splitGoal, shownUser, goalBlockHtml, goalProgressHtml, goalChipHtml, goalViewHtml, goalNow, slashMatches } from './goal-chat.js';
22
+ import { splitGoal, shownUser, goalBlockHtml, goalProgressHtml, goalChipHtml, goalViewHtml, goalNow, slashMatches, loadSlash } from './goal-chat.js';
20
23
  import { splitReport, reportChipHtml, blockSig } from './report-chat.js';
21
24
  import { turnsOf } from './chat-context.js';
22
25
  import { askCardHtml, answerText } from './chat-ask.js';
23
26
  import { splitFiles, filesHtml, sizeText, MAX_BYTES, MAX_FILES, setAttachSink } from './premium-attach.js';
24
27
  import * as VWC from './cozy-viewer.js';
28
+ import { canDictate, dictate } from './home-dictate.js';
25
29
  /* The views a chat opens go in the Viewer: on a page with no dialog the old viewer's views draw in the cozy card (premium-viewer.js). */
26
30
  const views = {
27
31
  ctx: () => import('./premium-vw-ctx.js'), file: () => import('./premium-vw-file.js'), attach: () => import('./premium-attach.js'),
@@ -30,6 +34,7 @@ const views = {
30
34
 
31
35
  const SVG = (d, w = 16, sw = 2) => `<svg aria-hidden="true" width="${w}" height="${w}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="${sw}" stroke-linecap="round" stroke-linejoin="round"><path d="${d}"/></svg>`;
32
36
  const CHEV = 'M9 6l6 6-6 6', ARROW = 'M5 12h14M13 6l6 6-6 6', UP = 'M12 19V5M6 11l6-6 6 6', PLUS = 'M12 5v14M5 12h14', DOWN = 'M6 9l6 6 6-6';
37
+ const MIC = 'M12 3a3 3 0 0 0-3 3v6a3 3 0 0 0 6 0V6a3 3 0 0 0-3-3zM5 11a7 7 0 0 0 14 0M12 18v3', SQ = 'M6 6h12v12H6z', XX = 'M6 6l12 12M18 6L6 18', OK = 'M5 12l5 5 9-10';
33
38
  const PANE = '<svg aria-hidden="true" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"><rect x="3" y="4" width="18" height="16" rx="3"></rect><path d="M14 4v16"></path></svg>';
34
39
  const DOTS = '<svg aria-hidden="true" width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><circle cx="5" cy="12" r="1.8"/><circle cx="12" cy="12" r="1.8"/><circle cx="19" cy="12" r="1.8"/></svg>';
35
40
  const INTERRUPT = /^\[Request interrupted by user/;
@@ -46,6 +51,9 @@ export function mountChat(el, host) {
46
51
  el.innerHTML = `<button type="button" class="hm-reopen" id="hmReopen" aria-label="Open the Viewer" title="Open the Viewer" hidden>${PANE}</button>`
47
52
  + '<div class="hm-log" id="hmLog" role="log" aria-live="polite"></div><div class="hm-foot" id="hmFoot"></div>';
48
53
  const log = el.querySelector('#hmLog'), foot = el.querySelector('#hmFoot'), reopen = el.querySelector('#hmReopen');
54
+ loadSlash(host.pmGet).then(() => { if (el.querySelector('#hmSlash:not([hidden])')) drawSlash(); });
55
+ // when a hidden log is shown (the phone's chat over the list), a jump still owed is made then
56
+ if (typeof ResizeObserver === 'function') new ResizeObserver(() => { if (C.jump && log.clientHeight) { log.scrollTop = log.scrollHeight; if (C.conv) C.jump = false; } }).observe(log);
49
57
  reopen.onclick = () => host.reopenViewer();
50
58
  // the foot's height, for the place menu's button on a phone: it sits just above the box and its bars (cozy-home.css --hm-foot-h)
51
59
  if (typeof ResizeObserver === 'function') new ResizeObserver(() => document.body.style.setProperty('--bd-hmfoot', Math.round(foot.getBoundingClientRect().height) + 'px')).observe(foot);
@@ -101,7 +109,8 @@ export function mountChat(el, host) {
101
109
  function introHtml(o) {
102
110
  if (!o) return '';
103
111
  const r = o.role || { name: 'Claude', initial: 'C' };
104
- return `<div class="hm-a">${avHtml(r)}<div class="hm-ab"><p class="hm-who"><b>${esc(r.name)}</b> <span class="hm-say">${esc(o.text)}</span></p></div></div>`
112
+ const card = o.card && typeof o.card.html === 'function' ? o.card.html() : '';
113
+ return `<div class="hm-a">${avHtml(r)}<div class="hm-ab"><p class="hm-who"><b>${esc(r.name)}</b> <span class="hm-say">${esc(o.text)}</span></p>${card ? `<div class="hm-icard">${card}</div>` : ''}</div></div>`
105
114
  + (o.pills && o.pills.length ? `<div class="hm-pills">${o.pills.map((p, i) => `<button type="button" class="${p.primary ? 'pri' : ''}" data-hm-pill="${i}"${p.disabled ? ' disabled' : ''}>${esc(p.label)}</button>`).join('')}</div>` : '');
106
115
  }
107
116
  /** Claude's question card (AskUserQuestion), answerable until the PM writes again. */
@@ -171,7 +180,9 @@ export function mountChat(el, host) {
171
180
  if (!html) html = `<p class="hm-empty">${esc(t.empty || 'Ask anything. It works in a real Claude Code session.')}</p>`;
172
181
  put(log, html);
173
182
  C.items = items;
174
- if (atEnd || C.jump) { log.scrollTop = log.scrollHeight; C.jump = false; }
183
+ // a session opens at its latest message: the jump waits until the conversation is read and the log is shown (on a phone the chat
184
+ // can be drawn while hidden, where scrollTop does nothing and the session then opened at the top)
185
+ if (atEnd || C.jump) { log.scrollTop = log.scrollHeight; if (C.conv && log.clientHeight) C.jump = false; }
175
186
  drawFoot(R);
176
187
  reopen.hidden = !host.viewerClosed();
177
188
  // the PM has seen what is here now
@@ -253,32 +264,35 @@ export function mountChat(el, host) {
253
264
  const keep = foot.querySelector('textarea'); const val = keep ? keep.value : '';
254
265
  // the session's terminal: watch it read only while the session runs; copy the line that resumes an ended chat
255
266
  const live = sid() && C.conv && C.conv.state !== 'ended';
256
- // the + is the box's one quiet entry: Attach a file (the Agreed design's +), then the conversation's Notes and its terminal, which the
257
- // design does not draw yet (each marked Waiting for design). The toolbar stays "+ / @ chip" as the mockup has it.
258
- const W = '<em>Waiting for design</em>';
259
- const term = live ? `<button type="button" role="menuitem" id="hmTerm" data-hm-term aria-label="Watch its terminal"><b>Watch its terminal</b>${W}</button>`
260
- : C.th && C.th.resume ? `<button type="button" role="menuitem" id="hmTerm" data-hm-copyterm aria-label="Copy the terminal command"><b>Copy the terminal command</b>${W}</button>` : '';
261
- const notesBtn = t.key ? `<button type="button" role="menuitem" id="hmNotes" data-hm-notes aria-label="Notes for this conversation"><b>Notes</b>${W}</button>` : '';
267
+ // the + is the box's one quiet entry: Attach a file (the Agreed design's +), then the conversation's Notes and its terminal.
268
+ // The toolbar stays "+ / @ chip" as the mockup has it.
269
+ const term = live ? `<button type="button" role="menuitem" id="hmTerm" data-hm-term aria-label="Watch its terminal"><b>Watch its terminal</b><em>Read only, while it works</em></button>`
270
+ : C.th && C.th.resume ? `<button type="button" role="menuitem" id="hmTerm" data-hm-copyterm aria-label="Copy the terminal command"><b>Copy the terminal command</b><em>Picks this chat up in Terminal</em></button>` : '';
271
+ const notesBtn = t.key ? `<button type="button" role="menuitem" id="hmNotes" data-hm-notes aria-label="Notes for this conversation"><b>Notes</b><em>Your notepad for this conversation</em></button>` : '';
272
+ // the mic (HmMic): part of the input; a small blue dot while it listens, the stop square on the same button
273
+ const on = !!(C.dict && C.dict.on());
274
+ const mic = canDictate() ? `<button type="button" class="ut-mic${on ? ' on' : ''}" data-hm-mic aria-pressed="${on}" aria-label="${on ? 'Stop listening' : C.spoke ? 'Speak more' : 'Speak instead of typing'}" title="${on ? 'Stop listening' : 'Speak instead of typing'}">${SVG(on ? SQ : MIC, on ? 12 : 18)}</button>` : '';
275
+ const dot = on ? '<span class="ut-live" role="status"><span class="ut-rec b" aria-hidden="true"></span><span class="vh">Listening</span></span>' : '';
262
276
  const attach = t.key ? '<button type="button" role="menuitem" data-hm-file><b>Attach a file</b><em>Or paste or drop it on the conversation</em></button>' : '';
263
277
  const addOpen = !!C.addOpen && !!(attach || notesBtn || term);
264
278
  const add = attach || notesBtn || term ? `<span class="hm-mw hm-addw"><button type="button" class="hm-tool" id="hmAdd" data-hm-add aria-haspopup="menu" aria-expanded="${addOpen}" aria-label="${t.key ? 'Attach a file, notes and more' : 'More'}" title="${t.key ? 'Attach a file' : 'More'}">${SVG(PLUS)}</button>`
265
279
  + `<span class="hm-pmenu hm-addm" role="menu" aria-label="Add"${addOpen ? ' data-esc-layer' : ' hidden'}>${attach}${notesBtn}${term}</span>${t.key ? '<input type="file" id="hmFile" multiple hidden>' : ''}</span>` : '';
266
280
  let html;
267
281
  if (t.rich) {
268
- const wait = C.conv && C.conv.ask && t.also ? `<button type="button" class="hm-chip" data-hm-also><i class="dot" aria-hidden="true"></i><span>1 more needs you</span></button>` : '';
282
+ const wait = C.conv && C.conv.ask && t.also ? `<button type="button" class="hm-chip" data-hm-also><i class="dot" aria-hidden="true"></i><span>1 more next step</span></button>` : '';
269
283
  const to = t.to && !wait ? `<button type="button" class="hm-chip to" data-hm-to aria-label="Who reads this: ${esc(t.to.name)}. Change">${avHtml(t.to, 20)}<span>To: ${esc(t.to.name)}</span></button>` : '';
270
284
  const scope = !to && !wait ? `<button type="button" class="hm-chip" data-hm-scope aria-label="Where this goes: ${esc(sc.text)}. Change" title="Where this goes: ${esc(sc.text)}">${SVG(sc.icon, 14)}<span>In: ${esc(sc.text)}</span></button>` : '';
271
- html = `${also}${strip}<form class="hm-box" id="hmForm"><textarea id="hmIn" rows="1" aria-label="A message for ${esc(R.role.name)}" placeholder="${esc(ph)}"></textarea>`
285
+ html = `${also}${strip}<form class="hm-box${on ? ' ut-on' : ''}" id="hmForm">${dot}<textarea id="hmIn" rows="1" aria-label="A message for ${esc(R.role.name)}" placeholder="${esc(ph)}"></textarea>`
272
286
  + `<div class="hm-tb">${add}`
273
- + `<button type="button" class="hm-tool" data-hm-slash aria-label="Commands" title="Commands"><b>/</b></button><button type="button" class="hm-tool" data-hm-at aria-label="Bring in an agent" title="Bring in an agent"><b>@</b></button>`
287
+ + `<button type="button" class="hm-tool" data-hm-slash aria-label="Commands" title="Commands"><b>/</b></button><button type="button" class="hm-tool" data-hm-at aria-label="Choose which conversation reads this" title="Send to another session of this initiative"><b>@</b></button>`
274
288
  + to + wait + scope + `<span class="sp"></span>${host.viewerClosed() ? '<span class="hm-key">Enter sends · Shift+Enter for a new line</span>' : ''}`
275
- + `<button type="submit" class="hm-send" aria-label="Send" title="Send">${SVG(UP, 18)}</button></div>`
289
+ + `${mic}<button type="submit" class="hm-send" aria-label="Send" title="Send">${SVG(UP, 18)}</button></div>`
276
290
  + filesRow()
277
291
  + '</form>';
278
292
  } else {
279
293
  html = `${also}${strip}<div class="hm-scope"><button type="button" class="hm-chip${sc.loose ? ' loose' : ''}" data-hm-scope aria-label="Where this goes: ${esc(sc.text)}. Change" title="Where this goes: ${esc(sc.text)}">${SVG(sc.icon, 14)}<span>In: ${esc(sc.text)}</span>${SVG(DOWN, 12)}</button>`
280
294
  + (sc.loose && t.sid ? '<button type="button" class="hm-link" data-hm-link>Link to an initiative</button>' : '') + `<span class="sp"></span>${add}</div>`
281
- + filesRow() + `<form class="hm-basic" id="hmForm"><textarea id="hmIn" rows="1" aria-label="A message for Claude" placeholder="${esc(ph)}"></textarea><button type="submit" class="hm-go" aria-label="Send to Claude" title="Send">${SVG(ARROW, 18)}</button></form>`
295
+ + filesRow() + `<form class="hm-basic${on ? ' ut-on' : ''}" id="hmForm">${dot}<textarea id="hmIn" rows="1" aria-label="A message for Claude" placeholder="${esc(ph)}"></textarea>${mic}<button type="submit" class="hm-go" aria-label="Send to Claude" title="Send">${SVG(ARROW, 18)}</button></form>`
282
296
  + '<p class="hm-hint">It works in a real Claude Code session: it can read, change files, run commands and take slash commands.</p>';
283
297
  }
284
298
  if (foot.__h !== html) {
@@ -348,6 +362,10 @@ export function mountChat(el, host) {
348
362
  }
349
363
  const b = e.target.closest('button, [data-file], [data-att], [data-ctx]'); if (!b || !el.contains(b)) return;
350
364
  const d = b.dataset;
365
+ const ic = b.closest('.hm-icard'), card = C.t && C.t.intro && C.t.intro.card;
366
+ if (ic && card && card.press) { if (await card.press(b)) draw(); return; }
367
+ if ('hmMic' in d) { mic(); return; }
368
+ if (d.utSpeak) { speakPress(d.utSpeak); return; }
351
369
  if ('hmAdd' in d) { C.addOpen = !C.addOpen; drawFoot({ role: role() }); const f = C.addOpen && foot.querySelector('.hm-addm [role=menuitem]'); if (f) f.focus(); return; }
352
370
  if (C.addOpen && b.closest('.hm-addm')) { C.addOpen = false; drawFoot({ role: role() }); } // a press in the + menu closes it, then does its part
353
371
  if ('hmFile' in d) { const i = foot.querySelector('#hmFile'); if (i) i.click(); return; }
@@ -405,7 +423,47 @@ export function mountChat(el, host) {
405
423
  if (menu && e.key === 'Escape') { e.preventDefault(); e.stopPropagation(); e.target.value = ''; drawSlash(); grow(e.target); return; }
406
424
  if (e.key === 'Enter' && !e.shiftKey && !e.altKey && !e.ctrlKey && !e.metaKey) { e.preventDefault(); el.querySelector('#hmForm').requestSubmit(); }
407
425
  });
408
- el.addEventListener('input', (e) => { if (e.target.id === 'hmIn') { grow(e.target); C.slashAt = 0; drawSlash(); } });
426
+ el.addEventListener('input', (e) => {
427
+ const card = C.t && C.t.intro && C.t.intro.card;
428
+ if (card && card.input && e.target.closest('.hm-icard')) { card.input(e.target, e.target.closest('.hm-icard')); return; }
429
+ if (e.target.id === 'hmIn') { grow(e.target); C.slashAt = 0; drawSlash(); }
430
+ });
431
+ /* ── the mic ── dictation into the box only (HmMic). A desk shows the blue dot in the box; a phone shows the Speak to Claude sheet. */
432
+ const box = () => foot.querySelector('textarea');
433
+ function mic() {
434
+ if (C.dict && C.dict.on()) { C.dict.stop(); return; }
435
+ C.spoke = false;
436
+ C.dict = dictate(box, { onState: (s) => {
437
+ if (s.error) host.toast(s.error);
438
+ if (s.text) C.spoke = true;
439
+ if (!host.desk()) sheetOf(s);
440
+ if (!s.on && C.sendAfter) { C.sendAfter = false; const ta = box(); if (ta && ta.value.trim()) el.querySelector('#hmForm').requestSubmit(); }
441
+ drawFoot({ role: role() });
442
+ } });
443
+ drawFoot({ role: role() });
444
+ const ta = box(); if (ta && host.desk()) ta.focus();
445
+ }
446
+ function sheetOf(s) {
447
+ let sh = document.getElementById('utSpeak');
448
+ if (!s.on) { if (sh) sh.hidden = true; return; }
449
+ if (!sh) {
450
+ document.body.insertAdjacentHTML('beforeend', '<div class="ut-sheet" id="utSpeak" role="dialog" aria-label="Speak to Claude" hidden></div>');
451
+ sh = document.getElementById('utSpeak');
452
+ sh.onclick = (e) => { const b = e.target.closest('[data-ut-speak]'); if (b) speakPress(b.dataset.utSpeak); };
453
+ }
454
+ const secs = s.secs || 0;
455
+ sh.innerHTML = '<div class="grab" aria-hidden="true"></div><h3>Speak to Claude</h3>'
456
+ + `<p class="ut-small ut-mut">${s.text ? '“' + esc(s.text.length > 90 ? '…' + s.text.slice(-90) : s.text) + '”' : 'Listening. Speak, and the words appear here.'}</p>`
457
+ + `<div class="bar"><span class="ut-rec b" aria-hidden="true"></span><b>${Math.floor(secs / 60)}:${String(secs % 60).padStart(2, '0')}</b><span class="sp"></span>`
458
+ + `<button type="button" class="ut-ib" data-ut-speak="discard" aria-label="Discard">${SVG(XX, 18)}</button><button type="button" class="ut-ib pri" data-ut-speak="send" aria-label="Stop and send as text">${SVG(OK, 18)}</button></div>`;
459
+ sh.hidden = false;
460
+ }
461
+ function speakPress(k) {
462
+ if (!C.dict) return;
463
+ if (k === 'discard') { C.sendAfter = false; C.dict.cancel(); }
464
+ else { C.sendAfter = true; C.dict.stop(); }
465
+ sheetOf({ on: false });
466
+ }
409
467
  /* the / menu: opens on a leading /, arrows move, Enter or Tab picks, Esc shuts it */
410
468
  function drawSlash() {
411
469
  const ta = foot.querySelector('textarea'); if (!ta) return;
@@ -414,7 +472,8 @@ export function mountChat(el, host) {
414
472
  if (!list.length) { if (m) { m.hidden = true; m.removeAttribute('data-esc-layer'); } return; }
415
473
  if (!m) { foot.insertAdjacentHTML('afterbegin', '<div class="hm-slash" id="hmSlash" role="listbox" aria-label="Commands"></div>'); m = el.querySelector('#hmSlash'); }
416
474
  C.slashAt = Math.min(C.slashAt, list.length - 1);
417
- m.innerHTML = list.map((x, i) => `<button type="button" role="option" aria-selected="${i === C.slashAt}" data-slash="${esc(x.cmd)}"><code>${esc(x.cmd)}</code><b>${esc(x.name)}</b><em>${esc(x.say)}</em></button>`).join('');
475
+ m.innerHTML = list.map((x, i) => `<button type="button" role="option" aria-selected="${i === C.slashAt}" data-slash="${esc(x.cmd)}"><span class="l1"><code>${esc(x.cmd)}</code>${x.name && x.name !== x.cmd.slice(1) ? `<b>${esc(x.name)}</b>` : ''}</span>${x.say ? `<em>${esc(x.say)}</em>` : ''}</button>`).join('');
476
+ const on = m.querySelector('[aria-selected="true"]'); if (on && on.scrollIntoView) on.scrollIntoView({ block: 'nearest' });
418
477
  m.hidden = false; m.setAttribute('data-esc-layer', '');
419
478
  }
420
479
  function pickSlash(cmd) { const ta = foot.querySelector('textarea'); ta.value = cmd + ' '; C.slashAt = 0; drawSlash(); grow(ta); ta.focus(); }
@@ -424,7 +483,7 @@ export function mountChat(el, host) {
424
483
  const notesLib = () => notesM || (notesM = import('./premium-notes.js').then((M) => {
425
484
  M.mountNotes({ getKey: () => (C.t && C.t.key) || null, ws: (C.t && C.t.ws) || new URLSearchParams(location.search).get('ws') || undefined,
426
485
  get input() { return foot.querySelector('textarea'); }, note: { set textContent(v) { if (v) host.toast(v); } },
427
- show: () => { const b = VWC.body(); if (b && !b.querySelector(':scope > .hx-wait')) b.insertAdjacentHTML('afterbegin', host.wait || ''); },
486
+ show: () => { const b = VWC.body(); if (b && host.wait && !b.querySelector(':scope > .hx-wait')) b.insertAdjacentHTML('afterbegin', host.wait); }, // Notes is not drawn on the Home canvas: it keeps its marker
428
487
  toChat: () => { if (!host.desk()) VWC.close(); } });
429
488
  return M;
430
489
  }));
@@ -55,7 +55,7 @@ export function iniOfSession(s) {
55
55
  return m ? m[1] : null;
56
56
  }
57
57
  const stateOf = (s) => (s.shown === 'needs' ? 'needs' : s.shown === 'blocked' ? 'blocked' : s.shown === 'working' ? 'working' : s.shown === 'exited' ? 'exited' : 'quiet');
58
- function sessionRow(s, roles) {
58
+ export function sessionRow(s, roles) {
59
59
  const role = roleOf(s, roles);
60
60
  const st = stateOf(s);
61
61
  const name = s.hx && s.hx.title ? s.hx.title : s.name || 'Session';
@@ -90,7 +90,7 @@ export const UPDATE_KEY = 'chat:weekly-update';
90
90
 
91
91
  /* ── initiatives ── */
92
92
  export const boardRows = (D) => (D.board && D.board.initiatives && D.board.initiatives.list && D.board.initiatives.list.rows) || (D.board && D.board.rows) || [];
93
- const live = (s) => s.shown !== 'exited' && s.state !== 'exited';
93
+ export const live = (s) => s.shown !== 'exited' && s.state !== 'exited';
94
94
  /** The kids of one initiative: its needs, its live sessions and today's meetings about it, the loudest first. */
95
95
  export function kidsOf(D, id) {
96
96
  const needs = needsOf(D).filter((r) => r.ini === id && !r.needSession);
@@ -100,7 +100,7 @@ export function kidsOf(D, id) {
100
100
  }
101
101
  export function kidsChip(kids) {
102
102
  const need = kids.filter((x) => x.state === 'needs' || x.state === 'blocked').length, run = kids.filter((x) => x.state === 'working').length;
103
- return { text: need ? need + (need === 1 ? ' needs you' : ' need you') : run ? run + ' running' : String(kids.length), loud: need > 0 };
103
+ return { text: need ? (need === 1 ? 'your turn' : need + ' next steps') : run ? run + ' running' : String(kids.length), loud: need > 0 };
104
104
  }
105
105
  const TURN = (r, kids) => (kids.some((k) => k.state === 'needs' || k.state === 'blocked') ? 'your turn' : kids.some((k) => k.state === 'working') ? 'agents working' : /stalled|hold/i.test(String(r.status || '') + ' ' + String((r.acts && r.acts.life) || '')) ? 'stalled' : r.late ? 'late' : '');
106
106
  function iniRow(D, r) {
@@ -108,7 +108,7 @@ function iniRow(D, r) {
108
108
  const st = kids.some((k) => k.state === 'needs') ? 'needs' : kids.some((k) => k.state === 'blocked') ? 'blocked' : kids.some((k) => k.state === 'working') ? 'working' : 'quiet';
109
109
  return { id: 'i:' + r.id, kind: 'ini', ini: r.id, name: r.title, hint: [cap1(r.lane || 'feature'), r.stage, TURN(r, kids)].filter(Boolean).join(' · '), state: st, icon: 'goal', kids, chip: kids.length ? kidsChip(kids) : null, board: r };
110
110
  }
111
- const OPEN = (r) => !(r.acts && (r.acts.archived || r.acts.life === 'done' || r.acts.life === 'cancelled'));
111
+ export const OPEN = (r) => !(r.acts && (r.acts.archived || r.acts.life === 'done' || r.acts.life === 'cancelled'));
112
112
 
113
113
  /* ── the product ── */
114
114
  const statusOf = (r) => String(r.status || '').toLowerCase();
@@ -116,7 +116,9 @@ const risky = (r) => r.late || /risk|late|stalled|blocked/.test(statusOf(r));
116
116
  const anchorOf = (r) => (r.kr ? r.kr : /^health:/.test(String(r.anchor || '')) ? String(r.anchor) : r.anchor ? String(r.anchor) : 'No anchor');
117
117
  export function productName(D) {
118
118
  const b = D.board && D.board.board;
119
- return (b && (b.product || b.ws || b.name)) || (D.desk && D.desk.ws) || 'This product';
119
+ // a workspace id (a hex hash like 8f24f28c35) is never shown as the product's name (testing fixes)
120
+ const word = (x) => (x && !/^[0-9a-f]{8,}$/i.test(String(x)) ? x : '');
121
+ return (b && (word(b.product) || word(b.name) || word(b.ws))) || word(D.desk && D.desk.ws) || 'This product';
120
122
  }
121
123
  /** The product's KRs and budgets this week: one item per anchor, on track when none of its initiatives is late or at risk. */
122
124
  export function productCard(D, now = Date.now()) {
@@ -220,7 +222,7 @@ function productRow(D) {
220
222
  const kids = needsOf(D).filter((r) => r.kind === 'update');
221
223
  const upd = P.sent ? 'update sent' : 'update ready';
222
224
  return { id: 'p:product', kind: 'product', name: P.name, hint: 'Product · ' + upd + (risk ? ', ' + risk + ' at risk' : ''), state: P.sent ? 'quiet' : 'needs', icon: 'product',
223
- kids, chip: P.sent ? null : { text: '1 needs you', loud: true } };
225
+ kids, chip: P.sent ? null : { text: 'your turn', loud: true } };
224
226
  }
225
227
 
226
228
  /* ── one initiative as a layout ── */
@@ -246,7 +248,7 @@ export function iniLayout(D, id) {
246
248
  const byIni = new Map(); for (const r of other) { const k = r.ini || ''; byIni.set(k, (byIni.get(k) || 0) + 1); }
247
249
  const top = [...byIni.entries()].sort((a, b) => b[1] - a[1]);
248
250
  const titleOf = (k) => { const b = boardRows(D).find((r) => r.id === k); return b ? b.title : k || 'Home'; };
249
- const elsewhere = other.length ? { n: other.length, text: top.map(([k, n]) => n + (n === 1 ? ' needs' : ' need') + ' you in ' + titleOf(k)).join(' · '), first: other[0] } : null;
251
+ const elsewhere = other.length ? { n: other.length, text: top.map(([k, n]) => (n === 1 ? 'Your turn in ' : n + ' next steps in ') + titleOf(k)).join(' · '), first: other[0] } : null;
250
252
  return { groups, elsewhere };
251
253
  }
252
254
  export const initials = (name) => { const w = String(name || '').trim().split(/\s+/); return w.length > 1 ? (w[0][0] + w[1][0]).toUpperCase() : String(name || '?').slice(0, 2).replace(/^./, (c) => c.toUpperCase()); };
@@ -0,0 +1,57 @@
1
+ /* pm/home-dictate.js — the mic of the chat input: dictation into a text box (initiative premium-uncovered-features, H2; canvas HmMic and
2
+ * HmPhone). The mic is part of the input, nothing new to learn: press it, speak, the words appear as text in the box, stop, edit, send.
3
+ * It is the browser's own speech recognition (SpeechRecognition, as the console's live notes use it). Nothing is recorded as audio,
4
+ * nothing is saved, and nothing is sent: the text stays in the box until the PM sends it. A browser without speech recognition shows no mic.
5
+ * canDictate() true when this browser can turn speech into text
6
+ * dictate(box, { onState }) starts listening into the box (a textarea or an input) → { stop(), cancel(), on() }
7
+ * onState({ on, text, secs }) after each change; stop keeps the words, cancel puts the box back as it was */
8
+ const SR = () => (typeof window !== 'undefined' && (window.SpeechRecognition || window.webkitSpeechRecognition)) || null;
9
+ export const canDictate = () => !!SR();
10
+
11
+ let current = null;
12
+ export function dictate(box, o = {}) {
13
+ if (current) current.stop();
14
+ const Rec = SR();
15
+ const state = { on: false, text: '', secs: 0 };
16
+ const said = (v) => { try { o.onState && o.onState({ ...state, ...v }); } catch { /* the page redraws on its own */ } };
17
+ // box is the text box, or a function that finds it: a page that redraws its input still gets the words in the box shown now
18
+ const B = typeof box === 'function' ? box : () => box;
19
+ const el0 = B();
20
+ if (!Rec || !el0) { said({ on: false, error: 'This browser cannot turn speech into text. Type instead.' }); return { stop() {}, cancel() {}, on: () => false }; }
21
+ const before = el0.value || '';
22
+ const lead = before && !/\s$/.test(before) ? before + ' ' : before;
23
+ let finalText = '', interim = '', t0 = Date.now(), tick = null, stopped = false, ended = false;
24
+ const r = new Rec();
25
+ r.continuous = true; r.interimResults = true;
26
+ r.lang = (typeof navigator !== 'undefined' && navigator.language) || 'en-US';
27
+ const put = () => {
28
+ const x = B(); if (x) { x.value = lead + finalText + interim; x.dispatchEvent(new Event('input', { bubbles: true })); }
29
+ state.text = (finalText + interim).trim();
30
+ said({});
31
+ };
32
+ r.onresult = (e) => {
33
+ interim = '';
34
+ for (let i = e.resultIndex; i < e.results.length; i++) {
35
+ const res = e.results[i];
36
+ if (res.isFinal) finalText += res[0].transcript.replace(/^\s+/, finalText ? ' ' : '');
37
+ else interim += res[0].transcript;
38
+ }
39
+ put();
40
+ };
41
+ // end runs once. Stop and Discard end at once and do not wait for the recogniser's onend: on an iPhone onend can fail to come, and the
42
+ // sheet then stayed open, counting, with no way to stop or close it (testing fixes)
43
+ const end = () => { if (ended) return; ended = true; clearInterval(tick); state.on = false; if (!stopped && interim) finalText += (finalText ? ' ' : '') + interim.trim(); interim = ''; /* a stop keeps the words heard so far */
44
+ r.onresult = null; if (current === C) current = null; if (!stopped) put(); said({ on: false }); };
45
+ r.onerror = (e) => { if (e && e.error === 'aborted') return; end(); said({ on: false, error: e && e.error === 'not-allowed' ? 'The browser did not allow the microphone.' : 'Listening stopped.' }); };
46
+ r.onend = end;
47
+ const C = {
48
+ stop() { stopped = false; try { r.stop(); } catch { /* ended */ } end(); },
49
+ cancel() { stopped = true; try { r.abort(); } catch { /* ended */ } const x = B(); if (x) { x.value = before; x.dispatchEvent(new Event('input', { bubbles: true })); } end(); },
50
+ on: () => state.on,
51
+ };
52
+ try { r.start(); } catch { said({ on: false, error: 'Listening could not start.' }); return C; }
53
+ current = C; state.on = true; t0 = Date.now();
54
+ tick = setInterval(() => { state.secs = Math.round((Date.now() - t0) / 1000); said({}); }, 1000);
55
+ said({});
56
+ return C;
57
+ }