rvlib-shipkit 2.26.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 (442) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/package.json +1 -1
  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 +6 -4
  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 +122 -21
  11. package/src/agent-time/report-cache.ts +57 -0
  12. package/src/agent-time/report.ts +314 -40
  13. package/src/agent-time/shape.ts +50 -3
  14. package/src/agent-time/store.ts +320 -99
  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/SK047-login-in-description.check.ts +36 -0
  34. package/src/checks/SK048-one-local-file.check.ts +36 -0
  35. package/src/cli/cmd_Asks.ts +71 -5
  36. package/src/cli/cmd_Backup.ts +2 -2
  37. package/src/cli/cmd_Capacity.ts +2 -2
  38. package/src/cli/cmd_CrossRepoActivity.ts +5 -4
  39. package/src/cli/cmd_Db.ts +253 -0
  40. package/src/cli/cmd_History.ts +212 -0
  41. package/src/cli/cmd_Home.ts +31 -3
  42. package/src/cli/cmd_Hq.ts +516 -0
  43. package/src/cli/cmd_Machines.ts +36 -0
  44. package/src/cli/cmd_Media.ts +38 -6
  45. package/src/cli/cmd_Reflect.ts +23 -2
  46. package/src/cli/cmd_Review.ts +548 -116
  47. package/src/cli/cmd_Secret.ts +62 -12
  48. package/src/cli/cmd_Social.ts +83 -1
  49. package/src/cli/cmd_Space.ts +324 -0
  50. package/src/cli/cmd_Time.ts +76 -5
  51. package/src/cli/cmd_Tmp.ts +28 -4
  52. package/src/cli/cmd_Trailer.ts +14 -10
  53. package/src/cli/cmd_Urls.ts +56 -0
  54. package/src/cli/cmd_Vault.ts +583 -0
  55. package/src/cli/family-help.ts +4 -2
  56. package/src/cli/family-pages.ts +1 -1
  57. package/src/cli/registry.ts +24 -3
  58. package/src/collections/actions.ts +63 -13
  59. package/src/collections/collection-types.ts +23 -1
  60. package/src/collections/providers.ts +117 -23
  61. package/src/collections/review.ts +4 -4
  62. package/src/contracts/contract-manifests.ts +6 -5
  63. package/src/contracts/contract-types.ts +6 -4
  64. package/src/contracts/contracts-engine.ts +11 -0
  65. package/src/contracts/manifests/chrome-web-store.contract.ts +31 -0
  66. package/src/core/budget.ts +12 -17
  67. package/src/core/capacity.ts +27 -18
  68. package/src/core/check-runner.ts +7 -4
  69. package/src/core/layout.ts +3 -0
  70. package/src/core/machine-busy.ts +127 -0
  71. package/src/core/machine-commit.ts +6 -1
  72. package/src/core/machine-db.ts +368 -20
  73. package/src/core/machine-layout.ts +137 -0
  74. package/src/core/machine-read.ts +81 -0
  75. package/src/core/migrate-layout.ts +1 -1
  76. package/src/core/one-way-in-policy.ts +64 -7
  77. package/src/core/polling-policy.ts +27 -0
  78. package/src/core/retention.ts +16 -2
  79. package/src/core/scope.ts +107 -14
  80. package/src/core/slots.ts +5 -4
  81. package/src/drill/clean.ts +25 -1
  82. package/src/drill/run.ts +1 -1
  83. package/src/drill/seal.ts +27 -4
  84. package/src/home/activity-shape.ts +2 -0
  85. package/src/home/activity.ts +66 -3
  86. package/src/home/app-sign.ts +15 -4
  87. package/src/home/daemon-jobs.ts +149 -7
  88. package/src/home/database-projects.ts +111 -0
  89. package/src/home/database-words.ts +203 -0
  90. package/src/home/databases.ts +460 -0
  91. package/src/home/global-units.ts +6 -0
  92. package/src/home/gui-app/ShipkitGui.swift +122 -1
  93. package/src/home/gui-app.ts +6 -3
  94. package/src/home/home-move.ts +514 -0
  95. package/src/home/home-paths.ts +12 -3
  96. package/src/home/home-routes.ts +68 -0
  97. package/src/home/inbox-shape.ts +24 -14
  98. package/src/home/machine-fold.ts +820 -0
  99. package/src/home/machine-host.ts +20 -5
  100. package/src/home/machine-repair.ts +503 -0
  101. package/src/home/machine-stores.ts +66 -15
  102. package/src/home/machine-temp.ts +547 -86
  103. package/src/home/resume.ts +79 -0
  104. package/src/home/run-daemon.ts +25 -4
  105. package/src/home/run-pm.ts +18 -5
  106. package/src/home/serve-daemon.ts +18 -3
  107. package/src/home/serve-web.ts +175 -7
  108. package/src/home/space-job.ts +115 -0
  109. package/src/home/space-page.ts +257 -0
  110. package/src/home/space-route.ts +167 -0
  111. package/src/home/space-words.ts +103 -0
  112. package/src/home/time-page-shape.ts +202 -0
  113. package/src/home/time-page.ts +64 -0
  114. package/src/home/vault-page.ts +482 -0
  115. package/src/home/vault-words.ts +132 -0
  116. package/src/hooks/leak-guard.ts +40 -13
  117. package/src/hooks/one-way-in-guard.ts +17 -4
  118. package/src/hq/cards.ts +581 -0
  119. package/src/hq/door-route.ts +43 -0
  120. package/src/hq/door.ts +163 -0
  121. package/src/hq/files-send.ts +348 -0
  122. package/src/hq/forgotten-log.ts +35 -0
  123. package/src/hq/history-check.ts +255 -0
  124. package/src/hq/history-place.ts +146 -0
  125. package/src/hq/history-send.ts +487 -0
  126. package/src/hq/hq-db.ts +99 -0
  127. package/src/hq/hq-local.ts +469 -0
  128. package/src/hq/hq-routes.ts +196 -0
  129. package/src/hq/hq-store.ts +599 -0
  130. package/src/hq/kinds/ask.ts +147 -0
  131. package/src/hq/kinds/card-gone.ts +83 -0
  132. package/src/hq/kinds/card-msg.ts +66 -0
  133. package/src/hq/kinds/card.ts +99 -0
  134. package/src/hq/kinds/index.ts +21 -0
  135. package/src/hq/kinds/kind.ts +126 -0
  136. package/src/hq/kinds/media.ts +125 -0
  137. package/src/hq/kinds/prompt.ts +219 -0
  138. package/src/hq/kinds/reflection.ts +128 -0
  139. package/src/hq/kinds/report.ts +55 -0
  140. package/src/hq/kinds/time-day.ts +236 -0
  141. package/src/hq/ledger.ts +473 -0
  142. package/src/hq/machine-key.ts +44 -0
  143. package/src/hq/machine-notes.ts +131 -0
  144. package/src/hq/outbox.ts +372 -0
  145. package/src/hq/replica.ts +168 -0
  146. package/src/hq/repo-id.ts +4 -0
  147. package/src/hq/report-facts.ts +117 -0
  148. package/src/hq/report.ts +274 -0
  149. package/src/hq/switch.ts +151 -0
  150. package/src/hq/vault-grant.ts +92 -0
  151. package/src/identities/identities.ts +15 -3
  152. package/src/identities/steps.ts +31 -0
  153. package/src/ledger/db.ts +73 -26
  154. package/src/ledger/gate-checks.ts +6 -2
  155. package/src/ledger/run-log.ts +11 -3
  156. package/src/ledger/store.ts +26 -4
  157. package/src/media-store/backup/daemon.ts +25 -17
  158. package/src/media-store/backup/kept.ts +241 -0
  159. package/src/media-store/backup/restore.ts +14 -4
  160. package/src/media-store/backup/run.ts +11 -11
  161. package/src/media-store/backup/secret.ts +6 -4
  162. package/src/media-store/backup/snapshot.ts +4 -2
  163. package/src/media-store/backup/sources.ts +67 -16
  164. package/src/media-store/copy/config.ts +77 -0
  165. package/src/media-store/copy/copy.ts +194 -0
  166. package/src/media-store/copy/lifecycle.ts +43 -0
  167. package/src/media-store/copy/night.ts +90 -0
  168. package/src/media-store/copy/proof.ts +151 -0
  169. package/src/media-store/copy/snapshot.ts +152 -0
  170. package/src/media-store/copy/store.ts +62 -0
  171. package/src/media-store/copy/stream.ts +176 -0
  172. package/src/media-store/daemon.ts +66 -16
  173. package/src/media-store/db.ts +22 -11
  174. package/src/media-store/forget.ts +23 -3
  175. package/src/media-store/hand.ts +4 -3
  176. package/src/media-store/hq-find.ts +75 -0
  177. package/src/media-store/hq-send.ts +277 -0
  178. package/src/media-store/kind.ts +2 -0
  179. package/src/media-store/purge.ts +18 -15
  180. package/src/media-store/put.ts +24 -8
  181. package/src/media-store/remote.ts +16 -7
  182. package/src/media-store/space-listing.ts +240 -0
  183. package/src/media-store/space.ts +40 -21
  184. package/src/media-store/sync.ts +5 -5
  185. package/src/media-store/tidy.ts +98 -0
  186. package/src/media-store/upload.ts +3 -3
  187. package/src/media-store/webp.ts +66 -0
  188. package/src/messages/model.ts +16 -7
  189. package/src/messages/routes.ts +14 -4
  190. package/src/messages/score.ts +2 -2
  191. package/src/messages/suggest.ts +96 -0
  192. package/src/pages/frame-client.ts +10 -0
  193. package/src/plan/planner.ts +28 -17
  194. package/src/recordings/media-kind.ts +1 -0
  195. package/src/recordings/model.ts +1 -1
  196. package/src/recordings/recorder-app/Capture.swift +9 -7
  197. package/src/reflect/hq-corpus.ts +56 -0
  198. package/src/reflect/prompt-corpus.ts +3 -1
  199. package/src/reflect/transcript.ts +129 -37
  200. package/src/release/machine-words.ts +67 -0
  201. package/src/release/public-clean.ts +8 -3
  202. package/src/releases/from-card.ts +1 -1
  203. package/src/releases/routes.ts +10 -5
  204. package/src/releases/store.ts +10 -1
  205. package/src/repo-config.ts +32 -2
  206. package/src/review/anim.ts +2 -2
  207. package/src/review/auto.ts +2 -2
  208. package/src/review/card-db.ts +244 -0
  209. package/src/review/card-rows.ts +266 -0
  210. package/src/review/cells.ts +76 -5
  211. package/src/review/draft-card.ts +41 -0
  212. package/src/review/draft-model.ts +78 -0
  213. package/src/review/format.ts +29 -10
  214. package/src/review/gone.ts +98 -0
  215. package/src/review/inbox-hook.ts +4 -4
  216. package/src/review/marks.ts +1 -1
  217. package/src/review/media-kind.ts +7 -5
  218. package/src/review/media-read.ts +9 -7
  219. package/src/review/media.ts +32 -5
  220. package/src/review/model.ts +202 -39
  221. package/src/review/move.ts +491 -0
  222. package/src/review/notes.ts +12 -20
  223. package/src/review/previews.ts +15 -19
  224. package/src/review/project.ts +1 -1
  225. package/src/review/rev.ts +8 -0
  226. package/src/review/role.ts +1 -1
  227. package/src/review/routes.ts +64 -13
  228. package/src/review/stage-card.ts +8 -4
  229. package/src/review/stage-routes.ts +1 -1
  230. package/src/review/store.ts +529 -83
  231. package/src/review/thread-fold.ts +51 -0
  232. package/src/review/threads.ts +147 -9
  233. package/src/review/trailer-auto-mock.ts +63 -0
  234. package/src/review/trailer-card.ts +4 -4
  235. package/src/review/trailer-desk.ts +41 -7
  236. package/src/review/trailer-media.ts +1 -0
  237. package/src/review/trailer-model.ts +8 -0
  238. package/src/review/trailer-notes.ts +1 -1
  239. package/src/review/trailer-routes.ts +9 -1
  240. package/src/review/unit.ts +6 -6
  241. package/src/review/watchers.ts +1 -1
  242. package/src/rules/untrack-generated.ts +92 -8
  243. package/src/secrets/held.ts +16 -0
  244. package/src/secrets/keychain.ts +113 -0
  245. package/src/secrets/list.ts +16 -6
  246. package/src/secrets/manager.ts +24 -10
  247. package/src/secrets/read.ts +257 -0
  248. package/src/secrets/who-reads.ts +49 -0
  249. package/src/serve/door-forward.ts +268 -0
  250. package/src/serve/door-names.ts +47 -0
  251. package/src/serve/embed.ts +1 -1
  252. package/src/serve/hub-app/activity-view.tsx +56 -32
  253. package/src/serve/hub-app/activity.css +7 -1
  254. package/src/serve/hub-app/asks-page.tsx +48 -0
  255. package/src/serve/hub-app/asks-st.ts +25 -0
  256. package/src/serve/hub-app/clock-svc.ts +1 -2
  257. package/src/serve/hub-app/col-card.tsx +64 -13
  258. package/src/serve/hub-app/col-list-page.tsx +122 -0
  259. package/src/serve/hub-app/col-list-st.ts +103 -0
  260. package/src/serve/hub-app/col-tables-view.tsx +10 -41
  261. package/src/serve/hub-app/col-tables.ts +76 -8
  262. package/src/serve/hub-app/cols-svc.ts +70 -16
  263. package/src/serve/hub-app/database-st.ts +260 -0
  264. package/src/serve/hub-app/database-view.tsx +289 -0
  265. package/src/serve/hub-app/database.css +32 -0
  266. package/src/serve/hub-app/entry-bar.css +14 -0
  267. package/src/serve/hub-app/entry-bar.tsx +33 -0
  268. package/src/serve/hub-app/entry-pick.ts +31 -0
  269. package/src/serve/hub-app/floating.tsx +1 -0
  270. package/src/serve/hub-app/hash-route.ts +11 -1
  271. package/src/serve/hub-app/header-bar.tsx +14 -18
  272. package/src/serve/hub-app/home-st.ts +89 -9
  273. package/src/serve/hub-app/home-strip.css +5 -19
  274. package/src/serve/hub-app/home-strip.tsx +58 -92
  275. package/src/serve/hub-app/home.html +7 -0
  276. package/src/serve/hub-app/hub-app.tsx +31 -142
  277. package/src/serve/hub-app/hub-types.ts +3 -1
  278. package/src/serve/hub-app/hub.css +109 -23
  279. package/src/serve/hub-app/icons.tsx +18 -1
  280. package/src/serve/hub-app/identities-st.ts +56 -6
  281. package/src/serve/hub-app/identities-view.tsx +100 -58
  282. package/src/serve/hub-app/identities.css +17 -15
  283. package/src/serve/hub-app/identity-address.ts +5 -0
  284. package/src/serve/hub-app/inbox-st.ts +41 -24
  285. package/src/serve/hub-app/inbox-view.tsx +37 -41
  286. package/src/serve/hub-app/inbox.css +2 -5
  287. package/src/serve/hub-app/index.html +7 -0
  288. package/src/serve/hub-app/kept-cols.tsx +7 -0
  289. package/src/serve/hub-app/keys.ts +28 -15
  290. package/src/serve/hub-app/later.tsx +26 -0
  291. package/src/serve/hub-app/list-filter.tsx +14 -0
  292. package/src/serve/hub-app/list-walk.ts +72 -3
  293. package/src/serve/hub-app/machines-st.ts +251 -0
  294. package/src/serve/hub-app/machines-view.tsx +224 -0
  295. package/src/serve/hub-app/machines.css +76 -0
  296. package/src/serve/hub-app/md-copy.tsx +79 -0
  297. package/src/serve/hub-app/media-view.tsx +2 -0
  298. package/src/serve/hub-app/messages/messages-page.tsx +79 -7
  299. package/src/serve/hub-app/messages/messages-st.ts +99 -3
  300. package/src/serve/hub-app/messages.css +14 -0
  301. package/src/serve/hub-app/page-keys.ts +175 -0
  302. package/src/serve/hub-app/pages-frames.tsx +11 -3
  303. package/src/serve/hub-app/palette-st.ts +58 -11
  304. package/src/serve/hub-app/palette-view.tsx +3 -1
  305. package/src/serve/hub-app/project-list.css +54 -8
  306. package/src/serve/hub-app/project-list.tsx +128 -59
  307. package/src/serve/hub-app/projects-svc.ts +78 -7
  308. package/src/serve/hub-app/reader-chips.tsx +13 -0
  309. package/src/serve/hub-app/readme-view.tsx +2 -3
  310. package/src/serve/hub-app/readme.css +27 -5
  311. package/src/serve/hub-app/reflections-page.tsx +42 -0
  312. package/src/serve/hub-app/reflections-st.ts +17 -0
  313. package/src/serve/hub-app/releases/releases-page.tsx +25 -2
  314. package/src/serve/hub-app/releases/releases-st.ts +1 -1
  315. package/src/serve/hub-app/repo-sections.ts +9 -5
  316. package/src/serve/hub-app/repo-st.ts +35 -8
  317. package/src/serve/hub-app/review/draft-card.tsx +163 -0
  318. package/src/serve/hub-app/review/kit.tsx +50 -7
  319. package/src/serve/hub-app/review/note-place.ts +1 -1
  320. package/src/serve/hub-app/review/review-board.tsx +2 -2
  321. package/src/serve/hub-app/review/review-cells.tsx +145 -65
  322. package/src/serve/hub-app/review/review-kit.ts +27 -1
  323. package/src/serve/hub-app/review/review-list.tsx +68 -30
  324. package/src/serve/hub-app/review/review-page.tsx +7 -8
  325. package/src/serve/hub-app/review/review-st.ts +111 -24
  326. package/src/serve/hub-app/review/review-thread.tsx +49 -19
  327. package/src/serve/hub-app/review/review-views.tsx +475 -144
  328. package/src/serve/hub-app/review/thread-control-st.ts +115 -0
  329. package/src/serve/hub-app/review/thread-control.tsx +74 -0
  330. package/src/serve/hub-app/review/thread-st.ts +73 -26
  331. package/src/serve/hub-app/review/trailer-card.tsx +1 -1
  332. package/src/serve/hub-app/review/trailer-page.tsx +37 -16
  333. package/src/serve/hub-app/review/trailer-st.ts +41 -7
  334. package/src/serve/hub-app/review.css +267 -61
  335. package/src/serve/hub-app/side-lists.ts +72 -0
  336. package/src/serve/hub-app/sidebar.tsx +6 -3
  337. package/src/serve/hub-app/site/site-part.tsx +2 -8
  338. package/src/serve/hub-app/site/site-st.ts +4 -4
  339. package/src/serve/hub-app/social/comms-page.tsx +20 -5
  340. package/src/serve/hub-app/social/kit.tsx +30 -4
  341. package/src/serve/hub-app/social/post-card.tsx +139 -49
  342. package/src/serve/hub-app/social/serial-writes.ts +13 -0
  343. package/src/serve/hub-app/social/social-model.ts +11 -0
  344. package/src/serve/hub-app/social/social-page.tsx +94 -35
  345. package/src/serve/hub-app/social/social-st.ts +120 -36
  346. package/src/serve/hub-app/social/stage-popup.tsx +1 -1
  347. package/src/serve/hub-app/social/stage-st.ts +1 -1
  348. package/src/serve/hub-app/social/step-layout.ts +1 -1
  349. package/src/serve/hub-app/social.css +3 -0
  350. package/src/serve/hub-app/space-st.ts +209 -0
  351. package/src/serve/hub-app/space-view.tsx +196 -0
  352. package/src/serve/hub-app/space.css +27 -0
  353. package/src/serve/hub-app/stores/stores-page.tsx +91 -23
  354. package/src/serve/hub-app/stores/stores-st.ts +44 -19
  355. package/src/serve/hub-app/stores.css +6 -1
  356. package/src/serve/hub-app/theme-st.ts +22 -9
  357. package/src/serve/hub-app/time-charts.tsx +291 -0
  358. package/src/serve/hub-app/time-pages.tsx +749 -0
  359. package/src/serve/hub-app/time-st.ts +162 -0
  360. package/src/serve/hub-app/time-view.tsx +76 -0
  361. package/src/serve/hub-app/time.css +138 -0
  362. package/src/serve/hub-app/tree-build.ts +52 -42
  363. package/src/serve/hub-app/tree-row.tsx +4 -4
  364. package/src/serve/hub-app/tree-svc.ts +18 -9
  365. package/src/serve/hub-app/urls-svc.ts +154 -0
  366. package/src/serve/hub-app/urls-view.tsx +117 -0
  367. package/src/serve/hub-app/urls.css +30 -0
  368. package/src/serve/hub-app/vault-st.ts +127 -0
  369. package/src/serve/hub-app/vault-view.tsx +154 -0
  370. package/src/serve/hub-app/vault.css +38 -0
  371. package/src/serve/hub-app/veille/veille-st.ts +12 -10
  372. package/src/serve/hub-app/waiting-svc.ts +29 -0
  373. package/src/serve/hub-app/wikis-view.tsx +2 -2
  374. package/src/serve/hub-runtime.ts +15 -2
  375. package/src/serve/project-gutter-route.ts +27 -14
  376. package/src/serve/project-gutter.ts +25 -12
  377. package/src/serve/same-origin.ts +10 -0
  378. package/src/serve/serve-hub.ts +13 -4
  379. package/src/shipkit-files.ts +16 -2
  380. package/src/shipkit.ts +1 -1
  381. package/src/shot/shooter.ts +616 -420
  382. package/src/shot/shot-ask.ts +246 -155
  383. package/src/site/desk.ts +2 -2
  384. package/src/smoke/run-smoke.ts +3 -2
  385. package/src/social/cover.ts +202 -0
  386. package/src/social/discord-layout.ts +37 -13
  387. package/src/social/drafts.ts +3 -0
  388. package/src/social/load.ts +23 -2
  389. package/src/social/media-kind.ts +2 -1
  390. package/src/social/publish/discord.ts +5 -2
  391. package/src/social/publish/secret.ts +2 -2
  392. package/src/social/release-stage.ts +28 -13
  393. package/src/social/routes.ts +26 -1
  394. package/src/social/stage.ts +1 -1
  395. package/src/social/stats.ts +12 -9
  396. package/src/social/strip.ts +4 -1
  397. package/src/social/thumbnail.ts +255 -0
  398. package/src/stores/collection.ts +15 -11
  399. package/src/stores/desk.ts +236 -42
  400. package/src/stores/model.ts +72 -6
  401. package/src/stores/routes.ts +37 -12
  402. package/src/stores/unit.ts +14 -8
  403. package/src/suite/judge-suites.ts +41 -11
  404. package/src/suite/select.ts +45 -3
  405. package/src/suite/suite-cli.ts +16 -10
  406. package/src/trailer/bed.ts +1 -1
  407. package/src/trailer/build.ts +134 -21
  408. package/src/trailer/ffmpeg.ts +7 -0
  409. package/src/trailer/fonts.ts +3 -2
  410. package/src/trailer/grammar.ts +201 -2
  411. package/src/trailer/graph.ts +42 -5
  412. package/src/trailer/look.ts +21 -0
  413. package/src/trailer/mock.ts +154 -0
  414. package/src/trailer/passage.ts +65 -26
  415. package/src/trailer/score/heard.ts +89 -0
  416. package/src/trailer/score/sound.ts +14 -8
  417. package/src/trailer/sound/run.ts +16 -6
  418. package/src/trailer/stitch.ts +26 -5
  419. package/src/trailer/titles.ts +82 -19
  420. package/src/trailer/versions.ts +1 -3
  421. package/src/trailer/vertical.ts +3 -1
  422. package/src/urls/frame.ts +195 -0
  423. package/src/urls/routes.ts +43 -0
  424. package/src/urls/rows.ts +171 -0
  425. package/src/urls/unit.ts +73 -0
  426. package/src/vault/house-keys.ts +42 -0
  427. package/src/vault/layout.ts +50 -0
  428. package/src/vault/policy.ts +165 -0
  429. package/src/vault/vault-audit.ts +276 -0
  430. package/src/vault/vault-client.ts +40 -0
  431. package/src/vault/vault-config.ts +159 -0
  432. package/src/vault/vault-destroy.ts +78 -0
  433. package/src/vault/vault-handover.ts +305 -0
  434. package/src/vault/vault-http.ts +352 -0
  435. package/src/vault/vault-import.ts +208 -0
  436. package/src/vault/vault-init.ts +328 -0
  437. package/src/vault/vault-minter.ts +271 -0
  438. package/src/vault/vault-restore.ts +333 -0
  439. package/src/vault/vault-serve.ts +342 -0
  440. package/src/vault/vault-snapshot.ts +281 -0
  441. package/src/veille/asks.ts +1 -1
  442. package/src/veille/desk.ts +2 -2
