rvlib-shipkit 2.29.0 โ†’ 2.30.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 (512) hide show
  1. package/CHANGELOG.md +20 -1
  2. package/package.json +2 -1
  3. package/src/advisors/app-graph.ts +1 -1
  4. package/src/advisors/expose.ts +5 -1
  5. package/src/advisors/r2.ts +7 -9
  6. package/src/advisors/routes.ts +29 -2
  7. package/src/advisors/scan.ts +11 -0
  8. package/src/agent-time/accounts-usage.ts +8 -0
  9. package/src/agent-time/claude-sessions.ts +32 -0
  10. package/src/agent-time/hooks.ts +1 -1
  11. package/src/agent-time/live.ts +5 -2
  12. package/src/agent-time/registry.ts +186 -89
  13. package/src/agent-time/store.ts +6 -4
  14. package/src/asks/ask-doc.ts +2 -2
  15. package/src/asks/ask-store.ts +22 -7
  16. package/src/check.ts +9 -1
  17. package/src/checks/SK001-package-json-shape.check.ts +1 -0
  18. package/src/checks/SK003-claude-md-shape.check.ts +1 -0
  19. package/src/checks/SK004-gitignore-policy.check.ts +12 -6
  20. package/src/checks/SK008-reviewer-agent.check.ts +4 -7
  21. package/src/checks/SK013-one-way-in-policy.check.ts +1 -0
  22. package/src/checks/SK017-vscode-hub-task.check.ts +1 -0
  23. package/src/checks/SK024-identity-colors.check.ts +1 -1
  24. package/src/checks/SK027-agent-wiki-links.check.ts +2 -1
  25. package/src/checks/SK033-global-contribution.check.ts +1 -0
  26. package/src/checks/SK034-commit-gates-armed.check.ts +1 -0
  27. package/src/checks/SK039-vscode-watch-generated.check.ts +1 -0
  28. package/src/checks/SK049-thread-answers-hook.check.ts +9 -5
  29. package/src/checks/SK050-retired-commands.check.ts +1 -0
  30. package/src/checks/SK051-no-formatter.check.ts +1 -0
  31. package/src/cli/channel-run.ts +17 -0
  32. package/src/cli/cmd_Advisors.ts +28 -7
  33. package/src/cli/cmd_Asks.ts +2 -2
  34. package/src/cli/cmd_Backup.ts +5 -1
  35. package/src/cli/cmd_CacheAudit.ts +1 -1
  36. package/src/cli/cmd_Channel.ts +43 -0
  37. package/src/cli/cmd_GlobalProcesses.ts +1 -0
  38. package/src/cli/cmd_Home.ts +12 -5
  39. package/src/cli/cmd_Hooks.ts +1 -1
  40. package/src/cli/cmd_Hq.ts +43 -0
  41. package/src/cli/cmd_Lanes.ts +15 -3
  42. package/src/cli/cmd_Media.ts +8 -3
  43. package/src/cli/cmd_Orchestrator.ts +253 -84
  44. package/src/cli/cmd_OrchestratorRole.ts +163 -0
  45. package/src/cli/cmd_Review.ts +142 -165
  46. package/src/cli/cmd_Secret.ts +44 -14
  47. package/src/cli/cmd_Shot.ts +2 -4
  48. package/src/cli/cmd_Sound.ts +1 -0
  49. package/src/cli/cmd_Urls.ts +3 -3
  50. package/src/cli/inbox-hook-run.ts +109 -0
  51. package/src/cli/registry.ts +6 -2
  52. package/src/cli/review-here.ts +136 -0
  53. package/src/cli.ts +45 -14
  54. package/src/collections/actions.ts +5 -4
  55. package/src/collections/checks.ts +5 -0
  56. package/src/collections/collection-types.ts +4 -3
  57. package/src/collections/pings.ts +4 -1
  58. package/src/collections/providers.ts +6 -4
  59. package/src/collections/tests.ts +7 -4
  60. package/src/core/app-icon-frame.ts +62 -0
  61. package/src/core/app-icon.ts +179 -17
  62. package/src/core/archived.ts +10 -7
  63. package/src/core/check-ctx.ts +38 -4
  64. package/src/core/check-pass.ts +7 -0
  65. package/src/core/foreign.ts +87 -0
  66. package/src/core/gui-color.ts +75 -0
  67. package/src/core/hub-theme.ts +1 -3
  68. package/src/core/layout.ts +3 -0
  69. package/src/core/machine-commit.ts +9 -1
  70. package/src/core/one-lib.ts +2 -1
  71. package/src/core/one-way-in-policy.ts +17 -12
  72. package/src/core/owner-word-policy.ts +123 -0
  73. package/src/core/panel-shades.ts +140 -0
  74. package/src/core/repo-gui-color.ts +16 -0
  75. package/src/core/role-policy.ts +17 -0
  76. package/src/core/scope.ts +6 -3
  77. package/src/core/tmux-policy.ts +264 -0
  78. package/src/core/unit-icon.ts +43 -0
  79. package/src/fleet/push-fleet.ts +2 -0
  80. package/src/fleet/scan-fleet.ts +3 -0
  81. package/src/gate/cache-audit.ts +7 -1
  82. package/src/gate/gate-checks.ts +14 -9
  83. package/src/gate/run-fix.ts +30 -5
  84. package/src/gate/run-fixers.ts +8 -3
  85. package/src/home/activity-shape.ts +2 -0
  86. package/src/home/activity.ts +2 -1
  87. package/src/home/daemon-guard.ts +20 -2
  88. package/src/home/daemon-jobs.ts +26 -18
  89. package/src/home/gui-app/ShipkitGui.swift +2012 -144
  90. package/src/home/gui-app/icon.svg +8 -0
  91. package/src/home/gui-app.ts +94 -30
  92. package/src/home/home-routes.ts +53 -9
  93. package/src/home/home-start.ts +27 -3
  94. package/src/home/inbox-shape.ts +7 -3
  95. package/src/home/log-follow.ts +117 -0
  96. package/src/home/machine-fold.ts +1 -1
  97. package/src/home/open-app.ts +9 -3
  98. package/src/home/page-build.ts +5 -1
  99. package/src/home/page-held.ts +1 -1
  100. package/src/home/pm-config.ts +0 -8
  101. package/src/home/pm.ts +62 -5
  102. package/src/home/process-apps.ts +70 -23
  103. package/src/home/process-rows.ts +16 -1
  104. package/src/home/push-sources.ts +18 -13
  105. package/src/home/resources.ts +16 -7
  106. package/src/home/run-daemon.ts +4 -1
  107. package/src/home/run-pm.ts +1 -1
  108. package/src/home/serve-daemon.ts +13 -4
  109. package/src/home/serve-web.ts +141 -17
  110. package/src/home/space-page.ts +3 -3
  111. package/src/home/space-route.ts +2 -2
  112. package/src/home/supervise.ts +2 -1
  113. package/src/home/vault-page.ts +2 -1
  114. package/src/home/web-places.ts +239 -0
  115. package/src/home/widgets.ts +16 -2
  116. package/src/hooks/commit-message.ts +11 -9
  117. package/src/hooks/one-way-in-guard.ts +145 -68
  118. package/src/hooks/run-hooks.ts +15 -5
  119. package/src/hooks/shared-file.ts +273 -83
  120. package/src/hooks/shell-writes.ts +620 -0
  121. package/src/hooks/write-log.ts +149 -0
  122. package/src/hq/door-route.ts +63 -7
  123. package/src/hq/door.ts +45 -12
  124. package/src/hq/history-send.ts +3 -1
  125. package/src/hq/hq-db.ts +10 -3
  126. package/src/hq/hq-local.ts +24 -5
  127. package/src/hq/hq-routes.ts +3 -1
  128. package/src/hq/hq-store.ts +9 -3
  129. package/src/hq/kinds/index.ts +2 -1
  130. package/src/hq/kinds/kind.ts +9 -4
  131. package/src/hq/kinds/presence-rule.ts +56 -0
  132. package/src/hq/kinds/presence.ts +210 -0
  133. package/src/hq/kinds/report.ts +8 -5
  134. package/src/hq/lead-order.ts +68 -0
  135. package/src/hq/outbox.ts +7 -0
  136. package/src/hq/replica.ts +5 -7
  137. package/src/hq/report-facts.ts +14 -7
  138. package/src/hq/report.ts +47 -2
  139. package/src/hq/switch.ts +1 -0
  140. package/src/hq/terminal-hop.ts +64 -0
  141. package/src/hq/thread-sync.ts +13 -6
  142. package/src/http/door-forward.ts +10 -12
  143. package/src/http/door-names.ts +9 -0
  144. package/src/http/hop-caller.ts +23 -0
  145. package/src/http/hop-names.ts +14 -0
  146. package/src/http/loopback-serve.ts +28 -6
  147. package/src/http/owner-word.ts +128 -0
  148. package/src/http/same-origin.ts +12 -0
  149. package/src/{serve โ†’ http}/secret-gate.ts +3 -3
  150. package/src/ledger/run-log.ts +25 -1
  151. package/src/media-store/backup/sources.ts +53 -6
  152. package/src/media-store/backup/thread-copy.ts +9 -5
  153. package/src/media-store/copy/config.ts +10 -9
  154. package/src/media-store/daemon.ts +5 -2
  155. package/src/media-store/put.ts +3 -0
  156. package/src/media-store/space.ts +14 -16
  157. package/src/media-store/upload.ts +4 -0
  158. package/src/messages/collection.ts +2 -2
  159. package/src/messages/model.ts +6 -1
  160. package/src/messages/routes.ts +3 -0
  161. package/src/orchestrator/brief.md +8 -6
  162. package/src/orchestrator/channel-declare.ts +58 -0
  163. package/src/orchestrator/channel.ts +226 -0
  164. package/src/orchestrator/guards.ts +12 -3
  165. package/src/orchestrator/host.ts +35 -0
  166. package/src/orchestrator/lead-shape.ts +86 -0
  167. package/src/orchestrator/now.ts +88 -0
  168. package/src/orchestrator/phone.ts +4 -1
  169. package/src/orchestrator/places-file.ts +38 -0
  170. package/src/orchestrator/places-look.ts +180 -0
  171. package/src/orchestrator/places-shape.ts +151 -0
  172. package/src/orchestrator/places.ts +50 -0
  173. package/src/orchestrator/presence-shape.ts +13 -2
  174. package/src/orchestrator/presence.ts +26 -15
  175. package/src/orchestrator/push.ts +5 -10
  176. package/src/orchestrator/role-shape.ts +270 -0
  177. package/src/orchestrator/role.ts +242 -0
  178. package/src/orchestrator/routes.ts +136 -31
  179. package/src/orchestrator/sessions-shape.ts +78 -0
  180. package/src/orchestrator/sessions.ts +86 -0
  181. package/src/orchestrator/share.ts +71 -0
  182. package/src/orchestrator/start-notice.ts +61 -0
  183. package/src/orchestrator/start.ts +137 -0
  184. package/src/orchestrator/started.ts +55 -0
  185. package/src/orchestrator/stuck.ts +196 -0
  186. package/src/orchestrator/unheard.ts +18 -7
  187. package/src/pages/frame-client.ts +44 -6
  188. package/src/problems/failure-words.ts +80 -0
  189. package/src/release/run-bump.ts +26 -5
  190. package/src/release/run-release.ts +34 -14
  191. package/src/repo-config.ts +37 -9
  192. package/src/review/aside-at.ts +19 -0
  193. package/src/review/band.ts +3 -3
  194. package/src/review/doc-save.ts +1 -1
  195. package/src/review/inbox-hook.ts +12 -4
  196. package/src/review/inbox-read.ts +20 -7
  197. package/src/review/instruction-guards.ts +137 -0
  198. package/src/review/instructions.ts +14 -2
  199. package/src/review/item-db.ts +52 -2
  200. package/src/review/mentions.ts +6 -4
  201. package/src/review/model.ts +3 -2
  202. package/src/review/parties.ts +88 -19
  203. package/src/review/push.ts +32 -15
  204. package/src/review/routes.ts +12 -4
  205. package/src/review/secret-route.ts +5 -5
  206. package/src/review/snooze.ts +1 -16
  207. package/src/review/store-parties.ts +4 -2
  208. package/src/review/take-back.ts +2 -1
  209. package/src/review/threads.ts +13 -2
  210. package/src/review/unit.ts +3 -2
  211. package/src/review/view-layout.ts +8 -1
  212. package/src/review/watchers.ts +25 -4
  213. package/src/secrets/key-pair.ts +14 -0
  214. package/src/secrets/lapse.ts +3 -3
  215. package/src/secrets/manager.ts +5 -1
  216. package/src/secrets/name-template.ts +83 -0
  217. package/src/secrets/name.ts +3 -0
  218. package/src/secrets/read.ts +10 -6
  219. package/src/secrets/secrets-view.ts +299 -0
  220. package/src/secrets/who-reads.ts +2 -1
  221. package/src/serve/frame-part.ts +49 -0
  222. package/src/serve/hub-app/accounts-line.tsx +33 -45
  223. package/src/serve/hub-app/activity-st.ts +6 -5
  224. package/src/serve/hub-app/activity-view.tsx +10 -9
  225. package/src/serve/hub-app/advice-box.tsx +6 -5
  226. package/src/serve/hub-app/advisor-app.tsx +2 -0
  227. package/src/serve/hub-app/advisor-face.tsx +3 -2
  228. package/src/serve/hub-app/advisor.html +1 -0
  229. package/src/serve/hub-app/advisors-view.tsx +52 -10
  230. package/src/serve/hub-app/advisors.css +4 -0
  231. package/src/serve/hub-app/app-bridge.ts +31 -5
  232. package/src/serve/hub-app/asked-page.ts +24 -0
  233. package/src/serve/hub-app/asks-page.tsx +10 -6
  234. package/src/serve/hub-app/auto-text.tsx +7 -5
  235. package/src/serve/hub-app/card-head.tsx +3 -2
  236. package/src/serve/hub-app/check-view.tsx +10 -9
  237. package/src/serve/hub-app/checks-svc.ts +96 -32
  238. package/src/serve/hub-app/clock-svc.ts +24 -8
  239. package/src/serve/hub-app/code-copy.ts +1 -1
  240. package/src/serve/hub-app/col-card.tsx +2 -1
  241. package/src/serve/hub-app/col-list-page.tsx +12 -6
  242. package/src/serve/hub-app/col-list-st.ts +12 -2
  243. package/src/serve/hub-app/col-tables-view.tsx +8 -44
  244. package/src/serve/hub-app/col-tables.ts +0 -14
  245. package/src/serve/hub-app/cols-svc.ts +6 -12
  246. package/src/serve/hub-app/columns.ts +94 -0
  247. package/src/serve/hub-app/comfy-view.tsx +8 -7
  248. package/src/serve/hub-app/commands/commands-page.tsx +4 -3
  249. package/src/serve/hub-app/commands/commands-st.ts +2 -2
  250. package/src/serve/hub-app/controls.css +69 -23
  251. package/src/serve/hub-app/cycle-button.tsx +2 -1
  252. package/src/serve/hub-app/database-st.ts +1 -1
  253. package/src/serve/hub-app/database-view.tsx +4 -2
  254. package/src/serve/hub-app/deaf.tsx +27 -0
  255. package/src/serve/hub-app/dock-st.ts +21 -16
  256. package/src/serve/hub-app/dock-view.tsx +19 -12
  257. package/src/serve/hub-app/empty-section.tsx +30 -0
  258. package/src/serve/hub-app/entry-bar.css +1 -1
  259. package/src/serve/hub-app/entry-bar.tsx +11 -6
  260. package/src/serve/hub-app/entry-list.css +32 -0
  261. package/src/serve/hub-app/entry-list.tsx +123 -0
  262. package/src/serve/hub-app/entry-pick.ts +1 -1
  263. package/src/serve/hub-app/entry-sections.ts +140 -0
  264. package/src/serve/hub-app/event-stream-reader.ts +56 -0
  265. package/src/serve/hub-app/floating.tsx +68 -14
  266. package/src/serve/hub-app/geometry-view.tsx +3 -2
  267. package/src/serve/hub-app/git-view.tsx +3 -2
  268. package/src/serve/hub-app/hash-route.ts +14 -2
  269. package/src/serve/hub-app/header-bar.tsx +53 -36
  270. package/src/serve/hub-app/home-st.ts +131 -14
  271. package/src/serve/hub-app/home-strip.css +24 -13
  272. package/src/serve/hub-app/home-strip.tsx +131 -66
  273. package/src/serve/hub-app/home.html +5 -0
  274. package/src/serve/hub-app/hub-app.tsx +94 -102
  275. package/src/serve/hub-app/hub.css +61 -94
  276. package/src/serve/hub-app/icons.tsx +16 -0
  277. package/src/serve/hub-app/identities-st.ts +19 -54
  278. package/src/serve/hub-app/identities-view.tsx +25 -24
  279. package/src/serve/hub-app/identity-address.ts +2 -2
  280. package/src/serve/hub-app/in-sight.ts +10 -0
  281. package/src/serve/hub-app/inbox-st.ts +20 -2
  282. package/src/serve/hub-app/inbox-view.tsx +16 -9
  283. package/src/serve/hub-app/inbox.css +1 -0
  284. package/src/serve/hub-app/index.html +5 -0
  285. package/src/serve/hub-app/insights-view.tsx +6 -5
  286. package/src/serve/hub-app/instructions.css +4 -1
  287. package/src/serve/hub-app/kept-cols.tsx +83 -20
  288. package/src/serve/hub-app/kept-width.tsx +76 -0
  289. package/src/serve/hub-app/keys.ts +116 -38
  290. package/src/serve/hub-app/layout-st.ts +109 -99
  291. package/src/serve/hub-app/lightbox-zoom.css +36 -0
  292. package/src/serve/hub-app/list-filter.tsx +15 -6
  293. package/src/serve/hub-app/list-head.tsx +29 -0
  294. package/src/serve/hub-app/list-row.ts +8 -0
  295. package/src/serve/hub-app/list-walk.ts +26 -105
  296. package/src/serve/hub-app/live-socket.ts +274 -0
  297. package/src/serve/hub-app/live-sources.ts +189 -0
  298. package/src/serve/hub-app/live-svc.ts +2 -2
  299. package/src/serve/hub-app/machine-st.ts +75 -14
  300. package/src/serve/hub-app/main-panel.css +211 -0
  301. package/src/serve/hub-app/main-panel.tsx +259 -0
  302. package/src/serve/hub-app/md.ts +4 -4
  303. package/src/serve/hub-app/media-svc.ts +5 -5
  304. package/src/serve/hub-app/media-view.tsx +13 -12
  305. package/src/serve/hub-app/messages/messages-page.tsx +8 -7
  306. package/src/serve/hub-app/messages/messages-st.ts +5 -2
  307. package/src/serve/hub-app/new-thread-st.ts +170 -0
  308. package/src/serve/hub-app/new-thread.tsx +133 -107
  309. package/src/serve/hub-app/orchestrator-line.tsx +115 -45
  310. package/src/serve/hub-app/orchestrator-places.tsx +86 -0
  311. package/src/serve/hub-app/orchestrator.css +57 -5
  312. package/src/serve/hub-app/page-keys.ts +107 -68
  313. package/src/serve/hub-app/page-reload.ts +46 -6
  314. package/src/serve/hub-app/pages-frames.tsx +40 -3
  315. package/src/serve/hub-app/pages-svc.ts +3 -1
  316. package/src/serve/hub-app/palette-st.ts +198 -43
  317. package/src/serve/hub-app/palette-view.tsx +32 -8
  318. package/src/serve/hub-app/panel-head-action.tsx +39 -0
  319. package/src/serve/hub-app/panel-head.tsx +70 -0
  320. package/src/serve/hub-app/panel-repo.ts +42 -0
  321. package/src/serve/hub-app/panel-source.ts +195 -0
  322. package/src/serve/hub-app/panel-tint.css +6 -0
  323. package/src/serve/hub-app/panel-tint.ts +23 -0
  324. package/src/serve/hub-app/panel-walk.ts +107 -0
  325. package/src/serve/hub-app/pill-row.tsx +2 -1
  326. package/src/serve/hub-app/place-path.ts +4 -0
  327. package/src/serve/hub-app/places-svc.ts +75 -0
  328. package/src/serve/hub-app/plan-view.tsx +3 -2
  329. package/src/serve/hub-app/polled.ts +11 -1
  330. package/src/serve/hub-app/presence-st.ts +66 -32
  331. package/src/serve/hub-app/processes-view.tsx +2 -2
  332. package/src/serve/hub-app/project-bar.tsx +116 -0
  333. package/src/serve/hub-app/project-list.css +20 -173
  334. package/src/serve/hub-app/project-list.tsx +30 -298
  335. package/src/serve/hub-app/projects-svc.ts +59 -32
  336. package/src/serve/hub-app/push-sign.tsx +2 -1
  337. package/src/serve/hub-app/push-svc.ts +86 -69
  338. package/src/serve/hub-app/quiet-st.ts +5 -3
  339. package/src/serve/hub-app/rail-groups.ts +144 -0
  340. package/src/serve/hub-app/reader-chips.tsx +2 -1
  341. package/src/serve/hub-app/recordings-st.ts +2 -1
  342. package/src/serve/hub-app/recordings-view.tsx +19 -47
  343. package/src/serve/hub-app/recordings.css +0 -2
  344. package/src/serve/hub-app/reflections-page.tsx +10 -6
  345. package/src/serve/hub-app/releases/releases-page.tsx +6 -5
  346. package/src/serve/hub-app/repo-sections.ts +127 -38
  347. package/src/serve/hub-app/repo-st.ts +57 -36
  348. package/src/serve/hub-app/review/advisor-bar.tsx +3 -2
  349. package/src/serve/hub-app/review/ask-proof.tsx +79 -0
  350. package/src/serve/hub-app/review/attach-view.tsx +11 -10
  351. package/src/serve/hub-app/review/box-view.ts +479 -0
  352. package/src/serve/hub-app/review/box-zoom.tsx +70 -0
  353. package/src/serve/hub-app/review/diff-view.tsx +3 -2
  354. package/src/serve/hub-app/review/doc-body.tsx +2 -1
  355. package/src/serve/hub-app/review/dock.tsx +3 -2
  356. package/src/serve/hub-app/review/draft-body.tsx +4 -3
  357. package/src/serve/hub-app/review/faces.tsx +0 -8
  358. package/src/serve/hub-app/review/group-block.tsx +8 -7
  359. package/src/serve/hub-app/review/heard-line.tsx +4 -3
  360. package/src/serve/hub-app/review/instructions-view.tsx +3 -2
  361. package/src/serve/hub-app/review/item-verdict.tsx +40 -40
  362. package/src/serve/hub-app/review/kind-states.tsx +5 -4
  363. package/src/serve/hub-app/review/kit.tsx +24 -4
  364. package/src/serve/hub-app/review/lane-bar.tsx +30 -28
  365. package/src/serve/hub-app/review/lightbox.tsx +6 -4
  366. package/src/serve/hub-app/review/live-bar.tsx +7 -6
  367. package/src/serve/hub-app/review/live-view.tsx +6 -5
  368. package/src/serve/hub-app/review/object-card.tsx +2 -1
  369. package/src/serve/hub-app/review/object-panel.tsx +11 -10
  370. package/src/serve/hub-app/review/pano-view.tsx +3 -2
  371. package/src/serve/hub-app/review/question-views.tsx +6 -5
  372. package/src/serve/hub-app/review/review-cells.tsx +21 -20
  373. package/src/serve/hub-app/review/review-host.ts +3 -0
  374. package/src/serve/hub-app/review/review-kit.ts +7 -5
  375. package/src/serve/hub-app/review/review-list.tsx +98 -52
  376. package/src/serve/hub-app/review/review-page.tsx +3 -3
  377. package/src/serve/hub-app/review/review-st.ts +70 -14
  378. package/src/serve/hub-app/review/review-thread.tsx +234 -138
  379. package/src/serve/hub-app/review/review-views.tsx +166 -191
  380. package/src/serve/hub-app/review/space3d.tsx +17 -9
  381. package/src/serve/hub-app/review/thread-close.tsx +24 -32
  382. package/src/serve/hub-app/review/thread-st.ts +39 -25
  383. package/src/serve/hub-app/review/trailer-body.tsx +5 -4
  384. package/src/serve/hub-app/review/trailer-page.tsx +18 -16
  385. package/src/serve/hub-app/review/trailer-st.ts +3 -2
  386. package/src/serve/hub-app/review/trailer-timeline.tsx +10 -9
  387. package/src/serve/hub-app/review/trailer-voices.tsx +29 -28
  388. package/src/serve/hub-app/review.css +159 -42
  389. package/src/serve/hub-app/row-acts.tsx +126 -0
  390. package/src/serve/hub-app/row-face.tsx +29 -0
  391. package/src/serve/hub-app/running-rows.tsx +142 -0
  392. package/src/serve/hub-app/running-st.ts +110 -0
  393. package/src/serve/hub-app/search-view.tsx +3 -2
  394. package/src/serve/hub-app/secrets-page.tsx +290 -0
  395. package/src/serve/hub-app/secrets-st.ts +181 -0
  396. package/src/serve/hub-app/secrets.css +65 -0
  397. package/src/serve/hub-app/section-head.tsx +3 -2
  398. package/src/serve/hub-app/session-chips.tsx +55 -0
  399. package/src/serve/hub-app/shell.ts +56 -0
  400. package/src/serve/hub-app/site/site-part.tsx +6 -5
  401. package/src/serve/hub-app/site/site-st.ts +0 -6
  402. package/src/serve/hub-app/site.css +0 -1
  403. package/src/serve/hub-app/social/calendar.tsx +7 -6
  404. package/src/serve/hub-app/social/comms-page.tsx +29 -26
  405. package/src/serve/hub-app/social/group-editor.tsx +2 -1
  406. package/src/serve/hub-app/social/kit.tsx +12 -11
  407. package/src/serve/hub-app/social/next-release.tsx +3 -2
  408. package/src/serve/hub-app/social/post-card.tsx +21 -20
  409. package/src/serve/hub-app/social/post-page.tsx +2 -1
  410. package/src/serve/hub-app/social/problems.tsx +3 -2
  411. package/src/serve/hub-app/social/social-page.tsx +29 -27
  412. package/src/serve/hub-app/social/social-st.ts +4 -2
  413. package/src/serve/hub-app/social/stage-popup.tsx +11 -10
  414. package/src/serve/hub-app/social.css +7 -5
  415. package/src/serve/hub-app/source-acts.ts +79 -0
  416. package/src/serve/hub-app/source-page.tsx +17 -0
  417. package/src/serve/hub-app/space-view.tsx +5 -4
  418. package/src/serve/hub-app/stores/stores-page.tsx +21 -19
  419. package/src/serve/hub-app/stores/stores-st.ts +1 -1
  420. package/src/serve/hub-app/stores.css +1 -1
  421. package/src/serve/hub-app/terminal-history-st.ts +112 -0
  422. package/src/serve/hub-app/terminal-keys.ts +79 -0
  423. package/src/serve/hub-app/terminal-lib.ts +110 -0
  424. package/src/serve/hub-app/terminal-links.ts +55 -0
  425. package/src/serve/hub-app/terminal-list-st.ts +304 -0
  426. package/src/serve/hub-app/terminal-log-st.ts +242 -0
  427. package/src/serve/hub-app/terminal-out.ts +135 -0
  428. package/src/serve/hub-app/terminal-pages.tsx +115 -0
  429. package/src/serve/hub-app/terminal-panel.tsx +60 -9
  430. package/src/serve/hub-app/terminal-sources.tsx +335 -0
  431. package/src/serve/hub-app/terminal-st.ts +447 -167
  432. package/src/serve/hub-app/terminal-stream.ts +233 -0
  433. package/src/serve/hub-app/terminal-tab.tsx +64 -0
  434. package/src/serve/hub-app/terminal-widths.ts +30 -0
  435. package/src/serve/hub-app/terminal.css +50 -4
  436. package/src/serve/hub-app/test-view.tsx +5 -3
  437. package/src/serve/hub-app/tests-view.tsx +16 -15
  438. package/src/serve/hub-app/theme-st.ts +5 -0
  439. package/src/serve/hub-app/thread-row.tsx +39 -31
  440. package/src/serve/hub-app/time-ago.tsx +3 -2
  441. package/src/serve/hub-app/time-view.tsx +2 -1
  442. package/src/serve/hub-app/time.css +1 -1
  443. package/src/serve/hub-app/timeline-chart.tsx +5 -4
  444. package/src/serve/hub-app/timeline-view.tsx +10 -9
  445. package/src/serve/hub-app/tips.ts +247 -0
  446. package/src/serve/hub-app/tree-build.ts +40 -8
  447. package/src/serve/hub-app/tree-svc.ts +167 -134
  448. package/src/serve/hub-app/unit-icons.ts +26 -0
  449. package/src/serve/hub-app/url-address.ts +154 -0
  450. package/src/serve/hub-app/url-faces.ts +88 -0
  451. package/src/serve/hub-app/url-forms.tsx +183 -0
  452. package/src/serve/hub-app/urls-svc.ts +167 -5
  453. package/src/serve/hub-app/urls-view.tsx +56 -20
  454. package/src/serve/hub-app/urls.css +26 -0
  455. package/src/serve/hub-app/vault-view.tsx +5 -4
  456. package/src/serve/hub-app/veille/veille-page.tsx +34 -33
  457. package/src/serve/hub-app/veille/veille-st.ts +6 -3
  458. package/src/serve/hub-app/view-layout.css +3 -3
  459. package/src/serve/hub-app/when-view.tsx +5 -4
  460. package/src/serve/hub-app/wikis-view.tsx +6 -5
  461. package/src/serve/hub-app/words.tsx +9 -2
  462. package/src/serve/hub-runtime.ts +3 -2
  463. package/src/serve/orchestrator-host.ts +58 -0
  464. package/src/serve/page-live.ts +147 -0
  465. package/src/serve/project-gutter-route.ts +63 -2
  466. package/src/serve/read-worker.ts +7 -2
  467. package/src/serve/runs-stamp.ts +33 -0
  468. package/src/serve/secrets-read.ts +156 -0
  469. package/src/serve/serve-hub.ts +71 -22
  470. package/src/serve/terminal-claudes.ts +185 -0
  471. package/src/serve/terminal-guard.ts +10 -5
  472. package/src/serve/terminal-host.ts +517 -0
  473. package/src/serve/terminal-record.ts +104 -0
  474. package/src/serve/terminal-route.ts +466 -103
  475. package/src/serve/terminal-shells.ts +3 -0
  476. package/src/serve/terminal-watch.ts +102 -0
  477. package/src/shipkit-files.ts +9 -4
  478. package/src/shot/client.ts +4 -9
  479. package/src/shot/shooter.ts +2 -4
  480. package/src/shot/shot-ask.ts +2 -7
  481. package/src/shot/shot-theme.ts +6 -17
  482. package/src/social/routes.ts +2 -2
  483. package/src/social/writes.ts +3 -0
  484. package/src/suite/test-units.ts +6 -2
  485. package/src/trailer/sound/eleven.ts +1 -0
  486. package/src/urls/added.ts +111 -0
  487. package/src/urls/icons.ts +294 -0
  488. package/src/urls/places.ts +139 -0
  489. package/src/urls/routes.ts +17 -7
  490. package/src/urls/rows.ts +48 -15
  491. package/src/urls/unit.ts +57 -3
  492. package/src/urls/write-routes.ts +207 -0
  493. package/src/vault/vault-destroy.ts +2 -1
  494. package/src/vault/vault-import.ts +4 -11
  495. package/src/vault/vault-restore.ts +3 -2
  496. package/src/veille/chrome.ts +18 -3
  497. package/src/veille/identity.ts +6 -0
  498. package/src/view3d/cam.ts +30 -46
  499. package/src/view3d/lib.ts +20 -2
  500. package/src/view3d/viewer.ts +62 -88
  501. package/src/wiki/agent-paths.ts +2 -1
  502. package/src/orchestrator/deliver.ts +0 -81
  503. package/src/orchestrator/drill.ts +0 -129
  504. package/src/orchestrator/keeper.ts +0 -332
  505. package/src/orchestrator/pm.ts +0 -20
  506. package/src/orchestrator/state.ts +0 -92
  507. package/src/orchestrator/switch.ts +0 -86
  508. package/src/orchestrator/tmux.ts +0 -82
  509. package/src/serve/hub-app/rail-fly.tsx +0 -95
  510. package/src/serve/hub-app/side-lists.ts +0 -72
  511. package/src/serve/hub-app/sidebar.tsx +0 -62
  512. package/src/serve/hub-app/tree-row.tsx +0 -125
