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
@@ -0,0 +1,198 @@
1
+ /* pm/cozy-settings.js — Settings (initiative premium-uncovered-features, E3; canvas EvSettings). A dialog over the page, its sections on the left:
2
+ * General Theme (this device), Viewer opens as a column or a popup (this device), Product (which products Home reads: the Products card),
3
+ * Your day (when the end-of-day card shows: time.workEnd, POST /api/settings), Agents write to Jira (fixed: only after Commit)
4
+ * Connectors what PMOS reads on its own, and the connectors your sessions have (GET and POST /api/proactive/settings)
5
+ * Workspaces the repositories PMOS works in (GET and POST /api/workspaces, POST /api/workspaces/forget; the folder is never touched)
6
+ * Updates the versions and Check now, Update, Restart to update (GET /api/kit/status, POST /api/kit/check | update | upgrade-app)
7
+ * What's new what each published kit changed, newest first (the kit status's changelog lines)
8
+ * The card at the bottom of General says when an update is ready. Every write is the PM's press (pmPost carries the launch nonce).
9
+ * openSettings(section?) */
10
+ import { pmGet, pmPost } from './http.js';
11
+ import { esc, svg, ICON, toast } from './cozy-evui.js';
12
+
13
+ const SECTIONS = [['general', 'General'], ['connectors', 'Connectors'], ['workspaces', 'Workspaces'], ['updates', 'Updates'], ['whatsnew', "What's new"]];
14
+ const SRC = { calendar: 'Calendar', wispr: 'Wispr Flow', mail: 'Mail', slack: 'Slack', jira: 'Jira', confluence: 'Confluence', github: 'GitHub', drive: 'Google Drive', figma: 'Figma', website: 'Your websites' };
15
+ const VIEWER_KEY = 'pmos.cz.viewer';
16
+ const T = { el: null, sec: 'general', ws: null, st: {}, src: null, con: {}, conn: [], set: null, prods: null, msg: '', busy: false, phase: '', say: '', back: null };
17
+ const cmpVer = (a, b) => { const x = String(a || '0').split('-')[0].split('.').map(Number), y = String(b || '0').split('-')[0].split('.').map(Number); for (let i = 0; i < 3; i++) if ((x[i] || 0) !== (y[i] || 0)) return (x[i] || 0) < (y[i] || 0) ? -1 : 1; return 0; };
18
+ const home = () => (T.ws && T.ws[0] ? T.st[T.ws[0].id] : null);
19
+ const latest = () => { const s = home(); return (s && (s.latest || (s.lastCheck && s.lastCheck.latest))) || null; };
20
+ const fromGit = () => { const s = home(); return !!(s && s.app && s.app.fromCheckout && !(s.source && s.source.kind === 'local')); };
21
+ const kitsBehind = () => (T.ws || []).filter((w) => T.st[w.id] && T.st[w.id].kitBehind);
22
+ const appBehind = () => { const s = home(); return !!(s && s.appBehind && !fromGit()); };
23
+ const ready = () => appBehind() || kitsBehind().length > 0;
24
+ const store = { get(k) { try { return localStorage.getItem(k); } catch { return null; } }, set(k, v) { try { localStorage.setItem(k, v); } catch { /* no storage */ } } };
25
+ const pad = (n) => String(n).padStart(2, '0');
26
+
27
+ function changes() {
28
+ const s = home(); if (!s) return [];
29
+ const all = new Map();
30
+ for (const e of [...((s.lastCheck && s.lastCheck.changes) || []), ...(s.latestChanges || []), ...(s.changes || [])]) if (e && e.v && !all.has(e.v)) all.set(e.v, e);
31
+ return [...all.values()].sort((a, b) => cmpVer(b.v, a.v));
32
+ }
33
+ const seg = (label, key, cur, opts) => `<span class="ev-seg" role="group" aria-label="${esc(label)}">${opts.map(([k, w]) => `<button type="button" data-ev-seg="${key}" data-v="${k}" aria-pressed="${cur === k}">${esc(w)}</button>`).join('')}</span>`;
34
+ const trow = (title, sub, right) => `<div class="ev-trow"><div class="ev-tx"><b>${esc(title)}</b>${sub ? `<p class="ev-small ev-mut">${esc(sub)}</p>` : ''}</div>${right}</div>`;
35
+ const sw = (on, attrs, label) => `<button type="button" class="ev-sw" role="switch" aria-checked="${!!on}" aria-label="${esc(label)}" ${attrs}>${on ? 'On' : 'Off'}</button>`;
36
+
37
+ function general() {
38
+ const theme = (() => { const t = store.get('pmos.c3.theme'); return t === 'light' || t === 'dark' ? t : 'auto'; })();
39
+ const vw = store.get(VIEWER_KEY) === 'popup' ? 'popup' : 'column';
40
+ const P = T.prods, on = P ? P.filter((x) => x.on) : null;
41
+ const pname = !P ? 'Reading' : !P.length ? 'No product' : on.length === 1 ? on[0].name : on.length + ' of ' + P.length + ' products';
42
+ const we = T.set && Array.isArray(T.set.settings) ? T.set.settings.find((x) => x.key === 'time.workEnd') : null, end = we ? Number(we.value) : 18;
43
+ const hours = []; for (let h = 13; h <= 23; h++) hours.push(h);
44
+ const upd = ready() ? `<div class="ev-card ev-upd"><span class="ev-pill y">Update</span><p><b>PMOS ${esc(latest())} is ready.</b> <span class="ev-mut">${esc(firstLine())}</span></p><button type="button" class="ev-btn sm" data-ev-go="whatsnew">What's new</button><button type="button" class="ev-btn sm dark" data-ev-upd="update">${appBehind() ? 'Restart to update' : 'Update'}</button></div>` : '';
45
+ return trow('Theme', 'Auto follows your computer', seg('Theme', 'theme', theme, [['light', 'Light'], ['dark', 'Dark'], ['auto', 'Auto']]))
46
+ + trow('Viewer opens as', 'A column beside the chat, or a popup over it', seg('Viewer opens as', 'viewer', vw, [['column', 'Column'], ['popup', 'Popup']]))
47
+ + trow('Product', 'Which products Home, Board and Insights read', `<button type="button" class="ev-pick" data-ev-products aria-haspopup="dialog">${esc(pname)} ${svg(ICON.down, 14)}</button>`)
48
+ + trow('Your day', 'When the end-of-day card shows', `<label class="ev-vh" for="evDay">Your day ends at</label><select id="evDay" class="ev-inp" data-ev-day>${hours.map((h) => `<option value="${h}"${h === end ? ' selected' : ''}>${pad(h)}:00</option>`).join('')}</select>`)
49
+ + trow('Agents write to Jira', 'Only after you press Commit. Never on their own.', '<span class="ev-pill ok">Fixed</span>')
50
+ + upd;
51
+ }
52
+ const firstLine = () => { const c = changes().find((e) => e.v === latest()); const p = c && c.prs && c.prs[0]; return p ? (p.t || p.s || '') : ''; };
53
+ function connectors() {
54
+ if (T.src === null) return '<p class="ev-small ev-mut">Reading the connectors.</p>';
55
+ const brief = Object.keys(SRC).filter((k) => k in T.src).map((k) => trow(SRC[k], T.src[k] ? 'PMOS reads it on its own' : 'PMOS does not read it on its own', sw(T.src[k], `data-ev-src="${k}"`, SRC[k])));
56
+ const more = T.conn.filter((c) => !c.source).map((c) => trow(c.label, T.con[c.name] ? 'On. Your sessions can use it' : 'Your sessions can use it', sw(T.con[c.name], `data-ev-conn="${esc(c.name)}"`, c.label)));
57
+ return '<p class="ev-small ev-mut">Every connector your Claude session has. A switch chooses only what PMOS reads on its own. PMOS reads and never posts.</p>' + brief.join('') + more.join('');
58
+ }
59
+ function workspaces() {
60
+ if (T.ws === null) return '<p class="ev-small ev-mut">Reading the repositories.</p>';
61
+ return '<p class="ev-small ev-mut">A workspace is one repository PMOS works in. Removing one forgets the address only; the folder is not deleted.</p>'
62
+ + T.ws.map((x) => trow(x.label || x.name || x.id, (x.root || '') + (x.home ? ' · home' : ''), x.home ? '<span class="ev-pill">Home</span>' : `<button type="button" class="ev-btn sm" data-ev-rm="${esc(x.id)}">Remove</button>`)).join('')
63
+ + '<div class="ev-add"><label class="ev-vh" for="evRoot">Folder path of a repository</label><input id="evRoot" class="ev-inp" placeholder="Folder path of a repository"><button type="button" class="ev-btn pri" data-ev-add>Add</button></div>';
64
+ }
65
+ function updates() {
66
+ const s = home();
67
+ if (!s) return '<p class="ev-small ev-mut">Reading the versions.</p>';
68
+ const app = (s.app && s.app.version) || '?', L = latest();
69
+ const head = T.phase === 'busy' ? `<b>Updating to ${esc(L)}</b><p class="ev-small ev-mut" role="status" aria-live="polite">${esc(T.say || 'Working.')}</p>`
70
+ : ready() ? `<b>PMOS ${esc(L)} is ready</b><p class="ev-small ev-mut">You have ${esc(app)}.${appBehind() ? ' PMOS stops for about a minute while it installs. Open terminals keep running.' : ''}</p>`
71
+ : L ? `<b>PMOS ${esc(app)} is up to date</b><p class="ev-small ev-mut">${fromGit() && s.appBehind ? esc(L) + ' is published. This PMOS runs from a checkout: update it with git pull.' : 'The newest published kit is ' + esc(L) + '.'}</p>`
72
+ : `<b>PMOS ${esc(app)}</b><p class="ev-small ev-mut">Press Check now to ask for the latest version.</p>`;
73
+ const acts = T.phase === 'busy' ? '' : T.phase === 'confirm' ? '<button type="button" class="ev-btn sm" data-ev-upd="cancel">Cancel</button><button type="button" class="ev-btn sm dark" data-ev-upd="go">Restart and update</button>'
74
+ : `<button type="button" class="ev-btn sm" data-ev-upd="check"${T.busy ? ' disabled' : ''}>Check now</button>${ready() ? `<button type="button" class="ev-btn sm dark" data-ev-upd="update">${appBehind() ? 'Restart to update' : 'Update'}</button>` : ''}`;
75
+ const kits = (T.ws || []).map((w) => { const k = T.st[w.id], kit = k && k.kit; return trow(w.label || w.name || w.id, kit && kit.present ? 'kit ' + (kit.version || 'vendored by hand') : 'no kit in this workspace', k && k.kitBehind && L ? `<span class="ev-pill y">${esc(L)} ready</span>` : kit && kit.present && (k.lastCheck || k.latest) ? '<span class="ev-pill ok">Up to date</span>' : ''); }).join('');
76
+ const last = s.lastCheck ? 'Last checked ' + new Date(s.lastCheck.at).toLocaleString() + '. ' : '';
77
+ return `<div class="ev-card ev-upd"><div class="ev-tx ev-grow">${head}</div>${acts}</div>${kits}<p class="ev-small ev-mut">${esc(last)}${s.checkDaily ? 'PMOS checks once a day while a page is open; Check now asks again.' : 'PMOS checks only when you press Check now.'}</p>`;
78
+ }
79
+ function whatsnew() {
80
+ const L = changes(), s = home(), mine = s && s.app && !fromGit() ? s.app.version : null;
81
+ if (!L.length) return '<p class="ev-small ev-mut">No kit summaries yet. Each kit published from now on carries one, and Check now reads the newest ones.</p>';
82
+ return `<ul class="ev-kv">${L.slice(0, 40).map((e) => `<li><b>${esc(e.v)}</b><div class="ev-tx">${mine && e.v === mine ? '<span class="ev-pill">Yours</span> ' : mine && cmpVer(e.v, mine) > 0 ? '<span class="ev-pill y">Newer</span> ' : ''}${(e.prs || []).map((p) => `<p>${esc(p.t && p.t !== p.s ? p.t + ': ' + p.s : p.s)}${p.n ? ' <span class="ev-mut">#' + esc(p.n) + '</span>' : ''}</p>`).join('') || '<p class="ev-mut">No summary was recorded for this kit.</p>'}</div></li>`).join('')}</ul>`;
83
+ }
84
+ const BODY = { general, connectors, workspaces, updates, whatsnew };
85
+ function draw() {
86
+ const el = T.el; if (!el || el.hidden) return;
87
+ // a redraw replaces the nodes: keep focus on the same control (by its data-ev-* key), else on the open section, never on the body
88
+ const ae = document.activeElement, had = ae && el.contains(ae), key = had ? [...ae.attributes].find((a) => a.name.startsWith('data-ev-')) : null;
89
+ const n = { connectors: T.src === null ? '' : Object.keys(SRC).filter((k) => T.src[k]).length + T.conn.filter((c) => !c.source && T.con[c.name]).length, workspaces: T.ws ? T.ws.length : '', updates: ready() ? '<span class="ev-pill y">1</span>' : '' };
90
+ el.querySelector('.ev-st-nav').innerHTML = '<h2 class="ev-h2">Settings</h2>' + SECTIONS.map(([k, l]) => `<a href="#${k}" class="ev-mi" data-ev-sec="${k}"${T.sec === k ? ' aria-current="page"' : ''}>${esc(l)}${n[k] !== undefined && n[k] !== '' ? `<span class="ev-k">${typeof n[k] === 'number' ? n[k] : n[k]}</span>` : ''}</a>`).join('');
91
+ const label = (SECTIONS.find((x) => x[0] === T.sec) || SECTIONS[0])[1];
92
+ el.querySelector('.ev-st-main').innerHTML = `<div class="ev-top"><h3 class="ev-h2" id="evStTitle">${esc(label)}</h3><button type="button" class="ev-ib" data-ev-close aria-label="Close settings" title="Close settings">${svg(ICON.close, 18)}</button></div>`
93
+ + BODY[T.sec]() + `<p role="status">${esc(T.msg)}</p>`;
94
+ if (had && !ae.isConnected) { const f = (key && el.querySelector(`[${key.name}="${CSS.escape(key.value)}"]`)) || el.querySelector('[aria-current="page"]'); if (f) f.focus(); }
95
+ }
96
+ function mount() {
97
+ if (T.el && T.el.isConnected) return T.el;
98
+ const d = document.createElement('div');
99
+ d.innerHTML = '<div class="ev-st-scrim" id="evStScrim" hidden></div><div class="ev-st" id="evSettings" role="dialog" aria-modal="true" aria-label="Settings" hidden><nav class="ev-st-nav" aria-label="Settings sections"></nav><div class="ev-st-main"></div></div>';
100
+ document.body.append(...d.childNodes);
101
+ T.el = document.getElementById('evSettings');
102
+ document.getElementById('evStScrim').addEventListener('click', closeSettings);
103
+ T.el.addEventListener('keydown', (e) => { if (e.key === 'Escape') { e.preventDefault(); e.stopPropagation(); closeSettings(); } });
104
+ // the dialog is modal: Escape closes it even when focus is outside it (a click on the scrim's edge, a redraw)
105
+ document.addEventListener('keydown', (e) => { if (e.key === 'Escape' && T.el && !T.el.hidden && !T.el.contains(e.target)) { e.preventDefault(); e.stopPropagation(); closeSettings(); } }, true);
106
+ T.el.addEventListener('change', async (e) => {
107
+ if (!e.target.matches('[data-ev-day]')) return;
108
+ const r = await pmPost('/api/settings', { key: 'time.workEnd', value: Number(e.target.value) });
109
+ T.msg = r && r.ok ? 'Saved. The end-of-day card shows from ' + pad(Number(e.target.value)) + ':00.' : (r && r.error) || 'Not saved.';
110
+ const we = r && r.ok && T.set && Array.isArray(T.set.settings) ? T.set.settings.find((x) => x.key === 'time.workEnd') : null; if (we) we.value = Number(e.target.value);
111
+ draw();
112
+ });
113
+ T.el.addEventListener('click', press);
114
+ return T.el;
115
+ }
116
+ async function press(e) {
117
+ const t = e.target.closest('a[data-ev-sec], button'); if (!t) return;
118
+ if (t.dataset.evSec) { e.preventDefault(); T.sec = t.dataset.evSec; T.msg = ''; draw(); const f = T.el.querySelector(`[data-ev-sec="${T.sec}"]`); if (f) f.focus(); return; }
119
+ if ('evClose' in t.dataset) { closeSettings(); return; }
120
+ if (t.dataset.evGo) { T.sec = t.dataset.evGo; draw(); return; }
121
+ if (t.dataset.evSeg === 'theme') { const M = await import('./cozy-nav.js'); M.setTheme(t.dataset.v); draw(); return; }
122
+ if (t.dataset.evSeg === 'viewer') { store.set(VIEWER_KEY, t.dataset.v); document.body.classList.toggle('ev-vw-popup', t.dataset.v === 'popup'); draw(); return; }
123
+ if ('evProducts' in t.dataset) { closeSettings(); import('./home-more.js').then((M) => M.openProducts()); return; }
124
+ if (T.busy) return;
125
+ T.busy = true; T.msg = '';
126
+ try {
127
+ if (t.dataset.evSrc) { const k = t.dataset.evSrc, on = !T.src[k]; const r = await pmPost('/api/proactive/settings', { briefSources: { [k]: on } }); if (r && r.ok) T.src[k] = on; else T.msg = (r && r.error) || 'Not saved.'; }
128
+ else if (t.dataset.evConn) { const k = t.dataset.evConn, on = !T.con[k]; const r = await pmPost('/api/proactive/settings', { connectors: { [k]: on } }); if (r && r.ok) T.con[k] = on; else T.msg = (r && r.error) || 'Not saved.'; }
129
+ else if ('evAdd' in t.dataset) {
130
+ const root = (T.el.querySelector('#evRoot').value || '').trim();
131
+ if (!root) T.msg = 'Paste the folder path of a repository.';
132
+ else { const r = await pmPost('/api/workspaces', { root, focus: false }); if (r && r.ok) { T.ws = [...T.ws.filter((y) => y.id !== r.workspace.id), r.workspace]; toast('Added.'); } else T.msg = (r && r.error) || 'Not added.'; }
133
+ } else if (t.dataset.evRm) { const r = await pmPost('/api/workspaces/forget', { id: t.dataset.evRm }); if (r && r.ok) { T.ws = T.ws.filter((y) => y.id !== t.dataset.evRm); toast('Removed. The folder is untouched.'); } else T.msg = (r && (r.error || r.reason)) || 'Not removed.'; }
134
+ else if (t.dataset.evUpd) await upd(t.dataset.evUpd);
135
+ } finally { T.busy = false; }
136
+ draw();
137
+ }
138
+ async function upd(a) {
139
+ if (a === 'cancel') { T.phase = ''; return; }
140
+ if (a === 'check') {
141
+ for (const w of T.ws || []) { const r = await pmPost('/api/kit/check', { ws: w.id }); if (r && r.ok) T.st[w.id] = { ...(T.st[w.id] || {}), ...r }; else T.msg = (r && r.error) || 'The check failed.'; }
142
+ if (!T.msg) toast(ready() ? 'PMOS ' + latest() + ' is ready' : 'Checked. PMOS is up to date');
143
+ return;
144
+ }
145
+ if (a === 'update' && appBehind()) { T.sec = 'updates'; T.phase = 'confirm'; return; }
146
+ const v = latest(); T.sec = 'updates'; T.phase = 'busy';
147
+ for (const w of kitsBehind()) {
148
+ T.say = 'Updating the kit in ' + (w.label || w.name || w.id) + '.'; draw();
149
+ const r = await pmPost('/api/kit/update', { ws: w.id, version: v });
150
+ if (!(r && r.ok)) { T.phase = ''; T.msg = (r && r.error) || 'The kit was not updated.'; return; }
151
+ T.st[w.id] = { ...T.st[w.id], ...r, kitBehind: false };
152
+ }
153
+ if (!appBehind()) { T.phase = ''; toast('Updated the kits to ' + v + '.'); return; }
154
+ T.say = 'Installing PMOS ' + v + '. This page reloads when the new version starts.'; draw();
155
+ const from = home() && home().app && home().app.version;
156
+ const r = await pmPost('/api/kit/upgrade-app', { ws: T.ws[0].id, version: v });
157
+ if (!r || r.ok === false) { T.phase = ''; T.msg = (r && r.error) || 'The update did not start.'; return; }
158
+ waitRestart(from, r.log || 'the update log');
159
+ }
160
+ /** The app update stops this server and starts a new one: wait for it, then reload. */
161
+ async function waitRestart(from, log) {
162
+ let down = false; const until = Date.now() + 5 * 60000;
163
+ while (Date.now() < until) {
164
+ await new Promise((ok) => setTimeout(ok, 2000));
165
+ const j = await pmGet('/api/sessions').catch(() => null);
166
+ if (!j || j.ok === false || !j.version) { down = true; continue; }
167
+ if (j.version !== from) { location.reload(); return; }
168
+ if (down) { T.phase = ''; T.msg = 'PMOS started again on ' + j.version + ', so the update did not finish. The update log is ' + log + '.'; draw(); return; }
169
+ }
170
+ T.phase = ''; T.msg = 'PMOS did not come back on this address. Type pmos in a terminal to open it. The update log is ' + log + '.'; draw();
171
+ }
172
+ async function load() {
173
+ const [w, p, s, b] = await Promise.all([pmGet('/api/workspaces'), pmGet('/api/proactive/settings'), pmGet('/api/settings'), pmGet('/api/briefing-premium')]);
174
+ T.ws = w && Array.isArray(w.workspaces) ? w.workspaces : [];
175
+ T.src = p && p.ok && p.settings ? { ...p.settings.briefSources } : {}; T.con = p && p.ok && p.settings ? { ...p.settings.connectors } : {};
176
+ T.conn = p && p.connectors && Array.isArray(p.connectors.list) ? p.connectors.list : [];
177
+ T.set = s && s.ok ? s : null;
178
+ T.prods = b && b.ok && b.model && b.model.products ? b.model.products.available || [] : [];
179
+ if (!w || !Array.isArray(w.workspaces)) T.msg = 'The repositories could not be read.'; else if (!p || !p.ok) T.msg = 'The connectors could not be read.';
180
+ draw();
181
+ await Promise.all(T.ws.map(async (x) => { const r = await pmGet('/api/kit/status?ws=' + encodeURIComponent(x.id)); if (r && r.ok) T.st[x.id] = r; }));
182
+ draw();
183
+ }
184
+ export function openSettings(section) {
185
+ const el = mount();
186
+ if (section && BODY[section]) T.sec = section;
187
+ if (el.hidden) { const ae = document.activeElement; T.back = ae && ae !== document.body ? ae : null; T.ws = null; T.src = null; T.msg = ''; T.phase = ''; }
188
+ el.hidden = false; document.getElementById('evStScrim').hidden = false; el.setAttribute('data-esc-layer', '');
189
+ draw();
190
+ const f = el.querySelector('[aria-current="page"]'); if (f) f.focus();
191
+ load();
192
+ return el;
193
+ }
194
+ export function closeSettings() {
195
+ if (!T.el || T.el.hidden) return;
196
+ T.el.hidden = true; document.getElementById('evStScrim').hidden = true; T.el.removeAttribute('data-esc-layer');
197
+ const b = T.back; T.back = null; if (b && b.isConnected) { try { b.focus(); } catch { /* gone */ } }
198
+ }
@@ -0,0 +1,89 @@
1
+ /* pm/cozy-sources.js — Sources, in the Viewer (initiative premium-uncovered-features, E3; canvas EvSources).
2
+ *
3
+ * What PMOS reads, and how old each reading is (GET /api/sources). The source furthest behind leads in an amber box that names what may be
4
+ * out of date, with Read again. Then the table: each source, when it was last read, and Read again for one that is old, failed or never
5
+ * read (POST /api/sources/refresh), or Connect for one that is off (Settings › Connectors). Read all again reads every source and then
6
+ * writes Home's list from those reads (POST /api/sources/refresh-all). The read lines say which reads Home shows. Every press is the PM's
7
+ * (pmPost carries the launch nonce); PMOS reads these sources and never posts to them.
8
+ * openSources() → the body element */
9
+ import { pmGet, pmPost } from './http.js';
10
+ import { open as vwOpen, current as vwCurrent } from './cozy-viewer.js';
11
+ import { esc, svg, ICON, toast, wsParam, wsQ, skelRows, cantRead } from './cozy-evui.js';
12
+ import { sourceRows, staleOf, partsOf } from './cozy-evmodel.js';
13
+
14
+ const TILE = { repository: ICON.repo, initiatives: ICON.flag, calendar: ICON.cal, jira: ICON.jira, 'my-work': ICON.check, tracker: ICON.board, tools: ICON.tools };
15
+ const two = (n) => String(n).padStart(2, '0');
16
+ const hm = (d) => two(d.getHours()) + ':' + two(d.getMinutes());
17
+ const M = { r: null, at: null, busy: '', note: {}, body: null };
18
+
19
+ /** The read line of each part of Home (briefing-source-flow slice 5), from one GET /api/sources answer; home-more.js readLine words. */
20
+ function readsHtml(s) {
21
+ return import('./home-more.js').then((H) => {
22
+ const L = [['Today', H.readLine(s, ['calendar'])], ['Needs you', H.readLine(s, ['initiatives', 'my-work', 'd:brief'])]].filter((x) => x[1]);
23
+ return L.map(([k, v]) => `<p class="ev-small ev-mut ev-reads" data-reads="${esc(k)}"><b>${esc(k)}:</b> ${esc(v)}</p>`).join('');
24
+ }).catch(() => '');
25
+ }
26
+ async function draw() {
27
+ const b = M.body; if (!b || !b.isConnected) return;
28
+ { const c = vwCurrent(); if (!c || c.id !== 'sources') return; } // the Viewer moved on to another item: a late read draws nothing
29
+ const s = M.r;
30
+ const head = `<div><h2 class="ev-h2">Sources</h2><p class="ev-sub">What PMOS reads, and how old each reading is. All real data${M.at ? ', as of ' + hm(M.at) : ''}.</p></div>`;
31
+ if (!s) { b.innerHTML = head + skelRows(4); return; }
32
+ if (!s.ok) { b.innerHTML = head + cantRead({ what: 'The sources', why: s.error || '', sources: false }); return; }
33
+ const st = staleOf(s.sources);
34
+ const warn = st ? `<div class="ev-warn ev-line" id="srcWarn"><i class="ev-dot risk" aria-hidden="true"></i><p class="ev-grow"><b>${esc(st.state === 'stale' ? st.name + ' was last read ' + st.ago + '.' : st.text + '.')}</b> ${esc(partsOf(st.id))} may be out of date.</p><button type="button" class="ev-btn sm" data-ev-read="${esc(st.id)}"${M.busy ? ' disabled' : ''}>${svg(ICON.refresh, 16)}Read again</button></div>` : '';
35
+ // the background line (harness-health): quiet when all is well, a box when something needs a look
36
+ const hl = s.health && s.health.level;
37
+ const health = !s.health ? '' : hl === 'warn' || hl === 'bad'
38
+ ? `<div class="ev-box ev-small ev-line" id="srcHealth" data-level="${esc(hl)}" role="status"><i class="ev-dot risk" aria-hidden="true"></i><p class="ev-grow"><b>${esc(s.health.line)}</b>${(s.health.issues || []).slice(1, 4).map((i) => `<br>${esc(i.text)}`).join('')}</p></div>`
39
+ : `<p class="ev-small ev-mut ev-line" id="srcHealth" data-level="ok"><i class="ev-dot ok" aria-hidden="true"></i>${esc(s.health.line || '')}</p>`;
40
+ const rows = sourceRows(s.sources).map((x) => {
41
+ const name = x.id === 'repository' ? (s.ws || 'This product') + ' · main' : x.sub;
42
+ const act = x.act === 'read' ? `<button type="button" class="ev-btn sm soft" data-ev-read="${esc(x.id)}" aria-label="Read ${esc(x.name)} again"${M.busy ? ' disabled' : ''}>Read again</button>`
43
+ : x.act === 'connect' ? `<button type="button" class="ev-btn sm" data-ev-connect="${esc(x.id)}">Connect</button>` : '';
44
+ return `<div class="ev-trow" data-src="${esc(x.id)}"><span class="ev-tile" aria-hidden="true">${svg(TILE[x.id] || ICON.sources, 16)}</span><div class="ev-tx"><b>${esc(x.name)}</b><p class="ev-small ev-mut">${esc(name)}</p>${M.note[x.id] ? `<p class="ev-small" role="status">${esc(M.note[x.id])}</p>` : ''}</div><span class="ev-w-140 ev-small ${x.risk ? 'ev-late' : 'ev-mut'}">${esc(x.when)}</span><span class="ev-w-96">${act}</span></div>`;
45
+ }).join('');
46
+ const all = s.all && !s.all.done;
47
+ b.innerHTML = head + warn + health
48
+ + `<div><div class="ev-th"><span class="ev-grow">Source</span><span class="ev-w-140">Last read</span><span class="ev-w-96"></span></div>${rows}</div>`
49
+ + `<div class="ev-acts"><button type="button" class="ev-btn sm" data-ev-all${M.busy || all ? ' disabled' : ''}>${svg(ICON.refresh, 16)}${all ? 'Reading every source' : 'Read all again'}</button></div>`
50
+ + '<div id="srcReads"></div>'
51
+ + '<p class="ev-small ev-mut">PMOS reads these sources and never posts to them. To send anything, you press Send.</p>';
52
+ const reads = await readsHtml(s);
53
+ const box = b.querySelector('#srcReads'); if (box) box.innerHTML = reads;
54
+ }
55
+ async function read() {
56
+ M.r = await pmGet('/api/sources' + wsQ());
57
+ if (!M.r || M.r.ok === false) M.r = { ok: false, error: (M.r && M.r.error) || 'the server did not answer' };
58
+ M.at = new Date();
59
+ draw();
60
+ if (M.r.ok) window.dispatchEvent(new CustomEvent('pm:sources', { detail: M.r }));
61
+ }
62
+ export function openSources() {
63
+ M.r = null; M.note = {};
64
+ M.body = vwOpen({ id: 'sources', kind: 'What PMOS reads', title: 'Sources', icon: 'source', render: (b) => { b.classList.add('ev-card-b', 'ev-src'); M.body = b; draw(); } });
65
+ M.body.onclick = async (e) => {
66
+ const t = e.target.closest('button'); if (!t || M.busy) return;
67
+ if ('evRetry' in t.dataset) { M.r = null; draw(); read(); return; }
68
+ if (t.dataset.evConnect) { import('./cozy-settings.js').then((S) => S.openSettings('connectors')); return; }
69
+ const ws = (M.r && M.r.ws) || wsParam() || '';
70
+ if ('evAll' in t.dataset) {
71
+ M.busy = 'all'; draw();
72
+ const r = await pmPost('/api/sources/refresh-all', { ws });
73
+ M.busy = '';
74
+ toast(r && r.ok ? (r.joined ? 'Every source is already being read.' : 'Reading every source, then Home\'s list.') : 'Read all again did not start: ' + ((r && r.error) || 'the server did not answer') + '.');
75
+ await read(); setTimeout(read, 4000); return;
76
+ }
77
+ if (t.dataset.evRead) {
78
+ const id = t.dataset.evRead;
79
+ M.busy = id; draw();
80
+ const r = await pmPost('/api/sources/refresh', { ws, source: id });
81
+ M.busy = '';
82
+ M.note[id] = r && r.ok ? (r.started === 'session' ? 'An agent session started to read it, with your own connection.' : 'Reading it again on this machine.') : 'It did not start: ' + ((r && r.error) || 'the server did not answer') + '.';
83
+ toast(r && r.ok ? 'Reading again.' : M.note[id]);
84
+ await read(); setTimeout(read, 4000);
85
+ }
86
+ };
87
+ read();
88
+ return M.body;
89
+ }
@@ -0,0 +1,220 @@
1
+ /* pm/cozy-today.css — Home's one list, the Today card, the products picker, the task and the review in the Viewer, the decision card in
2
+ * the chat and the mic (initiative premium-uncovered-features, H1 and H2; canvas HmMyWork, HmReview, HmProducts, HmMic, HmDay, HmDecide,
3
+ * HmPhone, HmPhone2). Token vars only (cozy.css :root holds every raw value). Loaded after cozy-home.css, so a rule here may narrow one there.
4
+ * Motion only for info, warning and critical (cozy.css .cz-dot.m-*): nothing here animates. */
5
+
6
+ /* ── the list head ── */
7
+ body.cz-home .hm-hd { padding: 2px 6px 6px 10px; gap: 6px; }
8
+ body.cz-home .hm-hd h1 { font-size: 16px; font-weight: 800; color: var(--cz-ink); margin-right: auto; }
9
+ .hm-pk { height: 30px; font-size: 13px; font-weight: 700; color: var(--cz-ink2); background: var(--cz-card); }
10
+ .hm-pk svg, .ut-ib svg, .hm-tg svg, .ut-btn svg, .hm-tch svg, .hm-cap svg, .ut-mic svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
11
+ .ut-ib { width: 32px; height: 32px; border-radius: 999px; border: 0; padding: 0; background: none; color: var(--cz-ink2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; font-family: var(--cz-sans); }
12
+ .ut-ib.lg { width: 40px; height: 40px; }
13
+ .ut-ib.solid { background: var(--cz-ink); color: var(--cz-card); }
14
+ .ut-ib.solid svg.fill, .ut-ib svg.fill { fill: currentColor; stroke: none; }
15
+ .ut-ib.on { background: var(--cz-bluebg); color: var(--cz-blueink); }
16
+ .ut-ib.pri { width: 44px; height: 44px; background: var(--cz-solid); color: var(--cz-onsolid); }
17
+ @media (hover: hover) { .ut-ib:hover { background: var(--cz-well); } .ut-ib.solid:hover { background: var(--cz-ink); } .ut-ib.pri:hover { background: var(--cz-solid); } }
18
+
19
+ /* ── buttons, boxes and fields the canvas draws ── */
20
+ .ut-btn { height: 36px; padding: 0 14px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; font: inherit; font-family: var(--cz-sans); font-size: 13.5px; font-weight: 700; border: 1px solid var(--cz-hair); background: var(--cz-card); color: var(--cz-ink); white-space: nowrap; cursor: pointer; text-decoration: none; box-sizing: border-box; }
21
+ .ut-btn.pri { background: var(--cz-solid); border-color: transparent; color: var(--cz-onsolid); }
22
+ .ut-btn.dark { background: var(--cz-ink); border-color: transparent; color: var(--cz-card); }
23
+ .ut-btn.soft { background: var(--cz-well); border-color: transparent; }
24
+ .ut-btn.ghost { border-color: transparent; background: transparent; color: var(--cz-ink2); }
25
+ .ut-btn.sm { height: 30px; padding: 0 11px; font-size: 12.5px; }
26
+ .ut-btn:disabled { opacity: .5; cursor: not-allowed; }
27
+ .ut-lbl { margin: 0; font-size: 12px; font-weight: 800; color: var(--cz-ink3); }
28
+ .ut-h2 { margin: 0; font-size: 18px; font-weight: 800; color: var(--cz-ink); }
29
+ .ut-sub { margin: 0; font-size: 13px; color: var(--cz-ink3); }
30
+ .ut-small { font-size: 12.5px; }
31
+ .ut-mut { color: var(--cz-ink3); }
32
+ .ut-bl { color: var(--cz-blueink); }
33
+ .ut-box { background: var(--cz-well); border-radius: 16px; padding: 12px 14px; font-size: 12.5px; color: var(--cz-ink); }
34
+ .ut-card { background: var(--cz-card); border-radius: 16px; border: 1px solid var(--cz-hair); padding: 12px 14px; }
35
+ .ut-need { background: var(--cz-bluebg); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
36
+ .ut-chk { width: 18px; height: 18px; border-radius: 6px; box-shadow: inset 0 0 0 2px var(--cz-c-c5c9d0); flex: none; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; }
37
+ .ut-chk.on { background: var(--cz-ink); box-shadow: none; color: var(--cz-card); }
38
+ .ut-chk svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
39
+ .ut-field { display: flex; flex-direction: column; gap: 6px; }
40
+ .ut-field > span, .ut-field > label { font-size: 12.5px; font-weight: 800; color: var(--cz-ink2); }
41
+ .ut-field em { font-style: normal; font-weight: 600; color: var(--cz-ink3); }
42
+ .ut-field textarea, .ut-field input { font: inherit; font-family: var(--cz-sans); font-size: 14px; color: var(--cz-ink); border: 0; outline: 0; border-radius: 14px; background: var(--cz-well); padding: 10px 14px; min-height: 72px; resize: vertical; box-sizing: border-box; width: 100%; }
43
+ .ut-field input { min-height: 42px; }
44
+ .ut-field textarea:focus-visible, .ut-field input:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 2px; }
45
+ .ut-radio { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--cz-hair); width: 100%; background: var(--cz-card); color: var(--cz-ink); text-align: left; cursor: pointer; font: inherit; font-family: var(--cz-sans); font-size: 14px; box-sizing: border-box; }
46
+ .ut-radio .o { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--cz-c-c5c9d0); flex: none; margin-top: 1px; box-sizing: border-box; }
47
+ .ut-radio[aria-checked="true"] { border-color: var(--cz-blue); box-shadow: 0 0 0 3px var(--cz-bluebg); }
48
+ .ut-radio[aria-checked="true"] .o { box-shadow: inset 0 0 0 5px var(--cz-blue); }
49
+ .ut-radio b { font-weight: 700; }
50
+ .ut-radio small { display: block; font-size: 12.5px; color: var(--cz-ink3); }
51
+ .ut-trow { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--cz-hair); font-size: 13.5px; color: var(--cz-ink); }
52
+ .ut-trow:last-child { border-bottom: 0; }
53
+ .ut-trow > span { flex: 1; min-width: 0; }
54
+ .ut-trow svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; color: var(--cz-ink2); }
55
+ .ut-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
56
+ .ut-acts .sp { margin-left: auto; }
57
+ .ut-rec { width: 10px; height: 10px; border-radius: 50%; background: var(--cz-dot-red); flex: none; display: inline-block; }
58
+ .ut-rec.b { background: var(--cz-blue); }
59
+ .vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
60
+
61
+ /* ── the Today card ── */
62
+ .hm-tc { box-sizing: border-box; width: 100%; display: flex; flex-direction: column; gap: 2px; margin: 0 0 6px; padding: 12px 14px; border-radius: 18px; border: 0; background: var(--cz-card); color: var(--cz-ink); text-align: left; font: inherit; font-family: var(--cz-sans); box-shadow: 0 1px 2px var(--cz-hair); }
63
+ button.hm-tc { cursor: pointer; }
64
+ .hm-tc .big { display: block; font-size: 15px; font-weight: 800; }
65
+ .hm-tc .sub { margin: 0; font-size: 13px; color: var(--cz-ink3); }
66
+ .hm-tc.soon, .hm-tc.live { gap: 8px; }
67
+ .hm-tc.eod { gap: 10px; }
68
+ .hm-tc.rec { flex-direction: row; align-items: center; gap: 10px; }
69
+ .hm-tc.rec > div { flex: 1; min-width: 0; }
70
+ .hm-tc.rec p { margin: 0; font-size: 12.5px; color: var(--cz-ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
71
+ .hm-tch { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 14px; }
72
+ .hm-tch > b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
73
+ .hm-tch > .r { margin-left: auto; font-size: 12.5px; font-weight: 700; color: var(--cz-blueink); white-space: nowrap; }
74
+ .hm-tch > .r.q { color: var(--cz-ink3); font-weight: 600; }
75
+ .hm-tch svg { color: var(--cz-blueink); width: 18px; height: 18px; }
76
+ .hm-tch .ut-ib { margin-right: -6px; }
77
+ .hm-tc .ut-acts { gap: 6px; }
78
+ .hm-load { display: flex; gap: 2px; height: 6px; margin-top: 10px; }
79
+ .hm-load i { flex: var(--bd-f, 1); border-radius: 3px; background: var(--cz-c-eceae6); }
80
+ .hm-load i.m { background: var(--cz-c-b6c6dc); }
81
+ .hm-load i.n { background: var(--cz-blue); }
82
+ .hm-lx { display: flex; justify-content: space-between; margin-top: 4px; font-size: 12.5px; color: var(--cz-ink3); }
83
+ .hm-eodl { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; }
84
+ .hm-eodl span { display: flex; gap: 8px; }
85
+ .hm-eodl b { width: 74px; flex: none; }
86
+ .hm-tc.clear { font-size: 13px; color: var(--cz-ink2); }
87
+
88
+ /* ── the filters ── */
89
+ .hm-flt { display: flex; gap: 4px; padding: 2px 4px; flex-wrap: wrap; margin: 0 0 4px; }
90
+ .hm-flt .cz-chip { font-weight: 600; }
91
+
92
+ /* ── a product group and its rows (canvas .ghd and .lrow) ── */
93
+ .hm-pg { margin: 0; }
94
+ .hm-ghd { display: flex; align-items: center; gap: 6px; width: 100%; padding: 10px 10px 4px 8px; font-size: 13px; font-weight: 800; color: var(--cz-ink2); border: 0; background: none; text-align: left; font-family: var(--cz-sans); box-sizing: border-box; }
95
+ button.hm-ghd { cursor: pointer; }
96
+ .hm-ghd svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
97
+ .hm-ghd .n, .hm-gn { margin-left: auto; font-weight: 700; color: var(--cz-ink3); font-size: 12px; }
98
+ .hm-ghr2 { display: flex; align-items: center; }
99
+ .hm-ghr2 .hm-ghd { flex: 1; min-width: 0; }
100
+ .hm-gn { border: 0; background: none; padding: 10px 10px 4px 4px; cursor: pointer; font-family: var(--cz-sans); white-space: nowrap; }
101
+ body.cz-home .hm-r.lr { min-height: 0; margin: 0; border-radius: 16px; gap: 0; }
102
+ body.cz-home .hm-r.lr .hm-rm { min-height: 48px; padding: 8px 10px; gap: 10px; border-radius: 16px; }
103
+ body.cz-home .hm-r.lr.kid { margin: 0; }
104
+ body.cz-home .hm-r.lr.kid .hm-rm { min-height: 44px; padding: 6px 10px; }
105
+ body.cz-home .hm-r.lr .hm-tile { width: 32px; height: 32px; }
106
+ .hm-r.lr .hm-rt { flex: 1; gap: 1px; }
107
+ .hm-r.lr .hm-rt em { font-size: 12.5px; }
108
+ .hm-r.lr .hm-rt em.q, .hm-r.lr.st-quiet .hm-rt em, .hm-r.lr.st-wait .hm-rt em { color: var(--cz-ink3); }
109
+ .hm-r.lr.task .hm-rt b, .hm-r.lr.item .hm-rt b { font-weight: 600; }
110
+ .hm-r.lr.st-wait .hm-rt b { color: var(--cz-ink2); }
111
+ .hm-rr { font-size: 12px; font-weight: 700; color: var(--cz-blueink); white-space: nowrap; flex: none; }
112
+ .hm-rr.q { color: var(--cz-ink3); font-weight: 600; }
113
+ .hm-tg { flex: none; width: 32px; height: 32px; margin-left: 10px; margin-right: -4px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--cz-hair); background: var(--cz-card); color: var(--cz-ink2); cursor: pointer; padding: 0; z-index: 1; }
114
+ .hm-r.lr.ini .hm-rm { padding-left: 14px; }
115
+ .hm-ck { flex: none; width: 32px; height: 32px; margin: 0 -10px 0 4px; display: grid; place-items: center; border: 0; background: none; padding: 0; cursor: pointer; border-radius: 10px; z-index: 1; }
116
+ .hm-ck.wait { cursor: default; }
117
+ .hm-ck.wait i { width: 7px; height: 7px; border-radius: 50%; background: var(--cz-c-c5c9d0); }
118
+ .hm-r.lr.done .hm-rt b { color: var(--cz-ink3); text-decoration: line-through; }
119
+ .hm-nest { margin: 0 0 4px 26px; padding-left: 8px; border-left: 2px solid var(--cz-hair); }
120
+ .hm-r.lr.sel { background: var(--cz-card); box-shadow: 0 6px 18px -10px var(--cz-c-9da3ac); }
121
+ @media (hover: hover) { body.cz-home .hm-r.lr:hover { background: var(--cz-well2); } body.cz-home .hm-r.lr.sel:hover { background: var(--cz-card); } .hm-tg:hover { background: var(--cz-well); } }
122
+ .hm-r.lr .hm-x { width: 32px; height: 32px; }
123
+ .hm-tile.wk { box-shadow: none; background: var(--cz-well2); }
124
+ .hm-more2 { display: block; margin: 2px 0 4px 10px; height: 32px; border: 0; background: none; font-size: 12px; font-weight: 700; color: var(--cz-ink3); cursor: pointer; padding: 0 2px; font-family: var(--cz-sans); }
125
+
126
+ /* ── the capture box and the untouched row ── */
127
+ .hm-cap { display: flex; align-items: center; gap: 8px; margin: 6px 4px 2px; height: 40px; border-radius: 14px; background: var(--cz-card); padding: 0 6px 0 12px; border: 1px solid var(--cz-hair); }
128
+ .hm-cap input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-family: var(--cz-sans); font-size: 13px; color: var(--cz-ink); }
129
+ .hm-cap input::placeholder { color: var(--cz-ink3); }
130
+ .hm-cap.on { box-shadow: 0 0 0 2px var(--cz-bluebg); }
131
+ .hm-un { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 10px; min-height: 36px; border: 0; background: none; border-radius: 16px; cursor: pointer; font-family: var(--cz-sans); text-align: left; }
132
+ .hm-un b { flex: 1; font-size: 12.5px; font-weight: 700; color: var(--cz-ink3); }
133
+ .hm-un span { font-size: 12px; font-weight: 600; color: var(--cz-ink3); }
134
+ .hm-all { display: none; }
135
+
136
+ /* ── the small menus: the products picker and Later (home-app.js menu()) ── */
137
+ .hm-menu .ut-mi { flex-shrink: 0; flex-direction: row; align-items: center; gap: 10px; min-height: 40px; }
138
+ .hm-menu .ut-mi.tall { min-height: 52px; }
139
+ .hm-menu .ut-mi > span:not(.ut-it) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
140
+ .hm-menu .ut-mi .k { margin-left: auto; font-size: 12px; color: var(--cz-ink3); font-weight: 600; flex: none; }
141
+ .hm-menu .ut-mi svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; color: var(--cz-ink2); flex: none; }
142
+ .hm-menu .ut-it { width: 28px; height: 28px; border-radius: 9px; background: var(--cz-well2); color: var(--cz-ink2); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; flex: none; }
143
+ .hm-menu .ut-it.p { background: var(--cz-bluebg); color: var(--cz-blueink); }
144
+ .hm-menu .ut-hr { height: 1px; background: var(--cz-hair); margin: 4px 0; flex: none; }
145
+
146
+ /* ── the task in the Viewer (HmMyWork) and the weekly review (HmReview) ── */
147
+ .ut-vc { display: flex; flex-direction: column; gap: 14px; padding: 4px 2px; min-height: 100%; box-sizing: border-box; }
148
+ .cz-vw-body:not(.hx) > .ut-vc { padding: 16px 20px 24px; }
149
+ .ut-ib svg.dots { stroke-width: 3.2; }
150
+ .ut-btn.ghost svg { width: 16px; height: 16px; }
151
+ .ut-vh { display: flex; align-items: flex-start; gap: 10px; }
152
+ .ut-vh > div { flex: 1; min-width: 0; }
153
+ .ut-vh .ut-chk, .ut-vh .hm-ck { margin-top: 4px; }
154
+ .ut-vh .hm-ck { margin: 2px 0 0 -7px; }
155
+ .ut-chips { display: flex; gap: 6px; flex-wrap: wrap; }
156
+ .ut-foot { display: flex; gap: 8px; margin-top: auto; flex-wrap: wrap; }
157
+ .ut-steps { display: flex; flex-direction: column; gap: 8px; }
158
+ .ut-step { display: flex; align-items: center; gap: 10px; border-radius: 16px; padding: 12px 14px; border: 1px solid var(--cz-hair); background: transparent; width: 100%; box-sizing: border-box; font: inherit; font-family: var(--cz-sans); color: var(--cz-ink); text-align: left; }
159
+ .ut-step > b { flex: 1; }
160
+ .ut-step.later { border-style: dashed; border-color: var(--cz-c-c5c9d0); }
161
+ .ut-step.later > b { color: var(--cz-ink3); }
162
+ .ut-step.now { flex-direction: column; align-items: stretch; background: var(--cz-card); border-color: var(--cz-blue); }
163
+ .ut-step.now > .h { display: flex; align-items: center; gap: 10px; }
164
+ .ut-step.now > .h > b { flex: 1; }
165
+ .ut-step .pill { flex: none; }
166
+ .ut-tabs { align-self: flex-start; }
167
+
168
+ /* ── the decision card in the chat (HmDecide) and Return a run in the Viewer ── */
169
+ .ut-dec { margin-top: 10px; display: flex; flex-direction: column; gap: 10px; padding: 16px; max-width: 620px; }
170
+ .ut-dec .ut-acts { flex-wrap: nowrap; }
171
+ .ut-dec .ut-acts .sp { font-size: 12.5px; color: var(--cz-ink3); flex: 1 1 120px; min-width: 0; text-align: right; }
172
+ .ut-dec [role="status"]:empty, .ut-vc [role="status"]:empty { display: none; }
173
+ .hm-chat .hm-icard { margin-top: 2px; }
174
+ .ut-later { position: relative; }
175
+
176
+ /* ── the mic in the composer (HmMic) and the phone's Speak to Claude sheet ── */
177
+ .ut-mic { flex: none; width: 32px; height: 32px; border-radius: 999px; border: 0; padding: 0; background: none; color: var(--cz-blueink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
178
+ .ut-mic svg { width: 18px; height: 18px; }
179
+ .ut-mic.on { background: var(--cz-bluebg); }
180
+ .ut-mic.on svg { width: 12px; height: 12px; fill: currentColor; stroke: none; }
181
+ .hm-chat .ut-live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--cz-blueink); }
182
+ .hm-chat .hm-box.ut-on, .hm-chat .hm-basic.ut-on { box-shadow: 0 0 0 2px var(--cz-bluebg); }
183
+ .ut-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; background: var(--cz-card); border-radius: 28px 28px 0 0; box-shadow: var(--cz-sheet); padding: 10px 16px calc(28px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; }
184
+ .ut-sheet[hidden] { display: none; }
185
+ .ut-sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--cz-c-c5c9d0); align-self: center; margin-bottom: 4px; }
186
+ .ut-sheet h3 { margin: 0; font-size: 16px; font-weight: 800; }
187
+ .ut-sheet .bar { display: flex; align-items: center; gap: 10px; height: 56px; border-radius: 999px; background: var(--cz-bluebg); color: var(--cz-blueink); padding: 0 6px 0 16px; }
188
+ .ut-sheet .bar .sp { flex: 1; }
189
+
190
+ /* ── a phone: the list is the page (HmPhone); a conversation opens over it with a back bar (HmPhone2) ── */
191
+ @media (max-width: 760px) {
192
+ body.cz-home.hm-plist .hm-top { display: none; }
193
+ body.cz-home.hm-plist .hm-list { display: flex; position: static; width: auto; background: none; padding: 22px 0 96px; border-radius: 0; box-shadow: none; border: 0; }
194
+ body.cz-home.hm-plist .hm-lsc { margin: 0; padding: 0; overflow: visible; }
195
+ body.cz-home.hm-plist .hm-chat, body.cz-home.hm-plist:not(.hm-vw-open) .hm-vw { display: none; }
196
+ body.cz-home.hm-plist .cz-fabw { bottom: 24px; }
197
+ body.cz-home .hm-needs, body.cz-home #hmMoreP { display: none; }
198
+ body.cz-home .hm-top .hm-back { display: grid; }
199
+ body.cz-home .hm-top { background: var(--cz-card); padding: 8px 12px 4px 8px; }
200
+ body.cz-home:not(.hm-plist) { background: var(--cz-card); }
201
+ .hm-flt .dk, .hm-un { display: none; }
202
+ .hm-all { display: flex; }
203
+ body.cz-home .hm-r.lr .hm-rm, body.cz-home .hm-r.lr.kid .hm-rm { min-height: 48px; }
204
+ .hm-tc .ut-btn, .ut-dec .ut-btn, .ut-vc .ut-btn { height: 44px; }
205
+ .hm-tc.eod .ut-acts .ut-btn { flex: 1; justify-content: center; }
206
+ .ut-ib, .hm-tg, .hm-ck, .ut-mic { min-width: 44px; min-height: 44px; }
207
+ .ut-vc .ut-tabs button, .ut-vc .ut-chips .cz-chip { min-height: 44px; }
208
+ .hm-tg { margin-left: 6px; }
209
+ .hm-cap { height: 48px; }
210
+ .hm-cap input { font-size: 16px; }
211
+ .ut-field textarea, .ut-field input { font-size: 16px; }
212
+ .ut-dec { padding: 0; border: 0; box-shadow: none; background: none; }
213
+ .ut-dec .ut-acts .sp { display: none; }
214
+ .ut-dec .ut-acts .ut-btn.pri { flex: 1; justify-content: center; height: 48px; }
215
+ .ut-dec .ut-acts .ut-btn { height: 48px; }
216
+ }
217
+ .hm-top .hm-back { display: none; }
218
+ /* the Focus chip beside the filters (testing fixes: it came over from the My work page) */
219
+ .hm-flt .hm-fc { margin-left: auto; }
220
+ .hm-flt .hm-fc em { font-style: normal; color: var(--cz-ink3); font-weight: 600; }
@@ -52,14 +52,16 @@ const svg = (d, w) => `<svg aria-hidden="true" width="${w}" height="${w}" viewBo
52
52
  const V = { el: null, cur: null, back: null, subs: [] };
53
53
 
54
54
  /** The header's markup for one item; pure, so a unit test can read it. */
55
+ /** "PRD" over "PRD", or "File · plans/x.md" over "x.md": the kind is left out when it only repeats the title */
56
+ const sameAs = (kind, title) => { const k = String(kind || '').trim().toLowerCase().replace(/^file · /, ''), t = String(title || '').trim().toLowerCase(); return !!t && (k === t || k.split('/').pop() === t || k.split('/').pop().replace(/\.[a-z]+$/, '') === t); };
55
57
  export function headHtml(it) {
56
58
  const o = it || {};
57
59
  const nm = o.full ? 'Open full' : 'Open in a new tab', ico = o.full ? OPEN_FULL : OPEN_NEW, cls = o.full ? 'cz-vw-ib cz-vw-wide' : 'cz-vw-ib';
58
60
  const tab = o.url
59
61
  ? `<button type="button" class="${cls}" data-cz-vw="tab" aria-label="${nm}" title="${nm}">${svg(ico, 16)}</button>`
60
- : `<button type="button" class="${cls}" data-cz-vw="tab" aria-label="${nm}. Not available yet" title="Not available yet" disabled>${svg(ico, 16)}</button>`;
62
+ : ''; // no greyed "Open in a new tab" when there is nothing to open: it read as a second share button (testing fixes)
61
63
  return `<span class="cz-vw-tile" aria-hidden="true">${svg(path(o.icon), 18)}</span>`
62
- + `<div class="cz-vw-t${o.full ? ' cz-vw-t2' : ''}"><p class="cz-vw-kind">${esc(o.kind || '')}</p><h3 class="cz-vw-title" id="czVwTitle">${esc(o.title || '')}</h3></div>`
64
+ + `<div class="cz-vw-t${o.full ? ' cz-vw-t2' : ''}">${o.kind && !sameAs(o.kind, o.title) ? `<p class="cz-vw-kind">${esc(o.kind)}</p>` : ''}<h3 class="cz-vw-title" id="czVwTitle">${esc(o.title || '')}</h3></div>`
63
65
  + tab
64
66
  + `<button type="button" class="cz-vw-ib" data-cz-vw="close" aria-label="Close the viewer" title="Close the viewer">${svg(CLOSE, 16)}</button>`;
65
67
  }
@@ -107,6 +109,7 @@ export function open(it) {
107
109
  el.querySelector('.cz-vw-hd').innerHTML = headHtml(o);
108
110
  const body = el.querySelector('.cz-vw-body');
109
111
  body.innerHTML = ''; body.scrollTop = 0;
112
+ body.className = 'cz-vw-body'; body.onclick = null; body.oninput = null; body.onchange = null; body.onkeydown = null; // what one item's render added to the body does not reach the next
110
113
  if (typeof o.render === 'function') o.render(body); else if (o.html) body.innerHTML = o.html;
111
114
  el.hidden = false;
112
115
  emit();