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,397 +0,0 @@
1
- #!/usr/bin/env node
2
- 'use strict';
3
- /* c3-report-structure-test.js — the Structure step of the report studio, UI slice (initiative report-structure; mockup 43-reportstructure;
4
- * API contract planning/prd/report-structure-contract.md). A real server and a real Chromium drive /console.html?tab=rep; the routes of the
5
- * contract (/api/report-structure*, /api/charts) and the report reads are answered by Playwright route interception, so the page is
6
- * tested against the contract alone, not against the backend (c3-report-structure-real-test.js does that).
7
- *
8
- * entry the Ask PMOS answer (Shape it with PMOS sets the report up, then opens Structure), a set-up row (Shape the report, before Design
9
- * how it looks) and the step bar of the Design studio (1 Structure, 2 Design)
10
- * turn a first turn shows PMOS working, lands S1 with its questions as answer chips; a chip fills the box; a refine turn lands S2; the
11
- * strip lists both; S1 can be shown again and Go back to S1 posts a revert
12
- * plan What it answers; Sources in From PMOS and Outside PMOS with their state tags and actions (Open, Test pull, Check it works, How to
13
- * connect); Charts tagged New chart / From Charts; a row opens to question, Used in, what PMOS reads, why and the test pull;
14
- * Outline with chart chips and PMOS notes
15
- * chart Discuss this chart fills the box; Remove it posts a remove and lands the next version
16
- * source Add a source offers every From PMOS and Outside PMOS kind; a From PMOS source and a Chrome source are added; the Chrome check
17
- * shows its steps with Needs you and Check again, and passes on the second check
18
- * options Other structures: three side by side, the recommended first
19
- * dry Try it with real data runs one job and shows headline, values, flags, could not get, options
20
- * accept Use this structure posts the shown version; the setup sheet shows the saved structure with Refine the structure
21
- * charts the Charts tab lists a data chart beside the built-ins with its source and Used in
22
- * phone at 400 wide none of it scrolls sideways
23
- * Set RX_SHOTS=<dir> to save screenshots at 1440 and 400 wide. No script error and no failed request may be raised. */
24
- const fs = require('fs');
25
- const path = require('path');
26
- const { spawn } = require('child_process');
27
- const { findBrowser } = require('./lib/find-browser');
28
- const T = require('./test-run').configure({ name: 'c3-report-structure' });
29
-
30
- const BASE = T.BASE;
31
- const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
32
- const until = async (fn, ms = 10000, step = 100) => { const t0 = Date.now(); for (;;) { const v = await fn(); if (v) return v; if (Date.now() - t0 > ms) return v; await sleep(step); } };
33
- const results = [];
34
- const ok = (name, cond, extra = '') => { results.push({ name, cond: !!cond }); console.log(`${cond ? '✓' : '✗'} ${name}${!cond && extra !== '' ? ' — ' + String(extra).slice(0, 400) : ''}`); };
35
- let srv = null; let browser = null;
36
- const finish = async (code) => {
37
- if (browser) await browser.close().catch(() => {});
38
- if (srv) { try { srv.kill('SIGKILL'); } catch { /* gone */ } }
39
- T.killTmux();
40
- const bad = results.filter((x) => !x.cond).length;
41
- console.log(`\n${results.length - bad}/${results.length} c3-report-structure assertions passed`);
42
- process.exit(code !== undefined ? code : (bad ? 1 : 0));
43
- };
44
- process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
45
-
46
- /* ── the stub: the contract's routes, as a small state machine ── */
47
- const SETUP = { id: 'app-monthly', name: 'MySPH app performance, monthly', source: 'work', output: 'doc', status: 'active', schedule: { cadence: 'monthly', dayOfMonth: 3, time: '09:00' }, label: 'Monthly on the 3rd 09:00, draft only', next_draft: '2026-11-03', last_issued: null, cycles: 0, copy: null };
48
- const PROPOSAL = { name: 'MySPH app performance, monthly', purpose: 'Where to invest next quarter.', audience: 'Leadership', source: 'work', output: 'doc', schedule: { cadence: 'monthly', dayOfMonth: 3, time: '09:00' }, sources: ['Google Analytics'], sections: ['Headline'], learned_from: null, fixes: [] };
49
- const src = (id, kind, name, o) => ({ id, kind, name, via: '', ref: '', use: '', state: 'reached', group: ['connector', 'link', 'upload', 'person', 'chrome', 'computer'].includes(kind) ? 'outside' : 'pmos', ...o });
50
- const GA = src('ga', 'connector', 'Google Analytics 4: MySPH web + app', { via: 'Read through your Supermetrics connector', use: 'Test pull Mon 12 Oct 22:31. App streams iOS and Android, Sep 2026.' });
51
- const BOARD = src('board', 'pmos-level', 'Board: MySPH', { via: 'What the report covers', use: 'Its initiatives, releases, key results and risks.' });
52
- const DASH = src('dash', 'dashboard', 'Dashboard: MySPH health', { via: '2 of its 6 charts used', use: 'New users is already a chart there.' });
53
- const PAST = src('past', 'past-report', 'Past report: none yet', { via: 'From the second cycle', use: 'From November, PMOS reads the October report.', state: 'later' });
54
- const BQ = src('bq', 'connector', 'BigQuery: GA4 export', { via: 'Not connected', use: 'Optional. Only needed for retention older than 14 months.', state: 'not-connected' });
55
- const CH_NEW = { id: 'cpa', chart: null, name: 'Cost per new user', source: 'ga', from: 'GA4 cost', how: 'Paid spend divided by new users from paid campaigns', compare: 'Previous month', flag: 'Up 15% or more', question: 'What do new users cost us?', query: 'GA4 Data API: metric advertiserAdCost; filter sessionMedium = cpc', why: 'Spend explains the drop in new users.' };
56
- const CH_OLD = { id: 'new-users', chart: 'new-users', name: 'New users', source: 'ga', from: 'GA4 newUsers', how: 'Month total, app streams only', compare: 'Previous month', flag: 'Down 10% or more', question: 'Are we still bringing people in?', query: 'GA4 Data API: metric newUsers', why: 'The top of the funnel.' };
57
- const CH_RET = { id: 'ret', chart: null, name: 'D30 retention', source: 'ga', from: 'GA4 cohort exploration', how: 'Share of each monthly cohort still active on day 30', compare: 'The last 3 cohorts', flag: 'Below 25%', question: 'Do they stay?', query: 'GA4 Data API runReport with cohortSpec', why: 'You asked for it in S2.' };
58
- const SEC = (id, title, o) => ({ id, title, fixed: false, charts: [], notes: '', show: '', ...o });
59
- const OPTIONS = [
60
- { name: 'Goals first', sections: ['Headline', 'One block per Q4 objective', 'Where to invest'], good: 'A team that reviews against OKRs.', misses: 'Numbers outside an OKR disappear.', recommended: false },
61
- { name: 'Funnel first', sections: ['Headline', 'New users, activation, subscriptions', 'Where to invest'], good: 'Leadership deciding where to invest.', misses: 'Less detail per feature.', recommended: true },
62
- { name: 'Features first', sections: ['Headline', 'One block per feature', 'What to build next'], good: 'A product team deciding what to fix next.', misses: 'Leadership has to add the money side.', recommended: false },
63
- ];
64
- const plan1 = () => ({ purpose: { readers: 'Leadership: Gita Rahma and the product directors', decision: 'Where to invest next quarter', scope: 'MySPH app, iOS and Android', cadence: 'monthly', questions: ['Where do users drop between installing and paying?', 'What should we fund next quarter?'] },
65
- sources: [BOARD, DASH, PAST, GA, BQ].map((s) => ({ ...s })), charts: [CH_OLD, CH_NEW].map((c) => ({ ...c })),
66
- outline: [SEC('headline', 'Headline', { fixed: true, notes: 'The one thing leadership must know this month', show: 'Two sentences' }), SEC('funnel', 'The funnel this month', { charts: ['new-users', 'cpa'], notes: 'Where do users drop?', show: 'Funnel chart' }),
67
- SEC('needs', 'Needs your call', { fixed: true, notes: 'Asks to leadership' }), SEC('sources', 'Sources', { fixed: true, notes: 'Sources reached and not reached' })], options: OPTIONS });
68
- const Q1 = [{ q: 'Who reads it, and what do they decide with it?', chips: ['Leadership: where to invest next quarter', 'Product team: what to fix next', 'Both'] }, { q: 'Anything that must be in it?', chips: ['Revenue', 'Releases this month', 'Nothing more'] }];
69
-
70
- function makeStub() {
71
- const S = { versions: [], plans: {}, log: [], current: null, saved: null, running: null, ticks: 0, dry: null, dryResult: null, checks: {}, pulls: {}, pulling: [], pullTicks: 0, posts: [], gets: [], chartsRead: 0, polls: 0, setupMade: 0, designStep: 0 };
72
- const now = () => '2026-10-12T22:' + String(10 + S.versions.length * 3 + S.log.length).padStart(2, '0') + ':00.000Z';
73
- const land = (turn, plan, answer, extra) => { const n = S.versions.length + 1; S.versions.push({ n, at: now(), turn }); S.plans[n] = plan; S.current = n; S.log.push({ who: 'pmos', text: answer, at: now(), n, questions: [], options: [], ...(extra || {}) }); };
74
- const view = () => {
75
- if (S.running) { S.ticks++; if (S.ticks >= 2) { const r = S.running; S.running = null; r.done(); } }
76
- if (S.pulling.length) { S.pullTicks++; if (S.pullTicks >= 2) { const src = S.pulling.shift(); S.pulls[src] = { source: src, n: S.current, period: '2026-09', reached: true, ok: true, reason: '', charts: 2, got: 1, at: now(),
77
- values: [{ chart: 'new-users', value: '48,210', was: '52,930', delta: '-8.9%', flag: true, note: '' }] }; } }
78
- return { ok: true, setup: { id: SETUP.id, name: SETUP.name, cadence: 'monthly' }, structure: { pulls: S.pulls, pulling: S.pulling.slice(), running: !!S.running, job: S.running ? { kind: S.running.kind } : null, current: S.current, saved: S.saved, versions: S.versions.slice(), log: S.log.slice(),
79
- plan: S.current ? S.plans[S.current] : null, dry: S.dry, checks: S.checks, errors: [] } };
80
- };
81
- const chromeChecks = (pass) => ({ source: 'looker', kind: 'chrome', at: now(), running: false, ok: pass, steps: [
82
- { id: 'mac', label: 'PMOS runs on this Mac', state: 'works', reason: 'The read runs on your MacBook.' }, { id: 'session', label: 'A session can start with Claude in Chrome', state: 'works', reason: 'PMOS started a test session.' },
83
- { id: 'extension', label: 'Claude in Chrome answers', state: 'works', reason: 'The extension answered.' },
84
- { id: 'signed-in', label: 'You are signed in to Looker Studio', state: pass ? 'works' : 'needs-you', reason: pass ? 'Opened the report as you.' : 'Chrome showed the Google sign-in page. Sign in once in Chrome yourself, then check again.' },
85
- { id: 'read', label: 'PMOS can read the numbers', state: pass ? 'works' : 'waiting', reason: pass ? 'Read the table "Spend by campaign".' : 'Waits for the step above.' }] });
86
- const fixedPlan = (n) => JSON.parse(JSON.stringify(S.plans[n]));
87
- const route = async (route) => {
88
- const req = route.request(); const u = new URL(req.url()); const p = u.pathname; const m = req.method();
89
- const json = (b, status) => route.fulfill({ status: status || 200, contentType: 'application/json', body: JSON.stringify(b) });
90
- const body = m === 'POST' ? JSON.parse(req.postData() || '{}') : null;
91
- if (m === 'POST') S.posts.push({ path: p, body });
92
- if (m === 'GET' && p === '/api/report-structure') { S.polls++; return json(view()); }
93
- if (m === 'GET' && p === '/api/report-structure/version') return json({ ok: true, plan: S.plans[Number(u.searchParams.get('n'))] });
94
- if (m === 'GET' && p === '/api/report-structure/dry') return json({ ok: true, dry: S.dryResult });
95
- if (m === 'GET' && p === '/api/charts') { S.chartsRead++; return json({ ok: true, charts: [{ id: 'new-users', name: 'New users', question: 'Are we still bringing people in?', source: { kind: 'connector', name: 'Google Analytics 4', via: 'Supermetrics' }, from: 'GA4 newUsers', how: 'Month total', compare: 'Previous month', flag: 'Down 10% or more', query: 'GA4 Data API: metric newUsers', why: 'The top of the funnel.', users: [{ kind: 'dashboard', id: 'health', name: 'MySPH health' }, { kind: 'report', id: SETUP.id, name: SETUP.name }] }] }); }
96
- if (m === 'POST' && p === '/api/report-structure/turn') {
97
- if (S.running) return json({ ok: false, error: 'a report-structure job is already running' }, 409);
98
- S.ticks = 0; S.log.push({ who: 'pm', text: body.text, at: now() });
99
- let done;
100
- if (!S.versions.length && !S.asked) done = () => { S.asked = true; S.log.push({ who: 'pmos', text: 'Before I propose a structure, two questions.', at: now(), questions: Q1, options: [] }); };
101
- else if (!S.versions.length) done = () => land('From your answers', plan1(), 'Three ways to shape it. I recommend Funnel first. I drafted it as S1.', { options: OPTIONS });
102
- else if (/^Test pull/.test(body.text)) done = () => { S.log.push({ who: 'pmos', text: 'Read it: both charts returned a number.', at: now(), questions: [], options: [] }); };
103
- else done = () => { const pl = fixedPlan(S.current); pl.charts.push({ ...CH_RET }); pl.outline.splice(2, 0, SEC('ret', 'Retention by cohort', { charts: ['ret'], notes: 'Do the people we bring in stay?', show: 'Cohort table' })); land('Retention added', pl, 'S2: D30 retention added.'); };
104
- S.running = { kind: 'report-structure', done };
105
- return json({ ok: true, running: true });
106
- }
107
- if (m === 'POST' && p === '/api/report-structure/pull') { if (S.pulling.includes(body.source)) return json({ ok: false, error: 'PMOS is already reading this source. Wait for the answer.' }, 409); S.pullTicks = 0; S.pulling.push(body.source); return json({ ok: true, running: true }); }
108
- if (m === 'POST' && p === '/api/report-structure/revert') { S.current = body.n; return json({ ok: true, structure: view().structure }); }
109
- if (m === 'POST' && p === '/api/report-structure/remove') { const pl = fixedPlan(S.current); if (body.kind === 'chart') { pl.charts = pl.charts.filter((c) => c.id !== body.ref); pl.outline.forEach((o) => { o.charts = o.charts.filter((c) => c !== body.ref); }); } else pl.sources = pl.sources.filter((s) => s.id !== body.ref); land('Remove ' + body.ref, pl, 'Removed ' + body.ref + '.'); return json({ ok: true, structure: view().structure }); }
110
- if (m === 'POST' && p === '/api/report-structure/source') {
111
- const pl = fixedPlan(S.current); const s = body.source; const grp = ['connector', 'link', 'upload', 'person', 'chrome', 'computer'].includes(s.kind) ? 'outside' : 'pmos';
112
- pl.sources.push({ via: '', ref: '', ...s, group: grp, state: s.kind === 'chrome' ? 'needs-you' : 'reached' });
113
- land('Add ' + s.name, pl, s.name + ' added.');
114
- if (s.kind === 'chrome') S.checks[s.id] = { ...chromeChecks(false), source: s.id };
115
- return json({ ok: true, structure: view().structure });
116
- }
117
- if (m === 'POST' && p === '/api/report-structure/check') { S.checks[body.source] = { ...chromeChecks(true), source: body.source }; const pl = S.plans[S.current]; const s = pl.sources.find((x) => x.id === body.source); if (s) s.state = 'reached'; return json({ ok: true, check: S.checks[body.source] }); }
118
- if (m === 'POST' && p === '/api/report-structure/dry') { S.ticks = 0; S.running = { kind: 'report-structure-dry', done: () => { S.dry = { run: 'r1', n: body.n || S.current, at: now(), ok: true };
119
- S.dryResult = { n: S.dry.n, period: '2026-09', headline: 'New users fell 8.9% while cost per new user rose 19%.', values: [{ chart: 'new-users', value: '48,210', was: '52,930 in Aug', delta: '-8.9%', flag: true, note: 'down 10% or more is the rule' }, { chart: 'cpa', value: 'IDR 21,900', was: 'IDR 18,400 in Aug', delta: '+19%', flag: false, note: '' }], missing: [{ source: 'bq', reason: 'BigQuery is not connected.' }], options: ['Fix the first 30 days', 'Restart paid acquisition'] }; } }; return json({ ok: true, running: true }); }
120
- if (m === 'POST' && p === '/api/report-structure/accept') { S.saved = body.n; return json({ ok: true, structure: view().structure, brief: 'structure/brief.md', charts: ['cpa'] }); }
121
- if (m === 'GET' && p === '/api/report-setups') return json({ ok: true, setups: S.setupMade ? [SETUP] : [SETUP], findings: [], asks: S.askShown ? [{ id: 'ask1', text: 'Monthly product performance for leadership, numbers from Google Analytics', state: 'ready', proposal: PROPOSAL }] : [], finder: { cadence: 'off' } });
122
- if (m === 'POST' && p === '/api/report-setups/setup') { S.setupMade++; return json({ ok: true, setup: SETUP, drafted: null }); }
123
- if (m === 'GET' && p === '/api/report-documents') return json({ ok: true, docs: [] });
124
- if (m === 'GET' && p === '/api/report-dashboards') return json({ ok: true, library: [{ id: 'north', title: 'North star', question: 'Are we moving?', source: 'PMOS ledgers' }], layouts: {}, defaults: { board: [], initiative: [] }, boards: [], initiatives: [], schedules: [] });
125
- if (m === 'GET' && p === '/api/report-design') return json({ ok: true, setup: { id: SETUP.id, name: SETUP.name }, design: { running: false, current: null, saved: null, versions: [], log: [], samples: [], description: '', format: 'deck' } });
126
- return route.continue();
127
- };
128
- return { S, route };
129
- }
130
-
131
- (async () => {
132
- const exe = findBrowser();
133
- if (!exe) { console.log('· no Chrome/Chromium on this machine, c3-report-structure suite skipped'); process.exit(0); }
134
- let chromium;
135
- try { ({ chromium } = require('playwright-core')); } catch { console.log('· playwright-core not installed, c3-report-structure suite skipped'); process.exit(0); }
136
- srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT) }) });
137
- await T.waitForServer(BASE);
138
- browser = await chromium.launch({ executablePath: exe });
139
- require('./lib/c3-full-console').fullConsole(browser); // the desktop layout at phone width (c3-phone-companion)
140
- const shots = process.env.RX_SHOTS || ''; if (shots) fs.mkdirSync(shots, { recursive: true });
141
- const shot = async (pg, n) => { if (shots) await pg.screenshot({ path: path.join(shots, n + '.png') }); };
142
-
143
- const errors = [];
144
- const stub = makeStub(); const S = stub.S;
145
- const ctx = await browser.newContext({ viewport: { width: 1440, height: 1000 } });
146
- await ctx.route(/\/api\/(report-structure|charts|report-setups|report-documents|report-dashboards|report-design)/, stub.route);
147
- const page = await ctx.newPage();
148
- page.on('pageerror', (e) => errors.push('pageerror: ' + String((e && e.message) || e)));
149
- page.on('console', (m) => { if (m.type() === 'error' && !/favicon|Failed to load resource/.test(m.text())) errors.push('console: ' + m.text()); });
150
- page.on('response', (r) => { if (r.status() >= 400 && !/\/api\/(scan\/(?:today|portfolio)|settings|report-structure)\b/.test(r.url()) && !(r.status() === 409)) errors.push('http ' + r.status() + ' ' + r.url()); });
151
- page.on('dialog', (d) => d.dismiss().catch(() => {}));
152
- const text = (sel) => page.textContent(sel).catch(() => '');
153
- const sent = (p) => S.posts.filter((x) => x.path === p);
154
- const closeAll = async () => { for (let i = 0; i < 3 && await page.$('.sheet'); i++) { await page.keyboard.press('Escape'); await sleep(250); } };
155
- const goReports = async () => { await page.goto(BASE + '/console.html?tab=rep'); await page.waitForSelector('[data-rp3]'); await page.click('[data-rp3-tab="reports"]'); await page.waitForSelector('[data-rs-reg="' + SETUP.id + '"]', { timeout: 15000 }); };
156
- const idle = () => page.waitForFunction(() => { const b = document.querySelector('[data-st-act="send"]'); return b && !b.disabled && !document.querySelector('[data-st-running]'); }, null, { timeout: 15000 });
157
- const noOverflow = () => page.evaluate(() => document.documentElement.scrollWidth <= document.documentElement.clientWidth + 1);
158
-
159
- /* ── entry points ── */
160
- S.askShown = true;
161
- await goReports();
162
- ok('the set-up row has Shape the report before Design how it looks', await page.$$eval('[data-rs-reg="' + SETUP.id + '"] .acts button', (a) => { const t = a.map((b) => b.textContent.trim()); return t.indexOf('Shape the report') > -1 && t.indexOf('Shape the report') < t.indexOf('Design how it looks'); }));
163
- await page.waitForSelector('[data-rs-card="ask1"]');
164
- ok('an Ask PMOS answer has Shape it with PMOS', !!(await page.$('[data-rs-card="ask1"] [data-rs-act="shape"]')));
165
- await page.click('[data-rs-card="ask1"] [data-rs-act="shape"]');
166
- await page.waitForSelector('[data-st-studio]');
167
- ok('Shape it with PMOS sets the report up, then opens the Structure step', sent('/api/report-setups/setup').length === 1 && sent('/api/report-setups/setup')[0].body.ask === 'ask1' && /Not saved yet/.test(await text('[data-st-studio]')));
168
- ok('the step bar says 1 Structure, 2 Design with Structure pressed', await page.getAttribute('[data-st-step-btn="structure"]', 'aria-pressed') === 'true' && /2 Design/.test(await text('[data-st-steps]')));
169
- ok('with no version yet the studio asks what the report is for and the Use button waits', !!(await page.$('[data-st-studio] .fold')) && await page.$eval('[data-st-act="save"]', (b) => b.disabled));
170
- await closeAll();
171
- S.askShown = false;
172
- await goReports();
173
- await page.click('[data-rs-reg="' + SETUP.id + '"] [data-rs-act="shape"]');
174
- await page.waitForSelector('[data-st-studio]');
175
- ok('Shape the report on the row opens the same studio', !!(await until(async () => /Not saved yet/.test(await text('[data-st-studio]')))));
176
- await closeAll();
177
- await page.click('[data-rs-reg="' + SETUP.id + '"] [data-rs-act="design"]');
178
- await page.waitForSelector('[data-rd-studio]');
179
- ok('the Design studio shows the step bar with 2 Design pressed', await page.getAttribute('[data-rd-step="design"]', 'aria-pressed') === 'true' && await page.getAttribute('[data-rd-step="structure"]', 'aria-pressed') === 'false');
180
- await page.click('[data-rd-step="structure"]');
181
- await page.waitForSelector('[data-st-studio]');
182
- ok('1 Structure in the Design studio opens the Structure step', !!(await until(() => page.$('[data-st-steps]'))));
183
- await page.click('[data-st-step-btn="design"]');
184
- await page.waitForSelector('[data-rd-studio]');
185
- ok('2 Design in the Structure step opens the Design studio', true);
186
- await page.click('[data-rd-step="structure"]');
187
- await page.waitForSelector('[data-st-studio]');
188
-
189
- /* ── a first turn: PMOS asks, answer chips ── */
190
- await page.fill('[data-st-in]', 'I need a monthly product performance report for leadership. Get the numbers from Google Analytics.');
191
- await page.click('[data-st-act="send"]');
192
- ok('a turn posts the words as ONE turn', !!(await until(() => sent('/api/report-structure/turn').length === 1)) && /monthly product performance/.test(sent('/api/report-structure/turn')[0].body.text));
193
- ok('while the job runs the conversation says PMOS is working and Make the next version waits', !!(await until(() => page.$('[data-st-running]'))));
194
- await page.waitForSelector('[data-st-question]', { timeout: 15000 });
195
- ok('PMOS asks its questions with answer chips', (await page.$$('[data-st-question]')).length === 2 && (await page.$$('[data-st-question] [data-st-act="chip"]')).length === 6);
196
- await page.click('[data-st-act="chip"][data-v="Leadership: where to invest next quarter"]');
197
- ok('a chip puts its answer in the box', (await page.inputValue('[data-st-in]')) === 'Leadership: where to invest next quarter.');
198
- await page.click('[data-st-act="chip"][data-v="Revenue"]');
199
- ok('a second chip adds to the box', /next quarter\. Revenue\.$/.test(await page.inputValue('[data-st-in]')));
200
- await page.click('[data-st-act="send"]');
201
- await page.waitForSelector('[data-st-v="1"]', { timeout: 15000 });
202
- ok('the second turn lands S1', (await page.$$('[data-st-v]')).length === 1 && await page.getAttribute('[data-st-v="1"]', 'aria-pressed') === 'true');
203
- await page.waitForSelector('[data-st-purpose]');
204
- ok('the plan shows What it answers with readers, decision, scope and the questions', /Leadership: Gita Rahma/.test(await text('[data-st-purpose]')) && /Where to invest next quarter/.test(await text('[data-st-purpose]')) && /Where do users drop/.test(await text('[data-st-purpose]')));
205
-
206
- /* ── sources ── */
207
- const grp = (g) => page.$$eval('[data-st-group="' + g + '"] + ul > li', (a) => a.map((li) => li.getAttribute('data-st-src')));
208
- ok('Sources are grouped: From PMOS and Outside PMOS', JSON.stringify(await grp('pmos')) === '["board","dash","past"]' && JSON.stringify(await grp('outside')) === '["ga","bq"]', JSON.stringify([await grp('pmos'), await grp('outside')]));
209
- ok('each source shows its state', await page.getAttribute('[data-st-src="ga"] [data-st-state]', 'data-st-state') === 'reached' && /Not connected/.test(await text('[data-st-src="bq"] [data-st-state]')) && /First cycle: nothing to read/.test(await text('[data-st-src="past"] [data-st-state]')));
210
- ok('the actions fit the source: Open, Test pull, How to connect', /Open/.test(await text('[data-st-src="board"] .acts')) && /Test pull/.test(await text('[data-st-src="ga"] .acts')) && /How to connect/.test(await text('[data-st-src="bq"] .acts')));
211
- ok('a source says how many charts use it', /2 charts/.test(await text('[data-st-src="ga"]')) && !/ chart/.test(await text('[data-st-src="board"] .chips')));
212
- await page.click('[data-st-src="ga"] [data-st-act="test"]');
213
- ok('Test pull starts a read of that source, not a turn', !!(await until(() => sent('/api/report-structure/pull').length === 1)) && sent('/api/report-structure/pull')[0].body.source === 'ga' && sent('/api/report-structure/turn').length === 2, JSON.stringify(sent('/api/report-structure/pull')));
214
- const reading = await until(() => page.$('[data-st-src="ga"] [data-st-pulling]'), 5000, 50);
215
- const readingOff = reading ? await page.isDisabled('[data-st-src="ga"] [data-st-act="test"]') : null;
216
- const readingNote = reading ? await text('[data-st-src="ga"] [data-st-pullnote]') : '';
217
- ok('the source row says Reading… with a disabled button while it reads', !!reading && readingOff === true && /Read only/.test(readingNote), JSON.stringify({ reading: !!reading, readingOff, readingNote }));
218
- const pulledEl = await until(() => page.$('[data-st-src="ga"] [data-st-pulled="ok"]'), 8000, 100);
219
- const pulledRow = await text('[data-st-src="ga"]'); const pulledActs = await text('[data-st-src="ga"] .acts');
220
- ok('the row then says Pulled with the period and how many charts returned a number, and offers Test pull again', !!pulledEl && /2026-09/.test(pulledRow) && /1 of 2 charts returned a number/.test(pulledRow) && /Test pull again/.test(pulledActs), JSON.stringify({ pulledEl: !!pulledEl, pulledRow, pulledActs, tags: await page.$$eval('[data-st-src="ga"] .tag', (a) => a.map((x) => x.className + '|' + x.getAttributeNames().join(',') + '|' + x.getAttribute('data-st-pulled') + '|' + x.textContent)), q: !!(await page.$('[data-st-pulled]')) }));
221
- ok('the conversation got no line from the pull', !/Test pull from/.test(await text('.rd-dks-log')));
222
- await idle();
223
- await page.click('[data-st-src="bq"] [data-st-act="connect"]');
224
- ok('How to connect says where to connect it', /Settings, Connectors/.test(await text('[data-c3-toast]')));
225
-
226
- /* ── charts ── */
227
- ok('Charts are tagged New chart and From Charts', await text('[data-st-chart="cpa"] [data-st-tag]') === 'New chart' && await text('[data-st-chart="new-users"] [data-st-tag]') === 'From Charts' && /1 new, 1 from Charts/.test(await text('[data-st-metrics]')));
228
- await page.click('[data-st-chart="new-users"] [data-st-act="chart"]');
229
- await page.waitForSelector('[data-st-detail="new-users"]');
230
- ok('a chart row opens to question, used in, what PMOS reads and why', /Are we still bringing people in/.test(await text('[data-st-q]')) && /GA4 Data API: metric newUsers/.test(await text('[data-st-query]')) && /top of the funnel/.test(await text('[data-st-why]')));
231
- ok('Used in names the dashboard and report that use a chart from Charts', !!(await until(async () => /dashboard MySPH health/.test(await text('[data-st-used]')) && /this report/.test(await text('[data-st-used]')))), await text('[data-st-used]'));
232
- ok('a chart from Charts has Open in Charts, a new chart does not', !!(await page.$('[data-st-detail="new-users"] [data-st-act="opencharts"]')));
233
- await page.click('[data-st-chart="cpa"] [data-st-act="chart"]');
234
- ok('only one row is open and a new chart says it is saved in Charts when you use the structure', !!(await page.$('[data-st-detail="cpa"]')) && !(await page.$('[data-st-detail="new-users"]')) && /Saved in Charts when you use this structure/.test(await text('[data-st-used]')) && !(await page.$('[data-st-detail="cpa"] [data-st-act="opencharts"]')));
235
- ok('a chart the pull did not return says it is not tried yet', /Not tried on this version/.test(await text('[data-st-testpull]')));
236
- await page.click('[data-st-chart="new-users"] [data-st-act="chart"]');
237
- ok('a chart the pull returned shows its value, comparison, flag, source and time', !!(await until(async () => /48,210/.test(await text('[data-st-testpull]')))) && /was 52,930/.test(await text('[data-st-testpull]')) && /-8\.9%/.test(await text('[data-st-testpull]')) && /Flagged/.test(await text('[data-st-testpull]'))
238
- && /Pulled from Google Analytics 4: MySPH web \+ app at \d\d:\d\d, 2026-09\. Not saved in the report\./.test(await text('[data-st-pulled-from]')), await text('[data-st-testpull]'));
239
- await page.click('[data-st-chart="cpa"] [data-st-act="chart"]');
240
- await shot(page, 'structure-logic-1440');
241
- await page.click('[data-st-detail="cpa"] [data-st-act="discuss"]');
242
- ok('Discuss this chart fills the box with the chart name and focuses it', (await page.inputValue('[data-st-in]')) === 'About Cost per new user: ' && await page.evaluate(() => document.activeElement && document.activeElement.hasAttribute('data-st-in')));
243
-
244
- /* ── the outline ── */
245
- ok('the Outline lists the sections in order with chart chips and PMOS notes', JSON.stringify(await page.$$eval('[data-st-section]', (a) => a.map((x) => x.getAttribute('data-st-section')))) === '["headline","funnel","needs","sources"]'
246
- && /New users/.test(await text('[data-st-section="funnel"]')) && /PMOS notes/.test(await text('[data-st-section="funnel"]')) && !/PMOS notes/.test(await text('[data-st-section="headline"]')) && /In every report/.test(await text('[data-st-section="headline"]')));
247
-
248
- /* ── a refine turn: S2 ── */
249
- await idle();
250
- await page.fill('[data-st-in]', 'Add retention by cohort.');
251
- await page.click('[data-st-act="send"]');
252
- await page.waitForSelector('[data-st-v="2"]', { timeout: 15000 });
253
- ok('a refine turn lands S2 and the strip lists S1 and S2', (await page.$$('[data-st-v]')).length === 2 && await page.getAttribute('[data-st-v="2"]', 'aria-pressed') === 'true');
254
- await page.waitForSelector('[data-st-chart="ret"]');
255
- ok('S2 has the retention chart and a section that says New in S2', !!(await page.$('[data-st-chart="ret"]')) && /New in S2/.test(await text('[data-st-section="ret"]')) && !/New in S2/.test(await text('[data-st-section="funnel"]')));
256
- await shot(page, 'structure-1440');
257
- await page.$eval('[data-st-sources]', (n) => n.scrollIntoView({ block: 'start' })); await sleep(200); await shot(page, 'structure-sources-1440');
258
- ok('the conversation names each version with a link', (await page.$$('[data-st-log] [data-st-act="ver"]')).length === 2);
259
- await page.click('[data-st-v="1"]');
260
- await until(async () => await page.getAttribute('[data-st-v="1"]', 'aria-pressed') === 'true' && !(await page.$('[data-st-chart="ret"]')));
261
- ok('S1 shows again without the retention chart and says it is an older version', !(await page.$('[data-st-chart="ret"]')) && /older version/.test(await text('[data-st-vcap]')));
262
- await page.click('[data-st-act="revert"]');
263
- ok('Go back to S1 posts a revert for n 1', !!(await until(() => sent('/api/report-structure/revert').length === 1)) && sent('/api/report-structure/revert')[0].body.n === 1);
264
- await until(async () => !(await page.$('[data-st-act="revert"]')));
265
- await page.click('[data-st-v="2"]');
266
- await page.waitForSelector('[data-st-chart="ret"]');
267
- await page.click('[data-st-act="revert"]');
268
- ok('going back to S2 the same way makes it current again', !!(await until(() => sent('/api/report-structure/revert').length === 2)) && sent('/api/report-structure/revert')[1].body.n === 2);
269
- await until(async () => !(await page.$('[data-st-act="revert"]')));
270
-
271
- /* ── Remove it ── */
272
- await page.click('[data-st-chart="ret"] [data-st-act="chart"]');
273
- await page.click('[data-st-detail="ret"] [data-st-act="drop"]');
274
- ok('Remove it posts a remove of that chart', !!(await until(() => sent('/api/report-structure/remove').length === 1)) && sent('/api/report-structure/remove')[0].body.kind === 'chart' && sent('/api/report-structure/remove')[0].body.ref === 'ret');
275
- await page.waitForSelector('[data-st-v="3"]', { timeout: 10000 });
276
- ok('removing makes the next version, S3, without the chart', !(await page.$('[data-st-chart="ret"]')) && (await page.$$('[data-st-v]')).length === 3);
277
-
278
- /* ── Add a source ── */
279
- await page.click('[data-st-act="panel"][aria-expanded]');
280
- await page.waitForSelector('[data-st-panel]');
281
- const optKinds = await page.$$eval('[data-st-panel] [data-st-act="opt"]', (a) => a.map((b) => b.getAttribute('data-v')));
282
- ok('Add a source offers every From PMOS and Outside PMOS kind', JSON.stringify(optKinds) === JSON.stringify(['pmos-level', 'dashboard', 'chart', 'document', 'past-report', 'connector', 'link', 'upload', 'person', 'chrome', 'computer']), optKinds.join(','));
283
- ok('the panel has the two groups and says PMOS only reads', /From PMOS/.test(await text('[data-st-panel]')) && /Outside PMOS/.test(await text('[data-st-panel]')) && /PMOS only reads/.test(await text('[data-st-panel]')));
284
- await shot(page, 'structure-pmos-1440');
285
- await page.click('[data-st-panel] [data-st-act="opt"][data-v="document"]');
286
- await page.waitForSelector('[data-st-form="document"]');
287
- await page.click('[data-st-form="document"] [data-st-act="add"]');
288
- ok('a form needs its name before it adds', sent('/api/report-structure/source').length === 0);
289
- await page.fill('[data-st-form="document"] [data-st-field="name"]', 'MySPH strategy 2026');
290
- await page.click('[data-st-form="document"] [data-st-act="add"]');
291
- ok('a From PMOS source (a document) posts a source of that kind', !!(await until(() => sent('/api/report-structure/source').length === 1)) && sent('/api/report-structure/source')[0].body.source.kind === 'document' && sent('/api/report-structure/source')[0].body.source.name === 'MySPH strategy 2026' && !('state' in sent('/api/report-structure/source')[0].body.source));
292
- await page.waitForSelector('[data-st-v="4"]', { timeout: 10000 });
293
- ok('it joins the From PMOS group in S4', JSON.stringify(await grp('pmos')) === '["board","dash","past","mysph-strategy-2026"]', JSON.stringify(await grp('pmos')));
294
- await page.click('[data-st-act="panel"][aria-expanded]');
295
- await page.click('[data-st-panel] [data-st-act="opt"][data-v="chrome"]');
296
- await page.waitForSelector('[data-st-form="chrome"]');
297
- await page.fill('[data-st-form="chrome"] [data-st-field="name"]', 'Looker Studio: Paid acquisition');
298
- await page.fill('[data-st-form="chrome"] [data-st-field="ref"]', 'not a link');
299
- await page.click('[data-st-form="chrome"] [data-st-act="add"]');
300
- ok('a Chrome page needs a link that starts with https://', /starts with https/.test(await text('[data-c3-toast]')) && !S.posts.some((x) => x.body && x.body.source && x.body.source.kind === 'chrome'));
301
- await page.fill('[data-st-form="chrome"] [data-st-field="ref"]', 'https://lookerstudio.google.com/reporting/abc');
302
- await page.click('[data-st-form="chrome"] [data-st-act="add"]');
303
- await page.waitForSelector('[data-st-check]', { timeout: 10000 });
304
- const lid = sent('/api/report-structure/source').pop().body.source.id;
305
- ok('a Chrome source shows its check step by step', (await page.$$('[data-st-check] [data-st-step]')).length === 5 && await page.getAttribute('[data-st-check] [data-st-step="signed-in"]', 'data-st-step-state') === 'needs-you');
306
- ok('a failing step says Needs you with its reason; the steps after it Wait', /Needs you/.test(await text('[data-st-step="signed-in"]')) && /Sign in once in Chrome/.test(await text('[data-st-step="signed-in"]')) && /Waiting/.test(await text('[data-st-step="read"]')) && /Works/.test(await text('[data-st-step="mac"]')));
307
- ok('the check says one step needs you, what the session may do, and the 4 hour wait', /1 step needs you/.test(await text('[data-st-check-state]')) && /Only the browser tools/.test(await text('[data-st-check]')) && /up to 4 hours/.test(await text('[data-st-check]')));
308
- ok('the source row is in Outside PMOS with Needs you and Check it works', /Needs you/.test(await text('[data-st-src="' + lid + '"] [data-st-state]')) && /Check it works/.test(await text('[data-st-src="' + lid + '"] .acts')) && /Re-checked 1 hour before each draft/.test(await text('[data-st-src="' + lid + '"]')));
309
- await shot(page, 'structure-browser-1440');
310
- ok('Check again is offered', /Check again/.test(await text('[data-st-check] [data-st-act="chkagain"]')));
311
- await page.click('[data-st-check] [data-st-act="chkagain"]');
312
- ok('Check again posts a check for that source', !!(await until(() => sent('/api/report-structure/check').length === 1)) && sent('/api/report-structure/check')[0].body.source === lid);
313
- await until(async () => /All steps work/.test(await text('[data-st-check-state]')));
314
- ok('the second check passes: every step Works and the source is Reached', /All steps work/.test(await text('[data-st-check-state]')) && (await page.$$eval('[data-st-check] [data-st-step-state="works"]', (a) => a.length)) === 5 && /Reached/.test(await text('[data-st-src="' + lid + '"] [data-st-state]')));
315
- await shot(page, 'structure-browser-ok-1440');
316
- await page.click('[data-st-src="' + lid + '"] [data-st-act="chkopen"]');
317
- ok('Check it works on the row posts a check', !!(await until(() => sent('/api/report-structure/check').length === 2)));
318
-
319
- /* ── Other structures ── */
320
- await page.click('[data-st-view="options"]');
321
- await page.waitForSelector('[data-st-options]');
322
- ok('Other structures shows three side by side with the recommended first', JSON.stringify(await page.$$eval('[data-st-option]', (a) => a.map((x) => x.getAttribute('data-st-option')))) === '["Funnel first","Goals first","Features first"]' && /Recommended/.test(await text('[data-st-option="Funnel first"]')));
323
- ok('each option has its sections, good for and misses', /GOOD FOR/.test(await text('[data-st-option="Goals first"]')) && /MISSES/.test(await text('[data-st-option="Goals first"]')) && (await page.$$('[data-st-option="Goals first"] li')).length === 3);
324
- const cols = await page.$$eval('[data-st-option]', (a) => a.map((x) => Math.round(x.getBoundingClientRect().top)));
325
- ok('the three options sit in one row at 1440 wide', cols.every((t) => Math.abs(t - cols[0]) < 4), cols.join(','));
326
- await shot(page, 'structure-options-1440');
327
- await page.click('[data-st-option="Goals first"] [data-st-act="choose"]');
328
- ok('Use this instead puts the choice in the box and goes back to the plan', (await page.inputValue('[data-st-in]')) === 'Use the "Goals first" structure instead.' && await page.getAttribute('[data-st-view="plan"]', 'aria-pressed') === 'true');
329
- await page.fill('[data-st-in]', '');
330
-
331
- /* ── Try it with real data ── */
332
- await page.click('[data-st-view="dry"]');
333
- await page.waitForSelector('[data-st-nodry]');
334
- ok('Try it with real data explains that it reads only and saves nothing', /saves nothing/.test(await text('[data-st-nodry]')));
335
- await page.click('[data-st-act="dryrun"]');
336
- ok('the run posts ONE dry job for the version on screen', !!(await until(() => sent('/api/report-structure/dry').length === 1)) && sent('/api/report-structure/dry')[0].body.n === 5);
337
- ok('while it runs the view says so and nothing is saved', !!(await until(() => page.$('[data-st-dryrunning]'))));
338
- await page.waitForSelector('[data-st-dry-headline]', { timeout: 15000 });
339
- ok('the result shows the headline PMOS would write', /New users fell 8\.9%/.test(await text('[data-st-dry-headline]')));
340
- ok('the values show each chart with its comparison', /New users/.test(await text('[data-st-dry-values]')) && /48,210/.test(await text('[data-st-dry-values]')) && /52,930 in Aug/.test(await text('[data-st-dry-values]')) && /\+19%/.test(await text('[data-st-dry-values]')));
341
- ok('a flagged value is flagged and listed under Flags', /Flagged/.test(await text('[data-st-dry-values]')) && /New users/.test(await text('[data-st-dry-flags]')));
342
- ok('what it could not get names the source and why', /BigQuery/.test(await text('[data-st-dry-missing]')) && /not connected/.test(await text('[data-st-dry-missing]')));
343
- ok('the options PMOS would propose show, with the note that the PM decides', /Fix the first 30 days/.test(await text('[data-st-dry-options]')) && /PMOS never decides them/.test(await text('[data-st-dry-options]')));
344
- await shot(page, 'structure-dry-1440');
345
- await page.click('[data-st-view="plan"]');
346
- await page.click('[data-st-chart="cpa"] [data-st-act="chart"]');
347
- ok('a chart row now shows its test pull value', /IDR 21,900/.test(await text('[data-st-testpull]')) && /\+19%/.test(await text('[data-st-testpull]')));
348
-
349
- /* ── Use this structure ── */
350
- await page.click('[data-st-act="save"]');
351
- ok('Use this structure posts the version on screen', !!(await until(() => sent('/api/report-structure/accept').length === 1)) && sent('/api/report-structure/accept')[0].body.n === 5);
352
- await page.waitForSelector('[data-rd-brief]', { timeout: 10000 });
353
- await page.waitForSelector('[data-st-saved-wrap]');
354
- ok('the report setup sheet shows the saved structure beside the Design', /Structure S5/.test(await text('[data-st-saved-tag]')) && !!(await page.$('[data-rd-design]')));
355
- ok('the saved structure lists what it answers, the sources, the charts and the outline', /Where to invest next quarter/.test(await text('[data-st-answers]')) && /MySPH strategy 2026/.test(await text('[data-st-brief]')) && /Cost per new user/.test(await text('[data-st-brief]')) && /Needs your call/.test(await text('[data-st-brief]')));
356
- ok('it offers Refine the structure and Try it with real data', /Refine the structure/.test(await text('[data-st-brief]')) && /Try it with real data/.test(await text('[data-st-brief]')));
357
- ok('it says a change applies from the next cycle and the Chrome source is re-checked', /applies from the next cycle/.test(await text('[data-st-saved-wrap]')) && /Looker Studio: Paid acquisition/.test(await text('[data-st-saved-wrap]')) && /waits up to 4 hours/.test(await text('[data-st-saved-wrap]')));
358
- await shot(page, 'structure-saved-1440');
359
- await page.click('[data-st-brief] [data-st-act="opendry"]');
360
- await page.waitForSelector('[data-st-studio]');
361
- ok('Try it with real data in the setup sheet opens the studio on that view', await page.getAttribute('[data-st-view="dry"]', 'aria-pressed') === 'true' && /Saved structure: S5/.test(await text('[data-st-studio]')));
362
- await closeAll();
363
-
364
- /* ── the Charts tab ── */
365
- await goReports();
366
- await page.click('[data-rp3-tab="charts"]');
367
- await page.waitForSelector('[data-rp3-data-chart="new-users"]');
368
- ok('the Charts tab lists a data chart beside the built-in ones', !!(await page.$('[data-rp3-lib] [data-home="north"]')) && !!(await page.$('[data-rp3-lib] [data-rp3-data-chart="new-users"]')) && /Data chart/.test(await text('[data-rp3-data-chart="new-users"]')));
369
- ok('the data chart shows its source and Used in', /Google Analytics 4 through Supermetrics/.test(await text('[data-rp3-source="new-users"]')) && /Used in: .*MySPH health.*MySPH app performance, monthly/.test(await text('[data-rp3-data-chart="new-users"] [data-rp3-used]')));
370
- ok('the Charts tab counts both kinds', /2/.test(await text('[data-rp3-tab="charts"]')));
371
- await page.click('[data-rp3-data-chart="new-users"] .tt').catch(() => {});
372
- await shot(page, 'structure-charts-tab-1440');
373
-
374
- /* ── the saved structure and the studio at 400 wide ── */
375
- await page.setViewportSize({ width: 400, height: 900 });
376
- await goReports();
377
- ok('at 400 wide the Reports tab does not scroll sideways', await noOverflow());
378
- await page.click('[data-rs-reg="' + SETUP.id + '"] [data-rs-act="shape"]');
379
- await page.waitForSelector('[data-st-chart]');
380
- ok('at 400 wide the Structure step does not scroll sideways', await noOverflow());
381
- await shot(page, 'structure-400');
382
- await page.click('[data-st-chart="cpa"] [data-st-act="chart"]');
383
- await page.click('[data-st-act="panel"][aria-expanded]');
384
- await page.waitForSelector('[data-st-panel]');
385
- ok('at 400 wide the open chart and the Add a source panel do not scroll the page sideways', await noOverflow());
386
- await shot(page, 'structure-pmos-400');
387
- await page.click('[data-st-view="options"]');
388
- ok('at 400 wide Other structures stack and do not scroll sideways', await noOverflow());
389
- await shot(page, 'structure-options-400');
390
- await page.click('[data-st-view="dry"]');
391
- ok('at 400 wide the dry run does not scroll sideways', await noOverflow());
392
- await shot(page, 'structure-dry-400');
393
- await page.setViewportSize({ width: 1440, height: 1000 });
394
-
395
- ok('no script error and no failed request', errors.length === 0, errors.join(' | '));
396
- await finish();
397
- })().catch((e) => { console.error(e); finish(1); });