create-pmos 0.399.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 (421) hide show
  1. package/package.json +18 -13
  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 +2 -2
  8. package/workspace/briefing-premium-doc-edit-test.js +2 -8
  9. package/workspace/briefing-premium-test.js +3 -2
  10. package/workspace/briefing-premium-work-test.js +9 -4
  11. package/workspace/c3-capture-test.js +0 -17
  12. package/workspace/changelog.json +17 -0
  13. package/workspace/guide/briefing-premium.md +2 -2
  14. package/workspace/guide/home.md +20 -2
  15. package/workspace/guide/layout.md +2 -2
  16. package/workspace/guide/notes.md +2 -2
  17. package/workspace/guide/phone-companion.md +1 -1
  18. package/workspace/lib/route-modules.js +1 -9
  19. package/workspace/lib/routes-phone-day.js +18 -9
  20. package/workspace/lib/routes-slash.js +95 -0
  21. package/workspace/package-lock.json +2 -2
  22. package/workspace/package.json +1 -2
  23. package/workspace/premium-chat-goal-view-test.js +1 -1
  24. package/workspace/premium-chat-term-test.js +0 -10
  25. package/workspace/premium-menu-rows-test.js +1 -1
  26. package/workspace/premium-phone-card-test.js +2 -2
  27. package/workspace/premium-vw-doc-test.js +1 -8
  28. package/workspace/premium-work-depth-test.js +2 -3
  29. package/workspace/public/capture.html +23 -0
  30. package/workspace/public/pm/c3-base.js +47 -0
  31. package/workspace/public/pm/c3-capture.js +1 -1
  32. package/workspace/public/pm/c3-ini-ui.js +1 -1
  33. package/workspace/public/pm/c3-sheet.js +1 -1
  34. package/workspace/public/pm/c3-toast.js +1 -1
  35. package/workspace/public/pm/console3.css +3 -0
  36. package/workspace/public/pm/cozy-home.css +20 -5
  37. package/workspace/public/pm/cozy-today.css +5 -2
  38. package/workspace/public/pm/cozy-viewer.js +4 -2
  39. package/workspace/public/pm/cozy.css +9 -0
  40. package/workspace/public/pm/goal-chat.js +5 -1
  41. package/workspace/public/pm/home-app.js +47 -26
  42. package/workspace/public/pm/home-chat.js +10 -4
  43. package/workspace/public/pm/home-data.js +3 -1
  44. package/workspace/public/pm/home-dictate.js +7 -4
  45. package/workspace/public/pm/home-ini.js +12 -2
  46. package/workspace/public/pm/home-list.js +20 -7
  47. package/workspace/public/pm/home-more.js +2 -2
  48. package/workspace/public/pm/home-phone-card.js +9 -4
  49. package/workspace/public/pm/home-review.js +2 -3
  50. package/workspace/public/pm/home-today.js +10 -6
  51. package/workspace/public/pm/home-work.js +15 -8
  52. package/workspace/public/pm/note-dock.js +1 -2
  53. package/workspace/public/pm/notes-links.js +1 -2
  54. package/workspace/public/pm/notes-task.js +3 -4
  55. package/workspace/public/pm/premium-board.js +1 -1
  56. package/workspace/public/pm/premium-initiative-head.js +3 -3
  57. package/workspace/public/pm/premium-vw-doc.css +20 -2
  58. package/workspace/public/pm/premium-vw-doc.js +22 -7
  59. package/workspace/public/pm/view-notes.js +2 -2
  60. package/workspace/replaced-tests.json +435 -0
  61. package/workspace/run-tests.js +323 -28
  62. package/workspace/server.js +15 -10
  63. package/workspace/test-files.json +3 -140
  64. package/workspace/test-lists/base.json +1 -2
  65. package/workspace/test-lists/c3-desktop-light-load.json +1 -2
  66. package/workspace/test-lists/c3-initiative-boards.json +1 -2
  67. package/workspace/test-lists/c3-meeting-focus.json +2 -12
  68. package/workspace/test-lists/c3-work-agent.json +1 -2
  69. package/workspace/test-lists/calendar-tidy-up.json +1 -2
  70. package/workspace/test-lists/console3-reports.json +1 -2
  71. package/workspace/test-lists/docs-three-way-sync.json +1 -2
  72. package/workspace/test-lists/extension-capture.json +5 -0
  73. package/workspace/test-lists/jira-wbs.json +1 -2
  74. package/workspace/test-lists/legacy-cleanup-a.json +9 -0
  75. package/workspace/test-lists/meeting-material.json +1 -2
  76. package/workspace/test-lists/meeting-notes.json +2 -36
  77. package/workspace/test-lists/meeting-replay.json +1 -2
  78. package/workspace/test-lists/mm-capture.json +2 -12
  79. package/workspace/test-lists/my-work.json +2 -10
  80. package/workspace/test-lists/onboarding-firstrun.json +2 -12
  81. package/workspace/test-lists/people-directory.json +1 -2
  82. package/workspace/test-lists/run2-a.json +1 -2
  83. package/workspace/test-lists/run2-d.json +2 -19
  84. package/workspace/test-lists/run3-b.json +1 -2
  85. package/workspace/test-lists/run3-c.json +2 -12
  86. package/workspace/test-lists/run4-b.json +1 -2
  87. package/workspace/test-lists/run4-d.json +1 -5
  88. package/workspace/test-lists/run5-c.json +1 -11
  89. package/workspace/test-lists/run6.json +1 -5
  90. package/workspace/test-lists/workspace-launch-flags.json +2 -12
  91. package/workspace/test-lists/workspace-profile-detection.json +2 -10
  92. package/workspace/test-timings.json +242 -123
  93. package/workspace/c3-briefing-test.js +0 -136
  94. package/workspace/c3-core-docs-test.js +0 -170
  95. package/workspace/c3-driver-fixture.js +0 -64
  96. package/workspace/c3-driver-test.js +0 -169
  97. package/workspace/c3-foundation-test.js +0 -163
  98. package/workspace/c3-ib-items-test.js +0 -114
  99. package/workspace/c3-ib-more-test.js +0 -146
  100. package/workspace/c3-ib-triage-backlog-test.js +0 -128
  101. package/workspace/c3-ini-harness.js +0 -66
  102. package/workspace/c3-ini-life-test.js +0 -167
  103. package/workspace/c3-initiatives-test.js +0 -186
  104. package/workspace/c3-light-load-test.js +0 -112
  105. package/workspace/c3-one-home-test.js +0 -149
  106. package/workspace/c3-phone-test.js +0 -289
  107. package/workspace/c3-quiet-test.js +0 -157
  108. package/workspace/c3-report-design-real-test.js +0 -264
  109. package/workspace/c3-report-design-test.js +0 -442
  110. package/workspace/c3-report-setup-test.js +0 -192
  111. package/workspace/c3-report-structure-real-test.js +0 -248
  112. package/workspace/c3-report-structure-test.js +0 -397
  113. package/workspace/c3-reports-test.js +0 -288
  114. package/workspace/c3-scan-test.js +0 -517
  115. package/workspace/c3-sessions-panel-test.js +0 -365
  116. package/workspace/c3-settings-test.js +0 -204
  117. package/workspace/c3-updates-test.js +0 -131
  118. package/workspace/c3-work-test.js +0 -260
  119. package/workspace/cut-stub.js +0 -40
  120. package/workspace/first-paint-audit.js +0 -160
  121. package/workspace/lib/c3-full-console.js +0 -15
  122. package/workspace/lib/engine/derived/trust.js +0 -3
  123. package/workspace/lib/engine/plan-forecast.js +0 -342
  124. package/workspace/lib/engine/report-families.js +0 -175
  125. package/workspace/lib/engine/truth-table.js +0 -57
  126. package/workspace/lib/routes-c3-init.js +0 -54
  127. package/workspace/lib/routes-c3-life.js +0 -120
  128. package/workspace/lib/routes-c3-timeline.js +0 -192
  129. package/workspace/lib/routes-forecast.js +0 -86
  130. package/workspace/lib/routes-releases.js +0 -130
  131. package/workspace/lib/routes-report-facts.js +0 -85
  132. package/workspace/lib/routes-report-families.js +0 -33
  133. package/workspace/lib/routes-signals.js +0 -51
  134. package/workspace/lib/routes-timeline.js +0 -197
  135. package/workspace/public/c3.html +0 -35
  136. package/workspace/public/index.html +0 -156
  137. package/workspace/public/pm/app.js +0 -831
  138. package/workspace/public/pm/bd-board.js +0 -159
  139. package/workspace/public/pm/bd-drag.js +0 -59
  140. package/workspace/public/pm/bd-model.js +0 -152
  141. package/workspace/public/pm/bd-timeline.js +0 -233
  142. package/workspace/public/pm/bd-tree.js +0 -244
  143. package/workspace/public/pm/board-copy.js +0 -59
  144. package/workspace/public/pm/board-read.js +0 -38
  145. package/workspace/public/pm/branches-sheet.js +0 -56
  146. package/workspace/public/pm/breakdown-api.js +0 -58
  147. package/workspace/public/pm/breakdown-copy.js +0 -138
  148. package/workspace/public/pm/briefing-deck.js +0 -441
  149. package/workspace/public/pm/briefing-model.js +0 -251
  150. package/workspace/public/pm/c3-ambient.js +0 -100
  151. package/workspace/public/pm/c3-audience-link.js +0 -21
  152. package/workspace/public/pm/c3-audience.js +0 -46
  153. package/workspace/public/pm/c3-boot.js +0 -13
  154. package/workspace/public/pm/c3-breakdown.js +0 -240
  155. package/workspace/public/pm/c3-brief-data.js +0 -11
  156. package/workspace/public/pm/c3-brief-mentions.js +0 -137
  157. package/workspace/public/pm/c3-brief-needs.js +0 -288
  158. package/workspace/public/pm/c3-brief-pulse.js +0 -112
  159. package/workspace/public/pm/c3-brief-summary.js +0 -139
  160. package/workspace/public/pm/c3-brief-today.js +0 -79
  161. package/workspace/public/pm/c3-brief.js +0 -279
  162. package/workspace/public/pm/c3-cal-strategy.js +0 -529
  163. package/workspace/public/pm/c3-calendar.js +0 -965
  164. package/workspace/public/pm/c3-calpop.js +0 -111
  165. package/workspace/public/pm/c3-case.js +0 -196
  166. package/workspace/public/pm/c3-core-docs.css +0 -18
  167. package/workspace/public/pm/c3-core-docs.js +0 -236
  168. package/workspace/public/pm/c3-daypart.js +0 -176
  169. package/workspace/public/pm/c3-demo-boards.js +0 -764
  170. package/workspace/public/pm/c3-demo-brief-ix.js +0 -350
  171. package/workspace/public/pm/c3-demo-brief-page.js +0 -70
  172. package/workspace/public/pm/c3-demo-cal-ix.js +0 -74
  173. package/workspace/public/pm/c3-demo-cal2.js +0 -66
  174. package/workspace/public/pm/c3-demo-cal3.js +0 -173
  175. package/workspace/public/pm/c3-demo-cal4.js +0 -169
  176. package/workspace/public/pm/c3-demo-cal5.js +0 -52
  177. package/workspace/public/pm/c3-demo-coredocs.js +0 -221
  178. package/workspace/public/pm/c3-demo-data.js +0 -552
  179. package/workspace/public/pm/c3-demo-focus.js +0 -181
  180. package/workspace/public/pm/c3-demo-init.js +0 -430
  181. package/workspace/public/pm/c3-demo-life.js +0 -77
  182. package/workspace/public/pm/c3-demo-material.js +0 -58
  183. package/workspace/public/pm/c3-demo-misc2.js +0 -34
  184. package/workspace/public/pm/c3-demo-phone.js +0 -48
  185. package/workspace/public/pm/c3-demo-plan2.js +0 -30
  186. package/workspace/public/pm/c3-demo-rd.js +0 -432
  187. package/workspace/public/pm/c3-demo-rep-ix.js +0 -126
  188. package/workspace/public/pm/c3-demo-rep2.js +0 -130
  189. package/workspace/public/pm/c3-demo-rep3.js +0 -138
  190. package/workspace/public/pm/c3-demo-rs.js +0 -287
  191. package/workspace/public/pm/c3-demo-term.js +0 -153
  192. package/workspace/public/pm/c3-demo-time.js +0 -49
  193. package/workspace/public/pm/c3-demo-work-ix.js +0 -32
  194. package/workspace/public/pm/c3-demo.js +0 -131
  195. package/workspace/public/pm/c3-design-studio.js +0 -369
  196. package/workspace/public/pm/c3-doc-formats.js +0 -153
  197. package/workspace/public/pm/c3-doc-sheet.js +0 -1230
  198. package/workspace/public/pm/c3-dock.js +0 -206
  199. package/workspace/public/pm/c3-docs.js +0 -291
  200. package/workspace/public/pm/c3-driver-work.js +0 -110
  201. package/workspace/public/pm/c3-driver.css +0 -18
  202. package/workspace/public/pm/c3-driver.js +0 -298
  203. package/workspace/public/pm/c3-focus.css +0 -304
  204. package/workspace/public/pm/c3-focus.js +0 -983
  205. package/workspace/public/pm/c3-ib-docs.js +0 -92
  206. package/workspace/public/pm/c3-ib-initiatives.js +0 -201
  207. package/workspace/public/pm/c3-ib-items.js +0 -210
  208. package/workspace/public/pm/c3-ib-releases.js +0 -48
  209. package/workspace/public/pm/c3-ib-sprints.js +0 -201
  210. package/workspace/public/pm/c3-ib-triage.js +0 -177
  211. package/workspace/public/pm/c3-ii-tabs.js +0 -252
  212. package/workspace/public/pm/c3-ini-life.css +0 -34
  213. package/workspace/public/pm/c3-ini-life.js +0 -379
  214. package/workspace/public/pm/c3-ini-records.js +0 -197
  215. package/workspace/public/pm/c3-ini-timeline.js +0 -278
  216. package/workspace/public/pm/c3-ini-work.js +0 -139
  217. package/workspace/public/pm/c3-init-extras.js +0 -170
  218. package/workspace/public/pm/c3-initiatives.js +0 -852
  219. package/workspace/public/pm/c3-lifecycle-panels.js +0 -479
  220. package/workspace/public/pm/c3-look.js +0 -27
  221. package/workspace/public/pm/c3-material.css +0 -22
  222. package/workspace/public/pm/c3-material.js +0 -321
  223. package/workspace/public/pm/c3-md.js +0 -3
  224. package/workspace/public/pm/c3-misc-panels.js +0 -89
  225. package/workspace/public/pm/c3-new-session.js +0 -110
  226. package/workspace/public/pm/c3-notes.js +0 -751
  227. package/workspace/public/pm/c3-phone-boot.js +0 -47
  228. package/workspace/public/pm/c3-phone-detail.js +0 -97
  229. package/workspace/public/pm/c3-phone-model.js +0 -3
  230. package/workspace/public/pm/c3-phone.css +0 -66
  231. package/workspace/public/pm/c3-phone.js +0 -444
  232. package/workspace/public/pm/c3-plan-panels.js +0 -163
  233. package/workspace/public/pm/c3-plan.js +0 -193
  234. package/workspace/public/pm/c3-quiet.css +0 -113
  235. package/workspace/public/pm/c3-quiet.js +0 -177
  236. package/workspace/public/pm/c3-replay.css +0 -133
  237. package/workspace/public/pm/c3-replay.js +0 -429
  238. package/workspace/public/pm/c3-report-deck.css +0 -163
  239. package/workspace/public/pm/c3-report-deck.js +0 -598
  240. package/workspace/public/pm/c3-report-frame.css +0 -20
  241. package/workspace/public/pm/c3-report-print.css +0 -20
  242. package/workspace/public/pm/c3-report-setup.css +0 -67
  243. package/workspace/public/pm/c3-report-setup.js +0 -298
  244. package/workspace/public/pm/c3-report-store.js +0 -244
  245. package/workspace/public/pm/c3-report-structure.css +0 -44
  246. package/workspace/public/pm/c3-report-structure.js +0 -473
  247. package/workspace/public/pm/c3-reports.css +0 -68
  248. package/workspace/public/pm/c3-reports.js +0 -377
  249. package/workspace/public/pm/c3-roadmap.js +0 -249
  250. package/workspace/public/pm/c3-scan-api.js +0 -167
  251. package/workspace/public/pm/c3-scan-next.js +0 -248
  252. package/workspace/public/pm/c3-scan-setup.js +0 -313
  253. package/workspace/public/pm/c3-scan-words.js +0 -41
  254. package/workspace/public/pm/c3-scan.css +0 -74
  255. package/workspace/public/pm/c3-scan.js +0 -93
  256. package/workspace/public/pm/c3-session-chat.js +0 -103
  257. package/workspace/public/pm/c3-session-conv.js +0 -165
  258. package/workspace/public/pm/c3-session-term.js +0 -216
  259. package/workspace/public/pm/c3-settings.css +0 -85
  260. package/workspace/public/pm/c3-settings.js +0 -1045
  261. package/workspace/public/pm/c3-shell.js +0 -628
  262. package/workspace/public/pm/c3-signals.js +0 -196
  263. package/workspace/public/pm/c3-strategy-panels.js +0 -45
  264. package/workspace/public/pm/c3-swipe.js +0 -230
  265. package/workspace/public/pm/c3-terminal-data.js +0 -48
  266. package/workspace/public/pm/c3-terminal-edge.js +0 -91
  267. package/workspace/public/pm/c3-terminal-icons.js +0 -40
  268. package/workspace/public/pm/c3-terminal-results.js +0 -141
  269. package/workspace/public/pm/c3-terminal.js +0 -52
  270. package/workspace/public/pm/c3-tickets.js +0 -163
  271. package/workspace/public/pm/c3-timeline.js +0 -201
  272. package/workspace/public/pm/calendar-views.js +0 -1049
  273. package/workspace/public/pm/console3-lift.md +0 -220
  274. package/workspace/public/pm/cozy-home.js +0 -172
  275. package/workspace/public/pm/cozy-initiative.css +0 -138
  276. package/workspace/public/pm/cycle-review.js +0 -125
  277. package/workspace/public/pm/data.js +0 -1577
  278. package/workspace/public/pm/dest-board.js +0 -444
  279. package/workspace/public/pm/dest-docs.js +0 -530
  280. package/workspace/public/pm/dest-initiatives.js +0 -162
  281. package/workspace/public/pm/dest-mywork.js +0 -307
  282. package/workspace/public/pm/dest-notes.js +0 -537
  283. package/workspace/public/pm/dest-people.js +0 -449
  284. package/workspace/public/pm/dest-reports.js +0 -383
  285. package/workspace/public/pm/dest-settings.js +0 -601
  286. package/workspace/public/pm/dest-today.js +0 -267
  287. package/workspace/public/pm/display-word.js +0 -56
  288. package/workspace/public/pm/doc-editor.js +0 -473
  289. package/workspace/public/pm/doc-graph.js +0 -272
  290. package/workspace/public/pm/doc-health-panel.js +0 -110
  291. package/workspace/public/pm/doc-rail.js +0 -167
  292. package/workspace/public/pm/doc-remote.js +0 -180
  293. package/workspace/public/pm/dock-sessions.js +0 -472
  294. package/workspace/public/pm/dock.js +0 -216
  295. package/workspace/public/pm/fixture.js +0 -821
  296. package/workspace/public/pm/flag-picker.js +0 -104
  297. package/workspace/public/pm/frame-copy.js +0 -278
  298. package/workspace/public/pm/freshness-line.js +0 -149
  299. package/workspace/public/pm/handoff-box.js +0 -82
  300. package/workspace/public/pm/initiative-list.js +0 -235
  301. package/workspace/public/pm/initiative-sheet.js +0 -331
  302. package/workspace/public/pm/initiatives-api.js +0 -95
  303. package/workspace/public/pm/initiatives-copy.js +0 -287
  304. package/workspace/public/pm/initiatives-timeline-copy.js +0 -59
  305. package/workspace/public/pm/initiatives-timeline.js +0 -410
  306. package/workspace/public/pm/initiatives-ui.js +0 -291
  307. package/workspace/public/pm/item-sheet.js +0 -268
  308. package/workspace/public/pm/keep-card.js +0 -204
  309. package/workspace/public/pm/lifecycle-lens-model.js +0 -246
  310. package/workspace/public/pm/lifecycle-lens.js +0 -276
  311. package/workspace/public/pm/lifecycle.js +0 -111
  312. package/workspace/public/pm/mobile.css +0 -366
  313. package/workspace/public/pm/mobile.js +0 -581
  314. package/workspace/public/pm/modes-live.js +0 -453
  315. package/workspace/public/pm/modes.js +0 -147
  316. package/workspace/public/pm/my-work-card.js +0 -51
  317. package/workspace/public/pm/my-work-data.js +0 -36
  318. package/workspace/public/pm/new-initiative-sheet.js +0 -169
  319. package/workspace/public/pm/next-step-ui.js +0 -190
  320. package/workspace/public/pm/outbox-panel.js +0 -125
  321. package/workspace/public/pm/palette-copy.js +0 -55
  322. package/workspace/public/pm/palette.js +0 -343
  323. package/workspace/public/pm/panel-breakdown.js +0 -702
  324. package/workspace/public/pm/panel-cockpit.js +0 -425
  325. package/workspace/public/pm/panel-detail.js +0 -1513
  326. package/workspace/public/pm/panel-initiatives.js +0 -929
  327. package/workspace/public/pm/panel-newsess.js +0 -709
  328. package/workspace/public/pm/panel-repos.js +0 -741
  329. package/workspace/public/pm/panel-tabs.js +0 -1506
  330. package/workspace/public/pm/panel-trees.js +0 -204
  331. package/workspace/public/pm/people-link.js +0 -106
  332. package/workspace/public/pm/phone-deck.js +0 -167
  333. package/workspace/public/pm/pm-work-view.js +0 -1533
  334. package/workspace/public/pm/portfolio-report.js +0 -61
  335. package/workspace/public/pm/premium-acts.js +0 -280
  336. package/workspace/public/pm/premium-brief.js +0 -111
  337. package/workspace/public/pm/premium-chat.js +0 -22
  338. package/workspace/public/pm/premium-doc-sheet.js +0 -312
  339. package/workspace/public/pm/premium-initiative.js +0 -324
  340. package/workspace/public/pm/premium-insights.css +0 -228
  341. package/workspace/public/pm/premium-metric-tiles.js +0 -68
  342. package/workspace/public/pm/premium-report-brief.js +0 -132
  343. package/workspace/public/pm/premium-vw-rec.js +0 -67
  344. package/workspace/public/pm/premium-wide.css +0 -30
  345. package/workspace/public/pm/print.css +0 -44
  346. package/workspace/public/pm/provider-cards.js +0 -136
  347. package/workspace/public/pm/registry.js +0 -203
  348. package/workspace/public/pm/release-card.js +0 -110
  349. package/workspace/public/pm/releases-view.js +0 -248
  350. package/workspace/public/pm/report-families-view.js +0 -505
  351. package/workspace/public/pm/report-slides.js +0 -438
  352. package/workspace/public/pm/report-tab.js +0 -33
  353. package/workspace/public/pm/report-view.js +0 -337
  354. package/workspace/public/pm/reports-copy.js +0 -134
  355. package/workspace/public/pm/roadmap.js +0 -294
  356. package/workspace/public/pm/run-card.js +0 -260
  357. package/workspace/public/pm/sessions-panel.js +0 -219
  358. package/workspace/public/pm/sheet-jira.js +0 -353
  359. package/workspace/public/pm/shell-bell.js +0 -163
  360. package/workspace/public/pm/shell-model.js +0 -83
  361. package/workspace/public/pm/shell-phone.js +0 -124
  362. package/workspace/public/pm/shell-readaloud.js +0 -53
  363. package/workspace/public/pm/shell-recording.js +0 -274
  364. package/workspace/public/pm/shell-ticker.js +0 -90
  365. package/workspace/public/pm/sig-watch.js +0 -41
  366. package/workspace/public/pm/slide-confirm.js +0 -163
  367. package/workspace/public/pm/slides-copy.js +0 -52
  368. package/workspace/public/pm/status-banner.js +0 -95
  369. package/workspace/public/pm/tab-doc.js +0 -859
  370. package/workspace/public/pm/tab-gone.js +0 -21
  371. package/workspace/public/pm/tab-term.js +0 -1210
  372. package/workspace/public/pm/tab-web.js +0 -90
  373. package/workspace/public/pm/timeline-copy.js +0 -48
  374. package/workspace/public/pm/timeline-forecast-view.js +0 -164
  375. package/workspace/public/pm/today-agenda.js +0 -331
  376. package/workspace/public/pm/today-cards.js +0 -244
  377. package/workspace/public/pm/today-copy.js +0 -506
  378. package/workspace/public/pm/today-day.js +0 -1371
  379. package/workspace/public/pm/today-goals.js +0 -297
  380. package/workspace/public/pm/today-jobs.js +0 -84
  381. package/workspace/public/pm/today-mentions.js +0 -50
  382. package/workspace/public/pm/topbar.js +0 -202
  383. package/workspace/public/pm/triage-card.js +0 -60
  384. package/workspace/public/pm/undo-hold.js +0 -103
  385. package/workspace/public/pm/view-addrepo.js +0 -208
  386. package/workspace/public/pm/view-files.js +0 -197
  387. package/workspace/public/pm/view-livenotes.js +0 -399
  388. package/workspace/public/pm/view-today.js +0 -13
  389. package/workspace/public/pm/view-validate.js +0 -171
  390. package/workspace/public/pm/welcome.js +0 -391
  391. package/workspace/public/pm/work-place.js +0 -68
  392. package/workspace/public/pm/xlsx-read.js +0 -117
  393. package/workspace/public/welcome.html +0 -22
  394. package/workspace/test-lists/browser-suites-green.json +0 -5
  395. package/workspace/test-lists/c3-core-docs.json +0 -9
  396. package/workspace/test-lists/c3-doc-sheet-rich.json +0 -6
  397. package/workspace/test-lists/c3-doc-sheet-size.json +0 -6
  398. package/workspace/test-lists/c3-doc-sheet-v2.json +0 -6
  399. package/workspace/test-lists/c3-ib-items.json +0 -9
  400. package/workspace/test-lists/c3-ib-more.json +0 -9
  401. package/workspace/test-lists/c3-ib-triage-backlog.json +0 -9
  402. package/workspace/test-lists/c3-ini-life.json +0 -9
  403. package/workspace/test-lists/c3-meeting-board.json +0 -5
  404. package/workspace/test-lists/c3-meeting-card.json +0 -5
  405. package/workspace/test-lists/c3-notes-place.json +0 -5
  406. package/workspace/test-lists/c3-notes-series.json +0 -5
  407. package/workspace/test-lists/calendar-time-page.json +0 -5
  408. package/workspace/test-lists/calpop.json +0 -4
  409. package/workspace/test-lists/console3-briefing.json +0 -9
  410. package/workspace/test-lists/console3-foundation.json +0 -9
  411. package/workspace/test-lists/console3-work-page.json +0 -9
  412. package/workspace/test-lists/premium-brief-parity.json +0 -9
  413. package/workspace/test-lists/report-design-studio-ui.json +0 -5
  414. package/workspace/test-lists/report-structure-ui.json +0 -11
  415. package/workspace/test-lists/report-workspace-ui.json +0 -5
  416. package/workspace/test-lists/run3-a.json +0 -5
  417. package/workspace/test-lists/run3-d.json +0 -6
  418. package/workspace/test-lists/run4-c.json +0 -13
  419. package/workspace/test-lists/today-goals-jobs-ui.json +0 -5
  420. package/workspace/test-lists/today-mentions-cards.json +0 -5
  421. package/workspace/test-lists/workspace-tabs-declutter.json +0 -13
