rvlib-shipkit 2.26.0 → 2.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/package.json +1 -1
- package/src/agent-time/diet.ts +77 -0
- package/src/agent-time/family.ts +72 -0
- package/src/agent-time/hooks.ts +6 -4
- 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 +122 -21
- package/src/agent-time/report-cache.ts +57 -0
- package/src/agent-time/report.ts +314 -40
- package/src/agent-time/shape.ts +50 -3
- package/src/agent-time/store.ts +320 -99
- 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/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 +2 -2
- 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_Reflect.ts +23 -2
- package/src/cli/cmd_Review.ts +548 -116
- 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 +76 -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 +24 -3
- 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/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/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/slots.ts +5 -4
- package/src/drill/clean.ts +25 -1
- package/src/drill/run.ts +1 -1
- 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 +6 -2
- package/src/ledger/run-log.ts +11 -3
- package/src/ledger/store.ts +26 -4
- package/src/media-store/backup/daemon.ts +25 -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 +67 -16
- 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 +129 -37
- 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/routes.ts +10 -5
- package/src/releases/store.ts +10 -1
- package/src/repo-config.ts +32 -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 +4 -4
- 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 +202 -39
- 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 +41 -11
- package/src/suite/select.ts +45 -3
- package/src/suite/suite-cli.ts +16 -10
- 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
|
@@ -65,26 +65,32 @@ export const Commit = ({ c, now, old }: { c: ActivityCommit; now: number; old: b
|
|
|
65
65
|
</>
|
|
66
66
|
)
|
|
67
67
|
|
|
68
|
-
/** the checks behind a
|
|
69
|
-
* a daemon that sends no `failing` still names
|
|
68
|
+
/** the checks behind a dot, failing first, then agent work, then what waits
|
|
69
|
+
* on the owner. An answer from a daemon that sends no `failing` still names
|
|
70
|
+
* them, by id, and one that sends no `hands` has none */
|
|
70
71
|
export const failingOf = (r: ActivityRow): StatusCheck[] => {
|
|
71
72
|
if (r.failing != null) return r.failing
|
|
72
73
|
const c = r.status
|
|
73
74
|
if (c == null) return []
|
|
74
|
-
const one = (id: string, status: 'fail' | 'warn'): StatusCheck => ({ id, title: id, status, at: c.since[id] ?? null, line: '', lines: [] })
|
|
75
|
-
return [...c.reds.map((id) => one(id, 'fail')), ...c.warns.map((id) => one(id, 'warn'))]
|
|
75
|
+
const one = (id: string, status: 'fail' | 'warn', held = false): StatusCheck => ({ id, title: id, status, ...(held ? { held: true as const } : {}), at: c.since[id] ?? null, line: '', lines: [] })
|
|
76
|
+
return [...c.reds.map((id) => one(id, 'fail')), ...c.warns.map((id) => one(id, 'warn')), ...(c.hands ?? []).map((id) => one(id, 'warn', true))]
|
|
76
77
|
}
|
|
77
78
|
|
|
78
|
-
/**
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
/** the mark of one listed check: failed, agent work, or the inbox icon for what waits on the owner */
|
|
80
|
+
const markOf = (c: StatusCheck): ReactNode => (c.status === 'fail' ? '✗' : c.held === true ? <Icon d={ICON.inbox} /> : '!')
|
|
81
|
+
|
|
82
|
+
/** each listed check: its id (a link to its page), its title, how old that
|
|
83
|
+
* outcome is, and every line it printed about it. `which` keeps the checks
|
|
84
|
+
* an agent can act on, or the ones that wait on the owner; without it, all */
|
|
85
|
+
export const CheckList = observer(({ app, r, which }: { app: HomeSt; r: ActivityRow; which?: 'checks' | 'you' }) => {
|
|
81
86
|
const now = app.activity.now
|
|
87
|
+
const listed = failingOf(r).filter((c) => which == null || (which === 'you') === (c.held === true))
|
|
82
88
|
return (
|
|
83
89
|
<ul className="acchecks">
|
|
84
|
-
{
|
|
85
|
-
<li key={c.id} className={c.status === 'fail' ? 'fail' : 'warn'}>
|
|
90
|
+
{listed.map((c) => (
|
|
91
|
+
<li key={c.id} className={c.status === 'fail' ? 'fail' : c.held === true ? 'held' : 'warn'}>
|
|
86
92
|
<span className="acchkhead">
|
|
87
|
-
<span className="acchkmark">{c
|
|
93
|
+
<span className="acchkmark">{markOf(c)}</span>
|
|
88
94
|
<a className="acchkid" href={checkAddress(r.name, c.id)} onClick={(e) => {
|
|
89
95
|
if (!plainClick(e)) return
|
|
90
96
|
e.preventDefault()
|
|
@@ -101,33 +107,51 @@ export const CheckList = observer(({ app, r }: { app: HomeSt; r: ActivityRow })
|
|
|
101
107
|
})
|
|
102
108
|
|
|
103
109
|
/** the repo's checks as its own run record last saw them, only the ids it
|
|
104
|
-
* declares today: one dot, red, orange or green,
|
|
105
|
-
*
|
|
106
|
-
*
|
|
110
|
+
* declares today, in two cells. The first: one dot, red, orange or green,
|
|
111
|
+
* with the count of what failed or of what an agent can clear. The second:
|
|
112
|
+
* the inbox icon and the count of warnings that wait on the owner, which
|
|
113
|
+
* never colour the dot. Each floats its checks at once on hover; a click
|
|
114
|
+
* lists every check under the row, so they read without hover too */
|
|
107
115
|
const Status = observer(({ app, r, span }: { app: HomeSt; r: ActivityRow; span: number }) => {
|
|
108
116
|
const c = r.status
|
|
109
117
|
if (c == null) return (
|
|
110
|
-
|
|
111
|
-
<
|
|
112
|
-
|
|
118
|
+
<>
|
|
119
|
+
<td rowSpan={span} className="acstatus acdim">
|
|
120
|
+
<Tip instant content="no shipkit run recorded in this repo yet" placement="right">·</Tip>
|
|
121
|
+
</td>
|
|
122
|
+
<td rowSpan={span} className="acyou" />
|
|
123
|
+
</>
|
|
113
124
|
)
|
|
114
125
|
const n = c.state === 'red' ? c.reds.length : c.state === 'orange' ? c.warns.length : 0
|
|
115
126
|
const tone = c.state === 'red' ? 'red' : c.state === 'orange' ? 'warn' : 'ok'
|
|
116
|
-
|
|
117
|
-
<td rowSpan={span} className={`acstatus t-${tone}`}>
|
|
118
|
-
<Tip content="every check passed on its last run" placement="right">●</Tip>
|
|
119
|
-
</td>
|
|
120
|
-
)
|
|
127
|
+
const hands = c.hands?.length ?? 0
|
|
121
128
|
const open = app.activity.checksOpen.has(r.name)
|
|
129
|
+
const toggle = (): void => app.activity.toggleChecks(r.name)
|
|
122
130
|
return (
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
<
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
+
<>
|
|
132
|
+
{c.reds.length + c.warns.length === 0 ? (
|
|
133
|
+
<td rowSpan={span} className={`acstatus t-${tone}`}>
|
|
134
|
+
<Tip instant content={hands > 0 ? 'nothing here for an agent: every check passed, or waits on you' : 'every check passed on its last run'} placement="right">●</Tip>
|
|
135
|
+
</td>
|
|
136
|
+
) : (
|
|
137
|
+
<td rowSpan={span} className={`acstatus t-${tone}`}>
|
|
138
|
+
<Tip instant content={<CheckList app={app} r={r} which="checks" />} tipClass="acchktip" interactive placement="right-start" fallbacks={['bottom-start', 'left-start']}>
|
|
139
|
+
<button type="button" className={`acdot t-${tone}`} aria-expanded={open} aria-label={`${r.name}: ${c.reds.length} failing, ${c.warns.length} warning, click to ${open ? 'hide' : 'list'} them`} onClick={toggle}>
|
|
140
|
+
●{n > 0 ? ` ${n}` : ''}
|
|
141
|
+
</button>
|
|
142
|
+
</Tip>
|
|
143
|
+
</td>
|
|
144
|
+
)}
|
|
145
|
+
{hands === 0 ? <td rowSpan={span} className="acyou" /> : (
|
|
146
|
+
<td rowSpan={span} className="acyou">
|
|
147
|
+
<Tip instant content={<><div className="actiphead">waits on you: an ask of this repo holds each line</div><CheckList app={app} r={r} which="you" /></>} tipClass="acchktip" interactive placement="right-start" fallbacks={['bottom-start', 'left-start']}>
|
|
148
|
+
<button type="button" className="acdot" aria-expanded={open} aria-label={`${r.name}: ${hands} waiting on you, click to ${open ? 'hide' : 'list'} them`} onClick={toggle}>
|
|
149
|
+
<Icon d={ICON.inbox} /> {hands}
|
|
150
|
+
</button>
|
|
151
|
+
</Tip>
|
|
152
|
+
</td>
|
|
153
|
+
)}
|
|
154
|
+
</>
|
|
131
155
|
)
|
|
132
156
|
})
|
|
133
157
|
|
|
@@ -167,7 +191,7 @@ const Group = observer(({ app, r, now }: { app: HomeSt; r: ActivityRow; now: num
|
|
|
167
191
|
return (
|
|
168
192
|
<tbody className={`acgrp${idleRow(r) ? ' quiet' : ''}`}>
|
|
169
193
|
{rows.map((cells, i) => <tr key={i}>{i === 0 ? head : null}{cells}</tr>)}
|
|
170
|
-
{st.checksOpen.has(r.name) && failingOf(r).length > 0 ? <tr className="acchkrow"><td colSpan={
|
|
194
|
+
{st.checksOpen.has(r.name) && failingOf(r).length > 0 ? <tr className="acchkrow"><td colSpan={9}><CheckList app={app} r={r} /></td></tr> : null}
|
|
171
195
|
</tbody>
|
|
172
196
|
)
|
|
173
197
|
})
|
|
@@ -211,11 +235,11 @@ export const ActivityView = observer(({ app }: { app: HomeSt }) => {
|
|
|
211
235
|
{busy.length + idle.length === 0 ? null : (
|
|
212
236
|
<table className={`actable${st.stale ? ' stale' : ''}`}>
|
|
213
237
|
<colgroup>
|
|
214
|
-
<col className="c-name" /><col className="c-status" /><col className="c-branch" />
|
|
238
|
+
<col className="c-name" /><col className="c-status" /><col className="c-you" /><col className="c-branch" />
|
|
215
239
|
<col className="c-fork" /><col className="c-sha" /><col className="c-when" /><col /><col className="c-who" />
|
|
216
240
|
</colgroup>
|
|
217
241
|
<thead>
|
|
218
|
-
<tr><th>repo</th><th>status</th><th>branch</th><th colSpan={5}>commits, newest first</th></tr>
|
|
242
|
+
<tr><th>repo</th><th>status</th><th>on you</th><th>branch</th><th colSpan={5}>commits, newest first</th></tr>
|
|
219
243
|
</thead>
|
|
220
244
|
{busy.map((r) => <Group key={r.name} app={app} r={r} now={now} />)}
|
|
221
245
|
{idle.map((r) => <Group key={r.name} app={app} r={r} now={now} />)}
|
|
@@ -25,7 +25,7 @@ button.acpill:disabled{cursor:default}
|
|
|
25
25
|
.acgrp tr:first-child td{padding-top:var(--s1)}
|
|
26
26
|
.acgrp tr:last-child td{padding-bottom:var(--s1)}
|
|
27
27
|
.acgrp:hover{background:var(--panel)}
|
|
28
|
-
.actable{--acname-w:170px}.actable,.acchktip{--acmark-w:
|
|
28
|
+
.actable{--acname-w:170px}.actable,.acchktip{--acmark-w:14px}.c-name{width:var(--acname-w)}.c-status{width:52px}.c-you{width:56px}.c-branch{width:150px}
|
|
29
29
|
.c-sha{width:72px}.c-when{width:56px}.c-who{width:90px}
|
|
30
30
|
.acrepo{display:inline-flex;align-items:center;gap:var(--s1);max-width:100%;color:var(--ink);text-decoration:none}
|
|
31
31
|
.acrepo span{overflow:hidden;text-overflow:ellipsis}
|
|
@@ -36,6 +36,10 @@ button.acpill:disabled{cursor:default}
|
|
|
36
36
|
/* the status dot is a button: hover floats its checks, a click lists them under the row */
|
|
37
37
|
.acdot{border:0;background:none;padding:0 var(--s1);margin:0 calc(-1 * var(--s1));font:inherit;font-variant-numeric:tabular-nums;color:inherit;cursor:pointer;border-radius:3px}
|
|
38
38
|
.acdot:hover,.acdot[aria-expanded="true"]{background:var(--panel2)}
|
|
39
|
+
/* what waits on the owner: its own column, the inbox icon and a count, never the dot's colour */
|
|
40
|
+
.acyou{white-space:nowrap;font-variant-numeric:tabular-nums;color:var(--dim)}
|
|
41
|
+
.acyou .hico{width:14px;height:14px;vertical-align:-2px}
|
|
42
|
+
.actiphead{color:var(--dim);margin-bottom:var(--s1)}
|
|
39
43
|
.acchktip{z-index:40;max-width:560px;max-height:60vh;overflow:auto;background:var(--panel2);border:1px solid var(--line);border-radius:3px;box-shadow:0 2px 10px var(--shadow);padding:var(--s1) var(--s2);color:var(--ink);font-size:12px}
|
|
40
44
|
.acchecks{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:var(--s1);white-space:normal}
|
|
41
45
|
.acchecks li{display:flex;flex-direction:column;min-width:0}
|
|
@@ -43,6 +47,8 @@ button.acpill:disabled{cursor:default}
|
|
|
43
47
|
.acchkmark{flex:none;width:var(--acmark-w)}
|
|
44
48
|
.acchecks .fail .acchkmark,.acchecks .fail .acchkid{color:var(--red)}
|
|
45
49
|
.acchecks .warn .acchkmark,.acchecks .warn .acchkid{color:var(--warn)}
|
|
50
|
+
.acchecks .held .acchkid{color:var(--dim)}
|
|
51
|
+
.acchkmark .hico{width:12px;height:12px;vertical-align:-2px}
|
|
46
52
|
.acchkid{flex:none;font:11.5px ui-monospace,Menlo,monospace;text-decoration:none}
|
|
47
53
|
.acchkid:hover{text-decoration:underline}
|
|
48
54
|
.acchktitle{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// a repo's asks page: its asks on the left, the one picked on the right, whole (col-list-page.tsx draws both). This
|
|
2
|
+
// file holds what is the asks' own: the row, the bands' names and the page's words
|
|
3
|
+
import { observer } from 'mobx-react-lite'
|
|
4
|
+
import { afterWords } from '../../asks/ask-after.ts'
|
|
5
|
+
import { askAt, askFactWords, isClosedAsk, isLaterAsk, type AskGroupKey } from './col-tables.ts'
|
|
6
|
+
import { ColListPage, type ColListWords } from './col-list-page.tsx'
|
|
7
|
+
import { openAsks } from './asks-st.ts'
|
|
8
|
+
import type { Resource } from './hub-types.ts'
|
|
9
|
+
import { Icon, ICON } from './icons.tsx'
|
|
10
|
+
import type { RepoSt } from './repo-st.ts'
|
|
11
|
+
import { ageWords, stampWords } from './time-ago.tsx'
|
|
12
|
+
import { useInSight } from './tree-row.tsx'
|
|
13
|
+
|
|
14
|
+
/** a row of the list, the app's list row: its title, its age at its end in short (`70d`, the full stamp on hover), a
|
|
15
|
+
* later ask the day it waits for instead; a closed ask dimmed */
|
|
16
|
+
const AskRow = observer(({ app, r, on }: { app: RepoSt; r: Resource; on: boolean }) => {
|
|
17
|
+
const el = useInSight<HTMLButtonElement>(on)
|
|
18
|
+
const at = askAt(r)
|
|
19
|
+
const after = isLaterAsk(r) && r.ask?.after != null ? afterWords(r.ask.after) : null
|
|
20
|
+
return (
|
|
21
|
+
<button ref={el} type="button" className={`lrow${on ? ' on' : ''}${isClosedAsk(r) ? ' off' : ''}`} data-k={r.id} aria-current={on ? 'page' : undefined}
|
|
22
|
+
title={[r.title, ...askFactWords(r), r.file ?? ''].filter((x) => x !== '').join('\n')} onClick={() => app.asks.open(r.id)}>
|
|
23
|
+
<Icon d={ICON.asks} />
|
|
24
|
+
<span className="lgrow">{r.title}</span>
|
|
25
|
+
{after != null ? <span className="ldim lnum" title={after}>{after.replace(/^after /, '')}</span>
|
|
26
|
+
: at == null ? null : <span className="ldim lnum" title={stampWords(at)}>{ageWords(at, app.clock.now).replace(/ ago$/, '')}</span>}
|
|
27
|
+
</button>
|
|
28
|
+
)
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
const openWords = (n: number): string => (n === 0 ? 'asks · none open' : `asks · ${n} open`)
|
|
32
|
+
|
|
33
|
+
const WORDS: ColListWords<AskGroupKey> = {
|
|
34
|
+
search: 'search the asks',
|
|
35
|
+
nav: 'the asks of this repo',
|
|
36
|
+
band: { open: 'open', later: 'later', done: 'done', declined: 'declined by you' },
|
|
37
|
+
none: 'No ask yet.',
|
|
38
|
+
noMatch: 'No ask matches.',
|
|
39
|
+
reading: 'reading the asks…',
|
|
40
|
+
nothingShown: (total) => (total === 0 ? 'No ask yet: nothing has ever waited on a human here. An agent writes one with sk ask.' : 'No open ask: nothing waits on a human here.'),
|
|
41
|
+
phoneTop: (st) => openWords(openAsks(st.all)),
|
|
42
|
+
back: '◂ asks',
|
|
43
|
+
}
|
|
44
|
+
const PANELS = { cols: 'asks', list: 'asks-list', shown: 'asks-ask' }
|
|
45
|
+
|
|
46
|
+
export const AsksPage = observer(({ app }: { app: RepoSt }) => (
|
|
47
|
+
<ColListPage app={app} st={app.asks} words={WORDS} panels={PANELS} row={(r, on) => <AskRow app={app} r={r} on={on} />} />
|
|
48
|
+
))
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// the asks page's list (col-list-st.ts): every ask of the repo under its band (open by what it blocks, the oldest
|
|
2
|
+
// first; done after, folded by default), searched by its title, text, file and facts. The bare page shows the first
|
|
3
|
+
// open ask
|
|
4
|
+
import { askFactWords, askGroups, type AskGroupKey } from './col-tables.ts'
|
|
5
|
+
import { bandOf, onList, type ColList } from './col-list-st.ts'
|
|
6
|
+
import type { HashSel } from './hash-route.ts'
|
|
7
|
+
import type { Resource } from './hub-types.ts'
|
|
8
|
+
|
|
9
|
+
export const ASKS = 'asks'
|
|
10
|
+
|
|
11
|
+
/** the address shows the asks page: the page itself, or one ask of it */
|
|
12
|
+
export const onAsks = (sel: HashSel | null): boolean => onList(sel, ASKS)
|
|
13
|
+
|
|
14
|
+
/** a band's fold, under the key the viewer's choice was kept by before: `asks:done` open stays open */
|
|
15
|
+
export const bandKey = (g: AskGroupKey): string => bandOf(ASKS, g)
|
|
16
|
+
|
|
17
|
+
export const ASK_LIST: ColList<AskGroupKey> = {
|
|
18
|
+
col: ASKS,
|
|
19
|
+
groups: askGroups,
|
|
20
|
+
words: (r) => [r.title, r.text, r.file ?? '', ...askFactWords(r)],
|
|
21
|
+
first: 'open',
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** how many asks wait on a human now */
|
|
25
|
+
export const openAsks = (all: readonly Resource[]): number => askGroups(all).find((g) => g.key === 'open')?.rows.length ?? 0
|
|
@@ -8,8 +8,7 @@ import { makeAutoObservable, runInAction } from 'mobx'
|
|
|
8
8
|
|
|
9
9
|
export class ClockSvc {
|
|
10
10
|
now = Date.now()
|
|
11
|
-
/** the live interval, or null. A second start is a no-op rather than a
|
|
12
|
-
* second timer, because boot runs under StrictMode twice in dev */
|
|
11
|
+
/** the live interval, or null. A second start is a no-op rather than a second timer */
|
|
13
12
|
running: ReturnType<typeof setInterval> | null = null
|
|
14
13
|
|
|
15
14
|
constructor() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Collection views: the item card (
|
|
1
|
+
// Collection views: the item card (an ask, a cred), and the health/status card with the streaming
|
|
2
2
|
// check runner. Every verb posts to /api/act/* and lands in a git-tracked
|
|
3
3
|
// truth file; the truth chip names the file the item IS (on disagreement
|
|
4
4
|
// the file wins).
|
|
@@ -6,7 +6,12 @@ import { runInAction } from 'mobx'
|
|
|
6
6
|
import { observer } from 'mobx-react-lite'
|
|
7
7
|
import type { RepoSt } from './repo-st.ts'
|
|
8
8
|
import type { Resource } from './hub-types.ts'
|
|
9
|
-
import {
|
|
9
|
+
import { CopyMd } from './md-copy.tsx'
|
|
10
|
+
import { askAt, askFactWords, heldWords, isDeclinedAsk, isDoneAsk } from './col-tables.ts'
|
|
11
|
+
import { TimeAgo } from './time-ago.tsx'
|
|
12
|
+
import { ReaderChips } from './reader-chips.tsx'
|
|
13
|
+
import type { Readers } from '../../collections/collection-types.ts'
|
|
14
|
+
import { ThreadControl } from './review/thread-control.tsx'
|
|
10
15
|
|
|
11
16
|
// creds carry no truth file: the name is the id, the words after it are the
|
|
12
17
|
// service and what its probe last said, and the slot says present or missing
|
|
@@ -23,6 +28,27 @@ const CredHead = ({ cred }: { cred: ReturnType<typeof credOf> }) => (
|
|
|
23
28
|
</>
|
|
24
29
|
)
|
|
25
30
|
|
|
31
|
+
/** an ask's facts under its title: its kind, what it blocks, how it closes, since when */
|
|
32
|
+
const AskFacts = observer(({ app, i }: { app: RepoSt; i: Resource }) => {
|
|
33
|
+
const at = askAt(i)
|
|
34
|
+
return (
|
|
35
|
+
<div className="creddesc">
|
|
36
|
+
{askFactWords(i).join(' · ')}
|
|
37
|
+
{at == null ? null : <>{' · '}{isDoneAsk(i) ? 'done' : isDeclinedAsk(i) ? 'declined by you' : 'asked'} <TimeAgo clock={app.clock} at={at} /></>}
|
|
38
|
+
</div>
|
|
39
|
+
)
|
|
40
|
+
})
|
|
41
|
+
|
|
42
|
+
/** the secrets an ask stores with a command of its body, each with who will read it */
|
|
43
|
+
const StoredBy = ({ names, readers }: { names: string[]; readers: Record<string, Readers> | undefined }) =>
|
|
44
|
+
names.length === 0 ? null : (
|
|
45
|
+
<div className="creds">{names.map((name) => (
|
|
46
|
+
<div className="credrow" key={name}>
|
|
47
|
+
<div className="credhead"><span className="credname">{name}</span><ReaderChips who={readers?.[name]} lead="who will read it" /></div>
|
|
48
|
+
</div>
|
|
49
|
+
))}</div>
|
|
50
|
+
)
|
|
51
|
+
|
|
26
52
|
export const ColCard = observer(({ app, col, id }: { app: RepoSt; col: string; id: string }) => {
|
|
27
53
|
const c = app.cols
|
|
28
54
|
const i = c.find(col, id)
|
|
@@ -36,12 +62,13 @@ export const ColCard = observer(({ app, col, id }: { app: RepoSt; col: string; i
|
|
|
36
62
|
<div className="colcard">
|
|
37
63
|
<h3>
|
|
38
64
|
<CredHead cred={cred} />
|
|
65
|
+
<ReaderChips who={i.who} lead="who can read it" />
|
|
39
66
|
{i.artifact?.url != null ? <a className="mint" href={i.artifact.url} target="_blank" rel="noreferrer">mint ↗</a> : null}
|
|
40
67
|
</h3>
|
|
41
68
|
{cred.service != null ? <div className="creddesc">{cred.service}</div> : null}
|
|
42
69
|
{/* probe FAIL + fix: pointers ride the instance md — for an
|
|
43
70
|
ask-covered cred (no verbs, no artifact) it is the ONLY detail */}
|
|
44
|
-
{i.md != null ? <
|
|
71
|
+
{i.md != null ? <CopyMd md={i.md} /> : null}
|
|
45
72
|
{cred.missing && i.artifact?.copy != null ? (
|
|
46
73
|
<>
|
|
47
74
|
<code>{i.artifact.copy}</code>
|
|
@@ -57,8 +84,10 @@ export const ColCard = observer(({ app, col, id }: { app: RepoSt; col: string; i
|
|
|
57
84
|
<h3>
|
|
58
85
|
<span className={`tl ${i.state}`}>{i.text}</span>
|
|
59
86
|
{i.file != null ? <span className="truth">{i.file}</span> : null}
|
|
87
|
+
{askFile != null ? <ThreadControl st={app} address={`ask:${askFile}`} name={i.text} /> : null}
|
|
60
88
|
</h3>
|
|
61
|
-
{
|
|
89
|
+
{askFile != null ? <AskFacts app={app} i={i} /> : null}
|
|
90
|
+
{i.md != null ? <CopyMd md={i.md} /> : null}
|
|
62
91
|
{i.remarks != null && i.remarks.length > 0 ? <div className="rem">{i.remarks.join('\n')}</div> : null}
|
|
63
92
|
{i.artifact?.copy != null ? (
|
|
64
93
|
<>
|
|
@@ -68,20 +97,42 @@ export const ColCard = observer(({ app, col, id }: { app: RepoSt; col: string; i
|
|
|
68
97
|
) : null}
|
|
69
98
|
{i.artifact?.url != null ? <div className="row"><a href={i.artifact.url} target="_blank" rel="noreferrer">mint ↗</a></div> : null}
|
|
70
99
|
{i.artifact?.steps != null ? <div className="row"><div>{i.artifact.steps.map((s, n) => <span key={n}>{n + 1}. {s}<br /></span>)}</div></div> : null}
|
|
71
|
-
{/* a credential ask takes its value here: a
|
|
72
|
-
{askFile != null && i.severity != null
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
100
|
+
{/* a credential ask takes its value here: a row per secret it names, its state in the store, a password field sent once, never shown */}
|
|
101
|
+
{askFile != null && i.severity != null && (i.ask?.secrets ?? []).length > 0 ? <div className="creds">{i.ask!.secrets.map((name) => {
|
|
102
|
+
const h = heldWords(c.secretHeld.get(name) ?? i.ask?.held?.[name], i.ask?.created, app.clock.now)
|
|
103
|
+
const err = c.secretErrs.get(name)
|
|
104
|
+
const login = (i.ask?.logins ?? []).includes(name)
|
|
105
|
+
const account = c.secretAccounts.get(name) ?? i.ask?.accounts?.[name]
|
|
106
|
+
return (
|
|
107
|
+
<div className="credrow" key={name}>
|
|
108
|
+
<div className="credhead">
|
|
109
|
+
<span className="credname">{name}</span>
|
|
110
|
+
<ReaderChips who={i.ask?.readers?.[name]} lead="who will read it" />
|
|
111
|
+
{login && account != null ? <span className="credaccount">account: {account}</span> : null}
|
|
112
|
+
<span className={`credheld ${h.tone}`}>{h.words}</span>
|
|
113
|
+
</div>
|
|
114
|
+
<div className="row">
|
|
115
|
+
{login ? <input className="credacct" type="text" autoComplete="off" spellCheck={false} placeholder="account (the email or user name you sign in with)" value={c.accountDrafts.get(name) ?? ''}
|
|
116
|
+
onChange={(e) => c.setAccountDraft(name, e.target.value)}
|
|
117
|
+
onKeyDown={(e) => { if (e.key === 'Enter') void c.storeSecret(askFile, name, true) }} /> : null}
|
|
118
|
+
<input type="password" autoComplete="off" spellCheck={false} placeholder={login ? 'password' : h.tone === 'red' ? `paste the value of ${name}` : 'paste a new value'} value={c.secretDrafts.get(name) ?? ''}
|
|
119
|
+
onChange={(e) => c.setSecretDraft(name, e.target.value)}
|
|
120
|
+
onKeyDown={(e) => { if (e.key === 'Enter') void c.storeSecret(askFile, name, login) }} />
|
|
121
|
+
<button onClick={() => void c.storeSecret(askFile, name, login)}>store</button>
|
|
122
|
+
</div>
|
|
123
|
+
{err != null ? <div className="err">✗ {err}</div> : null}
|
|
124
|
+
</div>
|
|
125
|
+
)
|
|
126
|
+
})}</div> : null}
|
|
127
|
+
{/* a secret its body stores with a command line (an older ask): who will read it, said before he runs it */}
|
|
128
|
+
{askFile != null && i.severity != null ? <StoredBy names={(i.ask?.stores ?? []).filter((n) => !(i.ask?.secrets ?? []).includes(n))} readers={i.ask?.readers} /> : null}
|
|
80
129
|
{c.secretNote !== '' ? <div className="said">✓ {c.secretNote}</div> : null}
|
|
81
130
|
{askFile != null && i.severity != null ? (
|
|
82
131
|
<div className="row">
|
|
83
132
|
<input placeholder="proof URL (optional)" value={c.proofDraft} onChange={(e) => runInAction(() => { c.proofDraft = e.target.value })} />
|
|
84
133
|
<button onClick={() => void c.askDone(askFile)}>done ✓</button>
|
|
134
|
+
<button className="ghost" title="close it as declined: nothing asks it again, nothing waits on you for it. A remark below is kept as your reason. To undo, set its status back to open in the file"
|
|
135
|
+
onClick={() => void c.askDecline(askFile)}>I will not do this</button>
|
|
85
136
|
</div>
|
|
86
137
|
) : null}
|
|
87
138
|
{askFile != null ? (
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
// a collection's own list page (asks, reflections): its rows on the left under their bands, the one picked on the
|
|
2
|
+
// right, whole, as its card draws it (col-card.tsx). On a phone one pane at a time: the list, or the row with the way
|
|
3
|
+
// back to it.
|
|
4
|
+
//
|
|
5
|
+
// The constraint a reader breaks first: nothing here is drawn its own way. The rows and bands are the app's list rows
|
|
6
|
+
// (hub.css .lrow, .lband through social/kit.tsx KeptBand), the column and its filter the review's (review.css
|
|
7
|
+
// .rv-listcol, list-filter.tsx), and tests/asks-page.test.tsx fails a sheet rule that gives them a look of their own
|
|
8
|
+
import { observer } from 'mobx-react-lite'
|
|
9
|
+
import { Fragment, type ReactNode } from 'react'
|
|
10
|
+
import { Panel, Separator } from 'react-resizable-panels'
|
|
11
|
+
import { ColCard } from './col-card.tsx'
|
|
12
|
+
import type { ColListSt } from './col-list-st.ts'
|
|
13
|
+
import type { Resource } from './hub-types.ts'
|
|
14
|
+
import { KeptCols, LIST_COL } from './kept-cols.tsx'
|
|
15
|
+
import { ListFilter } from './list-filter.tsx'
|
|
16
|
+
import type { RepoSt } from './repo-st.ts'
|
|
17
|
+
import { PANEL, PhoneTop } from './review/review-page.tsx'
|
|
18
|
+
import { KeptBand } from './social/kit.tsx'
|
|
19
|
+
|
|
20
|
+
export type ColListWords<K extends string> = {
|
|
21
|
+
/** the filter's placeholder and label */
|
|
22
|
+
search: string
|
|
23
|
+
/** the list's name for a screen reader */
|
|
24
|
+
nav: string
|
|
25
|
+
band: Record<K, string>
|
|
26
|
+
/** the list with no row at all, and with none the filter keeps */
|
|
27
|
+
none: string
|
|
28
|
+
noMatch: string
|
|
29
|
+
reading: string
|
|
30
|
+
/** the right side with no row shown: `total` rows exist */
|
|
31
|
+
nothingShown: (total: number) => string
|
|
32
|
+
/** a phone: the line above the list, and the way back to it */
|
|
33
|
+
phoneTop: (st: ColListSt<K>) => string
|
|
34
|
+
back: string
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
type Props<K extends string> = {
|
|
38
|
+
app: RepoSt
|
|
39
|
+
st: ColListSt<K>
|
|
40
|
+
words: ColListWords<K>
|
|
41
|
+
/** one row of the list: the app's list row (`.lrow`), `on` for the one shown */
|
|
42
|
+
row: (r: Resource, on: boolean) => ReactNode
|
|
43
|
+
/** the ids its column widths are kept by */
|
|
44
|
+
panels: { cols: string; list: string; shown: string }
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const List = observer(<K extends string>({ app, st, words, row }: Props<K>) => {
|
|
48
|
+
const cur = st.currentId
|
|
49
|
+
const groups = st.groups
|
|
50
|
+
return (
|
|
51
|
+
<div className="rv-listcol">
|
|
52
|
+
<div className="rv-filters">
|
|
53
|
+
<ListFilter side={st.side} value={st.query} set={(v) => st.setQuery(v)} keep={(el) => { st.searchEl = el }} placeholder={words.search} label={words.search} />
|
|
54
|
+
</div>
|
|
55
|
+
<nav className="rv-listscroll" aria-label={words.nav}>
|
|
56
|
+
{groups.map((g) => {
|
|
57
|
+
// a folded band still shows the row shown
|
|
58
|
+
const open = st.isOpen(st.band(g.key), !g.foldedByDefault)
|
|
59
|
+
const rows = (open ? g.rows : g.rows.filter((r) => r.id === cur)).map((r) => <Fragment key={r.id}>{row(r, r.id === cur)}</Fragment>)
|
|
60
|
+
return (
|
|
61
|
+
<Fragment key={g.key}>
|
|
62
|
+
<KeptBand so={st} card={st.band(g.key)} title={words.band[g.key]} n={g.rows.length} open={!g.foldedByDefault}>
|
|
63
|
+
<div className="lrows">{rows}</div>
|
|
64
|
+
</KeptBand>
|
|
65
|
+
{open || rows.length === 0 ? null : <div className="lrows">{rows}</div>}
|
|
66
|
+
</Fragment>
|
|
67
|
+
)
|
|
68
|
+
})}
|
|
69
|
+
{groups.length > 0 || !app.cols.loaded ? null : <div className="rv-empty">{st.all.length === 0 ? words.none : words.noMatch}</div>}
|
|
70
|
+
</nav>
|
|
71
|
+
</div>
|
|
72
|
+
)
|
|
73
|
+
})
|
|
74
|
+
|
|
75
|
+
/** the row shown, whole; a plain line when none is open */
|
|
76
|
+
const Shown = observer(<K extends string>({ app, st, words }: Props<K>) => {
|
|
77
|
+
const id = st.currentId
|
|
78
|
+
if (!app.cols.loaded && !app.cols.cached) return <div className="rv-empty"><span className="spin" /> {words.reading}</div>
|
|
79
|
+
if (id != null) return <div className="stagewrap"><ColCard app={app} col={st.list.col} id={id} /></div>
|
|
80
|
+
return (
|
|
81
|
+
<div className="stagewrap">
|
|
82
|
+
<div className="ph">{words.nothingShown(st.all.length)}</div>
|
|
83
|
+
</div>
|
|
84
|
+
)
|
|
85
|
+
})
|
|
86
|
+
|
|
87
|
+
export const ColListPage = observer(<K extends string>(p: Props<K>) => {
|
|
88
|
+
const { app, st, words, panels } = p
|
|
89
|
+
if (app.home.layout.narrow) {
|
|
90
|
+
const sel = app.sel
|
|
91
|
+
const one = sel?.t === 'item' && sel.col === st.list.col ? sel.id : null
|
|
92
|
+
return (
|
|
93
|
+
<div className="rv-phone">
|
|
94
|
+
{one == null ? (
|
|
95
|
+
<>
|
|
96
|
+
<PhoneTop app={app} what={words.phoneTop(st)} />
|
|
97
|
+
<div className="rv-phonepane"><List {...p} /></div>
|
|
98
|
+
</>
|
|
99
|
+
) : (
|
|
100
|
+
<>
|
|
101
|
+
<div className="rv-phonetop">
|
|
102
|
+
<button className="ghost" onClick={() => app.showCol(st.list.col)}>{words.back}</button>
|
|
103
|
+
<b>{app.name}</b>
|
|
104
|
+
</div>
|
|
105
|
+
<div className="rv-phonepane"><Shown {...p} /></div>
|
|
106
|
+
</>
|
|
107
|
+
)}
|
|
108
|
+
</div>
|
|
109
|
+
)
|
|
110
|
+
}
|
|
111
|
+
return (
|
|
112
|
+
<KeptCols id={panels.cols} folds={{ left: panels.list }} layout={app.home.layout}>
|
|
113
|
+
<Panel id={panels.list} {...LIST_COL} className="rv-pane" style={PANEL}>
|
|
114
|
+
<List {...p} />
|
|
115
|
+
</Panel>
|
|
116
|
+
<Separator className="rsep" />
|
|
117
|
+
<Panel id={panels.shown} defaultSize="72%" minSize={340} className="rv-pane" style={PANEL}>
|
|
118
|
+
<Shown {...p} />
|
|
119
|
+
</Panel>
|
|
120
|
+
</KeptCols>
|
|
121
|
+
)
|
|
122
|
+
})
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
// a collection's own list page (asks, reflections): every row of the collection under its band, its filter, and the
|
|
2
|
+
// row shown. The address names the row (`item:<col>:<id>`); the bare page (`col:<col>`) shows the first row of the
|
|
3
|
+
// list's first band. What differs between two such pages is a ColList, never a second state class
|
|
4
|
+
import { makeAutoObservable } from 'mobx'
|
|
5
|
+
import type { TableGroup } from './col-tables.ts'
|
|
6
|
+
import type { HashSel } from './hash-route.ts'
|
|
7
|
+
import type { Resource } from './hub-types.ts'
|
|
8
|
+
import { sideOf, type SideList } from './list-walk.ts'
|
|
9
|
+
import type { RepoSt } from './repo-st.ts'
|
|
10
|
+
import type { Folds } from './social/kit.tsx'
|
|
11
|
+
|
|
12
|
+
export type ColList<K extends string> = {
|
|
13
|
+
/** the collection listed, its id in the address */
|
|
14
|
+
col: string
|
|
15
|
+
/** the bands in the order drawn, each with its rows in order; a band with no row is left out */
|
|
16
|
+
groups: (rows: readonly Resource[]) => TableGroup<K>[]
|
|
17
|
+
/** the words the filter reads of a row */
|
|
18
|
+
words: (r: Resource) => string[]
|
|
19
|
+
/** the band whose first row the bare page shows; without it, the first band drawn */
|
|
20
|
+
first?: K
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/** the address shows the list page of a collection: the page itself, or one row of it */
|
|
24
|
+
export const onList = (sel: HashSel | null, col: string): boolean => (sel?.t === 'col' && sel.id === col) || (sel?.t === 'item' && sel.col === col)
|
|
25
|
+
|
|
26
|
+
/** a band's fold, under the key the viewer's choice is kept by: `asks:done` */
|
|
27
|
+
export const bandOf = (col: string, g: string): string => `${col}:${g}`
|
|
28
|
+
|
|
29
|
+
export class ColListSt<K extends string> implements Folds {
|
|
30
|
+
/** the list's filter, typed in its field */
|
|
31
|
+
query = ''
|
|
32
|
+
/** the filter field, `/` focuses it */
|
|
33
|
+
searchEl: HTMLInputElement | null = null
|
|
34
|
+
|
|
35
|
+
constructor(private st: RepoSt, readonly list: ColList<K>) {
|
|
36
|
+
makeAutoObservable<this, 'st'>(this, { st: false, searchEl: false, list: false })
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** the page shows: the list page itself, or one row of it */
|
|
40
|
+
get shown(): boolean {
|
|
41
|
+
return onList(this.st.sel, this.list.col)
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** every row of the collection */
|
|
45
|
+
get all(): Resource[] {
|
|
46
|
+
return this.st.cols.resources.filter((r) => r.collection === this.list.col)
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** the bands as drawn, the filter applied */
|
|
50
|
+
get groups(): TableGroup<K>[] {
|
|
51
|
+
const q = this.query.trim().toLowerCase()
|
|
52
|
+
return this.list.groups(q === '' ? this.all : this.all.filter((r) => this.list.words(r).some((x) => x.toLowerCase().includes(q))))
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/** the row the address names, else the first of the list's first band; null with none there */
|
|
56
|
+
get currentId(): string | null {
|
|
57
|
+
const s = this.st.sel
|
|
58
|
+
if (s?.t === 'item' && s.col === this.list.col) return s.id
|
|
59
|
+
const all = this.list.groups(this.all)
|
|
60
|
+
return (this.list.first == null ? all[0] : all.find((g) => g.key === this.list.first))?.rows[0]?.id ?? null
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
band(g: K): string {
|
|
64
|
+
return bandOf(this.list.col, g)
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/** the rows the arrows walk, in the order drawn: a folded band hides its own, never the one shown */
|
|
68
|
+
get visible(): Resource[] {
|
|
69
|
+
const cur = this.currentId
|
|
70
|
+
return this.groups.flatMap((g) => g.rows.filter((r) => r.id === cur || this.isOpen(this.band(g.key), !g.foldedByDefault)))
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/** a band shows its rows: a filter shows every match, else as the viewer left it, `init` before */
|
|
74
|
+
isOpen(card: string, init: boolean): boolean {
|
|
75
|
+
if (this.query.trim() !== '') return true
|
|
76
|
+
const folded = this.st.cols.tableFolds.get(card)
|
|
77
|
+
return folded == null ? init : !folded
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
flipFold(card: string, init: boolean): void {
|
|
81
|
+
if (this.query.trim() !== '') return
|
|
82
|
+
this.st.cols.setGroupFolded(card, this.isOpen(card, init))
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
setQuery(v: string): void {
|
|
86
|
+
this.query = v
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/** a click on a row: it shows on the right, and the address names it */
|
|
90
|
+
open(id: string): void {
|
|
91
|
+
this.st.cols.select(this.list.col, id)
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/** the list as its keys walk it (list-walk.ts): a walk of the arrows is one history entry */
|
|
95
|
+
get side(): SideList {
|
|
96
|
+
return sideOf({
|
|
97
|
+
ids: () => this.visible.map((r) => r.id),
|
|
98
|
+
current: () => this.currentId,
|
|
99
|
+
open: (id) => this.st.walk(() => this.open(id)),
|
|
100
|
+
filter: () => this.searchEl,
|
|
101
|
+
})
|
|
102
|
+
}
|
|
103
|
+
}
|