rvlib-shipkit 2.25.0 → 2.27.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 (456) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/package.json +2 -2
  3. package/src/agent-time/diet.ts +77 -0
  4. package/src/agent-time/family.ts +72 -0
  5. package/src/agent-time/hooks.ts +331 -0
  6. package/src/agent-time/limits.ts +44 -0
  7. package/src/agent-time/live.ts +1 -3
  8. package/src/agent-time/mask.ts +96 -18
  9. package/src/agent-time/refused.ts +45 -0
  10. package/src/agent-time/render.ts +130 -17
  11. package/src/agent-time/report-cache.ts +57 -0
  12. package/src/agent-time/report.ts +349 -23
  13. package/src/agent-time/shape.ts +50 -3
  14. package/src/agent-time/store.ts +370 -95
  15. package/src/agent-time/timeline.ts +140 -21
  16. package/src/agent-time/turns.ts +18 -8
  17. package/src/annex/offload.ts +17 -6
  18. package/src/annex/tidy.ts +70 -10
  19. package/src/asks/ask-after.ts +40 -0
  20. package/src/asks/asks-queue.ts +205 -47
  21. package/src/assets/kit-config.ts +7 -3
  22. package/src/assets/kits/identity-kit.ts +289 -10
  23. package/src/check.ts +3 -1
  24. package/src/checks/SK004-gitignore-policy.check.ts +12 -5
  25. package/src/checks/SK013-one-way-in-policy.check.ts +8 -3
  26. package/src/checks/SK026-asks-autoclose.check.ts +5 -5
  27. package/src/checks/SK028-readme.check.ts +7 -66
  28. package/src/checks/SK030-cache-audit.check.ts +6 -1
  29. package/src/checks/SK031-trace-audit.check.ts +2 -0
  30. package/src/checks/SK033-global-contribution.check.ts +3 -1
  31. package/src/checks/SK035-public-clean.check.ts +2 -2
  32. package/src/checks/SK043-scratch-on-the-mac.check.ts +59 -4
  33. package/src/checks/SK045-slow-hooks.check.ts +47 -0
  34. package/src/checks/SK046-hook-records.check.ts +76 -0
  35. package/src/checks/SK047-login-in-description.check.ts +36 -0
  36. package/src/checks/SK048-one-local-file.check.ts +36 -0
  37. package/src/cli/cmd_Asks.ts +71 -5
  38. package/src/cli/cmd_Backup.ts +5 -3
  39. package/src/cli/cmd_Capacity.ts +2 -2
  40. package/src/cli/cmd_CrossRepoActivity.ts +5 -4
  41. package/src/cli/cmd_Db.ts +253 -0
  42. package/src/cli/cmd_History.ts +212 -0
  43. package/src/cli/cmd_Home.ts +31 -3
  44. package/src/cli/cmd_Hq.ts +516 -0
  45. package/src/cli/cmd_Machines.ts +36 -0
  46. package/src/cli/cmd_Media.ts +38 -6
  47. package/src/cli/cmd_Mv.ts +1 -1
  48. package/src/cli/cmd_Reflect.ts +23 -2
  49. package/src/cli/cmd_Releases.ts +30 -0
  50. package/src/cli/cmd_Review.ts +569 -118
  51. package/src/cli/cmd_Secret.ts +62 -12
  52. package/src/cli/cmd_Social.ts +83 -1
  53. package/src/cli/cmd_Space.ts +324 -0
  54. package/src/cli/cmd_Time.ts +82 -5
  55. package/src/cli/cmd_Tmp.ts +28 -4
  56. package/src/cli/cmd_Trailer.ts +14 -10
  57. package/src/cli/cmd_Urls.ts +56 -0
  58. package/src/cli/cmd_Vault.ts +583 -0
  59. package/src/cli/family-help.ts +4 -2
  60. package/src/cli/family-pages.ts +1 -1
  61. package/src/cli/registry.ts +26 -4
  62. package/src/collections/actions.ts +63 -13
  63. package/src/collections/collection-types.ts +23 -1
  64. package/src/collections/providers.ts +117 -23
  65. package/src/collections/review.ts +4 -4
  66. package/src/commands/runner.ts +5 -1
  67. package/src/contracts/contract-manifests.ts +6 -5
  68. package/src/contracts/contract-types.ts +6 -4
  69. package/src/contracts/contracts-engine.ts +11 -0
  70. package/src/contracts/manifests/chrome-web-store.contract.ts +31 -0
  71. package/src/core/budget.ts +12 -17
  72. package/src/core/capacity.ts +27 -18
  73. package/src/core/check-runner.ts +7 -4
  74. package/src/core/history-files.ts +9 -5
  75. package/src/core/layout.ts +3 -0
  76. package/src/core/machine-busy.ts +127 -0
  77. package/src/core/machine-commit.ts +6 -1
  78. package/src/core/machine-db.ts +368 -20
  79. package/src/core/machine-layout.ts +137 -0
  80. package/src/core/machine-read.ts +81 -0
  81. package/src/core/migrate-layout.ts +1 -1
  82. package/src/core/one-way-in-policy.ts +64 -7
  83. package/src/core/polling-policy.ts +27 -0
  84. package/src/core/retention.ts +16 -2
  85. package/src/core/scope.ts +107 -14
  86. package/src/core/signal-name.ts +6 -0
  87. package/src/core/slots.ts +5 -4
  88. package/src/core/trace-audit.ts +6 -1
  89. package/src/core/transient.ts +6 -0
  90. package/src/drill/clean.ts +25 -1
  91. package/src/drill/run.ts +2 -2
  92. package/src/drill/seal.ts +27 -4
  93. package/src/home/activity-shape.ts +2 -0
  94. package/src/home/activity.ts +66 -3
  95. package/src/home/app-sign.ts +15 -4
  96. package/src/home/daemon-jobs.ts +149 -7
  97. package/src/home/database-projects.ts +111 -0
  98. package/src/home/database-words.ts +203 -0
  99. package/src/home/databases.ts +460 -0
  100. package/src/home/global-units.ts +6 -0
  101. package/src/home/gui-app/ShipkitGui.swift +122 -1
  102. package/src/home/gui-app.ts +6 -3
  103. package/src/home/home-move.ts +514 -0
  104. package/src/home/home-paths.ts +12 -3
  105. package/src/home/home-routes.ts +68 -0
  106. package/src/home/inbox-shape.ts +24 -14
  107. package/src/home/machine-fold.ts +820 -0
  108. package/src/home/machine-host.ts +20 -5
  109. package/src/home/machine-repair.ts +503 -0
  110. package/src/home/machine-stores.ts +66 -15
  111. package/src/home/machine-temp.ts +547 -86
  112. package/src/home/resume.ts +79 -0
  113. package/src/home/run-daemon.ts +25 -4
  114. package/src/home/run-pm.ts +18 -5
  115. package/src/home/serve-daemon.ts +18 -3
  116. package/src/home/serve-web.ts +175 -7
  117. package/src/home/space-job.ts +115 -0
  118. package/src/home/space-page.ts +257 -0
  119. package/src/home/space-route.ts +167 -0
  120. package/src/home/space-words.ts +103 -0
  121. package/src/home/time-page-shape.ts +202 -0
  122. package/src/home/time-page.ts +64 -0
  123. package/src/home/vault-page.ts +482 -0
  124. package/src/home/vault-words.ts +132 -0
  125. package/src/hooks/leak-guard.ts +40 -13
  126. package/src/hooks/one-way-in-guard.ts +17 -4
  127. package/src/hq/cards.ts +581 -0
  128. package/src/hq/door-route.ts +43 -0
  129. package/src/hq/door.ts +163 -0
  130. package/src/hq/files-send.ts +348 -0
  131. package/src/hq/forgotten-log.ts +35 -0
  132. package/src/hq/history-check.ts +255 -0
  133. package/src/hq/history-place.ts +146 -0
  134. package/src/hq/history-send.ts +487 -0
  135. package/src/hq/hq-db.ts +99 -0
  136. package/src/hq/hq-local.ts +469 -0
  137. package/src/hq/hq-routes.ts +196 -0
  138. package/src/hq/hq-store.ts +599 -0
  139. package/src/hq/kinds/ask.ts +147 -0
  140. package/src/hq/kinds/card-gone.ts +83 -0
  141. package/src/hq/kinds/card-msg.ts +66 -0
  142. package/src/hq/kinds/card.ts +99 -0
  143. package/src/hq/kinds/index.ts +21 -0
  144. package/src/hq/kinds/kind.ts +126 -0
  145. package/src/hq/kinds/media.ts +125 -0
  146. package/src/hq/kinds/prompt.ts +219 -0
  147. package/src/hq/kinds/reflection.ts +128 -0
  148. package/src/hq/kinds/report.ts +55 -0
  149. package/src/hq/kinds/time-day.ts +236 -0
  150. package/src/hq/ledger.ts +473 -0
  151. package/src/hq/machine-key.ts +44 -0
  152. package/src/hq/machine-notes.ts +131 -0
  153. package/src/hq/outbox.ts +372 -0
  154. package/src/hq/replica.ts +168 -0
  155. package/src/hq/repo-id.ts +4 -0
  156. package/src/hq/report-facts.ts +117 -0
  157. package/src/hq/report.ts +274 -0
  158. package/src/hq/switch.ts +151 -0
  159. package/src/hq/vault-grant.ts +92 -0
  160. package/src/identities/identities.ts +15 -3
  161. package/src/identities/steps.ts +31 -0
  162. package/src/ledger/db.ts +73 -26
  163. package/src/ledger/gate-checks.ts +29 -4
  164. package/src/ledger/git-key.ts +3 -3
  165. package/src/ledger/git-scan.ts +49 -7
  166. package/src/ledger/run-log.ts +11 -3
  167. package/src/ledger/store.ts +26 -4
  168. package/src/media-store/backup/daemon.ts +36 -17
  169. package/src/media-store/backup/kept.ts +241 -0
  170. package/src/media-store/backup/restore.ts +14 -4
  171. package/src/media-store/backup/run.ts +11 -11
  172. package/src/media-store/backup/secret.ts +6 -4
  173. package/src/media-store/backup/snapshot.ts +4 -2
  174. package/src/media-store/backup/sources.ts +68 -20
  175. package/src/media-store/copy/config.ts +77 -0
  176. package/src/media-store/copy/copy.ts +194 -0
  177. package/src/media-store/copy/lifecycle.ts +43 -0
  178. package/src/media-store/copy/night.ts +90 -0
  179. package/src/media-store/copy/proof.ts +151 -0
  180. package/src/media-store/copy/snapshot.ts +152 -0
  181. package/src/media-store/copy/store.ts +62 -0
  182. package/src/media-store/copy/stream.ts +176 -0
  183. package/src/media-store/daemon.ts +66 -16
  184. package/src/media-store/db.ts +22 -11
  185. package/src/media-store/forget.ts +23 -3
  186. package/src/media-store/hand.ts +4 -3
  187. package/src/media-store/hq-find.ts +75 -0
  188. package/src/media-store/hq-send.ts +277 -0
  189. package/src/media-store/kind.ts +2 -0
  190. package/src/media-store/purge.ts +18 -15
  191. package/src/media-store/put.ts +24 -8
  192. package/src/media-store/remote.ts +16 -7
  193. package/src/media-store/space-listing.ts +240 -0
  194. package/src/media-store/space.ts +40 -21
  195. package/src/media-store/sync.ts +5 -5
  196. package/src/media-store/tidy.ts +98 -0
  197. package/src/media-store/upload.ts +3 -3
  198. package/src/media-store/webp.ts +66 -0
  199. package/src/messages/model.ts +16 -7
  200. package/src/messages/routes.ts +14 -4
  201. package/src/messages/score.ts +2 -2
  202. package/src/messages/suggest.ts +96 -0
  203. package/src/pages/frame-client.ts +10 -0
  204. package/src/plan/planner.ts +28 -17
  205. package/src/recordings/media-kind.ts +1 -0
  206. package/src/recordings/model.ts +1 -1
  207. package/src/recordings/recorder-app/Capture.swift +9 -7
  208. package/src/reflect/hq-corpus.ts +56 -0
  209. package/src/reflect/prompt-corpus.ts +3 -1
  210. package/src/reflect/transcript.ts +146 -36
  211. package/src/release/machine-words.ts +67 -0
  212. package/src/release/public-clean.ts +8 -3
  213. package/src/releases/from-card.ts +1 -1
  214. package/src/releases/model.ts +18 -0
  215. package/src/releases/routes.ts +10 -5
  216. package/src/releases/store.ts +23 -2
  217. package/src/repo-config.ts +42 -2
  218. package/src/review/anim.ts +2 -2
  219. package/src/review/auto.ts +2 -2
  220. package/src/review/card-db.ts +244 -0
  221. package/src/review/card-rows.ts +266 -0
  222. package/src/review/cells.ts +76 -5
  223. package/src/review/draft-card.ts +41 -0
  224. package/src/review/draft-model.ts +78 -0
  225. package/src/review/format.ts +29 -10
  226. package/src/review/gone.ts +98 -0
  227. package/src/review/inbox-hook.ts +35 -0
  228. package/src/review/marks.ts +1 -1
  229. package/src/review/media-kind.ts +7 -5
  230. package/src/review/media-read.ts +9 -7
  231. package/src/review/media.ts +32 -5
  232. package/src/review/model.ts +214 -45
  233. package/src/review/move.ts +491 -0
  234. package/src/review/notes.ts +12 -20
  235. package/src/review/previews.ts +15 -19
  236. package/src/review/project.ts +1 -1
  237. package/src/review/rev.ts +8 -0
  238. package/src/review/role.ts +1 -1
  239. package/src/review/routes.ts +64 -13
  240. package/src/review/stage-card.ts +8 -4
  241. package/src/review/stage-routes.ts +1 -1
  242. package/src/review/store.ts +529 -83
  243. package/src/review/thread-fold.ts +51 -0
  244. package/src/review/threads.ts +147 -9
  245. package/src/review/trailer-auto-mock.ts +63 -0
  246. package/src/review/trailer-card.ts +4 -4
  247. package/src/review/trailer-desk.ts +41 -7
  248. package/src/review/trailer-media.ts +1 -0
  249. package/src/review/trailer-model.ts +8 -0
  250. package/src/review/trailer-notes.ts +1 -1
  251. package/src/review/trailer-routes.ts +9 -1
  252. package/src/review/unit.ts +6 -6
  253. package/src/review/watchers.ts +1 -1
  254. package/src/rules/untrack-generated.ts +92 -8
  255. package/src/secrets/held.ts +16 -0
  256. package/src/secrets/keychain.ts +113 -0
  257. package/src/secrets/list.ts +16 -6
  258. package/src/secrets/manager.ts +24 -10
  259. package/src/secrets/read.ts +257 -0
  260. package/src/secrets/who-reads.ts +49 -0
  261. package/src/serve/door-forward.ts +268 -0
  262. package/src/serve/door-names.ts +47 -0
  263. package/src/serve/embed.ts +1 -1
  264. package/src/serve/hub-app/activity-view.tsx +56 -32
  265. package/src/serve/hub-app/activity.css +7 -1
  266. package/src/serve/hub-app/asks-page.tsx +48 -0
  267. package/src/serve/hub-app/asks-st.ts +25 -0
  268. package/src/serve/hub-app/clock-svc.ts +1 -2
  269. package/src/serve/hub-app/col-card.tsx +64 -13
  270. package/src/serve/hub-app/col-list-page.tsx +122 -0
  271. package/src/serve/hub-app/col-list-st.ts +103 -0
  272. package/src/serve/hub-app/col-tables-view.tsx +10 -41
  273. package/src/serve/hub-app/col-tables.ts +76 -8
  274. package/src/serve/hub-app/cols-svc.ts +70 -16
  275. package/src/serve/hub-app/database-st.ts +260 -0
  276. package/src/serve/hub-app/database-view.tsx +289 -0
  277. package/src/serve/hub-app/database.css +32 -0
  278. package/src/serve/hub-app/entry-bar.css +14 -0
  279. package/src/serve/hub-app/entry-bar.tsx +33 -0
  280. package/src/serve/hub-app/entry-pick.ts +31 -0
  281. package/src/serve/hub-app/floating.tsx +1 -0
  282. package/src/serve/hub-app/hash-route.ts +11 -1
  283. package/src/serve/hub-app/header-bar.tsx +14 -18
  284. package/src/serve/hub-app/home-st.ts +89 -9
  285. package/src/serve/hub-app/home-strip.css +5 -19
  286. package/src/serve/hub-app/home-strip.tsx +58 -92
  287. package/src/serve/hub-app/home.html +7 -0
  288. package/src/serve/hub-app/hub-app.tsx +31 -142
  289. package/src/serve/hub-app/hub-types.ts +3 -1
  290. package/src/serve/hub-app/hub.css +109 -23
  291. package/src/serve/hub-app/icons.tsx +18 -1
  292. package/src/serve/hub-app/identities-st.ts +56 -6
  293. package/src/serve/hub-app/identities-view.tsx +100 -58
  294. package/src/serve/hub-app/identities.css +17 -15
  295. package/src/serve/hub-app/identity-address.ts +5 -0
  296. package/src/serve/hub-app/inbox-st.ts +41 -24
  297. package/src/serve/hub-app/inbox-view.tsx +37 -41
  298. package/src/serve/hub-app/inbox.css +2 -5
  299. package/src/serve/hub-app/index.html +7 -0
  300. package/src/serve/hub-app/kept-cols.tsx +7 -0
  301. package/src/serve/hub-app/keys.ts +28 -15
  302. package/src/serve/hub-app/later.tsx +26 -0
  303. package/src/serve/hub-app/list-filter.tsx +14 -0
  304. package/src/serve/hub-app/list-walk.ts +72 -3
  305. package/src/serve/hub-app/machines-st.ts +251 -0
  306. package/src/serve/hub-app/machines-view.tsx +224 -0
  307. package/src/serve/hub-app/machines.css +76 -0
  308. package/src/serve/hub-app/md-copy.tsx +79 -0
  309. package/src/serve/hub-app/media-view.tsx +2 -0
  310. package/src/serve/hub-app/messages/messages-page.tsx +79 -7
  311. package/src/serve/hub-app/messages/messages-st.ts +99 -3
  312. package/src/serve/hub-app/messages.css +14 -0
  313. package/src/serve/hub-app/page-keys.ts +175 -0
  314. package/src/serve/hub-app/pages-frames.tsx +11 -3
  315. package/src/serve/hub-app/palette-st.ts +58 -11
  316. package/src/serve/hub-app/palette-view.tsx +3 -1
  317. package/src/serve/hub-app/project-list.css +54 -8
  318. package/src/serve/hub-app/project-list.tsx +128 -59
  319. package/src/serve/hub-app/projects-svc.ts +78 -7
  320. package/src/serve/hub-app/reader-chips.tsx +13 -0
  321. package/src/serve/hub-app/readme-view.tsx +2 -3
  322. package/src/serve/hub-app/readme.css +27 -5
  323. package/src/serve/hub-app/reflections-page.tsx +42 -0
  324. package/src/serve/hub-app/reflections-st.ts +17 -0
  325. package/src/serve/hub-app/releases/releases-page.tsx +25 -2
  326. package/src/serve/hub-app/releases/releases-st.ts +1 -1
  327. package/src/serve/hub-app/repo-sections.ts +9 -5
  328. package/src/serve/hub-app/repo-st.ts +35 -8
  329. package/src/serve/hub-app/review/draft-card.tsx +163 -0
  330. package/src/serve/hub-app/review/kit.tsx +50 -7
  331. package/src/serve/hub-app/review/note-place.ts +1 -1
  332. package/src/serve/hub-app/review/review-board.tsx +2 -2
  333. package/src/serve/hub-app/review/review-cells.tsx +145 -65
  334. package/src/serve/hub-app/review/review-kit.ts +27 -1
  335. package/src/serve/hub-app/review/review-list.tsx +68 -30
  336. package/src/serve/hub-app/review/review-page.tsx +7 -8
  337. package/src/serve/hub-app/review/review-st.ts +111 -24
  338. package/src/serve/hub-app/review/review-thread.tsx +49 -19
  339. package/src/serve/hub-app/review/review-views.tsx +475 -144
  340. package/src/serve/hub-app/review/thread-control-st.ts +115 -0
  341. package/src/serve/hub-app/review/thread-control.tsx +74 -0
  342. package/src/serve/hub-app/review/thread-st.ts +73 -26
  343. package/src/serve/hub-app/review/trailer-card.tsx +1 -1
  344. package/src/serve/hub-app/review/trailer-page.tsx +37 -16
  345. package/src/serve/hub-app/review/trailer-st.ts +41 -7
  346. package/src/serve/hub-app/review.css +267 -61
  347. package/src/serve/hub-app/side-lists.ts +72 -0
  348. package/src/serve/hub-app/sidebar.tsx +6 -3
  349. package/src/serve/hub-app/site/site-part.tsx +2 -8
  350. package/src/serve/hub-app/site/site-st.ts +4 -4
  351. package/src/serve/hub-app/social/comms-page.tsx +20 -5
  352. package/src/serve/hub-app/social/kit.tsx +30 -4
  353. package/src/serve/hub-app/social/post-card.tsx +139 -49
  354. package/src/serve/hub-app/social/serial-writes.ts +13 -0
  355. package/src/serve/hub-app/social/social-model.ts +11 -0
  356. package/src/serve/hub-app/social/social-page.tsx +94 -35
  357. package/src/serve/hub-app/social/social-st.ts +120 -36
  358. package/src/serve/hub-app/social/stage-popup.tsx +1 -1
  359. package/src/serve/hub-app/social/stage-st.ts +1 -1
  360. package/src/serve/hub-app/social/step-layout.ts +1 -1
  361. package/src/serve/hub-app/social.css +3 -0
  362. package/src/serve/hub-app/space-st.ts +209 -0
  363. package/src/serve/hub-app/space-view.tsx +196 -0
  364. package/src/serve/hub-app/space.css +27 -0
  365. package/src/serve/hub-app/stores/stores-page.tsx +91 -23
  366. package/src/serve/hub-app/stores/stores-st.ts +44 -19
  367. package/src/serve/hub-app/stores.css +6 -1
  368. package/src/serve/hub-app/theme-st.ts +22 -9
  369. package/src/serve/hub-app/time-charts.tsx +291 -0
  370. package/src/serve/hub-app/time-pages.tsx +749 -0
  371. package/src/serve/hub-app/time-st.ts +162 -0
  372. package/src/serve/hub-app/time-view.tsx +76 -0
  373. package/src/serve/hub-app/time.css +138 -0
  374. package/src/serve/hub-app/tree-build.ts +52 -42
  375. package/src/serve/hub-app/tree-row.tsx +4 -4
  376. package/src/serve/hub-app/tree-svc.ts +18 -9
  377. package/src/serve/hub-app/urls-svc.ts +154 -0
  378. package/src/serve/hub-app/urls-view.tsx +117 -0
  379. package/src/serve/hub-app/urls.css +30 -0
  380. package/src/serve/hub-app/vault-st.ts +127 -0
  381. package/src/serve/hub-app/vault-view.tsx +154 -0
  382. package/src/serve/hub-app/vault.css +38 -0
  383. package/src/serve/hub-app/veille/veille-st.ts +12 -10
  384. package/src/serve/hub-app/waiting-svc.ts +29 -0
  385. package/src/serve/hub-app/wikis-view.tsx +2 -2
  386. package/src/serve/hub-runtime.ts +15 -2
  387. package/src/serve/project-gutter-route.ts +27 -14
  388. package/src/serve/project-gutter.ts +25 -12
  389. package/src/serve/same-origin.ts +10 -0
  390. package/src/serve/serve-hub.ts +13 -4
  391. package/src/shipkit-files.ts +16 -2
  392. package/src/shipkit.ts +1 -1
  393. package/src/shot/shooter.ts +616 -420
  394. package/src/shot/shot-ask.ts +246 -155
  395. package/src/site/desk.ts +2 -2
  396. package/src/smoke/run-smoke.ts +3 -2
  397. package/src/social/cover.ts +202 -0
  398. package/src/social/discord-layout.ts +37 -13
  399. package/src/social/drafts.ts +3 -0
  400. package/src/social/load.ts +23 -2
  401. package/src/social/media-kind.ts +2 -1
  402. package/src/social/publish/discord.ts +5 -2
  403. package/src/social/publish/secret.ts +2 -2
  404. package/src/social/release-stage.ts +28 -13
  405. package/src/social/routes.ts +26 -1
  406. package/src/social/stage.ts +1 -1
  407. package/src/social/stats.ts +12 -9
  408. package/src/social/strip.ts +4 -1
  409. package/src/social/thumbnail.ts +255 -0
  410. package/src/stores/collection.ts +15 -11
  411. package/src/stores/desk.ts +236 -42
  412. package/src/stores/model.ts +72 -6
  413. package/src/stores/routes.ts +37 -12
  414. package/src/stores/unit.ts +14 -8
  415. package/src/suite/judge-suites.ts +113 -16
  416. package/src/suite/select.ts +45 -3
  417. package/src/suite/suite-cli.ts +81 -34
  418. package/src/trailer/bed.ts +1 -1
  419. package/src/trailer/build.ts +134 -21
  420. package/src/trailer/ffmpeg.ts +7 -0
  421. package/src/trailer/fonts.ts +3 -2
  422. package/src/trailer/grammar.ts +201 -2
  423. package/src/trailer/graph.ts +42 -5
  424. package/src/trailer/look.ts +21 -0
  425. package/src/trailer/mock.ts +154 -0
  426. package/src/trailer/passage.ts +65 -26
  427. package/src/trailer/score/heard.ts +89 -0
  428. package/src/trailer/score/sound.ts +14 -8
  429. package/src/trailer/sound/run.ts +16 -6
  430. package/src/trailer/stitch.ts +26 -5
  431. package/src/trailer/titles.ts +82 -19
  432. package/src/trailer/versions.ts +1 -3
  433. package/src/trailer/vertical.ts +3 -1
  434. package/src/urls/frame.ts +195 -0
  435. package/src/urls/routes.ts +43 -0
  436. package/src/urls/rows.ts +171 -0
  437. package/src/urls/unit.ts +73 -0
  438. package/src/vault/house-keys.ts +42 -0
  439. package/src/vault/layout.ts +50 -0
  440. package/src/vault/policy.ts +165 -0
  441. package/src/vault/vault-audit.ts +276 -0
  442. package/src/vault/vault-client.ts +40 -0
  443. package/src/vault/vault-config.ts +159 -0
  444. package/src/vault/vault-destroy.ts +78 -0
  445. package/src/vault/vault-handover.ts +305 -0
  446. package/src/vault/vault-http.ts +352 -0
  447. package/src/vault/vault-import.ts +208 -0
  448. package/src/vault/vault-init.ts +328 -0
  449. package/src/vault/vault-minter.ts +271 -0
  450. package/src/vault/vault-restore.ts +333 -0
  451. package/src/vault/vault-serve.ts +342 -0
  452. package/src/vault/vault-snapshot.ts +281 -0
  453. package/src/veille/asks.ts +1 -1
  454. package/src/veille/desk.ts +2 -2
  455. package/src/wiki/run-wiki.ts +2 -1
  456. package/src/wiki/scan-md.ts +42 -2
