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
@@ -1,85 +0,0 @@
1
- 'use strict';
2
- /* routes-report-facts.js — GET /api/report-families/facts[?ws=] (console3 wave D).
3
- *
4
- * { ok, facts: { project:[sections], product:[...], communications:[...], periodic:[...] }, sources }
5
- *
6
- * The report families view (report-families-view.js) reads its sections from ctx.reportFacts[<family id>]. This route builds
7
- * them from the data that exists and from nothing else (scripts/report-families.js buildFamily copies what it is given):
8
- * - project > progress one claim per open initiative that has a promised date (scripts/signals/facts.js readRepoFacts:
9
- * the initiative record's `promised`), label fact, source the record's path;
10
- * - periodic > highlights one claim per release (<runtime>/releases/releases.jsonl folded by scripts/releases.js),
11
- * label fact, source that file.
12
- * Every other section is empty, on purpose: no forecast, risk, decision, ask or metric record exists to read yet.
13
- * Read-only. The repository read is slow (it derives each initiative's stage from git), so a successful read is kept 5 minutes. */
14
- const fs = require('fs');
15
- const path = require('path');
16
- const { repoScript } = require('./repo-script.js');
17
- const RF = require(repoScript('report-families.js'));
18
- const { foldReleases } = require(repoScript('releases.js'));
19
-
20
- const prefixes = ['/api/report-families/facts'];
21
- const TTL = 5 * 60 * 1000;
22
- const memo = new Map(); // root -> { at, inis }
23
-
24
- function repoInis(root, opts) {
25
- const hit = memo.get(root);
26
- const now = (opts && opts.clock) ? opts.clock() : Date.now();
27
- if (hit && now - hit.at < TTL) return hit.inis;
28
- const { readRepoFacts } = require(repoScript('signals/facts.js'));
29
- const inis = (readRepoFacts(root, {}).inis || []).map((i) => ({ id: i.id, title: i.title, promised: i.promised, done: !!i.done }));
30
- memo.set(root, { at: now, inis });
31
- return inis;
32
- }
33
-
34
- function readReleases(runtimeDir) {
35
- const f = path.join(runtimeDir, 'releases', 'releases.jsonl');
36
- let lines = [];
37
- try { lines = fs.readFileSync(f, 'utf8').split('\n').filter(Boolean); } catch { return { file: f, releases: [] }; }
38
- return { file: f, releases: foldReleases(lines) };
39
- }
40
-
41
- /** Pure: (initiatives, releases, { releasesFile }) -> { facts, sources }. A source with no rows adds no claim. */
42
- function buildFacts(inis, releases, opts = {}) {
43
- const progress = (inis || []).filter((i) => i && !i.done && i.promised)
44
- .map((i) => ({ id: 'ini:' + i.id, text: `${i.title || i.id}: promised ${i.promised}`, label: 'fact', source: `planning/initiatives/${i.id}.md` }));
45
- const highlights = (releases || []).map((r) => ({
46
- id: 'rel:' + r.id, text: `Release ${r.fix_version || r.id} (${r.type})${r.release_at ? ', ' + String(r.release_at).slice(0, 10) : ''}`,
47
- label: 'fact', source: opts.releasesFile || 'releases/releases.jsonl' }));
48
- return {
49
- facts: {
50
- project: RF.buildFamily('project', { progress }),
51
- product: RF.buildFamily('product', {}),
52
- communications: RF.buildFamily('communications', {}),
53
- periodic: RF.buildFamily('periodic', { highlights }),
54
- },
55
- sources: { initiatives_with_promise: progress.length, releases: highlights.length },
56
- };
57
- }
58
-
59
- /** Pure handler over (opts: { root, runtimeDir, loadInis }) -> { code, body }. */
60
- function factsOf(opts = {}) {
61
- try {
62
- const inis = (opts.loadInis || repoInis)(opts.root, opts);
63
- const rel = opts.runtimeDir ? readReleases(opts.runtimeDir) : { file: null, releases: [] };
64
- return { code: 200, body: { ok: true, ...buildFacts(inis, rel.releases, { releasesFile: rel.file ? path.relative(opts.root || '', rel.file) || rel.file : undefined }) } };
65
- } catch (e) {
66
- return { code: 500, body: { ok: false, error: 'report facts could not be read: ' + (e && e.message ? e.message : String(e)) } };
67
- }
68
- }
69
-
70
- module.exports = {
71
- prefixes, buildFacts, factsOf,
72
- handle: async (req, res, url, ctx) => {
73
- if (url.pathname !== '/api/report-families/facts') return false;
74
- if (req.method !== 'GET') { ctx.json(res, { ok: false, error: 'GET only' }, 405); return true; }
75
- let root;
76
- try { const w = ctx.getWs && ctx.getWs(url.searchParams.get('ws') || null); root = w && w.root; } catch { root = null; }
77
- const useRoot = root || path.resolve(__dirname, '..', '..');
78
- let inis;
79
- try { inis = ((await require('./facts-async.js').readFactsAsync(useRoot)).inis || []).map((i) => ({ id: i.id, title: i.title, promised: i.promised, done: !!i.done })); }
80
- catch (e) { ctx.json(res, { ok: false, error: 'report facts could not be read: ' + (e && e.message ? e.message : String(e)) }, 500); return true; }
81
- const out = factsOf({ root: useRoot, runtimeDir: ctx.runtimeDir, loadInis: () => inis });
82
- ctx.json(res, out.body, out.code);
83
- return true;
84
- },
85
- };
@@ -1,33 +0,0 @@
1
- 'use strict';
2
- /* routes-report-families.js — console3 wave B4: the four report families and the claims check.
3
- *
4
- * GET /api/report-families → { ok, families, labels, required }
5
- * POST /api/report-families/check { family, variant?, sections, known_keys?, absent_keys?, stale_keys? }
6
- * → { ok, blocked, reasons, warnings, sections, ... }
7
- * Pure. The check reads nothing from disk and writes nothing. There is no send and no issue route in this wave. */
8
- const { repoScript } = require('./repo-script.js');
9
- const RF = require(repoScript('report-families.js'));
10
-
11
- const prefixes = ['/api/report-families'];
12
- const strs = (v) => (Array.isArray(v) ? v.filter((x) => typeof x === 'string') : undefined);
13
-
14
- module.exports = {
15
- prefixes,
16
- handle: async (req, res, url, ctx) => {
17
- const p = url.pathname;
18
- if (p === '/api/report-families' && req.method === 'GET') {
19
- ctx.json(res, { ok: true, families: RF.FAMILIES, labels: RF.LABELS, required: RF.REQUIRED });
20
- return true;
21
- }
22
- if (p === '/api/report-families/check' && req.method === 'POST') {
23
- const got = await ctx.readJson(req);
24
- if (!got.ok) { ctx.json(res, { ok: false, error: 'invalid JSON body' }, 400); return true; }
25
- const b = got.body || {};
26
- if (!Array.isArray(b.sections)) { ctx.json(res, { ok: false, error: 'sections must be a list' }, 400); return true; }
27
- const out = RF.sendCheck({ family: b.family, variant: b.variant, sections: b.sections, knownKeys: strs(b.known_keys), absentKeys: strs(b.absent_keys), staleKeys: strs(b.stale_keys) });
28
- ctx.json(res, out, out.ok ? 200 : 400);
29
- return true;
30
- }
31
- return false;
32
- },
33
- };
@@ -1,51 +0,0 @@
1
- 'use strict';
2
- /* routes-signals.js — the Signals page records (console3 wave E2a). Rules from scripts/signal-rules.js.
3
- *
4
- * GET /api/signals → { ok, rules, readings, trips, open } readings = latest per metric; open = tripping now
5
- * POST /api/signals/rule { id, metric, op, threshold, severity } → { ok, rule }
6
- * POST /api/signals/reading { metric, value, read_at? } → { ok, trips } trips this reading started
7
- *
8
- * Every POST passes pm-guard requirePagePress: an agent token has no Origin and no nonce and is refused (403).
9
- * File: <runtime>/signals/signals.jsonl (append only, scripts/trust/ledger.js). */
10
- const path = require('path');
11
- const guard = require('./pm-guard.js');
12
- const { repoScript } = require('./repo-script.js');
13
- const S = require(repoScript('signal-rules.js'));
14
- const L = require(repoScript('trust/ledger.js'));
15
-
16
- const fileOf = (runtimeDir) => path.join(runtimeDir, 'signals', 'signals.jsonl');
17
- const fail = (status, error) => ({ status, body: { ok: false, error } });
18
-
19
- function list(runtimeDir) { return { status: 200, body: { ok: true, ...S.foldSignals(L.read(fileOf(runtimeDir))) } }; }
20
-
21
- function ruleRoute(req, body, runtimeDir, now = new Date()) {
22
- const g = guard.requirePagePress(req, body);
23
- if (!g.ok) return fail(g.status, g.error);
24
- try { const l = S.appendRule(fileOf(runtimeDir), body, L.actorFrom({ ui: true }), now.toISOString()); return { status: 200, body: { ok: true, rule: l.rule } }; }
25
- catch (e) { return fail(400, e.message); }
26
- }
27
-
28
- function readingRoute(req, body, runtimeDir, now = new Date()) {
29
- const g = guard.requirePagePress(req, body);
30
- if (!g.ok) return fail(g.status, g.error);
31
- try { const r = S.appendReading(fileOf(runtimeDir), { metric: body.metric, value: body.value, at: body.read_at }, L.actorFrom({ ui: true }), now.toISOString()); return { status: 200, body: { ok: true, trips: r.trips.map((t) => ({ rule_id: t.rule_id, severity: t.severity, reading: t.reading })) } }; }
32
- catch (e) { return fail(400, e.message); }
33
- }
34
-
35
- const ROUTES = { 'POST /api/signals/rule': ruleRoute, 'POST /api/signals/reading': readingRoute };
36
-
37
- module.exports = {
38
- prefixes: ['/api/signals'],
39
- list, ruleRoute, readingRoute, ROUTES, fileOf,
40
- handle: async (req, res, url, ctx) => {
41
- const p = url.pathname;
42
- if (p === '/api/signals' && req.method === 'GET') { const r = list(ctx.runtimeDir); ctx.json(res, r.body, r.status); return true; }
43
- const fn = ROUTES[`${req.method} ${p}`];
44
- if (!fn) return false;
45
- const got = await ctx.readJson(req);
46
- if (!got.ok) { ctx.json(res, { ok: false, error: 'invalid JSON body' }, 400); return true; }
47
- const r = fn(req, got.body || {}, ctx.runtimeDir);
48
- ctx.json(res, r.body, r.status);
49
- return true;
50
- },
51
- };
@@ -1,197 +0,0 @@
1
- 'use strict';
2
- /* routes-timeline.js — GET /api/timeline?ws=<id>: the rows of Initiatives › Timeline (pm-os-absorb Run 4, slice 4C;
3
- * PRD R20 A, D86 point 4).
4
- *
5
- * → { ok: true, ws, view: 'timeline', sig: { placements, items, records }, now, today,
6
- * range: { start, end, clipped } | null, whole months, 'YYYY-MM-DD'; null when no initiative has a date;
7
- * at most 24 months, `clipped` true when a date falls outside them
8
- * horizons: { now: [row…], next: [row…], later: [row…] } } each in its placed order, first is top
9
- *
10
- * row = { id, title, lane, horizon, rank, placed, dormant, dated, `placed`: the reader's order holds it (a line, or
11
- * a day-one row 2C seeds), so a `placed … after:
12
- * <this row>` finds it
13
- * span: { start, due } | null, the initiative's own span, over every dated item
14
- * stages: [{ id, label, start, due, done, total }], one per stage that holds an item, in stage order, from
15
- * planTree.layout (an unknown stage is "Other", as in the
16
- * Breakdown); start and due are null for an undated stage
17
- * milestones: ['YYYY-MM-DD'…], the dates of milestone items, for the ◆
18
- * progress: { done, total } }
19
- *
20
- * A READ ONLY ROUTE. Nothing here writes a ledger, and no date is computed from anything but the items' own start and due
21
- * (lib/item-spans.js, the one engine the Breakdown's Timeline and the report's strip also use). An initiative bar is never
22
- * written: the page reorders rows through POST /api/placements (Run 2, slice 2C), and that is the only write.
23
- *
24
- * WORK LANES ONLY (D86 point 4). A row exists for an initiative whose lane has `group: 'work'` in scripts/lane-defs.js,
25
- * read through the engine, never from a list in this file. A held, closed or cancelled initiative has no row.
26
- *
27
- * TODAY is the local date of the machine the server runs on, which is the PM's (the workspace is a local app). The range
28
- * holds every date and today, but never more than MAX_MONTHS months: the window then starts a few months before today (or at
29
- * the first date, if later) and a date outside it is cut off, which `range.clipped` says.
30
- *
31
- * HORIZON AND ORDER come from lib/placements.js readPlacements and horizonOf, so an initiative without a placement reads
32
- * Later, as it does on the Roadmap. An initiative the ledger has not placed follows the placed ones of its horizon, in id
33
- * order.
34
- *
35
- * `sig` is made of the ledgerSig of every ledger this route reads (placements, plan-items) and one signature of the
36
- * records it lists (their names, sizes and times, and lifecycle.jsonl). The page watches it with sig-watch.js watchSig.
37
- *
38
- * 400 without `ws`; 404 for a workspace that is not registered (getWs would answer the home workspace for it); 405 for any
39
- * method but GET. The workflow board is NOT read: it is capped and derived in a child process, and this route needs only
40
- * the records, the two ledgers and the stage names.
41
- */
42
- const fs = require('fs');
43
- const path = require('path');
44
- const crypto = require('crypto');
45
- const ledgers = require('./plan-ledgers.js');
46
- const placements = require('./placements.js');
47
- const planItems = require('./plan-items.js');
48
- const planTree = require('./plan-tree.js');
49
- const itemSpans = require('./item-spans.js');
50
- const consoleState = require('./console-state');
51
-
52
- const MIN_MONTHS = 3;
53
- const MAX_MONTHS = 24;
54
- const LEAD_MONTHS = 6; // a clipped window opens this many months before today
55
- const OTHER_ID = 'other';
56
- const OTHER_LABEL = 'Other'; // the Breakdown's word for items whose stage the lane does not have (breakdown-copy.js)
57
- const pad = (n) => String(n).padStart(2, '0');
58
- const ymd = (d) => `${d.getUTCFullYear()}-${pad(d.getUTCMonth() + 1)}-${pad(d.getUTCDate())}`;
59
- const localYmd = (d) => `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}`;
60
-
61
- /** The whole months that hold every date and today: the first of the first month to the last day of the last. More than
62
- * MAX_MONTHS of them are cut to a window that holds today and opens LEAD_MONTHS before it (or at the first date). */
63
- function rangeOf(dates, today) {
64
- const all = dates.concat([today]).sort();
65
- const a = new Date(all[0] + 'T00:00:00Z');
66
- const b = new Date(all[all.length - 1] + 'T00:00:00Z');
67
- const t = new Date(today + 'T00:00:00Z');
68
- const idx = (d) => d.getUTCFullYear() * 12 + d.getUTCMonth();
69
- let first = idx(a);
70
- let months = idx(b) - first + 1;
71
- if (months > MAX_MONTHS) {
72
- first = Math.min(Math.max(first, idx(t) - LEAD_MONTHS), idx(t));
73
- months = MAX_MONTHS;
74
- } else if (months < MIN_MONTHS) months = MIN_MONTHS;
75
- const start = new Date(Date.UTC(Math.floor(first / 12), first % 12, 1));
76
- const last = new Date(Date.UTC(Math.floor(first / 12), (first % 12) + months, 0));
77
- const out = { start: ymd(start), end: ymd(last) };
78
- out.clipped = all.some((d) => d < out.start || d > out.end);
79
- return out;
80
- }
81
-
82
- /** One signature for the records this route lists: their names, sizes and times, and the lifecycle ledger. */
83
- function recordsSig(root, engine) {
84
- const L = engine.layout(root);
85
- const h = crypto.createHash('sha1');
86
- let names = [];
87
- try { names = fs.readdirSync(L.initiatives).filter((n) => n.endsWith('.md')).sort(); } catch { /* no records */ }
88
- for (const n of names) {
89
- try { const st = fs.statSync(path.join(L.initiatives, n)); h.update(`${n}:${st.size}:${st.mtimeMs};`); } catch { /* gone mid-scan */ }
90
- }
91
- try { const st = fs.statSync(path.join(L.runsDir, 'lifecycle.jsonl')); h.update(`lc:${st.size}:${st.mtimeMs}:${st.ino}`); } catch { /* none */ }
92
- return h.digest('hex');
93
- }
94
-
95
- /** The initiatives that get a row: [{ id, title, lane }] in id order. */
96
- function workInitiatives(root, engine) {
97
- const { profile, defs } = engine.lanesFor(root);
98
- const fallback = profile === 'pm-artifacts' ? 'prd' : 'feature';
99
- const stopped = engine.readLifecycle(root);
100
- const out = [];
101
- for (const id of engine.listInitiatives(root)) {
102
- const file = planTree.recordPath(root, id);
103
- if (!file) continue;
104
- let fm = {};
105
- try { fm = engine.parseLeadingFrontmatter(fs.readFileSync(file, 'utf8')) || {}; } catch { fm = {}; }
106
- const declared = String(fm.lane || '').trim();
107
- const lane = declared && defs[declared] ? declared : fallback;
108
- if (planTree.viewGroup(defs, declared) !== 'work') continue;
109
- const lc = stopped.get(id);
110
- if (lc && lc.state !== 'active') continue;
111
- out.push({ id, title: String(fm.title || id), lane });
112
- }
113
- return out;
114
- }
115
-
116
- /** One initiative's row, without its horizon. `live` is its items from the plan-items fold, proposed ones left out. The
117
- * stage rows come from planTree.layout, the Breakdown's own layout: an item whose stage the lane does not know is in
118
- * "Other", as there, so the rows' totals add up to the row's progress. */
119
- function rowOf(root, init, fold, live, now) {
120
- const lay = planTree.layout({ root, initiative: init.id, fold, ladder: null, now });
121
- const spans = itemSpans.spansOf(live, { stages: lay.stages.map((s) => s.id) });
122
- const byItem = new Map(spans.map((s) => [s.id, s]));
123
- const groups = lay.stages.map((s) => ({ id: s.id, label: s.label, ids: new Set(s.items) }));
124
- if (lay.other.items.length) groups.push({ id: OTHER_ID, label: OTHER_LABEL, ids: new Set(lay.other.items) });
125
- const stageRows = [];
126
- for (const g of groups) {
127
- const mine = live.filter((it) => g.ids.has(it.id));
128
- if (!mine.length) continue;
129
- const dated = mine.map((it) => byItem.get(it.id)).filter((sp) => sp && !sp.milestone);
130
- stageRows.push({
131
- id: g.id, label: g.label,
132
- start: dated.length ? dated.reduce((m, sp) => (sp.start < m ? sp.start : m), dated[0].start) : null,
133
- due: dated.length ? dated.reduce((m, sp) => (sp.due > m ? sp.due : m), dated[0].due) : null,
134
- done: mine.filter((it) => it.state === 'done').length, total: mine.length,
135
- });
136
- }
137
- const span = itemSpans.initiativeSpan(spans);
138
- return {
139
- id: init.id, title: init.title, lane: init.lane, span, dated: !!span, stages: stageRows,
140
- milestones: spans.filter((sp) => sp.milestone).map((sp) => sp.due).sort(),
141
- progress: { done: lay.progress.done, total: lay.progress.total },
142
- };
143
- }
144
-
145
- function build(w, now) {
146
- const root = w.root;
147
- const loaded = consoleState.loadEngine();
148
- if (!loaded.ok) return { ok: false, status: 500, error: loaded.error };
149
- const engine = loaded.engine;
150
- const sig = { placements: ledgers.ledgerSig(root, 'placements'), items: ledgers.ledgerSig(root, 'plan-items'), records: recordsSig(root, engine) };
151
- const inits = workInitiatives(root, engine);
152
- const fold = planItems.readFold(root, { now });
153
- const placed = placements.readPlacements(root, { now, records: inits.map((i) => ({ id: i.id, lane: i.lane })) });
154
- const rows = new Map();
155
- for (const init of inits) {
156
- const live = Object.values(fold.items).filter((it) => it.initiative === init.id && !it.proposed);
157
- const row = rowOf(root, init, fold, live, now);
158
- const p = placed.byInit[init.id] || null;
159
- row.horizon = placements.horizonOf(placed, init.id);
160
- row.dormant = !!(p && p.dormant);
161
- row.placed = ((placed.order && placed.order[row.horizon]) || []).includes(init.id);
162
- rows.set(init.id, row);
163
- }
164
- const horizons = { now: [], next: [], later: [] };
165
- for (const h of placements.HORIZONS) {
166
- const seen = new Set();
167
- for (const id of (placed.order && placed.order[h]) || []) {
168
- const row = rows.get(id);
169
- if (!row || row.horizon !== h || seen.has(id)) continue;
170
- seen.add(id); horizons[h].push(row);
171
- }
172
- for (const row of rows.values()) if (row.horizon === h && !seen.has(row.id)) horizons[h].push(row);
173
- horizons[h].forEach((row, i) => { row.rank = i; });
174
- }
175
- const dates = [];
176
- for (const row of rows.values()) if (row.span) dates.push(row.span.start, row.span.due);
177
- const today = localYmd(new Date(now));
178
- return { ok: true, ws: w.id, view: 'timeline', sig, now: new Date(now).toISOString(), today, range: dates.length ? rangeOf(dates, today) : null, horizons };
179
- }
180
-
181
- module.exports = {
182
- prefixes: ['/api/timeline'],
183
- handle: async (req, res, url, ctx) => {
184
- if (url.pathname !== '/api/timeline') return false;
185
- if (req.method !== 'GET') { ctx.json(res, { ok: false, error: 'GET /api/timeline only reads; the page reorders rows through /api/placements' }, 405); return true; }
186
- const id = String(url.searchParams.get('ws') || '');
187
- if (!id) { ctx.json(res, { ok: false, error: 'ws is required: the id of a registered workspace' }, 400); return true; }
188
- const w = ctx.getWs(id);
189
- if (!w || w.id !== id || !w.root) { ctx.json(res, { ok: false, error: 'no such workspace' }, 404); return true; }
190
- let out;
191
- try { out = build(w, Date.now()); }
192
- catch (e) { out = { ok: false, status: 500, error: 'the timeline could not be read: ' + String((e && e.message) || 'error').slice(0, 160) }; }
193
- ctx.json(res, out, out.ok ? 200 : out.status || 500);
194
- return true;
195
- },
196
- _rangeOf: rangeOf,
197
- };
@@ -1,35 +0,0 @@
1
- <!doctype html>
2
- <html lang="en" data-pm-page-theme="light">
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
6
- <meta name="pmos-nonce" content="" />
7
- <title>PMOS console</title>
8
- <!-- Add to Home Screen, as the older shell had it (see index.html): the manifest is fetched with credentials because over the
9
- tailnet every request needs the session cookie. -->
10
- <link rel="manifest" href="/manifest.webmanifest" crossorigin="use-credentials" />
11
- <meta name="theme-color" content="#090b0c" />
12
- <meta name="mobile-web-app-capable" content="yes" />
13
- <meta name="apple-mobile-web-app-capable" content="yes" />
14
- <meta name="apple-mobile-web-app-title" content="PMOS" />
15
- <meta name="apple-mobile-web-app-status-bar-style" content="black" />
16
- <link rel="apple-touch-icon" href="/icons/apple-touch-icon.png" />
17
- <!-- The console3 shell (header, tabs, three columns, dock), served as the default page at / (and still at /c3.html). It
18
- composes the real views from pm/; the older shell (index.html) is served at /classic.html. Tokens and fonts are shared, so light and dark both resolve. pm/c3-boot.js loads the phone companion alone at phone width (c3-phone-boot.js) and the desktop console (pm/c3-shell.js) otherwise; the shell sets the
19
- theme attribute (default light, like the mockup). The nonce meta is filled by the server the way it is for /, so a press
20
- from a view (Add, Accept, Allow) carries it. -->
21
- <link rel="preload" href="/vendor/ibm-plex-mono-400.woff2" as="font" type="font/woff2" crossorigin />
22
- <link rel="preload" href="/vendor/ibm-plex-mono-500.woff2" as="font" type="font/woff2" crossorigin />
23
- <link rel="stylesheet" href="/pm/tokens.css" />
24
- <style>
25
- html { background: var(--background); }
26
- body { margin: 0; background: var(--background); color: var(--foreground); }
27
- noscript { display: block; padding: 16px; font-family: var(--font-mono, monospace); }
28
- </style>
29
- </head>
30
- <body>
31
- <div id="c3-root" class="c3 c3pg" data-pm-theme="light"></div>
32
- <noscript>This page needs JavaScript.</noscript>
33
- <script type="module" src="/pm/c3-boot.js"></script>
34
- </body>
35
- </html>
@@ -1,156 +0,0 @@
1
- <!doctype html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
6
- <meta name="pmos-nonce" content="" />
7
- <title>PMOS workspace</title>
8
- <!-- workspace-phone-app: Add to Home Screen. The manifest is fetched WITH credentials because over the
9
- tailnet every request needs the session cookie, and a manifest fetch sends none by default. The
10
- apple-* tags are what iOS reads instead of the manifest. "black" keeps the page below the status
11
- bar; the top bar does not pad for a translucent one. -->
12
- <link rel="manifest" href="/manifest.webmanifest" crossorigin="use-credentials" />
13
- <meta name="theme-color" content="#090b0c" />
14
- <meta name="mobile-web-app-capable" content="yes" />
15
- <meta name="apple-mobile-web-app-capable" content="yes" />
16
- <meta name="apple-mobile-web-app-title" content="PMOS" />
17
- <meta name="apple-mobile-web-app-status-bar-style" content="black" />
18
- <link rel="apple-touch-icon" href="/icons/apple-touch-icon.png" />
19
- <!-- The terminal's face is preloaded, not left to be discovered. An @font-face is only fetched when
20
- something first RENDERS in it, which for Plex Mono is about the same moment a tab constructs
21
- the first xterm — and xterm measures its cell from whatever face is resolved at construction.
22
- Starting the fetch here, during head parse, means the real metrics are in place before the
23
- first terminal exists. -->
24
- <link rel="preload" href="/vendor/ibm-plex-mono-400.woff2" as="font" type="font/woff2" crossorigin />
25
- <link rel="preload" href="/vendor/ibm-plex-mono-700.woff2" as="font" type="font/woff2" crossorigin />
26
- <link rel="stylesheet" href="/vendor/xterm.css" />
27
- <link rel="stylesheet" href="/pm/tokens.css" />
28
- <!-- The phone surface's stylesheet. It is a separate file from tokens.css on purpose: tokens.css is
29
- a verbatim copy of the design prototype's token block and is diffed mechanically against it, so
30
- a media query added there would read as a defect. Everything below the ≤760px breakpoint lives
31
- here instead, and above the breakpoint this file declares nothing but `display:none`. -->
32
- <link rel="stylesheet" href="/pm/mobile.css" />
33
- <!-- xterm and its addons come straight from node_modules through the local server, as globals, so
34
- the terminal tab can attach a real PTY. No CDN anywhere: this app renders, and works, offline. -->
35
- <script src="/vendor/xterm.js"></script>
36
- <script src="/vendor/addon-fit.js"></script>
37
- <script src="/vendor/addon-web-links.js"></script>
38
- <!-- ONE table, TWO consumers (W7). The words and glyphs a session is described with — working,
39
- quiet, needs you, blocked — live in exactly one file, which the SERVER requires and the browser
40
- loads here. A second copy would be free to drift, and the sidebar and the server would end up
41
- holding different opinions about one session. Loaded before the module graph so a panel can
42
- bind from window.PMOSSessionState rather than re-typing a word. -->
43
- <script src="/lib/session-state.js"></script>
44
- <!-- ONE module, TWO consumers, again (workspace-session-choice). Who shares a working tree, and
45
- what ending one of those sessions would cost, is computed by the SERVER when it writes the
46
- advisory into a new pane's scrollback and by the BROWSER when it draws the + session chooser.
47
- Both read this file, so the sentence in the terminal and the sentence in the chooser cannot
48
- drift apart. Classic script (a UMD setting window.PMOSTreeShare), like the two above. -->
49
- <script src="/lib/tree-share.js"></script>
50
- <!-- The session→initiative join, made once over every session instead of once per initiative
51
- (workspace-active-visibility). The SERVER makes the same two-hopper per initiative inside
52
- /api/initiative (lib/four-panel.js sessionsFor); the BOARD needs it for 178 rows at once and
53
- cannot spend 178 requests on it. Loaded here rather than imported so it stays walkable in node
54
- — test.js requires it and walks its whole input domain. It reads window.PMOSSessionState for
55
- the attention order, so it must come AFTER that script. -->
56
- <script src="/lib/working-set.js"></script>
57
- <!-- Group-by-status for the initiative list: the order and the mapping from the DERIVED status, walkable in node. -->
58
- <script src="/lib/status-groups.js"></script>
59
- <!-- The phone's navigation reducer. DOM-free, loaded as a classic script (it is a UMD that sets
60
- window.PMOSMobileNav) and required by test.js, so the whole screen domain is walkable in node
61
- rather than only in a browser. pm/mobile.js reads it from the global; the module graph does not
62
- import it, because a second copy of the reducer is exactly the drift it was extracted to stop. -->
63
- <script src="/lib/mobile-nav.js"></script>
64
- <!-- ONE classifier, both sides (workspace-reader-preview). What the reader may do with a file —
65
- markdown, escaped text, an HTML page, an image — is decided by this module, which server.js
66
- requires for its read endpoints and the doc tab reads here as window.PreviewKind. A second
67
- opinion about what an .html file is would mean the endpoint and the pane disagreeing about the
68
- same document. Classic script (a UMD), like the three above. -->
69
- <script src="/lib/preview-kind.js"></script>
70
- <!-- The newline normalizer behind the doc tab's `normalize` action (markdown-newlines). The same
71
- file scripts/md-newlines.js requires, loaded here as window.MdNormalize, so the one-click
72
- repair and the CI ratchet can never disagree about what a normalized document is. -->
73
- <script src="/lib/md-normalize.js"></script>
74
- <!-- pm-os-absorb: the words an initiative shows (R3), read from its derived ladder and never typed. The same file the
75
- server and the report drafter require, loaded here as window.PMOSInitiativeDisplay. -->
76
- <script src="/lib/initiative-display.js"></script>
77
- <!-- pm-os-absorb: the dated bars of a breakdown (R20), one engine for both Timelines and the report strip, loaded here
78
- as window.PMOSItemSpans. -->
79
- <script src="/lib/item-spans.js"></script>
80
- <link rel="preload" href="/vendor/ibm-plex-mono-500.woff2" as="font" type="font/woff2" crossorigin />
81
- </head>
82
- <body>
83
- <!-- ── the phone surface (≤760px) ────────────────────────────────────────────────────────────────
84
- Everything else on this page is built by pm/app.js; these two blocks are markup because they
85
- are the phone's CHROME, and chrome that exists in the document is chrome a screen reader can
86
- reach in source order — the top bar above the content, the destination nav below it.
87
-
88
- `hidden` is the SHIPPED state of both. pm/mobile.js removes it only at ≤760px, so above the
89
- breakpoint this is absent from the accessibility tree rather than merely invisible: a desktop
90
- PM must not be able to tab into a second navigation system they cannot see. -->
91
-
92
- <!-- The top bar: back · Repository · the screen's name (on a pushed screen only) · search · Settings (the frame; the old shell shows its
93
- brand and theme in place of Repository and Settings). It sits ABOVE .body in
94
- DOM order because it is the row above the content on screen, and putting it beside the bottom
95
- nav would read the app backwards. -->
96
- <div class="mob" id="mobShell" hidden>
97
- <header class="mob-bar" id="mobBar">
98
- <button class="mob-back" id="mobBack" type="button" hidden aria-label="Back"><svg class="pmc-icon" width="16" height="16" aria-hidden="true" focusable="false" data-icon="chevron-left"><use href="#lucide-chevron-left"></use></svg><span>Back</span></button>
99
- <span class="mob-brand" id="mobBrand" aria-hidden="true">PMOS</span>
100
- <button class="mob-repo" id="mobRepo" type="button" hidden aria-haspopup="menu">Repository</button>
101
- <span class="mob-title" id="mobTitle"></span>
102
- <!-- The jump palette lives HERE, not in the control bar below. Two reasons, and the second is
103
- the binding one: it is not a terminal control key (every other button in the bar writes a
104
- PTY sequence), and that bar is `overflow-x:auto` with seven 44px targets, so at 390px its
105
- last child sits past the right edge — reachable only by a horizontal scroll nobody would
106
- guess at. A control the PM cannot see is the hover-only trap in another costume. The
107
- palette is a jump control for every destination, so it belongs in the bar that is always
108
- on screen. -->
109
- <!-- A magnifier, not the letters ⌘K: a phone has no ⌘ key. It opens the same palette as ⌘K on a desktop, where you
110
- search and capture. It replaced the "Search or capture" control that was pinned above Today, so a phone screen
111
- now leads with its one job and search is in one place on every tab. -->
112
- <button class="mob-pal" id="mobPalette" type="button" aria-label="Search or capture" aria-keyshortcuts="Meta+K Control+K"><svg class="pmc-icon" width="16" height="16" aria-hidden="true" focusable="false" data-icon="search"><use href="#lucide-search"></use></svg></button>
113
- <button class="mob-theme" id="mobTheme" type="button" aria-label="Toggle theme"><svg class="pmc-icon" width="16" height="16" aria-hidden="true" focusable="false" data-icon="moon"><use href="#lucide-moon"></use></svg></button>
114
- <button class="mob-sync" id="mobSync" type="button" hidden>Sync</button>
115
- <button class="mob-set" id="mobSettings" type="button" hidden aria-current="false" aria-label="Settings"><svg class="pmc-icon" width="18" height="18" aria-hidden="true" focusable="false" data-icon="settings"><use href="#lucide-settings"></use></svg></button>
116
- </header>
117
- <!-- The list head (pm/phone-deck.js): at a tab's root, how many things the list holds and, where the tab has a
118
- second view, the switch to it (Agenda: Needs you or My day; Initiatives: Roadmap or All; Board: Board or Reports;
119
- Docs: Out of sync or All). The list under it scrolls on its own; the head and the tabs stay put. -->
120
- <div class="mob-deck" id="mobDeck" hidden>
121
- <span class="mob-deck__where" id="mobDeckWhere" aria-live="polite"></span>
122
- <span class="mob-deck__views" id="mobDeckViews" role="group" aria-label="View"></span>
123
- </div>
124
- </div>
125
-
126
- <!-- The bottom block: a terminal control-key accessory bar (terminal screen only — phones have no
127
- Esc/Tab/Ctrl/arrows) and the five tabs (workspace-phone-scroll-layout): Agenda · Initiatives · Board · Docs · Agent,
128
- each an icon over a short word. Reports has no tab of its own: it is the Board tab's second view, switched from the
129
- head above the list, and Board stays lit while it is shown. Agent is the dock with its live terminals. On a terminal
130
- the tabs are not drawn: the session takes the screen, and Back returns. The nav is a <nav> of buttons carrying
131
- aria-current, NOT a tablist: there is no tabpanel to point at. Selecting a tab resets it to its root; depth is pushed
132
- on top of it and #mobBack pops one screen. -->
133
- <div class="mobmenu" id="mobMenu" hidden>
134
- <div class="ctrlbar" id="ctrlBar" role="toolbar" aria-label="Terminal control keys">
135
- <button type="button" data-seq="esc" aria-label="Escape"><span class="lbl">esc</span></button>
136
- <button type="button" data-seq="tab" aria-label="Tab"><span class="lbl">tab</span></button>
137
- <button type="button" id="ctrlKey" aria-pressed="false" aria-label="Control modifier (one-shot)"><span class="lbl">ctrl</span></button>
138
- <button type="button" data-seq="left" aria-label="Left arrow"><svg class="pmc-icon" width="16" height="16" aria-hidden="true" focusable="false" data-icon="arrow-left"><use href="#lucide-arrow-left"></use></svg></button>
139
- <button type="button" data-seq="up" aria-label="Up arrow"><svg class="pmc-icon" width="16" height="16" aria-hidden="true" focusable="false" data-icon="arrow-up"><use href="#lucide-arrow-up"></use></svg></button>
140
- <button type="button" data-seq="down" aria-label="Down arrow"><svg class="pmc-icon" width="16" height="16" aria-hidden="true" focusable="false" data-icon="arrow-down"><use href="#lucide-arrow-down"></use></svg></button>
141
- <button type="button" data-seq="right" aria-label="Right arrow"><svg class="pmc-icon" width="16" height="16" aria-hidden="true" focusable="false" data-icon="arrow-right"><use href="#lucide-arrow-right"></use></svg></button>
142
- </div>
143
- <nav class="mobnav" id="mobNav" aria-label="Destinations">
144
- <button type="button" class="mobnav-b" data-dest="today" aria-current="page"><svg class="pmc-icon mobnav-i" width="22" height="22" aria-hidden="true" focusable="false" data-icon="house"><use href="#lucide-house"></use></svg><span class="l">Agenda</span><span class="mobnav-n" id="mobTodayCount" hidden></span></button>
145
- <button type="button" class="mobnav-b" data-dest="initiatives" aria-current="false"><svg class="pmc-icon mobnav-i" width="22" height="22" aria-hidden="true" focusable="false" data-icon="target"><use href="#lucide-target"></use></svg><span class="l">Initiatives</span></button>
146
- <button type="button" class="mobnav-b" data-dest="board" aria-current="false"><svg class="pmc-icon mobnav-i" width="22" height="22" aria-hidden="true" focusable="false" data-icon="square-kanban"><use href="#lucide-square-kanban"></use></svg><span class="l">Board</span></button>
147
- <button type="button" class="mobnav-b" data-dest="docs" aria-current="false"><svg class="pmc-icon mobnav-i" width="22" height="22" aria-hidden="true" focusable="false" data-icon="file-text"><use href="#lucide-file-text"></use></svg><span class="l">Docs</span></button>
148
- <button type="button" class="mobnav-b" data-dest="agent" aria-current="false"><svg class="pmc-icon mobnav-i" width="22" height="22" aria-hidden="true" focusable="false" data-icon="square-terminal"><use href="#lucide-square-terminal"></use></svg><span class="l">Agent</span></button>
149
- </nav>
150
- </div>
151
-
152
- <!-- The rest of the surface is built by pm/app.js: the root element carries data-pm-theme and is
153
- appended here at boot. Nothing is server-rendered, so there is no markup here to keep in sync. -->
154
- <script type="module" src="/pm/app.js"></script>
155
- </body>
156
- </html>