rvlib-shipkit 2.25.0 → 2.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -0
- package/package.json +2 -2
- package/src/agent-time/diet.ts +77 -0
- package/src/agent-time/family.ts +72 -0
- package/src/agent-time/hooks.ts +331 -0
- package/src/agent-time/limits.ts +44 -0
- package/src/agent-time/live.ts +1 -3
- package/src/agent-time/mask.ts +96 -18
- package/src/agent-time/refused.ts +45 -0
- package/src/agent-time/render.ts +130 -17
- package/src/agent-time/report-cache.ts +57 -0
- package/src/agent-time/report.ts +349 -23
- package/src/agent-time/shape.ts +50 -3
- package/src/agent-time/store.ts +370 -95
- package/src/agent-time/timeline.ts +140 -21
- package/src/agent-time/turns.ts +18 -8
- package/src/annex/offload.ts +17 -6
- package/src/annex/tidy.ts +70 -10
- package/src/asks/ask-after.ts +40 -0
- package/src/asks/asks-queue.ts +205 -47
- package/src/assets/kit-config.ts +7 -3
- package/src/assets/kits/identity-kit.ts +289 -10
- package/src/check.ts +3 -1
- package/src/checks/SK004-gitignore-policy.check.ts +12 -5
- package/src/checks/SK013-one-way-in-policy.check.ts +8 -3
- package/src/checks/SK026-asks-autoclose.check.ts +5 -5
- package/src/checks/SK028-readme.check.ts +7 -66
- package/src/checks/SK030-cache-audit.check.ts +6 -1
- package/src/checks/SK031-trace-audit.check.ts +2 -0
- package/src/checks/SK033-global-contribution.check.ts +3 -1
- package/src/checks/SK035-public-clean.check.ts +2 -2
- package/src/checks/SK043-scratch-on-the-mac.check.ts +59 -4
- package/src/checks/SK045-slow-hooks.check.ts +47 -0
- package/src/checks/SK046-hook-records.check.ts +76 -0
- package/src/checks/SK047-login-in-description.check.ts +36 -0
- package/src/checks/SK048-one-local-file.check.ts +36 -0
- package/src/cli/cmd_Asks.ts +71 -5
- package/src/cli/cmd_Backup.ts +5 -3
- package/src/cli/cmd_Capacity.ts +2 -2
- package/src/cli/cmd_CrossRepoActivity.ts +5 -4
- package/src/cli/cmd_Db.ts +253 -0
- package/src/cli/cmd_History.ts +212 -0
- package/src/cli/cmd_Home.ts +31 -3
- package/src/cli/cmd_Hq.ts +516 -0
- package/src/cli/cmd_Machines.ts +36 -0
- package/src/cli/cmd_Media.ts +38 -6
- package/src/cli/cmd_Mv.ts +1 -1
- package/src/cli/cmd_Reflect.ts +23 -2
- package/src/cli/cmd_Releases.ts +30 -0
- package/src/cli/cmd_Review.ts +569 -118
- package/src/cli/cmd_Secret.ts +62 -12
- package/src/cli/cmd_Social.ts +83 -1
- package/src/cli/cmd_Space.ts +324 -0
- package/src/cli/cmd_Time.ts +82 -5
- package/src/cli/cmd_Tmp.ts +28 -4
- package/src/cli/cmd_Trailer.ts +14 -10
- package/src/cli/cmd_Urls.ts +56 -0
- package/src/cli/cmd_Vault.ts +583 -0
- package/src/cli/family-help.ts +4 -2
- package/src/cli/family-pages.ts +1 -1
- package/src/cli/registry.ts +26 -4
- package/src/collections/actions.ts +63 -13
- package/src/collections/collection-types.ts +23 -1
- package/src/collections/providers.ts +117 -23
- package/src/collections/review.ts +4 -4
- package/src/commands/runner.ts +5 -1
- package/src/contracts/contract-manifests.ts +6 -5
- package/src/contracts/contract-types.ts +6 -4
- package/src/contracts/contracts-engine.ts +11 -0
- package/src/contracts/manifests/chrome-web-store.contract.ts +31 -0
- package/src/core/budget.ts +12 -17
- package/src/core/capacity.ts +27 -18
- package/src/core/check-runner.ts +7 -4
- package/src/core/history-files.ts +9 -5
- package/src/core/layout.ts +3 -0
- package/src/core/machine-busy.ts +127 -0
- package/src/core/machine-commit.ts +6 -1
- package/src/core/machine-db.ts +368 -20
- package/src/core/machine-layout.ts +137 -0
- package/src/core/machine-read.ts +81 -0
- package/src/core/migrate-layout.ts +1 -1
- package/src/core/one-way-in-policy.ts +64 -7
- package/src/core/polling-policy.ts +27 -0
- package/src/core/retention.ts +16 -2
- package/src/core/scope.ts +107 -14
- package/src/core/signal-name.ts +6 -0
- package/src/core/slots.ts +5 -4
- package/src/core/trace-audit.ts +6 -1
- package/src/core/transient.ts +6 -0
- package/src/drill/clean.ts +25 -1
- package/src/drill/run.ts +2 -2
- package/src/drill/seal.ts +27 -4
- package/src/home/activity-shape.ts +2 -0
- package/src/home/activity.ts +66 -3
- package/src/home/app-sign.ts +15 -4
- package/src/home/daemon-jobs.ts +149 -7
- package/src/home/database-projects.ts +111 -0
- package/src/home/database-words.ts +203 -0
- package/src/home/databases.ts +460 -0
- package/src/home/global-units.ts +6 -0
- package/src/home/gui-app/ShipkitGui.swift +122 -1
- package/src/home/gui-app.ts +6 -3
- package/src/home/home-move.ts +514 -0
- package/src/home/home-paths.ts +12 -3
- package/src/home/home-routes.ts +68 -0
- package/src/home/inbox-shape.ts +24 -14
- package/src/home/machine-fold.ts +820 -0
- package/src/home/machine-host.ts +20 -5
- package/src/home/machine-repair.ts +503 -0
- package/src/home/machine-stores.ts +66 -15
- package/src/home/machine-temp.ts +547 -86
- package/src/home/resume.ts +79 -0
- package/src/home/run-daemon.ts +25 -4
- package/src/home/run-pm.ts +18 -5
- package/src/home/serve-daemon.ts +18 -3
- package/src/home/serve-web.ts +175 -7
- package/src/home/space-job.ts +115 -0
- package/src/home/space-page.ts +257 -0
- package/src/home/space-route.ts +167 -0
- package/src/home/space-words.ts +103 -0
- package/src/home/time-page-shape.ts +202 -0
- package/src/home/time-page.ts +64 -0
- package/src/home/vault-page.ts +482 -0
- package/src/home/vault-words.ts +132 -0
- package/src/hooks/leak-guard.ts +40 -13
- package/src/hooks/one-way-in-guard.ts +17 -4
- package/src/hq/cards.ts +581 -0
- package/src/hq/door-route.ts +43 -0
- package/src/hq/door.ts +163 -0
- package/src/hq/files-send.ts +348 -0
- package/src/hq/forgotten-log.ts +35 -0
- package/src/hq/history-check.ts +255 -0
- package/src/hq/history-place.ts +146 -0
- package/src/hq/history-send.ts +487 -0
- package/src/hq/hq-db.ts +99 -0
- package/src/hq/hq-local.ts +469 -0
- package/src/hq/hq-routes.ts +196 -0
- package/src/hq/hq-store.ts +599 -0
- package/src/hq/kinds/ask.ts +147 -0
- package/src/hq/kinds/card-gone.ts +83 -0
- package/src/hq/kinds/card-msg.ts +66 -0
- package/src/hq/kinds/card.ts +99 -0
- package/src/hq/kinds/index.ts +21 -0
- package/src/hq/kinds/kind.ts +126 -0
- package/src/hq/kinds/media.ts +125 -0
- package/src/hq/kinds/prompt.ts +219 -0
- package/src/hq/kinds/reflection.ts +128 -0
- package/src/hq/kinds/report.ts +55 -0
- package/src/hq/kinds/time-day.ts +236 -0
- package/src/hq/ledger.ts +473 -0
- package/src/hq/machine-key.ts +44 -0
- package/src/hq/machine-notes.ts +131 -0
- package/src/hq/outbox.ts +372 -0
- package/src/hq/replica.ts +168 -0
- package/src/hq/repo-id.ts +4 -0
- package/src/hq/report-facts.ts +117 -0
- package/src/hq/report.ts +274 -0
- package/src/hq/switch.ts +151 -0
- package/src/hq/vault-grant.ts +92 -0
- package/src/identities/identities.ts +15 -3
- package/src/identities/steps.ts +31 -0
- package/src/ledger/db.ts +73 -26
- package/src/ledger/gate-checks.ts +29 -4
- package/src/ledger/git-key.ts +3 -3
- package/src/ledger/git-scan.ts +49 -7
- package/src/ledger/run-log.ts +11 -3
- package/src/ledger/store.ts +26 -4
- package/src/media-store/backup/daemon.ts +36 -17
- package/src/media-store/backup/kept.ts +241 -0
- package/src/media-store/backup/restore.ts +14 -4
- package/src/media-store/backup/run.ts +11 -11
- package/src/media-store/backup/secret.ts +6 -4
- package/src/media-store/backup/snapshot.ts +4 -2
- package/src/media-store/backup/sources.ts +68 -20
- package/src/media-store/copy/config.ts +77 -0
- package/src/media-store/copy/copy.ts +194 -0
- package/src/media-store/copy/lifecycle.ts +43 -0
- package/src/media-store/copy/night.ts +90 -0
- package/src/media-store/copy/proof.ts +151 -0
- package/src/media-store/copy/snapshot.ts +152 -0
- package/src/media-store/copy/store.ts +62 -0
- package/src/media-store/copy/stream.ts +176 -0
- package/src/media-store/daemon.ts +66 -16
- package/src/media-store/db.ts +22 -11
- package/src/media-store/forget.ts +23 -3
- package/src/media-store/hand.ts +4 -3
- package/src/media-store/hq-find.ts +75 -0
- package/src/media-store/hq-send.ts +277 -0
- package/src/media-store/kind.ts +2 -0
- package/src/media-store/purge.ts +18 -15
- package/src/media-store/put.ts +24 -8
- package/src/media-store/remote.ts +16 -7
- package/src/media-store/space-listing.ts +240 -0
- package/src/media-store/space.ts +40 -21
- package/src/media-store/sync.ts +5 -5
- package/src/media-store/tidy.ts +98 -0
- package/src/media-store/upload.ts +3 -3
- package/src/media-store/webp.ts +66 -0
- package/src/messages/model.ts +16 -7
- package/src/messages/routes.ts +14 -4
- package/src/messages/score.ts +2 -2
- package/src/messages/suggest.ts +96 -0
- package/src/pages/frame-client.ts +10 -0
- package/src/plan/planner.ts +28 -17
- package/src/recordings/media-kind.ts +1 -0
- package/src/recordings/model.ts +1 -1
- package/src/recordings/recorder-app/Capture.swift +9 -7
- package/src/reflect/hq-corpus.ts +56 -0
- package/src/reflect/prompt-corpus.ts +3 -1
- package/src/reflect/transcript.ts +146 -36
- package/src/release/machine-words.ts +67 -0
- package/src/release/public-clean.ts +8 -3
- package/src/releases/from-card.ts +1 -1
- package/src/releases/model.ts +18 -0
- package/src/releases/routes.ts +10 -5
- package/src/releases/store.ts +23 -2
- package/src/repo-config.ts +42 -2
- package/src/review/anim.ts +2 -2
- package/src/review/auto.ts +2 -2
- package/src/review/card-db.ts +244 -0
- package/src/review/card-rows.ts +266 -0
- package/src/review/cells.ts +76 -5
- package/src/review/draft-card.ts +41 -0
- package/src/review/draft-model.ts +78 -0
- package/src/review/format.ts +29 -10
- package/src/review/gone.ts +98 -0
- package/src/review/inbox-hook.ts +35 -0
- package/src/review/marks.ts +1 -1
- package/src/review/media-kind.ts +7 -5
- package/src/review/media-read.ts +9 -7
- package/src/review/media.ts +32 -5
- package/src/review/model.ts +214 -45
- package/src/review/move.ts +491 -0
- package/src/review/notes.ts +12 -20
- package/src/review/previews.ts +15 -19
- package/src/review/project.ts +1 -1
- package/src/review/rev.ts +8 -0
- package/src/review/role.ts +1 -1
- package/src/review/routes.ts +64 -13
- package/src/review/stage-card.ts +8 -4
- package/src/review/stage-routes.ts +1 -1
- package/src/review/store.ts +529 -83
- package/src/review/thread-fold.ts +51 -0
- package/src/review/threads.ts +147 -9
- package/src/review/trailer-auto-mock.ts +63 -0
- package/src/review/trailer-card.ts +4 -4
- package/src/review/trailer-desk.ts +41 -7
- package/src/review/trailer-media.ts +1 -0
- package/src/review/trailer-model.ts +8 -0
- package/src/review/trailer-notes.ts +1 -1
- package/src/review/trailer-routes.ts +9 -1
- package/src/review/unit.ts +6 -6
- package/src/review/watchers.ts +1 -1
- package/src/rules/untrack-generated.ts +92 -8
- package/src/secrets/held.ts +16 -0
- package/src/secrets/keychain.ts +113 -0
- package/src/secrets/list.ts +16 -6
- package/src/secrets/manager.ts +24 -10
- package/src/secrets/read.ts +257 -0
- package/src/secrets/who-reads.ts +49 -0
- package/src/serve/door-forward.ts +268 -0
- package/src/serve/door-names.ts +47 -0
- package/src/serve/embed.ts +1 -1
- package/src/serve/hub-app/activity-view.tsx +56 -32
- package/src/serve/hub-app/activity.css +7 -1
- package/src/serve/hub-app/asks-page.tsx +48 -0
- package/src/serve/hub-app/asks-st.ts +25 -0
- package/src/serve/hub-app/clock-svc.ts +1 -2
- package/src/serve/hub-app/col-card.tsx +64 -13
- package/src/serve/hub-app/col-list-page.tsx +122 -0
- package/src/serve/hub-app/col-list-st.ts +103 -0
- package/src/serve/hub-app/col-tables-view.tsx +10 -41
- package/src/serve/hub-app/col-tables.ts +76 -8
- package/src/serve/hub-app/cols-svc.ts +70 -16
- package/src/serve/hub-app/database-st.ts +260 -0
- package/src/serve/hub-app/database-view.tsx +289 -0
- package/src/serve/hub-app/database.css +32 -0
- package/src/serve/hub-app/entry-bar.css +14 -0
- package/src/serve/hub-app/entry-bar.tsx +33 -0
- package/src/serve/hub-app/entry-pick.ts +31 -0
- package/src/serve/hub-app/floating.tsx +1 -0
- package/src/serve/hub-app/hash-route.ts +11 -1
- package/src/serve/hub-app/header-bar.tsx +14 -18
- package/src/serve/hub-app/home-st.ts +89 -9
- package/src/serve/hub-app/home-strip.css +5 -19
- package/src/serve/hub-app/home-strip.tsx +58 -92
- package/src/serve/hub-app/home.html +7 -0
- package/src/serve/hub-app/hub-app.tsx +31 -142
- package/src/serve/hub-app/hub-types.ts +3 -1
- package/src/serve/hub-app/hub.css +109 -23
- package/src/serve/hub-app/icons.tsx +18 -1
- package/src/serve/hub-app/identities-st.ts +56 -6
- package/src/serve/hub-app/identities-view.tsx +100 -58
- package/src/serve/hub-app/identities.css +17 -15
- package/src/serve/hub-app/identity-address.ts +5 -0
- package/src/serve/hub-app/inbox-st.ts +41 -24
- package/src/serve/hub-app/inbox-view.tsx +37 -41
- package/src/serve/hub-app/inbox.css +2 -5
- package/src/serve/hub-app/index.html +7 -0
- package/src/serve/hub-app/kept-cols.tsx +7 -0
- package/src/serve/hub-app/keys.ts +28 -15
- package/src/serve/hub-app/later.tsx +26 -0
- package/src/serve/hub-app/list-filter.tsx +14 -0
- package/src/serve/hub-app/list-walk.ts +72 -3
- package/src/serve/hub-app/machines-st.ts +251 -0
- package/src/serve/hub-app/machines-view.tsx +224 -0
- package/src/serve/hub-app/machines.css +76 -0
- package/src/serve/hub-app/md-copy.tsx +79 -0
- package/src/serve/hub-app/media-view.tsx +2 -0
- package/src/serve/hub-app/messages/messages-page.tsx +79 -7
- package/src/serve/hub-app/messages/messages-st.ts +99 -3
- package/src/serve/hub-app/messages.css +14 -0
- package/src/serve/hub-app/page-keys.ts +175 -0
- package/src/serve/hub-app/pages-frames.tsx +11 -3
- package/src/serve/hub-app/palette-st.ts +58 -11
- package/src/serve/hub-app/palette-view.tsx +3 -1
- package/src/serve/hub-app/project-list.css +54 -8
- package/src/serve/hub-app/project-list.tsx +128 -59
- package/src/serve/hub-app/projects-svc.ts +78 -7
- package/src/serve/hub-app/reader-chips.tsx +13 -0
- package/src/serve/hub-app/readme-view.tsx +2 -3
- package/src/serve/hub-app/readme.css +27 -5
- package/src/serve/hub-app/reflections-page.tsx +42 -0
- package/src/serve/hub-app/reflections-st.ts +17 -0
- package/src/serve/hub-app/releases/releases-page.tsx +25 -2
- package/src/serve/hub-app/releases/releases-st.ts +1 -1
- package/src/serve/hub-app/repo-sections.ts +9 -5
- package/src/serve/hub-app/repo-st.ts +35 -8
- package/src/serve/hub-app/review/draft-card.tsx +163 -0
- package/src/serve/hub-app/review/kit.tsx +50 -7
- package/src/serve/hub-app/review/note-place.ts +1 -1
- package/src/serve/hub-app/review/review-board.tsx +2 -2
- package/src/serve/hub-app/review/review-cells.tsx +145 -65
- package/src/serve/hub-app/review/review-kit.ts +27 -1
- package/src/serve/hub-app/review/review-list.tsx +68 -30
- package/src/serve/hub-app/review/review-page.tsx +7 -8
- package/src/serve/hub-app/review/review-st.ts +111 -24
- package/src/serve/hub-app/review/review-thread.tsx +49 -19
- package/src/serve/hub-app/review/review-views.tsx +475 -144
- package/src/serve/hub-app/review/thread-control-st.ts +115 -0
- package/src/serve/hub-app/review/thread-control.tsx +74 -0
- package/src/serve/hub-app/review/thread-st.ts +73 -26
- package/src/serve/hub-app/review/trailer-card.tsx +1 -1
- package/src/serve/hub-app/review/trailer-page.tsx +37 -16
- package/src/serve/hub-app/review/trailer-st.ts +41 -7
- package/src/serve/hub-app/review.css +267 -61
- package/src/serve/hub-app/side-lists.ts +72 -0
- package/src/serve/hub-app/sidebar.tsx +6 -3
- package/src/serve/hub-app/site/site-part.tsx +2 -8
- package/src/serve/hub-app/site/site-st.ts +4 -4
- package/src/serve/hub-app/social/comms-page.tsx +20 -5
- package/src/serve/hub-app/social/kit.tsx +30 -4
- package/src/serve/hub-app/social/post-card.tsx +139 -49
- package/src/serve/hub-app/social/serial-writes.ts +13 -0
- package/src/serve/hub-app/social/social-model.ts +11 -0
- package/src/serve/hub-app/social/social-page.tsx +94 -35
- package/src/serve/hub-app/social/social-st.ts +120 -36
- package/src/serve/hub-app/social/stage-popup.tsx +1 -1
- package/src/serve/hub-app/social/stage-st.ts +1 -1
- package/src/serve/hub-app/social/step-layout.ts +1 -1
- package/src/serve/hub-app/social.css +3 -0
- package/src/serve/hub-app/space-st.ts +209 -0
- package/src/serve/hub-app/space-view.tsx +196 -0
- package/src/serve/hub-app/space.css +27 -0
- package/src/serve/hub-app/stores/stores-page.tsx +91 -23
- package/src/serve/hub-app/stores/stores-st.ts +44 -19
- package/src/serve/hub-app/stores.css +6 -1
- package/src/serve/hub-app/theme-st.ts +22 -9
- package/src/serve/hub-app/time-charts.tsx +291 -0
- package/src/serve/hub-app/time-pages.tsx +749 -0
- package/src/serve/hub-app/time-st.ts +162 -0
- package/src/serve/hub-app/time-view.tsx +76 -0
- package/src/serve/hub-app/time.css +138 -0
- package/src/serve/hub-app/tree-build.ts +52 -42
- package/src/serve/hub-app/tree-row.tsx +4 -4
- package/src/serve/hub-app/tree-svc.ts +18 -9
- package/src/serve/hub-app/urls-svc.ts +154 -0
- package/src/serve/hub-app/urls-view.tsx +117 -0
- package/src/serve/hub-app/urls.css +30 -0
- package/src/serve/hub-app/vault-st.ts +127 -0
- package/src/serve/hub-app/vault-view.tsx +154 -0
- package/src/serve/hub-app/vault.css +38 -0
- package/src/serve/hub-app/veille/veille-st.ts +12 -10
- package/src/serve/hub-app/waiting-svc.ts +29 -0
- package/src/serve/hub-app/wikis-view.tsx +2 -2
- package/src/serve/hub-runtime.ts +15 -2
- package/src/serve/project-gutter-route.ts +27 -14
- package/src/serve/project-gutter.ts +25 -12
- package/src/serve/same-origin.ts +10 -0
- package/src/serve/serve-hub.ts +13 -4
- package/src/shipkit-files.ts +16 -2
- package/src/shipkit.ts +1 -1
- package/src/shot/shooter.ts +616 -420
- package/src/shot/shot-ask.ts +246 -155
- package/src/site/desk.ts +2 -2
- package/src/smoke/run-smoke.ts +3 -2
- package/src/social/cover.ts +202 -0
- package/src/social/discord-layout.ts +37 -13
- package/src/social/drafts.ts +3 -0
- package/src/social/load.ts +23 -2
- package/src/social/media-kind.ts +2 -1
- package/src/social/publish/discord.ts +5 -2
- package/src/social/publish/secret.ts +2 -2
- package/src/social/release-stage.ts +28 -13
- package/src/social/routes.ts +26 -1
- package/src/social/stage.ts +1 -1
- package/src/social/stats.ts +12 -9
- package/src/social/strip.ts +4 -1
- package/src/social/thumbnail.ts +255 -0
- package/src/stores/collection.ts +15 -11
- package/src/stores/desk.ts +236 -42
- package/src/stores/model.ts +72 -6
- package/src/stores/routes.ts +37 -12
- package/src/stores/unit.ts +14 -8
- package/src/suite/judge-suites.ts +113 -16
- package/src/suite/select.ts +45 -3
- package/src/suite/suite-cli.ts +81 -34
- package/src/trailer/bed.ts +1 -1
- package/src/trailer/build.ts +134 -21
- package/src/trailer/ffmpeg.ts +7 -0
- package/src/trailer/fonts.ts +3 -2
- package/src/trailer/grammar.ts +201 -2
- package/src/trailer/graph.ts +42 -5
- package/src/trailer/look.ts +21 -0
- package/src/trailer/mock.ts +154 -0
- package/src/trailer/passage.ts +65 -26
- package/src/trailer/score/heard.ts +89 -0
- package/src/trailer/score/sound.ts +14 -8
- package/src/trailer/sound/run.ts +16 -6
- package/src/trailer/stitch.ts +26 -5
- package/src/trailer/titles.ts +82 -19
- package/src/trailer/versions.ts +1 -3
- package/src/trailer/vertical.ts +3 -1
- package/src/urls/frame.ts +195 -0
- package/src/urls/routes.ts +43 -0
- package/src/urls/rows.ts +171 -0
- package/src/urls/unit.ts +73 -0
- package/src/vault/house-keys.ts +42 -0
- package/src/vault/layout.ts +50 -0
- package/src/vault/policy.ts +165 -0
- package/src/vault/vault-audit.ts +276 -0
- package/src/vault/vault-client.ts +40 -0
- package/src/vault/vault-config.ts +159 -0
- package/src/vault/vault-destroy.ts +78 -0
- package/src/vault/vault-handover.ts +305 -0
- package/src/vault/vault-http.ts +352 -0
- package/src/vault/vault-import.ts +208 -0
- package/src/vault/vault-init.ts +328 -0
- package/src/vault/vault-minter.ts +271 -0
- package/src/vault/vault-restore.ts +333 -0
- package/src/vault/vault-serve.ts +342 -0
- package/src/vault/vault-snapshot.ts +281 -0
- package/src/veille/asks.ts +1 -1
- package/src/veille/desk.ts +2 -2
- package/src/wiki/run-wiki.ts +2 -1
- package/src/wiki/scan-md.ts +42 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// a repo's review page as state (wiki tools/shipkit/
|
|
1
|
+
// a repo's review page as state (wiki tools/shipkit/threads.md, The review page): the list as pages of threads
|
|
2
2
|
// (`GET /api/review/threads`, the filters and the search asked of the server), the open card as a thread
|
|
3
3
|
// (thread-st.ts), the watches, the board, his prefs. Every read is polled every 2 s while the page shows and answered
|
|
4
4
|
// 304 when the store did not move. His drafts are kept in the browser until they are sent
|
|
@@ -8,12 +8,13 @@ import { MOVE_LABEL, pasteBlock, STATUS_LABEL, type Move, type ReviewStatus, typ
|
|
|
8
8
|
import type { PasteHosts } from '../../../review/paste.ts'
|
|
9
9
|
import type { Role } from '../../../review/role.ts'
|
|
10
10
|
import type { RepoSt } from '../repo-st.ts'
|
|
11
|
-
import { copyText, etagLoader, GALLERY_FITS, GALLERY_MODES, kept, postJson, TILE_H, ZOOMS, type EtagLoader, type GalleryFit, type GalleryMode, type Zoom } from './review-kit.ts'
|
|
11
|
+
import { copyText, etagLoader, StoreWait, GALLERY_FITS, GALLERY_MODES, kept, postJson, TILE_H, ZOOMS, boxScale, isBoxZoom, type BoxZoom, type EtagLoader, type GalleryFit, type GalleryMode, type Zoom } from './review-kit.ts'
|
|
12
12
|
import { ThreadSt, type Draft } from './thread-st.ts'
|
|
13
13
|
import { cardSource, StageSt, type StageFill } from '../social/stage-st.ts'
|
|
14
14
|
import { isPostRating } from '../../../identities/rating.ts'
|
|
15
|
+
import { sideOf, stepSide, type SideList } from '../list-walk.ts'
|
|
15
16
|
|
|
16
|
-
/** a live `sk
|
|
17
|
+
/** a live `sk thread watch`: its process, the session or lane it keeps, when it started */
|
|
17
18
|
export interface Watcher {
|
|
18
19
|
pid: number
|
|
19
20
|
session: string | null
|
|
@@ -60,6 +61,8 @@ export class CompareSt {
|
|
|
60
61
|
saved: Exclude<CompareMode, 'diff'> = 'side'
|
|
61
62
|
split = 0.5
|
|
62
63
|
opacity = 0.5
|
|
64
|
+
/** space in the lightbox: the hover mode shows the other image of the pair, a hover still swaps them back */
|
|
65
|
+
flipped = false
|
|
63
66
|
constructor(private readonly key: string) {
|
|
64
67
|
const m = kept.get(key)
|
|
65
68
|
if (m && m !== 'diff' && (COMPARE_MODES as readonly string[]).includes(m)) this.mode = this.saved = m as Exclude<CompareMode, 'diff'>
|
|
@@ -79,6 +82,22 @@ export class CompareSt {
|
|
|
79
82
|
this.saved = m
|
|
80
83
|
kept.put(this.key, m)
|
|
81
84
|
}
|
|
85
|
+
/** space: the before in place of the after (the hover mode, entered when another mode shows), again the after */
|
|
86
|
+
flip(): void {
|
|
87
|
+
if (this.mode !== 'mod') {
|
|
88
|
+
this.setMode('mod')
|
|
89
|
+
this.flipped = true
|
|
90
|
+
} else this.flipped = !this.flipped
|
|
91
|
+
}
|
|
92
|
+
/** the side the hover mode shows, null in every other mode */
|
|
93
|
+
get shown(): 'before' | 'after' | null {
|
|
94
|
+
return this.mode === 'mod' ? (this.flipped ? 'before' : 'after') : null
|
|
95
|
+
}
|
|
96
|
+
/** one side of the pair alone, in the hover mode: the control space flips */
|
|
97
|
+
show(side: 'before' | 'after'): void {
|
|
98
|
+
this.setMode('mod')
|
|
99
|
+
this.flipped = side === 'before'
|
|
100
|
+
}
|
|
82
101
|
/** the next mode (D), or the one before (⇧D), round the list */
|
|
83
102
|
cycle(step: 1 | -1): void {
|
|
84
103
|
const i = COMPARE_MODES.indexOf(this.mode)
|
|
@@ -122,6 +141,8 @@ const isShownStatus = (s: string): s is ShownStatus => Object.hasOwn(STATUS_LABE
|
|
|
122
141
|
export class ReviewSt {
|
|
123
142
|
page: ThreadPage | null = null
|
|
124
143
|
listError: string | null = null
|
|
144
|
+
/** the cards' store refused for a while: the list stays the last one read, and this line says why */
|
|
145
|
+
listWait: string | null = null
|
|
125
146
|
/** the rows asked of the server: a page more on « more » or when the list's end scrolls into view */
|
|
126
147
|
shown = PAGE
|
|
127
148
|
/** the repo's review unit in words, read when the page starts */
|
|
@@ -133,6 +154,8 @@ export class ReviewSt {
|
|
|
133
154
|
selectedId: string | null = null
|
|
134
155
|
/** the card opened with none named (the list's first row then): it stays open until he picks another */
|
|
135
156
|
pinned: string | null = null
|
|
157
|
+
/** the card whose verdict left nothing waiting in the list: the empty panel shows until he opens a card or one waits */
|
|
158
|
+
doneAfter: string | null = null
|
|
136
159
|
/** the open card as a thread: made when a card opens */
|
|
137
160
|
card: ThreadSt | null = null
|
|
138
161
|
/** the stage popup over the card: one of its media staged as a post */
|
|
@@ -149,7 +172,9 @@ export class ReviewSt {
|
|
|
149
172
|
byLane = false
|
|
150
173
|
/** the subject rings over the image (M) */
|
|
151
174
|
marksOn = true
|
|
152
|
-
zoom: Zoom = '
|
|
175
|
+
zoom: Zoom = 'preview'
|
|
176
|
+
/** the size of the view in the lightbox, its own: the thread behind keeps its zoom */
|
|
177
|
+
boxZoom: BoxZoom = 'fit'
|
|
153
178
|
/** a gallery tile's height, his slider */
|
|
154
179
|
tileH: number = TILE_H.start
|
|
155
180
|
/** each gallery tile also drawn at 16, 32 and 64 px, the sizes an icon lives at */
|
|
@@ -190,12 +215,13 @@ export class ReviewSt {
|
|
|
190
215
|
this.loadBoard = etagLoader(() => st.url('/api/review/board'))
|
|
191
216
|
this.compare = new CompareSt(`${this.prefix}compare`)
|
|
192
217
|
try {
|
|
193
|
-
const p = JSON.parse(kept.get(`${this.prefix}prefs`) ?? '{}') as { hideHandled?: boolean; byLane?: boolean;
|
|
218
|
+
const p = JSON.parse(kept.get(`${this.prefix}prefs`) ?? '{}') as { hideHandled?: boolean; byLane?: boolean; mediaZoom?: string; boxZoom?: unknown; marks?: boolean; rail?: boolean; tileH?: number; tileSmall?: boolean; galleryMode?: string; galleryFit?: string }
|
|
194
219
|
if (p.hideHandled === false) this.hideHandled = false
|
|
195
220
|
if (p.byLane === true) this.byLane = true
|
|
196
221
|
if (p.marks === false) this.marksOn = false
|
|
197
222
|
if (p.rail === false) this.railOn = false
|
|
198
|
-
if ((ZOOMS as readonly string[]).includes(p.
|
|
223
|
+
if ((ZOOMS as readonly string[]).includes(p.mediaZoom ?? '')) this.zoom = p.mediaZoom as Zoom
|
|
224
|
+
if (isBoxZoom(p.boxZoom)) this.boxZoom = p.boxZoom
|
|
199
225
|
if (typeof p.tileH === 'number') this.setTileH(p.tileH)
|
|
200
226
|
if (p.tileSmall === true) this.tileSmall = true
|
|
201
227
|
if ((GALLERY_MODES as readonly string[]).includes(p.galleryMode ?? '')) this.galleryMode = p.galleryMode as GalleryMode
|
|
@@ -216,6 +242,7 @@ export class ReviewSt {
|
|
|
216
242
|
loadWatchers: false,
|
|
217
243
|
loadBoard: false,
|
|
218
244
|
prefix: false,
|
|
245
|
+
searchEl: false,
|
|
219
246
|
compare: false,
|
|
220
247
|
phone: false,
|
|
221
248
|
card: observableRef,
|
|
@@ -224,7 +251,7 @@ export class ReviewSt {
|
|
|
224
251
|
boardRows: observableRef,
|
|
225
252
|
})
|
|
226
253
|
reaction(
|
|
227
|
-
() => JSON.stringify({ hideHandled: this.hideHandled, byLane: this.byLane,
|
|
254
|
+
() => JSON.stringify({ hideHandled: this.hideHandled, byLane: this.byLane, mediaZoom: this.zoom, boxZoom: this.boxZoom, marks: this.marksOn, rail: this.railOn, tileH: this.tileH, tileSmall: this.tileSmall, galleryMode: this.galleryMode, galleryFit: this.galleryFit }),
|
|
228
255
|
(s) => kept.put(`${this.prefix}prefs`, s),
|
|
229
256
|
)
|
|
230
257
|
// the card the address names, else the list's first: a new one is a new thread state, the old one disposed
|
|
@@ -285,8 +312,13 @@ export class ReviewSt {
|
|
|
285
312
|
(page) => runInAction(() => {
|
|
286
313
|
if (page !== this.page) this.page = page
|
|
287
314
|
this.listError = null
|
|
315
|
+
this.listWait = null
|
|
288
316
|
}),
|
|
289
|
-
(e: Error) =>
|
|
317
|
+
(e: Error) =>
|
|
318
|
+
runInAction(() => {
|
|
319
|
+
if (e instanceof StoreWait) this.listWait = `${/a way back/.test(e.line) ? 'a way back' : /a repair/.test(e.line) ? 'a repair' : 'a fold'} of the cards' database runs: the list is the last one read, back in ${/under \d+ s left/.test(e.line) ? 'a moment' : `about ${e.retryS} s`}`
|
|
320
|
+
else this.listError = e.message
|
|
321
|
+
}),
|
|
290
322
|
),
|
|
291
323
|
this.loadWatchers().then(
|
|
292
324
|
(w) => runInAction(() => w !== this.watchers && (this.watchers = w)),
|
|
@@ -305,7 +337,32 @@ export class ReviewSt {
|
|
|
305
337
|
if (this.st.home.page === 'inbox') void this.st.home.inbox.poll()
|
|
306
338
|
}
|
|
307
339
|
|
|
340
|
+
/** a verdict on `on` was taken: the next card that waits in the list as drawn opens, else the empty panel. A card he
|
|
341
|
+
* opened while it was on its way stays */
|
|
342
|
+
verdictTaken(on: ThreadSt): void {
|
|
343
|
+
if (this.card !== on) return
|
|
344
|
+
const head = on.data?.head ?? on.id
|
|
345
|
+
const next = this.waitingAfter(head)
|
|
346
|
+
if (next !== null) return this.pick(next)
|
|
347
|
+
this.pinned = null
|
|
348
|
+
this.doneAfter = head
|
|
349
|
+
this.st.showReview(null)
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
/** the empty panel shows: his last verdict left nothing waiting in the list, or the repo has cards and none
|
|
353
|
+
* waits on him */
|
|
354
|
+
get done(): boolean {
|
|
355
|
+
return this.doneAfter !== null || (this.page != null && this.page.counts.threads > 0 && this.pendingCount === 0)
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
/** what still waits on him that the list's filters hide, the empty panel says it */
|
|
359
|
+
get waitingElsewhere(): number {
|
|
360
|
+
return this.listFilters === '' ? 0 : Math.max(0, this.pendingCount - this.drawn.filter((r) => r.waits).length)
|
|
361
|
+
}
|
|
362
|
+
|
|
308
363
|
private openCard(id: string | null): void {
|
|
364
|
+
// a card that waits landed under the empty panel: it opens as the list's first would
|
|
365
|
+
if (id !== null && this.doneAfter !== null) this.doneAfter = null
|
|
309
366
|
if (this.card?.id === id) return
|
|
310
367
|
// an id of the open thread (an old version's link) stays in it: the cell shows, nothing is rebuilt
|
|
311
368
|
if (id !== null && this.card?.data?.members.includes(id)) {
|
|
@@ -349,7 +406,8 @@ export class ReviewSt {
|
|
|
349
406
|
get rows(): ThreadRow[] {
|
|
350
407
|
const rows = this.page?.rows ?? []
|
|
351
408
|
const a = this.answering
|
|
352
|
-
|
|
409
|
+
// a verdict on its way already answers its row: the next card after it never lands back on it
|
|
410
|
+
return Object.keys(a).length === 0 ? rows : rows.map((r) => (a[r.head] ? { ...r, status: a[r.head]!, waits: a[r.head] === 'pending' } : r))
|
|
353
411
|
}
|
|
354
412
|
|
|
355
413
|
/** more rows sit on the server past the ones shown */
|
|
@@ -388,11 +446,25 @@ export class ReviewSt {
|
|
|
388
446
|
return [...all.filter((g) => g.lane !== null), ...all.filter((g) => g.lane === null)]
|
|
389
447
|
}
|
|
390
448
|
|
|
391
|
-
/** the card shown: the one the address names, else the list's first */
|
|
449
|
+
/** the card shown: the one the address names, else the list's first; under the empty panel, a card that waits */
|
|
392
450
|
get openId(): string | null {
|
|
451
|
+
if (this.doneAfter !== null) return this.waitingAfter(this.doneAfter)
|
|
393
452
|
return this.selectedId ?? this.pinned ?? this.rows[0]?.head ?? null
|
|
394
453
|
}
|
|
395
454
|
|
|
455
|
+
/** the rows in the order the list draws them: grouped by lane or not */
|
|
456
|
+
get drawn(): ThreadRow[] {
|
|
457
|
+
return this.byLane ? this.laneGroups.flatMap((g) => g.rows) : this.rows
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
/** the first card that waits on him below `from` in the list as drawn, else the first above it; never `from` */
|
|
461
|
+
waitingAfter(from: string | null): string | null {
|
|
462
|
+
const rows = this.drawn
|
|
463
|
+
const at = from === null ? -1 : rows.findIndex((r) => r.head === from || r.ids.includes(from))
|
|
464
|
+
const order = at === -1 ? rows : [...rows.slice(at + 1), ...rows.slice(0, at)]
|
|
465
|
+
return order.find((r) => r.waits && r.head !== from)?.head ?? null
|
|
466
|
+
}
|
|
467
|
+
|
|
396
468
|
/** the list's row of the open card: the one whose thread holds its id */
|
|
397
469
|
get openRow(): ThreadRow | null {
|
|
398
470
|
const id = this.card?.data?.head ?? this.openId
|
|
@@ -463,6 +535,9 @@ export class ReviewSt {
|
|
|
463
535
|
if (status !== null && isShownStatus(status)) this.status = status
|
|
464
536
|
if (q.get('handled') === '1') this.hideHandled = false
|
|
465
537
|
if (q.get('lanes') === '1') this.byLane = true
|
|
538
|
+
// `q=<words>`: the search, an object's address included (a repo page asks the threads of one of its objects)
|
|
539
|
+
const search = q.get('q')
|
|
540
|
+
if (search !== null) this.setQuery(search)
|
|
466
541
|
// `stage=<pick>` (or `stage=1`, its first media): the stage popup open, a link or a shot of it
|
|
467
542
|
// with it, `rating=`, `text=`, `kind=` and `kindWhy=` prefill the popup: a link an agent hands him with its
|
|
468
543
|
// suggested line and kind
|
|
@@ -497,6 +572,7 @@ export class ReviewSt {
|
|
|
497
572
|
// a link to a card on the phone opens the card, never the list
|
|
498
573
|
if (id !== null && id !== this.selectedId && this.phone.on) this.phone.show('card')
|
|
499
574
|
if (id !== this.selectedId) this.compare.leaveCard()
|
|
575
|
+
if (id !== null) this.doneAfter = null
|
|
500
576
|
this.selectedId = id
|
|
501
577
|
if (id !== null) this.openPendingStage()
|
|
502
578
|
}
|
|
@@ -507,20 +583,28 @@ export class ReviewSt {
|
|
|
507
583
|
if (this.phone.on) this.phone.show('card')
|
|
508
584
|
}
|
|
509
585
|
|
|
510
|
-
/**
|
|
586
|
+
/** the list's search field, `/` focuses it */
|
|
587
|
+
searchEl: HTMLInputElement | null = null
|
|
588
|
+
|
|
589
|
+
/** the list as its keys walk it (list-walk.ts): the rows in the order drawn, grouped by lane or not */
|
|
590
|
+
get side(): SideList {
|
|
591
|
+
return sideOf({
|
|
592
|
+
ids: () => this.drawn.map((r) => r.head),
|
|
593
|
+
current: () => this.openRow?.head ?? null,
|
|
594
|
+
open: (head) => this.pick(head),
|
|
595
|
+
filter: () => this.searchEl,
|
|
596
|
+
})
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
/** a step down (1) or up (-1) the list, as ↑ ↓ take it */
|
|
511
600
|
move(delta: 1 | -1): void {
|
|
512
|
-
|
|
513
|
-
const next = this.rows[Math.max(0, Math.min(this.rows.length - 1, at + delta))]
|
|
514
|
-
if (next) this.pick(next.head)
|
|
601
|
+
stepSide(this.side, delta)
|
|
515
602
|
}
|
|
516
603
|
|
|
517
|
-
/** N: the next card that waits on him after the open one, wrapping */
|
|
604
|
+
/** N: the next card that waits on him after the open one, in the list as drawn, wrapping */
|
|
518
605
|
nextPending(): void {
|
|
519
|
-
const
|
|
520
|
-
if (
|
|
521
|
-
const at = pend.findIndex((r) => r === this.openRow)
|
|
522
|
-
const next = pend[(at + 1) % pend.length]
|
|
523
|
-
if (next) this.pick(next.head)
|
|
606
|
+
const next = this.waitingAfter(this.openRow?.head ?? null)
|
|
607
|
+
if (next !== null) this.pick(next)
|
|
524
608
|
}
|
|
525
609
|
|
|
526
610
|
// ── the thread column ──
|
|
@@ -557,6 +641,10 @@ export class ReviewSt {
|
|
|
557
641
|
this.zoom = z
|
|
558
642
|
}
|
|
559
643
|
|
|
644
|
+
setBoxZoom(z: BoxZoom): void {
|
|
645
|
+
this.boxZoom = typeof z === 'number' ? boxScale(z) : z
|
|
646
|
+
}
|
|
647
|
+
|
|
560
648
|
setGalleryMode(m: GalleryMode): void {
|
|
561
649
|
this.galleryMode = m
|
|
562
650
|
}
|
|
@@ -653,7 +741,7 @@ export class ReviewSt {
|
|
|
653
741
|
open: `${here}#page:review:${v.head}`,
|
|
654
742
|
phone: w?.phone ? `${w.phone}#page:review:${v.head}` : null,
|
|
655
743
|
})
|
|
656
|
-
await this.copied(text, `copied for an agent: title, repo, sk
|
|
744
|
+
await this.copied(text, `copied for an agent: title, repo, sk thread show, ${w?.phone ? 'links' : 'link'}`)
|
|
657
745
|
}
|
|
658
746
|
|
|
659
747
|
/** « 📤 »: the stage popup over the open card, on the media `want` names (a pick, or `<item>#<view>`; empty, the
|
|
@@ -703,7 +791,7 @@ export class ReviewSt {
|
|
|
703
791
|
|
|
704
792
|
/** the page's keys, as the atelier takes its own: true when it used the key. V approves, F ok with a fix, R rejects,
|
|
705
793
|
* A archives, N the next waiting card, C copies the card for an agent, M the rings, T the contents, D the next
|
|
706
|
-
* compare mode of every pair (⇧D the one before)
|
|
794
|
+
* compare mode of every pair (⇧D the one before); ↑ ↓ the list are the hub's (side-lists.ts), so is W the card wide (kept-cols.tsx); the card takes
|
|
707
795
|
* the rest (ThreadSt.key). A digit is read from its physical key (`code`), so ⇧ and an AZERTY keyboard read the same */
|
|
708
796
|
key(e: Pick<KeyboardEvent, 'key' | 'shiftKey'> & { code?: string }): boolean {
|
|
709
797
|
// the stage popup takes its own keys
|
|
@@ -711,8 +799,7 @@ export class ReviewSt {
|
|
|
711
799
|
const card = this.card
|
|
712
800
|
if (card?.key(e)) return true
|
|
713
801
|
const k = e.key.toLowerCase()
|
|
714
|
-
if (
|
|
715
|
-
else if (k === 'v') void card?.submit('approved')
|
|
802
|
+
if (k === 'v') void card?.submit('approved')
|
|
716
803
|
else if (k === 'f') void card?.submit('approved-with-fix')
|
|
717
804
|
else if (k === 'r') void card?.submit('rejected')
|
|
718
805
|
else if (k === 'a') void card?.submit('archived')
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// the open card as one chat (wiki tools/shipkit/
|
|
1
|
+
// the open card as one chat (wiki tools/shipkit/threads.md, The review page): a bar on top (the title, where it stands,
|
|
2
2
|
// fold or unfold all, on a phone the contents), the cells in time order with the newest at the bottom, the contents strip beside
|
|
3
3
|
// them (every version, view, verdict and reply: a click scrolls there and unfolds it), and his answer box pinned under
|
|
4
4
|
// them: one word, sent with a verdict or as a reply. The column opens scrolled to the newest cell
|
|
@@ -10,8 +10,9 @@ import { StagePopup } from '../social/stage-popup.tsx'
|
|
|
10
10
|
import { Icon, ICON } from '../icons.tsx'
|
|
11
11
|
import { AutoTag, Empty, keepFocus, LaneTag, Listeners, Rework, toneOf, VERDICTS } from './kit.tsx'
|
|
12
12
|
import { CellFrame, EventsLine } from './review-cells.tsx'
|
|
13
|
+
import { ViewBox } from './review-views.tsx'
|
|
13
14
|
import type { ReviewSt } from './review-st.ts'
|
|
14
|
-
import { type ThreadSt, type ViewMark } from './thread-st.ts'
|
|
15
|
+
import { type Line, type ThreadSt, type ViewMark } from './thread-st.ts'
|
|
15
16
|
|
|
16
17
|
/** `back`: where the phone's ◂ goes, the cards when absent; null when the page around the column draws its own */
|
|
17
18
|
export const ThreadColumn = observer(({ rv, back }: { rv: ReviewSt; back?: (() => void) | null }) => {
|
|
@@ -35,14 +36,16 @@ export const ThreadColumn = observer(({ rv, back }: { rv: ReviewSt; back?: (() =
|
|
|
35
36
|
const card = rv.card
|
|
36
37
|
return (
|
|
37
38
|
<div ref={el} className="rv-thread">
|
|
38
|
-
{card === null ? (
|
|
39
|
-
<
|
|
39
|
+
{card === null && rv.done ? (
|
|
40
|
+
<Done rv={rv} />
|
|
41
|
+
) : card === null ? (
|
|
42
|
+
<Empty text={rv.page ? 'No card. An agent adds one with sk thread add.' : 'Reading the cards…'} />
|
|
40
43
|
) : (
|
|
41
44
|
<>
|
|
42
45
|
<TopBar rv={rv} card={card} back={back} />
|
|
43
46
|
<div className="rv-threadbody">
|
|
44
47
|
<Cells rv={rv} card={card} />
|
|
45
|
-
{rv.rail ? <Contents rv={rv} card={card} /> :
|
|
48
|
+
{rv.rail ? <Contents rv={rv} card={card} /> : null}
|
|
46
49
|
{rv.sheet && !rv.rail ? (
|
|
47
50
|
<div className="rv-sheet" onClick={() => rv.closeSheet()}>
|
|
48
51
|
<div onClick={(e) => e.stopPropagation()}><Contents rv={rv} card={card} /></div>
|
|
@@ -50,6 +53,7 @@ export const ThreadColumn = observer(({ rv, back }: { rv: ReviewSt; back?: (() =
|
|
|
50
53
|
) : null}
|
|
51
54
|
</div>
|
|
52
55
|
<Composer rv={rv} card={card} />
|
|
56
|
+
<ViewBox rv={rv} card={card} />
|
|
53
57
|
{rv.stage ? <StagePopup st={rv.stage} url={(p) => rv.url(p)} close={() => rv.closeStage()} /> : null}
|
|
54
58
|
</>
|
|
55
59
|
)}
|
|
@@ -57,6 +61,20 @@ export const ThreadColumn = observer(({ rv, back }: { rv: ReviewSt; back?: (() =
|
|
|
57
61
|
)
|
|
58
62
|
})
|
|
59
63
|
|
|
64
|
+
/** nothing waits on him in the list (after his last verdict, or at a visit): a green mark and the words; what the filters hide that still
|
|
65
|
+
* waits, and on the phone the way back to the cards */
|
|
66
|
+
const Done = observer(({ rv }: { rv: ReviewSt }) => {
|
|
67
|
+
const n = rv.waitingElsewhere
|
|
68
|
+
return (
|
|
69
|
+
<div className="rv-done" role="status">
|
|
70
|
+
<span className="rv-donemark" aria-hidden="true">✓</span>
|
|
71
|
+
<span className="rv-donewords">everything done :)</span>
|
|
72
|
+
{n > 0 ? <span className="rv-dim">{n} more wait{n === 1 ? 's' : ''} on you outside these filters</span> : null}
|
|
73
|
+
{rv.phone.on ? <button className="ghost" onClick={() => rv.phone.show('list')}>◂ the cards</button> : null}
|
|
74
|
+
</div>
|
|
75
|
+
)
|
|
76
|
+
})
|
|
77
|
+
|
|
60
78
|
/** « 📤 stage »: a media of the card staged as a post in one popup; each draft already staged from it, a click away */
|
|
61
79
|
const StageBar = observer(({ rv, card }: { rv: ReviewSt; card: ThreadSt }) => {
|
|
62
80
|
const v = card.data
|
|
@@ -82,11 +100,12 @@ const TopBar = observer(({ rv, card, back }: { rv: ReviewSt; card: ThreadSt; bac
|
|
|
82
100
|
{rv.phone.on && back !== null ? <button className="ghost rv-back" aria-label="back" onClick={() => (back != null ? back() : rv.phone.show('list'))}>◂</button> : null}
|
|
83
101
|
<h2 className="rv-title">{v?.title ?? row?.title ?? card.id}</h2>
|
|
84
102
|
{rv.phone.on ? null : <Waiting card={card} />}
|
|
85
|
-
<button className="rv-copyid ghost" title="copy this card for an agent (C): its title, its repo, sk
|
|
103
|
+
<button className="rv-copyid ghost" title="copy this card for an agent (C): its title, its repo, sk thread show, its link" aria-label="copy this card for an agent" onClick={() => void rv.copyCard()}>
|
|
86
104
|
<Icon d={ICON.copy} />
|
|
87
105
|
</button>
|
|
88
106
|
</div>
|
|
89
|
-
{rv.phone.on && v ? <Minimap
|
|
107
|
+
{rv.phone.on && v ? <Minimap card={card} /> : null}
|
|
108
|
+
{v && v.versions > 1 ? <Current card={card} /> : null}
|
|
90
109
|
{v ? (
|
|
91
110
|
<div className="rv-meta">
|
|
92
111
|
<span className={`rv-badge ${toneOf(v.status)}`}>{STATUS_LABEL[v.status]}</span>
|
|
@@ -108,9 +127,9 @@ const TopBar = observer(({ rv, card, back }: { rv: ReviewSt; card: ThreadSt; bac
|
|
|
108
127
|
<span className="seg">
|
|
109
128
|
<button className="rv-iconbtn" title="fold every cell" aria-label="fold every cell" onMouseDown={keepFocus} onClick={() => card.foldAll(false)}><Icon d={ICON.foldAll} /></button>
|
|
110
129
|
<button className="rv-iconbtn" title="unfold every cell (it loads every image)" aria-label="unfold every cell" onMouseDown={keepFocus} onClick={() => card.foldAll(true)}><Icon d={ICON.unfoldAll} /></button>
|
|
130
|
+
{/* the contents: a panel beside the cells on a wide column, a sheet over them on a narrow one or a phone; folded, it takes no room */}
|
|
131
|
+
<button className={`rv-iconbtn${rv.rail || rv.sheet ? ' on' : ''}`} aria-pressed={rv.rail || rv.sheet} title="the contents: every item of the card (T)" aria-label="the contents" onMouseDown={keepFocus} onClick={() => rv.toggleRail()}>☰</button>
|
|
111
132
|
</span>
|
|
112
|
-
{/* on a desk the strip (☰) and the panel (fold ›) carry the toggle in place; a phone has neither, so its contents sheet opens here */}
|
|
113
|
-
{rv.phone.on ? <button className={rv.sheet ? 'on' : ''} title="every item of the card" onMouseDown={keepFocus} onClick={() => rv.toggleRail()}>☰ contents</button> : null}
|
|
114
133
|
</div>
|
|
115
134
|
) : card.error ? null : (
|
|
116
135
|
<div className="rv-meta"><span className="spin" /> reading the thread…</div>
|
|
@@ -119,6 +138,17 @@ const TopBar = observer(({ rv, card, back }: { rv: ReviewSt; card: ThreadSt; bac
|
|
|
119
138
|
)
|
|
120
139
|
})
|
|
121
140
|
|
|
141
|
+
/** the thread's current version pinned on top of its conversation: its number, its line, a click jumps to its cell */
|
|
142
|
+
const Current = observer(({ card }: { card: ThreadSt }) => {
|
|
143
|
+
const c = card.newest
|
|
144
|
+
if (c === null || c.kind !== 'version') return null
|
|
145
|
+
return (
|
|
146
|
+
<button className="rv-current ghost" title="the current version: open it in the conversation" onMouseDown={keepFocus} onClick={() => card.reveal(c.id)}>
|
|
147
|
+
<b>current: v{c.n}</b> <span className="rv-dim">{c.summary}</span> <span aria-hidden>↓</span>
|
|
148
|
+
</button>
|
|
149
|
+
)
|
|
150
|
+
})
|
|
151
|
+
|
|
122
152
|
/** the cells in time order; on the first load it lands on the newest one (or the one an old link names), and a click
|
|
123
153
|
* on the contents scrolls to its target */
|
|
124
154
|
const Cells = observer(({ rv, card }: { rv: ReviewSt; card: ThreadSt }) => {
|
|
@@ -180,7 +210,7 @@ const Cells = observer(({ rv, card }: { rv: ReviewSt; card: ThreadSt }) => {
|
|
|
180
210
|
) : l.kind === 'events' ? (
|
|
181
211
|
<EventsLine key={l.cells[0]!.id} rv={rv} cells={l.cells} />
|
|
182
212
|
) : (
|
|
183
|
-
<CellFrame key={l.cell.id} rv={rv} card={card} c={l.cell} />
|
|
213
|
+
<CellFrame key={l.cell.id} rv={rv} card={card} c={l.cell} cont={k > 0 && sameWho(card.lines[k - 1], l.cell.who)} />
|
|
184
214
|
),
|
|
185
215
|
)}
|
|
186
216
|
{card.error ? <div className="rv-err rv-pre">{card.error}</div> : null}
|
|
@@ -188,6 +218,9 @@ const Cells = observer(({ rv, card }: { rv: ReviewSt; card: ThreadSt }) => {
|
|
|
188
218
|
)
|
|
189
219
|
})
|
|
190
220
|
|
|
221
|
+
/** the line above a message is the same speaker's message: a day or a state change between them starts a new group */
|
|
222
|
+
const sameWho = (prev: Line | undefined, who: string): boolean => prev?.kind === 'cell' && prev.cell.who === who
|
|
223
|
+
|
|
191
224
|
/** every item of the card, in the thread's order: each version and its views, each verdict, reply and note. A click
|
|
192
225
|
* unfolds it and scrolls there; a folded one reads dim */
|
|
193
226
|
const Contents = observer(({ rv, card }: { rv: ReviewSt; card: ThreadSt }) => (
|
|
@@ -196,10 +229,8 @@ const Contents = observer(({ rv, card }: { rv: ReviewSt; card: ThreadSt }) => (
|
|
|
196
229
|
<b>contents</b>
|
|
197
230
|
<span className="rv-dim">{card.contents.length}</span>
|
|
198
231
|
<span className="sp" />
|
|
199
|
-
{rv.sheet ? <button className="ghost rv-x" aria-label="close" onClick={() => rv.closeSheet()}>✕</button>
|
|
200
|
-
: <button className="ghost rv-fold" title="fold the contents (T)" aria-label="fold the contents" onMouseDown={keepFocus} onClick={() => rv.toggleRail()}>fold ›</button>}
|
|
232
|
+
{rv.sheet ? <button className="ghost rv-x" aria-label="close" onClick={() => rv.closeSheet()}>✕</button> : null}
|
|
201
233
|
</div>
|
|
202
|
-
<Minimap rv={rv} card={card} dir="row" />
|
|
203
234
|
<ol>
|
|
204
235
|
{card.contents.map((e) => {
|
|
205
236
|
const c = card.cells.find((x) => x.id === e.cell)
|
|
@@ -237,15 +268,14 @@ const Waiting = observer(({ card }: { card: ThreadSt }) => {
|
|
|
237
268
|
const ANSWER_GLYPH: Record<ViewMark['answer'], string> = { none: '', approved: '✓', 'approved-with-fix': '⚒', rejected: '✕', archived: '▤', scored: '★', picked: '✓', sent: '' }
|
|
238
269
|
|
|
239
270
|
/** the minimap: every version as a pill, the one his answer goes to ringed, under it one mark per view coloured by his
|
|
240
|
-
* answer (none yet, OK, fix, no), each answer and reply as a dot; a click shows it.
|
|
241
|
-
*
|
|
242
|
-
export const Minimap = observer(({
|
|
271
|
+
* answer (none yet, OK, fix, no), each answer and reply as a dot; a click shows it. One row under the card's title on a
|
|
272
|
+
* phone, where the contents panel has no room */
|
|
273
|
+
export const Minimap = observer(({ card }: { card: ThreadSt }) => {
|
|
243
274
|
const target = card.head?.id
|
|
244
275
|
const marks = card.viewMarks
|
|
245
276
|
return (
|
|
246
|
-
<nav className=
|
|
247
|
-
|
|
248
|
-
{dir === 'row' && rv.phone.on ? <Waiting card={card} /> : null}
|
|
277
|
+
<nav className="rv-mini row" aria-label="the card's versions, the views of the one you answer, the answers">
|
|
278
|
+
<Waiting card={card} />
|
|
249
279
|
{card.contents.filter((e) => e.kind !== 'view').map((e) => (
|
|
250
280
|
<span key={e.key} className="rv-minigroup">
|
|
251
281
|
<button className={`rv-minientry k-${e.kind}${e.cell === target && e.kind === 'version' ? ' head' : ''}${e.tone ? ` ${e.tone}` : ''}`} title={e.label} onMouseDown={keepFocus} onClick={() => card.reveal(e.cell)}>
|