@@ -6,10 +6,9 @@
6
6
  import { observer } from 'mobx-react-lite'
7
7
  import { useLayoutEffect } from 'react'
8
8
  import { INBOX_GROUPS, isReviewId, type InboxGroup, type InboxGroupNode, type InboxRow } from '../../home/inbox-shape.ts'
9
- import { hashFor } from './hash-route.ts'
10
- import { plainClick, repoPage, type HomeSt } from './home-st.ts'
11
- import { Caret, Icon, ICON } from './icons.tsx'
12
- import type { InboxSt } from './inbox-st.ts'
9
+ import { plainClick, type HomeSt } from './home-st.ts'
10
+ import { Caret } from './icons.tsx'
11
+ import { FOLDS, type FoldList, type InboxSt } from './inbox-st.ts'
13
12
  import { ItemView } from './item-view.tsx'
14
13
  import { Face } from './project-list.tsx'
15
14
  import type { RepoSt } from './repo-st.ts'
@@ -61,18 +60,21 @@ const Counts = observer(({ ib }: { ib: InboxSt }) =>
61
60
  ib.page == null ? null : (
62
61
  <span className="ib-counts">
63
62
  {ib.count > 0 ? <b>{ib.count} for you</b> : <span>nothing for you</span>}
64
- {ib.yellowCount > 0 ? <span className="ib-dim">{ib.yellowCount} can wait</span> : null}
63
+ {FOLDS.map((l) => (ib.foldCount(l) > 0 ? <span key={l} className="ib-dim">{ib.foldCount(l)} {FOLD_WORDS[l]}</span> : null))}
65
64
  </span>
66
65
  ),
67
66
  )