@@ -0,0 +1,259 @@
1
+ // THE MAIN PANEL, one in every hub window, a labelled list top to bottom: its head (panel-head.tsx: the project's band,
2
+ // the identity it speaks as), then its sections (rail-groups.ts PANEL_SECTIONS): the project's entries, the terminals, the Claude Code
3
+ // sessions and the urls (each from its source, panel-source.ts), the release, speak and library entries, the
4
+ // processes (from their source) just above the tools, the global entries (the home's pages), then at its foot the Claude Code accounts. Each
5
+ // section draws under one head that folds (remembered, its โŒ˜โ‡ง key on it), a folded one its entries as small icons; a
6
+ // source's rows of two groups or more (the urls by env) draw under a dim caption each, folded one line a group.
7
+ // Every line opens its page in place, or in a new tab on a โŒ˜ click, a middle click or its own button. The line lit is
8
+ // the one whose page shows: the panel's one selection, which โŒ˜โ†‘ โŒ˜โ†“ move (columns.ts). No line holds a cursor or the
9
+ // keyboard focus beside it. The project is
10
+ // the window's (a project's app, `?shell=project`), else the repo last shown. Right of it one list at most
11
+ // (entry-list.tsx), then the page: three columns, never four. A project's app wears the panel tint (panel-tint.ts)
12
+ import { observer } from 'mobx-react-lite'
13
+ import { useCallback, useEffect, type ReactNode } from 'react'
14
+ import { PANEL_TINT, panelTintOf } from './panel-tint.ts'
15
+ import { AccountsLine } from './accounts-line.tsx'
16
+ import type { HomeSt } from './home-st.ts'
17
+ import { Icon, ICON } from './icons.tsx'
18
+ import { useInSight } from './in-sight.ts'
19
+ import { CLAUDE_KEY, ENTRY_KEY, FIND_KEY, nthKey, pageKeyLabel, PICKER_KEY, PLACE_KEY, ROW_ACTS_KEY, SECTION_KEY, sectionKeyLabel, TERMINAL_ENTRY_KEY } from './keys.ts'
20
+ import { PLACES, type HouseEntry } from './projects-svc.ts'
21
+ import { houseHref, openTab, panelRepo, repoHref } from './panel-repo.ts'
22
+ import { panelHouse } from './panel-walk.ts'
23
+ import { PanelHead } from './panel-head.tsx'
24
+ import { HeadAction } from './panel-head-action.tsx'
25
+ import { drawnGroups, sourceKey, sourceOf, type PanelSource, type RowTab, type SourceSection } from './panel-source.ts'
26
+ import { PANEL_SECTIONS, type PanelSection } from './rail-groups.ts'
27
+ import { RowFace } from './row-face.tsx'
28
+ import { sectionSel } from './repo-sections.ts'
29
+ import { Tip, useFlyout } from './floating.tsx'
30
+ import { RowActsBody, rowActs } from './row-acts.tsx'
31
+ import type { RepoSt } from './repo-st.ts'
32
+ import { SectionHead } from './section-head.tsx'
33
+ import type { TreeRow } from './tree-build.ts'
34
+ import { tip } from './tips.ts'
35
+
36
+ /** a row's acts in place of its tip (row-acts.tsx): the trigger's ref and props, what floats while open; `more`, the
37
+ * click of its ยซ โ‹ฏ ยป where its source draws one */
38
+ type Acts = { ref: (el: Element | null) => void; props: (p?: Record<string, unknown>) => Record<string, unknown>; float: ReactNode; more?: () => void }
39
+
40
+ type LineProps = { k: string; icon: ReactNode; label: string; title: string; lit: boolean; dim?: boolean; count?: ReactNode; hint?: string; keyLabel?: string | null; cmd?: string | null; keyWords?: string | null; compact?: boolean; href?: string | null; tab?: TabWords | undefined; acts?: Acts; onClick: () => void }
41
+
42
+ /** what a new tab says of itself when it is no page of the hub: its name, and a url's login chips */
43
+ type TabWords = Pick<RowTab, 'name' | 'chips'>
44
+
45
+ /** a click on a line: in place, or with โŒ˜ (โŒƒ off a Mac) in a new tab; a middle click a new tab too. `href`: what a new
46
+ * tab opens; `tab`: its name and chips when it is no page of the hub */
47
+ const clicks = (href: string | null | undefined, onClick: () => void, tab?: TabWords) => ({
48
+ onClick: (e: { metaKey: boolean; ctrlKey: boolean }) => (href != null && (e.metaKey || e.ctrlKey) ? openTab(href, tab?.name, tab?.chips) : onClick()),
49
+ onAuxClick: (e: { button: number; preventDefault(): void }) => {
50
+ if (href == null || e.button !== 1) return
51
+ e.preventDefault()
52
+ openTab(href, tab?.name, tab?.chips)
53
+ },
54
+ })
55
+
56
+ /** both keys of a line in words: its โŒ˜ key, its โŒฅ letter */
57
+ const keysOf = (cmd: string | null | undefined, alt: string | null | undefined): string | null => [cmd, alt].filter((x) => x != null).join(' or ') || null
58
+
59
+ /** a line of the panel: its icon, its name, its count, its โŒ˜ key at its right, its โŒฅ letter in its place while โŒฅ is
60
+ * held, lit while its page shows. `compact`: a folded section's small icon, its name and keys on hover at once, its
61
+ * count a pill on its corner */
62
+ const Line = ({ k, icon, label, title, lit, dim = false, count, hint, keyLabel, cmd, keyWords = keysOf(cmd, keyLabel), compact = false, href, tab, acts, onClick }: LineProps) => {
63
+ const el = useInSight<HTMLButtonElement>(lit)
64
+ const to = acts?.ref
65
+ const ref = useCallback((n: HTMLButtonElement | null) => {
66
+ el.current = n
67
+ to?.(n)
68
+ }, [el, to])
69
+ // its acts float in place of its tip, its words at their head
70
+ if (acts != null)
71
+ return (
72
+ <div className={compact ? 'mpicell' : 'mprow'}>
73
+ <button ref={ref} type="button" data-key={k} className={compact ? `mpicon${lit ? ' cur' : ''}${dim ? ' empty' : ''}` : `mpline${lit ? ' cur' : ''}${dim ? ' empty' : ''}`} aria-current={lit ? 'page' : undefined}
74
+ {...(compact ? { 'aria-label': label } : {})} {...acts.props(clicks(href, onClick, tab))}>
75
+ {icon}
76
+ {compact ? null : <span className="mpname">{label}</span>}
77
+ {compact || hint == null || hint === '' ? null : <span className="mphint">{hint}</span>}
78
+ {count}
79
+ {compact || cmd == null ? null : <kbd className="mpcmd">{cmd}</kbd>}
80
+ </button>
81
+ {compact || href == null ? null : (
82
+ <a className={`mpnew${acts.more == null ? '' : ' bymore'}`} href={href} target="_blank" rel="noreferrer" {...tip(`open ${label} in a new tab`, null, 'right')} aria-label={`${label} in a new tab`}
83
+ onClick={(e) => { e.preventDefault(); openTab(href, tab?.name, tab?.chips) }}><Icon d={ICON.newtab} /></a>
84
+ )}
85
+ {compact || acts.more == null ? null : (
86
+ <button type="button" className="mpmore" aria-label={`${label}: its acts`} aria-haspopup="menu" {...tip('what it can do', ROW_ACTS_KEY, 'right')} onClick={acts.more}>โ‹ฏ</button>
87
+ )}
88
+ {acts.float}
89
+ </div>
90
+ )
91
+ if (compact)
92
+ return (
93
+ <Tip className="mpicell" placement="right" instant content={<><b>{label}</b>{keyWords == null ? null : <kbd className="pjkey">{keyWords}</kbd>}<div className="pbtip">{title}</div></>}>
94
+ <button ref={el} type="button" data-key={k} className={`mpicon${lit ? ' cur' : ''}${dim ? ' empty' : ''}`} aria-current={lit ? 'page' : undefined} aria-label={label} {...clicks(href, onClick, tab)}>
95
+ {icon}
96
+ {count}
97
+ </button>
98
+ </Tip>
99
+ )
100
+ return (
101
+ <div className="mprow">
102
+ <button ref={el} type="button" data-key={k} className={`mpline${lit ? ' cur' : ''}${dim ? ' empty' : ''}`} aria-current={lit ? 'page' : undefined}
103
+ {...tip(title, keyWords, 'right')} {...clicks(href, onClick, tab)}>
104
+ {icon}
105
+ <span className="mpname">{label}</span>
106
+ {hint == null || hint === '' ? null : <span className="mphint">{hint}</span>}
107
+ {count}
108
+ {cmd == null ? null : <kbd className="mpcmd">{cmd}</kbd>}
109
+ {keyLabel == null ? null : <kbd className="pjkey">{keyLabel}</kbd>}
110
+ </button>
111
+ {href == null ? null : (
112
+ <a className="mpnew" href={href} target="_blank" rel="noreferrer" {...tip(`open ${label} in a new tab`, null, 'right')} aria-label={`${label} in a new tab`}
113
+ onClick={(e) => { e.preventDefault(); openTab(href, tab?.name, tab?.chips) }}><Icon d={ICON.newtab} /></a>
114
+ )}
115
+ </div>
116
+ )
117
+ }
118
+
119
+ /** a project's entry: a section, a group of sections, a page of the project's own */
120
+ const EntryLine = observer(({ app, row, compact }: { app: RepoSt; row: TreeRow; compact: boolean }) => {
121
+ const t = app.tree
122
+ if (row.proj != null) {
123
+ const id = row.proj
124
+ const p = app.pages.find(id)
125
+ const b = app.pages.badge(id)
126
+ return (
127
+ <Line compact={compact} href={repoHref(app.home, app, { t: 'page', repo: app.name, id })} k={row.key} label={row.label} title={`${app.pages.title(id)}${b?.title ? `: ${b.title}` : ''}`} lit={app.isShown && app.sel?.t === 'page' && app.sel.id === id}
128
+ icon={p == null ? <span className="mpno" /> : <Icon d={p.icon} />} keyLabel={p == null ? null : pageKeyLabel(p.key)}
129
+ count={b == null || b.count === 0 ? null : <b className={`rsecn n${b.tone ?? 'warn'}`}>{b.count}</b>} onClick={() => t.click(row)} />
130
+ )
131
+ }
132
+ const id = row.group ?? row.section!
133
+ const e = t.rail.find((x) => x.id === id)
134
+ // a new tab lands on the part a click would open
135
+ const part = e == null ? null : (e.parts.find((p) => !p.empty) ?? e.parts[0] ?? null)
136
+ return (
137
+ <Line compact={compact} href={part == null ? null : repoHref(app.home, app, sectionSel(app, part.id))} k={row.key} label={e?.label ?? row.label} title={e?.lack?.none ?? e?.title ?? row.label} lit={e?.on === true} dim={e?.empty === true}
138
+ icon={<Icon d={ICON[id]} />} keyLabel={e == null ? null : sectionKeyLabel(e.keyOf)} cmd={id in ENTRY_KEY ? ENTRY_KEY[id as keyof typeof ENTRY_KEY] : null}
139
+ count={e?.count == null ? null : <b className={`rsecn n${e.tone}${e.quiet === true ? ' quiet' : ''}`}>{e.count}</b>} onClick={() => t.click(row)} />
140
+ )
141
+ })
142
+
143
+ /** a global entry: a page of the home, the picker, the identities */
144
+ const HouseLine = observer(({ home, e, compact }: { home: HomeSt; e: HouseEntry; compact: boolean }) => {
145
+ const s = home.projects
146
+ const pl = e === 'identities' ? null : PLACES.find((x) => x.id === e)
147
+ const waiting = e === 'inbox' && s.waiting > 0 ? s.waiting : null
148
+ const k = e === 'picker' ? `${FIND_KEY} or ${PICKER_KEY}` : e === 'identities' ? null : (PLACE_KEY[e] ?? null)
149
+ return (
150
+ <Line compact={compact} href={houseHref(home, e)} k={`house:${e}`} label={pl?.label ?? 'identities'} title={pl?.title ?? 'each identity: its profile, its company, its accounts, the repos that speak as it'}
151
+ lit={s.houseLit(e)} icon={<Icon d={ICON[e === 'picker' ? 'search' : e === 'overview' ? 'home' : e]} />} cmd={e === 'picker' ? FIND_KEY : k} keyWords={k}
152
+ count={waiting == null ? null : <b className={`pjpill pgin${s.list.some((p) => p.unread.length > 0) ? ' hot' : ''}`} aria-label={`${waiting} thread${waiting === 1 ? '' : 's'} wait on you`}>{waiting}</b>} onClick={() => s.openHouse(e)} />
153
+ )
154
+ })
155
+
156
+ /** a row of a source's section: its dot, its name, its dim words, its key (the nth url or process, the first session,
157
+ * the first terminal). Folded (`compact`), a row with a state is ONE mark: its face inside a ring in the state's
158
+ * colour (row-face.tsx), a row whose state is its face and has no icon of its own a dot in that ring */
159
+ const SourceLine = observer(({ home, src, i, compact }: { home: HomeSt; src: PanelSource; i: number; compact: boolean }) => {
160
+ const row = src.rows[i]!
161
+ const k = sourceKey(src.section, row)
162
+ const s = rowActs(home)
163
+ const has = src.acts != null
164
+ const fly = useFlyout({ rest: true, stays: true, enabled: has, placement: 'right-start', held: { open: has && s.open === k, set: (v, why) => (v ? s.show(k, false, why) : s.hide(k, why)), focus: s.byKey } })
165
+ const key = row.key ?? nthKey(src.section, i) ?? (i === 0 && src.section === 'claude' ? CLAUDE_KEY : i === 0 && src.section === 'terminals' ? TERMINAL_ENTRY_KEY : null)
166
+ const own = row.icon ?? (ICON as Record<string, string | undefined>)[src.section] ?? ICON.processes
167
+ // a row whose state is its face wears its own icon alone, never the section's
168
+ const mine = row.square === true ? (row.icon ?? null) : own
169
+ const icon = compact && row.state != null ? <RowFace row={row} icon={mine} ring={row.state} />
170
+ : row.square === true
171
+ ? <><i className={`mpsq ${row.state ?? 'off'}`} aria-hidden="true" />{row.image == null && row.plate == null && mine == null ? null : <RowFace row={row} icon={mine ?? ''} />}</>
172
+ : <>{row.state == null ? null : <i className={`mpdot ${row.state}`} aria-hidden="true" />}<RowFace row={row} icon={own} /></>
173
+ // what a new tab opens is the source's answer: a url's site alone, else the row's page
174
+ const tab = src.tab?.(row) ?? null
175
+ const keyWords = key ?? null
176
+ const acts = !has ? undefined : { ref: fly.ref, props: fly.props, float: fly.float('fpop rowacts', fly.open ? <RowActsBody home={home} src={src} row={row} keyWords={keyWords} /> : null, `${row.label}: its acts`), ...(src.more === true ? { more: () => s.show(k, true) } : {}) }
177
+ return <Line compact={compact} href={tab?.href ?? row.href} tab={tab ?? undefined} k={k} label={row.label} title={row.title ?? row.label} hint={row.hint} lit={row.lit} icon={icon} cmd={key} acts={acts} onClick={() => src.open(row)} />
178
+ })
179
+
180
+ /** a source's rows: bare, or under the captions of their groups (panel-source.ts drawnGroups); folded, one line a
181
+ * group, its caption, its rows' small icons on one line, its count */
182
+ const SourceRows = observer(({ home, src, compact }: { home: HomeSt; src: PanelSource; compact: boolean }) => {
183
+ const line = (i: number): ReactNode => <SourceLine key={src.rows[i]!.id} home={home} src={src} i={i} compact={compact} />
184
+ const groups = drawnGroups(src)
185
+ if (groups == null) return <>{src.rows.map((_, i) => line(i))}</>
186
+ return (
187
+ <>
188
+ {groups.map(({ group: g, at }) => (
189
+ <div key={g.id} className={compact ? 'mpsubline' : 'mpsubgroup'} role="group" aria-label={`${g.label}, ${at.length}`} data-group={g.id}>
190
+ <span className="mpsub" {...tip(g.title, null, 'right')}>{g.label}{compact ? null : <span className="mpsubn">{at.length}</span>}</span>
191
+ {compact ? <span className="mpsubicons">{at.map(line)}</span> : at.map(line)}
192
+ {compact ? <span className="mpsubn">{at.length}</span> : null}
193
+ </div>
194
+ ))}
195
+ </>
196
+ )
197
+ })
198
+
199
+ const SECTION_WORDS: Record<PanelSection, string> = { project: 'project', terminals: 'terminals', claude: 'claude', processes: 'processes', urls: 'urls', release: 'release', speak: 'speak', library: 'library', tools: 'tools', global: 'global', accounts: 'accounts' }
200
+
201
+ const SOURCED: ReadonlySet<PanelSection> = new Set<PanelSection>(['terminals', 'claude', 'processes', 'urls'])
202
+
203
+ /** a section of the panel: its head (the caret, its name, its number of entries), then its lines, or folded its small
204
+ * icons; the fold is remembered (ProjectsSvc.folds) */
205
+ const Section = observer(({ home, id, n, lines, actions, note, empty }: { home: HomeSt; id: PanelSection; n: number; lines: (compact: boolean) => ReactNode; actions?: PanelSource['actions']; note?: string; empty?: string }) => {
206
+ const s = home.projects
207
+ const open = !s.folds.has(id)
208
+ const label = SECTION_WORDS[id]
209
+ return (
210
+ <div className={`mpgroup${open ? '' : ' folded'}`} role="group" aria-label={label} data-section={id}>
211
+ <SectionHead label={label} n={n} open={open} aria-label={`${label}, ${n} entr${n === 1 ? 'y' : 'ies'}`} title={`a click ${open ? 'folds' : 'shows'} them (${SECTION_KEY[id]})`} onFold={() => s.toggleFold(id)}>
212
+ {(actions ?? []).map((a) => <HeadAction key={a.id} a={a} />)}
213
+ <kbd className="mpcmd">{SECTION_KEY[id]}</kbd>
214
+ </SectionHead>
215
+ {note != null && note !== '' ? <div className="mpnote" role="status">{note}</div> : null}
216
+ {open && n === 0 && empty != null ? <div className="mpempty">{empty}</div> : null}
217
+ {open ? lines(false) : n === 0 ? null : <div className="mpicons">{lines(true)}</div>}
218
+ </div>
219
+ )
220
+ })
221
+
222
+ export const MainPanel = observer(({ home }: { home: HomeSt }) => {
223
+ const s = home.projects
224
+ // the repos' answer: the profile, the window colour, the counts (the project bar starts it too, in the main app)
225
+ useEffect(() => s.start(), [s])
226
+ const r = panelRepo(home)
227
+ const tint = home.shell?.kind === 'project' ? panelTintOf(s.list.find((p) => p.name === home.shell!.repo)?.guiColor, home.theme.resolved) : undefined
228
+ const accounts = home.machine?.data?.accounts?.length ?? 0
229
+ const section = (id: PanelSection): ReactNode => {
230
+ if (id === 'accounts') return null
231
+ if (id === 'global') {
232
+ const global = panelHouse(home)
233
+ return global.length === 0 ? null : <Section key={id} home={home} id={id} n={global.length} lines={(c) => global.map((e) => <HouseLine key={e} home={home} e={e} compact={c} />)} />
234
+ }
235
+ if (SOURCED.has(id)) {
236
+ const src = sourceOf(home, id as SourceSection)
237
+ // a section with an act on its head shows with no row yet: its ยซ + ยป is how the first one is made
238
+ if (src == null || (src.rows.length === 0 && (src.actions?.length ?? 0) === 0)) return null
239
+ return <Section key={id} home={home} id={id} n={src.count ?? src.rows.length} actions={src.actions} note={src.note} empty={src.empty} lines={(c) => <SourceRows home={home} src={src} compact={c} />} />
240
+ }
241
+ if (r == null) return null
242
+ const rows = r.tree.rows.filter((row) => r.tree.sectionOf(row) === id)
243
+ return rows.length === 0 ? null : <Section key={id} home={home} id={id} n={rows.length} lines={(c) => rows.map((row) => <EntryLine key={row.key} app={r} row={row} compact={c} />)} />
244
+ }
245
+ return (
246
+ <nav className={`mpanel${tint == null ? '' : ` ${PANEL_TINT}`}`} style={tint} aria-label={r == null ? 'the house' : `${r.name}: its entries`}>
247
+ {s.error !== '' ? <div className="pgerr" {...tip(s.error)}>! {s.error}</div> : null}
248
+ <PanelHead home={home} />
249
+ <div className="mpscroll">
250
+ {PANEL_SECTIONS.map(section)}
251
+ </div>
252
+ {accounts === 0 || home.machine == null ? null : (
253
+ <div className="mpfoot">
254
+ <Section home={home} id="accounts" n={accounts} lines={(c) => <AccountsLine m={home.machine!} compact={c} />} />
255
+ </div>
256
+ )}
257
+ </nav>
258
+ )
259
+ })
@@ -90,10 +90,10 @@ export function rowHtml(parts: Part[], labeled = false): string {
90
90
  const ph = placeholdersOf(parts)
91
91
  const off = ph.length > 0
92
92
  const why = off ? esc(missingText(ph)) : ''
93
- const state = ` off" aria-disabled="true" title="${why}"`
93
+ const state = ` off" aria-disabled="true" data-tip="${why}"`
94
94
  return `<div class="mdcmd" data-parts="${esc(JSON.stringify(parts))}"><code class="mdline">${lineHtml(parts)}</code><span class="mdrowbtns">`
95
- + `<button type="button" class="mdterm${off ? state : `" title="${TYPE_TITLE}"`}>${PROMPT_ICON}${labeled ? '<span>type in terminal</span>' : ''}</button>`
96
- + `<button type="button" class="mdcopy1${off ? state : '" title="copy this command"'}>copy</button></span><span class="mdreason" hidden></span></div>`
95
+ + `<button type="button" class="mdterm${off ? state : `" data-tip="${TYPE_TITLE}"`}>${PROMPT_ICON}${labeled ? '<span>type in terminal</span>' : ''}</button>`
96
+ + `<button type="button" class="mdcopy1${off ? state : '" data-tip="copy this command"'}>copy</button></span><span class="mdreason" hidden></span></div>`
97
97
  }
