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,297 +0,0 @@
1
- /* pm/today-goals.js — the goals for today inside the day section (initiative today-goals, PRD G5, G6 and G16).
2
- *
3
- * goalRows(ctx) → the left column's goal rows: number, text, jobs done, a small bar
4
- * goalAdd(ctx) → the add input under them ("Add a goal and press Enter")
5
- * goalDetail(ctx, goalId) → the right column's detail of one goal: its meetings, its jobs, the steps found, and the
6
- * presses done, drop, reopen and remove; on an agent step that names an initiative, Prepare
7
- * then Queue it (the shipped background prepare: one approval is one prompt hash)
8
- * addGoal(ctx, text, ini) → POST the add; true when the goal is on the list. While Today shows one repository, the
9
- * goal belongs to it (repo); the goal's detail can change that.
10
- * goalJobsBlock(ctx, g, n) → a goal's done when and jobs, with the add and link presses: the goal's detail and a meeting's
11
- * detail draw the same block (initiative today-goals-jobs, PRD G3, A4)
12
- * jobsWithoutGoal(ctx) → the end of the Goals section: every job of the day with no goal, each with the link control (G5)
13
- * goalsSig() → a string that changes whenever what this module draws changes on its own
14
- *
15
- * `ctx` is the day section's (today-day.js): { ws, m (the day model), select(type, id), reload(), rerender(), cur(type, id) }.
16
- * The server joins the goals to the brief and Today by goal id or initiative (lib/goals.js planDay). Nothing here guesses.
17
- */
18
-
19
- import { el } from './dom.js';
20
- import { button, field, badge, toast, row, meter } from './primitives.js';
21
- import { pmPost } from './http.js';
22
- import { COPY } from './today-copy.js';
23
- import { statusPill, whoActs, mark as whoMark, tagged, originOf, goalPicker, linkField } from './today-jobs.js';
24
-
25
- const G = COPY.goals;
26
- const D = COPY.day;
27
- const A = COPY.act;
28
- const MAX_JOBS = 12; // the jobs the PM types on one goal (lib/goals.js)
29
- let draft = '';
30
- const ctxDraft = { done_when: '', anchor: '', due: '' }; // the "Add context" fields, kept while the section is redrawn
31
- let ctxOpen = false;
32
- const jobDrafts = new Map(); // goal id -> the text typed in its "Add a job" field
33
- let lastAdded = null; // { key, at }: the text of the last goal sent, so a double commit adds it once
34
- const prepared = new Map(); // step ref -> { key, branch, item_id, prompt_sha, initiative_id, ws } (a plan shown, not yet queued)
35
-
36
- async function press(ctx, body) {
37
- const r = await pmPost('/api/proactive/goals', body);
38
- if (!r || r.ok === false) { toast({ text: G.refused((r && r.error) || G.unreached), tone: 'destructive' }); return false; }
39
- await ctx.reload();
40
- return true;
41
- }
42
-
43
- /** Add a goal. `ini` ties it to an initiative, so the brief's items and meetings of that initiative join it. `extra` holds the
44
- * optional context: done_when, anchor, due and event_id (the meeting it was made from). */
45
- export function addGoal(ctx, text, ini, extra) {
46
- const body = { action: 'add', text: String(text || '').trim().slice(0, 140) };
47
- if (ini) body.initiative_id = ini;
48
- for (const k of ['done_when', 'anchor', 'due', 'event_id']) if (extra && typeof extra[k] === 'string' && extra[k].trim()) body[k] = extra[k].trim();
49
- // one day for every repository: a goal added while Today shows one repository belongs to it; otherwise to none
50
- if (ctx.m && ctx.m.narrow && ctx.m.here) body.repo = ctx.m.here;
51
- return press(ctx, body);
52
- }
53
-
54
- /** The jobs of a goal: the day model's jobs that name it. */
55
- const jobsOf = (m, id) => m.jobs.filter((j) => j.goal === id && !j.worth);
56
- const typedOf = (g) => (Array.isArray(g.jobs) ? g.jobs : []);
57
- /** "N of M jobs done": the jobs made from the brief and the ones the PM typed. Information only: it never closes a goal (G2). */
58
- function tally(m, g) {
59
- const js = jobsOf(m, g.id);
60
- const typed = typedOf(g);
61
- return { js, typed, total: js.length + typed.length, done: js.filter((j) => j.group === 'done').length + typed.filter((x) => x.done).length, need: js.filter((j) => j.group === 'needs').length };
62
- }
63
-
64
- export function goalRows(ctx) {
65
- const { m } = ctx;
66
- if (!m.goals.length) return null;
67
- return el('ul', { class: 'td-day__rows', 'data-day-list': 'goals' }, ...m.goals.map((g) => {
68
- const t = tally(m, g);
69
- const closed = g.status !== 'open';
70
- const sub = closed ? (G.coverage[g.coverage] || g.status) : t.total ? D.goalJobs(t.done, t.total) + (t.need ? ' · ' + D.goalNeed(t.need) : '') : (G.coverage[g.coverage] || D.goalNone);
71
- const cur = ctx.cur('goal', g.id);
72
- // the optional context (G1): when it is due, what it serves, and the prompt to say what done looks like
73
- const meta = [sub, g.due ? G.dueMeta(g.due) : null, g.anchor ? G.anchorMeta(g.anchor) : null, !closed && !g.done_when ? G.addDoneWhen : null];
74
- return el('li', null, row({
75
- title: g.text, meta, done: closed, onOpen: () => ctx.select('goal', g.id),
76
- lead: [el('span', { class: 'td-day__lead' }, String(m.goalNo.get(g.id)))],
77
- trail: [el('span', { class: 'td-day__chips' }, g.repo ? badge({ text: m.repoName(g.repo), tone: 'outline', attrs: { 'data-day-repo': g.repo } }) : null), meter({ done: t.total ? t.done : g.status === 'done' ? 1 : 0, total: t.total || 1, label: '' })],
78
- attrs: { class: 'td-day__r', 'data-day-sel': 'goal:' + g.id, 'data-goal': g.id, 'data-goal-coverage': g.coverage, 'data-cur': cur },
79
- openAttrs: { 'aria-current': cur },
80
- }));
81
- }));
82
- }
83
-
84
- export function goalAdd(ctx) {
85
- const { m } = ctx;
86
- const max = m.maxGoals;
87
- if (m.allGoals.length >= max) return el('p', { class: 'td-day__note' }, G.full(max));
88
- const f = field({ label: G.inputLabel, value: '', placeholder: G.inputHint, hideLabel: true, attrs: { 'data-goals': 'input', 'data-day-input': 'goal', maxlength: '140' },
89
- onCommit: async (v) => {
90
- if (!String(v).trim()) { draft = v; return; }
91
- // a rebuild while the text is typed can commit it twice: once as the old field leaves the page, once on Enter.
92
- // The second commit of the text just added clears the field and adds nothing.
93
- const key = String(v).trim().toLowerCase();
94
- if (lastAdded && lastAdded.key === key && Date.now() - lastAdded.at < 10000) { draft = ''; f.control.value = ''; ctx.rerender(); return; }
95
- lastAdded = { key, at: Date.now() };
96
- // clear before the press: its reload re-renders the section, and a rebuild must not bring the text back
97
- draft = '';
98
- const extra = { ...ctxDraft };
99
- clearContext();
100
- if (await addGoal(ctx, v, null, extra)) { if (f.control.value.trim() === String(v).trim()) { if (f.control.resetCommitted) f.control.resetCommitted(''); f.control.value = ''; } ctx.rerender(); }
101
- else { lastAdded = null; draft = v; Object.assign(ctxDraft, extra); ctxOpen = true; ctx.rerender(); }
102
- } });
103
- // a rebuild keeps what is typed. The field is made empty and filled after, so Enter still commits the restored text.
104
- f.control.value = draft;
105
- f.control.addEventListener('input', () => { draft = f.control.value; });
106
- return el('div', { class: 'td-day__goaladd' }, f, contextFold());
107
- }
108
-
109
- function clearContext() { ctxDraft.done_when = ''; ctxDraft.anchor = ''; ctxDraft.due = ''; ctxOpen = false; }
110
-
111
- /** "Add context" (G6): done when, anchor and due. The jobs carry who does the work and what comes after, so no field asks. */
112
- function contextFold() {
113
- const one = (key, label, hint, max) => {
114
- const f = field({ label, value: '', placeholder: hint, attrs: { maxlength: String(max), 'data-goals': 'ctx-' + key, 'data-goal-ctx-new': key }, onCommit: (v) => { ctxDraft[key] = v; } });
115
- f.control.value = ctxDraft[key];
116
- f.control.addEventListener('input', () => { ctxDraft[key] = f.control.value; });
117
- return f;
118
- };
119
- const d = el('details', { class: 'td-day__fold td-goal__ctxfold', open: ctxOpen ? true : null, 'data-goals': 'context' },
120
- el('summary', null, G.addContext),
121
- el('div', { class: 'td-goal__ctxfields' }, one('done_when', G.doneWhen, G.doneWhenHint, 200), one('anchor', G.anchor, G.anchorHint, 80), one('due', G.due, G.dueHint, 40)));
122
- d.addEventListener('toggle', () => { ctxOpen = d.open; });
123
- return d;
124
- }
125
-
126
- async function prepareStep(ctx, st) {
127
- const r = await pmPost('/api/proactive/prepare/plan', { ws: ctx.ws, initiative_id: st.initiative_id });
128
- if (!r || r.ok === false) { toast({ text: G.refused((r && r.error) || G.unreached), tone: 'destructive' }); return; }
129
- if (r.refused) { toast({ text: G.refused(r.refused.why) }); return; }
130
- prepared.set(st.ref, { key: r.item.key, branch: r.plan && r.plan.branch, item_id: r.item.id, prompt_sha: r.prompt_sha, initiative_id: st.initiative_id, ws: r.ws || ctx.ws });
131
- ctx.rerender();
132
- }
133
-
134
- async function queueStep(ctx, ref) {
135
- const p = prepared.get(ref);
136
- if (!p) return;
137
- const r = await pmPost('/api/proactive/prepare/queue', { confirm: true, ws: p.ws, initiative_id: p.initiative_id, item_id: p.item_id, prompt_sha: p.prompt_sha });
138
- prepared.delete(ref);
139
- toast({ text: r && r.ok ? G.queued(p.key) : G.refused((r && r.error) || G.unreached), tone: r && r.ok ? undefined : 'destructive' });
140
- ctx.rerender();
141
- }
142
-
143
- function stepNode(ctx, st) {
144
- const meta = [st.source, st.mention ? G.mention : null, st.effort].filter(Boolean).join(' · ');
145
- const p = prepared.get(st.ref);
146
- const acts = !st.prepare ? null
147
- : p ? el('span', { class: 'td-goal__prep' }, el('span', { class: 'td-goal__prep-text' }, G.prepareShows(p.key, p.branch)),
148
- button({ label: G.queue, size: 'sm', attrs: { 'data-goal-queue': st.ref }, onClick: () => queueStep(ctx, st.ref) }))
149
- : button({ label: G.prepare, size: 'sm', variant: 'ghost', attrs: { 'data-goal-prepare': st.ref }, onClick: () => prepareStep(ctx, st) });
150
- return el('li', { class: 'td-goal__step', 'data-goal-step': st.ref },
151
- badge({ text: st.owner === 'pm' ? G.you : G.agent, tone: st.owner === 'pm' ? 'outline' : 'muted' }),
152
- el('span', { class: 'td-goal__step-title' }, st.title),
153
- meta ? el('span', { class: 'td-goal__meta' }, meta) : null,
154
- acts);
155
- }
156
-
157
- const srcOf = (k) => D.srcName[k] || String(k || '');
158
-
159
- /** A job made from the brief, as a line of a goal (G3): a check for the PM's own job that has no task yet, the title, who
160
- * acts, where it came from (when not from the goal), and its status. The press on the title opens the job. */
161
- function jobLine(ctx, j) {
162
- const who = whoActs(j);
163
- const origin = originOf(j);
164
- const cur = ctx.cur('job', j.id);
165
- const checkable = j.status === 'you' && !j.task;
166
- const check = checkable ? field({ kind: 'check', label: '', value: j.group === 'done', attrs: { 'aria-label': `${A.done}: ${j.title}`, 'data-goal-job-check': j.id },
167
- onCommit: (v) => ctx.mark(j.id, { action: v ? 'done' : 'reopen' }, v ? A.did.done(j.title) : A.did.reopen) }) : null;
168
- return el('li', null, row({
169
- title: j.title, meta: [who.text, origin !== 'goal' ? D.origin[origin] : null, srcOf(j.source)], done: j.group === 'done',
170
- lead: [check, whoMark(who.who)].filter(Boolean), trail: [statusPill(j)], onOpen: () => ctx.select('job', j.id),
171
- attrs: { class: 'td-day__r', 'data-day-sel': 'job:' + j.id, 'data-goal-job': j.id, 'data-who': who.who, 'data-cur': cur }, openAttrs: { 'aria-current': cur },
172
- }));
173
- }
174
-
175
- /** A job the PM typed on the goal (G3): the PM's own, with no agent and no session. Check, uncheck and remove are the PM's presses. */
176
- function typedLine(ctx, g, j) {
177
- const who = whoActs({ typed: true, done: j.done });
178
- const open = g.status === 'open';
179
- const check = field({ kind: 'check', label: '', value: !!j.done, attrs: { 'aria-label': `${A.done}: ${j.text}`, 'data-goal-typed-check': j.id, disabled: open ? null : true },
180
- onCommit: (v) => press(ctx, { action: v ? 'job-done' : 'job-reopen', id: g.id, job: j.id }) });
181
- return el('li', null, row({
182
- title: j.text, meta: [who.text, D.origin.you], done: !!j.done, lead: [check, whoMark('pm')],
183
- trail: open ? [button({ label: tagged(G.removeJob, 'you'), size: 'sm', variant: 'ghost', attrs: { 'data-goal-typed-remove': j.id, 'aria-label': `${G.removeJob}: ${j.text}` },
184
- onClick: () => press(ctx, { action: 'job-remove', id: g.id, job: j.id }) })] : [],
185
- attrs: { class: 'td-day__r', 'data-goal-typed': j.id, 'data-who': 'pm' },
186
- }));
187
- }
188
-
189
- /** The "Add a job" field (G3, L2): typed text becomes a job the PM owns. Enter adds it. */
190
- function jobAdd(ctx, g) {
191
- if (typedOf(g).length >= MAX_JOBS) return el('p', { class: 'td-day__note' }, G.jobFull(MAX_JOBS));
192
- const f = field({ label: G.addJob, value: '', placeholder: G.addJobHint, hideLabel: true, attrs: { 'data-goals': 'job-input', 'data-goal-job-input': g.id, maxlength: '140' },
193
- onCommit: async (v) => {
194
- const text = String(v).trim();
195
- if (!text) { jobDrafts.set(g.id, ''); return; }
196
- const key = g.id + '|' + text.toLowerCase();
197
- if (lastAdded && lastAdded.key === key && Date.now() - lastAdded.at < 10000) { jobDrafts.set(g.id, ''); f.control.value = ''; ctx.rerender(); return; }
198
- lastAdded = { key, at: Date.now() };
199
- jobDrafts.set(g.id, '');
200
- if (await press(ctx, { action: 'job-add', id: g.id, text })) { if (f.control.value.trim() === text) { if (f.control.resetCommitted) f.control.resetCommitted(''); f.control.value = ''; } ctx.rerender(); }
201
- else { lastAdded = null; jobDrafts.set(g.id, text); ctx.rerender(); }
202
- } });
203
- f.control.value = jobDrafts.get(g.id) || '';
204
- f.control.addEventListener('input', () => { jobDrafts.set(g.id, f.control.value); });
205
- return f;
206
- }
207
-
208
- /** Link a job of the day that has no goal to this goal (G3, G4): the picker offers only jobs with no goal. */
209
- function jobLink(ctx, g) {
210
- const free = ctx.m.jobs.filter((j) => !j.goal);
211
- if (!free.length) return null;
212
- return linkField(free, (j) => ctx.mark(j.linkId, { action: 'link', goal: g.id }, D.linked(g.text)), { label: G.linkJob, prompt: G.linkJobPick, attrs: { 'data-goal-link': g.id } });
213
- }
214
-
215
- /** The jobs of a goal and what finished looks like. `n` is the goal's number. The goal's detail and a meeting's detail draw it. */
216
- export function goalJobsBlock(ctx, g, n) {
217
- const t = tally(ctx.m, g);
218
- const open = g.status === 'open';
219
- return el('div', { class: 'td-day__rel td-goal__jobs', 'data-goals': 'jobs', 'data-goal-jobs': g.id },
220
- el('h4', null, n ? G.forGoal(n, g.text) : G.jobsTitle),
221
- g.done_when ? el('p', { class: 'td-goal__donewhen', 'data-goal-donewhen': g.id }, el('b', null, G.doneWhen + ': '), g.done_when) : null,
222
- t.total ? el('p', { class: 'td-day__note', 'data-goal-tally': g.id }, D.goalJobs(t.done, t.total)) : null,
223
- t.total ? el('ul', { class: 'td-day__rows', 'data-goal-job-list': g.id }, ...t.js.map((j) => jobLine(ctx, j)), ...t.typed.map((j) => typedLine(ctx, g, j)))
224
- : el('p', { class: 'td-day__note' }, G.noJobs),
225
- open ? jobAdd(ctx, g) : null,
226
- open ? jobLink(ctx, g) : null);
227
- }
228
-
229
- /** The context of a goal (G1): done when, anchor and due. The PM edits it while the goal is open; an empty value clears it. */
230
- function contextFields(ctx, g) {
231
- if (g.status !== 'open') {
232
- const bits = [[G.doneWhen, g.done_when], [G.anchor, g.anchor], [G.due, g.due]].filter(([, v]) => v);
233
- return bits.length ? el('dl', { class: 'td-day__ctx' }, ...bits.flatMap(([k, v]) => [el('dt', null, k), el('dd', null, v)])) : null;
234
- }
235
- const one = (key, label, hint, max) => {
236
- const f = field({ label, value: g[key] || '', placeholder: hint, attrs: { maxlength: String(max), 'data-goals': 'ctx-' + key, 'data-goal-ctx': key },
237
- onCommit: (v) => press(ctx, { action: 'context', id: g.id, [key]: String(v).trim() }) });
238
- return f;
239
- };
240
- return el('div', { class: 'td-goal__ctxfields', 'data-goals': 'context-fields' }, one('done_when', G.doneWhen, G.doneWhenHint, 200), one('anchor', G.anchor, G.anchorHint, 80), one('due', G.due, G.dueHint, 40));
241
- }
242
-
243
- /** The end of the Goals section (G5): every job of the day with no goal, each with a picker of today's open goals. */
244
- export function jobsWithoutGoal(ctx) {
245
- const { m } = ctx;
246
- const free = m.jobs.filter((j) => !j.goal);
247
- if (!m.jobs.length) return null;
248
- const hasGoals = m.allGoals.some((g) => g.status === 'open');
249
- return el('div', { class: 'td-day__rel td-goal__nogoal', 'data-goals': 'no-goal' },
250
- el('h4', null, G.noGoalTitle, free.length ? el('span', null, String(free.length)) : null),
251
- free.length ? el('ul', { class: 'td-day__rows', 'data-day-list': 'no-goal' }, ...free.map((j) => {
252
- const who = whoActs(j);
253
- const pick = hasGoals ? goalPicker(m, null, (gid) => {
254
- const g = gid ? m.allGoals.find((x) => x.id === gid) : null;
255
- if (g) ctx.mark(j.linkId, { action: 'link', goal: g.id }, D.linked(g.text));
256
- }, { label: G.linkLabel(j.title), none: G.linkTo, attrs: { 'data-nogoal-link': j.id } }) : null;
257
- return el('li', null, row({
258
- title: j.title, meta: [who.text, srcOf(j.source)], lead: [whoMark(who.who)], trail: pick ? [el('span', { class: 'td-goal__pick' }, pick)] : [], onOpen: () => ctx.select('job', j.id),
259
- attrs: { class: 'td-day__r', 'data-nogoal-job': j.id, 'data-who': who.who },
260
- }));
261
- })) : el('p', { class: 'td-day__note' }, G.noGoalNone));
262
- }
263
-
264
- /** The detail of one goal. `row(type, id, label, lead, trail)` draws a selectable row (today-day.js). */
265
- export function goalDetail(ctx, id, row) {
266
- const { m } = ctx;
267
- const i = m.allGoals.findIndex((g) => g.id === id);
268
- if (i < 0) return null;
269
- const g = m.allGoals[i];
270
- const closed = g.status !== 'open';
271
- const meets = m.events.filter((e) => e.gid === g.id);
272
- const ctrls = closed
273
- ? [button({ label: G.reopen, size: 'sm', attrs: { 'data-goal-act': 'reopen' }, onClick: () => press(ctx, { action: 'reopen', id: g.id }) })]
274
- : [button({ label: G.done, size: 'sm', attrs: { 'data-goal-act': 'done' }, onClick: () => press(ctx, { action: 'done', id: g.id }) }),
275
- button({ label: G.drop, size: 'sm', variant: 'ghost', attrs: { 'data-goal-act': 'drop' }, onClick: () => press(ctx, { action: 'drop', id: g.id }) })];
276
- ctrls.push(button({ label: G.remove, size: 'sm', variant: 'ghost', attrs: { 'data-goal-act': 'remove' },
277
- onClick: async () => { if (await press(ctx, { action: 'remove', id: g.id })) ctx.select(null, null); } }));
278
- const steps = (g.steps || []).filter((st) => st.from !== 'brief' || st.prepare); // brief items show as jobs; Today cards and preparable steps here
279
- return [
280
- el('div', { class: 'td-day__dhead' }, el('span', { class: 'td-day__kind' }, D.kind.goal(i + 1)), el('h3', null, g.text)),
281
- el('div', { class: 'td-day__acts' }, badge({ text: G.coverage[g.coverage] || g.coverage, tone: g.coverage === 'needs-plan' ? 'warning' : 'outline' }),
282
- g.initiative_id ? el('span', { class: 'td-day__mono' }, g.initiative_id) : null),
283
- contextFields(ctx, g),
284
- closed ? null : el('p', { class: 'td-day__note', 'data-goals': 'close-note' }, G.closeNote),
285
- ctx.repoPicker && m.repos.length ? el('div', { class: 'td-day__ch', 'data-goals': 'repo' }, el('span', null, D.repo.label),
286
- ctx.repoPicker(m, g.repo, (r) => press(ctx, { action: 'tag', id: g.id, repo: r }), { 'data-goal-repo': g.id })) : null,
287
- ctx.repoPicker && m.repos.length ? el('p', { class: 'td-day__note' }, D.repo.goalHint) : null,
288
- meets.length ? el('div', { class: 'td-day__rel' }, el('h4', null, D.meetings), el('ul', { class: 'td-day__rows' }, ...meets.map((e) => row('event', e.id, e.title, e.time)))) : null,
289
- goalJobsBlock(ctx, g, null),
290
- !closed && steps.length ? el('div', { class: 'td-day__rel', 'data-goals': 'steps' }, el('h4', null, D.stepsTitle), el('ul', { class: 'td-goal__steps' }, ...steps.map((st) => stepNode(ctx, st)))) : null,
291
- el('div', { class: 'td-day__acts' }, ...ctrls),
292
- ];
293
- }
294
-
295
- export function goalsSig() {
296
- return JSON.stringify([draft === '', [...prepared.keys()]]);
297
- }
@@ -1,84 +0,0 @@
1
- /* pm/today-jobs.js — what a job says about itself on Today (initiative today-goals-jobs, PRD J1 to J4).
2
- *
3
- * statusPill(j) → the status badge: To do, Needs you, Running, Done or Blocked
4
- * whoActs(j) → { who: 'pm'|'agent', text }: who acts on the job's next press
5
- * mark(who) → the square beside it: open for the PM, filled for the agent
6
- * tag(who) → the small YOU or AGENT tag a press carries
7
- * originOf(j) → 'goal'|'found'|'mention'|'you': where the job came from, derived from the data
8
- * goalPicker(m, cur, ...) → a select: No goal, or one of today's open goals
9
- * linkField(...) → a select of the jobs of the day that have no goal
10
- *
11
- * Pure drawing: no request is sent here. The presses are the day section's (today-day.js) and the goals module's.
12
- */
13
-
14
- import { el } from './dom.js';
15
- import { badge, field } from './primitives.js';
16
- import { COPY } from './today-copy.js';
17
-
18
- const D = COPY.day;
19
- const TONE = { '': 'muted', ok: 'outline', info: 'outline', warn: 'warning', purple: 'warning', bad: 'destructive' };
20
-
21
- /** The status of a job as a badge. The raw status stays in data-day-status for the suites. */
22
- export function statusPill(j) {
23
- const s = D.status2;
24
- const map = {
25
- notStarted: [s.notStarted, ''], waiting: [s.waiting, ''], working: [s.working, 'info'], sending: [s.sending, 'info'],
26
- review: [j.kind === 'auto' ? s.reviewAuto : s.review, 'purple'], sent: [s.sent, 'ok'], done: [s.done, 'ok'],
27
- failed: [s.failed, 'bad'], you: [s.you, 'warn'],
28
- };
29
- const [t, tone] = map[j.status] || [j.status, ''];
30
- return badge({ text: t, tone: TONE[tone] || 'muted', attrs: { 'data-day-status': j.status } });
31
- }
32
-
33
- /** Who acts on the next press. A draft to approve, a failed job and the PM's own job wait on the PM. */
34
- export function whoActs(j) {
35
- const W = D.who2;
36
- if (j.typed) return j.done ? { who: 'pm', text: W.youDone } : { who: 'pm', text: W.you };
37
- if (j.status === 'you') return j.group === 'done' ? { who: 'pm', text: W.youDone } : { who: 'pm', text: W.you };
38
- if (j.status === 'working' || j.status === 'sending') return { who: 'agent', text: W.working };
39
- if (j.status === 'done' || j.status === 'sent') return { who: 'agent', text: W.finished };
40
- if (j.status === 'notStarted' || j.status === 'waiting') return { who: 'agent', text: W.queued };
41
- return { who: 'pm', text: W.you }; // review and failed
42
- }
43
-
44
- /** The square: filled for the agent, open for the PM. It is a picture; the words beside it say the same. */
45
- export function mark(who) {
46
- return el('span', { class: 'td-day__sq', 'data-who': who, 'aria-hidden': 'true' });
47
- }
48
-
49
- /** The small tag on a press: YOU when the PM does it, AGENT when the press starts the agent. */
50
- export function tag(who) {
51
- return el('span', { class: 'td-day__tag', 'data-who': who, 'data-day': 'tag' }, who === 'agent' ? D.tag.agent : D.tag.you);
52
- }
53
-
54
- /** A button label with its tag: [text, tag]. */
55
- export const tagged = (text, who) => [text, ' ', tag(who)];
56
-
57
- const MEETING_SOURCES = ['calendar', 'wispr'];
58
- /** Where a job came from, from the data and never from a field the PM edits. */
59
- export function originOf(j) {
60
- if (j.typed) return 'you';
61
- if (j.item && j.item.mention) return 'mention';
62
- if (j.item && (MEETING_SOURCES.includes(j.item.source) || j.item.verb === 'prepare')) return 'found';
63
- if (!j.item) return 'you'; // a briefed task with no item: the PM gave it to the agent by hand
64
- return j.goal ? 'goal' : 'found';
65
- }
66
-
67
- /** A select of today's open goals with No goal first. `onPick(goalId|null)`. */
68
- export function goalPicker(m, cur, onPick, { label, none = D.goalCtl.none, attrs } = {}) {
69
- const open = m.allGoals.filter((g) => g.status === 'open');
70
- const f = field({ label: label || D.goalCtl.label, kind: 'select', value: cur || '', hideLabel: true,
71
- options: [{ value: '', label: none }, ...open.map((g) => ({ value: g.id, label: `${m.goalNo.get(g.id)} · ${g.text}` })),
72
- // a goal that is closed stays shown while the job is under it, so the picker never hides what is stored
73
- ...(cur && !open.some((g) => g.id === cur) ? [{ value: cur, label: (m.allGoals.find((g) => g.id === cur) || { text: cur }).text }] : [])],
74
- attrs, onCommit: (v) => onPick(v || null) });
75
- return f;
76
- }
77
-
78
- /** A select of jobs with no goal: the first option is the prompt. `onPick(job)`. */
79
- export function linkField(jobs, onPick, { label, prompt, attrs } = {}) {
80
- const f = field({ label, kind: 'select', value: '', hideLabel: true, attrs,
81
- options: [{ value: '', label: prompt }, ...jobs.map((j) => ({ value: j.linkId, label: j.title }))],
82
- onCommit: (v) => { const j = jobs.find((x) => x.linkId === v); if (j) onPick(j); } });
83
- return f;
84
- }
@@ -1,50 +0,0 @@
1
- /* pm/today-mentions.js — a mention in the look of its source (initiative today-goals-jobs, PRD M1 to M3).
2
- *
3
- * hasCard(source) → true for Slack, Confluence and Figma: the sources that draw as a card
4
- * mentionCard(j) → the card of a mention job: the source line, the author, the time, the text, and, only when the
5
- * brief item carries them, the quoted passage (Confluence) or the frame (Figma)
6
- *
7
- * Pure drawing from the brief item's own fields (who, about, ask, where, quote, thread). A field the item lacks is left
8
- * out, never made up. No press lives here: the card sits inside the row's open button or in the detail, and the card
9
- * links to the conversation. Nothing here posts to, resolves in or reacts in a service.
10
- */
11
-
12
- import { el } from './dom.js';
13
- import { icon } from './icons.js';
14
- import { COPY } from './today-copy.js';
15
-
16
- const D = COPY.day;
17
- const ICON = { slack: 'message-square', confluence: 'file-text', figma: 'diamond' };
18
-
19
- export const hasCard = (source) => Object.prototype.hasOwnProperty.call(ICON, source);
20
-
21
- const initials = (who) => String(who || '').replace(/[^\p{L}\p{N}\s]/gu, ' ').split(/\s+/).filter(Boolean).slice(0, 2).map((w) => w[0].toUpperCase()).join('');
22
-
23
- /** The time of the author's last message in the thread the item carries; none when it carries none. */
24
- function timeOf(it) {
25
- const mine = (Array.isArray(it.thread) ? it.thread : []).filter((m) => m && m.at && (!it.who || m.who === it.who));
26
- return mine.length ? mine[mine.length - 1].at : null;
27
- }
28
-
29
- /** The card of one mention. `name` is the display name of the source (Slack, Confluence, Figma). */
30
- export function mentionCard(j, name) {
31
- const it = j.item || {};
32
- const svc = j.source;
33
- const ini = initials(it.who);
34
- const words = [it.about, it.ask].filter(Boolean);
35
- const when = timeOf(it);
36
- const quote = svc === 'confluence' && typeof it.quote === 'string' && it.quote.trim() ? it.quote.trim() : null;
37
- const frame = svc === 'figma'
38
- ? el('span', { class: 'td-day__mc-frame', 'data-mc': 'frame', 'aria-hidden': 'true' }, icon('circle-dot')) : null;
39
- const avatar = svc !== 'figma' && ini ? el('span', { class: 'td-day__av', 'data-mc': 'avatar', 'aria-hidden': 'true' }, ini) : null;
40
- return el('span', { class: 'td-day__mc', 'data-mention-card': svc },
41
- el('span', { class: 'td-day__mc-head', 'data-mc': 'source' }, icon(ICON[svc]), D.mc.via(name, it.where)),
42
- quote ? el('span', { class: 'td-day__mc-quote', 'data-mc': 'quote' }, quote) : null,
43
- el('span', { class: 'td-day__mc-main' },
44
- frame || avatar,
45
- el('span', { class: 'td-day__mc-col' },
46
- it.who || when ? el('span', { class: 'td-day__mc-line' },
47
- it.who ? el('strong', { class: 'td-day__mc-name', 'data-mc': 'who' }, it.who) : null,
48
- when ? el('span', { class: 'td-day__mc-time', 'data-mc': 'time' }, when) : null) : null,
49
- ...words.map((w) => el('span', { class: 'td-day__mc-text', 'data-mc': 'text' }, w)))));
50
- }
@@ -1,202 +0,0 @@
1
- /* pm/topbar.js — the frame's one top bar (pm-os-absorb Run 3, slice 3A; PRD R9, R10).
2
- *
3
- * Repository ▾ · Today Initiatives Board Reports Docs · ⌘K · Sync (only when unsynced) · Settings
4
- *
5
- * The bar is built once and updated on every render: app.js calls `bar.update(model)` and the bar changes only what
6
- * the model changed, so a focused control keeps its focus across a repaint. It holds no state of its own except the
7
- * last sync reading of each repository, which it reads from local git through data.js (no network: GET /api/sync/status
8
- * runs `git status` against the remote-tracking ref the last fetch left).
9
- *
10
- * createTopbar({ go, openPalette, repoMenu, sync }) → { node, update(model) }
11
- * go(id) open destination id (today, initiatives, board, reports, docs, people, settings)
12
- * openPalette() open ⌘K
13
- * repoMenu(anchor) open the Repository menu under `anchor`
14
- * sync(repo) run Sync for `repo`; resolves to the server's answer
15
- * model = { dest, repoLabel, needs, unsynced, syncing }
16
- *
17
- * Hooks the suites find things by: [data-fr="bar"], [data-fr="repo"], [data-fr-dest="<id>"] (aria-current="page" on
18
- * the open one), [data-today-badge] (the Today count, seams §2.6), [data-fr="search"], [data-fr="sync"].
19
- */
20
-
21
- import { el, setChildren } from './dom.js';
22
- import { button, iconButton, menu, needsDot, needsCount } from './primitives.js';
23
- import { COPY } from './frame-copy.js';
24
- import * as dock from './note-dock.js';
25
- import { el as h } from './dom.js';
26
- import { upcomingToday, upcomingWithoutNote, whenText, started } from './notes-links.js';
27
- import { contextOf, peopleOf } from './notes-context.js';
28
-
29
- /** The destinations the bar names, in order. Settings sits at the end of the bar, after Sync. Docs joined the bar at the
30
- * PM's word (2026-10-06, docs-three-way-sync: "I thought Docs is one of the main menu"). People joined after Docs when the
31
- * PM approved the People mockup and said build it (2026-10-06, people-directory). My work joined beside Agenda when the PM
32
- * approved the mockup that puts it there and said build it (2026-10-07, my-work). Notes joined between Docs and People with the
33
- * Record control before Settings, as the "Notes: next features" mockup the PM approved (2026-10-07, meeting-notes Run 12). */
34
- export const BAR_DESTS = Object.freeze(['today', 'mywork', 'initiatives', 'board', 'reports', 'docs', 'notes', 'people']);
35
-
36
- /** Is this sync reading "not in sync"? Behind, ahead, records not yet recorded, or `remote_stale`: no fetch in the last
37
- * few minutes, so another machine's push would be invisible here and "in sync" cannot be claimed. An unreadable status
38
- * is not shown. */
39
- export function unsyncedOf(st) {
40
- return !!st && st.ok !== false
41
- && ((st.behind | 0) > 0 || (st.ahead | 0) > 0 || (st.dirty_records | 0) > 0 || st.remote_stale === true);
42
- }
43
-
44
- /** The lucide symbol each place wears in the bar (UI comfort, 2026-10-07: a word alone is slow to find; the phone's tab bar already wears these). */
45
- const NAV_ICON = Object.freeze({ today: 'house', mywork: 'list-checks', initiatives: 'target', board: 'square-kanban', reports: 'chart-column', docs: 'file-text', notes: 'notebook-pen', people: 'users', settings: 'settings' });
46
-
47
- const fmtClock = (ms) => { const t = Math.max(0, Math.floor(ms / 1000)); const m = Math.floor(t / 60); return (m >= 60 ? Math.floor(m / 60) + ':' + String(m % 60).padStart(2, '0') : String(m)) + ':' + String(t % 60).padStart(2, '0'); };
48
- const dockHighlight = () => (dock.highlightBusy ? dock.highlightBusy() : null);
49
-
50
- export function createTopbar({ go, openPalette, openView, repoMenu, sync } = {}) {
51
- const node = el('header', { class: 'fr-bar', 'data-shell': 'top', 'data-fr': 'bar' });
52
-
53
- let repoBtn = null;
54
- let repoLabel = null;
55
- const repoSlot = el('div', { class: 'fr-bar__repo' });
56
-
57
- const count = needsCount('0', { 'data-today-badge': '' });
58
- const dot = needsDot();
59
- const links = {};
60
- for (const id of [...BAR_DESTS, 'settings']) {
61
- // icon only (meeting-notes Run 13): the place's name is its tooltip and its aria-label
62
- links[id] = iconButton({
63
- icon: NAV_ICON[id], ariaLabel: COPY.nav[id],
64
- attrs: { class: 'fr-link', 'data-fr-dest': id, 'aria-current': 'false' },
65
- onClick: () => go && go(id),
66
- });
67
- }
68
- const todayMark = el('span', { class: 'fr-mark' }, dot, count);
69
- links.today.appendChild(todayMark);
70
- // My work's count of items to brief (initiative my-work, R10): my-work-data.js tells it with the `pmos:mywork` event
71
- const workCount = needsCount('0', { 'data-my-work-badge': '' });
72
- const workMark = el('span', { class: 'fr-mark' }, workCount);
73
- workMark.hidden = true;
74
- links.mywork.appendChild(workMark);
75
- if (typeof window !== 'undefined') {
76
- window.addEventListener('pmos:mywork', (e) => {
77
- const n = Math.max(0, Number(e && e.detail && e.detail.brief) || 0);
78
- workCount.textContent = String(n);
79
- workCount.setAttribute('aria-label', COPY.toBrief(n));
80
- workMark.hidden = n === 0;
81
- });
82
- }
83
- const nav = el('nav', { class: 'fr-nav', 'aria-label': COPY.nav.label }, BAR_DESTS.map((id) => links[id]));
84
-
85
- const search = iconButton({
86
- icon: 'search', ariaLabel: COPY.search + ' (' + COPY.searchKey + ')',
87
- attrs: { class: 'fr-search', 'data-fr': 'search', 'aria-keyshortcuts': 'Meta+K Control+K' },
88
- onClick: () => openPalette && openPalette(),
89
- });
90
-
91
- /* The Record control (meeting-notes Run 13, prototype/meeting-notes/record-control-mockup.html). Two groups, always in the same
92
- * place. Left, only while a meeting is recording or paused: the chip that names it, then Highlight, Pause and Stop (recording)
93
- * or Resume and Stop (paused). Nothing to resume: no left group. Right, always: New (an untitled note) and an arrow that lists
94
- * today's meetings that have not ended (one under way included); both are unavailable while a meeting is recording. The highlight's pop-up hangs
95
- * under the control. */
96
- const recSlot = el('div', { class: 'fr-rec', 'data-fr': 'record' });
97
- let recKey = '';
98
- let recTick = null;
99
- const left = (until) => Math.max(1, Math.ceil((until - Date.now()) / 60000));
100
- const chipText = (st) => (st.mode === 'recording' ? (st.started ? fmtClock(Date.now() - st.started) : '') : st.until ? 'paused · ' + left(st.until) + ' min left' : 'paused');
101
- const tip = (b, text) => { b.title = text; b.setAttribute('aria-label', text); return b; };
102
- const off = (b, why) => { b.setAttribute('aria-disabled', 'true'); b.classList.add('fr-rec__off'); tip(b, why); return b; };
103
- const chipOf = (st) => {
104
- const clock = h('span', { class: 'fr-rec__clock', 'data-fr-rec-clock': '' }, chipText(st));
105
- const dotEl = h('span', { class: 'fr-rec-dot' + (st.mode === 'paused' ? ' fr-rec-dot--paused' : ''), 'aria-hidden': 'true' });
106
- const b = button({ label: h('span', { class: 'fr-rec__txt' }, dotEl, h('b', { class: 'fr-rec__title' }, st.title), clock), variant: 'ghost',
107
- attrs: { class: 'fr-rec__seg fr-rec__chip', 'data-fr-rec': st.mode, 'aria-label': (st.mode === 'recording' ? 'Recording ' : 'Paused: ') + st.title + '. Open the note.' }, onClick: () => dock.openDock(st.id) });
108
- return b;
109
- };
110
- function drawRecord() {
111
- const st = dock.recordState();
112
- const hl = st.mode === 'recording' ? dock.highlightBusy() : null;
113
- const key = [st.mode, st.id, st.title, hl ? hl.state + hl.open : ''].join(':');
114
- if (key === recKey) return;
115
- recKey = key;
116
- clearInterval(recTick); recTick = null;
117
- const kids = [];
118
- const recording = st.mode === 'recording';
119
- if (st.mode !== 'idle') {
120
- const chip = chipOf(st);
121
- const group = [chip];
122
- if (recording) {
123
- const hlb = iconButton({ icon: 'highlighter', ariaLabel: hl ? 'Highlight in progress: show it' : 'Highlight the last 30 seconds and what is said next',
124
- attrs: { class: 'fr-rec__seg' + (hl ? ' fr-rec__seg--busy' : ''), 'data-fr-rec-highlight': hl ? hl.state : '' }, onClick: () => dock.highlightNow() });
125
- group.push(hlb, iconButton({ icon: 'pause', ariaLabel: 'Pause (you can resume within 1 hour)', attrs: { class: 'fr-rec__seg', 'data-fr-rec-pause': '' }, onClick: () => dock.pauseNow() }));
126
- } else {
127
- group.push(iconButton({ icon: 'play', ariaLabel: 'Resume ' + st.title, attrs: { class: 'fr-rec__seg fr-rec__resume', 'data-fr-rec-resume': '' }, onClick: () => dock.resumeNow() }));
128
- }
129
- group.push(iconButton({ icon: 'square', ariaLabel: 'Stop for good (cannot be resumed)', attrs: { class: 'fr-rec__seg fr-rec__stop', 'data-fr-rec-stop': '' }, onClick: () => dock.stopNow() }));
130
- kids.push(h('div', { class: 'fr-rec__group', role: 'group', 'aria-label': (recording ? 'Recording ' : 'Paused: ') + st.title }, group));
131
- const clockNode = chip.querySelector('[data-fr-rec-clock]');
132
- recTick = setInterval(() => { const s2 = dock.recordState(); if (clockNode) clockNode.textContent = chipText(s2); }, 1000);
133
- }
134
- const why = 'Pause or stop the meeting being recorded to start a new one';
135
- const mic = iconButton({ icon: 'mic', ariaLabel: 'Record an untitled note', attrs: { class: 'fr-rec__seg fr-rec__new', 'data-fr-rec-new': '' }, onClick: (e) => { if (recording) return; dock.recordNew(e && e.currentTarget); } });
136
- const arrow = iconButton({ icon: 'chevron-down', ariaLabel: 'Record for an upcoming meeting', size: 'sm', attrs: { class: 'fr-rec__seg fr-rec__upcoming', 'data-fr-rec-upcoming': '' },
137
- onClick: (e) => { if (!recording) openUpcoming(e && e.currentTarget); } });
138
- if (recording) { off(mic, why); off(arrow, why); }
139
- kids.push(h('div', { class: 'fr-rec__group fr-rec__group--new', role: 'group', 'aria-label': 'New recording' }, mic, arrow));
140
- const panel = recording ? dock.highlightPanel() : null;
141
- if (panel) kids.push(panel);
142
- setChildren(recSlot, kids);
143
- }
144
- /** The arrow beside New: Untitled note, then today's meetings that have not ended (or ended within the grace period) and have no note, the next one marked. */
145
- async function openUpcoming(anchor) {
146
- const evs = upcomingWithoutNote(await upcomingToday());
147
- const next = evs.find((x) => !started(x));
148
- const fmt = (e) => {
149
- const c = contextOf(e) || {};
150
- const inText = whenText(e); const first = e === next;
151
- const who = peopleOf(c); const extra = c.attendees ? ' (' + c.attendees + ' attendees)' : '';
152
- const bits = [first ? 'Next' : null, inText, who.length ? who.slice(0, 2).join(', ') + (who.length > 2 ? ' +' + (who.length - 2) : '') : c.attendees ? c.attendees + ' attendees' : null, c.agenda && c.agenda.length ? c.agenda.length + ' agenda item' + (c.agenda.length === 1 ? '' : 's') : null].filter(Boolean);
153
- void extra;
154
- return { label: e.title, hint: e.time || '', detail: bits.join(' · '), attrs: { 'data-fr-rec-event': e.id || '' }, onSelect: () => dock.recordEvent(e) };
155
- };
156
- const items = [{ label: 'Untitled note', icon: 'plus', detail: 'not linked to a meeting', attrs: { 'data-fr-rec-untitled': '' }, onSelect: () => dock.recordNew() }, { sep: true },
157
- ...(evs.length ? evs.map(fmt) : [{ label: 'No more meetings today', attrs: { 'data-fr-rec-none': '' }, onSelect: () => {} }])];
158
- menu({ anchor, items, ariaLabel: 'Record a new meeting' });
159
- }
160
-
161
- let syncBtn = null;
162
- let syncLabel = null;
163
-
164
- function repoButton(label) {
165
- const b = button({
166
- label, variant: 'ghost', iconEnd: 'chevron-down',
167
- attrs: { class: 'fr-repo', 'data-fr': 'repo', 'aria-haspopup': 'menu', 'aria-label': COPY.repo.open(label) },
168
- onClick: () => repoMenu && repoMenu(b),
169
- });
170
- return b;
171
- }
172
- function syncButton(label, busy) {
173
- const b = iconButton({ icon: 'refresh-cw', ariaLabel: busy ? label : COPY.sync.title || label,
174
- attrs: { class: 'fr-sync', 'data-fr': 'sync', 'data-fr-sync-label': label, 'aria-busy': busy ? 'true' : 'false' }, onClick: () => { if (!busy && sync) sync(); } });
175
- if (busy) { b.setAttribute('aria-disabled', 'true'); b.classList.add('fr-sync--busy'); }
176
- return b;
177
- }
178
-
179
- function update(m) {
180
- const model = m || {};
181
- if (model.repoLabel !== repoLabel) {
182
- repoLabel = model.repoLabel;
183
- repoBtn = repoButton(repoLabel || COPY.repo.none);
184
- setChildren(repoSlot, [repoBtn]);
185
- }
186
- for (const id of Object.keys(links)) links[id].setAttribute('aria-current', id === model.dest ? 'page' : 'false');
187
- const n = Math.max(0, Number(model.needs) || 0);
188
- if (count.textContent !== String(n)) count.textContent = String(n);
189
- todayMark.hidden = n === 0;
190
- count.setAttribute('aria-label', COPY.needs(n));
191
- const want = model.unsynced || model.syncing ? (model.syncing ? COPY.sync.busy : COPY.sync.label) : null;
192
- if (want !== syncLabel) {
193
- syncLabel = want;
194
- syncBtn = want ? syncButton(want, !!model.syncing) : null;
195
- }
196
- drawRecord();
197
- setChildren(node, [repoSlot, nav, search, syncBtn, recSlot, links.settings]);
198
- }
199
-
200
- update({});
201
- return { node, update, links };
202
- }