68
67
 
68
+ /** a folded list's head: what can wait, the asks that wait for their day */
69
+ const FOLD_WORDS: Record<FoldList, string> = { yellow: 'can wait', later: 'later' }
70
+
69
71
  const GROUP_WORDS: Record<InboxGroup, string> = { repo: 'project', kind: 'type', lane: 'lane' }
70
72
 
71
73
  /** what the list shows (the review cards, or every kind) and what it groups by, each axis on its own */
72
74
  const Bar = observer(({ ib }: { ib: InboxSt }) => (
73
75
  <div className="ib-bar">
74
76
  <span className="seg" title="the review cards only, or every kind: checks, asks and needs too">
75
- <button className={ib.show === 'cards' ? 'on' : ''} onClick={() => ib.setShow('cards')}>cards</button>
77
+ <button className={ib.show === 'cards' ? 'on' : ''} title="what waits on you: the cards, the questions and the asks for your hands" onClick={() => ib.setShow('cards')}>cards + asks</button>
76
78
  <button className={ib.show === 'all' ? 'on' : ''} onClick={() => ib.setShow('all')}>all{ib.show === 'cards' && ib.allCount > ib.cardCount ? <span className="ib-dim"> · {ib.allCount}</span> : null}</button>
77
79
  </span>
78
80
  <span className="sp" />
@@ -115,21 +117,23 @@ const InboxList = observer(({ app }: { app: HomeSt }) => {
115
117
  {p == null ? (
116
118
  ib.error === '' ? <div className="ib-wait"><span className="spin" />reading every repo…</div> : null
117
119
  ) : ib.rows.length === 0 ? (
118
- <div className="ib-clear">{ib.show === 'cards' ? 'no card waits on you ✨' : 'nothing waits on you ✨'}</div>
120
+ <div className="ib-clear">{ib.show === 'cards' ? 'no card and no ask waits on you ✨' : 'nothing waits on you ✨'}</div>
119
121
  ) : (
120
122
  <Groups app={app} gs={ib.groups} />
121
123
  )}
122
124
  {ib.more > 0 ? <button className="ib-more" onClick={() => ib.showMore()}>{ib.more} more</button> : null}
123
- {ib.yellowCount > 0 ? (
124
- <div className={`ib-fold${ib.yellowOpen ? ' on' : ''}`}>
125
- <button className="ib-foldhead" aria-expanded={ib.yellowOpen} onClick={() => ib.toggleYellow()}>
126
- <span className="ib-caret"><Caret open={ib.yellowOpen} /></span>
127
- <span>can wait</span>
128
- <span className="ib-n">{ib.yellowCount}</span>
129
- </button>
130
- {ib.yellowOpen ? <Groups app={app} gs={ib.yellowGroups} /> : null}
131
- </div>
132
- ) : null}
125
+ {FOLDS.map((l) =>
126
+ ib.foldCount(l) > 0 ? (
127
+ <div key={l} className={`ib-fold${ib.foldOpen[l] ? ' on' : ''}`}>
128
+ <button className="ib-foldhead" aria-expanded={ib.foldOpen[l]} onClick={() => ib.toggleFold(l)}>
129
+ <span className="ib-caret"><Caret open={ib.foldOpen[l]} /></span>
130
+ <span>{FOLD_WORDS[l]}</span>
131
+ <span className="ib-n">{ib.foldCount(l)}</span>
132
+ </button>
133
+ {ib.foldOpen[l] ? <Groups app={app} gs={ib.foldGroups(l)} /> : null}
134
+ </div>
135
+ ) : null,
136
+ )}
133
137
  {p != null && p.missing.length > 0 ? (
134
138
  <div className="ib-missing">
135
139
  {p.missing.map((m) => <div key={m.repo}><b>{m.repo}</b>: {m.why}, so its items are not here</div>)}
@@ -149,7 +153,13 @@ const Row = observer(({ app, r }: { app: HomeSt; r: InboxRow }) => {
149
153
  e.preventDefault()
150
154
  ib.pick(r)
151
155
  }}>
152
- <span className="ib-face" title={r.repo}>{p != null ? <Face p={p} px={28} /> : <span className="pgi h0">{r.repo.charAt(0).toUpperCase()}</span>}</span>
156
+ {/* the project's face is the way to the item in its repo's hub: a link inside the row's link is not html, so a
157
+ span takes the click before the row */}
158
+ <span className="ib-face" role="link" tabIndex={-1} title={`open it in ${r.repo}'s hub`} onClick={(e) => {
159
+ e.preventDefault()
160
+ e.stopPropagation()
161
+ openInHub(app, r.repo, r.id, r.col ?? null)
162
+ }}>{p != null ? <Face p={p} px={28} /> : <span className="pgi h0">{r.repo.charAt(0).toUpperCase()}</span>}</span>
153
163
  <span className="ib-main">
154
164
  <span className="ib-l1">
155
165
  <span className={`ib-tag t-${r.tone}`} title={KIND_WORDS[r.kind]}>{r.tag}</span>
@@ -166,10 +176,6 @@ const Row = observer(({ app, r }: { app: HomeSt; r: InboxRow }) => {
166
176
  )
167
177
  })
168
178
 
169
- /** the address of the item in its repo's own page */
170
- const hubAddress = (repo: string, id: string, col: string | null): string =>
171
- `${repoPage(repo)}#${hashFor(isReviewId(id) ? { t: 'review', id } : { t: 'item', col: col ?? '', id }) ?? ''}`
172
-
173
179
  /** the item in its repo's own page, in place */
174
180
  const openInHub = (app: HomeSt, repo: string, id: string, col: string | null): void => {
175
181
  if (isReviewId(id)) app.openReview(repo, id)
@@ -195,25 +201,15 @@ const OpenIn = observer(({ app, repo, id }: { app: HomeSt; repo: RepoSt; id: str
195
201
  return <NeedItem app={app} repo={repo} id={id} col={col} />
196
202
  })
197
203
 
198
- /** the line over an open item: back to the list on a phone, the repo, its own page */
199
- const ItemTop = observer(({ app, repo, id, col }: { app: HomeSt; repo: RepoSt; id: string; col: string | null }) => {
200
- const p = app.projects.list.find((x) => x.name === repo.name)
201
- return (
204
+ /** the line over an open item on a phone: the way back to the list. A desk shows none: the row's face opens the item
205
+ * in its repo's hub */
206
+ const ItemTop = observer(({ app }: { app: HomeSt }) =>
207
+ app.inbox.phone ? (
202
208
  <div className="rv-phonetop ib-top">
203
- {app.inbox.phone ? <button className="ghost rv-back" aria-label="back to the inbox" onClick={() => app.inbox.back()}>◂</button> : null}
204
- {p != null ? <Face p={p} px={20} /> : null}
205
- <b>{repo.name}</b>
206
- <span className="sp" />
207
- <a className="ib-hub" href={hubAddress(repo.name, id, col)} title="open it in its repo's hub" onClick={(e) => {
208
- if (!plainClick(e)) return
209
- e.preventDefault()
210
- openInHub(app, repo.name, id, col)
211
- }}>
212
- <Icon d={ICON.link} /> its hub
213
- </a>
209
+ <button className="ghost rv-back" aria-label="back to the inbox" onClick={() => app.inbox.back()}>◂ the inbox</button>
214
210
  </div>
215
- )
216
- })
211
+ ) : null,
212
+ )
217
213
 
218
214
  const ReviewItem = observer(({ app, repo, id }: { app: HomeSt; repo: RepoSt; id: string }) => {
219
215
  const rv = repo.review
@@ -225,7 +221,7 @@ const ReviewItem = observer(({ app, repo, id }: { app: HomeSt; repo: RepoSt; id:
225
221
  }, [rv, id])
226
222
  return (
227
223
  <div className={app.inbox.phone ? 'rv-phone ib-open' : 'ib-open ib-review'}>
228
- <ItemTop app={app} repo={repo} id={id} col={null} />
224
+ <ItemTop app={app} />
229
225
  <ThreadColumn rv={rv} back={null} />
230
226
  </div>
231
227
  )
@@ -238,7 +234,7 @@ const NeedItem = observer(({ app, repo, id, col }: { app: HomeSt; repo: RepoSt;
238
234
  const ready = repo.cols.loaded || repo.cols.cached
239
235
  return (
240
236
  <div className={app.inbox.phone ? 'ib-sheet ib-open' : 'ib-open'}>
241
- <ItemTop app={app} repo={repo} id={id} col={col} />
237
+ <ItemTop app={app} />
242
238
  <div className="ib-itembody">
243
239
  {!ready ? <div className="ib-wait"><span className="spin" />reading {repo.name}…</div> : col == null ? <div className="ph">this no longer waits on you</div> : <ItemView app={repo} col={col} id={id} />}
244
240
  </div>
@@ -24,7 +24,8 @@ a.ib-row.cur{background:var(--sel)}
24
24
  a.ib-row.t-review{border-left-color:var(--review)}
25
25
  a.ib-row.t-red{border-left-color:var(--red)}
26
26
  a.ib-row.t-yellow{border-left-color:var(--warn)}
27
- .ib-face{flex:none;width:28px;height:28px;display:flex}
27
+ .ib-face{flex:none;width:28px;height:28px;display:flex;border-radius:7px;cursor:pointer}
28
+ .ib-face:hover{box-shadow:0 0 0 2px var(--accent)}
28
29
  .ib-face img,.ib-face .pgi{width:28px;height:28px;border-radius:7px;object-fit:contain;font-size:14px}
29
30
  .ib-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:var(--s0)}
30
31
  .ib-l1{display:flex;align-items:baseline;gap:var(--s2);min-width:0}
@@ -65,10 +66,6 @@ button.ib-foldhead:hover{color:var(--ink)}
65
66
  .ib-open{flex:1;min-height:0;display:flex;flex-direction:column}
66
67
  .ib-open>.rv-thread{flex:1;min-height:0;height:auto}
67
68
  .ib-top{gap:var(--s2);min-height:44px}
68
- .ib-top img,.ib-top .pgi{width:20px;height:20px;border-radius:5px;object-fit:contain}
69
- .ib-top .sp{flex:1}
70
- a.ib-hub,a.ib-hub:visited{display:inline-flex;align-items:center;gap:var(--s1);color:var(--accent);text-decoration:none;font-size:13px;min-height:44px;padding:0 var(--s2)}
71
- a.ib-hub svg{width:14px;height:14px}
72
69
  .ib-itembody{flex:1;min-height:0;display:flex;flex-direction:column;overflow-y:auto}
73
70
 
74
71
  /* the phone: the inbox covers the home as an app; an open item covers the list, which stays where it was below it */
@@ -9,8 +9,15 @@
9
9
  <link rel="stylesheet" href="./home-strip.css" />
10
10
  <link rel="stylesheet" href="./planned.css" />
11
11
  <link rel="stylesheet" href="./when.css" />
12
+ <link rel="stylesheet" href="./urls.css" />
12
13
  <link rel="stylesheet" href="./activity.css" />
13
14
  <link rel="stylesheet" href="./insights.css" />
15
+ <link rel="stylesheet" href="./time.css" />
16
+ <link rel="stylesheet" href="./machines.css" />
17
+ <link rel="stylesheet" href="./database.css" />
18
+ <link rel="stylesheet" href="./entry-bar.css" />
19
+ <link rel="stylesheet" href="./vault.css" />
20
+ <link rel="stylesheet" href="./space.css" />
14
21
  <link rel="stylesheet" href="./readme.css" />
15
22
  <link rel="stylesheet" href="./dock.css" />
16
23
  <link rel="stylesheet" href="./controls.css" />
@@ -67,3 +67,10 @@ export const KeptCols = observer(({ id, children, folds, layout }: { id: string;
67
67
  </div>
68
68
  )
69
69
  })
70
+
71
+ /** a panel never scrolls itself: the column inside it does (hub-app.tsx, PANEL) */
72
+ export const PANEL = { overflow: 'hidden' } as const
73
+
74
+ /** the size of a page's list column (its second column, after the repo's tree or the rail), the same on every page:
75
+ * a list panel spreads it, never a size of its own (tests/hub-list-col.test.ts) */
76
+ export const LIST_COL = { defaultSize: '22%', minSize: 180 } as const
@@ -1,13 +1,14 @@
1
1
  // the page's command keys, read the same on every layout: ⌘1 to ⌘9 select the
2
- // nth repo of the project list, ⌘↑ and ⌘↓ the repo above or below, then the home row under the right hand: ⌘J
2
+ // nth repo of the project list, ⌘↑ and ⌘↓ the entry above or below in the rail (its pages, its identities, its repos),
3
+ // ⌘/ the global search, then the home row under the right hand: ⌘J
3
4
  // the picker, ⌘K the overview, ⌘L the activity, ⌘; the insights, ⌘' the plan, and ⌘I above them the inbox.
4
5
  // ⌘B folds the project list to its icon rail and back (layout-st.ts), ⌘⇧B
5
6
  // cycles the dock at the bottom of the page (dock-st.ts): the line, slim, open.
6
- // A digit, the semicolon and the quote are read from the physical key (`code`), so an
7
+ // A digit, the semicolon, the quote and the slash are read from the physical key (`code`), so an
7
8
  // AZERTY keyboard, where the key under 1 types `&`, selects the same repo. Ctrl stands in for
8
9
  // ⌘ off a Mac. The macOS app binds none of these to a menu item, so they
9
10
  // reach the page (tests/home-strip.test.tsx reads ShipkitGui.swift).
10
- export type PageKey = { t: 'repo'; n: number } | { t: 'step'; by: -1 | 1 } | { t: 'home' } | { t: 'inbox' } | { t: 'planned' } | { t: 'activity' } | { t: 'insights' } | { t: 'picker' } | { t: 'dock' } | { t: 'rail' }
11
+ export type PageKey = { t: 'repo'; n: number } | { t: 'step'; by: -1 | 1 } | { t: 'home' } | { t: 'inbox' } | { t: 'planned' } | { t: 'activity' } | { t: 'insights' } | { t: 'picker' } | { t: 'search' } | { t: 'dock' } | { t: 'rail' }
11
12
 
12
13
  type KeyLike = { key: string; code: string; metaKey: boolean; ctrlKey: boolean; shiftKey: boolean; altKey: boolean }
13
14
 
@@ -15,6 +16,8 @@ export function pageKey(e: KeyLike): PageKey | null {
15
16
  if (!(e.metaKey || e.ctrlKey) || e.altKey) return null
16
17
  const digit = /^Digit([1-9])$/.exec(e.code)
17
18
  if (digit != null) return { t: 'repo', n: Number(digit[1]) }
19
+ // AZERTY types the slash with shift, so a slash with shift is still the search
20
+ if (e.key === '/' || (e.code === 'Slash' && !e.shiftKey)) return { t: 'search' }
18
21
  if (e.shiftKey) return e.code === 'KeyB' || e.key.toLowerCase() === 'b' ? { t: 'dock' } : null
19
22
  if (e.key === 'ArrowUp') return { t: 'step', by: -1 }
20
23
  if (e.key === 'ArrowDown') return { t: 'step', by: 1 }
@@ -33,23 +36,33 @@ export function pageKey(e: KeyLike): PageKey | null {
33
36
  export const PLACE_KEY: Record<'overview' | 'inbox' | 'planned' | 'activity' | 'insights', string> & Partial<Record<string, string>> = { overview: '⌘K', inbox: '⌘I', planned: "⌘'", activity: '⌘L', insights: '⌘;' }
34
37
  /** the picker's shortcut, on the first button, before home */
35
38
  export const PICKER_KEY = '⌘J'
36
- /** the repo above and below, hinted at the project list's foot */
39
+ /** the global search: the picker, on the rail's first row */
40
+ export const FIND_KEY = '⌘/'
41
+ /** the entry above and below in the rail, hinted at the project list's foot */
37
42
  export const STEP_KEYS = ['⌘↑', '⌘↓'] as const
38
43
  /** the dock's shortcut, on the dock's own header */
39
44
  export const DOCK_KEY = '⌘⇧B'
40
45
  /** the project list between its full width and its icon rail */
41
46
  export const RAIL_KEY = '⌘B'
42
47
 
43
- /** the tree's filter, on a repo page: a plain `/` focuses it, and its
44
- * badge at the input's right prints this */
45
- export const SEARCH_KEY = '/'
48
+ /** the side lists of a page, left of its content: B its main list (a repo's tree, an identity's rows, a home page's
49
+ * own), C the list a page of its own draws (the review page's cards, a trailer's cuts). The rail, A, takes ⌘ */
50
+ export type SideLevel = 'b' | 'c'
51
+ /** `/` focuses C's filter, `⇧/` B's; ↑ ↓ step C, ⇧↑ ⇧↓ step B, each step opening the entry it lands on. A page with
52
+ * no C list gives them to B (side-lists.ts). Plain keys, so a text field keeps them */
53
+ export type ListKey = { t: 'find'; list: SideLevel } | { t: 'step'; list: SideLevel; by: -1 | 1 }
46
54
 
47
- /** in the filter, up and down walk the tree rows the filter keeps; left
48
- * and right stay the text caret's */
49
- export const isTreeWalk = (key: string): boolean => key === 'ArrowUp' || key === 'ArrowDown'
55
+ /** the hint at the right of C's filter, and of B's */
56
+ export const SEARCH_KEY = '/'
57
+ export const SEARCH_B_KEY = '⇧/'
50
58
 
51
- export function isSearchKey(e: Pick<KeyLike, 'key' | 'metaKey' | 'ctrlKey' | 'altKey'>): boolean {
52
- return e.key === SEARCH_KEY && !e.metaKey && !e.ctrlKey && !e.altKey
59
+ /** `?` is ⇧/ on a US layout and ⇧, on AZERTY, whose slash itself takes shift, so `/` with or without shift is C's */
60
+ export function listKey(e: KeyLike): ListKey | null {
61
+ if (e.metaKey || e.ctrlKey || e.altKey) return null
62
+ if (e.key === '?') return { t: 'find', list: 'b' }
63
+ if (e.key === SEARCH_KEY) return { t: 'find', list: 'c' }
64
+ if (e.key === 'ArrowUp' || e.key === 'ArrowDown') return { t: 'step', list: e.shiftKey ? 'b' : 'c', by: e.key === 'ArrowUp' ? -1 : 1 }
65
+ return null
53
66
  }
54
67
 
55
68
  /** a repo page's sections, each on ⌥ and its letter. ⌥ because every other
@@ -59,10 +72,10 @@ export function isSearchKey(e: Pick<KeyLike, 'key' | 'metaKey' | 'ctrlKey' | 'al
59
72
  * plus a letter only types a character inside a text field, where the page
60
73
  * leaves the key alone. Read from the physical key (`code`): on a Mac ⌥C
61
74
  * types ç, and AZERTY moves the letters */
62
- export type SectionId = 'readme' | 'contracts' | 'shipkit' | 'repo' | 'secrets' | 'when' | 'runs' | 'plan' | 'processes' | 'git' | 'commands' | 'asks' | 'review' | 'reflections' | 'tests' | 'media' | 'trailer' | 'stores' | 'releases' | 'messages' | 'veille' | 'comms' | 'social' | 'wikis' | 'admin'
63
- export const SECTION_LETTER: Record<SectionId, string> = { readme: 'E', review: 'V', trailer: 'L', stores: 'B', releases: 'H', messages: 'J', veille: 'Y', comms: 'U', social: 'I', contracts: 'K', shipkit: 'S', repo: 'C', secrets: 'X', when: 'O', runs: 'R', plan: 'N', processes: 'P', git: 'G', commands: 'Q', asks: 'A', reflections: 'F', tests: 'T', media: 'M', wikis: 'W', admin: 'D' }
75
+ export type SectionId = 'readme' | 'contracts' | 'shipkit' | 'repo' | 'secrets' | 'when' | 'runs' | 'plan' | 'processes' | 'urls' | 'git' | 'commands' | 'asks' | 'review' | 'reflections' | 'tests' | 'media' | 'trailer' | 'stores' | 'releases' | 'messages' | 'veille' | 'comms' | 'social' | 'wikis' | 'admin'
76
+ export const SECTION_LETTER: Record<SectionId, string> = { readme: 'E', review: 'V', trailer: 'L', stores: 'B', releases: 'H', messages: 'J', veille: 'Y', comms: 'U', social: 'I', contracts: 'K', shipkit: 'S', repo: 'C', secrets: 'X', when: 'O', runs: 'R', plan: 'N', processes: 'P', urls: 'Z', git: 'G', commands: 'Q', asks: 'A', reflections: 'F', tests: 'T', media: 'M', wikis: 'W', admin: 'D' }
64
77
  /** a section's words on its row, where the id alone would not say it */
65
- export const SECTION_LABEL: Partial<Record<SectionId, string>> = { shipkit: 'shipkit checks', repo: 'repo checks' }
78
+ export const SECTION_LABEL: Partial<Record<SectionId, string>> = { shipkit: 'shipkit checks', repo: 'repo checks', review: 'threads' }
66
79
  export const sectionLabel = (id: SectionId): string => SECTION_LABEL[id] ?? id
67
80
  /** the badge at the end of a section's line */
68
81
  export const sectionKeyLabel = (id: SectionId): string => `⌥${SECTION_LETTER[id]}`
@@ -0,0 +1,26 @@
1
+ // a part of a long page drawn once it nears the screen of its scroll box: a page opened by a step draws what shows and
2
+ // what is a screen away, and the rest stays a box of its guessed height until a scroll brings it near. A step that
3
+ // draws every entry of a long list at once costs hundreds of ms (100 message cards, their clips autoplaying)
4
+ import { useEffect, useRef, useState, type ReactNode } from 'react'
5
+
6
+ /** how far past its scroll box an entry is drawn already: one box height each way */
7
+ const REACH = '100% 0px'
8
+
9
+ /** `eager` draws it in the frame that opens the page: the first entries, so the step shows them at once */
10
+ export function Later({ eager, guess, children }: { eager: boolean; guess: number; children: ReactNode }): ReactNode {
11
+ const [near, setNear] = useState(eager)
12
+ const box = useRef<HTMLDivElement | null>(null)
13
+ useEffect(() => {
14
+ const el = box.current
15
+ if (near || el == null) return
16
+ // a page with no observer draws it all, as before
17
+ if (typeof IntersectionObserver === 'undefined') return setNear(true)
18
+ const io = new IntersectionObserver((es) => { if (es.some((e) => e.isIntersecting)) setNear(true) }, { root: el.closest('.rv-scroll'), rootMargin: REACH })
19
+ io.observe(el)
20
+ return () => io.disconnect()
21
+ }, [near])
22
+ return near ? children : <div ref={box} className="later" style={{ height: guess }} />
23
+ }
24
+
25
+ /** the entries of a list a step opens drawn in its own frame */
26
+ export const EAGER = 2
@@ -0,0 +1,14 @@
1
+ // a page's own list's filter field (the review's cards, the asks): `/` focuses it from anywhere on the page, ↑ ↓ in it
2
+ // step the list it filters, Escape empties it and gives the keys back (list-walk.ts filterKey)
3
+ import { SEARCH_KEY } from './keys.ts'
4
+ import { filterKey, type SideList } from './list-walk.ts'
5
+
6
+ export function ListFilter(p: { side: SideList; value: string; set: (v: string) => void; keep: (el: HTMLInputElement | null) => void; placeholder: string; label: string }) {
7
+ return (
8
+ <span className="sfield">
9
+ <input ref={p.keep} className="rv-search" placeholder={p.placeholder} aria-label={p.label} value={p.value} onChange={(e) => p.set(e.currentTarget.value)}
10
+ onKeyDown={(e) => filterKey(p.side, () => p.set(''), e)} />
11
+ <kbd className="skey" title="/ focuses the search from anywhere on the page">{SEARCH_KEY}</kbd>
12
+ </span>
13
+ )
14
+ }
@@ -1,7 +1,7 @@
1
1
  // the arrows over a list of rows: the one keyboard model of the hub's lists, the repo tree (tree-svc.ts) and the
2
2
  // identity view (identities-st.ts). ↑ ↓ land on the row above or below, stepping over inert ones; → unfolds a folded
3
- // row, else steps down; ← folds an unfolded row, else climbs to its parent; Enter and space open the row. What landing
4
- // and opening do is the host's
3
+ // row, else steps down; ← folds an unfolded row, else climbs to its parent; Enter and space open the row. With no
4
+ // cursor the row is the one of the page shown. What landing and opening do is the host's
5
5
  export type WalkRow = { key: string; depth: number; dir: boolean }
6
6
 
7
7
  export type WalkHost<R extends WalkRow> = {
@@ -36,7 +36,13 @@ function move<R extends WalkRow>(h: WalkHost<R>, d: number): void {
36
36
  h.land(rows[next]!)
37
37
  }
38
38
 
39
- const cur = <R extends WalkRow>(h: WalkHost<R>): R | null => h.rows.find((r) => r.key === h.cursor) ?? null
39
+ const cur = <R extends WalkRow>(h: WalkHost<R>): R | null => h.rows[from(h)] ?? null
40
+
41
+ /** whether ← or → would fold or unfold the row the walk stands on: the one case a page with ← → of its own gives way */
42
+ export function foldsOn<R extends WalkRow>(h: WalkHost<R>, k: string): boolean {
43
+ const r = cur(h)
44
+ return r != null && r.dir && (k === 'ArrowRight' ? !h.isOpen(r.key) : k === 'ArrowLeft' && h.isOpen(r.key))
45
+ }
40
46
 
41
47
  function right<R extends WalkRow>(h: WalkHost<R>): void {
42
48
  const r = cur(h)
@@ -87,3 +93,66 @@ export class WalkEntry {
87
93
  return h
88
94
  }
89
95
  }
96
+
97
+ /** a side list as its keys see it (keys.ts listKey): its entries in the order drawn, the one shown, how one opens, and
98
+ * the field `/` focuses. A page declares its list with this and writes no key of its own (side-lists.ts) */
99
+ export type SideList = {
100
+ readonly ids: readonly string[]
101
+ readonly current: string | null
102
+ open(id: string): void
103
+ readonly filter: HTMLInputElement | null
104
+ }
105
+
106
+ /** the entry above (-1) or below (+1) the one shown, opened; from none, the first or the last, and the ends hold.
107
+ * True = the key was the list's, even at an end, so the page does not also scroll */
108
+ export function stepSide(l: SideList, by: -1 | 1): boolean {
109
+ const ids = l.ids
110
+ if (ids.length === 0) return false
111
+ const at = l.current == null ? -1 : ids.indexOf(l.current)
112
+ const next = at === -1 ? (by > 0 ? 0 : ids.length - 1) : at + by
113
+ if (next >= 0 && next < ids.length && next !== at) l.open(ids[next]!)
114
+ return true
115
+ }
116
+
117
+ /** a side list from four reads, each read when the keys ask, so it follows the page's state */
118
+ export const sideOf = (o: { ids: () => readonly string[]; current: () => string | null; open: (id: string) => void; filter?: () => HTMLInputElement | null }): SideList => ({
119
+ get ids() {
120
+ return o.ids()
121
+ },
122
+ get current() {
123
+ return o.current()
124
+ },
125
+ open: o.open,
126
+ get filter() {
127
+ return o.filter?.() ?? null
128
+ },
129
+ })
130
+
131
+ /** a walked list (the repo tree, an identity's rows) as a side list: its inert rows are no entries, the cursor's row
132
+ * or the page shown's is the current one, and an entry opens as an arrow landing on it */
133
+ export const walkSide = <R extends WalkRow>(h: WalkHost<R>, filter: () => HTMLInputElement | null): SideList =>
134
+ sideOf({
135
+ ids: () => h.rows.filter((r) => !h.inert(r)).map((r) => r.key),
136
+ current: () => {
137
+ const rows = h.rows
138
+ return rows.find((r) => r.key === h.cursor)?.key ?? rows[h.home(rows)]?.key ?? null
139
+ },
140
+ open: (id) => {
141
+ const r = h.rows.find((x) => x.key === id)
142
+ if (r != null) h.land(r)
143
+ },
144
+ filter,
145
+ })
146
+
147
+ type FieldKey = { key: string; shiftKey: boolean; metaKey: boolean; ctrlKey: boolean; altKey: boolean; preventDefault(): void; currentTarget: { blur(): void } }
148
+
149
+ /** a list's filter field: ↑ ↓ step the list it filters, Escape empties it and gives the focus back to the list (the
150
+ * page's keys reach it again); `clear` empties it */
151
+ export function filterKey(l: SideList, clear: () => void, e: FieldKey): void {
152
+ if (e.metaKey || e.ctrlKey || e.altKey) return
153
+ if (e.key === 'Escape') {
154
+ clear()
155
+ e.currentTarget.blur()
156
+ e.preventDefault()
157
+ } else if ((e.key === 'ArrowUp' || e.key === 'ArrowDown') && !e.shiftKey && stepSide(l, e.key === 'ArrowUp' ? -1 : 1)) e.preventDefault()
158
+ }