98
98
 
99
99
  /** a shell block: one row a command (code-copy.ts answers its fields and buttons), a comment a dim row. No copy of the
@@ -105,7 +105,7 @@ function commandHtml(lang: string, text: string, inner: string): string | null {
105
105
  return `<div class="mdcmds">${b.rows.map((r) => (r.t === 'note' ? `<div class="mdcmd mdnote"><code class="mdline">${esc(r.text)}</code></div>` : rowHtml(r.parts))).join('')}</div>`
106
106
  }
107
107
 
108
- const plainBlock = (inner: string): string => `<div class="mdpre"><pre>${inner}</pre><div class="mdbtns"><button type="button" class="mdcopy" title="copy the whole block">copy</button></div></div>`
108
+ const plainBlock = (inner: string): string => `<div class="mdpre"><pre>${inner}</pre><div class="mdbtns"><button type="button" class="mdcopy" data-tip="copy the whole block">copy</button></div></div>`
109
109
 
110
110
  /** every code block in a box with its ยซ copy ยป button (code-copy.ts answers its click), a shell block as its commands:
111
111
  * added after the sanitizer, which keeps no button and no field, the buttons outside the block, so they stay put while
@@ -27,6 +27,8 @@ export const appliedWords = (n: number, failed: readonly string[]): string => (f
27
27
 
28
28
  export class MediaSvc {
29
29
  assets: SideAsset[] = []
30
+ /** a heartbeat listed the assets, or the atelier is not mounted: `assets` empty now means none */
31
+ listed = false
30
32
  pending: string[] = []
