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
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
// the verdict on the item that asks it (wiki tools/shipkit/threads-page.md, His answer): ok, fix, reject on a version or on
|
|
2
|
-
// a message, at its place in the timeline, never one bar for the whole thread nor a button in the dock. A click on a face
|
|
3
|
-
// opens its popup beside it, the box focused and empty: Enter sends the verdict with what he typed as its note, an empty
|
|
4
|
-
// box the plain verdict, Escape closes with nothing sent. The send draws it as given in that frame while the store writes
|
|
5
|
-
// behind; only a refusal moves it back, the popup open again with the words typed and why. The reply box's words are never
|
|
6
|
-
// part of it. The faces stand in the item's side column under its avatar (review-cells.tsx CellFrame), the one place
|
|
7
|
-
// they draw
|
|
8
|
-
import { observer } from 'mobx-react-lite'
|
|
9
|
-
import { useLayoutEffect, useRef } from 'react'
|
|
10
|
-
import type { ReplyCell } from '../../../review/cells.ts'
|
|
11
|
-
import { ITEM_VERDICTS, type ItemVerdict as Status } from '../../../review/verdict-items.ts'
|
|
12
|
-
import { AutoText } from '../auto-text.tsx'
|
|
13
|
-
import { Popover } from '../floating.tsx'
|
|
14
|
-
import { Cta } from './cta.tsx'
|
|
15
|
-
import { Face } from './faces.tsx'
|
|
16
|
-
import { keepFocus, toneOf, VERDICTS } from './kit.tsx'
|
|
17
|
-
import type { ThreadSt } from './thread-st.ts'
|
|
18
|
-
import { tip } from '../tips.ts'
|
|
19
|
-
|
|
20
|
-
const BUTTONS = VERDICTS.filter((x): x is (typeof VERDICTS)[number] & { status: Status } => (ITEM_VERDICTS as readonly string[]).includes(x.status))
|
|
21
|
-
|
|
22
|
-
/** the act each button is, for the page's role (review-host.ts): an advisor approves or would fix, never rejects */
|
|
23
|
-
const ACT: Record<Status, 'approve' | 'fix' | 'reject'> = { approved: 'approve', 'approved-with-fix': 'fix', rejected: 'reject' }
|
|
24
|
-
|
|
25
|
-
/** the face's word and its keys */
|
|
26
|
-
const WORD: Record<Status, { word: string; keys: string }> = {
|
|
27
|
-
approved: { word: 'ok', keys: '1 or V' },
|
|
28
|
-
'approved-with-fix': { word: 'fix', keys: '2 or F' },
|
|
29
|
-
rejected: { word: 'reject', keys: '3 or R' },
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/** `version`: the version's id, its verdict the thread's own (his marks go with it, « take it back » in the popup of
|
|
33
|
-
* the lit one); `cell`: a message that asks the owner's verdict. The three show while that verdict is owed, framed as
|
|
34
|
-
* what waits on him; once given and no mark drafted, the lit one alone, the others on a hover (review.css); its note
|
|
35
|
-
* shows in the verdict's own message in the timeline */
|
|
36
|
-
export const ItemVerdict = observer(({ thread, version, cell }: { thread: ThreadSt; version?: string; cell?: ReplyCell }) => {
|
|
37
|
-
// each face's button, the one its popup floats beside
|
|
38
|
-
const faces = useRef(new Map<Status, HTMLButtonElement>())
|
|
39
|
-
const on = version ?? cell?.id
|
|
40
|
-
if (on === undefined) return null
|
|
41
|
-
const sent = thread.givenOn(on)
|
|
42
|
-
const given = sent !== undefined && !(version !== undefined && thread.marked)
|
|
43
|
-
const note = thread.note?.on === on ? thread.note : null
|
|
44
|
-
const failed = thread.failed?.on === on && note === null ? thread.failed.why : null
|
|
45
|
-
return (
|
|
46
|
-
<Cta on={!given || note !== null} className="rv-vcta">
|
|
47
|
-
{/* a click here never folds or unfolds the cell it sits on */}
|
|
48
|
-
<div className={`rv-itemverdict${given ? ' given' : ''}${note ? ' noting' : ''}`} role="group" aria-label="your verdict on this item" onClick={(e) => e.stopPropagation()}>
|
|
49
|
-
<div className="rv-vbtns">
|
|
50
|
-
{BUTTONS.filter((x) => thread.can(ACT[x.status])).map((x) => {
|
|
51
|
-
const w = WORD[x.status]
|
|
52
|
-
const lit = sent === x.status
|
|
53
|
-
const open = note?.status === x.status
|
|
54
|
-
return (
|
|
55
|
-
<button key={x.status} ref={(b) => void (b ? faces.current.set(x.status, b) : faces.current.delete(x.status))} data-check="face" data-status={x.status}
|
|
56
|
-
className={`rv-vbtn rv-face ${toneOf(x.status)}${lit ? ' chosen' : ''}${open ? ' open' : ''}`} aria-pressed={lit} aria-expanded={open} aria-haspopup="dialog" aria-label={w.word}
|
|
57
|
-
{...tip(`${w.word} (${w.keys}): ${lit ? 'your verdict; a note on it, or take it back' : 'a note if you like, then Enter sends'}`)}
|
|
58
|
-
onMouseDown={keepFocus} onClick={() => thread.face(on, x.status)}>
|
|
59
|
-
<Face status={x.status} filled={lit} />
|
|
60
|
-
</button>
|
|
61
|
-
)
|
|
62
|
-
})}
|
|
63
|
-
</div>
|
|
64
|
-
{note ? (
|
|
65
|
-
<Popover open anchor={faces.current.get(note.status) ?? null} onClose={() => thread.cancelNote()} outside={note.text.trim() === ''} className={`rv-vnote ${toneOf(note.status)}`}
|
|
66
|
-
label={`your ${WORD[note.status].word}, with a note`} placement="right-start" fallbacks={['bottom-start', 'top-start']}>
|
|
67
|
-
<NoteBox thread={thread} on={on} status={note.status} text={note.text} why={note.why ?? null} takesBack={version !== undefined && sent === note.status} />
|
|
68
|
-
</Popover>
|
|
69
|
-
) : null}
|
|
70
|
-
{failed !== null ? <span className="rv-vfail" role="alert">✗ not saved: {failed}</span> : null}
|
|
71
|
-
</div>
|
|
72
|
-
</Cta>
|
|
73
|
-
)
|
|
74
|
-
})
|
|
75
|
-
|
|
76
|
-
/** the popup of a face: the face and its word, the note box focused as it opens; Enter sends both (an empty box the plain
|
|
77
|
-
* verdict), ⇧Enter a new line, Escape closes with nothing sent. On the lit face of a version, « take it back » */
|
|
78
|
-
const NoteBox = observer(({ thread, on, status, text, why, takesBack }: { thread: ThreadSt; on: string; status: Status; text: string; why: string | null; takesBack: boolean }) => {
|
|
79
|
-
const box = useRef<HTMLTextAreaElement | null>(null)
|
|
80
|
-
useLayoutEffect(() => {
|
|
81
|
-
box.current?.focus()
|
|
82
|
-
}, [on, status])
|
|
83
|
-
const w = WORD[status]
|
|
84
|
-
return (
|
|
85
|
-
<>
|
|
86
|
-
<div className="rv-vnotehead">
|
|
87
|
-
<Face status={status} filled size={20} />
|
|
88
|
-
<span className="rv-vnoteword">{w.word}</span>
|
|
89
|
-
</div>
|
|
90
|
-
<AutoText el={(t) => { box.current = t }} className="rv-vnotebox" rows={2} value={text} placeholder={`a note with your ${w.word}, if you like`} aria-label={`your note with your ${w.word}`}
|
|
91
|
-
refs={thread.refBox()}
|
|
92
|
-
onText={(t) => thread.setNote(t)}
|
|
93
|
-
onKeyDown={(e) => {
|
|
94
|
-
e.stopPropagation()
|
|
95
|
-
if (e.key === 'Enter' && !e.shiftKey && !e.nativeEvent.isComposing) {
|
|
96
|
-
e.preventDefault()
|
|
97
|
-
void thread.sendNote()
|
|
98
|
-
} else if (e.key === 'Escape') {
|
|
99
|
-
e.preventDefault()
|
|
100
|
-
thread.cancelNote()
|
|
101
|
-
}
|
|
102
|
-
}} />
|
|
103
|
-
{why !== null ? <span className="rv-vfail" role="alert">✗ not saved: {why}</span> : null}
|
|
104
|
-
<div className="rv-vnoteacts">
|
|
105
|
-
{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}
|
|
106
|
-
<button type="button" className="rv-vsend primary" onMouseDown={keepFocus} {...tip(text.trim() === '' ? `send your ${w.word}` : `send your ${w.word} with this note`, '↵')} onClick={() => void thread.sendNote()}>
|
|
107
|
-
send <kbd className="rv-key">↵</kbd>
|
|
108
|
-
</button>
|
|
109
|
-
</div>
|
|
110
|
-
</>
|
|
111
|
-
)
|
|
112
|
-
})
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
// the dispatcher's board (wiki tools/shipkit/threads.md, Raised items): what the owner, a player or a rule raised, by state,
|
|
2
|
-
// each with its topic and its worker, a stale claim marked (`GET /api/review/board`); who holds the dispatcher role. A row
|
|
3
|
-
// opens its item
|
|
4
|
-
import { observer } from 'mobx-react-lite'
|
|
5
|
-
import { topicLabel, type State } from '../../../review/model.ts'
|
|
6
|
-
import type { ReviewSt } from './review-st.ts'
|
|
7
|
-
|
|
8
|
-
const STATES: { state: State; label: string }[] = [
|
|
9
|
-
{ state: 'new', label: 'new: waits on the dispatcher' },
|
|
10
|
-
{ state: 'question', label: 'a question for you' },
|
|
11
|
-
{ state: 'blocked', label: 'blocked on you' },
|
|
12
|
-
{ state: 'open', label: 'open: waits on a worker' },
|
|
13
|
-
{ state: 'claimed', label: 'claimed' },
|
|
14
|
-
]
|
|
15
|
-
|
|
16
|
-
export const ReviewBoard = observer(({ rv }: { rv: ReviewSt }) => {
|
|
17
|
-
const spec = rv.spec
|
|
18
|
-
const rows = rv.boardRows
|
|
19
|
-
const role = spec?.role
|
|
20
|
-
const open = rv.thread?.data?.members ?? []
|
|
21
|
-
return (
|
|
22
|
-
<div className="rv-listscroll rv-board">
|
|
23
|
-
<div className="rv-count">{role ? `dispatcher: ${role.name}, since ${role.since.slice(0, 16).replace('T', ' ')}` : 'dispatcher: nobody (sk thread dispatcher --as <name>)'}</div>
|
|
24
|
-
{rows === null ? <div className="rv-empty"><span className="spin" /> reading the board…</div> : null}
|
|
25
|
-
{STATES.map(({ state, label }) => {
|
|
26
|
-
const of = (rows ?? []).filter((r) => r.state === state)
|
|
27
|
-
if (of.length === 0) return null
|
|
28
|
-
return (
|
|
29
|
-
<div key={state}>
|
|
30
|
-
<div className="rv-divider">{label} · {of.length}</div>
|
|
31
|
-
{of.map((r) => (
|
|
32
|
-
<div key={r.id} className={`rv-boardrow${open.includes(r.id) ? ' on' : ''}`} onClick={() => rv.pick(r.id)}>
|
|
33
|
-
<div className="rv-linkedtitle">{r.title}</div>
|
|
34
|
-
<div className="rv-dim">
|
|
35
|
-
{r.topic ? topicLabel(r.topic, spec ?? undefined) : 'no topic'}
|
|
36
|
-
{r.worker ? ` · ${r.worker}` : ''}
|
|
37
|
-
{r.stale ? ' · stale claim' : ''}
|
|
38
|
-
{r.from ? ` · ${r.from}` : ''}
|
|
39
|
-
</div>
|
|
40
|
-
</div>
|
|
41
|
-
))}
|
|
42
|
-
</div>
|
|
43
|
-
)
|
|
44
|
-
})}
|
|
45
|
-
{rows !== null && rows.every((r) => r.state === 'closed') ? <div className="rv-empty">Nothing raised is open.</div> : null}
|
|
46
|
-
</div>
|
|
47
|
-
)
|
|
48
|
-
})
|
|
File without changes
|