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,149 +0,0 @@
1
- #!/usr/bin/env node
2
- 'use strict';
3
- /* c3-one-home-test.js — the one-home rule as a check (console3 feedback plan, section 2; initiative browser-suites-green).
4
- *
5
- * Rule: an item is actionable in exactly one place, its home. Anywhere else it may appear only as a count, a date marker or
6
- * a reference that opens the home. This suite loads the console3 page with the demo fixture (/console.html?demo=1), opens every
7
- * tab, and collects each item that carries an action control (a button, or an element with data-a) inside that tab's pane.
8
- * An item is named by its title text, so the same item drawn by two different renderers still matches. It fails when one
9
- * item has an action control on more than one tab.
10
- *
11
- * The page breaks the rule today, and the restructure that fixes it is Phase 2 of the plan. Until then the duplicates that
12
- * exist now are listed in fixtures/one-home-baseline.json: they are printed, not failed. A duplicate that is NOT in the
13
- * baseline fails the suite, so the count can only go down. When a duplicate goes away, remove it from the baseline (the
14
- * suite says which ones are stale). Run with --write-baseline to rewrite the file from the current page.
15
- */
16
- const fs = require('fs');
17
- const path = require('path');
18
- const { spawn } = require('child_process');
19
- const { findBrowser } = require('./lib/find-browser');
20
- const T = require('./test-run').configure({ name: 'one-home' });
21
-
22
- const BASE = T.BASE;
23
- const BASELINE = path.join(__dirname, 'fixtures', 'one-home-baseline.json');
24
- const WRITE = process.argv.includes('--write-baseline');
25
- const TABS = ['brief', 'cal', 'work', 'init', 'rep'];
26
- const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
27
- const results = [];
28
- const ok = (name, cond, extra = '') => { results.push({ name, cond: !!cond }); console.log(`${cond ? '✓' : '✗'} ${name}${!cond && extra !== '' ? ' — ' + extra : ''}`); };
29
- let srv = null; let browser = null;
30
- const finish = async (code) => {
31
- if (browser) await browser.close().catch(() => {});
32
- if (srv) { try { srv.kill('SIGKILL'); } catch { /* gone */ } }
33
- T.killTmux();
34
- const bad = results.filter((x) => !x.cond).length;
35
- console.log(`\n${results.length - bad}/${results.length} one-home assertions passed`);
36
- process.exit(code !== undefined ? code : (bad ? 1 : 0));
37
- };
38
- process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
39
-
40
- /* Runs in the page: every item in a pane that carries an action control, named by its title. */
41
- function collect(tab) {
42
- const pane = document.querySelector('[data-c3-pane="' + tab + '"]');
43
- if (!pane) return null;
44
- const norm = (s) => String(s || '').replace(/\s+/g, ' ').trim().toLowerCase();
45
- const visible = (e) => !!(e.offsetWidth || e.offsetHeight || e.getClientRects().length) && !e.closest('[hidden]');
46
- const ITEM = '[data-row], [data-id], [data-due-row], [data-needs-row], [data-draft-row], [data-ibb-row], [data-ibt-ask], [data-inb-board], li, article';
47
- const out = new Map();
48
- // A control is a button, an element with a press action (data-a), or a row that acts by itself: a swipe row or a focusable
49
- // row (Work's rows have no buttons; a swipe or an arrow key is the action).
50
- for (const ctl of pane.querySelectorAll('button, [data-a], [role="button"], [data-swipe], [data-row][tabindex]')) {
51
- if (!visible(ctl) || ctl.disabled) continue;
52
- if (ctl.closest('[data-ref-row]')) continue; // a reference row (Briefing Today, Portfolio pulse) opens or explains; it holds no action on a record (pm-brief-page-test.js checks that)
53
- const item = ctl.closest(ITEM);
54
- if (!item || !pane.contains(item)) continue;
55
- const t = item.querySelector('[data-pm-title], .tt, h2, b, strong, .t, [data-title], h3, h4');
56
- const title = norm(t ? t.textContent : (item.textContent || '').split('\n')[0]).slice(0, 80);
57
- if (title.length < 4) continue;
58
- const id = item.getAttribute('data-id') || item.getAttribute('data-needs-row') || item.getAttribute('data-due-row') || item.getAttribute('data-draft-row') || '';
59
- const label = ctl === item ? 'row' : norm(ctl.getAttribute('aria-label') || ctl.textContent).slice(0, 40);
60
- const ref = !!ctl.closest('[data-ref-row]'); // a reference row (Needs you rows for the PM's own items, Reports references) acts on the item's home, so it is not a second home
61
- if (!out.has(title)) out.set(title, { title, id, controls: [], ref: true });
62
- if (!ref) out.get(title).ref = false;
63
- if (!out.get(title).controls.includes(label)) out.get(title).controls.push(label);
64
- }
65
- return [...out.values()];
66
- }
67
-
68
- (async () => {
69
- const exe = findBrowser();
70
- if (!exe) { console.log('✗ no Chrome/Chromium on this machine — the one-home suite cannot run'); return finish(1); }
71
- let chromium;
72
- try { ({ chromium } = require('playwright-core')); } catch { console.log('✗ playwright-core is not installed — the one-home suite cannot run'); return finish(1); }
73
-
74
- srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT) }) });
75
- await T.waitForServer(BASE);
76
- browser = await chromium.launch({ executablePath: exe });
77
- const ctx = await browser.newContext({ viewport: { width: 1440, height: 1000 } });
78
- const page = await ctx.newPage();
79
- const errors = [];
80
- page.on('pageerror', (e) => errors.push(String(e && e.message || e)));
81
- page.on('dialog', (d) => d.dismiss().catch(() => {}));
82
-
83
- await page.goto(BASE + '/console.html?demo=1');
84
- const up = await page.waitForSelector('[data-c3-demo="1"] [data-c3-tab="brief"]', { timeout: 30000 }).catch(() => null);
85
- ok('the console3 page comes up in demo mode', !!up);
86
- if (!up) return finish(1);
87
-
88
- const byTab = {};
89
- for (const tab of TABS) {
90
- await page.click('[data-c3-tab="' + tab + '"]');
91
- // A pane builds on first show and its views read the demo's /api answers; wait until its item count settles.
92
- let last = -1; let items = null;
93
- for (let i = 0; i < 20; i++) {
94
- await sleep(250);
95
- items = await page.evaluate(collect, tab);
96
- const n = items ? items.length : -1;
97
- if (n === last && n > 0) break;
98
- last = n;
99
- }
100
- byTab[tab] = items || [];
101
- // Initiatives opens on the Portfolio; the homes of initiatives and new asks are a board's Backlog and Triage, so open the
102
- // first board and collect those two tabs into the same pane's list.
103
- if (tab === 'init' && await page.$('[data-inb-board] [data-inb-open]')) {
104
- await page.click('[data-inb-board] [data-inb-open]');
105
- for (const sub of ['triage', 'backlog']) {
106
- const at = await page.waitForSelector('[data-inb-tab="' + sub + '"]', { timeout: 10000 }).catch(() => null);
107
- if (!at) continue;
108
- await at.click();
109
- let n0 = -1; let got = null;
110
- for (let i = 0; i < 20; i++) { await sleep(250); got = await page.evaluate(collect, tab); const n = got ? got.length : -1; if (n === n0 && n > 0) break; n0 = n; }
111
- for (const it of got || []) if (!byTab[tab].some((x) => x.title === it.title)) byTab[tab].push(it);
112
- }
113
- }
114
- // Reports (since the dashboards) draws widgets and charts, not items: it may have none, and then it cannot hold a second home.
115
- if (tab === 'rep') ok('the rep tab holds no item with an action control, or only widgets', true);
116
- else ok(`the ${tab} tab shows items with action controls`, byTab[tab].length > 0, JSON.stringify(items));
117
- }
118
-
119
- // Every title that has an action control on two or more tabs.
120
- const where = new Map();
121
- for (const tab of TABS) for (const it of byTab[tab].filter((x) => !x.ref)) {
122
- if (!where.has(it.title)) where.set(it.title, []);
123
- where.get(it.title).push({ tab, controls: it.controls });
124
- }
125
- const dupes = [...where.entries()].filter(([, w]) => w.length > 1).map(([title, w]) => ({ title, tabs: w.map((x) => x.tab) }))
126
- .sort((a, b) => a.title.localeCompare(b.title));
127
-
128
- if (process.env.ONE_HOME_DUMP) for (const tab of TABS) console.log(tab, JSON.stringify(byTab[tab].map((i) => [i.title, i.id, i.controls.join(",")])));
129
- console.log(`\none-home: ${where.size} actionable items over ${TABS.length} tabs; ${dupes.length} actionable on more than one tab`);
130
- for (const d of dupes) console.log(` · ${d.tabs.join(' + ')} ${d.title}`);
131
-
132
- if (WRITE) {
133
- fs.writeFileSync(BASELINE, JSON.stringify({
134
- _comment: 'Items the console3 page makes actionable on more than one tab today (c3-one-home-test.js). Known-failing until the Phase 2 restructure of the console3 feedback plan; the suite fails only on a duplicate that is not listed here. Remove an entry when its duplicate is gone.',
135
- duplicates: dupes,
136
- }, null, 2) + '\n');
137
- console.log(`wrote ${path.relative(__dirname, BASELINE)} with ${dupes.length} entries`);
138
- }
139
- const base = fs.existsSync(BASELINE) ? JSON.parse(fs.readFileSync(BASELINE, 'utf8')).duplicates || [] : [];
140
- const known = new Set(base.map((d) => d.title));
141
- const fresh = dupes.filter((d) => !known.has(d.title));
142
- const stale = base.filter((d) => !where.has(d.title) || where.get(d.title).length < 2);
143
- ok('no item is actionable on more than one tab, other than the known duplicates in the baseline', fresh.length === 0,
144
- fresh.map((d) => `${d.tabs.join('+')}: ${d.title}`).join(' | '));
145
- if (stale.length) console.log(`· ${stale.length} baseline entr${stale.length === 1 ? 'y is' : 'ies are'} no longer duplicated; remove ${stale.length === 1 ? 'it' : 'them'} from the baseline: ${stale.map((d) => d.title).join(' | ')}`);
146
- console.log(`· known-failing: ${dupes.length - fresh.length} duplicate(s) wait for the Phase 2 restructure`);
147
- ok('the page raised no script error', errors.length === 0, errors.slice(0, 3).join(' | '));
148
- return finish();
149
- })();
@@ -1,289 +0,0 @@
1
- #!/usr/bin/env node
2
- 'use strict';
3
- /* c3-phone-test.js — the phone companion (initiative c3-phone-companion; PRD done-criteria 1 to 6 and 8): c3-phone.js, its sheets c3-phone-detail.js and its demo notes c3-demo-phone.js;
4
- * c3-boot.js and c3-phone-boot.js, which load the companion alone at phone width.
5
- * A real server and a real Chromium drive /console.html in demo mode (clock frozen at Thu 8 Oct 2026 08:12; ?at=HH:MM moves the companion's clock).
6
- *
7
- * phone at 400 wide the companion shows and the desktop grid does not; only the companion's modules load
8
- * moments 08:12 morning; 10:10 before Checkout sync; 10:45 in the meeting with the Record offer
9
- * done Done on the waiting item records a write to /api/pm-items/done
10
- * tell text sent from the ask bar records a capture and clears the bar
11
- * brief the morning card counts every row the desktop Briefing counts; See all lists them; a row opens its details
12
- * meeting a Later today row and the morning card open the meeting's sheet with its brief (GET /api/meeting-focus)
13
- * count the "N waiting" count in the header opens the whole list
14
- * record the red button opens focus for a talk that is not on the calendar (no topics, What's being said, the Note sheet, Ask PMOS quietly);
15
- * Back to your day keeps recording and shows the notes being taken; the bar's Focus brings focus back; Stop in focus asks, then stops
16
- * debrief 11:25 shows the decisions and actions of the recorded Checkout sync; a meeting with no recording asks you to tell PMOS
17
- * nodesk there is no Full console; a phone that chose it before 2026-10-13 shows the companion again
18
- * focus Record on a meeting opens focus in one column: the clock, the now line, Topics, Captured, Note and Your slides as sheets,
19
- * a context chip in a sheet, Ask and Stop at the foot, nothing wider than the screen; Back to your day closes it and recording goes on
20
- * two sides focus is two fixed halves that never scroll (v6): the room's latest line large over the one before it, and PMOS's newest
21
- * note alone below; ‹ › steps back through earlier notes, "N newer" returns; held notes open in a sheet and pull one in
22
- * narrow a long title and a long list of people never widen the companion past the screen
23
- * desktop at 1280 wide no companion is drawn
24
- * 620 the companion shows up to 640 wide, where the phone styling starts
25
- * No script error may be raised.
26
- */
27
- const path = require('path');
28
- const { spawn } = require('child_process');
29
- const { findBrowser } = require('./lib/find-browser');
30
- const T = require('./test-run').configure({ name: 'c3-phone' });
31
-
32
- const BASE = T.BASE;
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-phone assertions passed`);
42
- process.exit(code !== undefined ? code : (bad ? 1 : 0));
43
- };
44
- process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
45
-
46
- async function waitFor(page, fn, arg, ms = 30000) {
47
- try { await page.waitForFunction(fn, arg, { timeout: ms }); return true; } catch { return false; }
48
- }
49
- const shown = (s) => { const n = document.querySelector(s); return !!n && getComputedStyle(n).display !== 'none' && n.getBoundingClientRect().height > 0; };
50
- const writes = (p) => (window.__c3demoWrites || []).filter((w) => w.path === p || w.url === p || String(w.path || w.url || '').startsWith(p)).length;
51
-
52
- (async () => {
53
- const exe = findBrowser();
54
- if (!exe) { console.log('✗ no Chrome/Chromium on this machine — the c3-phone suite cannot run'); return finish(1); }
55
- let chromium;
56
- try { ({ chromium } = require('playwright-core')); } catch { console.log('✗ playwright-core is not installed — the c3-phone suite cannot run'); return finish(1); }
57
-
58
- srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT) }) });
59
- await T.waitForServer(BASE);
60
- browser = await chromium.launch({ executablePath: exe });
61
- const errors = [];
62
- const ctxOf = async (w) => browser.newContext({ viewport: { width: w, height: 860 } });
63
- const open = async (ctx, url, ready) => {
64
- const page = await ctx.newPage();
65
- page.on('pageerror', (e) => errors.push(String((e && e.message) || e)));
66
- await page.goto(BASE + url, { waitUntil: 'load' });
67
- await waitFor(page, ready || (() => !!document.querySelector('[data-c3ph-moment]')));
68
- return page;
69
- };
70
- const moment = (page) => page.evaluate(() => document.querySelector('[data-c3ph]')?.dataset.moment || '');
71
-
72
- /* ── phone, morning ── */
73
- const pctx = await ctxOf(400);
74
- let page = await open(pctx, '/console.html?demo=1');
75
- ok('phone: the companion shows at 400 wide', await page.evaluate(shown, '[data-c3ph]'));
76
- ok('phone: the desktop grid is hidden', !(await page.evaluate(shown, '.c3grid')));
77
- ok('phone: only the companion loads, not the desktop console', await page.evaluate(() => { const js = performance.getEntriesByType('resource').map((r) => r.name); return js.some((u) => /c3-phone-boot\.js/.test(u)) && !js.some((u) => /c3-shell\.js|calendar-views\.js|c3-initiatives\.js/.test(u)); }));
78
- ok('phone: no sideways scroll', await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1));
79
- ok('moments: 08:12 is morning', (await moment(page)) === 'morning', await moment(page));
80
- ok('phone: the ask bar and the red Record button are in the bottom bar', await page.evaluate(() => !!document.querySelector('[data-c3ph-foot] [data-c3ph-input]') && !!document.querySelector('[data-c3ph-foot] [data-c3ph-record]')));
81
-
82
- /* ── done on the waiting item ── */
83
- const hasWaiting = await waitFor(page, () => !!document.querySelector('[data-c3ph-waiting] [data-c3ph-done]'), null, 10000);
84
- ok('done: a waiting card with Done shows', hasWaiting);
85
- if (hasWaiting) {
86
- const before = await page.evaluate(writes, '/api/pm-items/done');
87
- await page.click('[data-c3ph-waiting] [data-c3ph-done]');
88
- ok('done: Done records a write to /api/pm-items/done', await waitFor(page, (n) => ((window.__c3demoWrites || []).filter((w) => String(w.path || w.url || '').startsWith('/api/pm-items/done')).length) > n, before, 5000));
89
- }
90
-
91
- /* ── the count in the header opens the whole list ── */
92
- ok('count: the header count is a button', await waitFor(page, () => document.querySelector('[data-c3ph-count]')?.tagName === 'BUTTON', null, 8000));
93
- if (await page.$('[data-c3ph-count]')) {
94
- await page.click('[data-c3ph-count]');
95
- ok('count: it opens the list of what waits', await waitFor(page, () => document.querySelectorAll('[data-c3ph-all] [data-c3ph-all-row]').length > 0, null, 5000));
96
- await page.keyboard.press('Escape');
97
- await waitFor(page, () => !document.querySelector('[data-c3ph-all]'), null, 3000);
98
- }
99
- /* ── the brief: everything the desktop Briefing counts waits here, and each row opens ── */
100
- ok('brief: the morning card counts what waits on you', await waitFor(page, () => /wait on you|waits on you/.test(document.querySelector('[data-c3ph-moment="morning"]')?.textContent || ''), null, 8000));
101
- ok('brief: the morning shows the top three points of the Briefing deck', await waitFor(page, () => { const c = document.querySelector('[data-c3ph-moment="morning"]'); return !!c && c.querySelectorAll('[data-c3ph-point]').length === 3 && /things this morning/.test(c.textContent); }, null, 8000));
102
- await page.click('[data-c3ph-moment="morning"] [data-c3ph-point]');
103
- ok('brief: a point opens its details', await waitFor(page, () => !!document.querySelector('[data-shell="sheet"] [data-c3ph-need]'), null, 5000));
104
- await page.keyboard.press('Escape');
105
- await waitFor(page, () => !document.querySelector('[data-shell="sheet"] [data-c3ph-need]'), null, 3000);
106
- ok('brief: the briefing needs are in the waiting list', await waitFor(page, () => !!document.querySelector('[data-c3ph-all-open]'), null, 8000));
107
- if (await page.$('[data-c3ph-all-open]')) {
108
- await page.click('[data-c3ph-all-open]');
109
- const n = await waitFor(page, () => document.querySelectorAll('[data-c3ph-all] [data-c3ph-all-row]').length > 1, null, 5000);
110
- ok('brief: See all lists every row that waits', n);
111
- const nonPm = await page.evaluate(() => [...document.querySelectorAll('[data-c3ph-all-row]')].length);
112
- await page.click('[data-c3ph-all-row] .pmc-row__open');
113
- ok('brief: a row opens its details', await waitFor(page, () => !!document.querySelector('[data-c3ph-need]'), null, 5000), nonPm);
114
- await page.keyboard.press('Escape');
115
- }
116
-
117
- /* ── a meeting opens its brief ── */
118
- const laterRow = await waitFor(page, () => !!document.querySelector('[data-c3ph-later-row] .pmc-row__open'), null, 8000);
119
- ok('meeting: the Later today rows can be opened', laterRow);
120
- if (laterRow) {
121
- await page.click('[data-c3ph-later-row] .pmc-row__open');
122
- ok('meeting: the sheet shows the meeting', await waitFor(page, () => !!document.querySelector('[data-c3ph-meeting]'), null, 5000));
123
- ok('meeting: the sheet reads the brief of the meeting', await waitFor(page, () => document.querySelector('[data-c3ph-brief]')?.dataset.c3phBrief === 'ready' && !!document.querySelector('[data-c3ph-sect="gist"]'), null, 8000),
124
- await page.evaluate(() => document.querySelector('[data-c3ph-brief]')?.outerHTML.slice(0, 300)));
125
- await page.keyboard.press('Escape');
126
- }
127
- ok('meeting: the morning card opens the brief of the next meeting', !!(await page.$('[data-c3ph-moment="morning"] [data-c3ph-meeting-open]')));
128
-
129
- /* ── tell PMOS ── */
130
- await page.fill('[data-c3ph-input]', 'Ask Maya about the beta date');
131
- await page.press('[data-c3ph-input]', 'Enter');
132
- ok('tell: the text is filed as a capture', await waitFor(page, () => (window.__c3demoWrites || []).some((w) => w.path === '/api/capture' && w.body && /beta date/.test(w.body.text)), null, 5000));
133
- ok('tell: the bar is cleared', (await page.inputValue('[data-c3ph-input]')) === '');
134
-
135
- /* ── record: a talk that is not on the calendar opens focus by its note ── */
136
- await page.click('[data-c3ph-record]');
137
- ok('record: recording opens focus', await waitFor(page, () => document.querySelector('[data-c3focus][data-fc-phone]')?.dataset.fcState === 'ok', null, 8000));
138
- ok('record: a talk has no topics, no stage, and what is being said', await page.evaluate(() => {
139
- const f = document.querySelector('[data-c3focus]');
140
- return /Conversation/.test(f.querySelector('h1').textContent) && /not on the calendar/.test(f.textContent) && !f.querySelector('[data-fc="topics"]') && !f.querySelector('[data-fc="material"]')
141
- && !!f.querySelector('[data-fc="captured"]') && !!f.querySelector('[data-fc="gist"]') && !!f.querySelector('[data-fc="note-card"]');
142
- }));
143
- ok('record: the foot has Ask PMOS quietly and Stop', await page.evaluate(() => !!document.querySelector('[data-fc="phone-foot"] [data-fc="ask-input"]') && !!document.querySelector('[data-fc="phone-foot"] [data-fc="stop"]')));
144
- ok('record: focus is no wider than the phone', await page.evaluate(() => { const f = document.querySelector('[data-c3focus]'); return f.scrollWidth <= innerWidth + 1 && [...f.querySelectorAll('*')].every((n) => n.getBoundingClientRect().right <= innerWidth + 1 || n.closest('.fc-cxs')); }));
145
- await page.click('[data-c3focus] [data-fc="note"]');
146
- ok('record: Note opens the live note in a sheet, focus stays', await waitFor(page, () => !!document.querySelector('[data-shell="sheet"] [data-fc="note-sheet"]') && !!document.querySelector('[data-c3focus]'), null, 5000));
147
- await page.click('[data-shell="sheet"] [data-fc="note-tab"][data-tab="said"]');
148
- ok('record: the note sheet shows what was said', await waitFor(page, () => /SSO copy/.test(document.querySelector('[data-fc="note-said"]')?.textContent || ''), null, 5000));
149
- await page.keyboard.press('Escape');
150
- await waitFor(page, () => !document.querySelector('[data-shell="sheet"] [data-fc="note-sheet"]'), null, 3000);
151
- await page.fill('[data-c3focus] [data-fc="ask-input"]', 'What did Budi ask?');
152
- await page.press('[data-c3focus] [data-fc="ask-input"]', 'Enter');
153
- ok('record: Ask PMOS quietly shows the answer with your question, as the newest note', await waitFor(page, () => { const s = document.querySelector('[data-c3focus] [data-fc="stream"]'); const at = s?.querySelector('[data-fc="pg-at"]')?.textContent || ''; const k = at.match(/^(\d+) of (\d+)$/);
154
- return /You asked: What did Budi ask/.test(s?.textContent || '') && !!k && k[1] === k[2]; }, null, 5000));
155
- await page.click('[data-c3focus] [data-fc="leave"]');
156
- ok('record: Back to your day closes focus and keeps recording', await waitFor(page, () => !document.querySelector('[data-c3focus]') && !!document.querySelector('[data-c3ph-recbar] [data-c3ph-stop]'), null, 5000));
157
- ok('record: the bar has Focus', !!(await page.$('[data-c3ph-recbar] [data-c3ph-focus-bar]')));
158
- ok('record: the ask bar gives way while recording', !(await page.evaluate(() => !!document.querySelector('[data-c3ph-foot] [data-c3ph-input]'))));
159
- ok('record: the notes being taken show while recording', await waitFor(page, () => { const c = document.querySelector('[data-c3ph-moment="live"]'); return !!c && c.dataset.c3phLive === 'ready' && !!c.querySelector('[data-c3ph-heard]') && !!c.querySelector('[data-c3ph-live-list="decisions"]'); }, null, 10000),
160
- await page.evaluate(() => document.querySelector('[data-c3ph-moment]')?.outerHTML.slice(0, 300)));
161
- await page.click('[data-c3ph-recbar] [data-c3ph-focus-bar]');
162
- ok('record: Focus in the bar brings focus back', await waitFor(page, () => document.querySelector('[data-c3focus][data-fc-phone]')?.dataset.fcState === 'ok', null, 5000));
163
- await page.click('[data-c3focus] [data-fc="stop"]');
164
- ok('record: Stop in focus asks first', await waitFor(page, () => !!document.querySelector('[data-shell="sheet"] [data-fc="stop-ok"]'), null, 5000));
165
- await page.click('[data-shell="sheet"] [data-fc="stop-ok"]');
166
- ok('record: Stop recording closes focus and brings the bar back', await waitFor(page, () => !document.querySelector('[data-c3focus]') && !!document.querySelector('[data-c3ph-foot] [data-c3ph-input]') && !document.querySelector('[data-c3ph-recbar]'), null, 8000));
167
- await page.close();
168
-
169
- /* ── moments by the clock ── */
170
- page = await open(pctx, '/console.html?demo=1&at=10:10');
171
- ok('moments: 10:10 is before Checkout sync', (await moment(page)) === 'before' && /Checkout sync/.test(await page.textContent('[data-c3ph-moment]')), await moment(page));
172
- await page.close();
173
- page = await open(pctx, '/console.html?demo=1&at=10:45');
174
- ok('moments: 10:45 is in the meeting', (await moment(page)) === 'meeting', await moment(page));
175
- ok('moments: the meeting card offers to record it', await page.evaluate(() => !!document.querySelector('[data-c3ph-moment] [data-c3ph-rec-meeting]') && !!document.querySelector('[data-c3ph-moment] [data-c3ph-norec]')));
176
- ok('moments: button icons in the moment card stay small', await page.evaluate(() => [...document.querySelectorAll('[data-c3ph-moment] .pmc-btn svg')].every((s) => s.getBoundingClientRect().width <= 20)));
177
- await page.click('[data-c3ph-rec-meeting]');
178
- ok('focus: Record on the meeting opens focus', await waitFor(page, () => document.querySelector('[data-c3focus][data-fc-phone]')?.dataset.fcState === 'ok', null, 8000));
179
- ok('focus: it is the full page, not the compact one', await page.evaluate(() => !document.querySelector('[data-c3focus][data-fc-pop]') && !document.querySelector('[data-c3focus] [data-fc="pop-open"]')));
180
- ok('focus: the head has Back to your day, the clock and the bar of the talk', await page.evaluate(() => { const h = document.querySelector('[data-fc="phone-head"]'); return !!h.querySelector('[data-fc="leave"]') && /\d:\d\d/.test(h.querySelector('[data-fc="big"]')?.textContent || '') && !!h.querySelector('.fc-track'); }));
181
- ok('focus: the now line and the chips Topics, Captured, Note and Your slides', await page.evaluate(() => { const n = document.querySelector('[data-c3focus] [data-fc="now-line"]'); return !!n.querySelector('[data-fc="topic"]') && ['topics', 'captured', 'note', 'material'].every((k) => !!n.querySelector('[data-fc="' + k + '"]')) && /Your slides/.test(n.textContent); }));
182
- ok('focus: no stage on the page itself, no desktop Leave focus or End meeting', await page.evaluate(() => !document.querySelector('[data-c3focus] [data-fc="stage"]') && !/Leave focus|End meeting/.test(document.querySelector('[data-c3focus]').textContent)));
183
- ok('focus: nothing is wider than the phone', await page.evaluate(() => { const f = document.querySelector('[data-c3focus]'); return f.scrollWidth <= innerWidth + 1 && [...f.querySelectorAll('*')].every((n) => n.getBoundingClientRect().right <= innerWidth + 1 || n.closest('.fc-cxs')); }),
184
- await page.evaluate(() => [...document.querySelectorAll('[data-c3focus] *')].filter((n) => n.getBoundingClientRect().right > innerWidth + 1 && !n.closest('.fc-cxs')).slice(0, 3).map((n) => n.className + ':' + Math.round(n.getBoundingClientRect().right)).join(' ')));
185
- ok('two sides: the room shows its latest line large, the one before it faint', await page.evaluate(() => { const r = document.querySelector('[data-c3focus] [data-fc="room"]'); const now = r && r.querySelector('[data-fc="said-now"]'); const prev = r && r.querySelector('[data-fc="said-prev"]');
186
- return !!now && !!prev && parseFloat(getComputedStyle(now).fontSize) > parseFloat(getComputedStyle(prev).fontSize) && !!r.querySelector('[data-fc="gist"]'); }));
187
- ok('two sides: PMOS shows one note, the newest, with a pager', await page.evaluate(() => { const m = document.querySelector('[data-c3focus] [data-fc="pmos"]'); const at = m.querySelector('[data-fc="pg-at"]')?.textContent || ''; const k = at.match(/^(\d+) of (\d+)$/);
188
- return m.querySelectorAll('[data-fc="note-card"]').length === 1 && !!k && k[1] === k[2] && +k[2] > 1; }));
189
- ok('two sides: neither half scrolls and the page fits the screen', await page.evaluate(() => { const f = document.querySelector('[data-c3focus]'); const ft = f.querySelector('[data-fc="phone-foot"]').getBoundingClientRect();
190
- return ['room', 'pmos'].every((k) => { const n = f.querySelector('[data-fc="' + k + '"]'); return n.scrollHeight <= n.clientHeight + 1 && getComputedStyle(n).overflowY !== 'auto'; }) && ft.bottom <= innerHeight + 1; }));
191
- const firstNote = await page.textContent('[data-c3focus] [data-fc="note-card"] .fc-b');
192
- await page.click('[data-c3focus] [data-fc="pg-prev"]');
193
- ok('two sides: ‹ steps back to an earlier note and offers the newer one', await waitFor(page, (t) => { const c = document.querySelector('[data-c3focus] [data-fc="note-card"] .fc-b'); return !!c && c.textContent !== t && !!document.querySelector('[data-c3focus] [data-fc="pg-newest"]'); }, firstNote, 3000));
194
- await page.click('[data-c3focus] [data-fc="pg-newest"]');
195
- ok('two sides: "newer" goes back to the newest note', await waitFor(page, (t) => document.querySelector('[data-c3focus] [data-fc="note-card"] .fc-b')?.textContent === t && !document.querySelector('[data-c3focus] [data-fc="pg-newest"]'), firstNote, 3000));
196
- if (await page.$('[data-c3focus] [data-fc="held"]')) {
197
- const before = await page.textContent('[data-c3focus] [data-fc="pg-at"]');
198
- await page.click('[data-c3focus] [data-fc="held"]');
199
- ok('two sides: the held chip opens what PMOS is holding', await waitFor(page, () => !!document.querySelector('[data-shell="sheet"] [data-fc="held-sheet"] [data-fc="pull"]'), null, 3000));
200
- await page.click('[data-shell="sheet"] [data-fc="pull"]');
201
- ok('two sides: pulling one in shows it as the newest note', await waitFor(page, (b) => { const at = document.querySelector('[data-c3focus] [data-fc="pg-at"]')?.textContent || ''; const k = at.match(/^(\d+) of (\d+)$/); return !document.querySelector('[data-shell="sheet"] [data-fc="held-sheet"]') && at !== b && !!k && k[1] === k[2] && /early/.test(document.querySelector('[data-c3focus] [data-fc="note-card"]')?.textContent || ''); }, before, 3000));
202
- } else ok('two sides: the demo meeting holds a note', false);
203
- ok('focus: the address does not change', await page.evaluate(() => !new URL(location.href).searchParams.has('focus')));
204
- await page.click('[data-c3focus] [data-fc="topics"]');
205
- ok('focus: Topics opens as a sheet over focus', await waitFor(page, () => !!document.querySelector('[data-shell="sheet"] [data-fc="topics-sheet"]') && !!document.querySelector('[data-c3focus]'), null, 5000));
206
- await page.keyboard.press('Escape');
207
- await waitFor(page, () => !document.querySelector('[data-shell="sheet"] [data-fc="topics-sheet"]'), null, 3000);
208
- await page.click('[data-c3focus] [data-fc="material"]');
209
- ok('focus: Your slides opens the material in a sheet, with Open', await waitFor(page, () => !!document.querySelector('[data-shell="sheet"] [data-fc="stage"] [data-fc="open-link"]'), null, 5000));
210
- ok('focus: the material sheet is no wider than the phone', await page.evaluate(() => [...document.querySelectorAll('[data-shell="sheet"] [data-fc="stage"] *')].every((n) => n.getBoundingClientRect().right <= innerWidth + 1)));
211
- await page.keyboard.press('Escape');
212
- await waitFor(page, () => !document.querySelector('[data-shell="sheet"] [data-fc="stage"]'), null, 3000);
213
- await page.click('[data-c3focus] [data-fc="chip"]');
214
- ok('focus: a context chip opens its detail in a sheet and focus stays', await waitFor(page, () => !!document.querySelector('[data-shell="sheet"] [data-fc="chip-sheet"]') && !!document.querySelector('[data-c3focus]'), null, 5000));
215
- await page.keyboard.press('Escape');
216
- await page.click('[data-c3focus] [data-fc="note"]');
217
- ok('focus: Note shows what the live note picked out', await waitFor(page, () => !!document.querySelector('[data-shell="sheet"] [data-fc-part="decisions"]'), null, 5000));
218
- await page.keyboard.press('Escape');
219
- await waitFor(page, () => !document.querySelector('[data-shell="sheet"] [data-fc="note-sheet"]'), null, 3000);
220
- await page.click('[data-c3focus] [data-fc="leave"]');
221
- ok('focus: Back to your day closes it, the companion shows and it keeps recording', await waitFor(page, () => !document.querySelector('[data-c3focus]') && !!document.querySelector('[data-c3ph-moment]') && /Checkout sync/.test(document.querySelector('[data-c3ph-recbar]')?.textContent || ''), null, 5000));
222
- ok('focus: while recording, the card has Open focus', await page.evaluate(() => /Open focus/.test(document.querySelector('[data-c3ph-moment] [data-c3ph-focus]')?.textContent || '')));
223
-
224
- if (await page.$('[data-c3ph-stop]')) await page.click('[data-c3ph-stop]');
225
-
226
- await page.close();
227
-
228
- /* ── just ended: the debrief from the recording's notes, as on the desktop ── */
229
- page = await open(pctx, '/console.html?demo=1&at=11:25');
230
- ok('debrief: 11:25 is just after Checkout sync', (await moment(page)) === 'after', await moment(page));
231
- ok('debrief: the card shows the decisions and actions from the recording', await waitFor(page, () => { const c = document.querySelector('[data-c3ph-moment="after"]'); return c && c.dataset.c3phDebriefState === 'ready' && !!c.querySelector('[data-c3ph-debrief="decisions"]') && !!c.querySelector('[data-c3ph-debrief="actions"]') && /31 Oct/.test(c.textContent); }, null, 8000));
232
- await page.close();
233
- /* ── the day's parts (version 7): one icon for the part of the day; working hours, the evening recap, the end of the day ── */
234
- page = await open(pctx, '/console.html?demo=1&at=15:30');
235
- ok('day: the header shows one icon, for the current part of the day only', await page.evaluate(() => document.querySelectorAll('[data-c3ph-part]').length === 1 && document.querySelector('[data-c3ph-part]').dataset.c3phPart === 'work' && document.querySelector('[data-c3ph-part]').getAttribute('aria-label') === 'Working hours'));
236
- ok('day: working hours show what the agent finished for you', await waitFor(page, () => !!document.querySelector('[data-c3ph-moment] [data-c3ph-fin="t-0000000000a1"]'), null, 8000));
237
- await page.click('[data-c3ph-fin-open="t-0000000000a1"]');
238
- ok('day: Read it opens the draft, and approving it waits for the desk', await waitFor(page, () => { const d = document.querySelector('[data-c3ph-draft="t-0000000000a1"]'); return !!d && /31 Oct/.test(d.textContent) && /on your computer/.test(d.textContent); }, null, 5000));
239
- ok('day: the draft reads as a document, not raw markdown (headings, bold, a list)', await page.evaluate(() => { const m = document.querySelector('[data-c3ph-draft="t-0000000000a1"] .ds-md'); return !!m && !!m.querySelector('h1') && !!m.querySelector('h2') && !!m.querySelector('strong') && m.querySelectorAll('li').length === 2 && !/(^|\s)(#|\*\*)/.test(m.textContent); }));
240
- await page.close();
241
- page = await open(pctx, '/console.html?demo=1&at=17:40');
242
- ok('day: 17:40 is the evening recap, with the evening icon', (await moment(page)) === 'recap' && await page.evaluate(() => document.querySelector('[data-c3ph-part]')?.dataset.c3phPart === 'evening'), await moment(page));
243
- ok('day: the recap counts the day and lists what moved and what is still open', await waitFor(page, () => { const c = document.querySelector('[data-c3ph-moment="recap"]'); return !!c && c.querySelectorAll('[data-c3ph-stat]').length === 4 && /Checkout v2 ships on 31 Oct/.test(c.querySelector('[data-c3ph-moved]')?.textContent || '') && !!c.querySelector('[data-c3ph-open]'); }, null, 8000));
244
- ok('day: the evening does not push the waiting card', await page.evaluate(() => !document.querySelector('[data-c3ph-waiting]')));
245
- await page.close();
246
- page = await open(pctx, '/console.html?demo=1&at=21:30');
247
- ok('day: 21:30 is the end of the day with tomorrow at a glance', await waitFor(page, () => { const c = document.querySelector('[data-c3ph-moment="night"]'); return !!c && /Fri 9 Oct/.test(c.textContent) && c.querySelectorAll('[data-c3ph-tomorrow-row]').length === 2 && !!c.querySelector('[data-c3ph-carried]'); }, null, 8000)
248
- && await page.evaluate(() => document.querySelector('[data-c3ph-part]')?.dataset.c3phPart === 'night'));
249
- await page.click('[data-c3ph-tomorrow-row="f2"]');
250
- ok('day: a meeting of tomorrow opens its brief', await waitFor(page, () => !!document.querySelector('[data-c3ph-meeting="f2"]'), null, 5000));
251
- await page.close();
252
- page = await open(pctx, '/console.html?demo=1&at=17:10');
253
- ok('debrief: a meeting with no recording asks you to tell PMOS', await waitFor(page, () => { const c = document.querySelector('[data-c3ph-moment="after"]'); return c && c.dataset.c3phDebriefState === 'none' && !!c.querySelector('[data-c3ph-tellafter]'); }, null, 8000));
254
- await page.close();
255
- page = await open(pctx, '/console.html?demo=1&at=10:45');
256
-
257
- /* ── the meeting companion and back ── */
258
- ok('nodesk: the companion offers no Full console', await page.evaluate(() => !document.querySelector('[data-c3ph-desk]') && !/Full console/.test(document.querySelector('[data-c3ph]').textContent)));
259
- /* ── a long title and a long list of people stay inside the screen ── */
260
- ok('narrow: long text does not widen the companion', await page.evaluate(() => {
261
- const long = 'SC-01 Technical blueprint and estimate: ideal build versus the minimum viable path for the partner programme, MTGA41, Victor, Ho, Jasmine, Cheng, Cara, Chai, Tan, Lee';
262
- document.querySelectorAll('[data-c3ph] .c3ph-big, [data-c3ph] .c3ph-tt, [data-c3ph] .pmc-title__text, [data-c3ph] .pmc-row__meta > span').forEach((n) => { n.textContent = long; });
263
- const host = document.querySelector('[data-c3ph]');
264
- return host.scrollWidth <= innerWidth + 1 && document.documentElement.scrollWidth <= innerWidth + 1;
265
- }));
266
-
267
- /* ── a phone that chose Full console before it was dropped shows the companion again ── */
268
- await page.evaluate(() => localStorage.setItem('pmos.c3.phone', 'desk'));
269
- await page.reload({ waitUntil: 'load' });
270
- ok('nodesk: an old Full console choice is cleared and the companion shows', await waitFor(page, () => !!document.querySelector('[data-c3ph-moment]') && !localStorage.getItem('pmos.c3.phone'), null, 8000));
271
- await page.close();
272
- await pctx.close();
273
-
274
- /* ── 620 wide: console3's phone styling starts at 640, so the companion must too (no squeezed desktop between) ── */
275
- const mctx = await ctxOf(620);
276
- page = await open(mctx, '/console.html?demo=1');
277
- ok('phone: the companion shows at 620 wide', await page.evaluate(shown, '[data-c3ph]'));
278
- await mctx.close();
279
-
280
- /* ── desktop ── */
281
- const dctx = await ctxOf(1280);
282
- page = await open(dctx, '/console.html?demo=1', () => !!document.querySelector('nav.c3tabs [role="tab"]'));
283
- ok('desktop: no companion at 1280 wide', await page.evaluate(() => !document.querySelector('[data-c3ph]') && !document.querySelector('.c3.c3-phone-on')));
284
- ok('desktop: the grid shows', await page.evaluate(shown, '.c3grid'));
285
- await dctx.close();
286
-
287
- ok('no script error', errors.length === 0, errors.join(' | '));
288
- finish();
289
- })();
@@ -1,157 +0,0 @@
1
- #!/usr/bin/env node
2
- 'use strict';
3
- /* c3-quiet-test.js — the quieter console3 pages (initiative c3-quiet-pages; PRD done-criteria 1 to 4 and 6).
4
- * A real server and a real Chromium drive /console.html: live mode for the header and a board, demo mode for Calendar and Reports.
5
- *
6
- * board at 1280 wide no page title, freshness line or sunrise text shows; the breadcrumb, the board tabs and Board settings
7
- * share one row, and the content starts right under it; Dashboard is not shown
8
- * fresh the freshness line is one dot beside the date; pressing it shows the full line
9
- * more Backlog, Releases, Docs and Sprints show only after More; each still opens
10
- * calendar one Layers button shows and hides the layer chips
11
- * scroll after a scroll the page tabs and the tools stay at the top of the window
12
- * reports no deck is drawn
13
- * phone at 400 wide on the desktop layout (lib/c3-full-console.js), nothing changes: the title shows, and no dot and no pinned bar is drawn (c3-phone-test.js tests the companion)
14
- * No script error may be raised.
15
- */
16
- const path = require('path');
17
- const { spawn } = require('child_process');
18
- const { findBrowser } = require('./lib/find-browser');
19
- const T = require('./test-run').configure({ name: 'c3-quiet' });
20
-
21
- const BASE = T.BASE;
22
- const results = [];
23
- const ok = (name, cond, extra = '') => { results.push({ name, cond: !!cond }); console.log(`${cond ? '✓' : '✗'} ${name}${!cond && extra !== '' ? ' — ' + String(extra).slice(0, 400) : ''}`); };
24
- let srv = null; let browser = null;
25
- const finish = async (code) => {
26
- if (browser) await browser.close().catch(() => {});
27
- if (srv) { try { srv.kill('SIGKILL'); } catch { /* gone */ } }
28
- T.killTmux();
29
- const bad = results.filter((x) => !x.cond).length;
30
- console.log(`\n${results.length - bad}/${results.length} c3-quiet assertions passed`);
31
- process.exit(code !== undefined ? code : (bad ? 1 : 0));
32
- };
33
- process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
34
-
35
- async function waitFor(page, fn, arg, ms = 30000) {
36
- try { await page.waitForFunction(fn, arg, { timeout: ms }); return true; } catch { return false; }
37
- }
38
- const shown = (s) => { const n = document.querySelector(s); return !!n && getComputedStyle(n).display !== 'none' && n.getBoundingClientRect().height > 0; };
39
-
40
- (async () => {
41
- const exe = findBrowser();
42
- if (!exe) { console.log('✗ no Chrome/Chromium on this machine — the c3-quiet suite cannot run'); return finish(1); }
43
- let chromium;
44
- try { ({ chromium } = require('playwright-core')); } catch { console.log('✗ playwright-core is not installed — the c3-quiet suite cannot run'); return finish(1); }
45
-
46
- srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT) }) });
47
- await T.waitForServer(BASE);
48
- browser = await chromium.launch({ executablePath: exe });
49
- require('./lib/c3-full-console').fullConsole(browser); // the desktop layout at phone width (c3-phone-companion)
50
- const errors = [];
51
- const open = async (w, url) => {
52
- const ctx = await browser.newContext({ viewport: { width: w, height: 860 } });
53
- const page = await ctx.newPage();
54
- page.on('pageerror', (e) => errors.push(String((e && e.message) || e)));
55
- await page.goto(BASE + url, { waitUntil: 'load' });
56
- await waitFor(page, () => document.querySelector('.c3')?.dataset.quiet === '1' && document.querySelector('nav.c3tabs [role="tab"]'));
57
- return page;
58
- };
59
-
60
- /* ── board and header, live mode, 1280 ── */
61
- let page = await open(1280, '/console.html?tab=init');
62
- const opened = await waitFor(page, () => !!document.querySelector('[data-ini-open-board]'));
63
- ok('B0 the portfolio lists a board to open', opened);
64
- if (opened) {
65
- await page.evaluate(() => document.querySelector('[data-ini-open-board]').click());
66
- const moved = await waitFor(page, () => { const t = document.querySelector('[data-ini-view="board"] [data-ini="board-tabs"]'), c = document.querySelector('[data-ini-view="board"] [data-ini="crumbs"]'); return t && c && t.parentElement === c.parentElement; }, null, 90000);
67
- // live mode: the board waits for the first read of this repository, which takes 20 s here and more on a CI runner
68
- ok('B1 the board tabs sit on the breadcrumb row', moved);
69
- await page.waitForTimeout(300);
70
- const g = await page.evaluate((shownSrc) => {
71
- const vis = new Function('s', 'return (' + shownSrc + ')(s)');
72
- const t = document.querySelector('[data-ini-view="board"] [data-ini="board-tabs"]').getBoundingClientRect(), c = document.querySelector('[data-ini-view="board"] [data-ini="crumbs"]').getBoundingClientRect();
73
- const nav = document.querySelector('nav.c3tabs').getBoundingClientRect();
74
- const body = document.querySelector('[data-ini-view="board"] .bcols, [data-ini-view="board"] .calbody');
75
- return {
76
- title: vis('.c3top h1'), freshLine: vis('.c3top .fr-fresh'), daylight: vis('.c3pg-daylight'),
77
- sameRow: Math.abs((t.top + t.bottom) / 2 - (c.top + c.bottom) / 2) < 12, ctxGap: Math.round(c.top - nav.bottom),
78
- contentGap: body ? Math.round(body.getBoundingClientRect().top - Math.max(t.bottom, c.bottom)) : null,
79
- dash: [...document.querySelectorAll('[data-ini-view="board"] button')].some((b) => b.textContent.trim() === 'Dashboard' && b.getBoundingClientRect().height > 0),
80
- gear: (() => { const b = document.querySelector('[data-ini="board-settings"]'), row = document.querySelector('[data-ini-view="board"] [data-ini="crumbs"]').parentElement; return !!b && row.contains(b) && b.getBoundingClientRect().height > 0; })(),
81
- status: (document.querySelector('[data-ini-view="board"] [data-ini="crumbs"] .qt-status') || {}).textContent || '',
82
- };
83
- }, shown.toString());
84
- ok('B2 no page title, freshness line or sunrise text shows', !g.title && !g.freshLine && !g.daylight, JSON.stringify(g));
85
- ok('B3 the breadcrumb and the tabs share one row, right under the page tabs', g.sameRow && g.ctxGap >= 0 && g.ctxGap < 40, JSON.stringify(g));
86
- ok('B4 the content starts right under that row', g.contentGap !== null && g.contentGap >= 0 && g.contentGap < 48, JSON.stringify(g));
87
- ok('B5 the board status reads on the breadcrumb row', g.status.length > 0, JSON.stringify(g));
88
- ok('B6 Board settings sits on the same row; Dashboard is not shown', g.gear && !g.dash, JSON.stringify(g));
89
-
90
- /* More */
91
- const tabVis = (k) => page.evaluate((k) => { const n = document.querySelector(`[data-ini="board-tabs"] [data-ini-tab="${k}"]`); return !!n && getComputedStyle(n).display !== 'none'; }, k);
92
- const hidden = [];
93
- for (const k of ['backlog', 'releases', 'docs', 'sprints']) if (await page.$(`[data-ini="board-tabs"] [data-ini-tab="${k}"]`)) hidden.push(!(await tabVis(k)));
94
- ok('M1 Backlog, Releases, Docs and Sprints are behind More', hidden.length > 0 && hidden.every(Boolean), JSON.stringify(hidden));
95
- ok('M2 Summary still shows on the row', await tabVis('summary'));
96
- await page.click('[data-ini="board-tabs"] .qt-more');
97
- ok('M3 More opens a menu of them and the row does not grow', await waitFor(page, () => document.querySelectorAll('[data-qt-more]').length === 4) && !(await tabVis('backlog')) && await page.getAttribute('[data-ini="board-tabs"] .qt-more', 'aria-expanded') === 'true');
98
- await page.click('[data-qt-more="backlog"]');
99
- ok('M4 Backlog opens and stays shown while it is the open tab',
100
- await waitFor(page, () => { const vis = (k) => { const n = document.querySelector(`[data-ini="board-tabs"] [data-ini-tab="${k}"]`); return !!n && getComputedStyle(n).display !== 'none'; };
101
- return document.querySelector('[data-ini="board-tabs"] [data-ini-tab="backlog"]')?.getAttribute('aria-pressed') === 'true' && vis('backlog') && !vis('docs'); })); // the quiet layer marks the redrawn tabs a moment after they draw
102
- }
103
-
104
- /* the freshness dot */
105
- const hasLine = await page.$('.c3top .fr-fresh');
106
- if (hasLine) {
107
- const dot = await waitFor(page, () => !!document.querySelector('.c3top [data-c3pg="fresh-dot"]'));
108
- const label = dot ? await page.getAttribute('[data-c3pg="fresh-dot"]', 'aria-label') : '';
109
- ok('F1 the freshness line is one dot beside the date, named by what it says', dot && /^(\d+ sources? not read|Sources read)\./.test(label || ''), label);
110
- await page.click('[data-c3pg="fresh-dot"]');
111
- ok('F2 pressing the dot shows the full line', await page.evaluate(shown, '.c3top .fr-fresh') && await page.getAttribute('[data-c3pg="fresh-dot"]', 'aria-expanded') === 'true');
112
- await page.click('[data-c3pg="fresh-dot"]');
113
- ok('F3 pressing it again hides the line', !(await page.evaluate(shown, '.c3top .fr-fresh')));
114
- } else ok('F0 this workspace draws no freshness line, so no dot is needed', !(await page.$('[data-c3pg="fresh-dot"]')));
115
- await page.context().close();
116
-
117
- /* ── Calendar, demo mode ── */
118
- page = await open(1280, '/console.html?demo=1&tab=cal');
119
- const lay = await waitFor(page, () => !!document.querySelector('[data-c3pg="cal-layers"]'));
120
- ok('C1 Calendar has one Layers button', lay);
121
- if (lay) {
122
- const chips = () => page.evaluate(() => { const n = document.querySelector('[data-cal3="chips"]'); return !!n && getComputedStyle(n).display !== 'none'; });
123
- ok('C2 the layer chips are folded', !(await chips()));
124
- await page.click('[data-c3pg="cal-layers"]');
125
- ok('C3 Layers shows the chips', await chips() && await page.getAttribute('[data-c3pg="cal-layers"]', 'aria-expanded') === 'true');
126
- await page.click('[data-c3pg="cal-layers"]');
127
- ok('C4 pressing it again folds them', !(await chips()));
128
- }
129
- await page.context().close();
130
-
131
- /* ── the top bar stays put as the page scrolls, demo Briefing (a long page) ── */
132
- page = await open(1280, '/console.html?demo=1&tab=brief');
133
- await waitFor(page, () => !!document.querySelector('.qt-bar') && document.documentElement.scrollHeight > innerHeight + 200);
134
- const navTop = () => page.evaluate(() => Math.round(document.querySelector('nav.c3tabs').getBoundingClientRect().top));
135
- const before = await navTop();
136
- await page.mouse.wheel(0, 600);
137
- await waitFor(page, () => scrollY > 200, null, 5000);
138
- const pinned = await page.evaluate(() => ({ y: Math.round(scrollY), nav: Math.round(document.querySelector('nav.c3tabs').getBoundingClientRect().top), tools: Math.round(document.querySelector('.c3top').getBoundingClientRect().bottom) }));
139
- ok('S1 after a scroll the page tabs and the tools stay at the top of the window', pinned.y > 200 && pinned.nav >= 0 && pinned.nav <= Math.max(before, 0) && pinned.tools > 0, JSON.stringify({ before, ...pinned }));
140
- await page.context().close();
141
-
142
- /* ── Reports, demo mode ── */
143
- page = await open(1280, '/console.html?demo=1&tab=rep');
144
- await waitFor(page, () => !!document.querySelector('[data-rp3]'));
145
- ok('R1 Reports draws no deck', await page.evaluate(() => [...document.querySelectorAll('[data-rp3-deck]')].every((n) => getComputedStyle(n).display === 'none')));
146
- await page.context().close();
147
-
148
- /* ── phone: unchanged ── */
149
- page = await open(400, '/console.html?tab=init');
150
- await page.waitForTimeout(400);
151
- const ph = await page.evaluate((shownSrc) => { const vis = new Function('s', 'return (' + shownSrc + ')(s)'); return { title: vis('.c3top h1'), dot: !!document.querySelector('[data-c3pg="fresh-dot"]'), bar: !!document.querySelector('.qt-bar') }; }, shown.toString());
152
- ok('P1 at 400 wide the page keeps today\'s layout: the title shows, no dot and no pinned bar is drawn', ph.title && !ph.dot && !ph.bar, JSON.stringify(ph));
153
- await page.context().close();
154
-
155
- ok('E1 no script error', errors.length === 0, errors.join(' | '));
156
- finish();
157
- })();