rvlib-shipkit 2.31.0 → 2.32.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.
- package/CHANGELOG.md +31 -0
- package/package.json +1 -1
- package/src/advisors/acts.ts +16 -15
- package/src/advisors/advice.ts +56 -102
- package/src/advisors/advisor-view.ts +98 -73
- package/src/advisors/app-graph.ts +1 -1
- package/src/advisors/app.ts +3 -11
- package/src/advisors/cf-api.ts +1 -1
- package/src/advisors/dir-bucket.ts +4 -3
- package/src/advisors/edge/api.ts +26 -198
- package/src/advisors/edge/bucket.ts +2 -2
- package/src/advisors/edge/handler.ts +13 -155
- package/src/advisors/edge/here.ts +5 -5
- package/src/advisors/edge/pages.ts +12 -9
- package/src/advisors/edge/shell.ts +6 -5
- package/src/advisors/edge/sign-in.ts +101 -36
- package/src/advisors/edge/status.ts +19 -6
- package/src/advisors/edge/types.ts +36 -60
- package/src/advisors/expose.ts +29 -29
- package/src/advisors/here.ts +12 -12
- package/src/advisors/invite-send.ts +79 -35
- package/src/advisors/invite.ts +31 -8
- package/src/advisors/job.ts +24 -16
- package/src/advisors/login.ts +40 -15
- package/src/advisors/owner-store.ts +46 -22
- package/src/advisors/photos.ts +3 -3
- package/src/advisors/project.ts +25 -23
- package/src/advisors/reach.ts +89 -0
- package/src/advisors/rights.ts +1 -1
- package/src/advisors/routes.ts +55 -74
- package/src/advisors/scan.ts +0 -4
- package/src/advisors/setup-run.ts +14 -14
- package/src/advisors/share-trace.ts +3 -3
- package/src/advisors/{door-probe.ts → sign-in-probe.ts} +7 -6
- package/src/advisors/speaks.ts +29 -0
- package/src/advisors/sync.ts +92 -182
- package/src/advisors/tunnel.ts +6 -5
- package/src/advisors/users-listen.ts +92 -0
- package/src/advisors/users-router.ts +257 -85
- package/src/advisors/users-store.ts +81 -0
- package/src/agent-time/blocked-scan.ts +181 -0
- package/src/agent-time/registry.ts +12 -5
- package/src/agent-time/store.ts +9 -109
- package/src/asks/ask-bar-fold.ts +2 -1
- package/src/asks/ask-close.ts +2 -1
- package/src/asks/ask-doc.ts +2 -1
- package/src/asks/ask-migrate.ts +3 -2
- package/src/asks/ask-steps-fold.ts +2 -1
- package/src/asks/ask-store.ts +4 -3
- package/src/check.ts +3 -43
- package/src/checks/SK001-package-json-shape.check.ts +4 -55
- package/src/checks/SK004-gitignore-policy.check.ts +24 -69
- package/src/checks/SK013-one-way-in-policy.check.ts +3 -7
- package/src/checks/SK017-vscode-hub-task.check.ts +4 -4
- package/src/checks/SK019-tests-run-in-units.check.ts +3 -14
- package/src/checks/SK020-self-spawning-check.check.ts +5 -7
- package/src/checks/SK035-public-clean.check.ts +1 -1
- package/src/checks/SK039-vscode-watch-generated.check.ts +1 -1
- package/src/checks/SK042-post-kinds.check.ts +5 -14
- package/src/checks/SK054-agent-allow-list.check.ts +5 -74
- package/src/checks/SK055-retired-config-keys.check.ts +45 -0
- package/src/cli/cmd_Advisors.ts +11 -45
- package/src/cli/cmd_Asks.ts +3 -10
- package/src/cli/cmd_Backup.ts +25 -127
- package/src/cli/cmd_BackupTargets.ts +1 -1
- package/src/cli/cmd_Checks.ts +0 -14
- package/src/cli/cmd_Db.ts +3 -82
- package/src/cli/cmd_Home.ts +4 -32
- package/src/cli/cmd_Hq.ts +0 -17
- package/src/cli/cmd_Releases.ts +57 -4
- package/src/cli/cmd_Review.ts +333 -354
- package/src/cli/cmd_SocialDrafts.ts +6 -13
- package/src/cli/cmd_ThreadSyncNeeds.ts +6 -2
- package/src/cli/cmd_Time.ts +1 -1
- package/src/cli/cmd_Trailer.ts +1 -1
- package/src/cli/inbox-hook-run.ts +5 -23
- package/src/cli/registry-heads.ts +5 -55
- package/src/cli/registry.ts +1 -5
- package/src/cli/review-here.ts +1 -1
- package/src/cli.ts +2 -2
- package/src/collections/collection-types.ts +1 -1
- package/src/collections/review.ts +5 -4
- package/src/core/agent-allow-policy.ts +32 -2
- package/src/core/agent-env.ts +8 -0
- package/src/core/allow-rows.ts +74 -0
- package/src/core/check-file-names.ts +19 -106
- package/src/core/footprint.ts +17 -13
- package/src/core/identities-root.ts +1 -4
- package/src/core/layout.ts +1 -2
- package/src/core/machine-db.ts +33 -208
- package/src/core/machine-layout.ts +14 -127
- package/src/core/mask-source.ts +60 -0
- package/src/core/memory-watch.ts +17 -14
- package/src/core/motherhome.ts +8 -35
- package/src/core/one-way-in-policy.ts +0 -3
- package/src/core/repo-walk.ts +0 -9
- package/src/core/retention.ts +1 -9
- package/src/core/retired-checks.ts +2 -0
- package/src/core/tmux-policy.ts +1 -1
- package/src/core/tree-watch.ts +2 -2
- package/src/core/when.ts +7 -45
- package/src/gate/discover-checks.ts +42 -32
- package/src/gate/gate-checks.ts +21 -131
- package/src/gate/pre-commit-discovery.ts +16 -25
- package/src/gate/run-check.ts +0 -4
- package/src/gate/run-fix.ts +5 -17
- package/src/gate/run-fixers.ts +6 -42
- package/src/home/app-sign.ts +2 -2
- package/src/home/backup-status.ts +52 -92
- package/src/home/backup-verdict.ts +2 -2
- package/src/home/daemon-jobs.ts +51 -95
- package/src/home/database-words.ts +1 -2
- package/src/home/databases.ts +9 -25
- package/src/home/home-launchd.ts +0 -6
- package/src/home/home-paths.ts +8 -4
- package/src/home/home-routes.ts +3 -10
- package/src/home/home-state.ts +2 -14
- package/src/home/inbox-shape.ts +14 -15
- package/src/home/inbox.ts +1 -1
- package/src/home/machine-repair.ts +102 -103
- package/src/home/resume.ts +1 -15
- package/src/home/run-daemon.ts +4 -11
- package/src/home/space-page.ts +3 -2
- package/src/home/supervise.ts +3 -7
- package/src/hooks/hook-config.ts +6 -7
- package/src/hooks/leak-guard.ts +1 -1
- package/src/hooks/run-hooks.ts +0 -5
- package/src/hq/daemon-db.ts +8 -8
- package/src/hq/door.ts +3 -16
- package/src/hq/hq-db.ts +4 -3
- package/src/hq/hq-local.ts +1 -2
- package/src/hq/hq-store.ts +0 -15
- package/src/hq/item-direct.ts +8 -10
- package/src/hq/item-fill.ts +37 -0
- package/src/hq/kinds/item-gone.ts +7 -10
- package/src/hq/kinds/item-msg.ts +12 -18
- package/src/hq/kinds/item.ts +13 -19
- package/src/hq/kinds/report.ts +3 -4
- package/src/hq/owner-switch.ts +3 -3
- package/src/hq/report.ts +5 -9
- package/src/hq/switch.ts +2 -11
- package/src/hq/thread-sync.ts +5 -17
- package/src/hq/{shapes-words.ts → threads-words.ts} +2 -12
- package/src/http/owner-word.ts +1 -1
- package/src/identities/machine.ts +16 -0
- package/src/init-repo.ts +0 -1
- package/src/ledger/check-stats.ts +6 -5
- package/src/ledger/db.ts +2 -4
- package/src/ledger/record-kept.ts +117 -48
- package/src/ledger/run-log.ts +21 -2
- package/src/ledger/slow-tests.ts +96 -0
- package/src/ledger/store.ts +3 -86
- package/src/ledger/suite-log.ts +8 -2
- package/src/media-store/backup/facts.ts +3 -37
- package/src/media-store/backup/keys.ts +1 -8
- package/src/media-store/backup/manifest.ts +6 -67
- package/src/media-store/backup/restore.ts +4 -13
- package/src/media-store/backup/retention.ts +13 -1
- package/src/media-store/backup/run.ts +6 -267
- package/src/media-store/backup/snapshot.ts +2 -38
- package/src/media-store/backup/sources.ts +3 -113
- package/src/media-store/backup/target-send.ts +5 -29
- package/src/media-store/db.ts +8 -7
- package/src/media-store/forget-one.ts +1 -1
- package/src/media-store/forget.ts +1 -80
- package/src/orchestrator/guards.ts +0 -1
- package/src/orchestrator/presence.ts +2 -2
- package/src/orchestrator/routes.ts +1 -1
- package/src/orchestrator/started.ts +0 -9
- package/src/orchestrator/talk-key.ts +3 -4
- package/src/orchestrator/unheard.ts +1 -1
- package/src/recordings/edit.ts +3 -3
- package/src/recordings/marks-draw.ts +17 -6
- package/src/recordings/marks.ts +120 -9
- package/src/reflections/reflections-queue.ts +3 -10
- package/src/release/notes.ts +1 -1
- package/src/release/public-clean.ts +66 -6
- package/src/release/run-bump.ts +11 -0
- package/src/release/run-release.ts +4 -0
- package/src/releases/from-thread.ts +3 -3
- package/src/releases/model.ts +186 -36
- package/src/releases/store.ts +13 -3
- package/src/releases/validate.ts +83 -0
- package/src/repo-config.ts +29 -64
- package/src/review/answer-kinds.ts +61 -4
- package/src/review/blocked-guard.ts +11 -0
- package/src/review/blocked-object.ts +298 -0
- package/src/review/cells.ts +116 -229
- package/src/review/close.ts +39 -1
- package/src/review/doc-save.ts +3 -2
- package/src/review/draft-item.ts +1 -1
- package/src/review/events.ts +3 -7
- package/src/review/expect.ts +23 -39
- package/src/review/format.ts +79 -46
- package/src/review/glyphs.ts +1 -0
- package/src/review/hand-over.ts +3 -3
- package/src/review/heard.ts +1 -1
- package/src/review/holds-sync.ts +2 -1
- package/src/review/inbox-hook.ts +2 -2
- package/src/review/inbox-read.ts +39 -33
- package/src/review/instruction-guards.ts +12 -0
- package/src/review/instructions.ts +0 -1
- package/src/review/item-db.ts +13 -43
- package/src/review/item-hq.ts +2 -2
- package/src/review/item-rows.ts +3 -14
- package/src/review/kind-catalog.ts +3 -1
- package/src/review/kinds.ts +18 -8
- package/src/review/live-view.ts +3 -0
- package/src/review/media-kind.ts +1 -1
- package/src/review/mentions.ts +1 -2
- package/src/review/model.ts +158 -114
- package/src/review/move.ts +149 -0
- package/src/review/need-threads.ts +3 -2
- package/src/review/object-card.ts +11 -0
- package/src/review/object-read.ts +6 -1
- package/src/review/one-block.ts +1 -1
- package/src/review/owner-read.ts +1 -1
- package/src/review/phone-push.ts +10 -9
- package/src/review/previews.ts +32 -4
- package/src/review/push.ts +2 -2
- package/src/review/recap.ts +129 -0
- package/src/review/referring.ts +6 -3
- package/src/review/reflection-object.ts +4 -3
- package/src/review/routes.ts +49 -19
- package/src/review/secret-route.ts +3 -2
- package/src/review/settle.ts +0 -6
- package/src/review/snooze.ts +5 -3
- package/src/review/speaker.ts +68 -0
- package/src/review/start-title.ts +19 -0
- package/src/review/store.ts +86 -59
- package/src/review/{wakes.ts → thread-events.ts} +92 -7
- package/src/review/thread-md.ts +35 -14
- package/src/review/thread-state.ts +798 -0
- package/src/review/threads.ts +29 -347
- package/src/review/traces.ts +104 -7
- package/src/review/trailer-item.ts +1 -1
- package/src/review/unit.ts +7 -9
- package/src/review/verdict-items.ts +12 -10
- package/src/review/view-layout.ts +25 -1
- package/src/review/watch-feed.ts +1 -2
- package/src/review/working-guards.ts +2 -3
- package/src/rules/untrack-generated.ts +1 -15
- package/src/secrets/lapse.ts +2 -1
- package/src/serve/hub-app/advisor-app.tsx +4 -4
- package/src/serve/hub-app/advisor-face.tsx +9 -3
- package/src/serve/hub-app/advisor-host.ts +27 -27
- package/src/serve/hub-app/advisors-model.ts +17 -8
- package/src/serve/hub-app/advisors-rights.tsx +1 -1
- package/src/serve/hub-app/advisors-st.ts +15 -14
- package/src/serve/hub-app/advisors-view.tsx +13 -11
- package/src/serve/hub-app/app-bridge.ts +23 -3
- package/src/serve/hub-app/asks-page.tsx +1 -1
- package/src/serve/hub-app/auto-text.tsx +71 -16
- package/src/serve/hub-app/check-view.tsx +0 -8
- package/src/serve/hub-app/controls.css +14 -3
- package/src/serve/hub-app/database-view.tsx +1 -2
- package/src/serve/hub-app/git-view.tsx +3 -1
- package/src/serve/hub-app/hub.css +12 -5
- package/src/serve/hub-app/icons.tsx +1 -1
- package/src/serve/hub-app/inbox-view.tsx +1 -2
- package/src/serve/hub-app/live-sources.ts +2 -2
- package/src/serve/hub-app/main-panel.tsx +2 -1
- package/src/serve/hub-app/panel-repo.ts +0 -9
- package/src/serve/hub-app/pic.tsx +29 -12
- package/src/serve/hub-app/polled.ts +16 -2
- package/src/serve/hub-app/recordings-st.ts +23 -2
- package/src/serve/hub-app/recordings-view.tsx +68 -10
- package/src/serve/hub-app/ref-pill.ts +1 -1
- package/src/serve/hub-app/repo-st.ts +1 -2
- package/src/serve/hub-app/review/advisor-add.tsx +1 -1
- package/src/serve/hub-app/review/advisor-invite.tsx +1 -1
- package/src/serve/hub-app/review/draft-body.tsx +2 -2
- package/src/serve/hub-app/review/heard-line.tsx +1 -1
- package/src/serve/hub-app/review/instructions-view.tsx +1 -8
- package/src/serve/hub-app/review/kind-states.tsx +14 -9
- package/src/serve/hub-app/review/kit.tsx +4 -11
- package/src/serve/hub-app/review/lane-bar.tsx +3 -3
- package/src/serve/hub-app/review/lightbox.tsx +15 -11
- package/src/serve/hub-app/review/line-window.ts +4 -1
- package/src/serve/hub-app/review/live-bar-st.ts +2 -2
- package/src/serve/hub-app/review/live-view.tsx +57 -1
- package/src/serve/hub-app/review/object-panel.tsx +20 -8
- package/src/serve/hub-app/review/question-views.tsx +181 -54
- package/src/serve/hub-app/review/recap-bar.tsx +40 -0
- package/src/serve/hub-app/review/request-cell.tsx +48 -0
- package/src/serve/hub-app/review/review-cells.tsx +154 -96
- package/src/serve/hub-app/review/review-host.ts +2 -2
- package/src/serve/hub-app/review/review-kit.ts +17 -11
- package/src/serve/hub-app/review/review-list.tsx +23 -31
- package/src/serve/hub-app/review/review-st.ts +30 -40
- package/src/serve/hub-app/review/review-thread.tsx +139 -85
- package/src/serve/hub-app/review/review-views.tsx +124 -68
- package/src/serve/hub-app/review/share-lines.tsx +4 -4
- package/src/serve/hub-app/review/start-st.ts +2 -5
- package/src/serve/hub-app/review/superseded-runs.ts +4 -3
- package/src/serve/hub-app/review/thread-close.tsx +10 -7
- package/src/serve/hub-app/review/thread-st.ts +372 -201
- package/src/serve/hub-app/review/tone-bar.tsx +126 -0
- package/src/serve/hub-app/review/tones.ts +35 -0
- package/src/serve/hub-app/review/trailer-body.tsx +2 -2
- package/src/serve/hub-app/review/trailer-st.ts +3 -2
- package/src/serve/hub-app/review/trailer-voices-st.ts +3 -2
- package/src/serve/hub-app/review.css +180 -106
- package/src/serve/hub-app/search-view.tsx +1 -1
- package/src/serve/hub-app/social/social-model.ts +0 -4
- package/src/serve/hub-app/source-acts.ts +2 -1
- package/src/serve/hub-app/stores/stores-page.tsx +2 -2
- package/src/serve/hub-app/terminal-sources.tsx +2 -1
- package/src/serve/hub-app/thread-row.tsx +3 -4
- package/src/serve/hub-app/tree-build.ts +0 -4
- package/src/serve/hub-app/urls-view.tsx +2 -1
- package/src/serve/hub-app/view-layout.css +13 -3
- package/src/serve/hub-app/wikis-view.tsx +5 -2
- package/src/serve/hub-runtime.ts +7 -37
- package/src/serve/project-gutter-route.ts +6 -2
- package/src/serve/read-thread.ts +20 -2
- package/src/serve/read-worker.ts +9 -1
- package/src/serve/record-pages.ts +46 -0
- package/src/serve/serve-hub.ts +2 -2
- package/src/serve/terminal-host.ts +1 -1
- package/src/serve/terminal-route.ts +1 -3
- package/src/serve/tracked-watch.ts +1 -3
- package/src/setup-house.ts +2 -2
- package/src/shipkit-files.ts +1 -1
- package/src/shipkit.ts +1 -6
- package/src/shot/film-box.ts +0 -20
- package/src/social/drafts.ts +1 -1
- package/src/social/kinds.ts +6 -29
- package/src/social/load.ts +2 -2
- package/src/social/post-object.ts +3 -2
- package/src/social/release-stage.ts +1 -1
- package/src/social/stage.ts +2 -2
- package/src/stores/model.ts +4 -0
- package/src/stores/routes.ts +11 -3
- package/src/suite/judge-suites.ts +58 -0
- package/src/suite/red-alone.ts +54 -18
- package/src/suite/runner-shapes.ts +2 -2
- package/src/suite/suite-cli.ts +67 -14
- package/src/suite/test-units.ts +2 -1
- package/src/urls/fill.ts +1 -1
- package/src/urls/places.ts +1 -2
- package/src/vault/vault-config.ts +2 -2
- package/src/vault/vault-init.ts +1 -5
- package/src/wiki/graph-page.ts +14 -2
- package/src/advisors/copy-truth.ts +0 -49
- package/src/advisors/door-child.ts +0 -112
- package/src/advisors/door-serve.ts +0 -52
- package/src/advisors/door.ts +0 -118
- package/src/checks/SK016-legacy-check-shapes.check.ts +0 -189
- package/src/checks/SK029-explicit-check-files.check.ts +0 -112
- package/src/checks/SK048-one-local-file.check.ts +0 -36
- package/src/core/config-rewrite.ts +0 -111
- package/src/core/daemon-port.ts +0 -10
- package/src/core/legacy-shapes.ts +0 -263
- package/src/core/migrate-layout.ts +0 -638
- package/src/core/port-check-cli.ts +0 -52
- package/src/core/port-check-file.ts +0 -295
- package/src/core/port-check-files.ts +0 -31
- package/src/gate/discover-legacy-checks.ts +0 -26
- package/src/home/home-move.ts +0 -527
- package/src/home/machine-fold.ts +0 -810
- package/src/hq/item-shapes.ts +0 -54
- package/src/hq/kinds/items-read.ts +0 -4
- package/src/media-store/backup/daemon.ts +0 -220
- package/src/media-store/backup/kept.ts +0 -241
- package/src/media-store/backup/prune.ts +0 -359
- package/src/media-store/backup/secret.ts +0 -88
- package/src/media-store/backup/ssh-space.ts +0 -202
- package/src/media-store/backup/watch.ts +0 -117
- package/src/review/band.ts +0 -182
- package/src/review/folders.ts +0 -216
- package/src/review/hook-ask.ts +0 -58
- package/src/review/role.ts +0 -48
- package/src/review/thread-fold.ts +0 -64
- package/src/review/wait.ts +0 -91
- package/src/rules/rule.ts +0 -43
- package/src/serve/hook-thread.ts +0 -37
- package/src/serve/hook-work.ts +0 -92
- package/src/serve/hook-worker.ts +0 -57
- package/src/serve/hub-app/review/dock.tsx +0 -147
- package/src/serve/hub-app/review/faces.tsx +0 -18
- package/src/serve/hub-app/review/item-verdict.tsx +0 -112
- package/src/serve/hub-app/review/review-board.tsx +0 -48
- /package/src/{scaffold → core}/jsonc-spans.ts +0 -0
|
@@ -0,0 +1,126 @@
|
|
|
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, a message that asks the owner's verdict, a question; its two uses are a verdict and a
|
|
3
|
+
// pick, one look. Ok and your call act in one click; ok with a fix, rework and wrong direction (a bubble corner marks
|
|
4
|
+
// them) open 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 { 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. `pick`: on a question, the
|
|
41
|
+
* agent's pick by its label, what ok and a fix take; none, those two wait for a click on an option. `option`: the bar of
|
|
42
|
+
* that one option (the lightbox's side panel), `pick` its label: ok and a fix take it, lit only on the option he picked.
|
|
43
|
+
* A question's cell wears the frame of what waits already: its bar draws none of its own */
|
|
44
|
+
export const ToneBar = observer(({ thread, on, question, pick, option }: { thread: ThreadSt; on: string; question?: ReplyCell; pick?: string | null; option?: number }) => {
|
|
45
|
+
const buttons = useRef(new Map<ItemVerdict, HTMLButtonElement>())
|
|
46
|
+
const sent = thread.givenOn(on)
|
|
47
|
+
const version = question === undefined && thread.versionOf(on)?.id === on
|
|
48
|
+
const given = sent !== undefined && !(version && thread.marked)
|
|
49
|
+
const note = thread.note?.on === on && thread.note.option === option ? thread.note : null
|
|
50
|
+
const failed = thread.failed?.on === on && note === null ? thread.failed.why : null
|
|
51
|
+
const sending = thread.sending?.on === on
|
|
52
|
+
const q = question !== undefined
|
|
53
|
+
const tones = TONES.filter((t) => thread.can(actOf(t.status, q)))
|
|
54
|
+
if (tones.length === 0) return null
|
|
55
|
+
const blocked = (t: Tone): string | null => (q && pick === null && (t.status === 'approved' || t.status === 'approved-with-fix') ? 'the agent named no pick: click an option above' : null)
|
|
56
|
+
return (
|
|
57
|
+
<Cta on={question === undefined && (!given || note !== null)} className="rv-tonecta">
|
|
58
|
+
{/* a click here never folds or unfolds the cell it sits on */}
|
|
59
|
+
<div className={`rv-tonebar${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()}>
|
|
60
|
+
{tones.map((t) => {
|
|
61
|
+
const lit = option === undefined ? sent === t.status : thread.litOn(on, t.status, option)
|
|
62
|
+
const open = note?.status === t.status
|
|
63
|
+
const no = blocked(t)
|
|
64
|
+
const takes = q && pick && (t.status === 'approved' || t.status === 'approved-with-fix') ? ` ${pick}` : ''
|
|
65
|
+
return (
|
|
66
|
+
<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}
|
|
67
|
+
className={`rv-tone ${toneOf(t.status)}${lit ? ' chosen' : ''}${open ? ' open' : ''}${t.words ? ' words' : ''}`} aria-pressed={lit} aria-haspopup={t.words ? 'dialog' : undefined} aria-expanded={t.words ? open : undefined}
|
|
68
|
+
disabled={no !== null}
|
|
69
|
+
{...tip(`${t.word}${takes} (${t.key} or ${t.letter}): ${no ?? (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' : ''}`)}
|
|
70
|
+
onMouseDown={keepFocus} onClick={() => void thread.tone(on, t.status, option)}>
|
|
71
|
+
<ToneMark t={t} />
|
|
72
|
+
<span className="rv-toneword">{t.word}{takes ? <span className="rv-tonetakes">{takes}</span> : null}</span>
|
|
73
|
+
</button>
|
|
74
|
+
)
|
|
75
|
+
})}
|
|
76
|
+
{sending ? <span className="rv-tonesending" role="status">sending…</span> : null}
|
|
77
|
+
{note ? (
|
|
78
|
+
<Popover open anchor={buttons.current.get(note.status) ?? null} onClose={() => thread.cancelNote()} outside={note.text.trim() === ''} className={`rv-vnote ${toneOf(note.status)}${option !== undefined ? ' boxed' : ''}`}
|
|
79
|
+
label={`your ${toneOfStatus(note.status)?.word ?? note.status}, with your words`} placement={option !== undefined ? 'bottom-start' : 'top-start'} fallbacks={option !== undefined ? ['top-start'] : ['bottom-start', 'top-end']}>
|
|
80
|
+
<NoteBox thread={thread} on={on} status={note.status} text={note.text} why={note.why ?? null} takesBack={version && sent === note.status} />
|
|
81
|
+
</Popover>
|
|
82
|
+
) : null}
|
|
83
|
+
{failed !== null ? <span className="rv-vfail" role="alert">✗ not saved: {failed}</span> : null}
|
|
84
|
+
</div>
|
|
85
|
+
</Cta>
|
|
86
|
+
)
|
|
87
|
+
})
|
|
88
|
+
|
|
89
|
+
/** the box of a tone: its mark and word, the box focused as it opens; Enter sends both (an empty box the bare tone),
|
|
90
|
+
* ⇧Enter a new line, Escape closes with nothing sent. On the lit tone of a version, « take it back » */
|
|
91
|
+
const NoteBox = observer(({ thread, on, status, text, why, takesBack }: { thread: ThreadSt; on: string; status: ItemVerdict; text: string; why: string | null; takesBack: boolean }) => {
|
|
92
|
+
const box = useRef<HTMLTextAreaElement | null>(null)
|
|
93
|
+
useLayoutEffect(() => {
|
|
94
|
+
box.current?.focus()
|
|
95
|
+
}, [on, status])
|
|
96
|
+
const t = toneOfStatus(status)!
|
|
97
|
+
const hint = 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`
|
|
98
|
+
return (
|
|
99
|
+
<>
|
|
100
|
+
<div className="rv-vnotehead">
|
|
101
|
+
<ToneMark t={t} />
|
|
102
|
+
<span className="rv-vnoteword">{t.word}</span>
|
|
103
|
+
</div>
|
|
104
|
+
<AutoText el={(el) => { box.current = el }} className="rv-vnotebox" rows={2} value={text} placeholder={hint} aria-label={`your words with your ${t.word}`}
|
|
105
|
+
refs={thread.refBox()}
|
|
106
|
+
onText={(v) => thread.setNote(v)}
|
|
107
|
+
onKeyDown={(e) => {
|
|
108
|
+
e.stopPropagation()
|
|
109
|
+
if (e.key === 'Enter' && !e.shiftKey && !e.nativeEvent.isComposing) {
|
|
110
|
+
e.preventDefault()
|
|
111
|
+
void thread.sendNote()
|
|
112
|
+
} else if (e.key === 'Escape') {
|
|
113
|
+
e.preventDefault()
|
|
114
|
+
thread.cancelNote()
|
|
115
|
+
}
|
|
116
|
+
}} />
|
|
117
|
+
{why !== null ? <span className="rv-vfail" role="alert">✗ not saved: {why}</span> : null}
|
|
118
|
+
<div className="rv-vnoteacts">
|
|
119
|
+
{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}
|
|
120
|
+
<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()}>
|
|
121
|
+
send <kbd className="rv-key">↵</kbd>
|
|
122
|
+
</button>
|
|
123
|
+
</div>
|
|
124
|
+
</>
|
|
125
|
+
)
|
|
126
|
+
})
|
|
@@ -0,0 +1,35 @@
|
|
|
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 verdict's glyph as a disc draws it: a tone's, « not doing it » its own */
|
|
31
|
+
export const glyphOf = (s: string): string => toneOfStatus(s)?.glyph ?? (s === 'archived' ? '▤' : '•')
|
|
32
|
+
|
|
33
|
+
/** the tone a key names: its digit 1 to 6 (`digit`, read from the physical key, so ⇧ and AZERTY read the same) or its
|
|
34
|
+
* letter V F R X Y U; null for any other key */
|
|
35
|
+
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
|
|
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
|
|
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
|
-
|
|
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) {
|