31
33
  generating = false
32
34
  genLine = ''
@@ -164,9 +166,7 @@ export class MediaSvc {
164
166
  get visibleAssets(): SideAsset[] {
165
167
  const f = this.st.filter
166
168
  const base = f === 'all' ? this.assets : this.assets.filter(f === 'red' ? this.redAsset : this.needsAsset)
167
- const q = this.st.query.trim().toLowerCase()
168
- if (q === '') return base
169
- return base.filter((a) => a.label.toLowerCase().includes(q) || a.id.toLowerCase().includes(q))
169
+ return base
170
170
  }
171
171
  get cur(): SideAsset | null {
172
172
  return this.assets.find((a) => a.id === this.curId) ?? null
@@ -186,7 +186,7 @@ export class MediaSvc {
186
186
  if (r.status === 404) {
187
187
  // the mount failed at boot โ€” it will not come back without a
188
188
  // restart; say so once, loudly, and stop wasting the wire
189
- runInAction(() => { this.dead = 'not mounted โ€” fix the kit, restart the serve task' })
189
+ runInAction(() => { this.dead = 'not mounted โ€” fix the kit, restart the serve task'; this.listed = true })
190
190
  if (this.hbTimer != null) clearInterval(this.hbTimer)
191
191
  return
192
192
  }
@@ -205,6 +205,7 @@ export class MediaSvc {
205
205
  }
206
206
  runInAction(() => {
207
207
  this.assets = s.assets
208
+ this.listed = true
208
209
  this.pending = s.pending ?? []
209
210
  this.generating = s.generating
210
211
  this.queued = s.queued ?? 0
@@ -358,7 +359,6 @@ export class MediaSvc {
358
359
  }
359
360
 
360
361
  toggleFold(cat: string): void {
361
- if (this.st.query.trim() !== '') return // folds yield to a live search
362
362
  this.openCats.has(cat) ? this.openCats.delete(cat) : this.openCats.add(cat)
363
363
  }
364
364
  /** rail ๐Ÿ–ผ click โ€” every category unfolds at once */
@@ -12,6 +12,7 @@ import { GeometryLayer, Rectbar, measureBox, type Box } from './geometry-view.ts
12
12
  import type { CatRow, CustomPanelRef } from './hub-types.ts'
13
13
  import { Caret } from './icons.tsx'
14
14
  import { ThreadControl } from './review/thread-control.tsx'
15
+ import { tip } from './tips.ts'
15
16
 
16
17
  const TEX = 1024
17
18
  const MIX_UNIT = 24
@@ -27,7 +28,7 @@ export const MediaTopbar = observer(({ app }: { app: RepoSt }) => {
27
28
  {/* the prompt AUTOSAVES (debounced), no save button, no fear.
28
29
  folded (default) = one ellipsized line, click to expand */}
29
30
  <div className="promptrow">
30
- <button className="fold" title={m.promptOpen ? 'fold the prompt' : 'expand the prompt'}
31
+ <button className="fold" {...tip(m.promptOpen ? 'fold the prompt' : 'expand the prompt')}
31
32
  onClick={() => m.togglePrompt()}><Caret open={m.promptOpen} /></button>
32
33
  {m.promptOpen
33
34
  // it grows on every prompt change, a selection's included; the css max-height caps it near 14 lines
@@ -42,21 +43,21 @@ export const MediaTopbar = observer(({ app }: { app: RepoSt }) => {
42
43
  {m.curId != null ? <ThreadControl st={app} address={`media:${m.curId}`} name={m.curId} /> : null}
43
44
  {!manual ? <button disabled={m.curId == null} onClick={() => void m.generate()}>Generate</button> : null}
44
45
  {!manual ? (
45
- <label className="xn" title="rolls per generate">ร—
46
+ <label className="xn" {...tip('rolls per generate')}>ร—
46
47
  <select value={m.n} disabled={det} onChange={(e) => runInAction(() => { m.n = e.target.value })}>
47
48
  {['1', '3', '6', '9', '12'].map((v) => <option key={v}>{v}</option>)}
48
49
  </select>
49
50
  </label>
50
51
  ) : null}
51
- <button className="ghost" title="add files as rolls (or drag-drop onto the variants bar)" onClick={() => fileRef.current?.click()}>upload</button>
52
+ <button className="ghost" {...tip('add files as rolls (or drag-drop onto the variants bar)')} onClick={() => fileRef.current?.click()}>upload</button>
52
53
  <input type="file" ref={fileRef} multiple style={{ display: 'none' }}
53
54
  accept={m.cur?.media === 'audio' ? '.mp3,.wav,.ogg,.m4a' : '.png,.webp'}
54
55
  onChange={(e) => { if (e.target.files != null) void m.upload(e.target.files); e.target.value = '' }} />
55
- <button className="ghost" title="copy the prompt" onClick={() => m.copyPrompt()}>copy</button>
56
+ <button className="ghost" {...tip('copy the prompt')} onClick={() => m.copyPrompt()}>copy</button>
56
57
  {det || manual ? <span className="detnote">{manual ? 'manual โ€” upload files (drag-drop works)' : 'deterministic โ€” rolls identical'}</span> : null}
57
58
  <span className="sp" />
58
- {m.generating ? <button className="ghost" title="interrupt the current job (queued jobs stay)" onClick={() => m.stopCurrent()}>stop current</button> : null}
59
- {m.queued > 0 ? <button className="ghost" title="drop queued jobs" onClick={() => m.clearQueue()}>clear queue ({m.queued})</button> : null}
59
+ {m.generating ? <button className="ghost" {...tip('interrupt the current job (queued jobs stay)')} onClick={() => m.stopCurrent()}>stop current</button> : null}
60
+ {m.queued > 0 ? <button className="ghost" {...tip('drop queued jobs')} onClick={() => m.clearQueue()}>clear queue ({m.queued})</button> : null}
60
61
  {m.generating && m.progress?.max ? (
61
62
  <span className="progbar"><i style={{ width: `${Math.round((100 * m.progress.value) / m.progress.max)}%` }} /></span>
62
63
  ) : null}
@@ -159,7 +160,7 @@ export const ToolsBar = observer(({ app }: { app: RepoSt }) => {
159
160
  {/* the workflow behind this asset, tuned where the asset already is.
160
161
  Only on an asset a comfy workflow actually draws */}
161
162
  {wfId != null ? (
162
- <button className="chip" title={`tune ${wfId} for every ${kindId} asset`}
163
+ <button className="chip" {...tip(`tune ${wfId} for every ${kindId} asset`)}
163
164
  onClick={() => void app.comfy.tune(wfId, kindId)}>tune workflow</button>
164
165
  ) : null}
165
166
  <span className="sp" />
@@ -180,7 +181,7 @@ export const VariantsBar = observer(({ app }: { app: RepoSt }) => {
180
181
  const onDrop = (e: DragEvent<HTMLDivElement>): void => { e.preventDefault(); void m.upload(e.dataTransfer.files) }
181
182
  if (m.curId == null) return null
182
183
  if (!m.variantsOpen) return (
183
- <div className="vbar closed" title="open the variants bar" onClick={() => m.toggleVariants()}>
184
+ <div className="vbar closed" {...tip('open the variants bar')} onClick={() => m.toggleVariants()}>
184
185
  <span className="vcount">{rolls.length}</span><Caret side open={false} />
185
186
  </div>
186
187
  )
@@ -211,9 +212,9 @@ export const VariantsBar = observer(({ app }: { app: RepoSt }) => {
211
212
  {isAud(x.name) ? <>๐Ÿ”Š<audio controls src={m.rollUrl(m.curId!, x.name)} /></> : <img src={m.rollUrl(m.curId!, x.name)} />}
212
213
  {x.picked ? <span className="st">โ˜…</span> : null}
213
214
  <div className="btns">
214
- <button className="b-pick" onClick={(e) => { e.stopPropagation(); void m.pick(x.name) }}>pick</button>
215
- <button className="b-alt" onClick={(e) => { e.stopPropagation(); void m.alt(x.name) }}>alt</button>
216
- <button className="b-del" onClick={(e) => { e.stopPropagation(); void m.discard(x.name) }}>โœ•</button>
215
+ <button className="b-pick" {...tip('pick this roll: it ships as the asset')} onClick={(e) => { e.stopPropagation(); void m.pick(x.name) }}>pick</button>
216
+ <button className="b-alt" {...tip('keep this roll as an alternate of the asset')} onClick={(e) => { e.stopPropagation(); void m.alt(x.name) }}>alt</button>
217
+ <button className="b-del" {...tip('discard this roll', 'x')} aria-label="discard this roll" onClick={(e) => { e.stopPropagation(); void m.discard(x.name) }}>โœ•</button>
217
218
  </div>
218
219
  </div>
219
220
  ))}
@@ -396,7 +397,7 @@ const FloatPanel = observer(({ app, id, title, dx, dy, anchor, children }: {
396
397
  }}
397
398
  onPointerUp={() => { drag.current = null }}>
398
399
  <span>{title}</span>
399
- <button className="x" title="disable this tool" onClick={() => m.toggleTool(id)}>โœ•</button>
400
+ <button className="x" {...tip('disable this tool')} onClick={() => m.toggleTool(id)}>โœ•</button>
400
401
  </div>
401
402
  <div className="fbody">{children}</div>
402
403
  </div>
@@ -13,6 +13,7 @@ import { ThreadControl } from '../review/thread-control.tsx'
13
13
  import { SectionHead } from '../section-head.tsx'
14
14
  import { DocEditor } from '../editor/doc-editor.tsx'
15
15
  import { DocSavedLine } from '../editor/doc-saved.tsx'
16
+ import { tip } from '../tips.ts'
16
17
 
17
18
  type Msg = StoreView['messages'][number]
18
19
  type Word = 'messages' | 'persona' | 'surface'
@@ -27,7 +28,7 @@ const HINT: Record<Word, string> = {
27
28
  /** ยซ โœŽ edit ยป: the object whole in the hub's one editor; none while it is open */
28
29
  const EditObject = observer(({ ms, word, id }: { ms: MessagesSt; word: Word; id: string }) =>
29
30
  ms.docs.isOpen(word, id) ? null : (
30
- <button type="button" className="ghost dc-act msg-edit" data-act="edit" title={`the whole ${NOUN[word]} as its text in the editor: the save is its next version in its thread`} onClick={() => ms.docs.open(word, id)}>
31
+ <button type="button" className="ghost dc-act msg-edit" data-act="edit" {...tip(`the whole ${NOUN[word]} as its text in the editor: the save is its next version in its thread`)} onClick={() => ms.docs.open(word, id)}>
31
32
  โœŽ edit
32
33
  </button>
33
34
  ),
@@ -60,7 +61,7 @@ const Flags = ({ run, id }: { run: RunView | undefined; id: string }) => (
60
61
  {Object.entries(run?.verdicts[id] ?? {})
61
62
  .filter(([, v]) => !PASS.test(v.verdict))
62
63
  .map(([g, v]) => (
63
- <span key={g} className={`msg-tag${VETO.test(v.verdict) ? ' veto' : ''}`} title={v.words}>
64
+ <span key={g} className={`msg-tag${VETO.test(v.verdict) ? ' veto' : ''}`} {...tip(v.words)}>
64
65
  {g} {v.verdict}
65
66
  </span>
66
67
  ))}
@@ -78,7 +79,7 @@ const MessageCard = observer(({ ms, m }: { ms: MessagesSt; m: Msg }) => {
78
79
  <small>{m.id}</small>
79
80
  <ThreadControl st={ms.st} address={`messages:${m.id}`} name={m.title} />
80
81
  <EditObject ms={ms} word="messages" id={m.id} />
81
- {m.toFill.length ? <span className="msg-tag" title="an agent fills these from what is built">to fill: {m.toFill.join(', ')}</span> : null}
82
+ {m.toFill.length ? <span className="msg-tag" {...tip('an agent fills these from what is built')}>to fill: {m.toFill.join(', ')}</span> : null}
82
83
  </h3>
83
84
  <Editable ms={ms} word="messages" id={m.id}>
84
85
  <dl>
@@ -118,9 +119,9 @@ const MessageCard = observer(({ ms, m }: { ms: MessagesSt; m: Msg }) => {
118
119
  </td>
119
120
  {readers.map((r) => {
120
121
  const x = run?.cells[c.id]?.[r]
121
- const tip = x ? `${r}: "${x.said}"\ngain: ${x.gain}\nunderstood ${x.understood}/2, value ${x.value}/2, appeal ${x.appeal}/5, believes ${x.believe}/2${x.friction ? `\nbothered by: ${x.friction}` : ''}` : `${r}: not in this run`
122
+ const says = x ? `${r}: "${x.said}"\ngain: ${x.gain}\nunderstood ${x.understood}/2, value ${x.value}/2, appeal ${x.appeal}/5, believes ${x.believe}/2${x.friction ? `\nbothered by: ${x.friction}` : ''}` : `${r}: not in this run`
122
123
  return (
123
- <td key={r} className="cell" style={heat(x?.score)} title={tip}>
124
+ <td key={r} className="cell" style={heat(x?.score)} {...tip(says)}>
124
125
  {x?.score ?? ''}
125
126
  </td>
126
127
  )
@@ -299,7 +300,7 @@ const Personas = observer(({ ms }: { ms: MessagesSt }) => {
299
300
  <tbody>
300
301
  {[...mine.slice(0, 5), ...mine.slice(-3)].map((r, i) => (
301
302
  <tr key={r.id} className={i === 5 ? 'msg-worst' : undefined}>
302
- <td className="cell" style={heat(r.x!.score)} title={`"${r.x!.said}"\ngain: ${r.x!.gain}`}>
303
+ <td className="cell" style={heat(r.x!.score)} {...tip(`"${r.x!.said}"\ngain: ${r.x!.gain}`)}>
303
304
  {r.x!.score}
304
305
  </td>
305
306
  <td>{text.get(r.id)}</td>
@@ -362,7 +363,7 @@ const Surfaces = observer(({ ms }: { ms: MessagesSt }) => {
362
363
  <th className="num">alone</th>
363
364
  <th className="num">whole</th>
364
365
  {took.map((t) => (
365
- <th key={t.id} className="num" title={t.text}>
366
+ <th key={t.id} className="num" {...tip(t.text)}>
366
367
  {t.label}
367
368
  </th>
368
369
  ))}
@@ -5,7 +5,7 @@ import { makeAutoObservable, runInAction } from 'mobx'
5
5
  import type { RunView, StoreView } from '../../../messages/score.ts'
6
6
  import type { MessageSuggestion, Suggestion } from '../../../messages/write.ts'
7
7
  import type { MessagesTab } from '../../../messages/tabs.ts'
8
- import { PolledResource, readJson } from '../polled.ts'
8
+ import { PolledResource, readJsonNone } from '../polled.ts'
9
9
  import { reach } from '../reach.ts'
10
10
  import { KeptFolds } from '../kept-folds.ts'
11
11
  import { DocSlot } from '../editor/doc-slot.ts'
@@ -49,7 +49,7 @@ export class MessagesSt {
49
49
 
50
50
  constructor(readonly st: RepoSt) {
51
51
  this.docs = new DocSlot((p) => st.url(p), () => void this.load())
52
- this.res = new PolledResource({ read: () => readJson<StoreView>(this.st.url('/api/messages')), onFocus: true })
52
+ this.res = new PolledResource({ read: () => readJsonNone<StoreView>(this.st.url('/api/messages'), (is) => (this.none = is)), onFocus: true })
53
53
  makeAutoObservable<this, 'st'>(this, { st: false, res: false, folds: false, docs: false })
54
54
  try {
55
55
  const { phrasings, ...d } = JSON.parse(kept(this.draftKey) ?? '{}') as Partial<MessagesSt['draft']> & { phrasings?: Record<string, string> }
@@ -62,6 +62,9 @@ export class MessagesSt {
62
62
  return `messages-draft:${this.st.key}`
63
63
  }
64
64
 
65
+ /** the hub answered that this repo keeps no store: the page is the empty page */
66
+ none = false
67
+
65
68
  get view(): StoreView | null {
66
69
  return this.res.value ?? null
67
70
  }