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,167 +0,0 @@
1
- #!/usr/bin/env node
2
- /* PMOS workspace — initiative lifecycle on the console3 Initiatives page, in demo mode (browser): c3-initiative-lifecycle, done-criteria
3
- * 4 and 5 (planning/prd/c3-initiative-lifecycle-prd.md; mockup v2, approved 2026-10-13).
4
- *
5
- * H the board's Initiatives tab at 1280×860 has two rows of controls above the list: the context row (breadcrumb, status, the tabs,
6
- * a Board settings icon) and the toolbar (search, view menu, filter and sort icons, New initiative); no view pills and no
7
- * labelled dropdowns; the filter menu groups Status into Active, Paused and Closed, and its badge counts the filters on
8
- * S On hold and Cancelled are statuses: a paused row shows since when, the check-back day and the reason; a cancelled row is hidden
9
- * until "N cancelled hidden" or the Status filter asks for it
10
- * M from the row menu: Put on hold (with a reason and a check-back day), Resume, Cancel (a reason is required), Reopen, Archive and
11
- * Restore, each with Undo on its toast; the archive view; Merge (the duplicate hint, the picked task moves, Undo merge moves it back)
12
- * P the initiative page: the banner of an on-hold and of a merged initiative, and its "…" menu
13
- *
14
- * The files it drives (named so `run-tests.js --changed` traces a change in any of them to this suite): public/pm/c3-ini-life.js,
15
- * c3-ini-life.css, c3-ib-initiatives.js, c3-initiatives.js, c3-ini-ui.js, c3-demo-boards.js, c3-quiet.js, c3-quiet.css, c3-sheet.js,
16
- * c3-toast.js and c3-ini-harness.js. Its list fragment is test-lists/c3-ini-life.json.
17
- */
18
- 'use strict';
19
- const { harness } = require('./c3-ini-harness');
20
-
21
- (async () => {
22
- const H = await harness('c3-ini-life', { width: 1280 });
23
- const { page, ok, until, st, open, toast } = H;
24
- await page.setViewportSize({ width: 1280, height: 860 });
25
- const store = (f, a) => st(f, a);
26
- const row = (id) => store((x) => { const r = window.__c3boards.rows.find((y) => y.id === x); return r ? { status: r.status, stopped: r.stopped, archived: r.archived } : null; }, id);
27
- const ready = () => until(() => st(() => { const p = document.querySelector('[data-ini-panel="initiatives"]'); return p && p.dataset.ibbState === 'ready'; }));
28
- const rows = () => st(() => [...document.querySelectorAll('[data-ibb="rows"] [data-ibb-row]')].map((r) => r.dataset.ibbRow));
29
- const seq = () => st(() => Number(document.querySelector('[data-ini-panel="initiatives"]').dataset.ibbSeq));
30
- const after = async (s0) => { await until(async () => (await seq()) > s0 && (await st(() => document.querySelector('[data-ini-panel="initiatives"]').dataset.ibbState)) === 'ready'); };
31
- const menuFor = async (id, pick) => { await page.click('[data-ibb-menu="' + id + '"]'); await until(() => st(() => !!document.querySelector('[data-ini="menu"]'))); if (pick) await page.click('[data-ini="menu"] ' + pick); };
32
- const sheetText = () => st(() => { const s = document.querySelector('[data-il="sheet"]'); return s ? s.textContent : ''; });
33
- const toastHas = (re) => until(async () => re.test(await toast()));
34
- const undo = () => page.click('[data-c3-toast-action]');
35
-
36
- /* ── H · the header ── */
37
- await open('board:idpf:initiatives');
38
- await ready();
39
- const geo = await st(() => {
40
- const p = document.querySelector('[data-ini="page"]');
41
- const list = p.querySelector('[data-ibb="body"]').getBoundingClientRect().top;
42
- const vis = (n) => { const r = n.getBoundingClientRect(); const cs = getComputedStyle(n); return r.width > 0 && r.height > 0 && cs.visibility !== 'hidden' && r.bottom <= list; };
43
- const ctrls = [...p.querySelectorAll('button, input, select')].filter(vis);
44
- const tops = ctrls.map((n) => n.getBoundingClientRect().top).sort((a, b) => a - b);
45
- const bands = tops.reduce((acc, t) => (acc.length && t - acc[acc.length - 1] < 24 ? acc : [...acc, t]), []); // controls within 24px share a row
46
- return { rows: bands.length, pills: [...p.querySelectorAll('[data-ibb-view]')].filter(vis).length, selects: [...p.querySelectorAll('select')].filter(vis).length,
47
- gear: (() => { const g = p.querySelector('[data-ini="board-settings"]'); return g && vis(g) ? { label: g.getAttribute('aria-label'), text: g.textContent.trim() } : null; })() };
48
- });
49
- ok('H1 two rows of controls above the list; no view pills, no labelled dropdowns', geo.rows === 2 && geo.pills === 0 && geo.selects === 0, JSON.stringify(geo));
50
- ok('H2 Board settings is an icon button with its name as the label', !!geo.gear && geo.gear.label === 'Board settings' && geo.gear.text === '', JSON.stringify(geo.gear));
51
- await page.click('[data-ibb="filters"]');
52
- const groups = await st(() => [...document.querySelectorAll('[data-ibb-filter="status"] optgroup')].map((g) => g.label + ':' + [...g.children].map((o) => o.textContent).join('/')).join(' | '));
53
- ok('H3 the filter menu groups Status into Active, Paused and Closed', groups === 'Active:All active/On track/At risk or late/At risk/Late | Paused:On hold | Closed:Done or cancelled/Done/Cancelled', groups);
54
- let s0 = await seq();
55
- await page.selectOption('[data-ibb-filter="owner"]', 'You');
56
- await after(s0);
57
- const badge = await st(() => { const b = document.querySelector('[data-ibb="filters"]'); return b.getAttribute('aria-label') + '|' + ((b.querySelector('.bdg') || {}).textContent || ''); });
58
- const chips = await st(() => [...document.querySelectorAll('[data-ibb-unset]')].map((c) => c.textContent.trim()).join(','));
59
- ok('H4 a filter on: the icon badge counts it, and it shows as a removable chip in the list header', badge === 'Filters, 1 on|1' && /^Owner: You/.test(chips), badge + ' ' + chips);
60
- await page.keyboard.press('Escape');
61
- s0 = await seq();
62
- await page.click('[data-ibb-unset="owner"]');
63
- await after(s0);
64
- ok('H5 removing the chip removes the filter', await st(() => !document.querySelector('[data-ibb-unset]') && !document.querySelector('[data-ibb="filters"] .bdg')));
65
-
66
- /* ── S · on hold and cancelled as statuses ── */
67
- await open('board:idpf:initiatives:view=all');
68
- await ready();
69
- const held = await st(() => { const r = document.querySelector('[data-ibb-row="IDPF-152"]'); return r ? r.textContent : ''; });
70
- ok('S1 an on-hold row: On hold, since when, the check-back day and the reason', /On hold/.test(held) && /since /.test(held) && /check back /.test(held) && /Q1 budget/.test(held), held.slice(0, 220));
71
- ok('S2 a cancelled row is hidden from All, and the footer says so', !(await rows()).includes('IDPF-153') && /1 cancelled hidden/.test(await st(() => document.querySelector('[data-ibb="foot"]').textContent)));
72
- s0 = await seq();
73
- await page.click('[data-ibb="show-cancelled"]');
74
- await after(s0);
75
- ok('S3 "1 cancelled hidden" opens the cancelled ones (Status: Cancelled)', (await rows()).join() === 'IDPF-153' && /Status: Cancelled/.test(await st(() => document.querySelector('[data-ibb="chips"]').textContent)));
76
-
77
- /* ── M · the row menu ── */
78
- await open('board:idpf:initiatives:q=IDPF-07&view=all');
79
- await ready();
80
- await menuFor('IDPF-07');
81
- const groupsM = await st(() => [...document.querySelectorAll('[data-ini="menu"] .ini-mlbl')].map((n) => n.textContent).join(','));
82
- ok('M1 the row menu: Move to a stage, Status, Tidy up', groupsM === 'Move to a stage,Status,Tidy up' && await st(() => !!document.querySelector('[data-ini="menu"] [data-il-hold]') && !!document.querySelector('[data-ini="menu"] [data-il-archive]')), groupsM);
83
- await page.click('[data-ini="menu"] [data-il-hold]');
84
- await until(() => st(() => !!document.querySelector('[data-il="sheet"] [data-il-do="hold"]')));
85
- await page.fill('[data-il-text="reason"]', 'Waiting on the partner contract');
86
- await page.click('[data-il-set="back"][data-v="two"]');
87
- ok('M2 Put on hold asks why and when to check back, and says what happens', /WHY IS IT PAUSED/i.test(await sheetText()) && /never turns Late/.test(await sheetText()) && await st(() => document.querySelector('[data-il-set="back"][data-v="two"]').getAttribute('aria-pressed') === 'true'));
88
- await page.click('[data-il-do="hold"]');
89
- await until(async () => ((await row('IDPF-07')) || {}).status === 'on hold');
90
- const h7 = await row('IDPF-07');
91
- ok('M3 the hold is recorded with its reason and a check-back day', h7.stopped && h7.stopped.reason === 'Waiting on the partner contract' && /^\d{4}-\d{2}-\d{2}$/.test(h7.stopped.back || ''), JSON.stringify(h7));
92
- await toastHas(/IDPF-07 is on hold/);
93
- await undo();
94
- await until(async () => ((await row('IDPF-07')) || {}).status === 'on track');
95
- ok('M4 Undo on the toast makes it active again', ((await row('IDPF-07')) || {}).status === 'on track');
96
- await ready();
97
- await until(async () => (await st(() => (document.querySelector('[data-ibb-row="IDPF-07"]') || {}).dataset.status)) === 'on track');
98
- await menuFor('IDPF-07', '[data-il-cancel]');
99
- await until(() => st(() => !!document.querySelector('[data-il="sheet"]')));
100
- ok('M5 Cancel needs a reason before it can be pressed', await st(() => !document.querySelector('[data-il-do="cancel"]') && /Pick a reason/.test(document.querySelector('[data-il="sheet"]').textContent)));
101
- await page.click('[data-il-set="why"][data-v="replaced"]');
102
- ok('M6 "Replaced by another initiative" points to Merge', await st(() => !!document.querySelector('[data-il="merge-instead"]')));
103
- await page.click('[data-il-set="why"][data-v="worth"]');
104
- await page.click('[data-il-do="cancel"]');
105
- await until(async () => ((await row('IDPF-07')) || {}).status === 'cancelled');
106
- ok('M7 Cancel records the reason; the row leaves the list', /^Not worth it now/.test(((await row('IDPF-07')).stopped || {}).reason || '') && await until(async () => !(await rows()).includes('IDPF-07')));
107
- s0 = await seq();
108
- await page.click('[data-ibb="show-cancelled"]');
109
- await after(s0);
110
- await menuFor('IDPF-07', '[data-il-reopen]');
111
- await until(async () => ((await row('IDPF-07')) || {}).status === 'on track');
112
- await toastHas(/IDPF-07 is reopened/); // the demo store changes before the answer reaches the page, so wait for the toast too
113
- ok('M8 Reopen from the row menu makes it active again', ((await row('IDPF-07')) || {}).status === 'on track' && /IDPF-07 is reopened/.test(await toast()), JSON.stringify([((await row('IDPF-07')) || {}).status, await toast()]));
114
-
115
- await open('board:idpf:initiatives:q=IDPF-37&view=all');
116
- await ready();
117
- await menuFor('IDPF-37', '[data-il-archive]');
118
- await until(() => st(() => !!document.querySelector('[data-il-do="archive"]')));
119
- await page.click('[data-il-do="archive"]');
120
- await until(async () => !!((await row('IDPF-37')) || {}).archived);
121
- ok('M9 Archive takes it out of the list, with the reason', (((await row('IDPF-37')).archived) || {}).reason === 'Not related to this board' && await until(async () => !(await rows()).includes('IDPF-37')));
122
- s0 = await seq();
123
- await page.fill('[data-ibb="q"]', '');
124
- await page.keyboard.press('Enter');
125
- await after(s0);
126
- s0 = await seq();
127
- await page.click('[data-ibb="show-archive"]');
128
- await after(s0);
129
- const arch = await rows();
130
- ok('M10 "N archived" opens the archive: the archived and the merged, each with Restore or Undo merge', ['IDPF-37', 'IDPF-154', 'IDPF-155'].every((x) => arch.includes(x))
131
- && await st(() => /Undo merge/.test(document.querySelector('[data-ibb-row="IDPF-155"]').textContent) && /Restore/.test(document.querySelector('[data-ibb-row="IDPF-37"]').textContent)), arch.join());
132
- await page.click('[data-il-restore="IDPF-37"]');
133
- await until(async () => !((await row('IDPF-37')) || {}).archived);
134
- ok('M11 Restore brings it back as it was', !(await row('IDPF-37')).archived && await until(async () => !(await rows()).includes('IDPF-37')));
135
-
136
- /* merge: the duplicate hint, the picked task moves, Undo merge moves it back */
137
- await open('board:idpf:initiatives:q=IDPF-151');
138
- await ready();
139
- ok('M12 a likely duplicate shows the hint', /Looks like a duplicate of IDPF-12/.test(await st(() => document.querySelector('[data-ibb-row="IDPF-151"]').textContent)));
140
- await page.click('[data-il-merge="IDPF-151"]');
141
- await until(() => st(() => !!document.querySelector('[data-il-do="merge"]')));
142
- ok('M13 Merge picks the most alike first and lists what moves', await st(() => document.querySelector('[data-il-set="pick"][aria-pressed="true"]').dataset.v === 'IDPF-12' && document.querySelector('[data-il-move="tasks"]').checked) && /Merge into IDPF-12/.test(await sheetText()));
143
- await page.click('[data-il-do="merge"]');
144
- await until(async () => !!((await row('IDPF-151')) || {}).archived);
145
- const moved = await store(() => window.__c3boards.tasks.find((t) => t.id === 'task-demo-l1').initiative);
146
- ok('M14 the merge archives the duplicate as Merged into IDPF-12 and moves its task', ((await row('IDPF-151')).archived || {}).into === 'IDPF-12' && moved === 'IDPF-12', moved);
147
- await toastHas(/IDPF-151 merged into IDPF-12/);
148
- await undo();
149
- await until(async () => !((await row('IDPF-151')) || {}).archived);
150
- ok('M15 Undo merge moves the task back and restores the duplicate', await store(() => window.__c3boards.tasks.find((t) => t.id === 'task-demo-l1').initiative) === 'IDPF-151');
151
-
152
- /* ── P · the initiative page ── */
153
- await open('ini:idpf:IDPF-152:overview');
154
- const ban = await st(() => (document.querySelector('[data-il="banner"]') || {}).textContent || '');
155
- ok('P1 an on-hold initiative: the banner with the reason and the check-back day, Resume and Cancel', /On hold since/.test(ban) && /Q1 budget/.test(ban) && /Check back/.test(ban) && /Resume/.test(ban), ban);
156
- await page.click('[data-il-menu="IDPF-152"]');
157
- const pm = await st(() => [...document.querySelectorAll('[data-ini="menu"] .ini-mlbl')].map((n) => n.textContent).join(','));
158
- ok('P2 the page "…" menu holds This initiative, Status and Tidy up', pm === 'This initiative,Status,Tidy up' && await st(() => !!document.querySelector('[data-ini="menu"] [data-il-resume]')), pm);
159
- await page.keyboard.press('Escape');
160
- await page.click('[data-il="banner"] [data-il-resume]');
161
- await until(async () => ((await row('IDPF-152')) || {}).status === 'on track');
162
- ok('P3 Resume from the banner: active again, the banner is gone', await until(() => st(() => !document.querySelector('[data-il="banner"]'))));
163
- await open('ini:idpf:IDPF-155:overview');
164
- const mban = await st(() => (document.querySelector('[data-il="banner"]') || {}).textContent || '');
165
- ok('P4 a merged initiative: the banner names where it went, with Undo merge', /Merged into IDPF-07/.test(mban) && /Undo merge/.test(mban), mban);
166
- await H.finish();
167
- })();
@@ -1,186 +0,0 @@
1
- #!/usr/bin/env node
2
- /* PMOS workspace — the console3 Initiatives page (/console.html, mockup v5; PRD planning/prd/console3-initiatives-parity-prd.md), its shell:
3
- * Portfolio, a board's frame and setup, the board settings, New board, New initiative, an initiative's header, stepper and workflow
4
- * editor. DEMO mode (?demo=1): c3-demo-boards.js answers every /api/boards read and write from its in-memory fixture, so the server only
5
- * serves the page. Nothing here writes a repository.
6
- *
7
- * The files it drives (named so `run-tests.js --changed` traces a change in any of them to this suite): public/pm/c3-initiatives.js,
8
- * c3-initiatives.css, c3-ini-ui.js, c3-ini-work.js, c3-ini-timeline.js, c3-ini-records.js, c3-demo-boards.js, c3-demo.js, c3-shell.js,
9
- * c3-sheet.js, c3-toast.js, c3-ib-initiatives.js, c3-ii-tabs.js and c3-ini-harness.js. Its list fragment is test-lists/c3-initiative-boards.json.
10
- */
11
- 'use strict';
12
- const { harness } = require('./c3-ini-harness');
13
-
14
- (async () => {
15
- const H = await harness('c3-initiatives');
16
- const { page, ok, until, st, open, toast } = H;
17
- const store = (f) => st(f);
18
-
19
- /* ── Portfolio ── */
20
- await open('');
21
- const ids = await until(() => st(() => [...document.querySelectorAll('[data-ini="boards"] [data-ini-board]')].map((r) => r.dataset.iniBoard).join(',')));
22
- ok('N1 the Portfolio lists the 5 boards in order', ids === 'idpf,pay,growth,office,hiring', ids);
23
- const pf = await st(() => document.querySelector('[data-ini="portfolio"]').closest('[data-ini="page"]').textContent);
24
- ok('N2 the header counts boards, initiatives and new asks; the sentence names the boards off track', /5 boards/.test(pf) && /315 initiatives/.test(pf) && /4 new asks/.test(pf) && /1 board is off track/.test(pf), pf.slice(0, 300));
25
- const idpfRow = await st(() => document.querySelector('[data-ini-board="idpf"]').textContent);
26
- ok('N3 a board row shows health, owner, Build and deliver with its Jira key, the four categories and the next release',
27
- /Needs attention/.test(idpfRow) && /Build and deliver/.test(idpfRow) && /Jira · IDPF/.test(idpfRow) && /Discover\s*29/.test(idpfRow) && /Learn\s*31/.test(idpfRow) && /IDPF 3\.1/.test(idpfRow), idpfRow.slice(0, 300));
28
- const offRow = await st(() => document.querySelector('[data-ini-board="office"]').textContent);
29
- ok('N4 a board with Build and deliver off says PMOS tasks only', /PMOS tasks only/.test(offRow) && !/Jira/.test(offRow), offRow.slice(0, 200));
30
- const tl = await until(() => st(() => { const t = document.querySelector('[data-ini="pf-timeline"] .ini-tl'); return t && t.querySelectorAll('[data-tlb]').length; }));
31
- ok('N5 the timeline across boards draws board > initiative > epic bars with a Today line', tl > 10 && await st(() => !!document.querySelector('[data-ini="pf-timeline"] .ini-tlnow')), String(tl));
32
- const asks = await st(() => [...document.querySelectorAll('[data-ini-asks]')].map((n) => n.dataset.iniAsks));
33
- ok('N6 the asks card links each board with new asks to its Triage', asks.includes('idpf') && asks.includes('pay') && asks.includes('office'), asks.join(','));
34
-
35
- /* ── a board ── */
36
- await page.click('[data-ini-open-board="idpf"]');
37
- await until(() => st(() => !!document.querySelector('[data-ini-board-page="idpf"] [data-ini="board-tabs"]')));
38
- const tabs = await st(() => [...document.querySelectorAll('[data-ini="board-tabs"] [data-ini-tab]')].map((b) => b.dataset.iniTab).join(','));
39
- ok('B1 a Build and deliver board has the nine tabs, Summary first', tabs === 'summary,initiatives,triage,backlog,board,timeline,releases,docs,sprints', tabs);
40
- ok('B2 the URL keeps the place: init=board:idpf:summary', (await st(() => new URLSearchParams(location.search).get('init'))) === 'board:idpf:summary');
41
- const setup = await st(() => document.querySelector('[data-ini="setup"]').textContent);
42
- ok('B3 the setup chips say Build and deliver on, the Jira project and the default workflow', /Build and deliver on/.test(setup) && /IDPF/.test(setup) && /start with Product/.test(setup), setup);
43
- const glance = await until(() => st(() => document.querySelectorAll('[data-ini="glance"] [data-ini-row]').length));
44
- ok('B4 Summary lists initiatives at a glance with their own stage dots', glance > 0 && await st(() => !!document.querySelector('[data-ini="glance"] .ini-steps')), String(glance));
45
- await page.click('[data-ini-catgo="Do"]');
46
- await until(() => st(() => /Do/.test((document.querySelector('[data-ibb-unset="cat"]') || {}).textContent || '')));
47
- ok('B5 a category bar opens the Initiatives tab filtered to that category', /board:idpf:initiatives:/.test(await st(() => new URLSearchParams(location.search).get('init'))) && await st(() => /Do/.test((document.querySelector('[data-ibb-unset="cat"]') || {}).textContent || '')));
48
- await page.reload({ waitUntil: 'load' });
49
- await until(() => st(() => /Do/.test((document.querySelector('[data-ibb-unset="cat"]') || {}).textContent || '')));
50
- ok('B6 a reload comes back to the same tab and filter', await st(() => document.querySelector('[data-ini-tab="initiatives"]').getAttribute('aria-pressed') === 'true' && /Do/.test((document.querySelector('[data-ibb-unset="cat"]') || {}).textContent || '')));
51
-
52
- await open('board:office:summary');
53
- const offTabs = await st(() => [...document.querySelectorAll('[data-ini="board-tabs"] [data-ini-tab]')].map((b) => b.dataset.iniTab).join(','));
54
- ok('B7 a board with Build and deliver off has no Releases and no Sprints tab', offTabs === 'summary,initiatives,triage,backlog,board,timeline,docs', offTabs);
55
- await open('board:office:sprints');
56
- ok('B8 a Sprints URL on such a board falls back to Summary', await st(() => document.querySelector('[data-ini-tab="summary"]').getAttribute('aria-pressed') === 'true'));
57
-
58
- /* ── board settings: turn Build and deliver on for Office move ── */
59
- await page.click('[data-ini="board-settings"]');
60
- await until(() => st(() => !!document.querySelector('[data-ini="settings-form"]')));
61
- ok('S1 the settings sheet offers no Build template while Build and deliver is off', await st(() => document.querySelector('[data-ini-offer="fix"]').disabled && document.querySelector('[data-ini-offer="product"]').disabled));
62
- await page.click('[data-ini="build"]');
63
- await until(() => st(() => !!document.querySelector('[data-ini="jira-key"]')));
64
- await page.fill('[data-ini="jira-key"]', 'off, mov');
65
- ok('S2 turning it on offers the Build templates and asks for the Jira key', await st(() => !document.querySelector('[data-ini-offer="fix"]').disabled && document.querySelector('[data-ini-offer="fix"]').checked));
66
- await page.click('[data-ini="settings-save"]');
67
- await until(() => store(() => window.__c3boards.boards.find((b) => b.id === 'office').build === true));
68
- const off = await store(() => { const b = window.__c3boards.boards.find((x) => x.id === 'office'); return { build: b.build, jira: b.jira, projects: (b.jiraProjects || []).join(), offer: b.offer }; });
69
- ok('S3 Save posts buildDeliver: Office move mirrors Jira OFF and MOV (two Jira projects) and offers the Build templates', off.build === true && off.jira === 'OFF' && off.projects === 'OFF,MOV' && off.offer.includes('fix'), JSON.stringify(off));
70
- const s4 = await until(async () => { const t = await toast(); return /Build and deliver on, mirroring Jira OFF/.test(t) && t; });
71
- ok('S4 a toast says what changed', !!s4, await toast());
72
- await until(() => st(() => !!document.querySelector('[data-ini-tab="sprints"]')));
73
- ok('S5 the board now has Releases and Sprints', await st(() => !!document.querySelector('[data-ini-tab="releases"]') && !!document.querySelector('[data-ini-tab="sprints"]')));
74
-
75
- /* ── New board ── */
76
- await open('');
77
- await page.click('[data-ini="new-board"]');
78
- await page.fill('[data-ini="nb-name"]', 'Partner portal');
79
- await page.click('[data-ini="nb-build"]');
80
- ok('NB1 with Build and deliver off, the Build workflows cannot be the default', await st(() => document.querySelector('[data-ini="new-board-form"] [data-ini-tpl="product"]').disabled && !document.querySelector('[data-ini="new-board-form"] [data-ini-tpl="project"]').disabled));
81
- await page.click('[data-ini="new-board-form"] [data-ini-tpl="simple"]');
82
- await page.click('[data-ini="nb-create"]');
83
- await until(() => st(() => !!document.querySelector('[data-ini-board-page="partner-portal"]')));
84
- const nb = await store(() => { const b = window.__c3boards.boards.find((x) => x.id === 'partner-portal'); return b && { build: b.build, defTpl: b.defTpl }; });
85
- ok('NB2 Create board adds the board (Build and deliver off, Simple by default) and opens its Triage', nb && nb.build === false && nb.defTpl === 'simple' && await st(() => document.querySelector('[data-ini-tab="triage"]').getAttribute('aria-pressed') === 'true'), JSON.stringify(nb));
86
-
87
- /* ── a board whose open initiatives carry no work and none is featured still lists them at a glance ── */
88
- await page.click('[data-ini-tab="initiatives"]');
89
- await until(() => st(() => !!document.querySelector('[data-ini="new-initiative"]')));
90
- await page.click('[data-ini="new-initiative"]');
91
- await until(() => st(() => !!document.querySelector('[data-ini="new-ini-form"]')));
92
- await page.fill('[data-ini="ni-title"]', 'Partner sign-up page');
93
- await until(() => st(() => { const s = document.querySelector('select[data-ini="ni-anchor"]'); return !!s && !s.disabled; }));
94
- await page.selectOption('[data-ini="ni-anchor"]', 'KR 2.1 Activation to 45%');
95
- await page.click('[data-ini="ni-create"]');
96
- await until(() => st(() => !!document.querySelector('[data-ini-crumb="board"]')));
97
- await page.click('[data-ini-crumb="board"]');
98
- await until(() => st(() => !!document.querySelector('[data-ini-tab="summary"]')));
99
- await page.click('[data-ini-tab="summary"]');
100
- const pg = await until(() => st(() => document.querySelector('[data-ini-panel="summary"] [data-ini-catgo]') && { rows: document.querySelectorAll('[data-ini="glance"] [data-ini-row]').length, empty: /No open initiatives yet/.test(document.querySelector('[data-ini-panel="summary"]').textContent) }));
101
- ok('B9 Summary lists an open initiative at a glance even when it has no work and is not featured', pg && pg.rows === 1 && !pg.empty, JSON.stringify(pg));
102
-
103
- /* ── New initiative, with its own workflow ── */
104
- await open('board:idpf:initiatives');
105
- await page.click('[data-ini="new-initiative"]');
106
- await until(() => st(() => !!document.querySelector('[data-ini="new-ini-form"]')));
107
- await page.fill('[data-ini="ni-title"]', 'Passwordless login with email OTP');
108
- await page.click('[data-ini="ni-create"]');
109
- ok('NI1 an initiative without an anchor is refused, and the sheet says why', /anchor/.test(await st(() => (document.querySelector('[data-ini="new-ini-form"] [data-ini="error"]') || {}).textContent || '')));
110
- await until(() => st(() => { const s = document.querySelector('select[data-ini="ni-anchor"]'); return !!s && !s.disabled; }));
111
- await page.selectOption('[data-ini="ni-anchor"]', 'KR 2.1 Activation to 45%');
112
- const ap = await st(() => { const s = document.querySelector('select[data-ini="ni-anchor"]'); return { groups: [...s.querySelectorAll('optgroup')].map((g) => g.label), health: [...s.options].filter((o) => /^health:/.test(o.value)).length }; });
113
- ok('NI3 the anchor is picked from the declared key results and health budgets, not typed', ap.groups.includes('Health budgets') && ap.health === 3 && ap.groups.some((g) => /^Objective/.test(g)), JSON.stringify(ap));
114
- const nul = await st(() => [...document.querySelector('[data-ini="new-ini-form"]').childNodes].filter((n) => n.nodeType === 3 && /null/.test(n.textContent)).length);
115
- ok('NI4 the New initiative sheet shows no stray "null" line', nul === 0, String(nul));
116
- await page.click('[data-ini="new-ini-form"] [data-ini-tpl="research"]');
117
- await page.click('[data-ini="ni-create"]');
118
- await until(() => st(() => !!document.querySelector('[data-ini-page]') && !!document.querySelector('[data-ini="stepper"]')));
119
- const steps = await st(() => [...document.querySelectorAll('[data-ini="stepper"] [data-ini-step]')].map((b) => b.dataset.iniStep).join(','));
120
- ok('NI2 Create opens the new initiative on its own workflow (Research only: Discover, Plan, Evaluate)', steps === 'Discover,Plan,Evaluate', steps);
121
-
122
- /* ── an initiative: tools, stepper, workflow editor ── */
123
- await open('ini:idpf:IDPF-07:overview');
124
- const head = await st(() => { const p = document.querySelector('[data-ini-page]'); const c = document.querySelector('[data-ini="crumbs"]').parentElement;
125
- return { title: !!p.querySelector(':scope > .lh'), dash: [...c.querySelectorAll('button')].some((b) => b.textContent.trim() === 'Dashboard'), tag: /Jira not set|Jira · |PMOS tasks only/.test(p.textContent.split('Overview')[0]),
126
- status: !!c.querySelector('[data-ini="ini-chips"]'), gear: !!document.querySelector('[data-ini="stepper"]').parentElement.querySelector('[data-ini="edit-workflow"]') }; });
127
- ok('H1 the header is the breadcrumb row with the status, and the stepper row with the gear; no title row, Dashboard button or Jira tag', !head.title && !head.dash && !head.tag && head.status && head.gear, JSON.stringify(head));
128
- await page.click('[data-ini="tools"]');
129
- const strip = await until(() => st(() => { const m = document.querySelector('[data-ini="menu"]'); return m && [...m.querySelectorAll('[data-ini-tool]')].map((b) => b.dataset.iniTool).join(','); }));
130
- ok('I1 Tools lists the tools of the current stage first (Plan: RICE, PRD, Done-criteria, ...)', /^rice,prd,rubric/.test(strip) && (await st(() => document.querySelector('[data-ini="menu"] .ini-mlbl').textContent)) === 'For Plan', strip);
131
- const more = await st(() => document.querySelectorAll('[data-ini="menu"] [data-ini-moretool]').length);
132
- ok('I2 then the tools of the other stages, grouped by stage', more > 3 && /Discover/.test(await st(() => document.querySelector('[data-ini="menu"]').textContent)), String(more));
133
- await page.keyboard.press('Escape');
134
- ok('I3 Escape closes the menu', await until(() => st(() => !document.querySelector('[data-ini="menu"]'))));
135
- await page.click('[data-ini-step="Build & Deliver"]');
136
- await until(() => st(() => document.querySelector('[data-ini-step="Build & Deliver"]') && document.querySelector('[data-ini-step="Build & Deliver"]').getAttribute('aria-pressed') === 'true'));
137
- const i4 = await until(async () => { const t = await toast(); return /moved to Build & Deliver/.test(t) && /No spec yet/.test(t) && t; });
138
- ok('I4 a stepper press moves the stage; the order warning is shown, not a block', !!i4, await toast());
139
- ok('I5 the move is written to the store', await store(() => window.__c3boards.rows.find((r) => r.id === 'IDPF-07').stage === 'Build & Deliver'));
140
-
141
- await page.click('[data-ini="edit-workflow"]');
142
- await until(() => st(() => !!document.querySelector('[data-ini="wf-editor"]')));
143
- ok('W1 the editor offers only the templates the board offers', await st(() => !document.querySelector('[data-wf-tpl="fix"]').disabled && document.querySelector('[data-wf-tpl="project"]').disabled));
144
- const wfRow = await st(() => { const r = document.querySelector('[data-wf-row="0"]'); const top = (s) => Math.round(r.querySelector(s).getBoundingClientRect().top); const nb = r.querySelector('.nb');
145
- return { grip: top('[data-wf-drag]'), name: top('[data-wf-name]'), del: top('[data-wf-del]'), dup: [...nb.querySelectorAll('.chips > *')].some((c) => c.textContent.trim() === document.querySelector('[data-wf-cat="0"]').value),
146
- mono: getComputedStyle(document.querySelector('[data-ini="wf-editor"] [role="group"] > span')).fontFamily !== getComputedStyle(document.querySelector('[data-ini="wf-editor"]')).fontFamily }; });
147
- ok('W1b each stage is one row (grip, name and remove on one line); no chip repeats the category; the template label is not mono', Math.abs(wfRow.grip - wfRow.del) < 8 && Math.abs(wfRow.name - wfRow.del) < 8 && !wfRow.dup && !wfRow.mono, JSON.stringify(wfRow));
148
- await page.focus('[data-wf-down="0"]'); await page.keyboard.press('Enter');
149
- const order = await st(() => [...document.querySelectorAll('[data-wf-name]')].map((i) => i.value).join(','));
150
- ok('W2 a stage moves down from the keyboard', order.startsWith('Plan,Discover'), order);
151
- await page.click('[data-wf-tpl="research"]');
152
- await page.click('[data-wf-save]');
153
- await until(() => st(() => !!document.querySelector('[data-ini="wf-confirm"]')));
154
- ok('W3 removing the current stage asks where it goes before saving', /Move IDPF-07 from Build & Deliver to Plan/.test(await st(() => document.querySelector('[data-ini="wf-confirm"]').textContent)));
155
- await page.click('[data-wf-confirm]');
156
- await until(() => store(() => window.__c3boards.rows.find((r) => r.id === 'IDPF-07').template === 'research'));
157
- const r07 = await store(() => { const r = window.__c3boards.rows.find((x) => x.id === 'IDPF-07'); return { stage: r.stage, wf: (r.workflow || []).map((s) => s.name).join(',') }; });
158
- ok('W4 the initiative now runs Research only and moved to Plan; other initiatives keep theirs', r07.stage === 'Plan' && r07.wf === 'Discover,Plan,Evaluate'
159
- && await store(() => !window.__c3boards.rows.find((r) => r.id === 'IDPF-12').template), JSON.stringify(r07));
160
-
161
- /* ── Jira epics of an initiative (jira-epic-items): in the page "…" menu ── */
162
- await page.click('[data-il-menu="IDPF-07"]');
163
- await page.click('[data-ini="menu"] [data-ini="jira-epics"]');
164
- await until(() => st(() => !!document.querySelector('[data-ini="epics-input"]')));
165
- await page.fill('[data-ini="epics-input"]', 'IDPF-900, XX-1');
166
- await page.click('[data-ini="epics-save"]');
167
- const epErr = await until(() => st(() => { const e = document.querySelector('[data-ini="epics-form"] [data-ini="error"]'); return e && e.textContent; }));
168
- ok('E1 an epic outside the board\'s Jira projects is refused, and the sheet says why', /XX-1 is not in a Jira project of IDPF/.test(epErr || ''), epErr);
169
- await page.fill('[data-ini="epics-input"]', 'idpf-900, idpf-901');
170
- await page.click('[data-ini="epics-save"]');
171
- await until(() => store(() => (window.__c3boards.rows.find((r) => r.id === 'IDPF-07').epics || []).length === 2));
172
- await until(() => st(() => !document.querySelector('[data-ini="epics-input"]')));
173
- await page.click('[data-il-menu="IDPF-07"]');
174
- const epChip = await until(() => st(() => { const c = document.querySelector('[data-ini="menu"] [data-ini="jira-epics"]'); return c && /Jira epics IDPF-900, IDPF-901/.test(c.textContent) && c.textContent; }));
175
- ok('E2 the epics are saved upper-cased, and the page menu names them', !!epChip, epChip);
176
- await page.keyboard.press('Escape');
177
-
178
- /* ── phone width ── */
179
- await page.setViewportSize({ width: 400, height: 860 });
180
- for (const loc of ['', 'board:idpf:summary', 'ini:idpf:IDPF-12:overview']) {
181
- await open(loc);
182
- const sx = await st(() => document.documentElement.scrollWidth - document.documentElement.clientWidth);
183
- ok('P1 at 400 px nothing scrolls sideways: ' + (loc || 'portfolio'), sx <= 0, String(sx));
184
- }
185
- await H.finish();
186
- })();
@@ -1,112 +0,0 @@
1
- #!/usr/bin/env node
2
- /* c3-light-load-test.js — the desktop console's light first load in a browser (initiative c3-desktop-light-load, PRD R1 to R6).
3
- * Real mode at 1440 wide on a scratch server: what the Briefing loads and reads on open, then that each tab, Settings, the
4
- * calendar popup and the dock still load when they are first opened. light-load.test.js checks the module graph and the routes. */
5
- 'use strict';
6
- const path = require('path');
7
- const { spawn } = require('child_process');
8
- const { findBrowser } = require('./lib/find-browser');
9
- const T = require('./test-run').configure({ name: 'c3-light-load' });
10
-
11
- const BASE = T.BASE;
12
- const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
13
- // Settings and the dock tree get 30 s: a loaded CI runner took longer than 15 s to draw them (twice on one run, 33/33 locally)
14
- const until = async (fn, ms = 15000, step = 150) => { const t0 = Date.now(); for (;;) { const v = await fn(); if (v) return v; if (Date.now() - t0 > ms) return v; await sleep(step); } };
15
- let pass = 0; let fail = 0;
16
- const ok = (name, cond, extra = '') => { if (cond) pass++; else fail++; console.log(`${cond ? '✓' : '✗'} ${name}${!cond && extra !== '' ? ' — ' + extra : ''}`); };
17
- let srv = null; let browser = null;
18
- const finish = async () => {
19
- if (browser) await browser.close().catch(() => {});
20
- if (srv) { try { srv.kill('SIGKILL'); } catch { /* gone */ } }
21
- T.killTmux();
22
- console.log(`\n${pass}/${pass + fail} c3-light-load assertions passed`);
23
- process.exit(fail ? 1 : 0);
24
- };
25
- process.on('unhandledRejection', (e) => { console.error(e); fail++; finish(); });
26
-
27
- (async () => {
28
- const exe = findBrowser();
29
- if (!exe) { ok('a Chrome or Chromium is on this machine', false); return finish(); }
30
- const { chromium } = require('playwright-core');
31
- srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT) }) });
32
- await T.waitForServer(BASE);
33
- browser = await chromium.launch({ executablePath: exe });
34
- const ctx = await browser.newContext({ viewport: { width: 1440, height: 900 } });
35
- await ctx.addInitScript(() => { try { localStorage.removeItem('pmos.c3.dock'); } catch { /* none */ } });
36
- const page = await ctx.newPage();
37
- const errors = []; const gets = []; const scripts = new Set();
38
- page.on('pageerror', (e) => errors.push(String((e && e.message) || e)));
39
- page.on('request', (r) => {
40
- const u = new URL(r.url());
41
- if (u.pathname.startsWith('/api/') && r.method() === 'GET') gets.push({ path: u.pathname, q: u.search, at: Date.now() });
42
- if (r.resourceType() === 'script') scripts.add(u.pathname.split('/').pop());
43
- });
44
- await page.goto(BASE + '/console.html');
45
- ok('the Briefing draws', !!(await until(() => page.evaluate(() => !!document.querySelector('[data-c3pg="pulse"]') && !!document.querySelector('[data-c3pg="deck-host"]')))));
46
- await sleep(8000); // the deferred badge reads and the dock's first read
47
- const t0 = gets.length ? gets[0].at : Date.now();
48
- const first = gets.filter((g) => g.at - t0 < 12000);
49
- const paths = first.map((g) => g.path);
50
-
51
- /* R1: the code of the other tabs is not loaded */
52
- /* 55 before briefing-prioritization; its one pure module (priority-model.js, the ranking Needs you, the deck, Mentions and Work all share) makes 56 */
53
- ok('R1: the desktop console loads at most 56 script files on open', scripts.size <= 56, scripts.size + ' files');
54
- for (const m of ['calendar-views.js', 'c3-initiatives.js', 'c3-reports.js', 'c3-settings.js', 'c3-phone.js', 'c3-doc-sheet.js', 'view-notes.js'])
55
- ok('R1: ' + m + ' is not loaded on open', !scripts.has(m));
56
- /* R2: the folded dock reads only the runs */
57
- ok('R2: the dock is folded', await page.evaluate(() => document.querySelector('[data-c3pg="dock"]').hidden));
58
- for (const p of ['/api/sessions', '/api/git/worktrees', '/api/sessions/transcript', '/api/scratchpad'])
59
- ok('R2: the folded dock does not read ' + p, !paths.includes(p));
60
- ok('R2: the runs are read for the agent button', paths.includes('/api/runs'));
61
- /* R3, R4: the badges read counts and the needs are read by kind */
62
- const needs = first.filter((g) => g.path === '/api/needs');
63
- ok('R4: every needs read names its kinds', needs.length > 0 && needs.every((g) => /[?&]kind=/.test(g.q)), JSON.stringify(needs.map((g) => g.q)));
64
- const items = first.filter((g) => g.path === '/api/pm-items');
65
- ok('R3: the Work badge reads the counts alone', items.length === 1 && /counts=1/.test(items[0].q), JSON.stringify(items.map((g) => g.q)));
66
- /* R5: the pulse reads the gantt rows alone */
67
- const cal = first.filter((g) => g.path === '/api/calendar-views');
68
- ok('R5: the pulse reads the quarter once, rows only', cal.length === 1 && /only=gantt/.test(cal[0].q), JSON.stringify(cal.map((g) => g.q)));
69
- /* R6: no read twice on open (the briefing's two reads have different questions) */
70
- const seen = new Map(); for (const g of first) { const k = g.path + g.q; seen.set(k, (seen.get(k) || 0) + 1); }
71
- const twice = [...seen.entries()].filter(([k, n]) => n > 1 && !k.startsWith('/api/runs') && !k.startsWith('/api/sources'));
72
- ok('R6: no read is made twice on open', twice.length === 0, JSON.stringify(twice));
73
- ok('R6: the scan and the report cards read once each', ['/api/scan/portfolio', '/api/report-setups', '/api/report-documents'].every((p) => first.filter((g) => g.path === p).length === 1));
74
- ok('the badges show their numbers', await page.evaluate(() => ['work-count', 'init-count', 'brief-count'].every((k) => !!document.querySelector('[data-c3pg="' + k + '"]'))));
75
-
76
- /* each place still opens */
77
- await page.click('[data-c3-tab="cal"]');
78
- ok('Calendar: its code loads on the first press', !!(await until(() => scripts.has('calendar-views.js'))));
79
- ok('Calendar: the page draws', !!(await until(() => page.evaluate(() => { const p = document.querySelector('[data-c3-pane="cal"]'); return !!p && !p.hidden && p.children.length > 0 && !p.querySelector('[data-c3pg="tab-error"]'); }), 30000)));
80
- await page.click('[data-c3-tab="init"]');
81
- ok('Initiatives: its code loads and the page draws', !!(await until(() => scripts.has('c3-initiatives.js') && page.evaluate(() => { const p = document.querySelector('[data-c3-pane="init"]'); return !!p && !p.hidden && p.children.length > 0 && !p.querySelector('[data-c3pg="tab-error"]'); }), 30000)));
82
- await page.click('[data-c3-tab="rep"]');
83
- ok('Reports: its code loads and the page draws', !!(await until(() => scripts.has('c3-reports.js') && page.evaluate(() => !!document.querySelector('[data-c3-pane="rep"] [data-rp3]')))));
84
- await page.click('[data-c3pg="settings"]');
85
- ok('Settings: its code loads and the page draws', !!(await until(() => scripts.has('c3-settings.js') && page.evaluate(() => { const p = document.querySelector('[data-c3-pane="settings"]'); return !!p && !p.hidden && p.children.length > 0 && !p.querySelector('[data-c3pg="tab-error"]'); }), 30000)));
86
- await page.click('[data-c3-tab="brief"]');
87
- const before = gets.length;
88
- await page.keyboard.press('Control+j');
89
- ok('Dock: opening it reads the sessions and the working trees', !!(await until(() => gets.slice(before).some((g) => g.path === '/api/sessions') && gets.slice(before).some((g) => g.path === '/api/git/worktrees'))));
90
- ok('Dock: the tree draws', !!(await until(() => page.evaluate(() => { const t = document.querySelector('[data-c3pg="dock-tree"]'); return !!t && !document.querySelector('[data-c3pg="dock"]').hidden && !/Reading the repository/.test(t.textContent); }), 30000)));
91
- await page.keyboard.press('Control+j');
92
- await page.evaluate(() => { if (document.activeElement && document.activeElement.blur) document.activeElement.blur(); });
93
- await page.keyboard.press('c'); // the key C opens the calendar popup (the header button may be in the quiet layout's overflow)
94
- ok('Calendar popup: the calendar draws in it', !!(await until(() => page.evaluate(() => { const h = document.querySelector('[data-c3pg="calpop-host"]'); return !!h && !h.querySelector('[data-c3pg="calpop-loading"]') && h.children.length > 0; }))));
95
- await page.keyboard.press('Escape');
96
- ok('no page error', errors.length === 0, errors.join(' | '));
97
- await ctx.close();
98
-
99
- /* a narrow window gets the phone companion, its code loaded then */
100
- const pctx = await browser.newContext({ viewport: { width: 1000, height: 800 } });
101
- const pp = await pctx.newPage(); const perr = [];
102
- pp.on('pageerror', (e) => perr.push(String((e && e.message) || e)));
103
- await pp.goto(BASE + '/console.html');
104
- await until(() => pp.evaluate(() => !!document.querySelector('[data-c3pg="pulse"]')));
105
- await pp.setViewportSize({ width: 400, height: 800 });
106
- ok('Phone: narrowing the desktop console mounts the companion', !!(await until(() => pp.evaluate(() => !!document.querySelector('[data-c3ph]')))));
107
- await pp.setViewportSize({ width: 1000, height: 800 });
108
- ok('Phone: widening it again removes the companion', !!(await until(() => pp.evaluate(() => !document.querySelector('[data-c3ph]') && !document.getElementById('c3-root').classList.contains('c3-phone-on')))));
109
- ok('Phone: no page error', perr.length === 0, perr.join(' | '));
110
- await pctx.close();
111
- finish();
112
- })();