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,126 +0,0 @@
1
- /* pm/c3-demo-rep-ix.js — DEMO fixtures for the Reports tab's interactions (/c3.html?demo=1 only).
2
- * c3-demo.js loads this file as a side effect (`import './c3-demo-rep-ix.js'`). It only sets window.__c3repix, a plain data object
3
- * that report-families-view.js reads when window.__c3demo is set. It has no network call and writes nothing. Real mode never loads it.
4
- * Content is the console3 mockup's own (console3.html lines 4205 to 4347): the four families, their report lists and audience pills, the
5
- * sections of each report with their sources, the communications queue, the who-holds-what rows and the "Sent" history.
6
- * Shape of a section: { id, h, t, src: [[icon, label, kind]], st: 'ok' | 'stale' | 'check', by: 'Agent' | 'You', why, claims?: [{ text, label, source }] }. */
7
-
8
- const SC = (id, h, t, src, st, by, why, claims) => ({ id, h, t, src: src || [], st: st || 'ok', by: by || 'Agent', why: why || '', claims: claims || null });
9
-
10
- export const FAMS = {
11
- project: { n: 'Project', i: 'tree', purpose: 'Will we hit the date, what blocks us, what do you need to decide', aud: 'Sponsors and the delivery team', intent: 'Decide and unblock', cad: 'Weekly and on change' },
12
- product: { n: 'Product', i: 'target', purpose: 'Is the product moving toward the north star, and what did we learn', aud: 'Executives, board, product council', intent: 'Align and invest', cad: 'Monthly' },
13
- communications: { n: 'Communications', i: 'out', purpose: 'The right people hear the right thing, in their language, at the right time', aud: 'Stakeholders, customers, sales, support', intent: 'Inform, enable, ask', cad: 'On events' },
14
- periodic: { n: 'Periodic', i: 'cal', purpose: 'A steady rhythm so nobody is surprised', aud: 'Leadership and the team', intent: 'Inform and reflect', cad: 'Weekly to quarterly' },
15
- };
16
-
17
- const PILLS = {
18
- project: [{ id: 'lead', name: 'Leadership' }, { id: 'eng', name: 'Engineering' }, { id: 'cs', name: 'Customer success', external: true }],
19
- product: [{ id: 'exec', name: 'Executives and board' }, { id: 'council', name: 'Product council' }, { id: 'team', name: 'Team' }],
20
- communications: [{ id: 'all', name: 'All' }, { id: 'leadership', name: 'Leadership' }, { id: 'customers', name: 'Customers', external: true }, { id: 'sales', name: 'Sales and support' }, { id: 'engineering', name: 'Engineering' }],
21
- periodic: [{ id: 'pe1', name: 'Weekly leadership' }, { id: 'pe2', name: 'Monthly business' }, { id: 'pe3', name: 'Quarterly board' }, { id: 'pe4', name: 'Team retro' }],
22
- };
23
-
24
- export const REPORTS = {
25
- project: [{ id: 'pj1', n: 'Checkout v2 status', i: 'checkout', due: 'Fri 9 Oct, 15:00' }, { id: 'pj2', n: 'SSO beta status', i: 'sso', due: 'Fri 9 Oct, 15:00' }, { id: 'pj3', n: 'Search relevance status', i: 'search', due: 'Fri 9 Oct, 15:00' }],
26
- product: [{ id: 'pd1', n: 'Product review, October', due: 'Mon 2 Nov' }, { id: 'pd2', n: 'Quarterly strategy review, Q4', due: 'Mon 7 Dec' }],
27
- periodic: [{ id: 'pe1', n: 'Weekly leadership digest', due: 'Fri 9 Oct, 15:00', cad: 'Every Friday', aud: 'Leadership', pct: 0.8 }, { id: 'pe2', n: 'Monthly business review', due: 'Mon 2 Nov', cad: 'First Monday', aud: 'Leadership and finance', pct: 0.2 },
28
- { id: 'pe3', n: 'Quarterly board update', due: 'Mon 7 Dec', cad: 'Each quarter', aud: 'Board', pct: 0.05 }, { id: 'pe4', n: 'Team retro', due: 'Fri 16 Oct', cad: 'Every second Friday', aud: 'The team', pct: 0.5 }],
29
- };
30
-
31
- export const HIST = {
32
- project: [['Fri 2 Oct', 'Checkout v2 status', 'Leadership', 'opened by 5 of 6', 'Said: ship 24 Oct, on track'], ['Fri 2 Oct', 'SSO beta status', 'Customer success', 'opened by 3 of 3', '']],
33
- product: [['Mon 5 Oct', 'Product review, September', 'Executives', 'opened by 4 of 4', '2 questions: conversion, returns']],
34
- periodic: [['Fri 2 Oct', 'Weekly leadership digest', 'Leadership', 'opened by 5 of 6', 'No questions'], ['Fri 25 Sep', 'Weekly leadership digest', 'Leadership', 'opened by 6 of 6', '1 question: SSO date']],
35
- communications: [['Tue 6 Oct', 'SSO beta announcement', 'Design partners', 'opened by 3 of 3', 'Reply: asked for SCIM'], ['Mon 5 Oct', 'Interview invites', 'Customers', 'sent 5', '3 slots confirmed']],
36
- };
37
-
38
- const projectSecs = (r, aud) => {
39
- if (r.i === 'checkout') {
40
- if (aud === 'lead') return [
41
- SC('a', 'Bottom line', 'Checkout v2 will ship 31 Oct, 7 days after the promised 24 Oct, unless scope is cut to 3 flows today.', [['cal', 'Timeline, 8 Oct check', 'time']], 'ok', 'Agent', 'Leads with the answer, not the history.',
42
- [{ text: 'Forecast 31 Oct against the 24 Oct promised', label: 'fact', source: 'Timeline, 8 Oct check' }]),
43
- SC('b', 'Status against the promise', 'Red. Promised 24 Oct, forecast 31 Oct. The cause is scope, not capacity: 33 points became 46 in three additions.', [['tree', 'Breakdown history', 'wbs'], ['alert', 'Scope signal', 'sig']], 'ok', 'Agent', 'Watermelon guard: shows the red underneath any green metric.',
44
- [{ text: 'Scope grew from 33 to 46 points in three additions', label: 'fact', source: 'Breakdown history' }, { text: 'The cause is scope, not capacity', label: 'fact', source: 'Scope signal' }]),
45
- SC('c', 'What changed since last report', 'The a11y audit slot moved from 23 to 28 Oct. Saved-card removal and the audit were added by the agent after review gates and accepted by you.', [['clock', 'Revision history', 'wbs']], 'ok', 'Agent', 'Leaders ask what moved. This answers it first.'),
46
- SC('d', 'Top risks', 'Vendor sandbox keys are 2 days late with no reply. The audit vendor has no slot before 28 Oct.', [['check', 'Tickets', 'tix']], 'ok', 'Agent', ''),
47
- SC('e', 'Decision we need', 'Cut to 3 flows, which holds 24 Oct and is recommended, or accept 31 Oct. Needed by 14:00 today.', [['scale', 'Briefing decision', 'brief']], 'check', 'You', 'One ask only. Reports with many asks get no answer.',
48
- [{ text: 'Cutting to 3 flows holds 24 Oct', label: 'estimate', source: 'Dara, 3 to 6 days' }]),
49
- SC('f', 'Confidence', 'Medium, 78%. The vendor may deliver the keys sooner. If they do not reply by Friday the date moves again.', [], 'check', 'Agent', 'Stated as a number so it can be held to account.',
50
- [{ text: 'Confidence is 78%', label: 'estimate', source: '' }])];
51
- if (aud === 'eng') return [
52
- SC('a', 'Bottom line', 'Critical path: keys, saved-card removal, a11y audit, ship. It ends 31 Oct. The audit slot is the binding constraint.', [['tree', 'Timeline', 'time']]),
53
- SC('b', 'Critical path', 'CHK-141 keys +2 d. CHK-142 saved-card removal +2 d. CHK-144 a11y audit waits for the 28 Oct slot. CHK-145 ship follows.', [['check', 'Tickets', 'tix']]),
54
- SC('c', 'Blocked or at risk', 'CHK-141 vendor silent since Tuesday. EN-418 platform review is a separate path.', [['check', 'Tickets', 'tix']]),
55
- SC('d', 'Scope changes', '+5 saved-card removal (25 Sep), +3 a11y audit (30 Sep), +5 address autocomplete (5 Oct).', [['clock', 'Revision history', 'wbs']]),
56
- SC('e', 'Asks of the team', 'Dara: chase the vendor today. Lee: ask for the 21 Oct audit slot if scope is cut.', [], 'check', 'Agent', 'Names an owner for every ask.')];
57
- return [
58
- SC('a', 'What customers can expect', 'The new checkout arrives in late October. The exact date is confirmed after today\'s decision.', [['cal', 'Timeline', 'time']]),
59
- SC('b', 'What you can say', 'One-page address entry, wallet pay and guest checkout are in. Saved-card removal may follow in the next release.', [['doc', 'PRD v5', 'docs']], 'stale', 'Agent', 'PRD still says 4 flows. Confirm after the decision.'),
60
- SC('c', 'What not to promise', 'Do not quote 24 Oct. Say late October.', [], 'ok', 'Agent', 'Protects trust: the date is not final.'),
61
- SC('d', 'Known gaps', 'Accessibility audit is scheduled but not complete.', [['check', 'Tickets', 'tix']])];
62
- }
63
- if (r.i === 'sso') return [SC('a', 'Bottom line', 'SSO beta passes with findings at 78%. General release is on 14 Oct.', [['check', 'Rubric scorecard', 'life']]), SC('b', 'Adoption', '3 of 5 design partners live. Adoption is the weakest dimension at 60%.', [['target', 'Evaluation', 'life']], 'check'), SC('c', 'Next', 'Confirm the 14 Oct date to Marta on Monday. Guided setup is the fix for adoption.', [['reply', 'Communications', 'comms']])];
64
- return [SC('a', 'Bottom line', 'Search relevance beta holds 30 Oct. The index fix is waiting on platform review.', [['tree', 'Timeline', 'time']]), SC('b', 'Blocked', 'EN-418 has been in platform review since Tuesday, 3 days of slip so far.', [['check', 'Tickets', 'tix']], 'check'), SC('c', 'Ask', 'Platform: review EN-418 by Monday so ranking weights can start.', [], 'check', 'Agent', '')];
65
- };
66
-
67
- const productSecs = (aud) => {
68
- const base = [
69
- SC('a', 'North star', 'Weekly active accounts are 12.4k, 4% behind plan and the gap is widening. At this pace the plan tolerance is crossed in January.', [['up', 'North star chart', 'strat']], 'ok', 'Agent', 'Outcome first. Output is not the story.'),
70
- SC('b', 'Outcomes by goal', 'Conversion 3.1% against 4.0% target (off course). Retention day 30 41.5% against 45% (drifting). Design partners 3 of 5 (on course). Returns discovery 2 of 5.', [['target', 'Goals', 'strat']], 'ok', 'Agent', ''),
71
- SC('c', 'What we learned', 'Label printing is the main returns pain: 3 of 3 calls. Enterprise wants SCIM before audit logs. Scope churn, not capacity, drives delay.', [['notes', 'Research', 'docs']], 'ok', 'Agent', 'Learning is the product of the month, not just metrics.')];
72
- if (aud === 'exec') return base.concat([SC('d', 'Bets: scale, iterate or stop', 'Iterate SSO. Park self-serve onboarding: no signal in 9 days. Pull Returns forward only if interview 5 agrees.', [['flag', 'Roadmap', 'roadmap']], 'check', 'Agent', 'Recommendations, each with its evidence.'),
73
- SC('e', 'Risk to the strategy', 'Conversion has fallen six weeks. Below 3.0% for two weeks triggers a pivot review.', [['alert', 'Signals', 'sig']], 'ok', 'Agent', 'Early warning, before the numbers say it.'), SC('f', 'What we need from you', 'Approve the experiment on the address step and the freeze on scope.', [], 'check', 'You', '')]);
74
- if (aud === 'council') return base.concat([SC('d', 'Benchmarks', 'Peers with one-page checkout convert at a median 3.4%, top quartile 4.3%. We are at 3.1%. The benchmark is 10 days old.', [['report', 'Benchmark', 'docs']], 'stale', 'Agent', 'Stale source: refresh before this is presented.'),
75
- SC('e', 'Evaluation', 'SSO beta scored 78% against a 70% threshold. Weakest: adoption 60%.', [['check', 'Scorecard', 'life']]), SC('f', 'Experiments', 'Address-step experiment ready. Needs scope freeze to be a clean test.', [['spark', 'Ideas', 'life']], 'check')]);
76
- return base.concat([SC('d', 'Wins', 'Search relevance is 28% faster. SSO beta live with 3 customers, 0 incidents.', [['up', 'Calendar', 'cal']]), SC('e', 'Agent quality', 'Human correction rate fell to 15% from 22%. Six runs in a row improved.', [['spark', 'North star for agents', 'life']])]);
77
- };
78
-
79
- const periodicSecs = (id) => {
80
- if (id === 'pe1') return [SC('a', 'Headline', 'One date at risk: Checkout v2 is forecast 31 Oct against the promised 24 Oct. Everything else is on course.', [['alert', 'Timeline', 'time']], 'ok', 'Agent', 'Same first line every week.'),
81
- SC('b', 'Since last week', 'Scope +5 points (address autocomplete). Audit slot moved to 28 Oct. SSO beta passed review at 78%. 2 documents went stale.', [['clock', 'Revision history', 'wbs']], 'ok', 'Agent', 'Delta, not a restatement.'),
82
- SC('c', 'Dates', 'Checkout v2 31 Oct (was 28). SSO 14 Oct (unchanged). Search beta 30 Oct (unchanged).', [['cal', 'Forecast at each check', 'time']]),
83
- SC('d', 'Decisions made', 'Scope cut to 3 flows pending 14:00. Interview 5 stays on 13 Oct.', [['scale', 'Decisions', 'brief']], 'check', 'You', 'Decision stays blank until it is made.'),
84
- SC('e', 'Next week', 'Interview 5, SSO date to Marta, platform review for EN-418.', [['cal', 'Calendar', 'cal']]), SC('f', 'Asks', 'Leadership: confirm the cut or accept 31 Oct.', [], 'check', 'You')];
85
- if (id === 'pe2') return [SC('a', 'Headline', 'Month so far: north star 4% behind plan. One bet needs a decision.', [['up', 'North star', 'strat']]), SC('b', 'Outcomes', 'Conversion off course, retention drifting, partners on course.', [['target', 'Goals', 'strat']]),
86
- SC('c', 'Finance', 'Q4 forecast row 14 says growth 6%, the PRD says 4%. Align before the review.', [['sheet', 'Forecast', 'docs']], 'stale', 'Agent', 'Source conflict found.'), SC('d', 'Delivery', 'Three releases land inside 17 days.', [['cal', 'Timeline', 'time']]), SC('e', 'Asks', 'Approve the growth assumption.', [], 'check', 'You')];
87
- if (id === 'pe3') return [SC('a', 'Story of the quarter', 'Evidence file started. Draft after the Q4 checkpoint.', []), SC('b', 'North star and goals', 'Pulled live from the strategy view.', [['up', 'Strategy', 'strat']]), SC('c', 'Bets and decisions', 'All decisions of the quarter with who and why.', [['scale', 'Decision log', 'brief']]), SC('d', 'Risks', 'Pulled from signals.', [['alert', 'Signals', 'sig']])];
88
- return [SC('a', 'What went well', 'SSO beta live without incident. Search is 28% faster.', [['up', 'Wins', 'cal']]), SC('b', 'What did not', 'Scope changed three times in four weeks. The date slipped as a result.', [['alert', 'Signals', 'sig']]), SC('c', 'What we change', 'Freeze scope after the decision. Add a reason to every change.', [['check', 'Process', 'wbs']], 'check', 'You', '')];
89
- };
90
-
91
- /** The sections of one report. fam: family id; rep: report id; aud: the audience pill id. Communications has none: its list is the queue. */
92
- export function sections(fam, rep, aud) {
93
- if (fam === 'project') return projectSecs((REPORTS.project.find((r) => r.id === rep) || REPORTS.project[0]), aud);
94
- if (fam === 'product') return productSecs(aud);
95
- if (fam === 'periodic') return periodicSecs(rep);
96
- return [];
97
- }
98
-
99
- export const COMMS = [
100
- { id: 'c1', aud: 'leadership', to: 'Priya', role: 'VP Product', ch: 'Slack', t: 'Update the Checkout v2 date', due: 'Today, 10:30', ext: 0, why: 'Priya was told ship 24 Oct on 2 Oct. The forecast is now 31 Oct unless scope is cut.', body: 'Priya, a heads-up before the 10:30 update: Checkout v2 is forecast for 31 Oct against the 24 Oct we told you. The cause is scope, not capacity. I am asking for a cut to 3 flows at 14:00, which holds 24 Oct. I will confirm either way by 15:00.', tone: 'Direct, no hedging', risk: 'She may repeat 24 Oct in the 10:30 meeting if she does not hear this first.' },
101
- { id: 'c2', aud: 'engineering', to: 'Dara and Lee', role: 'Engineering, Design', ch: 'Slack', t: 'Scope freeze after the decision', due: 'Today, 14:30', ext: 0, why: 'Scope changed 3 times in 4 weeks. A fourth re-baselines the plan.', body: 'Once the scope decision lands at 14:00, scope is frozen for Checkout v2. New items go to the next release unless they are on the critical path. Reasons are logged for every change.', tone: 'Firm and specific', risk: 'Without it, a fourth change triggers a re-baseline.' },
102
- { id: 'c3', aud: 'customers', to: 'Marta, for design partners', role: 'Customer success', ch: 'Email', t: 'SSO date confirmed', due: 'Mon 12 Oct', ext: 1, why: 'You promised Marta the SSO date on Monday after the freeze.', body: 'Marta, SSO general release is on 14 Oct. Guided setup follows in the next release to cut the setup call. Please tell the three design partners on your side.', tone: 'Warm and exact', risk: 'A missed promise costs trust with a customer.' },
103
- { id: 'c4', aud: 'customers', to: 'Design partners', role: 'Customers', ch: 'Release note', t: 'SSO beta: what is new and what is next', due: 'Tue 13 Oct', ext: 1, why: 'The beta passed review. Partners asked for SCIM before audit logs.', body: 'The SSO beta is live. You can sign in with your identity provider. SCIM provisioning is next, ahead of audit logs, because you asked for it.', tone: 'Plain, no jargon', risk: 'External: needs your approval. Never sent automatically.' },
104
- { id: 'c5', aud: 'sales', to: 'Sales and support', role: 'Sales, support', ch: 'Doc and Slack', t: 'Returns insight: label printing', due: 'Tue 13 Oct', ext: 0, why: '3 of 3 calls name label printing. Sales hears this on calls.', body: 'Customers say printing the return label is the hardest step, and two of three did not know the 30-day window exists. Ask about labels on discovery calls. Do not promise a fix yet.', tone: 'Useful, not promotional', risk: 'Do not promise a fix before interview 5.' },
105
- { id: 'c6', aud: 'sales', to: 'Support', role: 'Support', ch: 'Email', t: 'Heads-up: new checkout in late October', due: 'Wed 14 Oct', ext: 0, why: 'Support should know what changes and what to say before tickets arrive.', body: 'A new checkout arrives in late October. Customers will see one-page address entry and wallet pay. Say late October, not a date, until it is confirmed.', tone: 'Calm, practical', risk: 'Quoting 24 Oct would be wrong if the cut is not made.' },
106
- ];
107
- /* who holds what: [person, role, told, now, days apart] */
108
- export const TRUTH = [['Priya', 'VP Product', 'Ship 24 Oct, on track', '31 Oct unless the scope is cut', 7], ['Dara', 'Engineering lead', 'Ship 24 Oct', '31 Oct unless the scope is cut', 7], ['Lee', 'Design', 'Copy freeze 9 Oct', 'Copy freeze 9 Oct', 0],
109
- ['Marta', 'Customer success', 'SSO 14 Oct', 'SSO 14 Oct', 0], ['Sam', 'Engineer', 'Nothing recent', 'Platform review pending', 0]];
110
- export const CHANNELS = [['Slack', 2 / 6, 'var(--acc)', '2'], ['Email', 2 / 6, 'var(--purple)', '2'], ['Release note', 1 / 6, 'var(--success)', '1'], ['Doc and Slack', 1 / 6, 'var(--warning)', '1']];
111
- export const BENCH = [['Top quartile', 0.86, 'var(--success)', '4.3%'], ['Peer median', 0.68, 'var(--acc)', '3.4%'], ['You', 0.62, 'var(--warning)', '3.1%']];
112
- export const QUESTIONS = ['Priya: what is the SSO date? (2 Oct)', 'Sam: why did scope change? (25 Sep)'];
113
-
114
- /** The pills for a family (the mockup's R2A, or the four periodic reports). */
115
- export const pills = (fam) => PILLS[fam] || [];
116
-
117
- /** The head line of a family's page (the mockup's r2info). q = { ap, n, fl }; audName; drafts / sent counts for Communications. */
118
- export function info(fam, rep, audName, q, comms) {
119
- if (fam === 'project') { const r = REPORTS.project.find((x) => x.id === rep) || REPORTS.project[0]; return { h: r.n + ' for ' + audName + ': ' + q.ap + ' of ' + q.n + ' sections approved', s: FAMS.project.purpose + '.', p: [q.ap, q.n] }; }
120
- if (fam === 'product') return { h: 'The review leads with the north star, 4% behind plan', s: FAMS.product.purpose + '.', p: [q.ap, q.n] };
121
- if (fam === 'communications') return { h: comms.drafts + ' messages waiting. Two people hold an old date', s: FAMS.communications.purpose + '.', p: [comms.sent, COMMS.length] };
122
- const p = REPORTS.periodic.find((x) => x.id === rep) || REPORTS.periodic[0];
123
- return { h: p.n + ' is ' + Math.round(p.pct * 100) + '% assembled, due ' + p.due, s: FAMS.periodic.purpose + '.', p: [Math.round(p.pct * 10), 10] };
124
- }
125
-
126
- if (typeof window !== 'undefined') window.__c3repix = { FAMS, REPORTS, HIST, COMMS, TRUTH, CHANNELS, BENCH, QUESTIONS, pills, sections, info };
@@ -1,130 +0,0 @@
1
- /* pm/c3-demo-rep2.js — DEMO answers for a REPORT as a document (/c3.html?demo=1 only; real mode never loads this file).
2
- * c3-demo.js loads it with a dynamic import and calls installRep2() once, after the other demo wrappers, so this wrapper answers first.
3
- * A report is a document in the mockup (console3.html r2doc, line 4264): type Report, v1, a draft, "Assembled from live data.", one section per
4
- * report section ([heading, text]). Its path here is planning/reports/<family>-<report>-<audience>.md; the text and the revisions are made on first
5
- * read from window.__c3repix (c3-demo-rep-ix.js) and kept in memory for the page's life. Routes answered, in the REAL response shapes of
6
- * workspace/lib/routes-doc-sheet.js and routes-doc-health.js:
7
- * GET /api/doc, /api/doc-sheet/revisions, /api/doc-sheet/at, /api/doc-sheet/proposals, /api/doc-sheet/log
8
- * POST /api/doc-sheet/edit, /propose, /accept, /reject, /why, /mark-current, /api/doc-health/check
9
- * A path outside planning/reports/ goes on to the earlier demo wrappers untouched. Nothing is saved anywhere. */
10
-
11
- const PREFIX = 'planning/reports/';
12
- const DOCS = {}; // path -> { revs: [{ rev, v, by, at, why, text }], events: [] }
13
- const PROPS = {}; // id -> { path, hash, before, after, prompt }
14
- let seq = 0;
15
-
16
- const hashOf = (t) => { let h = 5381; for (const c of String(t)) h = ((h * 33) ^ c.charCodeAt(0)) >>> 0; return h.toString(16).padStart(8, '0') + String(t).length.toString(16).padStart(4, '0'); };
17
- const json = (b) => new Response(JSON.stringify(b), { status: 200, headers: { 'content-type': 'application/json' } });
18
- const md = (secs) => secs.map(([h, t]) => '## ' + h + '\n' + t + '\n').join('\n');
19
- const mine = (p) => typeof p === 'string' && p.startsWith(PREFIX) && p.endsWith('.md');
20
-
21
- /** The sections of the report a path names: [[heading, text]]. null when the path names nothing the fixtures know. */
22
- function sectionsFor(path) {
23
- const R = window.__c3repix; if (!R) return null;
24
- const [fam, rep, aud] = path.slice(PREFIX.length, -3).split('-');
25
- if (fam === 'communications') { const c = R.COMMS.find((x) => x.id === rep); return c ? [['Message', c.body], ['Why now', c.why], ['Tone and risk', c.tone + '. ' + c.risk]] : null; }
26
- const secs = R.sections(fam, rep, aud);
27
- return secs && secs.length ? secs.map((s) => [s.h, s.t]) : null;
28
- }
29
- function docOf(path) {
30
- if (DOCS[path]) return DOCS[path];
31
- const s = sectionsFor(path); if (!s) return null;
32
- DOCS[path] = { revs: [{ rev: 1, v: 'v1', by: 'claude-code/session', at: '2026-10-08T08:12:00.000Z', why: 'Assembled from live data.', text: md(s) }], events: [] };
33
- return DOCS[path];
34
- }
35
- const push = (path, by, why, text, extra) => { const d = DOCS[path]; const rev = d.revs.length + 1; d.revs.push({ rev, v: 'v' + rev, by, at: '2026-10-08T08:12:00.000Z', why, text, ...extra }); return rev; };
36
- /* the sections of a report text by heading, for the proposals' per-section view */
37
- const secsOf = (t) => String(t).split(/^(?=## )/m).map((s) => ({ name: (/^## (.*)/.exec(s) || ['', 'Overview'])[1].trim(), body: s.replace(/^## .*\n?/, '').trim() }));
38
- function propView(id, p, cur) {
39
- const A = secsOf(p.before); const B = secsOf(p.after); const C = secsOf(cur);
40
- const names = [...B.filter((x) => { const y = A.find((a) => a.name === x.name); return !y || y.body !== x.body; }).map((x) => x.name), ...A.filter((a) => !B.some((x) => x.name === a.name)).map((a) => a.name)];
41
- return { id, state: p.state || 'proposed', prompt: p.prompt, at: '2026-10-08T08:12:00.000Z', hash: p.hash, by: 'agent', why: p.why || null, taken: null, of: null, closed_at: null,
42
- sections: names.map((name) => { const a = A.find((x) => x.name === name); const b = B.find((x) => x.name === name); const c = C.find((x) => x.name === name);
43
- return { name, kind: !a ? 'added' : !b ? 'removed' : 'changed', before: a ? a.body : '', after: b ? b.body : '', current: c ? c.body : null, stale: a ? !c || c.body !== a.body : !!c }; }) };
44
- }
45
-
46
- /* Report documents (initiative report-workspace): c3-demo-rs.js seeds the markdown of each cycle, its revisions, its open proposals and its checks here, so
47
- * the document sheet reads them through the routes below. A path seeded here is answered as written; nothing else about the routes changes. */
48
- const SEEDED = {}; // path -> the health answer { passed, total, checks }
49
- export function seedDoc(path, revs, healthAnswer) {
50
- DOCS[path] = { revs: revs.map((r, i) => ({ rev: i + 1, v: 'v' + (i + 1), by: r.by || 'claude-code/session', at: r.at || '2026-10-08T08:12:00.000Z', why: r.why || 'Drafted by PMOS', text: r.text, ...(r.via ? { via: r.via, text_by: r.text_by || 'agent' } : {}) })), events: [] };
51
- if (healthAnswer) SEEDED[path] = healthAnswer;
52
- }
53
- export function seedProposal(id, path, o) {
54
- const d = DOCS[path]; const before = d.revs[d.revs.length - 1].text;
55
- PROPS[id] = { path, prompt: o.prompt, after: o.after, hash: hashOf(o.after), before, state: o.state || 'proposed', why: o.why || null };
56
- }
57
- export function reviseDoc(path, by, why, text) { if (DOCS[path]) push(path, by, why, text); }
58
- /* an Edit-log event the design routes add (c3-demo-rd.js: a pin, a design decision); nothing when the document is unknown */
59
- export function logEvent(path, ev) { if (DOCS[path]) DOCS[path].events.push(ev); }
60
- export const docText = (path) => (DOCS[path] ? DOCS[path].revs[DOCS[path].revs.length - 1].text : '');
61
-
62
- /* the mockup's docHealth for a report that is still a draft: Fresh passes, Complete does not (a draft), Traced passes, and the claims check. */
63
- function health(path) {
64
- if (SEEDED[path]) return SEEDED[path];
65
- const R = window.__c3repix; const [fam, rep, aud] = path.slice(PREFIX.length, -3).split('-');
66
- const stale = fam === 'communications' || !R ? 0 : R.sections(fam, rep, aud).filter((s) => s.st === 'stale').length;
67
- const C = [{ id: 'fresh', pass: true, reason: 'Updated today' },
68
- { id: 'complete', pass: false, reason: 'Draft: weights or sections missing', fix: 'Fill the missing sections' },
69
- { id: 'traced', pass: true, reason: 'Linked to the goal and its tickets' }];
70
- /* the mockup adds one check for a Report (console3.html line 4266): every number traced to a source */
71
- C.push({ id: 'claims', name: 'Every number traced to a source', pass: !stale, reason: stale ? stale + ' section' + (stale > 1 ? 's rest' : ' rests') + ' on a stale source' : 'All sections traced', ...(stale ? { fix: 'Refresh the stale sources and redraft' } : {}) });
72
- return { passed: C.filter((c) => c.pass).length, total: C.length, checks: C };
73
- }
74
-
75
- function get(path, q) {
76
- const p = q.get('path'); if (!mine(p)) return undefined;
77
- const d = docOf(p);
78
- if (path === '/api/doc') return d ? new Response(d.revs[d.revs.length - 1].text, { status: 200, headers: { 'content-type': 'text/markdown; charset=utf-8' } }) : new Response('could not read the document', { status: 404 });
79
- if (!d) return json({ ok: false, error: 'could not read the document' });
80
- if (path === '/api/doc-sheet/revisions') return json({ ok: true, path: p, revisions: d.revs.map(({ text, ...r }) => ({ ...r, before_hash: '', after_hash: hashOf(text) })) });
81
- if (path === '/api/doc-sheet/proposals') { const cur = d.revs[d.revs.length - 1].text; return json({ ok: true, path: p, proposals: Object.entries(PROPS).filter(([, x]) => x.path === p).map(([id, x]) => propView(id, x, cur)).reverse() }); }
82
- if (path === '/api/doc-sheet/log') return json({ ok: true, path: p, revisions: d.revs.map(({ text, ...r }) => ({ ...r, via: r.via || 'sheet', text_by: r.text_by || (/^claude/.test(r.by) ? 'agent' : 'person'), before_hash: '', after_hash: hashOf(text) })), events: d.events });
83
- if (path === '/api/doc-sheet/at') { const r = d.revs.find((x) => x.rev === Number(q.get('rev'))); return json(r ? { ok: true, path: p, rev: r.rev, text: r.text } : { ok: false, error: 'no such revision' }); }
84
- return undefined;
85
- }
86
- function post(path, b) {
87
- if (!mine(b.path)) return undefined;
88
- const d = docOf(b.path); if (!d) return json({ ok: false, error: 'could not read the document' });
89
- if (path === '/api/doc-health/check') return json({ ok: true, path: b.path, health: health(b.path) });
90
- if (path === '/api/doc-sheet/edit') {
91
- if (typeof b.why !== 'string' || !b.why.trim()) return json({ ok: false, error: 'a why is required: say why the document changes' });
92
- return json({ ok: true, path: b.path, rev: push(b.path, 'human:wawan', b.why.trim(), b.text), logged: false });
93
- }
94
- if (path === '/api/doc-sheet/propose') { const id = 'prop-rep2-' + (++seq); PROPS[id] = { path: b.path, prompt: b.prompt, after: b.after, hash: hashOf(b.after), before: d.revs[d.revs.length - 1].text }; return json({ ok: true, id, state: 'proposed', hash: PROPS[id].hash, diff: [], voided_hash: null }); }
95
- if (path === '/api/doc-sheet/accept') {
96
- const p = PROPS[b.id]; if (!p || p.path !== b.path) return json({ ok: false, error: 'no such proposal' });
97
- if (b.hash !== p.hash) return json({ ok: false, error: 'the hash does not match the proposal the PM saw', reason: 'hash mismatch' });
98
- if (d.revs[d.revs.length - 1].text !== p.before) return json({ ok: false, error: 'stale: the document changed since this proposal was made', reason: 'stale' });
99
- let text = p.after;
100
- if (Array.isArray(b.sections) && b.sections.length) { /* only the ticked sections: the rest stay as they are */
101
- const C = secsOf(p.before); const P = secsOf(p.after);
102
- for (const n of b.sections) { const x = P.find((y) => y.name === n); const k = C.findIndex((y) => y.name === n); if (!x) { if (k >= 0) C.splice(k, 1); } else if (k >= 0) C[k] = x; else C.push(x); }
103
- text = C.map((x) => '## ' + x.name + '\n' + x.body + '\n').join('\n'); /* a report is all '## ' sections (md above) */
104
- }
105
- p.state = 'accepted';
106
- return json({ ok: true, path: b.path, rev: push(b.path, 'claude-code/session', p.prompt, text, { via: 'proposal', text_by: 'agent', proposal: b.id }) });
107
- }
108
- if (path === '/api/doc-sheet/reject') { const p = PROPS[b.id]; if (!p || p.path !== b.path) return json({ ok: false, error: 'no such proposal' }); p.state = 'rejected'; p.why = String(b.why || '').trim() || null; d.events.push({ kind: 'rejected', at: '2026-10-08T08:12:00.000Z', id: b.id, why: p.why, by: 'pm' }); return json({ ok: true, id: b.id, state: 'rejected' }); }
109
- if (path === '/api/doc-sheet/why') { const r = d.revs.find((x) => x.rev === Number(b.rev)); if (!r) return json({ ok: false, error: 'no such revision' }); if (!String(b.why || '').trim()) return json({ ok: false, error: 'a why is required' }); r.why_added = b.why.trim(); return json({ ok: true, rev: r.rev }); }
110
- if (path === '/api/doc-sheet/mark-current') { if (!String(b.why || '').trim()) return json({ ok: false, error: 'a why is required' }); d.events.push({ kind: 'marked', at: '2026-10-08T08:12:00.000Z', why: b.why.trim(), by: 'pm' }); return json({ ok: true, at: '2026-10-08T08:12:00.000Z' }); }
111
- return undefined;
112
- }
113
-
114
- export function installRep2() {
115
- const prev = window.fetch;
116
- window.fetch = (input, init) => {
117
- try {
118
- const raw = typeof input === 'string' ? input : input instanceof URL ? input.href : input && input.url;
119
- const method = String((init && init.method) || (input && input.method) || 'GET').toUpperCase();
120
- const u = new URL(raw, location.origin);
121
- if (u.origin === location.origin && u.pathname.startsWith('/api/doc')) {
122
- let out;
123
- if (method === 'GET') out = get(u.pathname, u.searchParams);
124
- else { let b = {}; try { b = init && init.body ? JSON.parse(init.body) : {}; } catch { b = {}; } out = post(u.pathname, b); }
125
- if (out) return Promise.resolve(out);
126
- }
127
- } catch { /* an unreadable request goes on as it is */ }
128
- return prev(input, init);
129
- };
130
- }
@@ -1,138 +0,0 @@
1
- /* pm/c3-demo-rep3.js — DEMO answers for the Reports dashboards (c3-reports.js) on /c3.html?demo=1.
2
- *
3
- * GET /api/report-dashboards the library of seven reports, the defaults, two boards and five initiatives
4
- * GET /api/report-dashboards/data the Calendar's demo strategy answer (c3-demo-cal3.js STRATEGY) narrowed to the scope
5
- * POST /api/report-dashboards/layout checks the key and the report ids as the real route does (400 on an unknown one), and
6
- * keeps the layout in this tab's sessionStorage, so a reload shows it. Nothing reaches the server.
7
- * POST /api/report-dashboards/schedule checks the key, plan and audience as the real route does, keeps the schedule in memory (one is seeded)
8
- * POST /api/outbox/draft answers with an entry in the real route's shape and keeps it in memory for this tab
9
- * GET /api/outbox the demo queue plus those drafts (two are seeded), for Reports > Drafts
10
- * POST /api/outbox/discard hides a draft (undo: true brings it back), in memory
11
- *
12
- * Wiring: c3-demo.js imports installRep3 and calls it in installDemo() AFTER its own fetch wrapper is in place, the way it installs
13
- * c3-demo-rep2.js. This wrapper must sit OVER c3-demo.js's: that wrapper answers every non-GET with { ok: true }, so a wrapper under it
14
- * (as c3-demo-cal3.js is, for a GET) would never see the layout POST. Real mode never loads this file.
15
- * The board and initiative narrowing is the demo's own: the real route narrows by boardOf(ini) in lib/report-dashboards.js. */
16
- import { STRATEGY } from './c3-demo-cal3.js';
17
-
18
- const LIBRARY = [
19
- { id: 'north', title: 'North star', question: 'Is the north-star metric on its plan?', source: 'KR metric readings', scopes: ['portfolio'] },
20
- { id: 'outcomes', title: 'Quarter outcomes', question: 'Where is each key result, where should it be, and where will it land?', source: 'KR metric records', scopes: ['portfolio', 'board', 'initiative'] },
21
- { id: 'signals', title: 'Early signals', question: 'What is drifting before the numbers say so?', source: 'Signal rules and KR readings', scopes: ['portfolio', 'board', 'initiative'] },
22
- { id: 'delivery', title: 'Delivery against promise', question: 'Which promised dates will hold?', source: 'Initiative plans and promised dates', scopes: ['portfolio', 'board', 'initiative'] },
23
- { id: 'maturity', title: 'Maturity by pillar', question: 'Where does each pillar stand against its target?', source: 'Pillar maturity records', scopes: ['portfolio'] },
24
- { id: 'bets', title: 'Bets and their checkpoints', question: 'When does each bet persevere or pivot?', source: 'Bets and hypotheses', scopes: ['portfolio', 'board', 'initiative'] },
25
- { id: 'synergy', title: 'Synergy and coverage', question: 'Do the bets add up to the key results?', source: 'Bets and their parent KR', scopes: ['portfolio', 'board'] },
26
- ];
27
- const DEFAULTS = { portfolio: ['north', 'outcomes', 'signals', 'delivery', 'bets', 'synergy', 'maturity'], board: ['outcomes', 'delivery', 'signals', 'bets', 'synergy'], initiative: ['delivery', 'signals', 'outcomes', 'bets'] };
28
- const BOARDS = [{ id: 'shop', title: 'Shop' }, { id: 'enterprise', title: 'Enterprise' }];
29
- const INITIATIVES = [{ id: 'checkout', title: 'Checkout v2', board: 'shop' }, { id: 'search', title: 'Search relevance', board: 'shop' }, { id: 'returns', title: 'Returns experience', board: 'shop' },
30
- { id: 'onb', title: 'Self-serve onboarding', board: 'shop' }, { id: 'sso', title: 'SSO and SCIM', board: 'enterprise' }];
31
- /* which initiatives each demo signal is about (the rule's subject); 'rel' is about the whole portfolio */
32
- const SIG_INI = { conv: ['checkout'], ret: ['returns'], slip: ['checkout'], churn: ['checkout'], dep: ['checkout', 'sso'], gate: ['search'], ent: ['sso'] };
33
- const KEY = 'pmos.c3.demo.rep3.layouts';
34
- const RANGE = { start: '2026-10-01', end: '2026-12-31' };
35
-
36
- const store = {
37
- read() { try { return JSON.parse(sessionStorage.getItem(KEY) || '{}') || {}; } catch { return {}; } },
38
- write(v) { try { sessionStorage.setItem(KEY, JSON.stringify(v)); } catch { /* no storage: the page keeps the layout itself */ } },
39
- };
40
-
41
- function scoped(scope, id) {
42
- const S = STRATEGY;
43
- const base = { ok: true, demo: true, scope, id: id || null, today: S.today, range: RANGE };
44
- if (scope == 'portfolio') return { ...base, north: S.north, outcomes: S.outcomes, signals: S.signals, synergy: S.synergy, timeline: S.timeline, maturity: S.maturity, delivery: S.delivery, sources: S.sources };
45
- const set = new Set(scope === 'board' ? INITIATIVES.filter((x) => x.board === id).map((x) => x.id) : INITIATIVES.some((x) => x.id === id) ? [id] : []);
46
- const rows = S.synergy.rows.filter((r) => set.has(r.initiative));
47
- const cols = S.synergy.columns.map((c, j) => rows.some((r) => r.weights[j] > 0));
48
- const pillars = new Set(S.synergy.columns.filter((_, j) => cols[j]).map((c) => c.n));
49
- return { ...base,
50
- north: null, maturity: null,
51
- outcomes: S.outcomes.filter((k) => pillars.has(k.pillar)),
52
- signals: S.signals.filter((s) => (SIG_INI[s.id] || []).some((i) => set.has(i))),
53
- synergy: { ...S.synergy, columns: S.synergy.columns.filter((_, j) => cols[j]), rows: rows.map((r) => ({ ...r, weights: r.weights.filter((_, j) => cols[j]) })), notes: [] },
54
- timeline: { ...S.timeline, rows: S.timeline.rows.filter((r) => set.has(r.initiative)), checkpoints: set.has('returns') ? S.timeline.checkpoints.slice(0, 1) : [] },
55
- delivery: { rows: S.delivery.rows.filter((r) => r.kind === 'init' && set.has(r.id)) },
56
- };
57
- }
58
-
59
- const json = (body, status) => new Response(JSON.stringify(body), { status: status || 200, headers: { 'content-type': 'application/json' } });
60
- const KEY_RE = /^(portfolio|board:([\w.-]+)|initiative:([\w.-]+))$/;
61
- function layout(b) {
62
- const m = KEY_RE.exec(String(b.key || ''));
63
- if (!m || (m[2] && !BOARDS.some((x) => x.id === m[2])) || (m[3] && !INITIATIVES.some((x) => x.id === m[3]))) return json({ ok: false, error: 'unknown dashboard key: ' + b.key }, 400);
64
- const L = store.read();
65
- if (b.reports === null) { delete L[b.key]; store.write(L); return json({ ok: true, key: b.key, reports: null }); }
66
- if (!Array.isArray(b.reports)) return json({ ok: false, error: 'reports must be a list of report ids, or null' }, 400);
67
- const bad = b.reports.find((r) => !LIBRARY.some((x) => x.id === r));
68
- if (bad !== undefined) return json({ ok: false, error: 'unknown report id: ' + bad }, 400);
69
- L[b.key] = [...new Set(b.reports)]; store.write(L);
70
- return json({ ok: true, key: b.key, reports: L[b.key] });
71
- }
72
- /* The demo's schedules (lib/report-schedules.js shape): the portfolio sends Leadership a monthly draft, as the mockup seeds it. In memory. */
73
- const PLAN_TXT = { weekly: 'Weekly, Mondays 08:00', monthly: 'Monthly, 1st at 08:00' };
74
- const nextOf = (plan) => { const d = new Date(); d.setHours(8, 0, 0, 0); if (plan === 'weekly') { do d.setDate(d.getDate() + 1); while (d.getDay() !== 1); } else { d.setDate(1); d.setMonth(d.getMonth() + 1); } return d.toISOString(); };
75
- const SCHEDS = { portfolio: { key: 'portfolio', ws: null, plan: 'monthly', audience: 'Leadership', last_status: 'ok', last_error: null, last_draft: 'out-demo-rep3-s1' } };
76
- const schedView = () => Object.fromEntries(Object.entries(SCHEDS).map(([k, v]) => [k, { ...v, label: PLAN_TXT[v.plan], next_run: nextOf(v.plan) }]));
77
- function schedule(b) {
78
- const m = KEY_RE.exec(String(b.key || ''));
79
- if (!m || (m[2] && !BOARDS.some((x) => x.id === m[2])) || (m[3] && !INITIATIVES.some((x) => x.id === m[3]))) return json({ ok: false, error: 'key must be portfolio, board:<id> or initiative:<id>' }, 400);
80
- if (b.plan === 'none') delete SCHEDS[b.key];
81
- else if (!PLAN_TXT[b.plan]) return json({ ok: false, error: 'plan must be none, weekly or monthly' }, 400);
82
- else if (!['Leadership', 'Team'].includes(b.audience)) return json({ ok: false, error: 'audience must be Leadership or Team' }, 400);
83
- else SCHEDS[b.key] = { key: b.key, ws: null, plan: b.plan, audience: b.audience, last_status: null, last_error: null, last_draft: null };
84
- const v = schedView();
85
- return json({ ok: true, key: b.key, schedule: v[b.key] || null, schedules: v });
86
- }
87
- let seq = 0;
88
- /* The dashboard drafts of the demo (Reports > Drafts): two seeded, then the ones the Share sheet makes in this tab. Kept in memory; a reload starts again. */
89
- const mkEntry = (id, b, at, by) => ({ ...(by ? { made_by: by, schedule_key: 'portfolio' } : {}), id, channel: b.channel, recipient: b.recipient || null, subject: b.subject || '', body: b.body, origin: 'pm', state: 'queued', hash: 'demo-' + id, claims: { ok: true, refused: [] }, last_result: null, created_at: at });
90
- const DRAFTS = [
91
- mkEntry('out-demo-rep3-s1', { channel: 'customer-note', recipient: 'Leadership', subject: 'Portfolio for Leadership', body: 'Portfolio for Leadership, 2026-10-08\nHeadline: Conversion is off course. 1 more thing needs your call.\n\nSections\nQuarter outcomes\n- 2 of 4 outcomes are on course. [reported]\n\nNeeds your call\n- Conversion is off course. [reported]\n\nSources: KR metric records. Read on 2026-10-08.' }, '2026-10-01T08:00:00.000Z', 'schedule'),
92
- mkEntry('out-demo-rep3-s2', { channel: 'customer-note', recipient: 'Team', subject: 'Board: Shop for Team', body: 'Board: Shop for Team, 2026-10-10\nHeadline: Checkout v2 is delayed.\n\nSections\nDelivery against promise\n- 1 of 4 commitments is delayed. [reported]\n\nNeeds your call\n- Checkout v2 is delayed. [reported]\n\nSources: Initiative plans and promised dates. Read on 2026-10-10.' }, '2026-10-10T16:20:00.000Z'),
93
- ];
94
- const gone = new Set();
95
- function draft(b) {
96
- if (!b.body || !String(b.body).trim()) return json({ ok: false, error: 'body required' }, 400);
97
- const e = mkEntry('out-demo-rep3-' + (++seq), b, new Date().toISOString());
98
- DRAFTS.push(e);
99
- return json({ ok: true, entry: e });
100
- }
101
- function discard(b) {
102
- const id = String(b.id || '');
103
- if (b.undo === true) { if (!gone.has(id)) return json({ ok: false, error: 'no discarded outbox entry with that id' }, 404); gone.delete(id); return json({ ok: true, id, restored: true }); }
104
- if (!DRAFTS.some((e) => e.id === id) || gone.has(id)) return json({ ok: false, error: 'no such outbox entry' }, 404);
105
- gone.add(id); return json({ ok: true, id, discarded: true });
106
- }
107
- /* The demo queue (Communications) plus the dashboard drafts, newest first. */
108
- async function outboxWith(prevFetch, input, init) {
109
- const r = await prevFetch(input, init); const j = await r.clone().json().catch(() => null);
110
- if (!j || !j.ok) return r;
111
- return json({ ...j, entries: [...(j.entries || []), ...DRAFTS.filter((e) => !gone.has(e.id)).slice().reverse()] });
112
- }
113
-
114
- export function installRep3() {
115
- const prev = window.fetch;
116
- window.fetch = (input, init) => {
117
- try {
118
- const raw = typeof input === 'string' ? input : input instanceof URL ? input.href : input && input.url;
119
- const method = String((init && init.method) || (input && input.method) || 'GET').toUpperCase();
120
- const u = new URL(raw, location.origin);
121
- if (u.origin === location.origin) {
122
- if (method === 'GET' && u.pathname === '/api/report-dashboards') return Promise.resolve(json({ ok: true, library: LIBRARY, layouts: store.read(), defaults: DEFAULTS, boards: BOARDS, initiatives: INITIATIVES, schedules: schedView() }));
123
- if (method === 'GET' && u.pathname === '/api/report-dashboards/data') {
124
- const scope = u.searchParams.get('scope') || 'portfolio'; const id = u.searchParams.get('id') || '';
125
- if (!['portfolio', 'board', 'initiative'].includes(scope)) return Promise.resolve(json({ ok: false, error: 'unknown scope: ' + scope }, 400));
126
- return Promise.resolve(json(scoped(scope, id)));
127
- }
128
- if (method === 'GET' && u.pathname === '/api/outbox') return outboxWith(prev, input, init);
129
- if (method === 'POST' && u.pathname === '/api/report-dashboards/schedule') { let b = {}; try { b = init && init.body ? JSON.parse(init.body) : {}; } catch { b = {}; } return Promise.resolve(schedule(b)); }
130
- if (method === 'POST' && (u.pathname === '/api/report-dashboards/layout' || u.pathname === '/api/outbox/draft' || u.pathname === '/api/outbox/discard')) {
131
- let b = {}; try { b = init && init.body ? JSON.parse(init.body) : {}; } catch { b = {}; }
132
- return Promise.resolve(u.pathname === '/api/outbox/draft' ? draft(b) : u.pathname === '/api/outbox/discard' ? discard(b) : layout(b));
133
- }
134
- }
135
- } catch { /* an unreadable request goes on as it is */ }
136
- return prev(input, init);
137
- };
138
- }