rvlib-shipkit 2.31.0 → 2.33.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 (408) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/package.json +1 -1
  3. package/src/advisors/acts.ts +16 -15
  4. package/src/advisors/advice.ts +56 -102
  5. package/src/advisors/advisor-view.ts +122 -76
  6. package/src/advisors/app-graph.ts +1 -1
  7. package/src/advisors/app.ts +3 -11
  8. package/src/advisors/cf-api.ts +1 -1
  9. package/src/advisors/dir-bucket.ts +4 -3
  10. package/src/advisors/edge/api.ts +20 -221
  11. package/src/advisors/edge/bucket.ts +2 -2
  12. package/src/advisors/edge/handler.ts +13 -155
  13. package/src/advisors/edge/here.ts +5 -5
  14. package/src/advisors/edge/pages.ts +12 -9
  15. package/src/advisors/edge/shell.ts +6 -5
  16. package/src/advisors/edge/sign-in.ts +101 -36
  17. package/src/advisors/edge/status.ts +19 -6
  18. package/src/advisors/edge/types.ts +36 -60
  19. package/src/advisors/expose.ts +29 -29
  20. package/src/advisors/here.ts +12 -12
  21. package/src/advisors/invite-send.ts +79 -35
  22. package/src/advisors/invite.ts +31 -8
  23. package/src/advisors/job.ts +24 -16
  24. package/src/advisors/login.ts +40 -15
  25. package/src/advisors/owner-store.ts +46 -22
  26. package/src/advisors/photos.ts +3 -3
  27. package/src/advisors/project.ts +27 -25
  28. package/src/advisors/reach.ts +89 -0
  29. package/src/advisors/rights.ts +1 -1
  30. package/src/advisors/routes.ts +55 -74
  31. package/src/advisors/scan.ts +0 -4
  32. package/src/advisors/setup-run.ts +14 -14
  33. package/src/advisors/share-trace.ts +3 -3
  34. package/src/advisors/{door-probe.ts → sign-in-probe.ts} +7 -6
  35. package/src/advisors/speaks.ts +29 -0
  36. package/src/advisors/sync.ts +97 -183
  37. package/src/advisors/tunnel.ts +6 -5
  38. package/src/advisors/users-listen.ts +92 -0
  39. package/src/advisors/users-router.ts +261 -87
  40. package/src/advisors/users-store.ts +81 -0
  41. package/src/agent-time/blocked-scan.ts +181 -0
  42. package/src/agent-time/registry.ts +12 -5
  43. package/src/agent-time/store.ts +9 -109
  44. package/src/asks/ask-bar-fold.ts +2 -1
  45. package/src/asks/ask-close.ts +2 -1
  46. package/src/asks/ask-doc.ts +2 -1
  47. package/src/asks/ask-migrate.ts +3 -2
  48. package/src/asks/ask-steps-fold.ts +2 -1
  49. package/src/asks/ask-store.ts +4 -3
  50. package/src/check.ts +3 -43
  51. package/src/checks/SK001-package-json-shape.check.ts +4 -55
  52. package/src/checks/SK004-gitignore-policy.check.ts +24 -69
  53. package/src/checks/SK013-one-way-in-policy.check.ts +3 -7
  54. package/src/checks/SK017-vscode-hub-task.check.ts +4 -4
  55. package/src/checks/SK019-tests-run-in-units.check.ts +3 -14
  56. package/src/checks/SK020-self-spawning-check.check.ts +5 -7
  57. package/src/checks/SK035-public-clean.check.ts +1 -1
  58. package/src/checks/SK039-vscode-watch-generated.check.ts +1 -1
  59. package/src/checks/SK042-post-kinds.check.ts +5 -14
  60. package/src/checks/SK054-agent-allow-list.check.ts +5 -74
  61. package/src/checks/SK055-retired-config-keys.check.ts +45 -0
  62. package/src/cli/cmd_Advisors.ts +11 -45
  63. package/src/cli/cmd_Asks.ts +3 -10
  64. package/src/cli/cmd_Backup.ts +25 -127
  65. package/src/cli/cmd_BackupTargets.ts +1 -1
  66. package/src/cli/cmd_Capacity.ts +6 -2
  67. package/src/cli/cmd_Checks.ts +0 -14
  68. package/src/cli/cmd_Ci.ts +2 -1
  69. package/src/cli/cmd_Db.ts +3 -82
  70. package/src/cli/cmd_Home.ts +4 -32
  71. package/src/cli/cmd_Hq.ts +0 -17
  72. package/src/cli/cmd_Releases.ts +57 -4
  73. package/src/cli/cmd_Review.ts +333 -354
  74. package/src/cli/cmd_Shot.ts +26 -4
  75. package/src/cli/cmd_SocialDrafts.ts +6 -13
  76. package/src/cli/cmd_ThreadSyncNeeds.ts +6 -2
  77. package/src/cli/cmd_Time.ts +1 -1
  78. package/src/cli/cmd_Trailer.ts +1 -1
  79. package/src/cli/inbox-hook-run.ts +5 -23
  80. package/src/cli/registry-heads.ts +5 -55
  81. package/src/cli/registry.ts +1 -5
  82. package/src/cli/review-here.ts +1 -1
  83. package/src/cli.ts +15 -4
  84. package/src/collections/collection-types.ts +1 -1
  85. package/src/collections/review.ts +5 -4
  86. package/src/core/admission.ts +268 -0
  87. package/src/core/agent-allow-policy.ts +32 -2
  88. package/src/core/agent-env.ts +8 -0
  89. package/src/core/allow-rows.ts +74 -0
  90. package/src/core/check-file-names.ts +19 -106
  91. package/src/core/code-lines.ts +36 -21
  92. package/src/core/footprint.ts +17 -13
  93. package/src/core/identities-root.ts +1 -4
  94. package/src/core/layout.ts +1 -2
  95. package/src/core/machine-db.ts +33 -208
  96. package/src/core/machine-layout.ts +14 -127
  97. package/src/core/machine-read.ts +5 -2
  98. package/src/core/mask-source.ts +60 -0
  99. package/src/core/memory-watch.ts +17 -14
  100. package/src/core/motherhome.ts +8 -35
  101. package/src/core/one-way-in-policy.ts +0 -3
  102. package/src/core/peer-sk.ts +8 -0
  103. package/src/core/repo-walk.ts +0 -9
  104. package/src/core/retention.ts +1 -9
  105. package/src/core/retired-checks.ts +2 -0
  106. package/src/core/tmux-policy.ts +1 -1
  107. package/src/core/tree-watch.ts +2 -2
  108. package/src/core/when.ts +7 -45
  109. package/src/gate/admit-heavy.ts +150 -0
  110. package/src/gate/check-runner.ts +6 -0
  111. package/src/gate/discover-checks.ts +42 -32
  112. package/src/gate/gate-checks.ts +21 -131
  113. package/src/gate/head-gate.ts +1 -1
  114. package/src/gate/job-run.ts +2 -1
  115. package/src/gate/pre-commit-discovery.ts +22 -28
  116. package/src/gate/run-check.ts +3 -4
  117. package/src/gate/run-ci.ts +4 -0
  118. package/src/gate/run-fix.ts +5 -17
  119. package/src/gate/run-fixers.ts +6 -42
  120. package/src/home/app-sign.ts +2 -2
  121. package/src/home/backup-status.ts +52 -92
  122. package/src/home/backup-verdict.ts +2 -2
  123. package/src/home/daemon-jobs.ts +51 -95
  124. package/src/home/database-words.ts +1 -2
  125. package/src/home/databases.ts +9 -25
  126. package/src/home/home-launchd.ts +0 -6
  127. package/src/home/home-paths.ts +8 -4
  128. package/src/home/home-routes.ts +3 -10
  129. package/src/home/home-state.ts +2 -14
  130. package/src/home/inbox-shape.ts +14 -15
  131. package/src/home/inbox.ts +1 -1
  132. package/src/home/machine-repair.ts +102 -103
  133. package/src/home/resume.ts +1 -15
  134. package/src/home/run-daemon.ts +7 -12
  135. package/src/home/space-page.ts +3 -2
  136. package/src/home/supervise.ts +3 -7
  137. package/src/hooks/commit-msg-run.ts +61 -0
  138. package/src/hooks/commit-run.ts +16 -166
  139. package/src/hooks/gate-outcome.ts +108 -0
  140. package/src/hooks/git-hook.ts +9 -9
  141. package/src/hooks/hook-config.ts +8 -8
  142. package/src/hooks/leak-guard.ts +1 -1
  143. package/src/hooks/pre-commit-checks.ts +1 -1
  144. package/src/hooks/run-hooks.ts +2 -6
  145. package/src/hooks/shared-file.ts +3 -2
  146. package/src/hq/daemon-db.ts +8 -8
  147. package/src/hq/door.ts +3 -16
  148. package/src/hq/hq-db.ts +4 -3
  149. package/src/hq/hq-local.ts +1 -2
  150. package/src/hq/hq-store.ts +0 -15
  151. package/src/hq/item-direct.ts +8 -10
  152. package/src/hq/item-fill.ts +37 -0
  153. package/src/hq/kinds/item-gone.ts +7 -10
  154. package/src/hq/kinds/item-msg.ts +12 -18
  155. package/src/hq/kinds/item.ts +13 -19
  156. package/src/hq/kinds/report.ts +3 -4
  157. package/src/hq/owner-switch.ts +3 -3
  158. package/src/hq/report.ts +5 -9
  159. package/src/hq/switch.ts +2 -11
  160. package/src/hq/thread-sync.ts +5 -17
  161. package/src/hq/{shapes-words.ts → threads-words.ts} +2 -12
  162. package/src/http/owner-word.ts +1 -1
  163. package/src/identities/machine.ts +16 -0
  164. package/src/init-repo.ts +0 -1
  165. package/src/ledger/check-stats.ts +6 -5
  166. package/src/ledger/db.ts +2 -4
  167. package/src/ledger/record-kept.ts +117 -48
  168. package/src/ledger/run-log.ts +21 -2
  169. package/src/ledger/slow-tests.ts +96 -0
  170. package/src/ledger/store.ts +3 -86
  171. package/src/ledger/suite-log.ts +8 -2
  172. package/src/media-store/backup/facts.ts +3 -37
  173. package/src/media-store/backup/keys.ts +1 -8
  174. package/src/media-store/backup/manifest.ts +6 -67
  175. package/src/media-store/backup/restore.ts +4 -13
  176. package/src/media-store/backup/retention.ts +13 -1
  177. package/src/media-store/backup/run.ts +6 -267
  178. package/src/media-store/backup/snapshot.ts +2 -38
  179. package/src/media-store/backup/sources.ts +3 -113
  180. package/src/media-store/backup/target-send.ts +5 -29
  181. package/src/media-store/db.ts +8 -7
  182. package/src/media-store/forget-one.ts +1 -1
  183. package/src/media-store/forget.ts +1 -80
  184. package/src/orchestrator/guards.ts +0 -1
  185. package/src/orchestrator/presence.ts +2 -2
  186. package/src/orchestrator/routes.ts +1 -1
  187. package/src/orchestrator/started.ts +0 -9
  188. package/src/orchestrator/talk-key.ts +3 -4
  189. package/src/orchestrator/unheard.ts +1 -1
  190. package/src/plan/planner.ts +3 -2
  191. package/src/recordings/edit.ts +3 -3
  192. package/src/recordings/marks-draw.ts +17 -6
  193. package/src/recordings/marks.ts +120 -9
  194. package/src/reflections/reflections-queue.ts +3 -10
  195. package/src/release/notes.ts +1 -1
  196. package/src/release/public-clean.ts +66 -6
  197. package/src/release/run-bump.ts +11 -0
  198. package/src/release/run-release.ts +4 -0
  199. package/src/releases/from-thread.ts +3 -3
  200. package/src/releases/model.ts +186 -36
  201. package/src/releases/store.ts +13 -3
  202. package/src/releases/validate.ts +83 -0
  203. package/src/repo-config.ts +36 -64
  204. package/src/review/answer-kinds.ts +63 -4
  205. package/src/review/blocked-guard.ts +11 -0
  206. package/src/review/blocked-object.ts +298 -0
  207. package/src/review/cells.ts +144 -230
  208. package/src/review/close.ts +39 -1
  209. package/src/review/doc-save.ts +3 -2
  210. package/src/review/draft-item.ts +1 -1
  211. package/src/review/events.ts +3 -7
  212. package/src/review/expect.ts +23 -39
  213. package/src/review/format.ts +79 -46
  214. package/src/review/glyphs.ts +1 -0
  215. package/src/review/hand-over.ts +3 -3
  216. package/src/review/heard.ts +1 -1
  217. package/src/review/holds-sync.ts +2 -1
  218. package/src/review/inbox-hook.ts +2 -2
  219. package/src/review/inbox-read.ts +39 -33
  220. package/src/review/instruction-guards.ts +12 -0
  221. package/src/review/instructions.ts +0 -1
  222. package/src/review/item-db.ts +13 -43
  223. package/src/review/item-hq.ts +2 -2
  224. package/src/review/item-rows.ts +3 -14
  225. package/src/review/kind-catalog.ts +3 -1
  226. package/src/review/kinds.ts +18 -8
  227. package/src/review/live-view.ts +3 -0
  228. package/src/review/media-kind.ts +1 -1
  229. package/src/review/mentions.ts +1 -2
  230. package/src/review/model.ts +158 -114
  231. package/src/review/move.ts +149 -0
  232. package/src/review/need-threads.ts +3 -2
  233. package/src/review/object-card.ts +11 -0
  234. package/src/review/object-read.ts +6 -1
  235. package/src/review/one-block.ts +1 -1
  236. package/src/review/owner-read.ts +1 -1
  237. package/src/review/phone-push.ts +10 -9
  238. package/src/review/previews.ts +32 -4
  239. package/src/review/push.ts +2 -2
  240. package/src/review/recap.ts +129 -0
  241. package/src/review/referring.ts +6 -3
  242. package/src/review/reflection-object.ts +4 -3
  243. package/src/review/routes.ts +51 -47
  244. package/src/review/secret-route.ts +3 -2
  245. package/src/review/settle.ts +0 -6
  246. package/src/review/snooze.ts +5 -3
  247. package/src/review/speaker.ts +68 -0
  248. package/src/review/start-title.ts +19 -0
  249. package/src/review/store-parties.ts +28 -0
  250. package/src/review/store.ts +94 -59
  251. package/src/review/{wakes.ts → thread-events.ts} +92 -7
  252. package/src/review/thread-md.ts +35 -14
  253. package/src/review/thread-state.ts +804 -0
  254. package/src/review/threads.ts +29 -347
  255. package/src/review/traces.ts +104 -7
  256. package/src/review/trailer-item.ts +1 -1
  257. package/src/review/unit.ts +7 -9
  258. package/src/review/verdict-items.ts +12 -10
  259. package/src/review/view-layout.ts +25 -1
  260. package/src/review/watch-feed.ts +1 -2
  261. package/src/review/working-guards.ts +2 -3
  262. package/src/rules/untrack-generated.ts +1 -15
  263. package/src/secrets/copy.ts +4 -4
  264. package/src/secrets/lapse.ts +2 -1
  265. package/src/serve/hub-app/advisor-app.tsx +4 -4
  266. package/src/serve/hub-app/advisor-face.tsx +9 -3
  267. package/src/serve/hub-app/advisor-host.ts +27 -27
  268. package/src/serve/hub-app/advisors-model.ts +17 -8
  269. package/src/serve/hub-app/advisors-rights.tsx +1 -1
  270. package/src/serve/hub-app/advisors-st.ts +15 -14
  271. package/src/serve/hub-app/advisors-view.tsx +13 -11
  272. package/src/serve/hub-app/app-bridge.ts +23 -3
  273. package/src/serve/hub-app/asks-page.tsx +1 -1
  274. package/src/serve/hub-app/auto-text.tsx +71 -16
  275. package/src/serve/hub-app/check-view.tsx +0 -8
  276. package/src/serve/hub-app/controls.css +14 -3
  277. package/src/serve/hub-app/database-view.tsx +1 -2
  278. package/src/serve/hub-app/dock-st.ts +1 -1
  279. package/src/serve/hub-app/git-view.tsx +3 -1
  280. package/src/serve/hub-app/hub.css +12 -5
  281. package/src/serve/hub-app/icons.tsx +1 -1
  282. package/src/serve/hub-app/inbox-view.tsx +1 -2
  283. package/src/serve/hub-app/live-sources.ts +2 -2
  284. package/src/serve/hub-app/main-panel.tsx +2 -1
  285. package/src/serve/hub-app/panel-repo.ts +0 -9
  286. package/src/serve/hub-app/pic.tsx +29 -12
  287. package/src/serve/hub-app/polled.ts +16 -2
  288. package/src/serve/hub-app/recordings-st.ts +23 -2
  289. package/src/serve/hub-app/recordings-view.tsx +68 -10
  290. package/src/serve/hub-app/ref-pill.ts +1 -1
  291. package/src/serve/hub-app/repo-st.ts +1 -2
  292. package/src/serve/hub-app/review/advisor-add.tsx +1 -1
  293. package/src/serve/hub-app/review/advisor-invite.tsx +1 -1
  294. package/src/serve/hub-app/review/draft-body.tsx +2 -2
  295. package/src/serve/hub-app/review/heard-line.tsx +1 -1
  296. package/src/serve/hub-app/review/instructions-view.tsx +1 -8
  297. package/src/serve/hub-app/review/kind-states.tsx +14 -9
  298. package/src/serve/hub-app/review/kit.tsx +4 -11
  299. package/src/serve/hub-app/review/lane-bar.tsx +3 -3
  300. package/src/serve/hub-app/review/lightbox.tsx +15 -11
  301. package/src/serve/hub-app/review/line-window.ts +4 -1
  302. package/src/serve/hub-app/review/live-bar-st.ts +2 -2
  303. package/src/serve/hub-app/review/live-view.tsx +57 -1
  304. package/src/serve/hub-app/review/object-panel.tsx +20 -8
  305. package/src/serve/hub-app/review/question-views.tsx +191 -53
  306. package/src/serve/hub-app/review/recap-bar.tsx +40 -0
  307. package/src/serve/hub-app/review/request-cell.tsx +48 -0
  308. package/src/serve/hub-app/review/review-cells.tsx +154 -96
  309. package/src/serve/hub-app/review/review-host.ts +8 -4
  310. package/src/serve/hub-app/review/review-kit.ts +17 -11
  311. package/src/serve/hub-app/review/review-list.tsx +30 -35
  312. package/src/serve/hub-app/review/review-st.ts +32 -42
  313. package/src/serve/hub-app/review/review-thread.tsx +139 -85
  314. package/src/serve/hub-app/review/review-views.tsx +127 -68
  315. package/src/serve/hub-app/review/share-lines.tsx +4 -4
  316. package/src/serve/hub-app/review/start-st.ts +2 -5
  317. package/src/serve/hub-app/review/superseded-runs.ts +4 -3
  318. package/src/serve/hub-app/review/thread-close.tsx +10 -7
  319. package/src/serve/hub-app/review/thread-st.ts +381 -202
  320. package/src/serve/hub-app/review/tone-bar.tsx +129 -0
  321. package/src/serve/hub-app/review/tones.ts +53 -0
  322. package/src/serve/hub-app/review/trailer-body.tsx +2 -2
  323. package/src/serve/hub-app/review/trailer-st.ts +3 -2
  324. package/src/serve/hub-app/review/trailer-voices-st.ts +3 -2
  325. package/src/serve/hub-app/review.css +189 -106
  326. package/src/serve/hub-app/search-view.tsx +1 -1
  327. package/src/serve/hub-app/social/social-model.ts +0 -4
  328. package/src/serve/hub-app/source-acts.ts +2 -1
  329. package/src/serve/hub-app/stores/stores-page.tsx +2 -2
  330. package/src/serve/hub-app/terminal-sources.tsx +2 -1
  331. package/src/serve/hub-app/thread-row.tsx +3 -4
  332. package/src/serve/hub-app/tree-build.ts +0 -4
  333. package/src/serve/hub-app/urls-view.tsx +2 -1
  334. package/src/serve/hub-app/view-layout.css +13 -3
  335. package/src/serve/hub-app/wikis-view.tsx +5 -2
  336. package/src/serve/hub-runtime.ts +7 -37
  337. package/src/serve/project-gutter-route.ts +6 -2
  338. package/src/serve/read-thread.ts +20 -2
  339. package/src/serve/read-worker.ts +9 -1
  340. package/src/serve/record-pages.ts +46 -0
  341. package/src/serve/serve-hub.ts +2 -2
  342. package/src/serve/terminal-host.ts +1 -1
  343. package/src/serve/terminal-route.ts +1 -3
  344. package/src/serve/tracked-watch.ts +1 -3
  345. package/src/setup-house.ts +2 -2
  346. package/src/shipkit-files.ts +1 -1
  347. package/src/shipkit.ts +1 -6
  348. package/src/shot/client.ts +2 -1
  349. package/src/shot/film-box.ts +0 -20
  350. package/src/shot/on-place.ts +141 -0
  351. package/src/social/drafts.ts +1 -1
  352. package/src/social/kinds.ts +6 -29
  353. package/src/social/load.ts +2 -2
  354. package/src/social/post-object.ts +3 -2
  355. package/src/social/release-stage.ts +1 -1
  356. package/src/social/stage.ts +2 -2
  357. package/src/stores/model.ts +4 -0
  358. package/src/stores/routes.ts +11 -3
  359. package/src/suite/judge-suites.ts +58 -0
  360. package/src/suite/red-alone.ts +54 -18
  361. package/src/suite/runner-shapes.ts +2 -2
  362. package/src/suite/suite-cli.ts +67 -14
  363. package/src/suite/test-units.ts +2 -1
  364. package/src/urls/fill.ts +1 -1
  365. package/src/urls/places.ts +1 -2
  366. package/src/vault/vault-config.ts +2 -2
  367. package/src/vault/vault-init.ts +1 -5
  368. package/src/wiki/graph-page.ts +14 -2
  369. package/src/advisors/copy-truth.ts +0 -49
  370. package/src/advisors/door-child.ts +0 -112
  371. package/src/advisors/door-serve.ts +0 -52
  372. package/src/advisors/door.ts +0 -118
  373. package/src/checks/SK016-legacy-check-shapes.check.ts +0 -189
  374. package/src/checks/SK029-explicit-check-files.check.ts +0 -112
  375. package/src/checks/SK048-one-local-file.check.ts +0 -36
  376. package/src/core/config-rewrite.ts +0 -111
  377. package/src/core/daemon-port.ts +0 -10
  378. package/src/core/legacy-shapes.ts +0 -263
  379. package/src/core/migrate-layout.ts +0 -638
  380. package/src/core/port-check-cli.ts +0 -52
  381. package/src/core/port-check-file.ts +0 -295
  382. package/src/core/port-check-files.ts +0 -31
  383. package/src/gate/discover-legacy-checks.ts +0 -26
  384. package/src/home/home-move.ts +0 -527
  385. package/src/home/machine-fold.ts +0 -810
  386. package/src/hq/item-shapes.ts +0 -54
  387. package/src/hq/kinds/items-read.ts +0 -4
  388. package/src/media-store/backup/daemon.ts +0 -220
  389. package/src/media-store/backup/kept.ts +0 -241
  390. package/src/media-store/backup/prune.ts +0 -359
  391. package/src/media-store/backup/secret.ts +0 -88
  392. package/src/media-store/backup/ssh-space.ts +0 -202
  393. package/src/media-store/backup/watch.ts +0 -117
  394. package/src/review/band.ts +0 -182
  395. package/src/review/folders.ts +0 -216
  396. package/src/review/hook-ask.ts +0 -58
  397. package/src/review/role.ts +0 -48
  398. package/src/review/thread-fold.ts +0 -64
  399. package/src/review/wait.ts +0 -91
  400. package/src/rules/rule.ts +0 -43
  401. package/src/serve/hook-thread.ts +0 -37
  402. package/src/serve/hook-work.ts +0 -92
  403. package/src/serve/hook-worker.ts +0 -57
  404. package/src/serve/hub-app/review/dock.tsx +0 -147
  405. package/src/serve/hub-app/review/faces.tsx +0 -18
  406. package/src/serve/hub-app/review/item-verdict.tsx +0 -112
  407. package/src/serve/hub-app/review/review-board.tsx +0 -48
  408. /package/src/{scaffold → core}/jsonc-spans.ts +0 -0
