create-pmos 0.399.0 → 0.401.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 (425) 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 +2 -2
  7. package/workspace/briefing-premium-board-test.js +3 -3
  8. package/workspace/briefing-premium-doc-edit-test.js +2 -8
  9. package/workspace/briefing-premium-sources-test.js +2 -0
  10. package/workspace/briefing-premium-test.js +6 -2
  11. package/workspace/briefing-premium-work-test.js +9 -4
  12. package/workspace/c3-capture-test.js +0 -17
  13. package/workspace/changelog.json +29 -0
  14. package/workspace/guide/briefing-premium.md +2 -2
  15. package/workspace/guide/home.md +24 -3
  16. package/workspace/guide/layout.md +2 -2
  17. package/workspace/guide/notes.md +2 -2
  18. package/workspace/guide/phone-companion.md +1 -1
  19. package/workspace/lib/core-docs.js +2 -2
  20. package/workspace/lib/route-modules.js +1 -9
  21. package/workspace/lib/routes-phone-day.js +18 -9
  22. package/workspace/lib/routes-slash.js +95 -0
  23. package/workspace/package-lock.json +2 -2
  24. package/workspace/package.json +1 -2
  25. package/workspace/premium-chat-goal-view-test.js +1 -1
  26. package/workspace/premium-chat-term-test.js +0 -10
  27. package/workspace/premium-menu-rows-test.js +1 -1
  28. package/workspace/premium-phone-card-test.js +8 -3
  29. package/workspace/premium-vw-cal-test.js +4 -1
  30. package/workspace/premium-vw-doc-test.js +1 -8
  31. package/workspace/premium-work-depth-test.js +2 -3
  32. package/workspace/public/capture.html +23 -0
  33. package/workspace/public/pm/c3-base.js +47 -0
  34. package/workspace/public/pm/c3-capture.js +1 -1
  35. package/workspace/public/pm/c3-ini-ui.js +1 -1
  36. package/workspace/public/pm/c3-sheet.js +1 -1
  37. package/workspace/public/pm/c3-toast.js +1 -1
  38. package/workspace/public/pm/console3.css +3 -0
  39. package/workspace/public/pm/cozy-home.css +21 -6
  40. package/workspace/public/pm/cozy-today.css +4 -3
  41. package/workspace/public/pm/cozy-viewer.js +4 -2
  42. package/workspace/public/pm/cozy.css +9 -0
  43. package/workspace/public/pm/goal-chat.js +5 -1
  44. package/workspace/public/pm/home-app.js +65 -33
  45. package/workspace/public/pm/home-chat.js +34 -29
  46. package/workspace/public/pm/home-data.js +10 -2
  47. package/workspace/public/pm/home-dictate.js +7 -4
  48. package/workspace/public/pm/home-ini.js +13 -3
  49. package/workspace/public/pm/home-list.js +18 -10
  50. package/workspace/public/pm/home-more.js +2 -2
  51. package/workspace/public/pm/home-phone-card.js +9 -4
  52. package/workspace/public/pm/home-review.js +2 -3
  53. package/workspace/public/pm/home-today.js +11 -8
  54. package/workspace/public/pm/home-work.js +13 -8
  55. package/workspace/public/pm/note-dock.js +1 -2
  56. package/workspace/public/pm/notes-links.js +1 -2
  57. package/workspace/public/pm/notes-task.js +3 -4
  58. package/workspace/public/pm/premium-board.js +1 -1
  59. package/workspace/public/pm/premium-initiative-head.js +3 -3
  60. package/workspace/public/pm/premium-vw-doc.css +20 -2
  61. package/workspace/public/pm/premium-vw-doc.js +22 -7
  62. package/workspace/public/pm/premium-vw-item.css +6 -0
  63. package/workspace/public/pm/view-notes.js +2 -2
  64. package/workspace/replaced-tests.json +435 -0
  65. package/workspace/run-tests.js +323 -28
  66. package/workspace/server.js +15 -10
  67. package/workspace/test-files.json +4 -140
  68. package/workspace/test-lists/base.json +1 -2
  69. package/workspace/test-lists/c3-desktop-light-load.json +1 -2
  70. package/workspace/test-lists/c3-initiative-boards.json +1 -2
  71. package/workspace/test-lists/c3-meeting-focus.json +2 -12
  72. package/workspace/test-lists/c3-work-agent.json +1 -2
  73. package/workspace/test-lists/calendar-tidy-up.json +1 -2
  74. package/workspace/test-lists/console3-reports.json +1 -2
  75. package/workspace/test-lists/docs-three-way-sync.json +1 -2
  76. package/workspace/test-lists/extension-capture.json +5 -0
  77. package/workspace/test-lists/jira-wbs.json +1 -2
  78. package/workspace/test-lists/legacy-cleanup-a.json +9 -0
  79. package/workspace/test-lists/meeting-material.json +1 -2
  80. package/workspace/test-lists/meeting-notes.json +2 -36
  81. package/workspace/test-lists/meeting-replay.json +1 -2
  82. package/workspace/test-lists/mm-capture.json +2 -12
  83. package/workspace/test-lists/my-work.json +2 -10
  84. package/workspace/test-lists/onboarding-firstrun.json +2 -12
  85. package/workspace/test-lists/people-directory.json +1 -2
  86. package/workspace/test-lists/run2-a.json +1 -2
  87. package/workspace/test-lists/run2-d.json +2 -19
  88. package/workspace/test-lists/run3-b.json +1 -2
  89. package/workspace/test-lists/run3-c.json +2 -12
  90. package/workspace/test-lists/run4-b.json +1 -2
  91. package/workspace/test-lists/run4-d.json +1 -5
  92. package/workspace/test-lists/run5-c.json +1 -11
  93. package/workspace/test-lists/run6.json +1 -5
  94. package/workspace/test-lists/workspace-launch-flags.json +2 -12
  95. package/workspace/test-lists/workspace-profile-detection.json +2 -10
  96. package/workspace/test-timings.json +242 -123
  97. package/workspace/c3-briefing-test.js +0 -136
  98. package/workspace/c3-core-docs-test.js +0 -170
  99. package/workspace/c3-driver-fixture.js +0 -64
  100. package/workspace/c3-driver-test.js +0 -169
  101. package/workspace/c3-foundation-test.js +0 -163
  102. package/workspace/c3-ib-items-test.js +0 -114
  103. package/workspace/c3-ib-more-test.js +0 -146
  104. package/workspace/c3-ib-triage-backlog-test.js +0 -128
  105. package/workspace/c3-ini-harness.js +0 -66
  106. package/workspace/c3-ini-life-test.js +0 -167
  107. package/workspace/c3-initiatives-test.js +0 -186
  108. package/workspace/c3-light-load-test.js +0 -112
  109. package/workspace/c3-one-home-test.js +0 -149
  110. package/workspace/c3-phone-test.js +0 -289
  111. package/workspace/c3-quiet-test.js +0 -157
  112. package/workspace/c3-report-design-real-test.js +0 -264
  113. package/workspace/c3-report-design-test.js +0 -442
  114. package/workspace/c3-report-setup-test.js +0 -192
  115. package/workspace/c3-report-structure-real-test.js +0 -248
  116. package/workspace/c3-report-structure-test.js +0 -397
  117. package/workspace/c3-reports-test.js +0 -288
  118. package/workspace/c3-scan-test.js +0 -517
  119. package/workspace/c3-sessions-panel-test.js +0 -365
  120. package/workspace/c3-settings-test.js +0 -204
  121. package/workspace/c3-updates-test.js +0 -131
  122. package/workspace/c3-work-test.js +0 -260
  123. package/workspace/cut-stub.js +0 -40
  124. package/workspace/first-paint-audit.js +0 -160
  125. package/workspace/lib/c3-full-console.js +0 -15
  126. package/workspace/lib/engine/derived/trust.js +0 -3
  127. package/workspace/lib/engine/plan-forecast.js +0 -342
  128. package/workspace/lib/engine/report-families.js +0 -175
  129. package/workspace/lib/engine/truth-table.js +0 -57
  130. package/workspace/lib/routes-c3-init.js +0 -54
  131. package/workspace/lib/routes-c3-life.js +0 -120
  132. package/workspace/lib/routes-c3-timeline.js +0 -192
  133. package/workspace/lib/routes-forecast.js +0 -86
  134. package/workspace/lib/routes-releases.js +0 -130
  135. package/workspace/lib/routes-report-facts.js +0 -85
  136. package/workspace/lib/routes-report-families.js +0 -33
  137. package/workspace/lib/routes-signals.js +0 -51
  138. package/workspace/lib/routes-timeline.js +0 -197
  139. package/workspace/public/c3.html +0 -35
  140. package/workspace/public/index.html +0 -156
  141. package/workspace/public/pm/app.js +0 -831
  142. package/workspace/public/pm/bd-board.js +0 -159
  143. package/workspace/public/pm/bd-drag.js +0 -59
  144. package/workspace/public/pm/bd-model.js +0 -152
  145. package/workspace/public/pm/bd-timeline.js +0 -233
  146. package/workspace/public/pm/bd-tree.js +0 -244
  147. package/workspace/public/pm/board-copy.js +0 -59
  148. package/workspace/public/pm/board-read.js +0 -38
  149. package/workspace/public/pm/branches-sheet.js +0 -56
  150. package/workspace/public/pm/breakdown-api.js +0 -58
  151. package/workspace/public/pm/breakdown-copy.js +0 -138
  152. package/workspace/public/pm/briefing-deck.js +0 -441
  153. package/workspace/public/pm/briefing-model.js +0 -251
  154. package/workspace/public/pm/c3-ambient.js +0 -100
  155. package/workspace/public/pm/c3-audience-link.js +0 -21
  156. package/workspace/public/pm/c3-audience.js +0 -46
  157. package/workspace/public/pm/c3-boot.js +0 -13
  158. package/workspace/public/pm/c3-breakdown.js +0 -240
  159. package/workspace/public/pm/c3-brief-data.js +0 -11
  160. package/workspace/public/pm/c3-brief-mentions.js +0 -137
  161. package/workspace/public/pm/c3-brief-needs.js +0 -288
  162. package/workspace/public/pm/c3-brief-pulse.js +0 -112
  163. package/workspace/public/pm/c3-brief-summary.js +0 -139
  164. package/workspace/public/pm/c3-brief-today.js +0 -79
  165. package/workspace/public/pm/c3-brief.js +0 -279
  166. package/workspace/public/pm/c3-cal-strategy.js +0 -529
  167. package/workspace/public/pm/c3-calendar.js +0 -965
  168. package/workspace/public/pm/c3-calpop.js +0 -111
  169. package/workspace/public/pm/c3-case.js +0 -196
  170. package/workspace/public/pm/c3-core-docs.css +0 -18
  171. package/workspace/public/pm/c3-core-docs.js +0 -236
  172. package/workspace/public/pm/c3-daypart.js +0 -176
  173. package/workspace/public/pm/c3-demo-boards.js +0 -764
  174. package/workspace/public/pm/c3-demo-brief-ix.js +0 -350
  175. package/workspace/public/pm/c3-demo-brief-page.js +0 -70
  176. package/workspace/public/pm/c3-demo-cal-ix.js +0 -74
  177. package/workspace/public/pm/c3-demo-cal2.js +0 -66
  178. package/workspace/public/pm/c3-demo-cal3.js +0 -173
  179. package/workspace/public/pm/c3-demo-cal4.js +0 -169
  180. package/workspace/public/pm/c3-demo-cal5.js +0 -52
  181. package/workspace/public/pm/c3-demo-coredocs.js +0 -221
  182. package/workspace/public/pm/c3-demo-data.js +0 -552
  183. package/workspace/public/pm/c3-demo-focus.js +0 -181
  184. package/workspace/public/pm/c3-demo-init.js +0 -430
  185. package/workspace/public/pm/c3-demo-life.js +0 -77
  186. package/workspace/public/pm/c3-demo-material.js +0 -58
  187. package/workspace/public/pm/c3-demo-misc2.js +0 -34
  188. package/workspace/public/pm/c3-demo-phone.js +0 -48
  189. package/workspace/public/pm/c3-demo-plan2.js +0 -30
  190. package/workspace/public/pm/c3-demo-rd.js +0 -432
  191. package/workspace/public/pm/c3-demo-rep-ix.js +0 -126
  192. package/workspace/public/pm/c3-demo-rep2.js +0 -130
  193. package/workspace/public/pm/c3-demo-rep3.js +0 -138
  194. package/workspace/public/pm/c3-demo-rs.js +0 -287
  195. package/workspace/public/pm/c3-demo-term.js +0 -153
  196. package/workspace/public/pm/c3-demo-time.js +0 -49
  197. package/workspace/public/pm/c3-demo-work-ix.js +0 -32
  198. package/workspace/public/pm/c3-demo.js +0 -131
  199. package/workspace/public/pm/c3-design-studio.js +0 -369
  200. package/workspace/public/pm/c3-doc-formats.js +0 -153
  201. package/workspace/public/pm/c3-doc-sheet.js +0 -1230
  202. package/workspace/public/pm/c3-dock.js +0 -206
  203. package/workspace/public/pm/c3-docs.js +0 -291
  204. package/workspace/public/pm/c3-driver-work.js +0 -110
  205. package/workspace/public/pm/c3-driver.css +0 -18
  206. package/workspace/public/pm/c3-driver.js +0 -298
  207. package/workspace/public/pm/c3-focus.css +0 -304
  208. package/workspace/public/pm/c3-focus.js +0 -983
  209. package/workspace/public/pm/c3-ib-docs.js +0 -92
  210. package/workspace/public/pm/c3-ib-initiatives.js +0 -201
  211. package/workspace/public/pm/c3-ib-items.js +0 -210
  212. package/workspace/public/pm/c3-ib-releases.js +0 -48
  213. package/workspace/public/pm/c3-ib-sprints.js +0 -201
  214. package/workspace/public/pm/c3-ib-triage.js +0 -177
  215. package/workspace/public/pm/c3-ii-tabs.js +0 -252
  216. package/workspace/public/pm/c3-ini-life.css +0 -34
  217. package/workspace/public/pm/c3-ini-life.js +0 -379
  218. package/workspace/public/pm/c3-ini-records.js +0 -197
  219. package/workspace/public/pm/c3-ini-timeline.js +0 -278
  220. package/workspace/public/pm/c3-ini-work.js +0 -139
  221. package/workspace/public/pm/c3-init-extras.js +0 -170
  222. package/workspace/public/pm/c3-initiatives.js +0 -852
  223. package/workspace/public/pm/c3-lifecycle-panels.js +0 -479
  224. package/workspace/public/pm/c3-look.js +0 -27
  225. package/workspace/public/pm/c3-material.css +0 -22
  226. package/workspace/public/pm/c3-material.js +0 -321
  227. package/workspace/public/pm/c3-md.js +0 -3
  228. package/workspace/public/pm/c3-misc-panels.js +0 -89
  229. package/workspace/public/pm/c3-new-session.js +0 -110
  230. package/workspace/public/pm/c3-notes.js +0 -751
  231. package/workspace/public/pm/c3-phone-boot.js +0 -47
  232. package/workspace/public/pm/c3-phone-detail.js +0 -97
  233. package/workspace/public/pm/c3-phone-model.js +0 -3
  234. package/workspace/public/pm/c3-phone.css +0 -66
  235. package/workspace/public/pm/c3-phone.js +0 -444
  236. package/workspace/public/pm/c3-plan-panels.js +0 -163
  237. package/workspace/public/pm/c3-plan.js +0 -193
  238. package/workspace/public/pm/c3-quiet.css +0 -113
  239. package/workspace/public/pm/c3-quiet.js +0 -177
  240. package/workspace/public/pm/c3-replay.css +0 -133
  241. package/workspace/public/pm/c3-replay.js +0 -429
  242. package/workspace/public/pm/c3-report-deck.css +0 -163
  243. package/workspace/public/pm/c3-report-deck.js +0 -598
  244. package/workspace/public/pm/c3-report-frame.css +0 -20
  245. package/workspace/public/pm/c3-report-print.css +0 -20
  246. package/workspace/public/pm/c3-report-setup.css +0 -67
  247. package/workspace/public/pm/c3-report-setup.js +0 -298
  248. package/workspace/public/pm/c3-report-store.js +0 -244
  249. package/workspace/public/pm/c3-report-structure.css +0 -44
  250. package/workspace/public/pm/c3-report-structure.js +0 -473
  251. package/workspace/public/pm/c3-reports.css +0 -68
  252. package/workspace/public/pm/c3-reports.js +0 -377
  253. package/workspace/public/pm/c3-roadmap.js +0 -249
  254. package/workspace/public/pm/c3-scan-api.js +0 -167
  255. package/workspace/public/pm/c3-scan-next.js +0 -248
  256. package/workspace/public/pm/c3-scan-setup.js +0 -313
  257. package/workspace/public/pm/c3-scan-words.js +0 -41
  258. package/workspace/public/pm/c3-scan.css +0 -74
  259. package/workspace/public/pm/c3-scan.js +0 -93
  260. package/workspace/public/pm/c3-session-chat.js +0 -103
  261. package/workspace/public/pm/c3-session-conv.js +0 -165
  262. package/workspace/public/pm/c3-session-term.js +0 -216
  263. package/workspace/public/pm/c3-settings.css +0 -85
  264. package/workspace/public/pm/c3-settings.js +0 -1045
  265. package/workspace/public/pm/c3-shell.js +0 -628
  266. package/workspace/public/pm/c3-signals.js +0 -196
  267. package/workspace/public/pm/c3-strategy-panels.js +0 -45
  268. package/workspace/public/pm/c3-swipe.js +0 -230
  269. package/workspace/public/pm/c3-terminal-data.js +0 -48
  270. package/workspace/public/pm/c3-terminal-edge.js +0 -91
  271. package/workspace/public/pm/c3-terminal-icons.js +0 -40
  272. package/workspace/public/pm/c3-terminal-results.js +0 -141
  273. package/workspace/public/pm/c3-terminal.js +0 -52
  274. package/workspace/public/pm/c3-tickets.js +0 -163
  275. package/workspace/public/pm/c3-timeline.js +0 -201
  276. package/workspace/public/pm/calendar-views.js +0 -1049
  277. package/workspace/public/pm/console3-lift.md +0 -220
  278. package/workspace/public/pm/cozy-home.js +0 -172
  279. package/workspace/public/pm/cozy-initiative.css +0 -138
  280. package/workspace/public/pm/cycle-review.js +0 -125
  281. package/workspace/public/pm/data.js +0 -1577
  282. package/workspace/public/pm/dest-board.js +0 -444
  283. package/workspace/public/pm/dest-docs.js +0 -530
  284. package/workspace/public/pm/dest-initiatives.js +0 -162
  285. package/workspace/public/pm/dest-mywork.js +0 -307
  286. package/workspace/public/pm/dest-notes.js +0 -537
  287. package/workspace/public/pm/dest-people.js +0 -449
  288. package/workspace/public/pm/dest-reports.js +0 -383
  289. package/workspace/public/pm/dest-settings.js +0 -601
  290. package/workspace/public/pm/dest-today.js +0 -267
  291. package/workspace/public/pm/display-word.js +0 -56
  292. package/workspace/public/pm/doc-editor.js +0 -473
  293. package/workspace/public/pm/doc-graph.js +0 -272
  294. package/workspace/public/pm/doc-health-panel.js +0 -110
  295. package/workspace/public/pm/doc-rail.js +0 -167
  296. package/workspace/public/pm/doc-remote.js +0 -180
  297. package/workspace/public/pm/dock-sessions.js +0 -472
  298. package/workspace/public/pm/dock.js +0 -216
  299. package/workspace/public/pm/fixture.js +0 -821
  300. package/workspace/public/pm/flag-picker.js +0 -104
  301. package/workspace/public/pm/frame-copy.js +0 -278
  302. package/workspace/public/pm/freshness-line.js +0 -149
  303. package/workspace/public/pm/handoff-box.js +0 -82
  304. package/workspace/public/pm/initiative-list.js +0 -235
  305. package/workspace/public/pm/initiative-sheet.js +0 -331
  306. package/workspace/public/pm/initiatives-api.js +0 -95
  307. package/workspace/public/pm/initiatives-copy.js +0 -287
  308. package/workspace/public/pm/initiatives-timeline-copy.js +0 -59
  309. package/workspace/public/pm/initiatives-timeline.js +0 -410
  310. package/workspace/public/pm/initiatives-ui.js +0 -291
  311. package/workspace/public/pm/item-sheet.js +0 -268
  312. package/workspace/public/pm/keep-card.js +0 -204
  313. package/workspace/public/pm/lifecycle-lens-model.js +0 -246
  314. package/workspace/public/pm/lifecycle-lens.js +0 -276
  315. package/workspace/public/pm/lifecycle.js +0 -111
  316. package/workspace/public/pm/mobile.css +0 -366
  317. package/workspace/public/pm/mobile.js +0 -581
  318. package/workspace/public/pm/modes-live.js +0 -453
  319. package/workspace/public/pm/modes.js +0 -147
  320. package/workspace/public/pm/my-work-card.js +0 -51
  321. package/workspace/public/pm/my-work-data.js +0 -36
  322. package/workspace/public/pm/new-initiative-sheet.js +0 -169
  323. package/workspace/public/pm/next-step-ui.js +0 -190
  324. package/workspace/public/pm/outbox-panel.js +0 -125
  325. package/workspace/public/pm/palette-copy.js +0 -55
  326. package/workspace/public/pm/palette.js +0 -343
  327. package/workspace/public/pm/panel-breakdown.js +0 -702
  328. package/workspace/public/pm/panel-cockpit.js +0 -425
  329. package/workspace/public/pm/panel-detail.js +0 -1513
  330. package/workspace/public/pm/panel-initiatives.js +0 -929
  331. package/workspace/public/pm/panel-newsess.js +0 -709
  332. package/workspace/public/pm/panel-repos.js +0 -741
  333. package/workspace/public/pm/panel-tabs.js +0 -1506
  334. package/workspace/public/pm/panel-trees.js +0 -204
  335. package/workspace/public/pm/people-link.js +0 -106
  336. package/workspace/public/pm/phone-deck.js +0 -167
  337. package/workspace/public/pm/pm-work-view.js +0 -1533
  338. package/workspace/public/pm/portfolio-report.js +0 -61
  339. package/workspace/public/pm/premium-acts.js +0 -280
  340. package/workspace/public/pm/premium-brief.js +0 -111
  341. package/workspace/public/pm/premium-chat.js +0 -22
  342. package/workspace/public/pm/premium-doc-sheet.js +0 -312
  343. package/workspace/public/pm/premium-initiative.js +0 -324
  344. package/workspace/public/pm/premium-insights.css +0 -228
  345. package/workspace/public/pm/premium-metric-tiles.js +0 -68
  346. package/workspace/public/pm/premium-report-brief.js +0 -132
  347. package/workspace/public/pm/premium-vw-rec.js +0 -67
  348. package/workspace/public/pm/premium-wide.css +0 -30
  349. package/workspace/public/pm/print.css +0 -44
  350. package/workspace/public/pm/provider-cards.js +0 -136
  351. package/workspace/public/pm/registry.js +0 -203
  352. package/workspace/public/pm/release-card.js +0 -110
  353. package/workspace/public/pm/releases-view.js +0 -248
  354. package/workspace/public/pm/report-families-view.js +0 -505
  355. package/workspace/public/pm/report-slides.js +0 -438
  356. package/workspace/public/pm/report-tab.js +0 -33
  357. package/workspace/public/pm/report-view.js +0 -337
  358. package/workspace/public/pm/reports-copy.js +0 -134
  359. package/workspace/public/pm/roadmap.js +0 -294
  360. package/workspace/public/pm/run-card.js +0 -260
  361. package/workspace/public/pm/sessions-panel.js +0 -219
  362. package/workspace/public/pm/sheet-jira.js +0 -353
  363. package/workspace/public/pm/shell-bell.js +0 -163
  364. package/workspace/public/pm/shell-model.js +0 -83
  365. package/workspace/public/pm/shell-phone.js +0 -124
  366. package/workspace/public/pm/shell-readaloud.js +0 -53
  367. package/workspace/public/pm/shell-recording.js +0 -274
  368. package/workspace/public/pm/shell-ticker.js +0 -90
  369. package/workspace/public/pm/sig-watch.js +0 -41
  370. package/workspace/public/pm/slide-confirm.js +0 -163
  371. package/workspace/public/pm/slides-copy.js +0 -52
  372. package/workspace/public/pm/status-banner.js +0 -95
  373. package/workspace/public/pm/tab-doc.js +0 -859
  374. package/workspace/public/pm/tab-gone.js +0 -21
  375. package/workspace/public/pm/tab-term.js +0 -1210
  376. package/workspace/public/pm/tab-web.js +0 -90
  377. package/workspace/public/pm/timeline-copy.js +0 -48
  378. package/workspace/public/pm/timeline-forecast-view.js +0 -164
  379. package/workspace/public/pm/today-agenda.js +0 -331
  380. package/workspace/public/pm/today-cards.js +0 -244
  381. package/workspace/public/pm/today-copy.js +0 -506
  382. package/workspace/public/pm/today-day.js +0 -1371
  383. package/workspace/public/pm/today-goals.js +0 -297
  384. package/workspace/public/pm/today-jobs.js +0 -84
  385. package/workspace/public/pm/today-mentions.js +0 -50
  386. package/workspace/public/pm/topbar.js +0 -202
  387. package/workspace/public/pm/triage-card.js +0 -60
  388. package/workspace/public/pm/undo-hold.js +0 -103
  389. package/workspace/public/pm/view-addrepo.js +0 -208
  390. package/workspace/public/pm/view-files.js +0 -197
  391. package/workspace/public/pm/view-livenotes.js +0 -399
  392. package/workspace/public/pm/view-today.js +0 -13
  393. package/workspace/public/pm/view-validate.js +0 -171
  394. package/workspace/public/pm/welcome.js +0 -391
  395. package/workspace/public/pm/work-place.js +0 -68
  396. package/workspace/public/pm/xlsx-read.js +0 -117
  397. package/workspace/public/welcome.html +0 -22
  398. package/workspace/test-lists/browser-suites-green.json +0 -5
  399. package/workspace/test-lists/c3-core-docs.json +0 -9
  400. package/workspace/test-lists/c3-doc-sheet-rich.json +0 -6
  401. package/workspace/test-lists/c3-doc-sheet-size.json +0 -6
  402. package/workspace/test-lists/c3-doc-sheet-v2.json +0 -6
  403. package/workspace/test-lists/c3-ib-items.json +0 -9
  404. package/workspace/test-lists/c3-ib-more.json +0 -9
  405. package/workspace/test-lists/c3-ib-triage-backlog.json +0 -9
  406. package/workspace/test-lists/c3-ini-life.json +0 -9
  407. package/workspace/test-lists/c3-meeting-board.json +0 -5
  408. package/workspace/test-lists/c3-meeting-card.json +0 -5
  409. package/workspace/test-lists/c3-notes-place.json +0 -5
  410. package/workspace/test-lists/c3-notes-series.json +0 -5
  411. package/workspace/test-lists/calendar-time-page.json +0 -5
  412. package/workspace/test-lists/calpop.json +0 -4
  413. package/workspace/test-lists/console3-briefing.json +0 -9
  414. package/workspace/test-lists/console3-foundation.json +0 -9
  415. package/workspace/test-lists/console3-work-page.json +0 -9
  416. package/workspace/test-lists/premium-brief-parity.json +0 -9
  417. package/workspace/test-lists/report-design-studio-ui.json +0 -5
  418. package/workspace/test-lists/report-structure-ui.json +0 -11
  419. package/workspace/test-lists/report-workspace-ui.json +0 -5
  420. package/workspace/test-lists/run3-a.json +0 -5
  421. package/workspace/test-lists/run3-d.json +0 -6
  422. package/workspace/test-lists/run4-c.json +0 -13
  423. package/workspace/test-lists/today-goals-jobs-ui.json +0 -5
  424. package/workspace/test-lists/today-mentions-cards.json +0 -5
  425. package/workspace/test-lists/workspace-tabs-declutter.json +0 -13