@@ -1,7 +1,8 @@
1
1
  // a repo's releases page (`#page:releases[:<version>][?view=notes]`, wiki tools/shipkit/units.md, The release files):
2
2
  // the versions on a row, next first; the one shown as its title, its date, then two views of the same parsed release.
3
3
  // Cards: each category with its changes as cards, each its picture (its before a tab beside it), its words, its
4
- // bullets and a link to the review card it came from. Notes: the release as one long page to read, as a GitHub release shows its markdown. Read only:
4
+ // bullets and a link to the review card it came from. Notes: the release as one long page to read, as a GitHub release
5
+ // shows its markdown. Under its heading, its post in Communications: the draft it staged, next's preview. Read only:
5
6
  // the files are its source
6
7
  import { observer } from 'mobx-react-lite'
7
8
  import { useEffect } from 'react'
@@ -10,7 +11,9 @@ import { changeKey, isClip, isPrivate, NEXT, picturesOf, ratingOf, type Change,
10
11
  import { hashFor, type ReleasesTab } from '../hash-route.ts'
11
12
  import { renderMd } from '../md.ts'
12
13
  import type { RepoSt } from '../repo-st.ts'
14
+ import { NEXT_PICK } from '../social/social-model.ts'
13
15
  import type { ReleasesSt } from './releases-st.ts'
16
+ import { ThreadControl } from '../review/thread-control.tsx'
14
17
 
15
18
 
16
19
  const TABS: [ReleasesTab, string][] = [
@@ -83,7 +86,9 @@ export const ChangeCard = observer(({ rs, ch }: { rs: ReleasesSt; ch: Change })
83
86
  </div>
84
87
  ) : null}
85
88
  <div className="rel-words">
86
- <h3>{ch.title}</h3>
89
+ <h3>
90
+ {ch.title} <ThreadControl st={rs.st} address={`release:${rs.current?.version ?? 'next'}/${ch.title.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-|-$/g, '')}`} name={ch.title} />
91
+ </h3>
87
92
  <ChangeText ch={ch} />
88
93
  <Bullets ch={ch} />
89
94
  <footer>
@@ -135,6 +140,23 @@ const Notes = observer(({ rs, r }: { rs: ReleasesSt; r: Release }) => (
135
140
  </article>
136
141
  ))
137
142
 
143
+ /** the post a release stages, one click away in Communications: next's as a cut would stage it, a released version's
144
+ * draft, or that it staged none */
145
+ export const ReleasePost = ({ r, drafts }: { r: Release; drafts: Record<string, string> }) => {
146
+ const slug = r.version === NEXT ? NEXT_PICK : drafts[r.version]
147
+ return (
148
+ <p className="rel-hint rel-post">
149
+ {slug == null ? (
150
+ 'no post staged for this version'
151
+ ) : (
152
+ <a href={`#${hashFor({ t: 'comms', draft: slug })}`} title={r.version === NEXT ? 'not staged yet: the draft a release would stage from next.md' : `the draft ${slug}`}>
153
+ 📤 {r.version === NEXT ? 'its post, as the release would stage it' : 'its post draft in Communications'}
154
+ </a>
155
+ )}
156
+ </p>
157
+ )
158
+ }
159
+
138
160
  export const ReleasesPage = observer(({ app }: { app: RepoSt }) => {
139
161
  const rs = app.releases
140
162
  useEffect(() => {
@@ -172,6 +194,7 @@ export const ReleasesPage = observer(({ app }: { app: RepoSt }) => {
172
194
  <p className="rel-hint">
173
195
  {r.version === NEXT ? `being filled${r.kind ? `, a ${r.kind} release` : ', its kind unsaid'}` : r.date}, {changes} change{changes === 1 ? '' : 's'}
174
196
  </p>
197
+ <ReleasePost r={r} drafts={rs.view?.drafts ?? {}} />
175
198
  <div className="rtabs rel-tabs">
176
199
  {TABS.map(([t, label]) => (
177
200
  <button key={t} type="button" className={`rtab${rs.tab === t ? ' on' : ''}`} onClick={() => rs.showTab(t)}>
@@ -33,7 +33,7 @@ export class ReleasesSt {
33
33
  befores = new Set<string>()
34
34
  private started = 0
35
35
 
36
- constructor(private readonly st: RepoSt) {
36
+ constructor(readonly st: RepoSt) {
37
37
  makeAutoObservable<this, 'st' | 'started' | 'onBack'>(this, { st: false, started: false, onBack: false })
38
38
  }
39
39
 
@@ -40,6 +40,7 @@ export function sectionOfSel(sel: HashSel | null, ownerOf: (checkItemId: string)
40
40
  switch (sel.t) {
41
41
  case 'readme': return 'readme'
42
42
  case 'processes': return 'processes'
43
+ case 'urls': return 'urls'
43
44
  case 'plan': return 'plan'
44
45
  case 'git': return 'git'
45
46
  case 'commands': return 'commands'
@@ -89,6 +90,7 @@ export function openSection(app: RepoSt, id: SectionId): void {
89
90
  case 'secrets': return app.showCol('creds')
90
91
  case 'runs': return app.cols.select('runs', RUNS_ID)
91
92
  case 'processes': return app.showProcesses(null)
93
+ case 'urls': return app.showUrls(app.sel?.t === 'urls' ? app.sel.id : null)
92
94
  case 'plan': return app.showPlan()
93
95
  case 'git': return app.showGit()
94
96
  case 'commands': return app.showCommands(app.commands.cmd, app.commands.runId)
@@ -116,7 +118,7 @@ export function openSection(app: RepoSt, id: SectionId): void {
116
118
 
117
119
  /** the sections whose page says it is empty, so an empty row still opens it: the review and trailer pages say how a
118
120
  * first card or a first cut comes */
119
- const EMPTY_PAGES = new Set<SectionId>(['processes', 'review', 'trailer'])
121
+ const EMPTY_PAGES = new Set<SectionId>(['processes', 'urls', 'review', 'trailer'])
120
122
 
121
123
  export function repoSections(app: RepoSt): RepoSection[] {
122
124
  const has = (col: string): boolean => app.cols.colMeta.some((c) => c.id === col)
@@ -132,13 +134,13 @@ export function repoSections(app: RepoSt): RepoSection[] {
132
134
  const ownReds = (from: CheckOwner): number => res.filter((r) => r.check?.from === from && r.state === 'red').length
133
135
  const unless = (on: boolean, why: string): string | null => (on ? null : why)
134
136
  // review and trailer sit right under the readme: the pages he answers
135
- out.push(line('review', 'the review cards agents send you: approve, fix, reject, circle a detail', counted(res.filter((r) => r.type === 'card').length, 'warn'),
136
- unless(has(REVIEW_COL), 'no review card yet: an agent sends one with sk review add')))
137
+ out.push(line('review', 'the threads between you and the agents, your turn first: approve, fix, reject, circle a detail, answer a question, apply a change', counted(res.filter((r) => r.type === 'card').length, 'warn'),
138
+ unless(has(REVIEW_COL), 'no thread yet: an agent starts one with sk thread post <address>')))
137
139
  out.push(line('trailer', 'the trailer cuts: play one with its timeline, pin a note on any frame, record the lines your own voice reads', counted(res.filter((r) => r.type === 'voice').length, 'warn'),
138
140
  unless(has(TRAILER_COL), 'no trailer: write trailer/<name>/main.trailer, then sk trailer')))
139
141
  out.push(line('stores', 'the store pages (Steam, itch): every text to paste, every picture to upload, a note on each', none,
140
142
  unless(has(STORES_COL), 'no store page: write .shipkit/steam/store.md or .shipkit/itch/listing.md')))
141
- out.push(line('releases', 'the release notes: next first, then each version, each change a card with its picture and its review card', none,
143
+ out.push(line('releases', 'the release notes: next first, then each version, each change a card with its picture and its thread', none,
142
144
  unless(has(RELEASES_COL), 'no releases: an approved card sent with --changelog starts .shipkit/releases/next.md')))
143
145
  out.push(line('messages', 'the messages a public line says, each phrasing scored by simulated readers: value for its cost, personas, page tops, notes', none,
144
146
  unless(has(MESSAGES_COL), 'no messages: write .shipkit/messages/messages.md, then sk messages lint')))
@@ -160,10 +162,12 @@ export function repoSections(app: RepoSt): RepoSection[] {
160
162
  const procs = app.globalProcesses
161
163
  out.push(line('processes', 'the processes this repo declares: start, stop, open, their description and their log', counted(procs.filter((r) => r.dot === 'crashed').length, 'red'),
162
164
  unless(procs.length > 0, 'no process: this repo declares no global process (a <id>.shipkit.ts file with globalProcess adds one)')))
165
+ out.push(line('urls', 'every url of the repo, dev and prod: a click frames one, a click copies its login', none,
166
+ unless(app.urls.list.length > 0, 'no url: a global process with a url, a urls([...]) unit or smoke.base adds one')))
163
167
  if (app.home.machine != null) out.push(line('git', 'the branch, its upstream, what is not committed, the last commits', none))
164
168
  out.push(line('commands', "the repo's project CLI: every command with its description, run from here, its log live", counted(app.commands.running, 'warn'),
165
169
  unless(app.hasCli, 'no project CLI: package.json has no `cli` script')))
166
- const open = res.filter((r) => r.collection === 'asks' && r.type === 'ask' && r.slot !== 'done').length
170
+ const open = res.filter((r) => r.collection === 'asks' && r.type === 'ask' && r.slot !== 'done' && r.slot !== 'declined' && r.ask?.later !== true).length
167
171
  out.push(line('asks', 'what waits on a human', counted(open, 'warn'), unless(has('asks'), 'no asks: nothing has ever waited on a human here')))
168
172
  out.push(line('reflections', 'friction this repo logged against the wiki, waiting to be folded in', counted(res.filter((r) => r.type === 'reflection').length, 'warn'), unless(has('reflections'), 'no reflections: this repo logged no friction')))
169
173
  out.push(line('tests', 'every test file, slowest first, then each test check', counted(reds('tests'), 'red'), unless(has('tests'), 'no tests: this repo has no test file')))
@@ -30,11 +30,16 @@ import { ReleasesSt } from './releases/releases-st.ts'
30
30
  import { sectionKey } from './tree-build.ts'
31
31
  import type { MessagesTab } from '../../messages/tabs.ts'
32
32
  import { VeilleSt } from './veille/veille-st.ts'
33
+ import { ASK_LIST } from './asks-st.ts'
34
+ import { ColListSt } from './col-list-st.ts'
35
+ import type { AskGroupKey, ReflectionGroupKey } from './col-tables.ts'
36
+ import { REFLECTION_LIST } from './reflections-st.ts'
33
37
  import { SocialSt } from './social/social-st.ts'
34
38
  import { WikiSt } from './wiki-st.ts'
35
39
  import { PagesSvc } from './pages-svc.ts'
40
+ import { UrlsSvc } from './urls-svc.ts'
36
41
  import { repoSections } from './repo-sections.ts'
37
- import { isTreeWalk, sectionKeyLabel } from './keys.ts'
42
+ import { sectionKeyLabel } from './keys.ts'
38
43
  import { WalkEntry } from './list-walk.ts'
39
44
  import type { Resource } from './hub-types.ts'
40
45
  import type { HomeSt } from './home-st.ts'
@@ -43,9 +48,10 @@ export type Sel = HashSel | null
43
48
 
44
49
  /** one picker target (cmd+j): run() fires the SAME action clicking would */
45
50
  /** what a picker entry wears: a repo's own icon, or a place's button icon */
46
- export type JumpFace = { repo: string } | { place: 'home' | 'inbox' | 'planned' | 'activity' | 'insights' | 'recordings' | 'archived' } | { identity: string; account?: string }
51
+ export type JumpFace = { repo: string } | { place: 'home' | 'inbox' | 'machines' | 'database' | 'vault' | 'space' | 'planned' | 'activity' | 'insights' | 'time' | 'recordings' | 'archived' } | { identity: string; account?: string }
47
52
  /** `key`: the shortcut that does the same, printed at the entry's end */
48
- export type Jump = { id: string; label: string; section: string; run: () => void; face?: JumpFace; key?: string }
53
+ /** `repo`: the repo a target of another repo sits in, shown beside its label and matched by a query */
54
+ export type Jump = { id: string; label: string; section: string; run: () => void; face?: JumpFace; key?: string; repo?: string }
49
55
 
50
56
  /** all · needs (yellow+red) · red — one severity ladder for every section */
51
57
  export type Filter = 'all' | 'needs' | 'red'
@@ -93,6 +99,10 @@ export class RepoSt {
93
99
  releases: ReleasesSt
94
100
  /** the messages page: the store's messages, phrasings scored by each reader, its tabs (messages/messages-st.ts) */
95
101
  messages: MessagesSt
102
+ /** the asks page's own list: its bands, its filter, the ask shown (asks-st.ts) */
103
+ asks: ColListSt<AskGroupKey>
104
+ /** the reflections page's own list, the same shape (reflections-st.ts) */
105
+ reflections: ColListSt<ReflectionGroupKey>
96
106
  /** the Veille page: the posts its identity scrolls past, ranked, and a reply (veille/veille-st.ts) */
97
107
  veille: VeilleSt
98
108
  /** the Communications and Social pages: the repo's drafts, every identity and its accounts (social/social-st.ts) */
@@ -101,6 +111,8 @@ export class RepoSt {
101
111
  wiki: WikiSt
102
112
  /** the repo's own pages, each a frame of its process (pages-svc.ts) */
103
113
  pages: PagesSvc
114
+ /** every url of the repo and the copy of a login field (urls-svc.ts) */
115
+ urls: UrlsSvc
104
116
  sel: Sel = null
105
117
  filter: Filter = 'all'
106
118
  /** sidebar search — live substring filter over asset + collection rows */
@@ -145,10 +157,13 @@ export class RepoSt {
145
157
  this.releases = new ReleasesSt(this)
146
158
  this.messages = new MessagesSt(this)
147
159
  this.veille = new VeilleSt(this)
160
+ this.asks = new ColListSt(this, ASK_LIST)
161
+ this.reflections = new ColListSt(this, REFLECTION_LIST)
148
162
  this.social = new SocialSt(this)
149
163
  this.wiki = new WikiSt(this)
150
164
  this.pages = new PagesSvc(this)
151
- makeAutoObservable<this, 'beat' | 'onceRead' | 'entry'>(this, { onceRead: false, entry: false, home: false, key: false, base: false, clock: false, media: false, cols: false, tree: false, health: false, readme: false, checks: false, comfy: false, timeline: false, live: false, git: false, commands: false, tests: false, admin: false, review: false, trailer: false, stores: false, releases: false, messages: false, veille: false, social: false, wiki: false, pages: false, searchEl: false, beat: false })
165
+ this.urls = new UrlsSvc(this)
166
+ makeAutoObservable<this, 'beat' | 'onceRead' | 'entry'>(this, { onceRead: false, entry: false, home: false, key: false, base: false, clock: false, media: false, cols: false, tree: false, health: false, readme: false, checks: false, comfy: false, timeline: false, live: false, git: false, commands: false, tests: false, admin: false, review: false, trailer: false, stores: false, releases: false, messages: false, veille: false, asks: false, reflections: false, social: false, wiki: false, pages: false, urls: false, searchEl: false, beat: false })
152
167
  // a view or a filter changed on the review page: its address follows, the card unchanged
153
168
  reaction(
154
169
  () => (this.sel?.t === 'review' ? this.review.address : null),
@@ -233,6 +248,7 @@ export class RepoSt {
233
248
  this.cols.start()
234
249
  this.live.start()
235
250
  this.pages.start()
251
+ void this.urls.load()
236
252
  if (this.sel?.t === 'review') this.review.start()
237
253
  if (this.sel?.t === 'trailer') this.trailer.start()
238
254
  }
@@ -353,6 +369,7 @@ export class RepoSt {
353
369
  * lands on the raw wall of text unless it is asked for by name */
354
370
  openResource(r: Resource): void {
355
371
  if (r.type === 'process') return this.showProcesses(r.id.replace(/^process:/, ''))
372
+ if (r.type === 'url') return this.showUrls(r.id.replace(/^url:/, ''))
356
373
  if (r.type === 'command') return this.showCommands(r.id.replace(/^command:/, ''), null)
357
374
  if (r.type === 'card') return this.showReview(r.id.replace(/^card:/, ''))
358
375
  if (r.type === 'store') return this.showStores(r.id.replace(/^store:/, ''))
@@ -420,6 +437,16 @@ export class RepoSt {
420
437
  showProcesses(id: string | null): void {
421
438
  this.setSel({ t: 'processes', id })
422
439
  }
440
+ /** the urls page, `id` the url it frames, null for the list alone */
441
+ showUrls(id: string | null): void {
442
+ // the tree is the list: its url leaves show with the page
443
+ this.tree.reveal(sectionKey('urls'))
444
+ if (id != null) {
445
+ this.tree.cursor = `url:${id}`
446
+ void this.urls.probe(id)
447
+ }
448
+ this.setSel({ t: 'urls', id })
449
+ }
423
450
  /** the review page, `id` the card it opens, null for the first the list shows */
424
451
  showReview(id: string | null, q?: string): void {
425
452
  this.review.select(id)
@@ -429,10 +456,9 @@ export class RepoSt {
429
456
  if (this.polling) this.review.start()
430
457
  }
431
458
  /** a plain key the page shown claims for itself: the review page (V F R A N M, a clip's Space and arrows) and
432
- * the trailer page (its player keys), as the atelier takes its roll keys. True when the page used it. ↑ ↓ stay
433
- * the tree's while its cursor walks it, so a walk crosses these sections; a click in the page hands them back */
434
- pageKey(e: Pick<KeyboardEvent, 'key' | 'shiftKey'>): boolean {
435
- if (isTreeWalk(e.key) && !e.shiftKey && this.tree.cursor != null) return false
459
+ * the trailer page (its player keys), as the atelier takes its roll keys. True when the page used it. ↑ ↓ are
460
+ * never a page's: they step its list (side-lists.ts) */
461
+ pageKey(e: Pick<KeyboardEvent, 'key' | 'shiftKey'> & { altKey?: boolean }): boolean {
436
462
  return (this.sel?.t === 'review' && this.review.key(e)) || (this.sel?.t === 'trailer' && this.trailer.key(e)) || (this.sel?.t === 'stores' && this.stores.key(e)) || (this.sel?.t === 'veille' && this.veille.key(e)) || (this.sel?.t === 'comms' && this.social.key(e, 'comms')) || (this.sel?.t === 'social' && this.social.key(e, 'social'))
437
463
  }
438
464
  /** the trailer page on a trailer folder and one of its cuts, null for the first */
@@ -515,6 +541,7 @@ export class RepoSt {
515
541
  case 'admin': return this.showAdmin()
516
542
  case 'readme': return this.showReadme()
517
543
  case 'processes': return this.showProcesses(sel.id)
544
+ case 'urls': return this.showUrls(sel.id)
518
545
  case 'plan': return this.showPlan()
519
546
  case 'git': return this.showGit()
520
547
  case 'commands': return this.showCommands(sel.cmd, sel.run ?? null)
@@ -0,0 +1,163 @@
1
+ // a draft card's body (wiki tools/shipkit/threads.md, A post draft): the post draft itself, read live from the repo's
2
+ // desk. One block a message in the draft's order, drawn with the desk's own parts in their read form (nothing copies,
3
+ // edits or posts), his OK, fix or no and his word at the foot of each block, then what else the draft holds and its
4
+ // angle, folded. One line says what moved in the draft since the card was sent
5
+ import { observer } from 'mobx-react-lite'
6
+ import { useEffect, useRef, useState } from 'react'
7
+ import { changeLine, draftChange, pinOf, postChange, type DraftChange } from '../../../review/draft-model.ts'
8
+ import { postLabel, type DraftCard, type Item } from '../../../review/model.ts'
9
+ import { AutoText } from '../auto-text.tsx'
10
+ import { Caret } from '../icons.tsx'
11
+ import { Field, CopyFrame } from '../social/kit.tsx'
12
+ import { AngleCards, Length, MediaTile, PostFields, PostName } from '../social/post-card.tsx'
13
+ import type { Draft, SocialPost } from '../social/social-model.ts'
14
+ import type { SocialSt } from '../social/social-st.ts'
15
+ import { blurOnEscape } from './kit.tsx'
16
+ import { mark, ReactionToggles, SentReaction, takes, toneClass, type Ver } from './review-views.tsx'
17
+ import { cellDom, viewDom } from './thread-st.ts'
18
+
19
+ type DraftItem = Item & { draft: DraftCard }
20
+
21
+ /** the dom id of one message's block in a version */
22
+ const postDom = (id: string, key: string): string => `${cellDom(id)}-p-${key.replace(/[^a-z0-9-]/gi, '_')}`
23
+
24
+ export const DraftCardBody = observer(({ ver, item }: { ver: Ver; item: DraftItem }) => {
25
+ const { card, cell } = ver
26
+ const so = ver.rv.repo.social
27
+ const newest = cell.id === card.newest?.id
28
+ // read when the card shows, when the window comes back, and when the thread moves (an agent's word often follows an edit)
29
+ useEffect(() => (newest ? so.followDesk() : undefined), [so, newest])
30
+ const thread = card.data
31
+ useEffect(() => {
32
+ if (newest) void so.load()
33
+ }, [so, newest, thread])
34
+ const pinned = item.draft
35
+ if (!newest)
36
+ return (
37
+ <div className="dc-card past" id={viewDom(item.id, 0)}>
38
+ <span className="dc-name">📝 {pinned.slug}</span>
39
+ <span className="rv-dim">an older version of this card: the draft is read live, so its words now are on the newest version</span>
40
+ </div>
41
+ )
42
+ const d = so.draftOf(pinned.slug)
43
+ if (!d)
44
+ return (
45
+ <div className="dc-card" id={viewDom(item.id, 0)}>
46
+ <div className="dc-bar">
47
+ <span className="dc-name">📝 {pinned.slug}</span>
48
+ </div>
49
+ <div className="rv-empty">{so.desk ? `the draft ${pinned.slug} is no longer in this repo (moved or removed): nothing to show` : (so.loadError ?? so.waitText)}</div>
50
+ </div>
51
+ )
52
+ const change = draftChange(pinned, pinOf(d, (p) => so.postAccount(p)))
53
+ return (
54
+ <div className="dc-card" id={viewDom(item.id, 0)}>
55
+ <div className="dc-bar">
56
+ <span className="dc-name">📝 {d.title || d.slug}</span>
57
+ {d.kind ? <span className="dc-kind">{d.kind}</span> : null}
58
+ <span className="rv-dim">
59
+ {d.posts.length} place{d.posts.length > 1 ? 's' : ''}
60
+ </span>
61
+ <span className="sp" />
62
+ <a className="rv-dim rv-small" href={`#page:comms:${d.slug}`} onClick={(e) => { e.preventDefault(); so.openDraft(d.slug) }} title="the same draft on the Communications page, where it is posted from">
63
+ in Communications ↗
64
+ </a>
65
+ </div>
66
+ {change ? <div className="dc-changed" role="status">↻ {changeLine(change)}</div> : null}
67
+ {d.posts.map((post) => (
68
+ <PlaceBlock key={post.key} ver={ver} so={so} post={post} change={change} />
69
+ ))}
70
+ <Rest so={so} d={d} />
71
+ {d.angle ? <Angle d={d} /> : null}
72
+ </div>
73
+ )
74
+ })
75
+
76
+ /** one message of the draft: where it goes and its length against the place's max, its words and media as the desk
77
+ * draws them, then his answer on it */
78
+ const PlaceBlock = observer(({ ver, so, post, change }: { ver: Ver; so: SocialSt; post: SocialPost; change: DraftChange | null }) => {
79
+ const { card, cell } = ver
80
+ const a = so.postAccount(post)
81
+ const shown = card.reactionShown(cell, 0, undefined, post.key)
82
+ const moved = postChange(change, post.key)
83
+ if (!a) return null
84
+ const place = post.place === '' ? null : (a.places.find((x) => x.id === post.place) ?? null)
85
+ return (
86
+ <section id={postDom(cell.id, post.key)} className={`dc-place so-post${toneClass(shown?.status)}`} aria-label={postLabel(cell.item.draft, post.key)}>
87
+ <header className="dc-placehead so-posthead">
88
+ <PostName so={so} a={a} post={post} />
89
+ {moved ? <span className="dc-moved">{moved === 'new' ? 'new since this card' : 'changed since this card'}</span> : null}
90
+ <Length so={so} a={a} post={post} />
91
+ </header>
92
+ <PostFields so={so} a={a} post={post} place={place} head read />
93
+ <PlaceAnswer ver={ver} post={post.key} name={a.name} />
94
+ </section>
95
+ )
96
+ })
97
+
98
+ /** his answer on one message: what his last answer said of it, then OK, fix or no and his word. Fix or no puts the
99
+ * caret in the word: it says what to change */
100
+ const PlaceAnswer = observer(({ ver, post, name }: { ver: Ver; post: string; name: string }) => {
101
+ const { card, cell } = ver
102
+ const word = useRef<HTMLTextAreaElement | null>(null)
103
+ const sent = card.reactionSent(cell.id, 0, undefined, post)
104
+ const own = ver.live ? card.reactionOf(0, undefined, post) : null
105
+ return (
106
+ <div className="dc-answer">
107
+ {sent && !own ? (
108
+ <div className={`rv-said${toneClass(sent.status)}`}>
109
+ <span className="rv-saidwhere">{sent.status ? <SentReaction status={sent.status} /> : 'your word'}</span>
110
+ <span className="rv-saidtext">{sent.comment || <i className="rv-dim">no word</i>}</span>
111
+ </div>
112
+ ) : null}
113
+ {takes(ver) ? (
114
+ <div className="dc-answerline">
115
+ <ReactionToggles ver={ver} view={0} post={post} said={(s) => (s === 'approved' ? undefined : word.current?.focus())} />
116
+ <AutoText className="rv-word" el={(t) => { word.current = t }} placeholder={`a word on ${name}: what to change`} aria-label={`a word on ${name}`} value={own?.comment ?? ''}
117
+ onKeyDown={blurOnEscape} onText={(t) => mark(ver, () => card.setReactionComment(0, undefined, t, post))} />
118
+ </div>
119
+ ) : null}
120
+ </div>
121
+ )
122
+ })
123
+
124
+ /** what the draft holds that no block shows: the media no message posts by itself (a thumbnail), and the description
125
+ * that goes with its media */
126
+ const Rest = observer(({ so, d }: { so: SocialSt; d: Draft }) => {
127
+ const shown = new Set(d.posts.flatMap((p) => (p.media ? [p.media.name] : [])))
128
+ const others = d.media.filter((m) => !shown.has(m.name))
129
+ if (others.length === 0 && d.alt === '') return null
130
+ return (
131
+ <section className="dc-place dc-rest">
132
+ <header className="dc-placehead">
133
+ <b>Also in the draft</b>
134
+ <span className="rv-dim rv-small">no place posts these by themselves</span>
135
+ </header>
136
+ {others.length > 0 ? (
137
+ <div className="dc-others">
138
+ {others.map((m) => (
139
+ <MediaTile key={m.name} so={so} slug={d.slug} m={m} size="side" read />
140
+ ))}
141
+ </div>
142
+ ) : null}
143
+ {d.alt ? (
144
+ <Field label="Alt text of the media: what a screen reader says, never posted as a text">
145
+ <CopyFrame so={so} text={d.alt} k={`${d.slug}/alt`} read />
146
+ </Field>
147
+ ) : null}
148
+ </section>
149
+ )
150
+ })
151
+
152
+ /** the draft's angle (why, for whom, his steps), folded under the blocks: he judges the words first */
153
+ function Angle({ d }: { d: Draft }) {
154
+ const [open, setOpen] = useState(false)
155
+ return (
156
+ <section className="dc-angle">
157
+ <button className="dc-anglefold" aria-expanded={open} onClick={() => setOpen((o) => !o)}>
158
+ <Caret open={open} /> <b>Angle</b> <span className="rv-dim">why, for whom, the steps to post it</span>
159
+ </button>
160
+ {open ? <AngleCards angle={d.angle} /> : null}
161
+ </section>
162
+ )
163
+ }
@@ -2,6 +2,7 @@
2
2
  // spinner, who listens, the thumbnail. Colours come from review.css, which reads hub.css tokens
3
3
  import { observer } from 'mobx-react-lite'
4
4
  import { useEffect, useState } from 'react'
5
+ import { createPortal } from 'react-dom'
5
6
  import type { ThreadRow } from '../../../review/cells.ts'
6
7
  import { listenWords, type ReviewStatus, type ShownStatus, type Side } from '../../../review/model.ts'
7
8
  import type { ReviewSt } from './review-st.ts'
@@ -18,12 +19,23 @@ export const VERDICTS: { status: ReviewStatus; label: string; short: string; key
18
19
  ]
19
20
 
20
21
  /** the owner's reaction to a view or a tile, in the order of the toggles */
21
- export const REACTIONS: { status: ReviewStatus; label: string; tip: string; glyph: string }[] = [
22
- { status: 'approved', label: 'OK', tip: 'this image is right', glyph: '✓' },
23
- { status: 'approved-with-fix', label: 'Fix', tip: 'almost: a fix', glyph: '⚒' },
24
- { status: 'rejected', label: 'No', tip: 'this image is wrong', glyph: '✕' },
22
+ export const REACTIONS: { status: ReviewStatus; label: string; tip: string; glyph: string; key: string }[] = [
23
+ { status: 'approved', label: 'OK', tip: 'this image is right', glyph: '✓', key: 'V' },
24
+ { status: 'approved-with-fix', label: 'Fix', tip: 'almost: a fix', glyph: '⚒', key: 'F' },
25
+ { status: 'rejected', label: 'No', tip: 'this image is wrong', glyph: '✕', key: 'R' },
25
26
  ]
26
27
 
28
+ /** the same three said of one message of a draft card: what each means for a text and its place */
29
+ export const PLACE_TIPS: Record<string, string> = { approved: 'this text is right for this place', 'approved-with-fix': 'almost: say what to change', rejected: 'not this text, or not this place' }
30
+
31
+ /** the lightbox's key for a word on the image shown: 1 2 3, or V F R (each reaction's `key`, the letters of the card's
32
+ * verdict), which there speak of the image in front of the reader. Null for any other key */
33
+ export const boxReaction = (key: string): ReviewStatus | null =>
34
+ key.length !== 1 ? null : (REACTIONS[Math.max('123'.indexOf(key), REACTIONS.findIndex((r) => r.key === key.toUpperCase()))]?.status ?? null)
35
+
36
+ /** a key's chip inside the control it triggers; a device with no keyboard hides it (review.css) */
37
+ export const Key = ({ k }: { k: string }) => <kbd className="rv-key">{k}</kbd>
38
+
27
39
  export const PAIR_NAMES = { base: 'before', mod: 'after' }
28
40
  export const SIDE_LABEL: Record<Side, string> = { before: 'before', after: 'after' }
29
41
 
@@ -84,7 +96,7 @@ export const Rework = ({ r }: { r: ThreadRow['rework'] }) => {
84
96
  )
85
97
  }
86
98
 
87
- /** who listens, in words: the live `sk review watch` processes that read his answer on these cards; their pids only in the tooltip */
99
+ /** who listens, in words: the live `sk thread watch` processes that read his answer on these cards; their pids only in the tooltip */
88
100
  export const Listeners = observer(({ rv, heads }: { rv: ReviewSt; heads: readonly { lane?: string | undefined; session?: string | undefined }[] }) => {
89
101
  const ws = rv.listenersOf(heads)
90
102
  const on = ws.length > 0
@@ -93,8 +105,8 @@ export const Listeners = observer(({ rv, heads }: { rv: ReviewSt; heads: readonl
93
105
  className={`rv-listen${on ? ' on' : ''}`}
94
106
  title={
95
107
  on
96
- ? ws.map((w) => `sk review watch, pid ${w.pid}, ${w.lane ? `lane ${w.lane}` : w.session ? `session ${w.session.slice(0, 8)}` : 'every card'}, since ${when(w.started)}`).join('\n')
97
- : 'no sk review watch reads these cards: your answer will wait'
108
+ ? ws.map((w) => `sk thread watch, pid ${w.pid}, ${w.lane ? `lane ${w.lane}` : w.session ? `session ${w.session.slice(0, 8)}` : 'every card'}, since ${when(w.started)}`).join('\n')
109
+ : 'no sk thread watch reads these cards: your answer will wait'
98
110
  }
99
111
  >
100
112
  ◉ {listenWords(ws)}
@@ -110,3 +122,34 @@ export const ThumbOf = ({ rv, row }: { rv: ReviewSt; row: ThreadRow }) => {
110
122
 
111
123
  /** the page's empty pane: one line of dim words */
112
124
  export const Empty = ({ text }: { text: string }) => <div className="rv-empty">{text}</div>
125
+
126
+ /** an image of a message as a chat shows one: a preview at a small size, a click opens it full over the page; Escape, a
127
+ * click or ✕ closes it */
128
+ export const PreviewImg = ({ src, full, alt = '' }: { src: string; full?: string; alt?: string }) => {
129
+ const [open, setOpen] = useState(false)
130
+ useEffect(() => {
131
+ if (!open) return
132
+ const key = (e: KeyboardEvent): void => {
133
+ if (e.key === 'Escape') {
134
+ e.stopPropagation()
135
+ setOpen(false)
136
+ }
137
+ }
138
+ document.addEventListener('keydown', key, true)
139
+ return () => document.removeEventListener('keydown', key, true)
140
+ }, [open])
141
+ return (
142
+ <>
143
+ <button type="button" className="rv-preview" title="show it full" onMouseDown={keepFocus} onClick={() => setOpen(true)}>
144
+ <img src={src} alt={alt} loading="lazy" decoding="async" />
145
+ </button>
146
+ {open ? createPortal(
147
+ <div className="rv-lightbox" role="dialog" aria-label="the image, full" onClick={() => setOpen(false)}>
148
+ <img src={full ?? src} alt={alt} />
149
+ <a className="rv-lightboxopen" href={full ?? src} target="_blank" rel="noreferrer" onClick={(e) => e.stopPropagation()}>open ↗</a>
150
+ </div>,
151
+ document.body,
152
+ ) : null}
153
+ </>
154
+ )
155
+ }
@@ -1,4 +1,4 @@
1
- // where a rectangle's note box sits on its frame (wiki tools/shipkit/review-page.md): beside the rectangle, never over
1
+ // where a rectangle's note box sits on its frame (wiki tools/shipkit/threads-page.md): beside the rectangle, never over
2
2
  // it, inside the frame. Pure, in px from the frame's top left: the box and its tests share it
3
3
 
4
4
  export type PlaceBox = { x: number; y: number; w: number; h: number }
@@ -1,4 +1,4 @@
1
- // the dispatcher's board (wiki tools/shipkit/review.md, Raised items): what the owner, a player or a rule raised, by state,
1
+ // the dispatcher's board (wiki tools/shipkit/threads.md, Raised items): what the owner, a player or a rule raised, by state,
2
2
  // each with its topic and its worker, a stale claim marked (`GET /api/review/board`); who holds the dispatcher role. A row
3
3
  // opens its item
4
4
  import { observer } from 'mobx-react-lite'
@@ -20,7 +20,7 @@ export const ReviewBoard = observer(({ rv }: { rv: ReviewSt }) => {
20
20
  const open = rv.card?.data?.members ?? []
21
21
  return (
22
22
  <div className="rv-listscroll rv-board">
23
- <div className="rv-count">{role ? `dispatcher: ${role.name}, since ${role.since.slice(0, 16).replace('T', ' ')}` : 'dispatcher: nobody (sk review dispatcher --as <name>)'}</div>
23
+ <div className="rv-count">{role ? `dispatcher: ${role.name}, since ${role.since.slice(0, 16).replace('T', ' ')}` : 'dispatcher: nobody (sk thread dispatcher --as <name>)'}</div>
24
24
  {rows === null ? <div className="rv-empty"><span className="spin" /> reading the board…</div> : null}
25
25
  {STATES.map(({ state, label }) => {
26
26
  const of = (rows ?? []).filter((r) => r.state === state)