@@ -0,0 +1,129 @@
1
+ // the owner's answer bar (wiki tools/shipkit/threads-page.md, His answer): the five tones, or no answer, in one labelled bar at the foot
2
+ // of the item that asks it, a version or a message that asks the owner's verdict; a question draws its own words in the
3
+ // same bar (tones.ts questionTones). A tone with no words acts in one click; one that takes words (a bubble corner marks
4
+ // it) opens a box over the tone, Enter sends its words with it, an empty box the bare tone, Escape closes. The send
5
+ // draws as given in that frame; only a refusal moves it back, the box open again with the words and why. While it waits
6
+ // it wears the orange frame (cta.tsx); given, the lit tone alone, the others on a hover. It sticks to the screen's foot
7
+ // while any part of its item shows, and never leaves its item (review.css .rv-tonebar)
8
+ import { observer } from 'mobx-react-lite'
9
+ import { useLayoutEffect, useRef } from 'react'
10
+ import type { ReplyCell } from '../../../review/cells.ts'
11
+ import type { ItemVerdict } from '../../../review/verdict-items.ts'
12
+ import { AutoText } from '../auto-text.tsx'
13
+ import { Popover } from '../floating.tsx'
14
+ import { tip } from '../tips.ts'
15
+ import { Cta } from './cta.tsx'
16
+ import { keepFocus, toneOf } from './kit.tsx'
17
+ import type { ThreadSt } from './thread-st.ts'
18
+ import { questionToneClass, questionTones, TONES, toneOfStatus, type Tone } from './tones.ts'
19
+
20
+ /** the act each tone is, for the page's role (review-host.ts): an advisor says ok or what they would fix, the rest is
21
+ * the owner's; on a question an advisor's ok and fix are picks */
22
+ const actOf = (t: ItemVerdict, question: boolean): 'approve' | 'fix' | 'pick' | 'reject' | 'answer' =>
23
+ t === 'approved' ? (question ? 'pick' : 'approve') : t === 'approved-with-fix' ? (question ? 'pick' : 'fix') : question ? 'answer' : 'reject'
24
+
25
+ /** the pencil of ok with a fix, drawn: as a character every Mac font falls back to a colour emoji */
26
+ const PENCIL = 'M3.5 12.5 3 15l2.5-.5 8-8-2-2zM12.5 3.5l2 2 1-1a1.4 1.4 0 0 0-2-2z'
27
+
28
+ /** a tone's mark: its glyph in its colour, the bubble corner on one that takes words */
29
+ export const ToneMark = ({ t }: { t: Tone }) => (
30
+ <span className="rv-tonemark" aria-hidden="true">
31
+ {t.status === 'approved-with-fix' ? (
32
+ <svg viewBox="0 0 18 18" width="13" height="13"><path d={PENCIL} fill="currentColor" /></svg>
33
+ ) : (
34
+ t.glyph
35
+ )}
36
+ {t.words ? <i className="rv-tonebubble" /> : null}
37
+ </span>
38
+ )
39
+
40
+ /** `on`: a version's id, or the cell id of a message that asks the owner's verdict or of a question. A question answers in
41
+ * question words (tones.ts questionTones), never in a verdict's: under its options the question's row alone, none of
42
+ * these (a choice), your call (`pick`, the agent's pick by its label, null when it named none), no answer. `option`: the
43
+ * bar of that one option (the lightbox's side panel): its pick and its pick with a remark, then the row, its pick lit
44
+ * only on the option he picked. A question's cell wears the frame of what waits already: its bar draws none of its own */
45
+ export const ToneBar = observer(({ thread, on, question, pick, option }: { thread: ThreadSt; on: string; question?: ReplyCell; pick?: string | null; option?: number }) => {
46
+ const buttons = useRef(new Map<ItemVerdict, HTMLButtonElement>())
47
+ const sent = thread.givenOn(on)
48
+ const version = question === undefined && thread.versionOf(on)?.id === on
49
+ const given = sent !== undefined && !(version && thread.marked)
50
+ const note = thread.note?.on === on && thread.note.option === option ? thread.note : null
51
+ const failed = thread.failed?.on === on && note === null ? thread.failed.why : null
52
+ const sending = thread.sending?.on === on
53
+ const q = question !== undefined
54
+ const row = q && option === undefined
55
+ const list = q ? questionTones(row ? 'row' : 'option', pick ?? null, question.ask?.kind ?? 'choice') : TONES
56
+ const tones = list.filter((t) => thread.can(actOf(t.status, q)))
57
+ if (tones.length === 0) return null
58
+ const cls = (s: ItemVerdict): string => (q ? questionToneClass(s) : toneOf(s))
59
+ const noteTone = note ? (list.find((t) => t.status === note.status) ?? toneOfStatus(note.status)!) : null
60
+ return (
61
+ <Cta on={question === undefined && (!given || note !== null)} className="rv-tonecta">
62
+ {/* a click here never folds or unfolds the cell it sits on */}
63
+ <div className={`rv-tonebar${row ? ' question' : ''}${given ? ' given' : ''}${note ? ' noting' : ''}`} role="group" aria-label={q ? 'your answer to this question' : 'your verdict on this item'} data-check="tonebar" onClick={(e) => e.stopPropagation()}>
64
+ {tones.map((t) => {
65
+ const lit = option === undefined ? sent === t.status : thread.litOn(on, t.status, option)
66
+ const open = note?.status === t.status
67
+ return (
68
+ <button key={t.status} type="button" ref={(b) => void (b ? buttons.current.set(t.status, b) : buttons.current.delete(t.status))} data-check="tone" data-status={t.status}
69
+ className={`rv-tone ${cls(t.status)}${lit ? ' chosen' : ''}${open ? ' open' : ''}${t.words ? ' words' : ''}`} aria-pressed={lit} aria-haspopup={t.words ? 'dialog' : undefined} aria-expanded={t.words ? open : undefined}
70
+ {...tip(`${t.word} (${t.key} or ${t.letter}): ${lit ? 'your answer; a note on it' + (version ? ', or take it back' : '') : t.says}${t.words && !lit ? '\nopens a box for your words, Enter sends' : ''}`)}
71
+ onMouseDown={keepFocus} onClick={() => void thread.tone(on, t.status, option)}>
72
+ <ToneMark t={t} />
73
+ <span className="rv-toneword">{t.word}</span>
74
+ </button>
75
+ )
76
+ })}
77
+ {sending ? <span className="rv-tonesending" role="status">sending…</span> : null}
78
+ {note && noteTone ? (
79
+ <Popover open anchor={buttons.current.get(note.status) ?? null} onClose={() => thread.cancelNote()} outside={note.text.trim() === ''} className={`rv-vnote ${cls(note.status)}${option !== undefined ? ' boxed' : ''}`}
80
+ label={`your ${noteTone.word}, with your words`} placement={option !== undefined ? 'bottom-start' : 'top-start'} fallbacks={option !== undefined ? ['top-start'] : ['bottom-start', 'top-end']}>
81
+ <NoteBox thread={thread} on={on} t={noteTone} question={q} text={note.text} why={note.why ?? null} takesBack={version && sent === note.status} />
82
+ </Popover>
83
+ ) : null}
84
+ {failed !== null ? <span className="rv-vfail" role="alert">✗ not saved: {failed}</span> : null}
85
+ </div>
86
+ </Cta>
87
+ )
88
+ })
89
+
90
+ /** the box of a tone: its mark and word, the box focused as it opens; Enter sends both (an empty box the bare tone),
91
+ * ⇧Enter a new line, Escape closes with nothing sent. On the lit tone of a version, « take it back » */
92
+ const NoteBox = observer(({ thread, on, t, question, text, why, takesBack }: { thread: ThreadSt; on: string; t: Tone; question: boolean; text: string; why: string | null; takesBack: boolean }) => {
93
+ const box = useRef<HTMLTextAreaElement | null>(null)
94
+ const status = t.status
95
+ useLayoutEffect(() => {
96
+ box.current?.focus()
97
+ }, [on, status])
98
+ const hint = question
99
+ ? status === 'approved-with-fix' ? 'your remark: what to change, what to keep' : status === 'rework' ? 'what you want instead' : `a note with your ${t.word}, if you like`
100
+ : status === 'approved-with-fix' ? 'what to fix, the rest stays' : status === 'rework' ? 'what is wrong, what to keep' : status === 'wrong-direction' ? 'why the direction is wrong, what you want instead' : `a note with your ${t.word}, if you like`
101
+ return (
102
+ <>
103
+ <div className="rv-vnotehead">
104
+ <ToneMark t={t} />
105
+ <span className="rv-vnoteword">{t.word}</span>
106
+ </div>
107
+ <AutoText el={(el) => { box.current = el }} className="rv-vnotebox" rows={2} value={text} placeholder={hint} aria-label={`your words with your ${t.word}`}
108
+ refs={thread.refBox()}
109
+ onText={(v) => thread.setNote(v)}
110
+ onKeyDown={(e) => {
111
+ e.stopPropagation()
112
+ if (e.key === 'Enter' && !e.shiftKey && !e.nativeEvent.isComposing) {
113
+ e.preventDefault()
114
+ void thread.sendNote()
115
+ } else if (e.key === 'Escape') {
116
+ e.preventDefault()
117
+ thread.cancelNote()
118
+ }
119
+ }} />
120
+ {why !== null ? <span className="rv-vfail" role="alert">✗ not saved: {why}</span> : null}
121
+ <div className="rv-vnoteacts">
122
+ {takesBack ? <button type="button" className="ghost rv-vtakeback" onMouseDown={keepFocus} {...tip('your verdict taken back: the version waits for it again')} onClick={() => void thread.takeBackNote()}>take it back</button> : null}
123
+ <button type="button" className="rv-vsend primary" data-check="tone-send" onMouseDown={keepFocus} {...tip(text.trim() === '' ? `send your ${t.word}` : `send your ${t.word} with these words`, '↵')} onClick={() => void thread.sendNote()}>
124
+ send <kbd className="rv-key">↵</kbd>
125
+ </button>
126
+ </div>
127
+ </>
128
+ )
129
+ })
@@ -0,0 +1,53 @@
1
+ // the owner's five tones and his quiet « no answer » as the hub draws them (wiki tools/shipkit/threads.md, The five
2
+ // tones): one vocabulary for the answer bar of a version, a message that asks the owner's verdict and a question
3
+ // (tone-bar.tsx), its keys and its glyphs.
4
+ // What each tone tells the agent is model.ts TONE_ASKS; pure, no React
5
+ import type { ItemVerdict } from '../../../review/verdict-items.ts'
6
+
7
+ /** one tone of the bar: its glyph, its word, its keys, whether it takes the owner's words, what it tells him it does */
8
+ export interface Tone {
9
+ status: ItemVerdict
10
+ word: string
11
+ glyph: string
12
+ key: string
13
+ letter: string
14
+ words: boolean
15
+ says: string
16
+ }
17
+
18
+ /** in the order of the bar */
19
+ export const TONES: readonly Tone[] = [
20
+ { status: 'approved', word: 'ok', glyph: '✓', key: '1', letter: 'V', words: false, says: 'it is right: done, nothing owed' },
21
+ { status: 'approved-with-fix', word: 'ok with a fix', glyph: '✎\uFE0E', key: '2', letter: 'F', words: true, says: 'right once your fix is in: say what to change, the rest stays' },
22
+ { status: 'rework', word: 'rework', glyph: '↻', key: '3', letter: 'R', words: true, says: 'redo it in the same direction: say what is wrong' },
23
+ { status: 'wrong-direction', word: 'wrong direction', glyph: '✕', key: '4', letter: 'X', words: true, says: 'stop: the agent rethinks it and asks you before it builds again' },
24
+ { status: 'your-call', word: 'your call', glyph: '🤷', key: '5', letter: 'Y', words: false, says: 'the agent decides: what it judges best if this still holds, else it drops it, and it says what it chose' },
25
+ { status: 'no-answer', word: 'no answer', glyph: '∅', key: '6', letter: 'U', words: false, says: 'leave it unanswered: off your turn, and no agent is woken' },
26
+ ]
27
+
28
+ export const toneOfStatus = (s: string): Tone | undefined => TONES.find((t) => t.status === s)
29
+
30
+ /** a question answers in question words, a version in verdict words: one option's pick and pick with a remark, then the
31
+ * question's own row, none of these, your call, no answer. Each is stored as the tone it names (store.ts answerAsk);
32
+ * ok, rework and wrong direction draw on no question. `pick`: the agent's pick by its label, null when it named none.
33
+ * `kind`: none of these on a choice alone; a confirm is a step only the owner does, so no your call either */
34
+ export function questionTones(where: 'option' | 'row', pick: string | null, kind = 'choice'): Tone[] {
35
+ const t = (s: ItemVerdict): Tone => toneOfStatus(s)!
36
+ const row: Tone[] = [
37
+ ...(kind === 'choice' ? [{ ...t('rework'), word: 'none of these', glyph: '✕', says: 'none of these options: say what you want instead' }] : []),
38
+ ...(kind === 'confirm' ? [] : [{ ...t('your-call'), says: pick !== null ? `go with the agent's pick, ${pick}: nothing to type` : 'the agent decides and says what it chose: nothing to type' }]),
39
+ t('no-answer'),
40
+ ]
41
+ if (where === 'row') return row
42
+ return [{ ...t('approved'), word: 'pick', says: 'pick this option' }, { ...t('approved-with-fix'), word: 'pick with a remark', says: 'pick this option with your words: the agent reads both' }, ...row]
43
+ }
44
+
45
+ /** the colour a question's answer draws in: « none of these » red, a pick with a remark orange, the rest their tone's */
46
+ export const questionToneClass = (s: ItemVerdict): string => (s === 'rework' || s === 'wrong-direction' ? 'st-none' : s === 'approved-with-fix' ? 'st-remark' : `st-${s}`)
47
+
48
+ /** a verdict's glyph as a disc draws it: a tone's, « not doing it » its own */
49
+ export const glyphOf = (s: string): string => toneOfStatus(s)?.glyph ?? (s === 'archived' ? '▤' : '•')
50
+
51
+ /** the tone a key names: its digit 1 to 6 (`digit`, read from the physical key, so ⇧ and AZERTY read the same) or its
52
+ * letter V F R X Y U; null for any other key */
53
+ export const toneKey = (key: string, digit?: string): ItemVerdict | null => TONES.find((t) => t.key === (digit ?? key) || t.letter === key.toUpperCase())?.status ?? null
@@ -39,7 +39,7 @@ export const TrailerItemBody = observer(({ ver, item }: { ver: Ver; item: Traile
39
39
  ro.observe(el)
40
40
  return () => ro.disconnect()
41
41
  }, [])
42
- const rail = <NotesRail thread={thread} item={item} live={ver.live || ver.claim} />
42
+ const rail = <NotesRail thread={thread} item={item} live={ver.live} />
43
43
  const host = (video: ReactNode, aspect: string) => <HostedFrame ver={ver} view={0} side={tr.sideName} aspect={aspect} face={video} notes={notes} />
44
44
  return (
45
45
  <div ref={box} className={`tr-frame${wide ? ' wide' : ''}`} id={viewDom(item.id, 0)}>
@@ -88,7 +88,7 @@ const FrameBar = observer(({ ver, tr, spec }: { ver: Ver; tr: TrailerSt; spec: I
88
88
  </span>
89
89
  ) : null}
90
90
  <span className="sp" />
91
- <span className="tr-dim tr-small">{ver.live || ver.claim ? `Space · , . a frame · drag on the frame: a note${spec.before ? ' · B before, after' : ''}` : 'an older version: its own render and the notes sent on it'}</span>
91
+ <span className="tr-dim tr-small">{ver.live ? `Space · , . a frame · drag on the frame: a note${spec.before ? ' · B before, after' : ''}` : 'an older version: its own render and the notes sent on it'}</span>
92
92
  {ver.rv.phone.on ? null : (
93
93
  <button className={ver.rv.wide ? 'on' : ''} {...tip(ver.rv.wide ? 'show the thread list on the left again' : 'fold the thread list away: the version takes the page, its notes beside the player', 'W')} onMouseDown={keepFocus} onClick={() => ver.rv.toggleWide()}>
94
94
  {ver.rv.wide ? 'narrow' : 'wide'} (W)
@@ -30,7 +30,7 @@ import { ClipSt } from './clip-st.ts'
30
30
  import { VoicesSt } from './trailer-voices-st.ts'
31
31
  import { LIT_S } from '../../../review/trailer-notes.ts'
32
32
  import type { CutStates } from '../../../trailer/shot-state.ts'
33
- import { hidden } from '../polled.ts'
33
+ import { hidden, sameAnswer } from '../polled.ts'
34
34
 
35
35
  const POLL_MS = 3000
36
36
 
@@ -242,7 +242,8 @@ export class TrailerSt {
242
242
  try {
243
243
  const desk = await send<TrailerDesk>(this.st.url('/api/trailer'), 'GET')
244
244
  runInAction(() => {
245
- this.desk = desk
245
+ // the poll's answer as it was keeps the desk held: the timeline and its shots draw nothing again
246
+ if (!sameAnswer(this.desk, desk)) this.desk = desk
246
247
  this.deskError = null
247
248
  })
248
249
  } catch (e) {
@@ -2,6 +2,7 @@
2
2
  // on screen, the one open with its clip, and his microphone while he records it. A take goes up as the browser
3
3
  // recorded it; the build trims and levels it. Read with the trailer page's poll
4
4
  import { makeAutoObservable, runInAction } from 'mobx'
5
+ import { sameAnswer } from '../polled.ts'
5
6
  import type { VoiceLine, VoicesDesk, VoiceUse } from '../../../review/trailer-model.ts'
6
7
  import { reach } from '../reach.ts'
7
8
  import type { RepoSt } from '../repo-st.ts'
@@ -115,8 +116,8 @@ export class VoicesSt {
115
116
  const id = this.trailerId()
116
117
  const desk = this.on && id ? await this.get<VoicesDesk>(`/api/trailer/voices/${id}`) : null
117
118
  runInAction(() => {
118
- this.counts = counts
119
- if (desk) this.desk = desk
119
+ if (!sameAnswer(this.counts, counts)) this.counts = counts
120
+ if (desk && !sameAnswer(this.desk, desk)) this.desk = desk
120
121
  this.error = null
121
122
  })
122
123
  } catch (e) {