@@ -59,13 +59,21 @@ export function productsOf(D) {
59
59
  }
60
60
 
61
61
  /* ── rows ── */
62
+ export const TASKS_SHOWN = 3;
62
63
  function taskHint(t, now, mine) {
63
64
  const d = t.end ? dayDiff(t.end, now) : null;
64
65
  const when = d == null ? '' : d === 0 ? 'due today' : d === 1 ? 'due tomorrow' : d < 0 ? plural(-d, 'day', 'days') + ' late' : 'due ' + shortDay(t.end);
65
66
  if (!mine) return ['Waiting on ' + (/^agent:/.test(String(t.owner)) ? 'an agent' : t.owner), when].filter(Boolean).join(' · ');
66
67
  return ['Task', t.status && t.status !== 'To do' ? t.status : '', when].filter(Boolean).join(' · ');
67
68
  }
68
- /** The PMOS tasks of an initiative that are not done: the PM's first, then the ones that wait on someone else. */
69
+ /** How soon a task wants the PM, lower first: due today, a few days late, due this week, long late, later or no day.
70
+ * A task 100 days late is usually a plan that moved, not the thing to do tonight, so it never outranks today's. */
71
+ function urgency(t, now) {
72
+ if (!t.end) return [4, 0];
73
+ const d = dayDiff(t.end, now);
74
+ return d === 0 ? [0, 0] : d < 0 && d >= -7 ? [1, -d] : d > 0 && d <= 7 ? [2, d] : d < 0 ? [3, -d] : [4, d];
75
+ }
76
+ /** The PMOS tasks of an initiative that are not done: the PM's first, by urgency(), then the ones that wait on someone else. */
69
77
  export function tasksOf(D, ini, now = Date.now()) {
70
78
  const me = String((D.today && D.today.me) || '').toLowerCase();
71
79
  const items = ((D.items && D.items.items) || []).filter((t) => t && t.src === 'pmos' && t.kind !== 'Epic' && t.ini === ini && t.status !== 'Done');
@@ -73,7 +81,8 @@ export function tasksOf(D, ini, now = Date.now()) {
73
81
  const ow = String(t.owner || '').toLowerCase();
74
82
  const mine = !ow || /^(pm|you)(:|$)/.test(ow) || (!!me && (ow === me || ow.startsWith(me + ' ')));
75
83
  return { id: 't:' + t.uid, kind: 'task', ini, name: t.title, hint: taskHint(t, now, mine), state: mine ? 'quiet' : 'wait', mine, due: t.end || '', late: !!(t.end && dayDiff(t.end, now) < 0), task: t };
76
- }).sort((a, b) => (b.mine - a.mine) || String(a.due).localeCompare(String(b.due)));
84
+ }).map((r) => ({ ...r, rank: urgency(r.task, now) }))
85
+ .sort((a, b) => (b.mine - a.mine) || (a.rank[0] - b.rank[0]) || (a.rank[1] - b.rank[1]));
77
86
  }
