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,60 +0,0 @@
1
- /* pm/triage-card.js — the triage card of Today, kind 6 (pm-os-absorb Run 2, slice 2D; PRD R12, R17).
2
- *
3
- * "Proposed: <title> · <lane> · <anchor> · Add". A capture was triaged by an agent; one press of Add writes the
4
- * initiative (`pmos initiative new --from <capture>`), and it starts in Later. The row's run id ends with the capture's id.
5
- *
6
- * The writer takes a title, a lane and an anchor and no more, so the card reads them back from the row's own line. When the
7
- * line says "no anchor yet", the writer would refuse the initiative: the card opens the New-initiative form with the title
8
- * and the lane filled in, and the PM chooses the anchor.
9
- */
10
-
11
- import { button, card, toast, ensureComponentsCss } from './primitives.js';
12
- import { registerTodayCard } from './registry.js';
13
- import { COPY } from './initiatives-copy.js';
14
- import { createInitiative } from './initiatives-api.js';
15
- import { changed } from './initiative-sheet.js';
16
- import { openNewInitiative } from './new-initiative-sheet.js';
17
-
18
- const captureOf = (row) => String(row.run_id || '').replace(/^initiative-needs:triage:/, '');
19
- const titleOf = (q) => String(q || '').replace(/^Proposed:\s*/, '').split(' · ')[0];
20
-
21
- /** "Proposed: <title> · <lane label> · <anchor>" → { title, lane, anchor }, or null. The anchor is null for "no anchor yet". */
22
- export function proposalOf(question) {
23
- const parts = String(question || '').replace(/^Proposed:\s*/, '').split(' · ');
24
- if (parts.length < 3) return null;
25
- const anchor = parts.pop().trim();
26
- const lane = parts.pop().trim().replace(/\s+/g, '-');
27
- const title = parts.join(' · ').trim();
28
- return title && lane ? { title, lane, anchor: /^no anchor yet$/i.test(anchor) ? null : anchor } : null;
29
- }
30
-
31
- export function renderTriageCard(row, ctx) {
32
- ensureComponentsCss();
33
- let busy = false;
34
- const add = button({
35
- label: (row.today && row.today.act && row.today.act.label) || COPY.triage.add, variant: 'primary', attrs: { 'data-in-triage-add': '' },
36
- onClick: async () => {
37
- if (busy) return;
38
- const p = proposalOf(row.question);
39
- if (!p) { toast({ text: COPY.triage.addFailed(COPY.triage.unreadable), tone: 'error', timeout: 8000 }); return; }
40
- if (!p.anchor) {
41
- openNewInitiative({ repo: ctx.repo, ws: ctx.ws, anchors: [], prefill: { title: p.title, lane: p.lane, from: captureOf(row) }, onAdded: () => { changed(); try { window.dispatchEvent(new CustomEvent('pmos:ledgers', { detail: { changed: [ctx.ws] } })); } catch { /* no window */ } } });
42
- return;
43
- }
44
- busy = true; add.disabled = true;
45
- const out = await createInitiative(ctx.ws, { title: p.title, lane: p.lane, anchor: p.anchor, from: captureOf(row) });
46
- busy = false; add.disabled = false;
47
- if (out && out.ok) {
48
- toast({ text: COPY.triage.added(titleOf(row.question)), timeout: 4000 });
49
- changed();
50
- try { window.dispatchEvent(new CustomEvent('pmos:ledgers', { detail: { changed: [ctx.ws] } })); } catch { /* no window */ }
51
- } else toast({ text: COPY.triage.addFailed((out && out.error) || 'The server did not answer.'), tone: 'error', timeout: 8000 });
52
- },
53
- });
54
- return card({
55
- title: row.question, meta: [row.today && row.today.cause, row.today && row.today.evidence], trail: [add],
56
- attrs: { class: 'in-today-card', 'data-today-row': 'triage', 'data-provider': row.provider || null, 'data-capture': captureOf(row) },
57
- });
58
- }
59
-
60
- registerTodayCard('triage', renderTriageCard);
@@ -1,103 +0,0 @@
1
- /* pm/undo-hold.js — the Undo hold (pm-os-absorb Run 1, PRD R13/R21).
2
- *
3
- * A change that is hard to take back (Done, Withdraw, Withdraw all) is held in the page for 8 seconds before it is
4
- * written. During the hold the screen already shows the change (an overlay on every fetched layout), and a toast offers
5
- * Undo. Undo drops the change and writes nothing; otherwise the events are posted when the 8 seconds end. Leaving the page,
6
- * or hiding it (iOS fires no `pagehide` when the phone locks or the PM switches apps, and may then discard the tab),
7
- * posts every held change at once, with `keepalive`, so a held change is not lost by closing the tab. The Undo window
8
- * then simply ends early.
9
- *
10
- * The hold is client state only. Nothing about it reaches a ledger until the write, and the write is the same POST any
11
- * other change makes.
12
- */
13
-
14
- import { postEvents } from './breakdown-api.js';
15
- import { toast } from './primitives.js';
16
- import { COPY } from './breakdown-copy.js';
17
-
18
- export const HOLD_MS = 8000;
19
-
20
- const pending = new Map(); // key -> { key, ws, events, apply, timer, note, onDone }
21
- let unloadHooked = false;
22
-
23
- function hookUnload() {
24
- if (unloadHooked || typeof window === 'undefined') return;
25
- unloadHooked = true;
26
- window.addEventListener('pagehide', flushAll);
27
- if (typeof document !== 'undefined') {
28
- document.addEventListener('visibilitychange', () => { if (document.visibilityState === 'hidden') flushAll(); });
29
- }
30
- }
31
-
32
- async function write(h, keepalive) {
33
- pending.delete(h.key);
34
- if (h.note) h.note.close();
35
- /* A dying page cannot wait between requests: send every 50-line chunk at once, each with keepalive, or only the
36
- * first chunk of a big "Withdraw all" would leave before the page is gone. */
37
- if (keepalive) {
38
- for (let i = 0; i < h.events.length; i += 50) postEvents(h.ws, h.events.slice(i, i + 50), { keepalive: true });
39
- return;
40
- }
41
- let ok = true; let error = null;
42
- for (let i = 0; i < h.events.length; i += 50) {
43
- const out = await postEvents(h.ws, h.events.slice(i, i + 50), { keepalive });
44
- if (!out || out.ok === false) { ok = false; error = (out && out.error) || 'nothing was saved'; break; }
45
- }
46
- if (!ok && !keepalive) toast({ text: error, tone: 'error' });
47
- if (h.onDone) h.onDone({ ok, error });
48
- }
49
-
50
- /**
51
- * hold({ key, ws, events, apply(layout), text, onDone({ok,error}), onUndo() })
52
- * Shows the change at once (through `overlay`), raises the Undo toast and writes `events` after HOLD_MS. A second hold
53
- * with the same key replaces the first without writing it.
54
- */
55
- export function hold({ key, ws, events, apply, text, onDone, onUndo }) {
56
- hookUnload();
57
- cancel(key);
58
- const h = { key, ws, events, apply, onDone, timer: null, note: null };
59
- h.timer = setTimeout(() => { if (pending.get(key) === h) write(h, false); }, HOLD_MS);
60
- h.note = toast({
61
- text, actionLabel: COPY.undo, icon: 'undo-2', timeout: HOLD_MS,
62
- onAction: () => { if (pending.get(key) === h) { clearTimeout(h.timer); pending.delete(key); if (onUndo) onUndo(); } },
63
- });
64
- pending.set(key, h);
65
- return h;
66
- }
67
-
68
- /** Drop a held change without writing it. Returns true when there was one. */
69
- export function cancel(key) {
70
- const h = pending.get(key);
71
- if (!h) return false;
72
- clearTimeout(h.timer);
73
- if (h.note) h.note.close();
74
- pending.delete(key);
75
- return true;
76
- }
77
-
78
- /** Write a held change NOW instead of at the end of its hold (it can no longer be undone). True when there was one. */
79
- export function flush(key) {
80
- const h = pending.get(key);
81
- if (!h) return false;
82
- clearTimeout(h.timer);
83
- write(h, false);
84
- return true;
85
- }
86
-
87
- /** True while a change with this key is held. */
88
- export function isHeld(key) { return pending.has(key); }
89
-
90
- /** True while any change is held. */
91
- export function anyHeld() { return pending.size > 0; }
92
-
93
- /** Apply every held change to a freshly fetched layout, so a poll during the hold does not undo it on screen. */
94
- export function overlay(layout) {
95
- if (!layout || !pending.size) return layout;
96
- for (const h of pending.values()) { try { if (h.apply) h.apply(layout); } catch { /* a stale overlay is skipped */ } }
97
- return layout;
98
- }
99
-
100
- /** Post every held change now. Runs on `pagehide`, with keepalive so the request outlives the page. */
101
- export function flushAll() {
102
- for (const h of [...pending.values()]) { clearTimeout(h.timer); write(h, true); }
103
- }
@@ -1,208 +0,0 @@
1
- /* pm/view-addrepo.js — the Add repository view tab, drawn from planning/design/cockpit-mockup/ViewAddRepo.dc.html.
2
- *
3
- * PRD workspace-cockpit-nav, Run 3 (R10, done-criterion 3). The board is a header, three steps (Choose, Review the scan,
4
- * Confirm), the scan's source line, a review table of the proposed initiatives, a note and the actions.
5
- *
6
- * It drives the existing add-repository flow and adds no new one:
7
- * - Choose is the existing form (panel-repos.js `addProductBody`, the `addprod` detail body): the source switch, the GitHub
8
- * reference or the local folder with its chooser, the "connect + ingest" and "add product" buttons and the ingest log. Its
9
- * nodes are placed in the board's frame as they are, so every handler and the shared state keys (addSrc, addRepo, addPath,
10
- * addLog) behave as in the detail. A local folder is registered at once and needs no review.
11
- * - Review the scan is the server's repo ingest: GET /api/ingest lists the open proposals the clone-and-scan produced, and
12
- * each row is decided one at a time with POST /api/ingest/confirm (with the anchor) or POST /api/ingest/dismiss. The
13
- * server refuses a bulk confirm by design ("the tedium is the gate"), so the board's tick boxes and "Import 2 selected"
14
- * are drawn as one Confirm per row. A guessed anchor is written only on an explicit "Accept the guess".
15
- * - Confirm is on when every row of the proposal has been decided.
16
- * The board's Lane column is not drawn: the scan does not read a lane. "Dismiss scan" has no route (only per-row dismiss), so it
17
- * is not drawn. In the fixture the form runs its scripted ingest and the review is not read.
18
- */
19
- import { el } from './dom.js';
20
- import { addProductBody } from './panel-repos.js';
21
- import { pressFetch } from './http.js'; // the per-launch nonce: /api/ingest/confirm is a guarded anchor change
22
-
23
- const BTN = 'font:500 12.5px var(--sans);background:transparent;color:var(--foreground);border:1px solid var(--input);border-radius:8px;padding:0 12px;height:30px;min-height:30px;display:inline-grid;place-items:center;cursor:pointer;flex:none;white-space:nowrap';
24
- const BTNP = 'font:500 12.5px var(--sans);background:var(--foreground);color:var(--background);border:0;border-radius:8px;padding:0 12px;height:30px;min-height:30px;display:inline-grid;place-items:center;cursor:pointer;flex:none;white-space:nowrap';
25
- const BADGE = 'font:500 11px var(--sans);border:1px solid var(--border);border-radius:999px;padding:0 8px;line-height:18px;white-space:nowrap;display:inline-block';
26
- const TONE = {
27
- s: ';border-color:transparent;background:color-mix(in oklab, var(--success) 16%, transparent);color:var(--success)',
28
- w: ';border-color:transparent;background:color-mix(in oklab, var(--warning) 16%, transparent);color:var(--warning)',
29
- d: ';color:var(--destructive)',
30
- };
31
- const TH = 'font:500 10px var(--mono);letter-spacing:.1em;text-transform:uppercase;color:var(--muted-foreground);text-align:left;padding:10px 14px;border-bottom:1px solid var(--border)';
32
- const TD = 'padding:10px 14px;border-bottom:1px solid var(--border);font-size:13px;vertical-align:middle';
33
- const NOTE = 'color:var(--muted-foreground);font-size:13px;line-height:1.5';
34
- const FRAME = 'border:1px solid var(--border);border-radius:10px;overflow:hidden;background:var(--background)';
35
- const INPUT = 'font:12px var(--mono);padding:0 9px;height:30px;min-height:30px;border:1px solid var(--input);border-radius:8px;background:transparent;color:var(--foreground);width:150px;box-sizing:border-box';
36
-
37
- const badge = (text, tone, attrs) => el('span', { ...(attrs || {}), style: BADGE + (tone ? TONE[tone] : '') }, String(text));
38
-
39
- /** Open the Add repository view. Used by the rail's add tile and by anything else that offers "add a repository". */
40
- export async function openAddRepo() {
41
- const m = await import('./panel-cockpit.js');
42
- if (m.VIEWS && m.VIEWS.addrepo) { m.openView('addrepo'); return true; }
43
- const r = await import('./panel-repos.js');
44
- r.onAddProduct();
45
- return false;
46
- }
47
-
48
- /* ── the ingest proposals: one read, read again after 15 seconds, or every 2.5 seconds while a scan runs ───────── */
49
- let ing = { state: 'idle', data: null, error: null, at: 0 };
50
- let pick = null; // the proposal id the PM chose, when there are several
51
- let say = null; // { tone: 'ok'|'bad', text } — what the last row action did
52
- let lastLog = -1; // the ingest log's length at the last draw: a new line means the form did something
53
- let tick = null;
54
-
55
- const running = (pr) => pr && (pr.stage === 'acquire' || pr.stage === 'scan');
56
-
57
- function proposals(ctx) {
58
- const ttl = ing.data && (ing.data.proposals || []).some(running) ? 2500 : 15000;
59
- if (ing.state !== 'loading' && (ing.state === 'idle' || Date.now() - ing.at > ttl)) {
60
- ing = { ...ing, state: 'loading' };
61
- fetch('/api/ingest').then((r) => r.json()).then(
62
- (d) => { ing = { state: d && d.ok === false ? 'error' : 'ok', data: d, error: d && d.error, at: Date.now() }; },
63
- (e) => { ing = { state: 'error', data: ing.data, error: (e && e.message) || String(e), at: Date.now() }; },
64
- ).finally(() => ctx.setState({}));
65
- }
66
- if (!tick && ing.data && (ing.data.proposals || []).some(running)) {
67
- tick = setTimeout(() => { tick = null; ctx.setState({}); }, 2600);
68
- }
69
- return ing;
70
- }
71
-
72
- async function act(ctx, url, body, done) {
73
- let out;
74
- try { out = await pressFetch(url, { method: 'POST', body: JSON.stringify(body) }).then((r) => r.json()); }
75
- catch (e) { out = { ok: false, error: (e && e.message) || String(e) }; }
76
- say = !out || out.ok === false ? { tone: 'bad', text: (out && out.error) || 'the server did not answer. Nothing was written.' } : { tone: 'ok', text: done(out) };
77
- ing = { ...ing, state: 'idle' };
78
- ctx.setState({});
79
- }
80
-
81
- const confirmRow = (ctx, pr, row, anchor) => {
82
- const a = String(anchor || '').trim();
83
- if (!a) { say = { tone: 'bad', text: 'Type an anchor first: a KR id or health:<id>.' }; ctx.setState({}); return; }
84
- act(ctx, '/api/ingest/confirm', { id: pr.id, item: row.id, anchor: a },
85
- (o) => row.id + ': parent_kr: ' + a + ' written into ' + o.path + '. ' + (o.resolver_note || ''));
86
- };
87
- const dismissRow = (ctx, pr, row) => act(ctx, '/api/ingest/dismiss', { id: pr.id, item: row.id }, () => row.id + ' dismissed. Nothing was written.');
88
-
89
- function sourceBadge(row) {
90
- if (row.disposition === 'confirmed') return badge('confirmed by you', 's', { 'data-board-badge': 'confirmed' });
91
- if (row.disposition === 'dismissed') return badge('dismissed', null, { 'data-board-badge': 'dismissed' });
92
- if (row.anchor_state === 'declared') return badge('declared by the repository', 's', { 'data-board-badge': 'declared' });
93
- if (row.anchor_state === 'guessed') return badge('guessed from prose, not declared', 'w', { 'data-board-badge': 'guessed' });
94
- return badge('will be rejected (D59)', 'd', { 'data-board-badge': 'none' });
95
- }
96
-
97
- function anchorCell(row) {
98
- if (row.disposition === 'confirmed') return el('span', { style: 'font:12px var(--mono)' }, String(row.anchor_value || ''));
99
- if (row.anchor_state === 'declared') return el('span', { style: 'font:12px var(--mono)' }, String(row.anchor_value));
100
- if (row.anchor_state === 'guessed') return el('span', { style: 'font:12px var(--mono);color:var(--warning)' }, String(row.anchor_value) + ' ?');
101
- return el('span', { style: 'color:var(--destructive)' }, 'no anchor');
102
- }
103
-
104
- function actionsCell(ctx, pr, row) {
105
- if (row.disposition && row.disposition !== 'open') return null;
106
- const parts = [];
107
- if (row.anchor_state === 'declared') {
108
- parts.push(el('button', { 'data-board-action': 'confirm', style: BTNP, title: 'write the declared anchor into the record', onClick: () => confirmRow(ctx, pr, row, row.anchor_value) }, 'Confirm'));
109
- } else {
110
- const input = el('input', { 'data-board-input': 'anchor', placeholder: 'KR id or health:<id>', style: INPUT, 'aria-label': 'anchor for ' + row.id });
111
- parts.push(input);
112
- parts.push(el('button', { 'data-board-action': 'confirm', style: BTN, hover: 'background:var(--accent)', title: 'write the anchor you typed into the record', onClick: () => confirmRow(ctx, pr, row, input.value) }, 'Confirm'));
113
- if (row.anchor_state === 'guessed') {
114
- parts.push(el('button', { 'data-board-action': 'accept-guess', style: BTN, hover: 'background:var(--accent)', title: 'you accept the guess: it is written as the anchor', onClick: () => confirmRow(ctx, pr, row, row.anchor_value) }, 'Accept the guess'));
115
- }
116
- }
117
- parts.push(el('button', { 'data-board-action': 'dismiss', style: BTN, hover: 'background:var(--accent)', title: 'leave this record out; nothing is written', onClick: () => dismissRow(ctx, pr, row) }, 'Dismiss'));
118
- return el('div', { style: 'display:flex;gap:6px;align-items:center;justify-content:flex-end;flex-wrap:wrap' }, parts);
119
- }
120
-
121
- /** The review for one proposal: the source line, the table and the note. */
122
- function review(ctx, pr) {
123
- const rows = pr.initiatives || [];
124
- const adrs = pr.adrs || [];
125
- const decided = rows.filter((r) => r.disposition && r.disposition !== 'open').length;
126
- const confirmed = rows.filter((r) => r.disposition === 'confirmed').length;
127
- let summary;
128
- if (running(pr)) summary = (pr.stage === 'acquire' ? 'cloning' : 'scanning') + ' …';
129
- else if (pr.ok === false) summary = 'the scan did not finish: ' + (pr.error || 'no reason given');
130
- else summary = 'found ' + rows.length + (rows.length === 1 ? ' initiative record' : ' initiative records') + ' and ' + adrs.length + (adrs.length === 1 ? ' decision' : ' decisions') + '. '
131
- + (confirmed ? confirmed + ' confirmed.' : 'Nothing imported yet.');
132
- const line = el('div', { 'data-board-part': 'source', style: 'display:flex;align-items:center;gap:10px;flex-wrap:wrap' },
133
- badge((pr.source && pr.source.kind) || 'github', null, { 'data-board-badge': 'source' }),
134
- el('span', { style: 'font:13px var(--mono)' }, String((pr.source && pr.source.ref) || pr.id)),
135
- el('span', { 'data-board-summary': '', style: 'color:' + (pr.ok === false && !running(pr) ? 'var(--destructive)' : 'var(--muted-foreground)') }, summary));
136
- const out = [line];
137
- if (rows.length) {
138
- out.push(el('div', { 'data-board-section': 'review', style: FRAME + ';overflow-x:auto' },
139
- el('table', { style: 'width:100%;border-collapse:collapse' },
140
- el('thead', null, el('tr', null, ['Initiative', 'Anchor', 'Source of the anchor', ''].map((h) => el('th', { style: TH }, h)))),
141
- el('tbody', null, rows.map((row) => el('tr', { 'data-board-row': row.id, 'data-disposition': row.disposition || 'open', 'data-anchor-state': row.anchor_state || 'none' },
142
- el('td', { style: TD }, el('b', null, String(row.id)), el('div', { style: 'font:11px var(--mono);color:var(--muted-foreground);overflow-wrap:anywhere' }, String(row.path || ''))),
143
- el('td', { style: TD }, anchorCell(row)),
144
- el('td', { style: TD }, sourceBadge(row)),
145
- el('td', { style: TD + ';text-align:right' }, actionsCell(ctx, pr, row))))))));
146
- out.push(el('div', { 'data-board-part': 'review-note', style: NOTE },
147
- 'Guessed anchors are never written as declared. Accept one only if you agree with the guess, or fix it in the repository first. '
148
- + 'Each row is confirmed on its own. ' + decided + ' of ' + rows.length + ' decided.'
149
- + (adrs.length ? ' ' + adrs.length + (adrs.length === 1 ? ' decision' : ' decisions') + ' found in the scan.' : '')));
150
- }
151
- return out;
152
- }
153
-
154
- export function renderBoard(inner, ctx) {
155
- const { FIXTURE, state } = ctx;
156
-
157
- // 1 · Choose: the existing form, as it is. Its own title is the board's header now, so it is hidden, not removed.
158
- const formNodes = addProductBody();
159
- if (formNodes[0]) { formNodes[0].style.display = 'none'; formNodes[0].setAttribute('data-board-source', 'form-title'); }
160
- const form = el('div', { 'data-board-section': 'choose', 'data-addprod': 'form', style: FRAME + ';display:flex;flex-direction:column;max-width:760px' }, formNodes);
161
-
162
- // a new line in the ingest log means the form started something: read the proposals again
163
- const logLen = ((state && state.addLog) || []).length;
164
- if (logLen !== lastLog) { if (lastLog !== -1) ing = { ...ing, state: ing.state === 'loading' ? 'loading' : 'idle' }; lastLog = logLen; }
165
-
166
- // 2 · Review the scan
167
- let list = [];
168
- let reviewParts = [];
169
- if (FIXTURE) {
170
- reviewParts = [el('div', { 'data-board-empty': '', style: NOTE }, 'The scan review is not read in the fixture. The form above runs its scripted ingest.')];
171
- } else {
172
- const r = proposals(ctx);
173
- list = (r.data && r.data.proposals) || [];
174
- if (r.state === 'error' && !list.length) reviewParts = [el('div', { style: NOTE + ';color:var(--destructive)' }, 'The scans could not be read: ' + (r.error || 'error'))];
175
- else if (!r.data) reviewParts = [el('div', { style: NOTE }, 'Reading the scans …')];
176
- else if (!list.length) reviewParts = [el('div', { 'data-board-empty': '', style: NOTE }, 'No scan is waiting for review. Give a GitHub repository above and press connect + ingest. A local folder is added at once.')];
177
- else {
178
- if (!list.some((p) => p.id === pick)) pick = list[list.length - 1].id;
179
- if (list.length > 1) {
180
- reviewParts.push(el('div', { 'data-board-part': 'scans', style: 'display:flex;gap:6px;flex-wrap:wrap' },
181
- list.map((p) => el('button', { 'data-board-scan': p.id, 'aria-pressed': p.id === pick ? 'true' : 'false',
182
- style: BTN + (p.id === pick ? ';background:var(--accent);border-color:var(--brand)' : ''), onClick: () => { pick = p.id; say = null; ctx.setState({}); } },
183
- String((p.source && p.source.ref) || p.id)))));
184
- }
185
- reviewParts.push(...review(ctx, list.find((p) => p.id === pick)));
186
- }
187
- }
188
- if (say) reviewParts.push(el('div', { 'data-board-part': 'action-note', style: NOTE + (say.tone === 'bad' ? ';color:var(--destructive)' : '') }, say.text));
189
-
190
- // the steps: Choose until a scan is open, Review while a row is undecided, Confirm when every row is decided
191
- const cur = list.find((p) => p.id === pick) || null;
192
- const rows = (cur && cur.initiatives) || [];
193
- const step = !cur ? 1 : rows.length && rows.every((r) => r.disposition && r.disposition !== 'open') ? 3 : 2;
194
- const stepEl = (n, label) => el('span', { 'data-board-step': String(n), 'data-on': n === step ? '1' : '0', style: 'display:flex;align-items:center;gap:8px;color:' + (n === step ? 'var(--foreground)' : 'var(--muted-foreground)') },
195
- el('b', { style: 'display:grid;place-items:center;width:22px;height:22px;border-radius:50%;font:500 11px var(--mono);border:1px solid ' + (n === step ? 'var(--brand);background:var(--brand);color:var(--background)' : 'var(--input)') }, String(n)),
196
- label);
197
-
198
- const header = el('div', { 'data-board-part': 'header' },
199
- el('div', { 'data-board-title': '', style: 'font:600 22px var(--sans);line-height:1.45' }, 'Add repository'),
200
- el('div', { 'data-board-subtitle': '', style: 'color:var(--muted-foreground)' }, 'The scan proposes. It never decides, and it writes nothing until you confirm.'));
201
-
202
- inner.appendChild(el('div', { 'data-board': 'addrepo', style: 'display:flex;flex-direction:column;gap:14px;padding:4px 6px;font-size:13px;line-height:1.45;color:var(--foreground)' },
203
- header,
204
- el('div', { 'data-board-part': 'steps', style: 'display:flex;gap:24px;flex-wrap:wrap' }, stepEl(1, 'Choose'), stepEl(2, 'Review the scan'), stepEl(3, 'Confirm')),
205
- form,
206
- el('div', { style: 'font-weight:600' }, 'Review the scan'),
207
- el('div', { 'data-board-part': 'review', style: 'display:flex;flex-direction:column;gap:12px' }, reviewParts)));
208
- }
@@ -1,197 +0,0 @@
1
- /* pm/view-files.js — Files: the repository's files in the Work list (workspace-cockpit-nav Run 3, PRD R10).
2
- *
3
- * Board: planning/design/cockpit-mockup/ViewFilesPad.dc.html (the left column).
4
- *
5
- * Two exports, both placed by the Work list (panel-cockpit.js):
6
- * filesToggle() — the "Initiatives | Files" pair. It writes `state.filesOpen`.
7
- * renderFiles(host) — when `filesOpen` is true, the list body: a filter, the file tree, a note.
8
- *
9
- * THE DATA. The tree is `/api/tree?ws=<id>`, the folder lens the server already serves (server.js
10
- * `libraryTree`): every folder and file of the repository, six folders deep, at most 4000 entries,
11
- * with each file's reader kind from lib/preview-kind.js. Nothing here adds a server route, and
12
- * nothing is written. A file opens through `openDoc` — the same doc tab the folder search opens —
13
- * so a file the reader cannot show says why in its tab (the any-text-file behaviour, pm-r21).
14
- *
15
- * WHAT THE BOARD SHOWS THAT IS NOT READ HERE. The board says binary files show their size. The tree
16
- * route does not return sizes, so a binary file shows its name and the words "not opened" only.
17
- *
18
- * FIXTURE MODE makes no request: the list says the files are not read in the demo.
19
- */
20
- import { el, setChildren } from './dom.js';
21
- import { state, setState, FIXTURE } from './state.js';
22
- import { openDoc } from './panel-initiatives.js';
23
-
24
- const TREE_MAX_NODES = 4000; // server.js TREE_MAX_NODES — the bound the note states
25
-
26
- /* ── module state: the fetched trees, the open folders and the filter text ──────────────────── */
27
- const trees = new Map(); // ws -> { roots, error, loading, at }
28
- const openDirs = new Set(); // folder paths the PM has opened
29
- let filterText = '';
30
-
31
- function load(ws) {
32
- const cur = trees.get(ws);
33
- if (cur && cur.loading) return;
34
- trees.set(ws, { roots: cur ? cur.roots : null, error: null, loading: true, at: Date.now() });
35
- fetch('/api/tree?ws=' + encodeURIComponent(ws)).then((r) => {
36
- if (!r.ok) throw new Error('HTTP ' + r.status);
37
- return r.json();
38
- }).then(
39
- (j) => { trees.set(ws, { roots: Array.isArray(j && j.roots) ? j.roots : [], error: null, loading: false, at: Date.now() }); setState({}); },
40
- (e) => { trees.set(ws, { roots: null, error: (e && e.message) || String(e), loading: false, at: Date.now() }); setState({}); },
41
- );
42
- }
43
-
44
- /** Forget the cached tree, so the next draw reads the folder again. */
45
- function refresh() {
46
- if (state.wsId) trees.delete(state.wsId);
47
- setState({});
48
- }
49
-
50
- /* ── styles, from the board, on the token system ──────────────────────────────────────────────── */
51
- const BTN = 'font:500 12.5px var(--sans);background:transparent;color:var(--foreground);border:1px solid var(--input);'
52
- + 'border-radius:8px;padding:0 12px;height:28px;display:inline-grid;place-items:center';
53
- const ROW = 'display:flex;align-items:center;gap:8px;width:100%;min-height:30px;padding:0 10px;border-radius:6px;'
54
- + 'font:12.5px var(--mono);text-align:left;color:var(--foreground);min-width:0';
55
- const NAME = 'min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap';
56
- const NOTE = 'color:var(--muted-foreground);font-size:12px;line-height:1.45';
57
-
58
- /* ── the toggle ───────────────────────────────────────────────────────────────────────────────── */
59
-
60
- /** "Initiatives | Files". Opening Files reads the folder again, so a new file shows up. */
61
- export function filesToggle() {
62
- const on = !!state.filesOpen;
63
- const b = (label, sel, onClick, key) => el('button', {
64
- onClick, 'data-files-tab': key, 'aria-pressed': sel ? 'true' : 'false',
65
- style: BTN + (sel ? ';background:var(--accent)' : ';color:var(--muted-foreground)'),
66
- hover: sel ? null : 'color:var(--foreground)',
67
- }, label);
68
- return el('div', { 'data-files': 'toggle', style: 'display:flex;gap:6px' },
69
- b('Initiatives', !on, () => { if (state.filesOpen) setState({ filesOpen: false }); }, 'initiatives'),
70
- b('Files', on, () => { if (!state.filesOpen) { if (state.wsId) trees.delete(state.wsId); setState({ filesOpen: true }); } }, 'files'));
71
- }
72
-
73
- /* ── the filter (one node, so the caret survives a redraw) ──────────────────────────────────── */
74
- const filterInput = el('input', {
75
- onInput: (e) => { filterText = e.target.value; setState({}); },
76
- placeholder: 'Filter files…', 'aria-label': 'filter files', 'data-files': 'filter',
77
- style: 'flex:1;min-width:0;font:13px var(--sans);color:var(--foreground);background:transparent;border:0;outline:0',
78
- });
79
- const filterBox = el('div', {
80
- style: 'flex:none;display:flex;align-items:center;gap:8px;border:1px solid var(--input);border-radius:8px;height:32px;padding:0 10px;color:var(--muted-foreground)',
81
- }, filterInput,
82
- el('button', {
83
- onClick: refresh, 'data-files': 'refresh', title: 'Read the folder again.', 'aria-label': 'read the folder again',
84
- style: 'flex:none;color:var(--muted-foreground);font-size:12px;padding:0 2px', hover: 'color:var(--foreground)',
85
- }, '↻'));
86
-
87
- /* ── the tree ─────────────────────────────────────────────────────────────────────────────────── */
88
-
89
- const PK = () => (typeof window !== 'undefined' ? window.PreviewKind : null);
90
-
91
- /** A file the reader will not try: a type that is binary by nature. Everything else opens as a doc tab. */
92
- function isBinary(name) {
93
- const pk = PK();
94
- return !!(pk && typeof pk.isKnownBinary === 'function' && pk.isKnownBinary(name));
95
- }
96
-
97
- function dotColor(f) {
98
- if (isBinary(f.name)) return 'var(--muted-foreground)';
99
- if (f.md || f.kind === 'markdown') return 'var(--brand)';
100
- return 'var(--info)';
101
- }
102
-
103
- /** Does this folder hold a file whose path contains `q`? */
104
- function holds(dir, q) {
105
- if ((dir.docs || []).some((f) => f.path.toLowerCase().includes(q))) return true;
106
- return (dir.dirs || []).some((d) => holds(d, q));
107
- }
108
-
109
- function countNodes(dir) {
110
- return (dir.docs || []).length + (dir.dirs || []).reduce((n, d) => n + 1 + countNodes(d), 0);
111
- }
112
-
113
- function activeDocPath() {
114
- const act = (state.tabs || []).find((t) => t.id === state.active);
115
- return act && act.kind === 'doc' && !act.ws ? act.path : null;
116
- }
117
-
118
- function fileRow(f, depth, activePath) {
119
- const pad = 'padding-left:' + (10 + depth * 16) + 'px';
120
- const dot = el('span', { style: 'flex:none;color:' + dotColor(f) }, '●');
121
- if (isBinary(f.name)) {
122
- return el('div', {
123
- 'data-files': 'file', 'data-path': f.path, 'data-kind': f.kind || '', 'data-openable': 'false',
124
- title: f.path + '\nA binary file. It is not opened.',
125
- style: ROW + ';' + pad + ';color:var(--muted-foreground)',
126
- }, dot, el('span', { style: NAME }, f.name), el('span', { style: 'margin-left:auto;flex:none;font-size:11px' }, 'not opened'));
127
- }
128
- const on = activePath === f.path;
129
- return el('button', {
130
- onClick: () => openDoc(null, f.path, 'FILE'),
131
- 'data-files': 'file', 'data-path': f.path, 'data-kind': f.kind || '', 'data-openable': 'true',
132
- 'aria-current': on ? 'true' : null, title: f.path,
133
- style: ROW + ';' + pad + (on ? ';background:var(--accent)' : ''),
134
- hover: on ? null : 'background:var(--accent)',
135
- }, dot, el('span', { style: NAME }, f.name));
136
- }
137
-
138
- function dirRows(dir, depth, q, activePath, out) {
139
- if (q && !holds(dir, q)) return;
140
- const open = q ? true : openDirs.has(dir.path);
141
- out.push(el('button', {
142
- onClick: () => { if (openDirs.has(dir.path)) openDirs.delete(dir.path); else openDirs.add(dir.path); setState({}); },
143
- 'data-files': 'dir', 'data-path': dir.path, 'aria-expanded': open ? 'true' : 'false',
144
- style: ROW + ';padding-left:' + (10 + depth * 16) + 'px', hover: 'background:var(--accent)',
145
- }, el('span', { style: 'flex:none;color:var(--muted-foreground)' }, open ? '▾' : '▸'), el('span', { style: NAME }, dir.name)));
146
- if (!open) return;
147
- for (const d of dir.dirs || []) dirRows(d, depth + 1, q, activePath, out);
148
- for (const f of dir.docs || []) if (!q || f.path.toLowerCase().includes(q)) out.push(fileRow(f, depth + 1, activePath));
149
- }
150
-
151
- function message(text, tone) {
152
- return el('div', { 'data-files': 'message', style: 'padding:8px 10px;font-size:12px;color:' + (tone || 'var(--muted-foreground)') }, text);
153
- }
154
-
155
- /** The Files body: the filter, the tree and the note. Fills `host` and returns it. */
156
- export function renderFiles(host) {
157
- const body = [];
158
- const ws = state.wsId;
159
- let total = 0;
160
- if (FIXTURE) {
161
- body.push(message('Files are not read in the demo. Open the workspace on a repository to see its files.'));
162
- } else if (!ws) {
163
- body.push(message('Select a repository to see its files.'));
164
- } else {
165
- const t = trees.get(ws);
166
- if (!t) load(ws);
167
- if (!t || (t.loading && !t.roots)) body.push(message('Reading the files…'));
168
- else if (t.error) body.push(message('The files could not be read: ' + t.error, 'var(--destructive)'));
169
- else {
170
- const q = filterText.trim().toLowerCase();
171
- const activePath = activeDocPath();
172
- const roots = t.roots || [];
173
- const loose = roots.filter((r) => r.path === '');
174
- for (const r of roots) total += r.path === '' ? (r.docs || []).length : 1 + countNodes(r);
175
- for (const r of roots) if (r.path !== '') dirRows(r, 0, q, activePath, body);
176
- for (const r of loose) for (const f of r.docs || []) if (!q || f.path.toLowerCase().includes(q)) body.push(fileRow(f, 0, activePath));
177
- if (!body.length) body.push(message(q ? 'No file matches the filter.' : 'This repository has no files to list.'));
178
- }
179
- }
180
- const capped = total >= TREE_MAX_NODES;
181
- // The frame is persistent: re-creating it would detach the filter and lose its focus on every redraw.
182
- setChildren(treeNode, body);
183
- setChildren(noteNode, [NOTE_TEXT, capped ? capNode : null]);
184
- setChildren(host, [boardNode]);
185
- if (filterInput.value !== filterText) filterInput.value = filterText;
186
- return host;
187
- }
188
-
189
- const NOTE_TEXT = document.createTextNode('Any text file opens as a document tab. Binary files show their name only.');
190
- const capNode = el('span', { style: 'display:block;color:var(--warning)' },
191
- 'The list stops at ' + TREE_MAX_NODES + ' entries. Use the search box to find other files.');
192
- const treeNode = el('div', { 'data-files': 'tree', style: 'flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:1px' });
193
- const noteNode = el('div', { 'data-files': 'note', style: 'flex:none;' + NOTE });
194
- const boardNode = el('div', { 'data-board': 'files', style: 'flex:1;min-height:0;display:flex;flex-direction:column;gap:10px' },
195
- filterBox, treeNode, noteNode);
196
-
197
- export default renderFiles;