@@ -1,244 +0,0 @@
1
- /* pm/bd-tree.js — the Breakdown's Tree (pm-os-absorb Run 1, PRD R18).
2
- *
3
- * Top to bottom: one Keep card per agent batch, then the initiative's stages in order — only those with items, proposals
4
- * or an owed step — then Other for items whose stage this profile does not have. A stage is a header (name, CURRENT,
5
- * "2 of 5 · 3 proposed", a chevron) over:
6
- * - the owed row, when the workflow says a step of this stage is still open. It is DERIVED from the ladder, so it has
7
- * no grip, no tick and no menu, and it never counts in progress;
8
- * - "Show n done", which folds the stage's done items away;
9
- * - the item rows: grip, tick, title over one meta line (owner · due · who changed it last, plus two signals at most),
10
- * and a ⋯ menu;
11
- * - Add item.
12
- * Collapsing a stage is the viewer's own choice, kept in this browser only; it never reaches a ledger.
13
- *
14
- * Keyboard (handled on the pane body by panel-breakdown.js): ArrowUp/Down or j/k move between rows and headers, Space
15
- * ticks, Enter opens, Alt+ArrowUp/Down moves a row, n adds an item after the focused row.
16
- */
17
-
18
- import { el } from './dom.js';
19
- import { row, iconButton, dragHandle, badge, button, field, signal, toast, SEL } from './primitives.js';
20
- import { COPY, shortDate, ownerLabel } from './breakdown-copy.js';
21
- import { keepCard } from './keep-card.js';
22
- import { removeLocal } from './bd-model.js';
23
- import { readDoc } from './data.js';
24
- import { COPY as IN_COPY } from './initiatives-copy.js';
25
-
26
- /* The starter list of an empty breakdown (Run 2, PRD R21): the bullet lines of planning/work-starters.md, read once per
27
- * workspace. A missing file is the plain case: the PM types the first item. */
28
- const starterCache = new Map(); // ws -> string[] | null (null = no list) | 'loading'
29
- export function parseStarters(text) {
30
- const body = String(text || '').replace(/^---\n[\s\S]*?\n---\n/, '');
31
- return body.split('\n').map((l) => /^\s*(?:[-*]|\d+[.)])\s+(?:\[[ xX]\]\s+)?(.+?)\s*$/.exec(l)).filter(Boolean).map((m) => m[1].slice(0, 200)).slice(0, 12);
32
- }
33
- function startersOf(ws, then) {
34
- const c = starterCache.get(ws);
35
- if (c === 'loading') return null;
36
- if (c !== undefined) return c;
37
- starterCache.set(ws, 'loading');
38
- readDoc('planning/work-starters.md', ws).then((t) => parseStarters(t), () => null).then((list) => {
39
- starterCache.set(ws, list && list.length ? list : null);
40
- if (then) then();
41
- });
42
- return null;
43
- }
44
-
45
- /** The signals of one item, most important first, two at most. `place` 'board' leaves out the state, which its column shows. */
46
- export function signalsFor(it, place) {
47
- const out = [];
48
- if (it.blocked) out.push(signal({ text: COPY.signals.blocked, tone: 'destructive', title: it.blocked.reason || null }));
49
- if (it.noEvidence) out.push(signal({ text: COPY.signals.noEvidence, tone: 'warning' }));
50
- if (it.late) out.push(signal({ text: COPY.signals.late, tone: 'destructive' }));
51
- if (place !== 'board' && (it.state === 'doing' || it.state === 'review')) out.push(signal({ text: COPY.states[it.state] }));
52
- if (it.overrideShown) out.push(signal({ text: COPY.signals.movedByYou }));
53
- if (it.proposed) out.push(signal({ text: COPY.signals.proposed }));
54
- return out.slice(0, 2);
55
- }
56
-
57
- /** The meta line: owner · due 20 Oct · by agent · sess-3. Who changed it last shows only when it was not the PM. */
58
- export function metaFor(it) {
59
- return [ownerLabel(it.owner), it.due ? COPY.due(shortDate(it.due)) : null, byPart(it)];
60
- }
61
-
62
- /** "by agent · sess-3", or nothing when the PM made the last change (the PM's own writes need no label). */
63
- export function byPart(it) {
64
- return it.byLabel && it.byLabel !== 'you' ? COPY.by(it.byLabel) : null;
65
- }
66
-
67
- function itemRow(ctx, id) {
68
- const { P, L, A } = ctx;
69
- const it = L.items[id];
70
- const done = it.state === 'done';
71
- const tick = iconButton({
72
- icon: done ? 'square-check-big' : 'square', size: 'sm',
73
- ariaLabel: done ? COPY.aria.markNotDone(it.title) : COPY.aria.markDone(it.title),
74
- onClick: (e) => { e.stopPropagation(); A.tick(id); },
75
- attrs: { tabindex: '-1', 'data-fk': 'tick:' + id, 'data-bd-tick': '' },
76
- });
77
- const more = iconButton({
78
- icon: 'ellipsis', size: 'sm', ariaLabel: COPY.aria.more(it.title),
79
- onClick: (e) => { e.stopPropagation(); A.menu(e.currentTarget, id, 'tree'); },
80
- attrs: { tabindex: '-1', 'aria-haspopup': 'menu', 'data-fk': 'more:' + id, 'data-bd-more': '' },
81
- });
82
- return row({
83
- title: it.title, titleIcon: it.milestone ? 'diamond' : null, meta: metaFor(it), signals: signalsFor(it, 'tree'),
84
- lead: [dragHandle({ label: COPY.aria.reorder(it.title) }), tick], trail: [more],
85
- onOpen: () => A.openSheet(id), done, proposed: it.proposed,
86
- attrs: { class: 'bd-trow', 'data-item': id, 'data-state': it.state, 'data-stage': it.stage },
87
- openAttrs: { 'data-fk': 'open:' + id, 'data-rove': 'row', tabindex: P.roveId === id ? '0' : '-1' },
88
- });
89
- }
90
-
91
- /** The inline input that adds items. One per pane; it is kept across renders so typing is never lost. */
92
- function addInput(ctx, stageId, afterId) {
93
- const { P, A } = ctx;
94
- const key = stageId + '|' + (afterId || '');
95
- // the same input moves with the anchor row (a temporary id, then the written id), so a title typed meanwhile stays
96
- if (P.addEl && P.addEl.stage === stageId) { P.addEl.key = key; return P.addEl.wrap; }
97
- const f = field({ label: COPY.newItem, kind: 'text', hideLabel: true, placeholder: COPY.newItemHint, attrs: { class: 'bd-add__input', 'data-bd-add-input': stageId, maxlength: '200' } });
98
- const input = f.control;
99
- input.addEventListener('keydown', (e) => {
100
- if (e.key === 'Enter') {
101
- e.preventDefault(); e.stopImmediatePropagation();
102
- const t = input.value.trim();
103
- if (!t) { A.closeAdd(true); return; }
104
- input.value = '';
105
- A.addTitles(P.adding ? P.adding.stage : stageId, [t], P.adding ? P.adding.afterId : afterId);
106
- } else if (e.key === 'Escape') {
107
- e.preventDefault(); e.stopImmediatePropagation();
108
- A.closeAdd(true);
109
- } else e.stopPropagation();
110
- }, true);
111
- input.addEventListener('paste', (e) => {
112
- const text = e.clipboardData ? e.clipboardData.getData('text') : '';
113
- const lines = String(text || '').split(/\r?\n/).map((l) => l.replace(/^\s*(?:[-*]\s+|\[[ xX]?\]\s+|\d+[.)]\s+)/, '').trim()).filter(Boolean);
114
- if (lines.length < 2) return;
115
- e.preventDefault(); e.stopPropagation();
116
- if (lines.length > 50) { toast({ text: COPY.tooMany(lines.length), tone: 'error' }); return; }
117
- A.addTitles(P.adding ? P.adding.stage : stageId, lines.map((l) => l.slice(0, 200)), P.adding ? P.adding.afterId : afterId);
118
- });
119
- input.addEventListener('blur', () => {
120
- setTimeout(() => { if (!P.rendering && P.addEl && P.addEl.wrap.contains(input) && document.activeElement !== input && !input.value.trim()) A.closeAdd(false); }, 0);
121
- });
122
- const wrap = el('div', { class: 'bd-add', 'data-bd-add-row': stageId }, el('div', { class: 'bd-add__field' }, f));
123
- P.addEl = { key, stage: stageId, wrap, input };
124
- return wrap;
125
- }
126
-
127
- function stageSection(ctx, s) {
128
- const { P, L, A } = ctx;
129
- const open = A.isExpanded(s);
130
- const toggle = iconButton({
131
- icon: open ? 'chevron-down' : 'chevron-right', expanded: open,
132
- ariaLabel: open ? COPY.aria.collapse(s.label) : COPY.aria.expand(s.label),
133
- onClick: (e) => { e.stopPropagation(); A.toggleStage(s.id); },
134
- attrs: { class: 'bd-stage__toggle', 'data-fk': 'stage:' + s.id, 'data-rove': 'head', 'data-stage-toggle': s.id },
135
- });
136
- const counts = [s.count, s.proposed ? COPY.proposedCount(s.proposed) : null].filter(Boolean).join(' · ');
137
- // The header is a drop target, not a control: the chevron is the one button that folds the stage.
138
- const head = el('div', { class: 'bd-stage__head', 'data-stage-head': s.id },
139
- el('span', { class: 'bd-stage__name' }, s.label),
140
- s.current ? el('span', { class: 'bd-stage__current' }, COPY.current) : null,
141
- counts ? el('span', { class: 'bd-stage__count' }, counts) : null,
142
- toggle);
143
- const kids = [head];
144
- if (open) {
145
- if (s.owed) {
146
- kids.push(row({
147
- owed: true, title: COPY.owed(s.owed.noun, s.owed.actor), lead: [],
148
- trail: [badge({ text: COPY.derived, tone: 'outline' })],
149
- attrs: { class: 'bd-owed', 'data-owed-key': s.owed.key, 'data-owed-actor': s.owed.actor },
150
- }));
151
- }
152
- const all = s.items || [];
153
- const doneIds = all.filter((id) => L.items[id].state === 'done');
154
- const showDone = P.foldOpen.has(s.id);
155
- if (doneIds.length) {
156
- kids.push(button({
157
- variant: 'ghost', size: 'sm', block: true, icon: showDone ? 'chevron-down' : 'chevron-right',
158
- label: showDone ? COPY.hideDone(doneIds.length) : COPY.showDone(doneIds.length), onClick: () => A.toggleFold(s.id),
159
- attrs: { class: 'bd-fold', 'aria-expanded': showDone ? 'true' : 'false', 'data-fk': 'fold:' + s.id, 'data-bd-fold': s.id },
160
- }));
161
- }
162
- const rows = [];
163
- for (const id of all) {
164
- if (!showDone && L.items[id].state === 'done') continue;
165
- rows.push(itemRow(ctx, id));
166
- if (P.adding && P.adding.stage === s.id && P.adding.afterId === id) rows.push(addInput(ctx, s.id, id));
167
- }
168
- kids.push(el('div', { class: 'bd-list', 'data-stage-list': s.id }, rows));
169
- if (P.adding && P.adding.stage === s.id && (!P.adding.afterId || !rows.some((r) => r.getAttribute && r.getAttribute('data-item') === P.adding.afterId))) {
170
- kids.push(addInput(ctx, s.id, null));
171
- } else {
172
- kids.push(el('div', { class: 'bd-add' }, button({
173
- label: COPY.addItem, variant: 'ghost', size: 'sm', icon: 'plus',
174
- attrs: { class: 'bd-add__btn', 'data-fk': 'add:' + s.id, 'data-bd-add': s.id }, onClick: () => A.startAdd(s.id, null),
175
- })));
176
- }
177
- }
178
- return el('section', { class: 'bd-stage', 'data-stage-id': s.id, 'aria-label': s.label }, kids);
179
- }
180
-
181
- /** The Tree's nodes, in order. */
182
- export function renderTree(ctx) {
183
- const { P, L, A } = ctx;
184
- const out = [];
185
- for (const b of L.batches || []) {
186
- if ((b.initiative || L.initiative) !== L.initiative) continue;
187
- out.push(keepCard({
188
- ws: P.ws, initiative: L.initiative, batch: b, place: 'tree',
189
- onChanged: () => A.refresh(),
190
- onHoldApply: (lay) => { for (const id of b.items || []) removeLocal(lay, id); },
191
- onKeepApply: () => A.keepApplied(b),
192
- }));
193
- }
194
- const visible = (L.stages || []).filter((s) => s.visible || (P.adding && P.adding.stage === s.id));
195
- // An empty breakdown: no item in any stage, no proposal. The ladder may still owe rows (they show as stages below), so the
196
- // empty state is judged by the items, not by the stages that show.
197
- const noItems = !(L.stages || []).some((s) => (s.items || []).length) && !(L.other && L.other.items || []).length && !(L.batches || []).length;
198
- if (noItems) {
199
- const first = (L.stages || []).find((s) => s.current) || (L.stages || [])[0];
200
- out.push(el('div', { class: 'bd-note' }, COPY.noBreakdown + '.'));
201
- const starters = P.ws && first ? startersOf(P.ws, () => A.refresh()) : null;
202
- if (first && starters && starters.length) {
203
- out.push(el('div', { class: 'in-starters', 'data-bd-starters': '' },
204
- el('p', { class: 'bd-note' }, IN_COPY.breakThisDown.head),
205
- el('ul', { class: 'in-starters__list' }, starters.map((t) => el('li', null, t))),
206
- button({ label: IN_COPY.breakThisDown.addAll(starters.length), variant: 'primary', size: 'sm', attrs: { 'data-bd-starters-add': '' }, onClick: () => A.addTitles(first.id, starters, null) }),
207
- el('p', { class: 'bd-note' }, IN_COPY.breakThisDown.or)));
208
- }
209
- if (first) out.push(el('div', { class: 'bd-add' }, button({
210
- label: IN_COPY.breakThisDown.label, variant: 'ghost', size: 'sm', iconEnd: 'chevron-right',
211
- attrs: { class: 'bd-add__btn', 'data-fk': 'add:' + first.id, 'data-bd-break': '', ...(visible.length ? {} : { 'data-bd-add': first.id }) }, onClick: () => A.startAdd(first.id, null),
212
- })));
213
- }
214
- for (const s of visible) out.push(stageSection(ctx, s));
215
- if ((L.other && L.other.items || []).length) {
216
- out.push(el('section', { class: 'bd-stage', 'data-stage-id': '', 'aria-label': COPY.other },
217
- el('div', { class: 'bd-stage__head', 'data-stage-head': '' }, el('span', { class: 'bd-stage__name' }, COPY.other)),
218
- el('div', { class: 'bd-list', 'data-stage-list': '', 'data-other': '' }, L.other.items.map((id) => itemRow(ctx, id)))));
219
- }
220
- return out;
221
- }
222
-
223
- /** Attach Sortable to the Tree: the stage lists reorder and move between stages; a stage header takes a row at its end. */
224
- export function bindTreeDrag(ctx, Sortable, drags, baseOptions) {
225
- const { P, A } = ctx;
226
- const group = 'bd-tree:' + P.slug;
227
- for (const list of P.bodyEl.querySelectorAll('[data-stage-list]')) {
228
- const other = list.hasAttribute('data-other');
229
- drags.add(new Sortable(list, baseOptions({
230
- group: { name: group, pull: true, put: !other },
231
- handle: SEL.drag, draggable: '.bd-trow', filter: SEL.owed + ', .bd-add', preventOnFilter: false,
232
- onStart: () => { P.dragging = true; },
233
- onEnd: (evt) => { P.dragging = false; A.dropTree(evt); },
234
- })));
235
- }
236
- for (const head of P.bodyEl.querySelectorAll('[data-stage-head]')) {
237
- const sid = head.getAttribute('data-stage-head');
238
- if (!sid) continue;
239
- drags.add(new Sortable(head, {
240
- group: { name: group, pull: false, put: true }, sort: false, draggable: '.bd-trow',
241
- onAdd: (evt) => { const id = evt.item.getAttribute('data-item'); evt.item.remove(); A.dropHeader(id, sid); },
242
- }));
243
- }
244
- }
@@ -1,59 +0,0 @@
1
- /* pm/board-copy.js — every word the Board destination shows (pm-os-absorb Run 4, slice 4D).
2
- *
3
- * Pure data and pure functions. No DOM and no import, so glossary.test.js loads this file in Node and checks every string
4
- * against the glossary. The four column names, the signals and the item sheet's words are the Breakdown's own
5
- * (breakdown-copy.js): the Board reuses them, so a state has one name on every screen.
6
- *
7
- * The word Release is exempt from the glossary's `release` rule for this file only. On the Board it names the D65 gate that
8
- * a person presses on a batch of work items, which is the one place the rule lets it stand.
9
- */
10
-
11
- export const COPY = {
12
- reading: 'Reading…',
13
- readFailed: (why) => `Could not read the Board: ${why}`,
14
- filter: 'Board filter',
15
- filters: { active: 'Active', mine: 'Mine' },
16
- initiative: 'Initiative',
17
- anyInitiative: 'All initiatives',
18
- addItem: 'Add item',
19
- title: (n, productName) => `${n} ${n === 1 ? 'item' : 'items'} in ${productName || 'code'}`,
20
- adding: {
21
- title: 'Add item',
22
- sub: 'The item goes to its initiative. Enter adds it.',
23
- fieldTitle: 'Title',
24
- fieldInitiative: 'Initiative',
25
- fieldStage: 'Stage',
26
- add: 'Add',
27
- cancel: 'Cancel',
28
- needTitle: 'Type a title first.',
29
- needInitiative: 'No initiative can take an item yet.',
30
- },
31
- added: 'Item added.',
32
- noItems: 'No item matches this filter. Choose another filter, or press Add item.',
33
- noWorkspace: 'No repository is open. Open one to see its Board.',
34
- noInitiatives: 'No initiative does work yet. A document initiative has no items.',
35
- stageOf: (initiative, stage) => `${initiative} · ${stage}`,
36
- notMerged: 'Done · your call · not merged',
37
- summary: (n) => (n === 1 ? '1 item' : `${n} items`),
38
- showMore: (n) => `Show ${n} more`,
39
- release: {
40
- head: 'Release',
41
- title: (initiative) => `Release · ${initiative}`,
42
- batch: (id) => `Batch ${id}`,
43
- items: (n) => (n === 1 ? '1 work item ready' : `${n} work items ready`),
44
- press: 'Release',
45
- pressLabel: (initiative, id) => `Release batch ${id} of ${initiative}`,
46
- pressed: (n) => (n === 1 ? 'Release granted for 1 work item.' : `Release granted for ${n} work items.`),
47
- waiting: 'Release arrives in Run 2.',
48
- failed: (why) => `Release was not granted: ${why}`,
49
- note: 'One press grants the whole batch. The factory opens pull requests only. It never merges.',
50
- },
51
- aria: {
52
- open: (t) => `Open ${t}`,
53
- },
54
- };
55
-
56
- export const GLOSSARY = {
57
- exempt: { release: 'On the Board, Release is the name of the D65 gate that a person presses on a batch of work items.' },
58
- guide: 'board.md',
59
- };
@@ -1,38 +0,0 @@
1
- /* pm/board-read.js — the board, read ONE way.
2
- *
3
- * Four panels (panel-initiatives, panel-detail, panel-tabs, modes) render from the same three
4
- * facts — which board is published, which records back it, which repository is showing — and each
5
- * carried its own copy of the derivation: four chances to disagree about one fact, the exact class
6
- * of bug the panels' own comments guard against. The byte-identical trio lives here.
7
- *
8
- * What deliberately does NOT live here: `repoOf` (panel-detail) falls back to `currentProduct()`
9
- * while `slugProductOf` (panel-tabs) leaves an unknown slug undefined — `visibleTabs` reads
10
- * undefined as "visible everywhere" and `openDoc` stamps the current repository precisely because
11
- * of that difference. Two answers on purpose, not one answer drifted.
12
- *
13
- * The seed board is reachable ONLY in fixture mode. In normal mode an unpublished board is an
14
- * EMPTY board — never the seed data: fixture rows rendering in the real app is "the beautiful
15
- * shell" the PRD names as a failure mode.
16
- */
17
-
18
- import { state, FIXTURE } from './state.js';
19
- import * as FX from './fixture.js';
20
-
21
- /** The published board, else the fixture seed — else an EMPTY board, never the seed. */
22
- export const boardOf = () =>
23
- (state.board && typeof state.board === 'object' ? state.board : (FIXTURE ? FX.ALLGROUPS : {}));
24
-
25
- /** Every initiative record: the board's own records, with user-filed ones layered on. */
26
- export function records() {
27
- const base = state.records && typeof state.records === 'object'
28
- ? state.records
29
- : (FIXTURE ? FX.DATA : {});
30
- return { ...base, ...state.userInits };
31
- }
32
-
33
- /** The repository whose board is showing (prototype line 1395). */
34
- export function currentProduct() {
35
- if (state.product) return state.product;
36
- const keys = Object.keys(boardOf());
37
- return keys.length ? keys[0] : 'workspace';
38
- }
@@ -1,56 +0,0 @@
1
- /* pm/branches-sheet.js — the working trees of a repository and the sessions in each, in the frame (0.54.1).
2
- *
3
- * The legacy panel 1 listed every tree (main first) with its live sessions, `+ branch` and `+ session` (panel-trees.js).
4
- * The frame never drew panel 1, so from 0.53.0 the branches and their sessions had no place. This sheet draws the same
5
- * blocks, unchanged: one repository, or every repository when the scope is All. It repaints on every state change while
6
- * it is open, so a session that starts or ends elsewhere (a terminal, the CLI) shows here within one poll.
7
- *
8
- * openBranches(repos) → the sheet. `repos` is the list of repository names to show, in order.
9
- */
10
-
11
- import { el, setChildren } from './dom.js';
12
- import { sheet } from './primitives.js';
13
- import { state, subscribe } from './state.js';
14
- import { treesOf } from './panel-repos.js';
15
- import { treesBlock, branchForm, treeNoteFor, sessionsIn } from './panel-trees.js';
16
- import { refreshTrees } from './data.js';
17
- import { COPY } from './frame-copy.js';
18
-
19
- const live = (s) => s && s.state !== 'exited' && s.shown !== 'exited';
20
-
21
- function sub(repos) {
22
- let trees = 0; let sessions = 0;
23
- for (const r of repos) for (const t of treesOf(r)) { trees++; sessions += sessionsIn(t.ws).filter(live).length; }
24
- return COPY.branches.sub(trees, sessions);
25
- }
26
-
27
- function body(repos) {
28
- if (!repos.length) return [el('p', { class: 'fr-branches__empty' }, COPY.branches.none)];
29
- return repos.map((r) => {
30
- const trees = treesOf(r);
31
- return el('section', { class: 'fr-branches__repo', 'data-fr-branches': r },
32
- repos.length > 1 ? el('h3', { class: 'fr-branches__name' }, r) : null,
33
- branchForm(r),
34
- trees.length ? treesBlock(r, trees, true) : el('p', { class: 'fr-branches__empty' }, COPY.branches.noTrees),
35
- treeNoteFor(r));
36
- });
37
- }
38
-
39
- export function openBranches(repos) {
40
- const list = (repos || []).filter(Boolean);
41
- const s = sheet({ title: COPY.branches.title, sub: sub(list), body: body(list), attrs: { 'data-fr': 'branches' }, onClose: () => stop() });
42
- // The trees can change behind the page (a branch made in a terminal): read them once more on open.
43
- try { Promise.resolve(refreshTrees()).catch(() => {}); } catch { /* no data layer */ }
44
- let last = null;
45
- const stop = subscribe(() => {
46
- if (!s.open) return;
47
- // Repaint only when something the sheet shows changed, so an input the PM types in keeps its node between polls.
48
- const key = JSON.stringify([state.branchForm && { ...state.branchForm, name: null, from: null }, state.treeNote, state.treeSel, state.treeConfirm,
49
- list.map((r) => treesOf(r).map((t) => [t.ws, t.branch, sessionsIn(t.ws).map((x) => [x.id, x.state, x.shown, x.name, x.initiative])]))]);
50
- if (key === last) return;
51
- last = key;
52
- s.setHead(COPY.branches.title, sub(list));
53
- setChildren(s.body, body(list));
54
- });
55
- return s;
56
- }
@@ -1,58 +0,0 @@
1
- /* pm/breakdown-api.js — the four requests the Breakdown makes (pm-os-absorb Run 1), plus the needs read Today uses.
2
- *
3
- * Relative URLs only, to this server. Every POST goes through pm/http.js pressFetch, so it carries the
4
- * per-launch nonce, and the browser adds the page's own Origin: the server's guard (lib/pm-guard.js) requires both before
5
- * it records a write as the PM's (`pm:wawan`, via `ui`). Nothing here sends `by`, `via` or `at`; the writer sets them.
6
- *
7
- * Every function resolves to the server's JSON, or to `{ ok:false, error }` when the server could not be reached or did
8
- * not answer JSON. None of them throws. In FIXTURE mode none of them makes a request.
9
- */
10
-
11
- import { FIXTURE } from './state.js';
12
- import { pressFetch } from './http.js';
13
-
14
- const qs = (o) => Object.entries(o).filter(([, v]) => v !== null && v !== undefined && v !== '')
15
- .map(([k, v]) => encodeURIComponent(k) + '=' + encodeURIComponent(v)).join('&');
16
-
17
- async function call(method, url, body, opts) {
18
- if (FIXTURE) return { ok: false, error: 'fixture mode' };
19
- let res;
20
- try {
21
- res = await (method === 'GET' ? fetch(url) : pressFetch(url, {
22
- method, body: JSON.stringify(body), // pm/http.js: carries the per-launch nonce, and renews a stale one
23
- keepalive: !!(opts && opts.keepalive),
24
- }));
25
- } catch (e) {
26
- return { ok: false, error: 'could not reach the workspace server — ' + ((e && e.message) || String(e)) };
27
- }
28
- let out;
29
- try { out = await res.json(); } catch { return { ok: false, status: res.status, error: 'the server did not answer JSON (HTTP ' + res.status + ')' }; }
30
- if (!res.ok && out && out.ok !== false) return { ok: false, status: res.status, error: 'HTTP ' + res.status };
31
- if (out && typeof out === 'object' && !res.ok) out.status = res.status;
32
- return out;
33
- }
34
-
35
- /** GET the Layout of one initiative. `ladder:false` is the fast path: no owed rows, used when only the items changed. */
36
- export function getLayout(ws, id, { ladder = true } = {}) {
37
- return call('GET', '/api/plan-items?' + qs({ ws, id, ladder: ladder ? null : '0' }));
38
- }
39
-
40
- /** POST 1 to 50 events. `keepalive` lets a held write still reach the server while the page unloads. */
41
- export function postEvents(ws, events, { keepalive = false } = {}) {
42
- return call('POST', '/api/plan-items', { ws, events }, { keepalive });
43
- }
44
-
45
- /** Ask the server what Hand to agent would start. Starts nothing. */
46
- export function prepareHandoff(ws, item) {
47
- return call('POST', '/api/plan-items/handoff/prepare', { ws, item });
48
- }
49
-
50
- /** Start exactly what was prepared: the server refuses a prompt that changed since `sha`. */
51
- export function goHandoff(ws, item, sha) {
52
- return call('POST', '/api/plan-items/handoff/go', { ws, item, confirm: true, prompt_sha: sha });
53
- }
54
-
55
- /** The needs-you queue of one workspace (the existing route). Today reads its Keep, evidence and check rows. */
56
- export function getNeeds(ws) {
57
- return call('GET', '/api/needs?' + qs({ ws }));
58
- }
@@ -1,138 +0,0 @@
1
- /* pm/breakdown-copy.js — every word the Breakdown shows (pm-os-absorb Run 1).
2
- *
3
- * Pure data and pure functions. No DOM and no import, so `glossary.test.js` can load this file in Node and check every
4
- * string against the glossary rules. A string that a person reads on the Breakdown, in the item sheet, on a Keep card
5
- * or in a toast is written here and nowhere else.
6
- */
7
-
8
- const MON = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
9
-
10
- /** "2026-10-20" -> "20 Oct". A date-only value is read as a calendar day, never shifted by the time zone. */
11
- export function shortDate(ymd) {
12
- const m = /^(\d{4})-(\d{2})-(\d{2})/.exec(String(ymd || ''));
13
- if (!m) return '';
14
- return Number(m[3]) + ' ' + MON[Number(m[2]) - 1];
15
- }
16
-
17
- /** An ISO timestamp -> "5 Oct", in the viewer's own calendar. */
18
- export function dayOf(iso) {
19
- const d = new Date(iso);
20
- if (Number.isNaN(d.getTime())) return '';
21
- return d.getDate() + ' ' + MON[d.getMonth()];
22
- }
23
-
24
- /** An ISO timestamp -> "just now", "4 min ago", "3 h ago", "2 days ago", or the day for anything older than a week. */
25
- export function ago(iso, now) {
26
- const t = new Date(iso).getTime();
27
- const n = Number.isFinite(now) ? now : Date.now();
28
- if (!Number.isFinite(t)) return '';
29
- const s = Math.max(0, Math.round((n - t) / 1000));
30
- if (s < 60) return 'just now';
31
- if (s < 3600) return Math.round(s / 60) + ' min ago';
32
- if (s < 86400) return Math.round(s / 3600) + ' h ago';
33
- const d = Math.round(s / 86400);
34
- if (d < 8) return d === 1 ? '1 day ago' : d + ' days ago';
35
- return dayOf(iso);
36
- }
37
-
38
- /** 1 -> "1 item", 9 -> "9 items". */
39
- export const items = (n) => (n === 1 ? '1 item' : `${n} items`);
40
-
41
- /** "agent · sess-3" -> "Agent · sess-3": a label at the start of a sentence. */
42
- const cap = (s) => String(s || '').charAt(0).toUpperCase() + String(s || '').slice(1);
43
-
44
- export const STATES = ['todo', 'doing', 'review', 'done'];
45
-
46
- export const COPY = {
47
- breakdown: 'Breakdown',
48
- noBreakdown: 'no breakdown',
49
- proposedOnly: (n) => `no breakdown · ${n} proposed`,
50
- progress: (d, t) => `${d} of ${t}`,
51
- reading: 'Reading…',
52
- readFailed: (why) => `Could not read the breakdown: ${why}`,
53
- owedFailed: (why) => `Owed steps are not shown. The workflow could not be read: ${why}`,
54
- flagsHead: (n) => (n === 1 ? 'plan-items.jsonl has 1 flagged line:' : `plan-items.jsonl has ${n} flagged lines:`),
55
- flagsMore: (n) => `and ${n} more`,
56
- tree: 'Tree',
57
- board: 'Board',
58
- views: 'Breakdown view',
59
- states: { todo: 'Todo', doing: 'Doing', review: 'Review', done: 'Done' },
60
- stateCount: (s, n) => `${s} ${n}`,
61
- columns: 'Board column',
62
- signals: { blocked: 'Blocked', noEvidence: 'no evidence', late: 'late', movedByYou: 'moved by you', proposed: 'Proposed' },
63
- owed: (noun, actor) => `Owed: ${noun} · ${actor}`,
64
- derived: 'derived',
65
- current: 'current',
66
- other: 'Other',
67
- proposedCount: (n) => `${n} proposed`,
68
- showDone: (n) => `Show ${n} done`,
69
- hideDone: (n) => `Hide ${n} done`,
70
- addItem: 'Add item',
71
- newItem: 'New item',
72
- newItemHint: 'Enter adds it. Paste a list to add one item per line.',
73
- tooMany: (n) => `${n} lines is more than 50. Nothing was added.`,
74
- due: (d) => `due ${d}`,
75
- by: (who) => `by ${who}`,
76
- owners: { you: 'You', agent: 'Agent', person: 'Person', tracker: 'Tracker' },
77
- keepTree: (n, date, who) => `${who ? cap(who) : 'The agent'} proposed ${items(n)} on ${date}.`,
78
- keepToday: (n, who) => (who ? `${items(n)} · ${who}` : items(n)),
79
- proposedBy: (who, date) => `Proposed by ${who || 'the agent'}${date ? ' on ' + date : ''}. It does not count until you keep it.`,
80
- keepAll: 'Keep all',
81
- addEvidence: 'Add evidence',
82
- evidenceHint: 'commit:<sha>, pr:<number>, file:<path> or note:<text>',
83
- keep: 'Keep',
84
- withdrawAll: 'Withdraw all',
85
- kept: (n) => `Kept ${items(n)}.`,
86
- handToAgent: 'Hand to agent',
87
- agentWill: (first, where) => `Agent will: ${first} · ${where}`,
88
- preparing: 'Preparing…',
89
- go: 'Go',
90
- details: 'Details',
91
- cancel: 'Cancel',
92
- branch: 'Branch',
93
- folder: 'Folder',
94
- busy: 'A session is already working on this item.',
95
- openSession: 'Open session',
96
- sessionStarted: (name) => `Session started: ${name}`,
97
- undo: 'Undo',
98
- markedDone: 'Marked done.',
99
- withdrawn: 'Withdrawn.',
100
- withdrewN: (n) => `Withdrew ${items(n)}.`,
101
- olderInTree: (n) => `${n} older in the Tree`,
102
- nothingHere: 'Nothing here.',
103
- emptyColumn: (s) => `Nothing in ${s}.`,
104
- labels: {
105
- title: 'Title', owner: 'Owner', ownerName: 'Name', trackerRef: 'Reference', stage: 'Stage', after: 'After', start: 'Start',
106
- due: 'Due', milestone: 'Milestone', blocked: 'Blocked', blockedBecause: 'Blocked because', note: 'Note', history: 'History',
107
- close: 'Close', withdraw: 'Withdraw', state: 'State',
108
- },
109
- afterNone: 'Nothing. It can start any time.',
110
- addPredecessor: 'Add predecessor',
111
- otherItemId: 'Item id from another initiative',
112
- add: 'Add',
113
- aria: {
114
- reorder: (t) => `Reorder ${t}`,
115
- markDone: (t) => `Mark done: ${t}`,
116
- markNotDone: (t) => `Mark not done: ${t}`,
117
- more: (t) => `More for ${t}`,
118
- collapse: (s) => `Collapse ${s}`,
119
- expand: (s) => `Expand ${s}`,
120
- remove: (t) => `Remove ${t}`,
121
- open: (t) => `Open ${t}`,
122
- },
123
- menu: { open: 'Open', moveTo: (s) => `Move to ${s}`, moveUp: 'Move up', moveDown: 'Move down' },
124
- needs: {
125
- evidence: 'no evidence',
126
- flag: 'check',
127
- open: 'Open',
128
- },
129
- };
130
-
131
- /** The owner as a person reads it: `person:Mei` -> "Mei", `tracker:NW-430` -> "NW-430". */
132
- export function ownerLabel(owner) {
133
- const o = String(owner || 'you');
134
- if (o === 'you') return COPY.owners.you;
135
- if (o === 'agent') return COPY.owners.agent;
136
- const i = o.indexOf(':');
137
- return i > 0 ? o.slice(i + 1) : o;
138
- }