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
@@ -105,9 +105,6 @@ const GROUPS = {
105
105
  // Suites that run elsewhere on purpose, so --check does not count them as unwired.
106
106
  const ELSEWHERE = {
107
107
  'offline-tarball.test.js': 'npm run test:offline (needs a packed tarball)',
108
- // A helper module, not a suite: the Breakdown suites require it (pm-os-absorb Run 1). Its name keeps it out of the
109
- // tarball (BUNDLE_EXCLUDES has 'pm-*-test.js'), which is why it ends in -test.js.
110
- 'pm-breakdown-stub-test.js': 'not a suite — the helpers pm-breakdown-test.js, pm-breakdown-phone-test.js and first-paint-count.test.js require',
111
108
  };
112
109
  for (const [f, h] of Object.entries(fragHelpers)) {
113
110
  if (ELSEWHERE[f]) fragProblems.push(`${h.where}: helper ${f} is already exempt in run-tests.js`);
@@ -144,20 +141,315 @@ function shardOf(list, spec) {
144
141
 
145
142
  // Files every page or every suite loads. A change to one can break any suite, so --changed runs
146
143
  // the whole group. A changed file no suite can be traced to is treated the same way (see below).
144
+ // server.js is not on the list: traceChanges() reads which part of it changed (see there).
147
145
  const WIDE = new Set([
148
- 'server.js', 'test-run.js', 'run-tests.js', 'test-files.json', 'package.json', 'package-lock.json',
146
+ 'test-run.js', 'run-tests.js', 'test-files.json', 'package.json', 'package-lock.json',
149
147
  'public/pm/app.js', 'public/pm/state.js', 'public/pm/dom.js', 'public/pm/data.js',
150
148
  'public/pm/tokens.css', 'public/pm/fixture.js', 'public/pm/mobile.css', 'lib/find-browser.js',
151
149
  ]);
152
150
 
153
- /* The suites in `list` that the diff against `ref` can reach. A suite is selected when its own file
154
- * changed, when its source names a changed file (`panel-tabs` in pm-tabs-test.js), or when its file
155
- * name carries the changed file's stem with any panel-/view-/tab- prefix removed (view-memory.js ->
156
- * pm-r29-memory-test.js). It errs toward running MORE: a WIDE file, or a changed workspace file that
157
- * no suite can be traced to, selects the whole list. Returns { files, suites, why }. */
151
+ /* Tracing a change to the suites it can reach (workspace-legacy-cleanup, step 1).
152
+ *
153
+ * Before this, a change to server.js (then on the WIDE list) or to a lib/ file that no suite names ran every suite: 57 of
154
+ * the 60 workspace commits before 2026-10-23 ran the whole browser group. traceChanges() follows a change along the edges
155
+ * a suite depends on, and falls back to every suite wherever it cannot tell. The rule, by kind of file:
156
+ *
157
+ * - A suite: that suite. A WIDE file: every suite. Prose (guide/, docs/, *.md) and test-timings.json: nothing.
158
+ * - public/, and a lib/ file the server hands to the browser as /lib/<name>.js: the pages that load the file, read from
159
+ * the import graph of each public/*.html (static and dynamic imports and every '/pm/…' or './…' string, comments
160
+ * removed, so it reads MORE edges than the browser follows, never fewer), then every browser suite that opens one of
161
+ * those pages. A browser suite whose page the tracer cannot name (a bare '/', a path built from a variable, a redirect
162
+ * stub with no script) counts as opening every page. A file that no page loads by a path the graph can read may be
163
+ * loaded by a path built at run time, so it reaches every browser suite. Also, as before, every suite whose source
164
+ * names the file's stem.
165
+ * - server.js: the changed lines (git diff -U0). A comment or blank line reaches nothing. A line inside one route block
166
+ * of handleRequest (an `if (p === '/api/…')` statement up to the next statement at its indent) reaches that route. A
167
+ * line inside a top-level function reaches whatever uses that function, followed by name to the route blocks and the
168
+ * functions that use it. Anything else (top-level setup, middleware between route blocks, a page route, a name used
169
+ * outside any function or route block) reaches every suite.
170
+ * - lib/routes-<x>.js (a route module that lib/route-modules.js loads): every '/api/…' route the file names.
171
+ * - Any other file: the files that name it (a require, an import or a path string), followed the same way: server.js
172
+ * through the names it binds the module to, a lib/ file through its own users, a suite directly. A lib/ file that no
173
+ * file names reaches every suite.
174
+ * - A route reaches each suite whose source names it and each public file that names it (then as public/ above). Its
175
+ * parent path counts too ('/api/plan-items/handoff/' for '/api/plan-items/handoff/go'), so a client that builds the
176
+ * last part of the path is still found. A route that nothing names reaches every suite.
177
+ *
178
+ * It errs toward MORE at every step. What it cannot see is a path built from parts, or a require through a variable: a
179
+ * workflow_dispatch run, or the self-hosted runner, still runs every suite. Measured on the 60 workspace commits before
180
+ * 2026-10-23 (browser group): the old rule ran every browser suite for 57, this one for 35. Most of the rest touch code
181
+ * that every server runs at boot or on a timer (session restore, the background ticks), and that rightly reaches every
182
+ * suite. run-tests-trace.test.js holds the rule to these cases. Returns { suites, why }. */
183
+ /* The source with its comments removed and every line kept in place. A scanner, not a regex: '/api/*' in a string, or
184
+ * '//' in a regex, would make a regex eat code, and code read as a comment is a change the tracer would skip. A '/' starts
185
+ * a regex literal after an operator, an opening bracket, a keyword or the start of the file; anywhere else it divides. */
186
+ function strip(src) {
187
+ const s = String(src); let out = ''; let i = 0; const n = s.length;
188
+ const tpl = []; // brace depth at each open ${ of a template literal
189
+ let depth = 0; let prev = ''; // the last significant code character
190
+ const regexOK = () => !prev || /[(,=:[!&|?{};+\-*%<>~^]/.test(prev) || /\b(return|typeof|case|do|else|in|of|void|yield|await)$/.test(out.trimEnd().slice(-8));
191
+ while (i < n) {
192
+ const c = s[i]; const d = s[i + 1];
193
+ if (c === '/' && d === '/') { while (i < n && s[i] !== '\n') i++; continue; }
194
+ if (c === '/' && d === '*') { const e = s.indexOf('*/', i + 2); const end = e < 0 ? n : e + 2; out += s.slice(i, end).replace(/[^\n]/g, ''); i = end; continue; }
195
+ if (c === '\'' || c === '"') {
196
+ let j = i + 1; while (j < n && s[j] !== c && s[j] !== '\n') j += s[j] === '\\' ? 2 : 1;
197
+ out += s.slice(i, j + 1); i = j + 1; prev = c; continue;
198
+ }
199
+ if (c === '`' || (c === '}' && tpl.length && tpl[tpl.length - 1] === depth)) {
200
+ if (c === '}') tpl.pop();
201
+ let j = i + 1;
202
+ while (j < n && s[j] !== '`' && !(s[j] === '$' && s[j + 1] === '{')) j += s[j] === '\\' ? 2 : 1;
203
+ if (s[j] === '$') { tpl.push(depth); out += s.slice(i, j + 2); i = j + 2; prev = '{'; continue; }
204
+ out += s.slice(i, j + 1); i = j + 1; prev = '`'; continue;
205
+ }
206
+ if (c === '/' && regexOK()) {
207
+ let j = i + 1; let cls = false;
208
+ while (j < n && s[j] !== '\n' && (cls || s[j] !== '/')) { if (s[j] === '\\') j++; else if (s[j] === '[') cls = true; else if (s[j] === ']') cls = false; j++; }
209
+ out += s.slice(i, j + 1); i = j + 1; prev = 'a'; continue;
210
+ }
211
+ if (c === '{') depth++; else if (c === '}') depth--;
212
+ out += c; if (!/\s/.test(c)) prev = c; i++;
213
+ }
214
+ return out;
215
+ }
216
+ const SUITE_NAME = /^(test\.js|[^/]+(\.test\.(js|mjs)|-test\.js))$/;
217
+ const reEsc = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
218
+ // The page a path serves, where it is not public/<name>.html (server.js handleRequest, the page routes). A change to those
219
+ // routes in server.js reaches every suite, so this table cannot go stale without a run of everything.
220
+ const PAGE_ALIAS = { '': ['premium.html'], index: ['premium.html'], console: ['c3.html'], c3: ['c3.html', 'premium.html'], classic: ['index.html'] };
221
+
222
+ function traceChanges(changes, ctx) {
223
+ const { list, read, files: allFiles, browser } = ctx;
224
+ const src = new Map();
225
+ const get = (f) => { if (!src.has(f)) src.set(f, read(f)); return src.get(f); };
226
+ const bare = new Map(); // the source without comments
227
+ const sget = (f) => { if (!bare.has(f)) { const t = get(f); bare.set(f, t == null ? null : strip(t)); } return bare.get(f); };
228
+ const stemOf = (f) => path.basename(f).replace(/\.[^.]+$/, '');
229
+ const inList = new Set(list);
230
+ const picked = new Set();
231
+ const nameHits = (f) => {
232
+ const stem = stemOf(f); const key = stem.replace(/^(panel|view|tab)-/, '');
233
+ return list.filter((s) => (get(s) || '').includes(stem) || s.includes(`-${key}-`) || s.includes(`-${key}.`));
234
+ };
235
+ const code = allFiles.filter((f) => /\.(m?js|html)$/.test(f));
236
+
237
+ let rev = null; // the public import graph, reversed: file -> the files that load it
238
+ const publicGraph = () => {
239
+ if (rev) return rev;
240
+ rev = new Map();
241
+ const known = new Set(allFiles);
242
+ for (const f of allFiles.filter((x) => x.startsWith('public/') && /\.(html|m?js|css)$/.test(x))) {
243
+ const dir = path.posix.dirname(f);
244
+ for (const m of strip(get(f) || '').matchAll(/['"`(]((?:\.{1,2}\/|\/)?[\w\-/.]+\.(?:m?js|css))['"`)?#]/g)) {
245
+ const r = m[1];
246
+ const cands = r.startsWith('/lib/') ? [r.slice(1)] : r.startsWith('/') ? ['public' + r] : [path.posix.join(dir, r), 'public/pm/' + path.posix.basename(r)];
247
+ for (const t of cands) if (known.has(t)) { if (!rev.has(t)) rev.set(t, new Set()); rev.get(t).add(f); }
248
+ }
249
+ }
250
+ return rev;
251
+ };
252
+ const pagesOf = (f) => {
253
+ const g = publicGraph(); const seen = new Set([f]); const q = [f]; const pages = new Set();
254
+ while (q.length) {
255
+ const x = q.pop();
256
+ if (/^public\/[^/]+\.html$/.test(x)) pages.add(path.posix.basename(x));
257
+ for (const y of g.get(x) || []) if (!seen.has(y)) { seen.add(y); q.push(y); }
258
+ }
259
+ return pages;
260
+ };
261
+ const opened = new Map(); // suite -> the pages it opens, or null for every page
262
+ const opens = (s) => {
263
+ if (opened.has(s)) return opened.get(s);
264
+ const t = get(s) || '';
265
+ let out = /(?:\}|BASE|base|origin|url)\s*\+?\s*['"`]?\/['"`?#]|['"`]\/['"`]/.test(t) ? null : new Set();
266
+ if (out) {
267
+ for (const m of t.matchAll(/['"`/]\/?([\w-]*?)(?:\.html)?['"`?#]/g)) {
268
+ if (!/^(premium[\w-]*|c3|console|classic|index|welcome)$/.test(m[1])) continue;
269
+ for (const h of PAGE_ALIAS[m[1]] || [`${m[1]}.html`]) {
270
+ const html = get(`public/${h}`);
271
+ if (html == null || !/<script/.test(html)) { out = null; break; }
272
+ out.add(h);
273
+ }
274
+ if (!out) break;
275
+ }
276
+ }
277
+ if (out && !out.size) out = null;
278
+ opened.set(s, out);
279
+ return out;
280
+ };
281
+ const viaPublic = (f) => {
282
+ const pages = pagesOf(f);
283
+ // no page loads it by any path the graph can read: a path built at run time may, so every browser suite
284
+ for (const s of list) if (browser.has(s)) { const o = opens(s); if (!pages.size || o === null || [...o].some((p) => pages.has(p))) picked.add(s); }
285
+ for (const s of nameHits(f)) picked.add(s);
286
+ };
287
+ // a route: its users, or the reason it cannot tell
288
+ const routeMemo = new Map();
289
+ const route = (r, where) => {
290
+ if (routeMemo.has(r)) return routeMemo.get(r);
291
+ routeMemo.set(r, null);
292
+ const w = route1(r, where);
293
+ routeMemo.set(r, w);
294
+ return w;
295
+ };
296
+ const route1 = (r, where) => {
297
+ const keys = [r]; const parent = r.replace(/[^/]+$/, '');
298
+ if (parent.length > '/api/'.length && parent !== r) keys.push(parent);
299
+ let hit = false;
300
+ for (const f of code) {
301
+ if (f === 'server.js' || /^lib\/route(s-|-modules)/.test(f)) continue;
302
+ const t = get(f); if (!t || !keys.some((k) => t.includes(k))) continue;
303
+ hit = true;
304
+ if (inList.has(f)) picked.add(f);
305
+ else if (SUITE_NAME.test(f)) continue; // a suite of another group: nothing depends on it
306
+ else if (f.startsWith('public/')) viaPublic(f);
307
+ else { const w = users(f); if (w) return w; }
308
+ }
309
+ return hit ? null : `${where}: nothing names the route ${r}`;
310
+ };
311
+ const routes = (keys, where) => { for (const r of keys) { const w = route(r, where); if (w) return w; } return null; };
312
+ const routeModule = (f) => {
313
+ const keys = [...new Set([...strip(get(f) || '').matchAll(/['"`](\/api\/[^'"`?$]*)/g)].map((m) => m[1]))];
314
+ return keys.length ? routes(keys, f) : `${f} names no /api/ route`;
315
+ };
316
+
317
+ let S = null; // server.js, parsed once: its top-level functions and the route blocks of handleRequest
318
+ const parseServer = () => {
319
+ if (S) return S;
320
+ const L = (get('server.js') || '').split('\n');
321
+ const C = (sget('server.js') || '').split('\n'); // the same lines, comments removed
322
+ const fn = [];
323
+ for (let i = 0; i < C.length; i++) {
324
+ const m = /^(?:async\s+)?function\s*\*?\s*(\w+)|^(?:const|let)\s+(\w+)\s*=\s*(?:async\s*)?(?:function\b|\([^)]*\)\s*=>|\w+\s*=>)/.exec(C[i]);
325
+ if (!m) continue;
326
+ let j = i;
327
+ if (/\{\s*$/.test(C[i]) || !/;\s*$/.test(C[i])) { j = i + 1; while (j < C.length && !/^\}/.test(C[j])) j++; }
328
+ fn.push({ name: m[1] || m[2], a: i + 1, b: j + 1 });
329
+ i = j;
330
+ }
331
+ const blocks = [];
332
+ const hr = fn.find((x) => x.name === 'handleRequest');
333
+ if (hr) {
334
+ const starts = [];
335
+ for (let i = hr.a; i < hr.b - 1; i++) if (/^ {2}[^\s}\])/]/.test(L[i]) && !/^ {2}\/\//.test(L[i])) starts.push(i + 1);
336
+ starts.push(hr.b);
337
+ for (let k = 0; k < starts.length - 1; k++) {
338
+ const head = L[starts[k] - 1];
339
+ if (!/^ {2}if \(/.test(head) || !/\bp\b/.test(head)) continue;
340
+ const keys = [...head.matchAll(/'(\/[^']*)'/g)].map((m) => m[1]);
341
+ for (const m of head.matchAll(/\/\^((?:\\\/|[\w-])+)/g)) keys.push(m[1].replace(/\\\//g, '/'));
342
+ if (keys.length && keys.every((x) => x.startsWith('/api/'))) blocks.push({ keys, a: starts[k], b: starts[k + 1] - 1 });
343
+ }
344
+ }
345
+ S = { L, C, fn, blocks, fnAt: (n) => fn.find((x) => n >= x.a && n <= x.b), blockAt: (n) => blocks.find((b) => n >= b.a && n <= b.b) };
346
+ return S;
347
+ };
348
+ const used = new Set();
349
+ const serverLines = (lines) => {
350
+ const { C, fnAt, blockAt } = parseServer();
351
+ for (const n of lines) {
352
+ const raw = C[n - 1];
353
+ if (raw === undefined || !raw.trim()) continue; // a comment or a blank line reaches nothing
354
+ const b = blockAt(n);
355
+ if (b) { const w = routes(b.keys, `server.js:${n}`); if (w) return w; continue; }
356
+ const own = fnAt(n);
357
+ if (own && own.name !== 'handleRequest') { const w = useOf(own.name); if (w) return `${own.name} (server.js:${n}) is used by ${w}`; continue; }
358
+ return `server.js:${n}, outside every route and function`;
359
+ }
360
+ return null;
361
+ };
362
+ const useOf = (name) => { // the routes that use the top-level `name` of server.js
363
+ if (used.has(name)) return null;
364
+ used.add(name);
365
+ const { L, C, fnAt } = parseServer();
366
+ const re = new RegExp(`\\b${reEsc(name)}\\b`);
367
+ const at = [];
368
+ for (let i = 0; i < C.length; i++) {
369
+ if (!re.test(C[i])) continue;
370
+ const own = fnAt(i + 1);
371
+ if (own && own.name === name) continue;
372
+ if (!own && /^(?:const|let|var)\s[^=]*=\s*require\(/.test(L[i])) continue; // the binding itself
373
+ at.push(i + 1);
374
+ }
375
+ return serverLines(at);
376
+ };
377
+ // the files that name f, followed until a suite, a route or a page; the reason it cannot tell, or null
378
+ const userMemo = new Map();
379
+ const named = new Map(); // file -> how many files name it
380
+ const users = (f) => {
381
+ if (userMemo.has(f)) return userMemo.get(f);
382
+ userMemo.set(f, null);
383
+ const w = users1(f);
384
+ userMemo.set(f, w);
385
+ return w;
386
+ };
387
+ const users1 = (f) => {
388
+ const re = new RegExp(`[/'"\`]${reEsc(stemOf(f))}(?:\\.m?js)?['"\`]`);
389
+ let n = 0;
390
+ for (const g of code) {
391
+ if (g === f) continue;
392
+ const t = sget(g); if (!t || !re.test(t)) continue;
393
+ n++;
394
+ if (inList.has(g)) { picked.add(g); continue; }
395
+ if (SUITE_NAME.test(g)) continue; // a suite of another group: nothing depends on it
396
+ if (WIDE.has(g)) return `${f} is used by ${g}`;
397
+ if (g.startsWith('public/')) { viaPublic(g); continue; }
398
+ if (g === 'server.js') {
399
+ const names = []; const inline = [];
400
+ t.split('\n').forEach((line, i) => {
401
+ if (!re.test(line)) return;
402
+ if (/'\/lib\//.test(line)) return; // served to the browser: the public graph has it
403
+ const m = /^(?:const|let|var)\s+(?:\{([^}]*)\}|(\w+))\s*=\s*require\(/.exec(line);
404
+ if (m) names.push(...(m[1] ? m[1].split(',').map((x) => x.split(':').pop().trim()).filter(Boolean) : [m[2]]));
405
+ else inline.push(i + 1); // a require inside a function or a route: that line
406
+ });
407
+ for (const name of names) { const w = useOf(name); if (w) return w; }
408
+ const w = serverLines(inline); if (w) return w;
409
+ continue;
410
+ }
411
+ if (/^lib\/routes-/.test(g)) { const w = routeModule(g); if (w) return w; continue; }
412
+ const w = users(g); if (w) return w;
413
+ }
414
+ named.set(f, n);
415
+ if (!n && /^lib\/.*\.m?js$/.test(f)) return `no file names ${f}`;
416
+ return null;
417
+ };
418
+
419
+ for (const { file: f, lines } of changes) {
420
+ if (WIDE.has(f)) return { suites: list, why: `${f} changed, and every suite depends on it` };
421
+ if (inList.has(f)) { picked.add(f); continue; }
422
+ if (SUITE_NAME.test(f)) { nameHits(f).forEach((x) => picked.add(x)); continue; } // a suite of another group, or a removed one: only a suite that names it can depend on it
423
+ if (/^test-lists\/[^/]+\.json$/.test(f)) { // a fragment: the suites it lists are the ones whose list changed
424
+ let frag = null; try { frag = JSON.parse(get(f)); } catch { /* removed or not JSON: --check fails it */ }
425
+ for (const k of ['modules', 'panels', 'exclusive']) for (const s of (frag && frag[k]) || []) if (inList.has(s)) picked.add(s);
426
+ continue;
427
+ }
428
+ if (/^(guide|docs)\/|\.md$/.test(f)) continue; // prose: no suite asserts on it except guide.test.js, a unit suite
429
+ if (f === 'test-timings.json') continue; // run order only: no suite reads it
430
+ let why = null;
431
+ const before = picked.size;
432
+ if (get(f) == null) { // removed: only the names in the suites can say who used it
433
+ nameHits(f).forEach((s) => picked.add(s));
434
+ if (picked.size === before) why = `no suite names ${f}, which this change removes`;
435
+ } else if (f === 'server.js') why = lines ? serverLines(lines) : 'the diff of server.js could not be read';
436
+ else if (/^lib\/routes-/.test(f)) why = routeModule(f);
437
+ else if (f.startsWith('public/')) viaPublic(f);
438
+ else {
439
+ why = users(f);
440
+ if (!why && /^lib\//.test(f) && new RegExp(`'/lib/${reEsc(stemOf(f))}\\.js'`).test(get('server.js') || '')) viaPublic(f);
441
+ nameHits(f).forEach((s) => picked.add(s));
442
+ if (!why && picked.size === before && !named.get(f)) why = `no file names ${f}`;
443
+ }
444
+ if (why) return { suites: list, why: `${why}, so every suite runs` };
445
+ }
446
+ return { suites: list.filter((s) => picked.has(s)), why: `${changes.length} changed file(s) reach these suites` };
447
+ }
448
+
449
+ /* The suites in `list` that the diff against `ref` can reach, by traceChanges() above. Returns { files, suites, why }. */
158
450
  function changedSuites(list, ref, { exact = false } = {}) {
159
451
  const git = (...a) => {
160
- const r = require('child_process').spawnSync('git', a, { cwd: DIR, encoding: 'utf8' });
452
+ const r = require('child_process').spawnSync('git', a, { cwd: DIR, encoding: 'utf8', maxBuffer: 64 * 1024 * 1024 });
161
453
  return r.status === 0 ? r.stdout : null;
162
454
  };
163
455
  const top = (git('rev-parse', '--show-toplevel') || '').trim();
@@ -172,23 +464,25 @@ function changedSuites(list, ref, { exact = false } = {}) {
172
464
  ].join('\n').split('\n').map((f) => f.trim()).filter(Boolean);
173
465
  const files = [...new Set(names)].filter((f) => f.startsWith(prefix)).map((f) => f.slice(prefix.length));
174
466
  if (!files.length) return { files, suites: [], why: `nothing under workspace/ differs from ${ref}` };
175
- const wide = files.filter((f) => WIDE.has(f));
176
- if (wide.length) return { files, suites: list, why: `${wide.join(', ')} changed, and every suite depends on it` };
177
- const source = new Map(list.map((f) => [f, fs.existsSync(path.join(DIR, f)) ? fs.readFileSync(path.join(DIR, f), 'utf8') : '']));
178
- const picked = new Set();
179
- const untraced = [];
180
- for (const f of files) {
181
- if (source.has(f)) { picked.add(f); continue; }
182
- if (/^(guide|docs)\/|\.md$/.test(f)) continue; // prose: no suite asserts on it except guide.test.js, a unit suite
183
- if (f === 'test-timings.json') continue; // run order only: no suite reads it
184
- const stem = path.basename(f).replace(/\.[^.]+$/, '');
185
- const key = stem.replace(/^(panel|view|tab)-/, '');
186
- const hits = list.filter((s) => source.get(s).includes(stem) || s.includes(`-${key}-`) || s.includes(`-${key}.`));
187
- if (!hits.length) untraced.push(f);
188
- for (const h of hits) picked.add(h);
467
+ const all = (git('ls-files', '--full-name', DIR) || '').split('\n').filter((f) => f.startsWith(prefix)).map((f) => f.slice(prefix.length));
468
+ const changes = files.map((file) => {
469
+ if (file !== 'server.js') return { file };
470
+ const d = git('diff', '-U0', base, '--', path.join(DIR, 'server.js'));
471
+ return { file, lines: d == null ? null : diffLines(d) };
472
+ });
473
+ const read = (f) => { try { return fs.readFileSync(path.join(DIR, f), 'utf8'); } catch { return null; } };
474
+ const browser = new Set([...FILES.panels, ...FILES.ui]);
475
+ return { files, ...traceChanges(changes, { list, read, files: [...new Set([...all, ...files])], browser }) };
476
+ }
477
+
478
+ /* The new-side line numbers a `git diff -U0` touches. A pure removal counts the lines on both sides of where it was. */
479
+ function diffLines(diff) {
480
+ const out = [];
481
+ for (const m of String(diff).matchAll(/^@@ -\d+(?:,\d+)? \+(\d+)(?:,(\d+))? @@/gm)) {
482
+ const a = Number(m[1]); const n = m[2] === undefined ? 1 : Number(m[2]);
483
+ if (n === 0) out.push(a, a + 1); else for (let k = 0; k < n; k++) out.push(a + k);
189
484
  }
190
- if (untraced.length) return { files, suites: list, why: `no suite names ${untraced.slice(0, 3).join(', ')}${untraced.length > 3 ? ' …' : ''}, so every suite runs` };
191
- return { files, suites: list.filter((f) => picked.has(f)), why: `${files.length} changed file(s) reach these suites` };
485
+ return out;
192
486
  }
193
487
 
194
488
  function check() {
@@ -269,7 +563,7 @@ async function main() {
269
563
  if (changed) {
270
564
  const ref = changed === true ? 'origin/main' : changed;
271
565
  const pick = changedSuites(list, ref);
272
- console.log(`run-tests: --changed against ${ref}: ${pick.why}. ${pick.suites.length} of ${list.length} suites run here; every suite runs on main after the merge.`);
566
+ console.log(`run-tests: --changed against ${ref}: ${pick.why}. ${pick.suites.length} of ${list.length} suites run here; a workflow_dispatch run runs every suite.`);
273
567
  list = pick.suites;
274
568
  if (!list.length) return;
275
569
  }
@@ -342,4 +636,5 @@ async function main() {
342
636
  if (failed.length) { console.log(`FAILED: ${failed.map((r) => `${r.file} (${r.why})`).join(', ')}`); process.exitCode = 1; }
343
637
  }
344
638
 
345
- main().catch((e) => { console.error(e); process.exitCode = 1; });
639
+ if (require.main === module) main().catch((e) => { console.error(e); process.exitCode = 1; });
640
+ else module.exports = { traceChanges, diffLines, strip, WIDE };
@@ -6410,12 +6410,9 @@ async function handleRequest(req, res) {
6410
6410
  const built = BUILD_RE.exec(url.pathname);
6411
6411
  const p = built ? built[1] : url.pathname;
6412
6412
 
6413
- // The premium Briefing (public/premium.html) is the default page: '/' and '/index.html' serve it (premium-default-page). The console
6414
- // (public/c3.html) is served at '/console.html'. '/c3.html' is an old link: bare, it goes to the premium Briefing; with a query
6415
- // (?tab=, ?studio=, ?audience=, ?capture=, ?demo=) it goes to '/console.html' with the same query, so every link the console made
6416
- // for itself still lands in the console. The older shell (public/index.html) stays at '/classic.html'.
6417
- // ROLLBACK, one line: change the final 'premium.html' in the readFile name chain below to 'c3.html' and delete the '/c3.html'
6418
- // redirect block above.
6413
+ // Home (public/premium.html) is the default page: '/' and '/index.html' serve it. The console (/console.html, /c3.html) and the
6414
+ // classic shell (/classic.html) were removed (workspace-legacy-cleanup); their old links open Home with the same query. The
6415
+ // old first-run page (/welcome) opens the Agreed first run (/premium-welcome.html) with the same query.
6419
6416
  // premium-agreed-design H3: Home replaced the Briefing, My work and Chat. My work and Chat open Home with their own query, so an
6420
6417
  // ?item=, ?about=, ?open= or ?say= link still lands on what it named.
6421
6418
  if (p === '/premium-work' || p === '/premium-work.html' || p === '/premium-chat' || p === '/premium-chat.html') {
@@ -6430,16 +6427,24 @@ async function handleRequest(req, res) {
6430
6427
  res.writeHead(302, { Location: '/premium.html' + (s ? '?' + s : ''), 'Cache-Control': 'no-store' });
6431
6428
  return res.end();
6432
6429
  }
6433
- if (p === '/c3.html' || p === '/c3') {
6434
- res.writeHead(302, { Location: (url.search ? '/console.html' : '/premium.html') + url.search, 'Cache-Control': 'no-store' });
6430
+ // One console address stays: the Chrome extension's popup frames /console.html?capture=1, which serves capture.html.
6431
+ const capture = (p === '/console.html' || p === '/c3.html') && url.searchParams.get('capture') === '1';
6432
+ if (!capture && (p === '/c3.html' || p === '/c3' || p === '/console' || p === '/console.html' || p === '/classic' || p === '/classic.html')) {
6433
+ res.writeHead(302, { Location: '/premium.html' + url.search, 'Cache-Control': 'no-store' });
6434
+ return res.end();
6435
+ }
6436
+ if (p === '/welcome' || p === '/welcome.html') {
6437
+ res.writeHead(302, { Location: '/premium-welcome.html' + url.search, 'Cache-Control': 'no-store' });
6435
6438
  return res.end();
6436
6439
  }
6437
- if (p === '/' || p === '/index.html' || p === '/console' || p === '/console.html' || p === '/classic' || p === '/classic.html' || p === '/welcome' || p === '/welcome.html' || p === '/premium' || p === '/premium.html' || p === '/premium-work' || p === '/premium-work.html' || p === '/premium-board' || p === '/premium-board.html' || p === '/premium-initiative' || p === '/premium-initiative.html' || p === '/premium-insights' || p === '/premium-insights.html' || p === '/premium-welcome' || p === '/premium-welcome.html' || p === '/premium-chat' || p === '/premium-chat.html' || p === '/premium-viewer' || p === '/premium-viewer.html') {
6440
+ const PAGES = { '/': 'premium.html', '/index.html': 'premium.html', '/premium': 'premium.html', '/premium.html': 'premium.html', '/premium-board': 'premium-board.html', '/premium-board.html': 'premium-board.html', '/premium-insights': 'premium-insights.html', '/premium-insights.html': 'premium-insights.html', '/premium-welcome': 'premium-welcome.html', '/premium-welcome.html': 'premium-welcome.html', '/premium-viewer': 'premium-viewer.html', '/premium-viewer.html': 'premium-viewer.html' };
6441
+ const page = capture ? 'capture.html' : Object.prototype.hasOwnProperty.call(PAGES, p) ? PAGES[p] : null;
6442
+ if (page) {
6438
6443
  // pm-os-absorb Run 2 (R25, X11): the per-launch nonce goes into the base meta line, nowhere else. no-store, so a
6439
6444
  // restarted server never answers a press from a page that holds the previous launch's value. The page code is
6440
6445
  // referenced under this launch's build prefix.
6441
6446
  const n = pmGuard.launchNonce();
6442
- return fs.readFile(path.join(PUB, (p === '/classic' || p === '/classic.html') ? 'index.html' : (p === '/welcome' || p === '/welcome.html') ? 'welcome.html' : (p === '/premium' || p === '/premium.html') ? 'premium.html' : (p === '/premium-work' || p === '/premium-work.html') ? 'premium-work.html' : (p === '/premium-board' || p === '/premium-board.html') ? 'premium-board.html' : (p === '/premium-initiative' || p === '/premium-initiative.html') ? 'premium-initiative.html' : (p === '/premium-insights' || p === '/premium-insights.html') ? 'premium-insights.html' : (p === '/premium-welcome' || p === '/premium-welcome.html') ? 'premium-welcome.html' : (p === '/premium-chat' || p === '/premium-chat.html') ? 'premium-chat.html' : (p === '/premium-viewer' || p === '/premium-viewer.html') ? 'premium-viewer.html' : (p === '/console' || p === '/console.html') ? 'c3.html' : 'premium.html'), 'utf8', (err, html) => {
6447
+ return fs.readFile(path.join(PUB, page), 'utf8', (err, html) => {
6443
6448
  if (err) { res.writeHead(404); res.end('not found'); return; }
6444
6449
  let out = withBuild(html);
6445
6450
  if (n) out = out.replace('<meta name="' + pmGuard.NONCE_META + '" content="" />', '<meta name="' + pmGuard.NONCE_META + '" content="' + n + '" />');