78
87
  function meetRow(m, ini) {
79
88
  return { id: 'm:' + (m.id || m.title), kind: 'meeting', ini: ini || null, name: m.title, hint: (m.state === 'now' ? 'Now' : hm(m.start)) + (ini ? ' meeting' : ' · not linked'), state: m.state === 'now' ? 'working' : 'quiet', icon: 'clock', meeting: m };
@@ -97,14 +106,15 @@ function iniRowOf(D, r, needs, now) {
97
106
  const mine = tasks.filter((t) => t.mine).length;
98
107
  const run = ses.filter((s) => s.state === 'working').length;
99
108
  const right = turn ? 'your turn' + (mine ? ' · ' + plural(mine, 'task', 'tasks') : '') : mine ? plural(mine, 'task', 'tasks') : run ? run + ' running' : 'Nothing today';
100
- const kids = [...steps, ...ses.sort((a, b) => (RANK[b.state] || 0) - (RANK[a.state] || 0)), ...tasks, ...meet];
109
+ // next steps, sessions and today's meetings always show; tasks show the TASKS_SHOWN most urgent, the rest behind "Show N more tasks"
110
+ const kids = [...steps, ...ses.sort((a, b) => (RANK[b.state] || 0) - (RANK[a.state] || 0)), ...tasks.map((t, i) => (i < TASKS_SHOWN ? t : { ...t, extra: true })), ...meet];
101
111
  const hint = r.made ? [cap1(r.lane), r.stage].filter(Boolean).join(' · ') : [cap1(r.lane || 'feature'), r.stage].filter(Boolean).join(' · ');
102
112
  return { id: 'i:' + r.id, kind: 'ini', ini: r.id, name: r.title, hint, right, turn, busy: kids.length > 0, state: turn ? 'needs' : run ? 'working' : 'quiet', kids, board: r, updated: r.updated || '' };
103
113
  }
104
114
 
105
115
  /* ── the list ── */
106
116
  const sameName = (a, b) => String(a || '').toLowerCase() === String(b || '').toLowerCase();
107
- /** o: { filter ('today' | 'waiting' | 'kept' | 'done'), product (a product key, or null for all), now } */
117
+ /** o: { filter ('today' | 'kept' | 'done'), product (a product key, or null for all), now } */
108
118
  export function homeList(D, o = {}) {
109
119
  const now = o.now || D.now || Date.now();
110
120
  const needs = needsOf(D);
@@ -114,9 +124,8 @@ export function homeList(D, o = {}) {
114
124
  const W = D.work || null;
115
125
  const tab = (k) => ((W && W.queue && W.queue.tabs) || []).find((t) => t.key === k) || null;
116
126
  const tabRows = (k) => { const t = tab(k); return t ? t.groups.flatMap((g) => g.rows || []) : []; };
127
+ // Kept and Done only (testing fixes: no Today or Waiting chip; the list is Today unless one of these two is on, and pressing it again goes back)
117
128
  const filters = [
118
- { key: 'today', label: 'Today' },
119
- { key: 'waiting', label: 'Waiting', n: W && W.waiting ? W.waiting.rows.length : 0 },
120
129
  { key: 'kept', label: 'Kept', n: (tab('kept') || {}).n || 0 },
121
130
  { key: 'done', label: 'Done' },
122
131
  ];
@@ -146,7 +155,7 @@ export function homeList(D, o = {}) {
146
155
  const looseNeeds = needs.filter((x) => !used.has(x.id) && !(x.ini && groups.some((g) => g.inis.concat(g.rest).some((i) => i.ini === x.ini))));
147
156
  const loose = [];
148
157
  for (const x of looseNeeds) loose.push({ ...x, flat: true });
149
- for (const r of tabRows('today')) loose.push({ id: 'w:' + r.key, kind: 'item', key: r.key, name: r.title, hint: [r.overdue ? 'late' : '', r.sub ? r.sub.replace(/^Yours\b/, 'your own note') : 'your own note'].filter(Boolean).join(' · '), check: true, item: r });
158
+ for (const r of tabRows('today')) loose.push({ id: 'w:' + r.key, kind: 'item', key: r.key, name: r.title, hint: [r.overdue ? 'late' : '', String(r.sub || '').replace(/^Yours\b\s*(·\s*)?/, '')].filter(Boolean).join(' · '), check: true, item: r }); // the check box says it is the PM's own: no "your own note" on every row (testing fixes)
150
159
  const inIni = new Set(groups.flatMap((g) => g.inis.concat(g.rest)).map((i) => i.ini));
151
160
  for (const m of mentionsOf(D).filter((x) => !(x.initiative && inIni.has(x.initiative)))) loose.push(mentionRow(m, null));
152
161
  for (const m of todayOf(D).filter((x) => !meetIni(x) && x.state !== 'past')) loose.push(meetRow(m, null));
@@ -156,7 +165,6 @@ export function homeList(D, o = {}) {
156
165
  const untouched = { n: stale.length + ((W && W.review && W.review.n) || 0), inis: stale.length, items: (W && W.review && W.review.n) || 0, day: new Date(now).getDay() === REVIEW_DAY ? 'today' : 'Fri' };
157
166
  // a filter other than Today shows one plain list from the PM's own list (the items carry no initiative)
158
167
  let list = null;
159
- if (o.filter === 'waiting') list = { title: 'Waiting on others', rows: (W && W.waiting ? W.waiting.rows : []).map((r) => ({ id: 'w:' + r.key, kind: 'item', key: r.key, name: r.title, hint: r.sub || '', state: 'wait', item: r })), empty: 'Nobody owes you anything.' };
160
168
  if (o.filter === 'kept') list = { title: 'Kept for later', rows: tabRows('kept').map((r) => ({ id: 'w:' + r.key, kind: 'item', key: r.key, name: r.title, hint: r.sub || '', check: true, item: r })), empty: 'Nothing is kept for later.' };
161
169
  if (o.filter === 'done') {
162
170
  const done = tabRows('done').map((r) => ({ id: 'w:' + r.key, kind: 'item', key: r.key, name: r.title, hint: r.sub || 'Done', done: true, item: r }));
@@ -221,8 +229,8 @@ export function todayCard(D, o = {}) {
221
229
  const P = D.phoneDay && D.phoneDay.ok !== false ? D.phoneDay : null;
222
230
  const block = needs.find((x) => x.row && /decision|blocked/.test(x.row.kind)) || needs[0] || null;
223
231
  const rec = P && P.recap ? P.recap : null;
224
- const moved = rec && (rec.moved || []).length ? rec.moved.slice(0, 2).map((m) => m.text).join(' · ') : '';
225
- const doneLine = moved || (rec ? [rec.decided ? plural(rec.decided, 'decision', 'decisions') : '', rec.done ? plural(rec.done, 'task', 'tasks') + ' done' : '', rec.finished ? rec.finished + ' finished' : ''].filter(Boolean).join(' · ') : '');
232
+ // Done is counts, never a meeting's decision text: a decision is not a thing done, and only the ones the PM confirmed count (testing fixes)
233
+ const doneLine = rec ? [rec.done ? plural(rec.done, 'task', 'tasks') + ' done' : '', rec.decided ? plural(rec.decided, 'decision', 'decisions') + ' confirmed' : '', rec.finished ? plural(rec.finished, 'draft', 'drafts') + ' finished' : '', rec.to_confirm ? rec.to_confirm + ' from notes to confirm' : ''].filter(Boolean).join(' · ') : '';
226
234
  const runs = (D.sessions || []).filter((s) => s.shown === 'working');
227
235
  const over = runs.length ? (runs.length === 1 ? ((runs[0].hx && runs[0].hx.title) || runs[0].name) + ' runs.' : runs.length + ' sessions run.') + ' Results are in New for you by morning.' : '';
228
236
  const tm = P && P.tomorrow ? P.tomorrow : null;
@@ -4,7 +4,7 @@
4
4
  * Each opens in the Viewer card (cozy-viewer.js), never the old dialog, and reads and writes through the routes the old pages used:
5
5
  * openSettings() the designed Settings (pm/cozy-settings.js, premium-uncovered-features E3)
6
6
  * openSources() the designed Sources (pm/cozy-sources.js, E3); readLine below gives its read lines
7
- * openMyWork(tab) home-work.js: Your list, Waiting on others, Weekly review, Untouched; an item's fields and agent; Focus and jobs;
7
+ * openMyWork(tab) home-work.js: the old My work page. Home no longer opens it (Home's list is the list); an item and Focus open alone;
8
8
  * keys and swipe on the rows (GET /api/my-work-premium; the /api/pm-items, /api/pm-jobs and /api/my-work presses)
9
9
  * openAround(key?) home-around.js: Around you is gone (premium-uncovered-features, HmAround); its views stay, opened from New for you
10
10
  * openEndOfDay() GET /api/phone-day: what finished today, the recap and tomorrow's meetings
@@ -32,7 +32,7 @@ function card(o, draw) {
32
32
  }
33
33
 
34
34
  export const moreItems = [
35
- ['work', 'My work', 'list'], ['eod', 'End of the day', 'cal'], ['cal', 'Calendar', 'cal'], ['rec', 'Record a note', 'mic'], ['products', 'Products', 'chart'],
35
+ ['eod', 'End of the day', 'cal'], ['cal', 'Calendar', 'cal'], ['rec', 'Record a note', 'mic'], ['products', 'Products', 'chart'],
36
36
  ];
37
37
 
38
38
  /** The ⋯ list itself in the Viewer, for a page with no menu of its own: items are [label, open]. */
@@ -54,10 +54,15 @@ export function mountPhoneCard(o) {
54
54
  return `<span class="label">Your morning</span>${big(top.length ? ['', 'One thing', 'Two things', 'Three things'][top.length] + ' this morning' : 'Nothing pressing this morning')}${items(top)}${S(waits)}${nx}`;
55
55
  }
56
56
  if (mo.kind === 'work') return `<span class="label">${mo.next ? 'Next: ' + esc(mo.next.title) + ' at ' + hm(mo.next.start) : 'No more meetings today'}</span>${big(fin.length ? 'Finished for you' : 'Nothing new from the agent')}${fin.length ? finRows(2) + S('Approving a draft waits for your computer.') : dayErr() || S('When the agent finishes a draft today, it shows here.')}${mo.fits.length ? fits(mo.fits) : ''}${mo.next ? `<div class="phacts">${open(mo.next)}</div>` : ''}`;
57
- if (mo.kind === 'recap') {
58
- const r = day && day.recap, one = mine[0];
59
- const stats = r ? `<div class="phstats"><div><b>${r.meetings || 0}</b><span>meetings</span></div><div><b>${r.decided || 0}</b><span>decided in meetings</span></div><div><b>${r.done || 0}</b><span>done by you</span></div></div>${(r.moved || []).length ? `<div class="phfit"><b class="phtt">What moved</b>${r.moved.map((x) => `<p class="phs">${esc(x.text)}${x.sub ? ' · ' + esc(x.sub) : ''}</p>`).join('')}</div>` : ''}` : dayErr();
60
- return `<span class="label">Evening recap</span>${big('How today went')}${stats}<div class="phfit"><b class="phtt">Still open · ${mine.length}</b>${mine.slice(0, 3).map((x) => S(x.headline)).join('')}${S(mine.length ? 'They come first on Home tomorrow.' : 'Nothing of yours is still open.')}</div>${one ? `<div class="phfit"><span class="label">One thing tonight, if you have a minute</span>${items([one])}</div>` : ''}`;
57
+ if (mo.kind === 'recap') { // canvas HmPhone2's End of day: plain lines, one soft well for the one thing to do
58
+ const r = day && day.recap, one = mine[0], rest = mine.length - (one ? 1 : 0);
59
+ const KIND = { decision: 'Decided', done: 'Done', agent: 'Agent' };
60
+ const sum = r ? L([num(r.meetings, 'meeting', 'meetings'), num(r.decided, 'decision confirmed', 'decisions confirmed'), num(r.done, 'item done', 'items done')].join(' · ')) : dayErr();
61
+ const moved = r && (r.moved || []).length ? `<div class="phmv"><span class="label">What moved</span>${r.moved.map((x) => `<p><b>${esc(KIND[x.kind] || '')}</b><span>${esc(x.text)}</span>${x.sub ? `<em>${esc(x.sub)}</em>` : ''}</p>`).join('')}</div>` : '';
62
+ const conf = r && r.to_confirm ? `<p class="phs phq">${esc(num(r.to_confirm, 'decision', 'decisions'))} from today's notes ${r.to_confirm === 1 ? 'is' : 'are'} not confirmed yet, so ${r.to_confirm === 1 ? 'it does' : 'they do'} not count. Confirm them in the meeting's Replay.</p>` : '';
63
+ const open = one ? `<div class="phfit" data-id="${esc(one.id)}"><span class="label">One thing tonight · ${esc(one.label)}</span><b class="phtt">${esc(one.headline)}</b>${P.dec.has(one.id) ? `<p class="phok" role="status">${CHECK}<span>Done.</span></p><div class="phacts">${btn('Undo', 'phundo', one.id, true)}</div>` : `<div class="phacts">${btn(one.looks ? 'Confirm done' : 'Done', 'phdone', one.id)}</div>`}${P.err[one.id] ? `<p class="pherr" role="alert">${esc(P.err[one.id])}</p>` : ''}${rest ? S(num(rest, 'more is', 'more are') + ' still open. ' + (rest === 1 ? 'It comes' : 'They come') + ' first on Home tomorrow.') : ''}</div>`
64
+ : S('Nothing of yours is still open.');
65
+ return `<span class="label">Evening recap</span>${big('How today went')}${sum}${moved}${conf}${open}`;
61
66
  }
62
67
  const r = day && day.recap, tm = day && day.tomorrow;
63
68
  return `<span class="label">End of day</span>${big(tm ? 'Tomorrow, ' + tm.label : 'Tomorrow, at a glance')}${r ? L('Today: ' + [num(r.meetings, 'meeting', 'meetings'), num(r.decided, 'decision', 'decisions'), num(r.done, 'item done', 'items done')].join(', ') + '.') : ''}${tm ? `<div class="phfit"><b class="phtt">${tm.meetings.length ? num(tm.meetings.length, 'meeting', 'meetings') : 'No meetings'}</b>${tm.meetings.slice(0, 5).map((x) => `<p class="phs">${hm(x.start)} · ${esc(x.title)}${who(x) ? ' · ' + esc(who(x)) : ''}</p>`).join('')}</div>` : dayErr()}${S(mine.length ? num(mine.length, 'item carries', 'items carry') + ' over. They open first on Home tomorrow.' : 'Nothing carries over.')}`;
@@ -14,7 +14,7 @@ const MON = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct
14
14
  const dayLabel = (iso) => { const m = /^(\d{4})-(\d{2})-(\d{2})/.exec(String(iso || '')); return m ? +m[3] + ' ' + MON[+m[2] - 1] : ''; };
15
15
  const plural = (n, one, many) => n + ' ' + (n === 1 ? one : many);
16
16
  /** The seg over My work and the weekly review: which of the two the Viewer shows. */
17
- export const tabsHtml = (on) => `<div class="cz-seg ut-tabs" role="group" aria-label="Show"><button type="button" data-ut-tab="work" aria-pressed="${on === 'work'}">My work</button><button type="button" data-ut-tab="review" aria-pressed="${on === 'review'}">Weekly review</button></div>`;
17
+ export const tabsHtml = () => ''; // My work is no longer a page of its own (Home's list is the list), so the review has no tab beside it
18
18
 
19
19
  export function openReview(h) {
20
20
  const st = { done: {}, picked: new Set(), msg: '', busy: false };
@@ -66,14 +66,13 @@ export function openReview(h) {
66
66
  + `<div class="cz-ladder" role="img" aria-label="${R.steps.filter((x) => x.done).length} of 4 steps done">${R.steps.map((s) => `<i class="${s.done ? 'done' : s.now ? 'now' : ''}"></i>`).join('')}</div>`
67
67
  + `<div class="ut-steps">${steps}</div><p class="ut-small ut-mut" role="status" id="rvMsg">${esc(st.msg)}</p><p class="ut-small ut-mut ut-foot">${esc(last)}</p></div>`;
68
68
  };
69
- const body = h.VW.open({ id: 'review', kind: 'My work', title: 'Weekly review', icon: 'list', render: draw });
69
+ const body = h.VW.open({ id: 'review', kind: 'Weekly review', title: 'Weekly review', icon: 'list', render: draw });
70
70
  const say = (m) => { st.msg = m; const el = body.querySelector('#rvMsg'); if (el) el.textContent = m; };
71
71
  const post = async (path, b) => { const r = await h.pmPost(path, b).catch(() => null); if (!r || r.ok !== true) { say((r && r.error) || 'Nothing was changed.'); return null; } return r; };
72
72
  const redraw = async () => { await h.reload(); if (body.isConnected) draw(body); };
73
73
  body.onclick = async (e) => {
74
74
  const b = e.target.closest('button'); if (!b || b.disabled) return;
75
75
  const d = b.dataset;
76
- if (d.utTab === 'work') { h.openWork(); return; }
77
76
  if (d.rvToday) { if (await post('/api/pm-items/flag', { id: d.rvToday, flagged: true })) { st.done[d.k] = 'today'; draw(body); } return; }
78
77
  if (d.rvKeep) { if (await post('/api/pm-items/keep', { id: d.rvKeep })) { st.done[d.k] = 'kept'; draw(body); } return; }
79
78
  if (d.rvDone) { if (await post('/api/pm-items/done', { id: d.rvDone })) { st.done[d.k] = 'done'; draw(body); } return; }
@@ -50,7 +50,10 @@ export function rowHtml(r, o) {
50
50
  /** An initiative row: the chevron opens what sits under it, the title opens the initiative. */
51
51
  function iniHtml(r, o) {
52
52
  const open = o.isOpen(r.id);
53
- const nest = open ? `<div class="hm-nest" role="group" aria-label="In ${esc(r.name)}">${r.kids.map((k) => rowHtml(k, { ...o, kid: true })).join('') || '<p class="hm-none">Nothing today.</p>'}</div>` : '';
53
+ const all = o.tasksOpen ? o.tasksOpen(r.id) : false, hid = r.kids.filter((k) => k.extra).length;
54
+ const kids = all ? r.kids : r.kids.filter((k) => !k.extra);
55
+ const more = hid ? `<button type="button" class="hm-more2" data-hm-tasks="${esc(r.id)}" aria-expanded="${all}">${all ? 'Show fewer tasks' : `Show ${hid} more ${hid === 1 ? 'task' : 'tasks'}`}</button>` : '';
56
+ const nest = open ? `<div class="hm-nest" role="group" aria-label="In ${esc(r.name)}">${kids.map((k) => rowHtml(k, { ...o, kid: true })).join('') || '<p class="hm-none">Nothing today.</p>'}${more}</div>` : '';
54
57
  return `<div class="hm-r lr ini st-${esc(r.state)}${o.sel === r.id ? ' sel' : ''}" data-id="${esc(r.id)}"><button type="button" class="hm-tg" data-hm-kids="${esc(r.id)}" aria-expanded="${open}" aria-label="${open ? 'Hide' : 'Show'} what is in ${esc(r.name)}">${svg(open ? P.chevD : P.chevR, 14)}</button>`
55
58
  + `<button type="button" class="hm-rm" data-hm-sel="${esc(r.id)}"><span class="hm-rt"><b>${esc(r.name)}</b><em class="q">${esc(r.hint)}</em></span><span class="hm-rr${r.turn ? '' : ' q'}">${esc(r.right)}</span></button></div>${nest}`;
56
59
  }
@@ -108,7 +111,7 @@ export function todayHtml(T, o) {
108
111
  const L = T.load || { segs: [] };
109
112
  const sub = L.n ? L.sub : o.sub;
110
113
  const bar = L.segs.length ? `<span class="hm-load" aria-hidden="true">${L.segs.map((s) => `<i class="${s.m ? 'm' : ''}${s.now ? ' n' : ''}" data-f="${Math.max(1, s.flex)}"></i>`).join('')}</span><span class="hm-lx" aria-hidden="true"><span>09</span><span>12</span><span>15</span><span>18</span></span>` : '';
111
- return `<button type="button" class="hm-tc day" data-hm-tc="cal" aria-label="${esc(o.greet)} ${esc(sub)}. Open the calendar"><b class="big">${esc(o.greet)}</b><span class="sub">${esc(sub)}</span>${bar}</button>`;
114
+ return `<button type="button" class="hm-tc day" data-hm-tc="cal" aria-label="${esc(o.greet)} ${esc(sub)}. ${o.phone ? 'Open your day' : 'Open the calendar'}"><b class="big">${esc(o.greet)}</b><span class="sub">${esc(sub)}</span>${bar}</button>`;
112
115
  }
113
116
 
114
117
  /* ── the whole column ── */
@@ -119,8 +122,9 @@ export function listHtml(M, T, o) {
119
122
  const head = `<div class="hm-hd"><h1>Today</h1>`
120
123
  + (many ? `<button type="button" class="cz-pick hm-pk" data-hm-pick aria-haspopup="menu" aria-expanded="false">${esc(picked ? picked.name : 'All products')} ${svg(P.chevD, 14)}</button><button type="button" class="ut-ib" data-hm-new aria-haspopup="menu" aria-label="New" title="New">${svg(P.plus, 16)}</button>`
121
124
  : `<button type="button" class="hm-new" data-hm-new aria-haspopup="menu">${svg(P.plus, 14)}New</button>`) + '</div>';
122
- const card = todayHtml(T, { greet: M.greet, sub: o.sub });
123
- const flt = `<div class="hm-flt" role="group" aria-label="Show">${M.filters.map((f, i) => `<button type="button" class="cz-chip${f.key === M.filter ? ' on' : ' gh'}${i > 1 ? ' dk' : ''}" data-hm-filter="${f.key}" aria-pressed="${f.key === M.filter}">${esc(f.label)}${f.n ? ' ' + f.n : ''}</button>`).join('')}</div>`;
125
+ const card = todayHtml(T, { greet: M.greet, sub: o.sub, phone: o.phone });
126
+ // Kept and Done, on a desktop only: a phone shows the list itself (testing fixes)
127
+ const flt = `<div class="hm-flt dk" role="group" aria-label="Show">${M.filters.map((f) => `<button type="button" class="cz-chip${f.key === M.filter ? ' on' : ' gh'}" data-hm-filter="${f.key}" aria-pressed="${f.key === M.filter}">${esc(f.label)}${f.n ? ' ' + f.n : ''}</button>`).join('')}</div>`;
124
128
  if (!o.ready) return head + card + '<p class="hm-none" role="status">Reading your work.</p>';
125
129
  const errLine = `<p class="hm-none" role="status">Home could not read the repository: ${esc(o.err)}.</p>`;
126
130
  if (o.err && !M.groups.some((g) => (g.kind === 'product' && g.count) || (g.rows && g.rows.length))) return head + card + errLine;
@@ -134,11 +138,10 @@ export function listHtml(M, T, o) {
134
138
  if (R && R.open) body += `<section class="hm-pg" aria-label="This week"><div class="hm-ghd">This week<span class="n">Fri</span></div><div class="hm-r lr${o.sel === 'review' ? ' sel' : ''}" data-id="review"><button type="button" class="hm-rm" data-hm-review><span class="hm-tile wk">${svg(P.check, 16)}</span><span class="hm-rt"><b>Weekly review</b><em>${R.started ? 'Step ' + (R.at + 1) + ' of 4' : 'Four short steps'}</em></span></button></div></section>`;
135
139
  body += M.groups.map((g) => (g.kind === 'product' ? productHtml(g, o) : looseHtml(g, o))).join('');
136
140
  if (!M.groups.some((g) => (g.kind === 'product' && (g.count || g.flat.length)) || (g.rows && g.rows.length))) body += '<p class="hm-none">Nothing is open. A new initiative or a task you add shows here.</p>';
137
- body += `<form class="hm-cap" id="hmCapF"><label class="vh" for="hmCap">Add a task</label><input id="hmCap" autocomplete="off" maxlength="250" placeholder="Add a task. PMOS files it under its initiative">`
141
+ // the capture box shows only after New → A task → Not in an initiative (o.cap); an initiative's task is added in its Tasks view
142
+ if (o.cap) body += `<form class="hm-cap" id="hmCapF"><label class="vh" for="hmCap">Add a task to your own list</label><input id="hmCap" autocomplete="off" maxlength="250" placeholder="A task for your own list. Esc to cancel">`
138
143
  + (o.mic ? `<button type="button" class="ut-ib" data-hm-capmic aria-label="Say it instead" title="Say it instead">${svg(P.mic, 16)}</button>` : '') + '</form>';
139
144
  if (M.untouched.n) body += `<button type="button" class="hm-un" data-hm-review><b>Untouched 14+ days · ${M.untouched.n}</b><span>Weekly review ${esc(M.untouched.day)}</span></button>`;
140
145
  }
141
- const waiting = (M.filters.find((f) => f.key === 'waiting') || {}).n || 0;
142
- const all = `<div class="hm-r lr hm-all"><button type="button" class="hm-rm" data-hm-work><span class="hm-tile wk">${svg(P.list, 16)}</span><span class="hm-rt"><b>All of my work</b><em class="q">${esc([waiting + ' waiting', M.untouched.n + ' untouched'].join(' · '))}</em></span>${svg(P.chevR, 16)}</button></div>`;
143
- return head + card + flt + body + all;
146
+ return head + card + flt + body;
144
147
  }
@@ -1,4 +1,5 @@
1
- /* pm/home-work.js — My work in the Home Viewer (initiative premium-uncovered-features, H1; canvas HmMyWork; the depth of premium-work-depth).
1
+ /* pm/home-work.js — My work in the Home Viewer. Since the testing fixes it opens only alone (solo): an item's card from a row of Home's list
2
+ * (openWorkItem). Home has no Focus chip since the testing fixes, so Focus and jobs is not reachable from Home either; Home's list is the list, so the tabbed page is not reachable from Home. (initiative premium-uncovered-features, H1; canvas HmMyWork; the depth of premium-work-depth).
2
3
  * There is no separate list on Home: a task sits under its initiative, and the PM's own notes sit under "Not in an initiative". This card is
3
4
  * the depth behind those rows. It reads GET /api/my-work-premium (lib/my-work-premium.js builds the model) and keeps every feature of the
4
5
  * old My work page usable:
@@ -11,7 +12,7 @@
11
12
  * Every press is the PM's and goes to the Work page's own route under /api/pm-items, /api/pm-jobs or /api/my-work (pmPost carries the launch
12
13
  * nonce); this file adds no writer. A refused press shows the route's reason and changes nothing. Text from the list goes through esc(). */
13
14
  import { pmGet, pmPost } from './http.js';
14
- import { open as vwOpen } from './cozy-viewer.js';
15
+ import { open as vwOpen, close as vwClose } from './cozy-viewer.js';
15
16
  import { mdRender } from './markdown.js';
16
17
  import { tabsHtml } from './home-review.js';
17
18
 
@@ -54,7 +55,8 @@ const freshUi = () => ({ xp: null, ed: null, dd: '', sn: '', ask: null, body: nu
54
55
  /** Open My work in the Viewer on one tab (yours | waiting | review | stale). */
55
56
  export function openMyWork(tab = 'yours', o = {}) {
56
57
  if (tab === 'review' && askReview()) return null;
57
- const W = { r: null, M: null, tab: TABS.some((t) => t[0] === tab) || tab === 'review' ? tab : 'yours', msg: '', view: null, key: null, ui: freshUi(), refocus: null, want: o.item || null };
58
+ const W = { solo: !!o.solo, home: o.view || null, r: null, M: null, tab: TABS.some((t) => t[0] === tab) || tab === 'review' ? tab : 'yours', msg: '', view: null, key: null, ui: freshUi(), refocus: null, want: o.item || null };
59
+ if (W.home) W.view = W.home;
58
60
  let body = null;
59
61
  const rowOf = (key) => ((W.M && W.M.rows) || []).find((r) => r.key === key) || null;
60
62
  const openR = () => (W.view === 'item' ? rowOf(W.key) : null);
@@ -250,7 +252,7 @@ export function openMyWork(tab = 'yours', o = {}) {
250
252
  }
251
253
  function itemHtml(r) {
252
254
  const src = !!r.dialog.source;
253
- return `<div class="mw-sub mw-it ut-vc" data-esc-layer><div><button type="button" class="ut-btn sm ghost" data-mw="back">${BACK}Back to My work</button></div>`
255
+ return `<div class="mw-sub mw-it ut-vc" data-esc-layer><div>${backBtn()}</div>`
254
256
  + `<div class="ut-vh"><button type="button" class="hm-ck" data-p="done" aria-label="Mark ${esc(r.title)} done"><span class="ut-chk"></span></button><div><h2 class="ut-h2 mw-t">${esc(r.title)}</h2>${r.sub ? `<p class="ut-sub">${esc(r.sub)}</p>` : ''}</div>`
255
257
  + `<button type="button" class="ut-ib" data-p="sheet" aria-label="More for this item" title="When, who and priority">${DOTS}</button></div>`
256
258
  + `${r.dialog.say ? `<p class="mw-say">${esc(r.dialog.say)}</p>` : ''}<div id="card">${cardInner(r)}</div><div id="agCard">${agCardInner(r)}</div>`
@@ -274,7 +276,7 @@ export function openMyWork(tab = 'yours', o = {}) {
274
276
  const rows = F.accepted.map((f) => card(f, 'acc')).concat(F.suggestions.map((f) => card(f, 'sug')), F.dismissed.map((k) => card({ key: k, title: titleOfKey(k), why: '', item_ids: [] }, 'no')));
275
277
  const jobs = (W.M.jobs || []).map((j) => `<div class="mw-fc"><b>${esc(j.name)}</b><p class="hx-n">When ${esc(j.when)}, I want ${esc(j.want)}, so ${esc(j.so)}.</p><p class="hx-n">${j.open} open ${j.open === 1 ? 'item' : 'items'}</p></div>`).join('');
276
278
  const okLine = /when .+,\s*i want .+,\s*so .+/i.test(W.ui.job || '');
277
- return `<div class="mw-sub mw-fj" data-esc-layer><div class="hx-top"><button type="button" class="ut-btn sm ghost" data-mw="back">${BACK}Back to My work</button></div>`
279
+ return `<div class="mw-sub mw-fj" data-esc-layer><div class="hx-top">${backBtn()}</div>`
278
280
  + '<p class="hx-n">PMOS suggests at most three, from your Today list: overdue first, then due today. Rules only, no model call.</p>'
279
281
  + (rows.join('') || '<p class="hx-n">Nothing is in Today, so there is nothing to suggest.</p>')
280
282
  + `<h4>Your jobs</h4>${jobs || '<p class="hx-n">You have no jobs yet. A job is something that matters to you, which items can serve.</p>'}`
@@ -290,6 +292,7 @@ export function openMyWork(tab = 'yours', o = {}) {
290
292
  else if (!W.M) body.innerHTML = `<p class="hx-n">My work could not be read${W.r.error ? ': ' + esc(W.r.error) : ''}.</p>`;
291
293
  else if (W.view === 'item' && openR()) { body.innerHTML = itemHtml(openR()); setTitle(openR().title); }
292
294
  else if (W.view === 'fjobs') { body.innerHTML = focusHtml(); setTitle('Focus and jobs'); }
295
+ else if (W.solo) { vwClose(); return; } // opened alone from Home (an item, or Focus and jobs): there is no list behind it
293
296
  else {
294
297
  W.view = null; setTitle('My work');
295
298
  const n = (k) => (k === 'waiting' ? W.M.waiting.rows.length : k === 'stale' ? (W.M.review && W.M.review.n) || 0 : 0);
@@ -314,7 +317,9 @@ export function openMyWork(tab = 'yours', o = {}) {
314
317
  draw();
315
318
  }
316
319
  function openItem(key) { if (!rowOf(key)) return; W.view = 'item'; W.key = key; W.ui = freshUi(); draw('[data-mw="back"]'); }
317
- function back() { const k = W.key; W.view = null; W.ui = freshUi(); W.refocus = k ? { key: k, i: 0 } : null; draw(); }
320
+ // the way back: to My work's list, or (opened alone) to Focus when an item was opened from it; none when the Viewer's own close is the way out
321
+ const backBtn = () => (W.solo && !(W.home && W.view !== W.home) ? '' : `<button type="button" class="ut-btn sm ghost" data-mw="back">${BACK}${W.solo ? 'Back to Focus' : 'Back to My work'}</button>`);
322
+ function back() { if (W.solo) { if (W.home && W.view !== W.home) { W.view = W.home; W.ui = freshUi(); draw(); } else vwClose(); return; } const k = W.key; W.view = null; W.ui = freshUi(); W.refocus = k ? { key: k, i: 0 } : null; draw(); }
318
323
 
319
324
  /* ── presses ── */
320
325
  async function commit(o) {
@@ -522,7 +527,7 @@ export function openMyWork(tab = 'yours', o = {}) {
522
527
  back();
523
528
  }
524
529
 
525
- body = vwOpen({ id: 'more:work', kind: 'My work', title: 'My work', icon: 'list', render: (b) => { b.classList.add('hx'); }, onClose: () => { removeEventListener('keydown', onEsc, true); clearInterval(timer); } });
530
+ body = vwOpen({ id: 'more:work', kind: W.solo ? (W.home === 'fjobs' ? 'Focus' : 'Task') : 'My work', title: W.solo ? (W.home === 'fjobs' ? 'Focus and jobs' : 'Task') : 'My work', icon: 'list', render: (b) => { b.classList.add('hx'); }, onClose: () => { removeEventListener('keydown', onEsc, true); clearInterval(timer); } });
526
531
  // delegated, as the other Home cards do: every control in the card is a real <button>; the drag repeats what the arrow keys do
527
532
  body.onclick = onClick;
528
533
  body.oninput = onInput;
@@ -537,7 +542,7 @@ export function openMyWork(tab = 'yours', o = {}) {
537
542
  }
538
543
 
539
544
  /** Open one of the PM's own items (a note, a mention made into a task) as its card, from a row of Home's list: key "work:<id>". */
540
- export function openWorkItem(key) { return openMyWork('yours', { item: key }); }
545
+ export function openWorkItem(key) { return openMyWork('yours', { item: key, solo: true }); }
541
546
  /* The weekly review lives on Home (home-review.js needs Home's data): Home answers the hm:review event. Elsewhere the old summary shows. */
542
547
  function askReview() {
543
548
  if (typeof CustomEvent !== 'function') return false;
@@ -226,8 +226,7 @@ export const viewReady = () => { view(); return !!V; };
226
226
 
227
227
  /** Show a note in the Notes place: the list by initiative, with this note open. */
228
228
  export async function openDock(id) {
229
- const r = await import('./registry.js');
230
- r.openDestination('notes', { slug: id });
229
+ window.dispatchEvent(new CustomEvent('pm-open-note', { detail: { id } })); // the page that holds the notes opens it, if it listens
231
230
  }
232
231
  /** A note was deleted: the Record control lets go of it. */
233
232
  export function forget(id) {
@@ -102,8 +102,7 @@ export const upcomingWithoutNote = (evs) => (evs || []).filter((e) => notesFor(e
102
102
 
103
103
  /** Open a note in the Notes place (meeting-notes Run 12): the list by initiative, with this note open. */
104
104
  export async function openNote(id) {
105
- const r = await import('./registry.js');
106
- r.openDestination('notes', { slug: id });
105
+ window.dispatchEvent(new CustomEvent('pm-open-note', { detail: { id } })); // the page that holds the notes opens it, if it listens
107
106
  }
108
107
  const dayOf = (iso) => { try { return new Date(iso).toLocaleDateString([], { weekday: 'short', day: 'numeric', month: 'short' }); } catch { return ''; } };
109
108
  const clock = (iso) => { try { return new Date(iso).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' }); } catch { return ''; } };
@@ -1,7 +1,7 @@
1
1
  /* pm/notes-task.js — Make task: a meeting note's next step as a plan item of the note's initiative (meeting-notes Run 12,
2
2
  * mockup board 3 "Next step to task in one click").
3
3
  *
4
- * makeTask(note, { text, owner?, due? }, { repo?, btn? }) → Promise<item id | null>
4
+ * makeTask(note, { text, owner?, due? }, { btn? }) → Promise<item id | null> (the workspace is the initiative's or the note's)
5
5
  *
6
6
  * One press, no form: the item goes into the initiative's first stage through the Breakdown's own writer (POST
7
7
  * /api/plan-items, as the PM), with the owner when the line names one and the due day when it is a date. A toast says
@@ -9,15 +9,14 @@
9
9
  */
10
10
  import { toast, SEL } from './primitives.js';
11
11
  import { pmGet, pmPost } from './http.js';
12
- import { wsOf } from './data.js';
13
12
 
14
13
  const DATE_RE = /^\d{4}-\d{2}-\d{2}$/;
15
14
  const iniName = (i) => (i ? i.title || i.id : null);
16
15
  const label = (btn, text, done) => { if (!btn) return; const l = btn.querySelector(SEL.btnLabel); if (l) l.textContent = text; btn.disabled = !!done; };
17
16
 
18
- export async function makeTask(n, x, { repo, btn } = {}) {
17
+ export async function makeTask(n, x, { btn } = {}) {
19
18
  const ini = n.initiative;
20
- const ws = ini && (ini.ws || n.ws || (repo ? wsOf(repo) : null));
19
+ const ws = ini && (ini.ws || n.ws || null);
21
20
  if (!ini || !ini.id || !ws) { toast({ text: 'Link the note to an initiative first. Make task adds the step to its breakdown.' }); return null; }
22
21
  if (btn) btn.disabled = true;
23
22
  const lay = await pmGet('/api/plan-items?ladder=0&ws=' + encodeURIComponent(ws) + '&id=' + encodeURIComponent(ini.id));
@@ -95,7 +95,7 @@ function drawChips() {
95
95
  const sprint = [sp ? sp.name : null, rel ? rel.name + ' ships ' + rel.at.replace(/^(\d+) (\w+)$/, '$2 $1') : null].filter(Boolean).join(' · ') || 'No sprint on record';
96
96
  const asks = C.asks == null ? 'New asks · not read' : null;
97
97
  const flt = (keys) => CHIP_F.filter(([k]) => keys.includes(k)).map(([k, tone, mo, word]) => (C[k] ? `<button type="button" class="bd-chip gh${F.chips.has(k) ? ' on' : ''}" data-f="${k}" aria-pressed="${F.chips.has(k)}"><i class="cz-dot ${tone} ${mo}"></i>${esc(word(C[k]))}</button>` : '')).join('');
98
- const thisSprint = sp && (view === 'track' || phone) ? `<button type="button" class="bd-chip${F.chips.has('sprint') ? ' on' : ''}" data-f="sprint" aria-pressed="${F.chips.has('sprint')}">This sprint</button>` : '';
98
+ const thisSprint = sp && (view === 'track' || phone) ? `<button type="button" class="bd-chip${F.chips.has('sprint') ? ' on' : ''}" data-f="sprint" aria-pressed="${F.chips.has('sprint')}" title="${F.chips.has('sprint') ? 'Shows only the initiatives with work in ' + esc(sp.name) + '. Press to show all.' : 'Press to show only the initiatives with work in ' + esc(sp.name) + '.'}">${esc(sp.name)} only</button>` : ''; // it named no sprint and read like a heading (testing fixes)
99
99
  if (longSpan()) {
100
100
  const gn = (GROUPS.find(([k]) => k === group) || GROUPS[0])[1];
101
101
  $('#bdChipset').innerHTML = `<span class="bd-grpw"><button type="button" class="bd-chip" id="chGroup" aria-haspopup="menu" aria-expanded="false">${SV(I.group)}<span>Group:</span><b>${esc(gn)}</b></button><span class="bd-grpm" id="grpMenu" role="menu" hidden>${GROUPS.map(([k, n]) => `<button type="button" role="menuitemradio" aria-checked="${k === group}" data-grp="${k}">${esc(n)}</button>`).join('')}</span></span><span class="bd-sp"></span>${flt(['late', 'risk', 'blocked'])}`;
@@ -36,8 +36,8 @@ const PAYOFF = {
36
36
  evaluate: 'You decide to keep it, iterate on it or stop it.',
37
37
  };
38
38
  const YOU_STEPS = /^(contract|review|accept|commit|signoff|sign-off)$/;
39
- const STEP_SAY = { spec: 'PRD and rubric written', contract: 'Your go on the done criteria', review: 'Review of the findings', accept: 'Your sign-off', route: 'Lane chosen', commit: 'Your Commit' };
40
- const CTA_SAY = { contract: 'Review the done criteria', review: 'Review the findings', accept: 'Give your sign-off', spec: 'Ask about the PRD', commit: 'Review the Commit' };
39
+ const STEP_SAY = { spec: 'PRD and rubric written', contract: 'Your go on the done criteria', review: 'The Review Gate failed: weigh its findings', accept: 'Your sign-off', route: 'Lane chosen', commit: 'Your Commit' };
40
+ const CTA_SAY = { contract: 'Review the done criteria', review: 'Open the findings', accept: 'Give your sign-off', spec: 'Ask about the PRD', commit: 'Review the Commit' };
41
41
  const esc = (s) => String(s == null ? '' : s).replace(/[&<>"]/g, (c) => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;' }[c]));
42
42
  const cap1 = (s) => (s ? String(s).charAt(0).toUpperCase() + String(s).slice(1) : '');
43
43
  const MON = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
@@ -107,7 +107,7 @@ export function headModel(M, now = Date.now()) {
107
107
  checkTitle: next ? 'To reach ' + next.label : cur ? 'To finish ' + cur.label : 'What is next',
108
108
  done, rest, doneOf: done.length + ' of ' + items.length + ' done',
109
109
  foldSum: done.length + ' of ' + items.length + ' done · ' + ([rest.filter((x) => x.kind === 'you').length ? rest.filter((x) => x.kind === 'you').length + ' for you' : '', rest.filter((x) => x.kind === 'risk').length ? rest.filter((x) => x.kind === 'risk').length + ' blocked' : '', rest.filter((x) => x.kind === 'jira').length ? 'in Jira' : ''].filter(Boolean).join(', ') || (turn === 'agents' ? 'agents on it' : 'nothing waiting')),
110
- payoff: cur ? PAYOFF[cur.key] + anchor : '', time, over, cta, ask, primary: turn !== 'agents',
110
+ payoff: cur ? PAYOFF[cur.key] + anchor : '', time, over, cta, ask, primary: turn !== 'agents', step: turn === 'you' ? step : '',
111
111
  };
112
112
  }
113
113
 
@@ -153,8 +153,8 @@
153
153
  .vwxmn .vwmut{padding:6px 8px 4px}
154
154
  @media (max-width:640px){.vwxmn{right:auto;left:0;min-width:240px}.vwxmn a{min-height:44px}}
155
155
  /* Health, Links and Copies: three chips under the bar, each opening its panel */
156
- .vwmore{display:flex;gap:6px;flex-wrap:wrap;margin:-4px 0 12px}
157
- .vwchip{min-height:30px;padding:0 11px;border-radius:6px;border:1px solid var(--hair);background:var(--card-solid);color:var(--ink-2);font:500 var(--fs-2) var(--sans);display:inline-flex;align-items:center;gap:6px;cursor:pointer}
156
+ .vwmore{display:inline-flex;gap:2px;flex-wrap:wrap;margin:0}
157
+ .vwchip{min-height:30px;padding:0 8px;border-radius:999px;border:0;background:transparent;color:var(--ink-2);font:500 var(--fs-2) var(--sans);display:inline-flex;align-items:center;gap:6px;cursor:pointer}
158
158
  .vwchip em{font-style:normal;font-family:var(--mono);color:var(--ink-3)}
159
159
  .vwchip.ok em{color:var(--ok)}.vwchip.warn em{color:var(--ember-ink)}
160
160
  .vwchip[aria-expanded="true"]{background:var(--well);color:var(--ink)}
@@ -233,3 +233,21 @@ iframe.vwprint{position:fixed;right:0;bottom:0;width:1px;height:1px;border:0;opa
233
233
  .vwprop{display:grid;gap:4px;padding:10px 12px;border:1px solid var(--hair);border-radius:8px;background:var(--card-solid)}
234
234
  .vwprop>p{margin:0}
235
235
  .vwside .evl{display:grid;gap:4px}
236
+
237
+ /* testing fixes: one quiet toolbar row; on a phone the three modes are icons (their names stay as labels for a screen reader) */
238
+ @media (max-width:640px){
239
+ .vwdt{gap:4px}
240
+ .vwseg{padding:0 12px;min-width:44px;justify-content:center}
241
+ .vwseg .vwsl{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
242
+ .vwchip{min-height:44px;padding:0 8px}
243
+ }
244
+ /* the contents under the page's header */
245
+ .vwtoc{margin:0 0 14px;padding:8px 12px;border-radius:10px;background:var(--well)}
246
+ .vwtoc summary{cursor:pointer;font:600 var(--fs-2) var(--sans);color:var(--ink-2);list-style:none;min-height:28px;display:flex;align-items:center;gap:6px}
247
+ .vwtoc summary::-webkit-details-marker{display:none}
248
+ .vwtoc summary em{font-style:normal;color:var(--ink-3);font-weight:500}
249
+ .vwtoc ol{margin:4px 0 2px;padding:0;list-style:none;display:grid;gap:2px}
250
+ .vwtoc li.sub{padding-left:14px}
251
+ .vwtoc a{display:block;padding:4px 0;color:var(--ink);text-decoration:none;font:400 var(--fs-2) var(--sans)}
252
+ .vwtoc a:hover{color:var(--blue-ink, var(--ink))}
253
+ @media (max-width:640px){.vwtoc a{padding:8px 0}}
@@ -126,13 +126,14 @@ function makePage(d, ctx) {
126
126
  else { const x = (j.docs || []).find((r) => r.path === d.path); P.copies = x ? x.links || [] : []; P.checkRun = j.session || j.open || null; }
127
127
  draw();
128
128
  }
129
- function moreBar() {
129
+ function moreBar(o = {}) {
130
130
  const hc = P.health && !P.health.err && P.health.total ? `${P.health.passed} of ${P.health.total}` : '';
131
131
  const R = P.lib && !P.lib.err ? relationsOf(P.lib, d.path, d.iniName) : null;
132
132
  const cps = (P.copies || []).map(copyView);
133
133
  const b = (k, label, n, tone) => `<button type="button" class="vwchip${tone ? ' ' + tone : ''}" data-vd="more:${k}" aria-expanded="${P.more === k}">${label}${n ? ` <em>${esc(n)}</em>` : ''}</button>`;
134
- return `<div class="vwmore" role="group" aria-label="About this document">${b('health', 'Health', hc, hc ? (P.health.passed === P.health.total ? 'ok' : 'warn') : '')}${b('links', 'Links', R ? String(R.count) : '')}${b('copies', 'Copies', P.copies ? String(cps.length) : '', cps.some((c) => c.tone === 'warn') ? 'warn' : '')}</div>`
135
- + (P.more ? `<div class="vwmp" role="region" aria-label="${esc({ health: 'Health', links: 'Links', copies: 'Copies' }[P.more])}">${P.more === 'health' ? healthHtml() : P.more === 'links' ? linksHtml(R) : copiesHtml(cps)}</div>` : '');
134
+ // the three chips sit at the end of the one toolbar row (testing fixes: one row, not a bar and a second row of pills); their panel opens under it
135
+ if (o.chips) return `<span class="vwmore" role="group" aria-label="About this document">${b('health', 'Health', hc, hc ? (P.health.passed === P.health.total ? 'ok' : 'warn') : '')}${b('links', 'Links', R ? String(R.count) : '')}${b('copies', 'Copies', P.copies ? String(cps.length) : '', cps.some((c) => c.tone === 'warn') ? 'warn' : '')}</span>`;
136
+ return (P.more ? `<div class="vwmp" role="region" aria-label="${esc({ health: 'Health', links: 'Links', copies: 'Copies' }[P.more])}">${P.more === 'health' ? healthHtml() : P.more === 'links' ? linksHtml(R) : copiesHtml(cps)}</div>` : '');
136
137
  }
137
138
  function healthHtml() {
138
139
  const h = P.health;
@@ -199,12 +200,11 @@ function makePage(d, ctx) {
199
200
  }
200
201
  function toolsHtml(p) {
201
202
  const lock = p ? ' disabled title="Keep or undo the agent\'s edit first"' : '';
202
- const seg = (m, label, icon) => `<button type="button" class="vwseg" data-vd="mode:${m}" aria-pressed="${P.mode === m}"${m !== 'read' ? lock : ''}>${IC[icon]}${label}</button>`;
203
+ const seg = (m, label, icon) => `<button type="button" class="vwseg" data-vd="mode:${m}" aria-pressed="${P.mode === m}"${m !== 'read' ? lock : ''}>${IC[icon]}<span class="vwsl">${label}</span></button>`;
203
204
  if (ctx.host) return `<div class="vwdt" role="toolbar" aria-label="Document"><span class="vwsg">${seg('edit', 'Edit', 'pen')}${seg('md', 'Markdown', 'md')}</span></div>`;
204
205
  return `<div class="vwdt" role="toolbar" aria-label="Document"><span class="vwsg">${seg('read', 'Page', 'doc')}${seg('edit', 'Edit', 'pen')}${seg('md', 'Markdown', 'md')}</span><span class="gap"></span>`
205
- + (P.mode === 'read' ? extrasHtml() : '')
206
- + (P.mode === 'read' && !p ? `<button type="button" class="vwbtn" data-vd="askt" aria-expanded="${P.askOpen}">${AI}Ask the agent</button>` : '') + '</div>'
207
- + (P.mode === 'read' && P.askOpen && !p ? `<div class="vwask"><textarea id="vwAsk" rows="2" placeholder="Tell the agent what to change, for example: tighten the Goal section" aria-label="Tell the agent what to change">${esc(P.askText)}</textarea><div class="vwrow"><span class="vwmut">The agent edits the page; nothing is kept until you press Keep.</span><button type="button" class="vwbtn pri" data-vd="ask"${P.busy || (P.ask && P.ask.state === 'working') ? ' disabled' : ''}>Ask</button></div></div>` : '')
206
+ + (P.mode === 'read' ? extrasHtml() + moreBar({ chips: true }) : '') + '</div>'
207
+ // no "Ask the agent" here (testing fixes): the chat beside the page asks for a change, and its edit still shows here with Keep and Undo
208
208
  + (P.ask && P.ask.state !== 'proposed' ? `<p class="vwmut vwline" role="status">${esc(askLine(P.ask))}</p>` : '');
209
209
  }
210
210
  /** The opener's own buttons on the read bar, such as a report's Present, Print and Download (ctx.extras). A button with a menu lists links or presses. */
@@ -265,11 +265,26 @@ function makePage(d, ctx) {
265
265
  + `<footer class="cff"><span>${v() ? 'v' + v() + (p ? ' · edited by the agent, not kept yet' : '') : ''}</span><span class="gap"></span><code>${esc(d.path)}</code></footer></article>`
266
266
  + (P.mode === 'edit' ? saveRow() : '') + (P.mode === 'read' ? sideHtml() : '');
267
267
  }
268
+ /* the contents: the page's section headings, as links under the header (testing fixes: a long PRD had no table of contents).
269
+ * Open on a desk, folded on a phone. Shown only when the page has 3 or more headings. */
270
+ function tocOf() {
271
+ const art = el.querySelector('.cf'), body = art && art.querySelector('.cfb'), head = art && art.querySelector('.cfh');
272
+ if (!body || !head) return;
273
+ const hs = [...body.querySelectorAll('h2, h3')].filter((h) => h.textContent.trim());
274
+ if (hs.length < 3) return;
275
+ hs.forEach((h, i) => { if (!h.id) h.id = 'vwh-' + i; });
276
+ const nav = document.createElement('details');
277
+ nav.className = 'vwtoc'; nav.open = !(typeof matchMedia === 'function' && matchMedia('(max-width:640px)').matches);
278
+ nav.innerHTML = `<summary>Contents <em>${hs.length}</em></summary><ol>${hs.map((h) => `<li class="${h.tagName === 'H3' ? 'sub' : ''}"><a href="#${esc(h.id)}" data-vtoc="${esc(h.id)}">${esc(h.textContent.trim())}</a></li>`).join('')}</ol>`;
279
+ nav.onclick = (e) => { const a = e.target.closest('[data-vtoc]'); if (!a) return; e.preventDefault(); const t = el.querySelector('#' + CSS.escape(a.dataset.vtoc)); if (t) t.scrollIntoView({ block: 'start', behavior: 'smooth' }); };
280
+ head.after(nav);
281
+ }
268
282
  function draw() {
269
283
  if (!el || !el.isConnected) return;
270
284
  const keepScroll = el.scrollTop;
271
285
  el.innerHTML = `<div class="vwdoc">${pageHtml()}</div>`;
272
286
  el.scrollTop = keepScroll;
287
+ if (P.mode === 'read') tocOf();
273
288
  if (P.mode === 'edit') startEdit();
274
289
  }
275
290
 
@@ -23,3 +23,9 @@
23
23
  .vwi .vwi-go,.vwi .vwi-p a{color:var(--ink);font-weight:500;text-decoration:underline;text-underline-offset:3px;display:inline-flex;align-items:center;min-height:44px}
24
24
  .vwi-open{margin:14px 0 0}
25
25
  .vwi-open .dmcta{min-height:44px}
26
+ /* in the cozy Viewer (Home), where premium.css is not loaded: the facts are a two-column list, and the card keeps its gutter (testing fixes) */
27
+ .vwi .kv2{display:grid;grid-template-columns:minmax(96px,auto) minmax(0,1fr);gap:8px 18px;font-size:var(--fs-3);margin:6px 0}
28
+ .vwi .kv2 span:nth-child(odd){color:var(--ink-3)}
29
+ .vwi .kv2 span:nth-child(even){color:var(--ink);font-weight:500;line-height:1.5;overflow-wrap:anywhere}
30
+ .cz-vw-body>.vwi{padding:16px 20px 24px}
31
+ .cz-vw-body>.vwi>.vwi-head{display:none} /* the Viewer header already names it */
@@ -1493,8 +1493,8 @@ async function initiativeSheet(ctx, n) {
1493
1493
  await load();
1494
1494
  }
1495
1495
  async function openInitiativeOf(ctx, ini) {
1496
- const reg = await import('./registry.js');
1497
- reg.openInitiative(ini.repo || (ctx.state && ctx.state.product) || ctx.repo || null, ini.id);
1496
+ // The page that holds the note opens the initiative, if it listens (the old console's registry is gone: workspace-legacy-cleanup).
1497
+ window.dispatchEvent(new CustomEvent('pm-open-initiative', { detail: { repo: ini.repo || (ctx.state && ctx.state.product) || ctx.repo || null, id: ini.id } }));
1498
1498
  }
1499
1499
  function listening(n) {
1500
1500
  if (audio && audio.id === n.id) return { kind: 'local', state: audio.state, sources: audio.sources, started: audio.started };