rvlib-shipkit 2.29.0 → 2.30.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 -1
- package/package.json +2 -1
- package/src/advisors/app-graph.ts +1 -1
- package/src/advisors/expose.ts +5 -1
- package/src/advisors/r2.ts +7 -9
- package/src/advisors/routes.ts +29 -2
- package/src/advisors/scan.ts +11 -0
- package/src/agent-time/accounts-usage.ts +8 -0
- package/src/agent-time/claude-sessions.ts +32 -0
- package/src/agent-time/hooks.ts +1 -1
- package/src/agent-time/live.ts +5 -2
- package/src/agent-time/registry.ts +186 -89
- package/src/agent-time/store.ts +6 -4
- package/src/asks/ask-doc.ts +2 -2
- package/src/asks/ask-store.ts +22 -7
- package/src/check.ts +9 -1
- package/src/checks/SK001-package-json-shape.check.ts +1 -0
- package/src/checks/SK003-claude-md-shape.check.ts +1 -0
- package/src/checks/SK004-gitignore-policy.check.ts +12 -6
- package/src/checks/SK008-reviewer-agent.check.ts +4 -7
- package/src/checks/SK013-one-way-in-policy.check.ts +1 -0
- package/src/checks/SK017-vscode-hub-task.check.ts +1 -0
- package/src/checks/SK024-identity-colors.check.ts +1 -1
- package/src/checks/SK027-agent-wiki-links.check.ts +2 -1
- package/src/checks/SK033-global-contribution.check.ts +1 -0
- package/src/checks/SK034-commit-gates-armed.check.ts +1 -0
- package/src/checks/SK039-vscode-watch-generated.check.ts +1 -0
- package/src/checks/SK049-thread-answers-hook.check.ts +9 -5
- package/src/checks/SK050-retired-commands.check.ts +1 -0
- package/src/checks/SK051-no-formatter.check.ts +1 -0
- package/src/cli/channel-run.ts +17 -0
- package/src/cli/cmd_Advisors.ts +28 -7
- package/src/cli/cmd_Asks.ts +2 -2
- package/src/cli/cmd_Backup.ts +5 -1
- package/src/cli/cmd_CacheAudit.ts +1 -1
- package/src/cli/cmd_Channel.ts +43 -0
- package/src/cli/cmd_GlobalProcesses.ts +1 -0
- package/src/cli/cmd_Home.ts +12 -5
- package/src/cli/cmd_Hooks.ts +1 -1
- package/src/cli/cmd_Hq.ts +43 -0
- package/src/cli/cmd_Lanes.ts +15 -3
- package/src/cli/cmd_Media.ts +8 -3
- package/src/cli/cmd_Orchestrator.ts +253 -84
- package/src/cli/cmd_OrchestratorRole.ts +163 -0
- package/src/cli/cmd_Review.ts +142 -165
- package/src/cli/cmd_Secret.ts +44 -14
- package/src/cli/cmd_Shot.ts +2 -4
- package/src/cli/cmd_Sound.ts +1 -0
- package/src/cli/cmd_Urls.ts +3 -3
- package/src/cli/inbox-hook-run.ts +109 -0
- package/src/cli/registry.ts +6 -2
- package/src/cli/review-here.ts +136 -0
- package/src/cli.ts +45 -14
- package/src/collections/actions.ts +5 -4
- package/src/collections/checks.ts +5 -0
- package/src/collections/collection-types.ts +4 -3
- package/src/collections/pings.ts +4 -1
- package/src/collections/providers.ts +6 -4
- package/src/collections/tests.ts +7 -4
- package/src/core/app-icon-frame.ts +62 -0
- package/src/core/app-icon.ts +179 -17
- package/src/core/archived.ts +10 -7
- package/src/core/check-ctx.ts +38 -4
- package/src/core/check-pass.ts +7 -0
- package/src/core/foreign.ts +87 -0
- package/src/core/gui-color.ts +75 -0
- package/src/core/hub-theme.ts +1 -3
- package/src/core/layout.ts +3 -0
- package/src/core/machine-commit.ts +9 -1
- package/src/core/one-lib.ts +2 -1
- package/src/core/one-way-in-policy.ts +17 -12
- package/src/core/owner-word-policy.ts +123 -0
- package/src/core/panel-shades.ts +140 -0
- package/src/core/repo-gui-color.ts +16 -0
- package/src/core/role-policy.ts +17 -0
- package/src/core/scope.ts +6 -3
- package/src/core/tmux-policy.ts +264 -0
- package/src/core/unit-icon.ts +43 -0
- package/src/fleet/push-fleet.ts +2 -0
- package/src/fleet/scan-fleet.ts +3 -0
- package/src/gate/cache-audit.ts +7 -1
- package/src/gate/gate-checks.ts +14 -9
- package/src/gate/run-fix.ts +30 -5
- package/src/gate/run-fixers.ts +8 -3
- package/src/home/activity-shape.ts +2 -0
- package/src/home/activity.ts +2 -1
- package/src/home/daemon-guard.ts +20 -2
- package/src/home/daemon-jobs.ts +26 -18
- package/src/home/gui-app/ShipkitGui.swift +2012 -144
- package/src/home/gui-app/icon.svg +8 -0
- package/src/home/gui-app.ts +94 -30
- package/src/home/home-routes.ts +53 -9
- package/src/home/home-start.ts +27 -3
- package/src/home/inbox-shape.ts +7 -3
- package/src/home/log-follow.ts +117 -0
- package/src/home/machine-fold.ts +1 -1
- package/src/home/open-app.ts +9 -3
- package/src/home/page-build.ts +5 -1
- package/src/home/page-held.ts +1 -1
- package/src/home/pm-config.ts +0 -8
- package/src/home/pm.ts +62 -5
- package/src/home/process-apps.ts +70 -23
- package/src/home/process-rows.ts +16 -1
- package/src/home/push-sources.ts +18 -13
- package/src/home/resources.ts +16 -7
- package/src/home/run-daemon.ts +4 -1
- package/src/home/run-pm.ts +1 -1
- package/src/home/serve-daemon.ts +13 -4
- package/src/home/serve-web.ts +141 -17
- package/src/home/space-page.ts +3 -3
- package/src/home/space-route.ts +2 -2
- package/src/home/supervise.ts +2 -1
- package/src/home/vault-page.ts +2 -1
- package/src/home/web-places.ts +239 -0
- package/src/home/widgets.ts +16 -2
- package/src/hooks/commit-message.ts +11 -9
- package/src/hooks/one-way-in-guard.ts +145 -68
- package/src/hooks/run-hooks.ts +15 -5
- package/src/hooks/shared-file.ts +273 -83
- package/src/hooks/shell-writes.ts +620 -0
- package/src/hooks/write-log.ts +149 -0
- package/src/hq/door-route.ts +63 -7
- package/src/hq/door.ts +45 -12
- package/src/hq/history-send.ts +3 -1
- package/src/hq/hq-db.ts +10 -3
- package/src/hq/hq-local.ts +24 -5
- package/src/hq/hq-routes.ts +3 -1
- package/src/hq/hq-store.ts +9 -3
- package/src/hq/kinds/index.ts +2 -1
- package/src/hq/kinds/kind.ts +9 -4
- package/src/hq/kinds/presence-rule.ts +56 -0
- package/src/hq/kinds/presence.ts +210 -0
- package/src/hq/kinds/report.ts +8 -5
- package/src/hq/lead-order.ts +68 -0
- package/src/hq/outbox.ts +7 -0
- package/src/hq/replica.ts +5 -7
- package/src/hq/report-facts.ts +14 -7
- package/src/hq/report.ts +47 -2
- package/src/hq/switch.ts +1 -0
- package/src/hq/terminal-hop.ts +64 -0
- package/src/hq/thread-sync.ts +13 -6
- package/src/http/door-forward.ts +10 -12
- package/src/http/door-names.ts +9 -0
- package/src/http/hop-caller.ts +23 -0
- package/src/http/hop-names.ts +14 -0
- package/src/http/loopback-serve.ts +28 -6
- package/src/http/owner-word.ts +128 -0
- package/src/http/same-origin.ts +12 -0
- package/src/{serve → http}/secret-gate.ts +3 -3
- package/src/ledger/run-log.ts +25 -1
- package/src/media-store/backup/sources.ts +53 -6
- package/src/media-store/backup/thread-copy.ts +9 -5
- package/src/media-store/copy/config.ts +10 -9
- package/src/media-store/daemon.ts +5 -2
- package/src/media-store/put.ts +3 -0
- package/src/media-store/space.ts +14 -16
- package/src/media-store/upload.ts +4 -0
- package/src/messages/collection.ts +2 -2
- package/src/messages/model.ts +6 -1
- package/src/messages/routes.ts +3 -0
- package/src/orchestrator/brief.md +8 -6
- package/src/orchestrator/channel-declare.ts +58 -0
- package/src/orchestrator/channel.ts +226 -0
- package/src/orchestrator/guards.ts +12 -3
- package/src/orchestrator/host.ts +35 -0
- package/src/orchestrator/lead-shape.ts +86 -0
- package/src/orchestrator/now.ts +88 -0
- package/src/orchestrator/phone.ts +4 -1
- package/src/orchestrator/places-file.ts +38 -0
- package/src/orchestrator/places-look.ts +180 -0
- package/src/orchestrator/places-shape.ts +151 -0
- package/src/orchestrator/places.ts +50 -0
- package/src/orchestrator/presence-shape.ts +13 -2
- package/src/orchestrator/presence.ts +26 -15
- package/src/orchestrator/push.ts +5 -10
- package/src/orchestrator/role-shape.ts +270 -0
- package/src/orchestrator/role.ts +242 -0
- package/src/orchestrator/routes.ts +136 -31
- package/src/orchestrator/sessions-shape.ts +78 -0
- package/src/orchestrator/sessions.ts +86 -0
- package/src/orchestrator/share.ts +71 -0
- package/src/orchestrator/start-notice.ts +61 -0
- package/src/orchestrator/start.ts +137 -0
- package/src/orchestrator/started.ts +55 -0
- package/src/orchestrator/stuck.ts +196 -0
- package/src/orchestrator/unheard.ts +18 -7
- package/src/pages/frame-client.ts +44 -6
- package/src/problems/failure-words.ts +80 -0
- package/src/release/run-bump.ts +26 -5
- package/src/release/run-release.ts +34 -14
- package/src/repo-config.ts +37 -9
- package/src/review/aside-at.ts +19 -0
- package/src/review/band.ts +3 -3
- package/src/review/doc-save.ts +1 -1
- package/src/review/inbox-hook.ts +12 -4
- package/src/review/inbox-read.ts +20 -7
- package/src/review/instruction-guards.ts +137 -0
- package/src/review/instructions.ts +14 -2
- package/src/review/item-db.ts +52 -2
- package/src/review/mentions.ts +6 -4
- package/src/review/model.ts +3 -2
- package/src/review/parties.ts +88 -19
- package/src/review/push.ts +32 -15
- package/src/review/routes.ts +12 -4
- package/src/review/secret-route.ts +5 -5
- package/src/review/snooze.ts +1 -16
- package/src/review/store-parties.ts +4 -2
- package/src/review/take-back.ts +2 -1
- package/src/review/threads.ts +13 -2
- package/src/review/unit.ts +3 -2
- package/src/review/view-layout.ts +8 -1
- package/src/review/watchers.ts +25 -4
- package/src/secrets/key-pair.ts +14 -0
- package/src/secrets/lapse.ts +3 -3
- package/src/secrets/manager.ts +5 -1
- package/src/secrets/name-template.ts +83 -0
- package/src/secrets/name.ts +3 -0
- package/src/secrets/read.ts +10 -6
- package/src/secrets/secrets-view.ts +299 -0
- package/src/secrets/who-reads.ts +2 -1
- package/src/serve/frame-part.ts +49 -0
- package/src/serve/hub-app/accounts-line.tsx +33 -45
- package/src/serve/hub-app/activity-st.ts +6 -5
- package/src/serve/hub-app/activity-view.tsx +10 -9
- package/src/serve/hub-app/advice-box.tsx +6 -5
- package/src/serve/hub-app/advisor-app.tsx +2 -0
- package/src/serve/hub-app/advisor-face.tsx +3 -2
- package/src/serve/hub-app/advisor.html +1 -0
- package/src/serve/hub-app/advisors-view.tsx +52 -10
- package/src/serve/hub-app/advisors.css +4 -0
- package/src/serve/hub-app/app-bridge.ts +31 -5
- package/src/serve/hub-app/asked-page.ts +24 -0
- package/src/serve/hub-app/asks-page.tsx +10 -6
- package/src/serve/hub-app/auto-text.tsx +7 -5
- package/src/serve/hub-app/card-head.tsx +3 -2
- package/src/serve/hub-app/check-view.tsx +10 -9
- package/src/serve/hub-app/checks-svc.ts +96 -32
- package/src/serve/hub-app/clock-svc.ts +24 -8
- package/src/serve/hub-app/code-copy.ts +1 -1
- package/src/serve/hub-app/col-card.tsx +2 -1
- package/src/serve/hub-app/col-list-page.tsx +12 -6
- package/src/serve/hub-app/col-list-st.ts +12 -2
- package/src/serve/hub-app/col-tables-view.tsx +8 -44
- package/src/serve/hub-app/col-tables.ts +0 -14
- package/src/serve/hub-app/cols-svc.ts +6 -12
- package/src/serve/hub-app/columns.ts +94 -0
- package/src/serve/hub-app/comfy-view.tsx +8 -7
- package/src/serve/hub-app/commands/commands-page.tsx +4 -3
- package/src/serve/hub-app/commands/commands-st.ts +2 -2
- package/src/serve/hub-app/controls.css +69 -23
- package/src/serve/hub-app/cycle-button.tsx +2 -1
- package/src/serve/hub-app/database-st.ts +1 -1
- package/src/serve/hub-app/database-view.tsx +4 -2
- package/src/serve/hub-app/deaf.tsx +27 -0
- package/src/serve/hub-app/dock-st.ts +21 -16
- package/src/serve/hub-app/dock-view.tsx +19 -12
- package/src/serve/hub-app/empty-section.tsx +30 -0
- package/src/serve/hub-app/entry-bar.css +1 -1
- package/src/serve/hub-app/entry-bar.tsx +11 -6
- package/src/serve/hub-app/entry-list.css +32 -0
- package/src/serve/hub-app/entry-list.tsx +123 -0
- package/src/serve/hub-app/entry-pick.ts +1 -1
- package/src/serve/hub-app/entry-sections.ts +140 -0
- package/src/serve/hub-app/event-stream-reader.ts +56 -0
- package/src/serve/hub-app/floating.tsx +68 -14
- package/src/serve/hub-app/geometry-view.tsx +3 -2
- package/src/serve/hub-app/git-view.tsx +3 -2
- package/src/serve/hub-app/hash-route.ts +14 -2
- package/src/serve/hub-app/header-bar.tsx +53 -36
- package/src/serve/hub-app/home-st.ts +131 -14
- package/src/serve/hub-app/home-strip.css +24 -13
- package/src/serve/hub-app/home-strip.tsx +131 -66
- package/src/serve/hub-app/home.html +5 -0
- package/src/serve/hub-app/hub-app.tsx +94 -102
- package/src/serve/hub-app/hub.css +61 -94
- package/src/serve/hub-app/icons.tsx +16 -0
- package/src/serve/hub-app/identities-st.ts +19 -54
- package/src/serve/hub-app/identities-view.tsx +25 -24
- package/src/serve/hub-app/identity-address.ts +2 -2
- package/src/serve/hub-app/in-sight.ts +10 -0
- package/src/serve/hub-app/inbox-st.ts +20 -2
- package/src/serve/hub-app/inbox-view.tsx +16 -9
- package/src/serve/hub-app/inbox.css +1 -0
- package/src/serve/hub-app/index.html +5 -0
- package/src/serve/hub-app/insights-view.tsx +6 -5
- package/src/serve/hub-app/instructions.css +4 -1
- package/src/serve/hub-app/kept-cols.tsx +83 -20
- package/src/serve/hub-app/kept-width.tsx +76 -0
- package/src/serve/hub-app/keys.ts +116 -38
- package/src/serve/hub-app/layout-st.ts +109 -99
- package/src/serve/hub-app/lightbox-zoom.css +36 -0
- package/src/serve/hub-app/list-filter.tsx +15 -6
- package/src/serve/hub-app/list-head.tsx +29 -0
- package/src/serve/hub-app/list-row.ts +8 -0
- package/src/serve/hub-app/list-walk.ts +26 -105
- package/src/serve/hub-app/live-socket.ts +274 -0
- package/src/serve/hub-app/live-sources.ts +189 -0
- package/src/serve/hub-app/live-svc.ts +2 -2
- package/src/serve/hub-app/machine-st.ts +75 -14
- package/src/serve/hub-app/main-panel.css +211 -0
- package/src/serve/hub-app/main-panel.tsx +259 -0
- package/src/serve/hub-app/md.ts +4 -4
- package/src/serve/hub-app/media-svc.ts +5 -5
- package/src/serve/hub-app/media-view.tsx +13 -12
- package/src/serve/hub-app/messages/messages-page.tsx +8 -7
- package/src/serve/hub-app/messages/messages-st.ts +5 -2
- package/src/serve/hub-app/new-thread-st.ts +170 -0
- package/src/serve/hub-app/new-thread.tsx +133 -107
- package/src/serve/hub-app/orchestrator-line.tsx +115 -45
- package/src/serve/hub-app/orchestrator-places.tsx +86 -0
- package/src/serve/hub-app/orchestrator.css +57 -5
- package/src/serve/hub-app/page-keys.ts +107 -68
- package/src/serve/hub-app/page-reload.ts +46 -6
- package/src/serve/hub-app/pages-frames.tsx +40 -3
- package/src/serve/hub-app/pages-svc.ts +3 -1
- package/src/serve/hub-app/palette-st.ts +198 -43
- package/src/serve/hub-app/palette-view.tsx +32 -8
- package/src/serve/hub-app/panel-head-action.tsx +39 -0
- package/src/serve/hub-app/panel-head.tsx +70 -0
- package/src/serve/hub-app/panel-repo.ts +42 -0
- package/src/serve/hub-app/panel-source.ts +195 -0
- package/src/serve/hub-app/panel-tint.css +6 -0
- package/src/serve/hub-app/panel-tint.ts +23 -0
- package/src/serve/hub-app/panel-walk.ts +107 -0
- package/src/serve/hub-app/pill-row.tsx +2 -1
- package/src/serve/hub-app/place-path.ts +4 -0
- package/src/serve/hub-app/places-svc.ts +75 -0
- package/src/serve/hub-app/plan-view.tsx +3 -2
- package/src/serve/hub-app/polled.ts +11 -1
- package/src/serve/hub-app/presence-st.ts +66 -32
- package/src/serve/hub-app/processes-view.tsx +2 -2
- package/src/serve/hub-app/project-bar.tsx +116 -0
- package/src/serve/hub-app/project-list.css +20 -173
- package/src/serve/hub-app/project-list.tsx +30 -298
- package/src/serve/hub-app/projects-svc.ts +59 -32
- package/src/serve/hub-app/push-sign.tsx +2 -1
- package/src/serve/hub-app/push-svc.ts +86 -69
- package/src/serve/hub-app/quiet-st.ts +5 -3
- package/src/serve/hub-app/rail-groups.ts +144 -0
- package/src/serve/hub-app/reader-chips.tsx +2 -1
- package/src/serve/hub-app/recordings-st.ts +2 -1
- package/src/serve/hub-app/recordings-view.tsx +19 -47
- package/src/serve/hub-app/recordings.css +0 -2
- package/src/serve/hub-app/reflections-page.tsx +10 -6
- package/src/serve/hub-app/releases/releases-page.tsx +6 -5
- package/src/serve/hub-app/repo-sections.ts +127 -38
- package/src/serve/hub-app/repo-st.ts +57 -36
- package/src/serve/hub-app/review/advisor-bar.tsx +3 -2
- package/src/serve/hub-app/review/ask-proof.tsx +79 -0
- package/src/serve/hub-app/review/attach-view.tsx +11 -10
- package/src/serve/hub-app/review/box-view.ts +479 -0
- package/src/serve/hub-app/review/box-zoom.tsx +70 -0
- package/src/serve/hub-app/review/diff-view.tsx +3 -2
- package/src/serve/hub-app/review/doc-body.tsx +2 -1
- package/src/serve/hub-app/review/dock.tsx +3 -2
- package/src/serve/hub-app/review/draft-body.tsx +4 -3
- package/src/serve/hub-app/review/faces.tsx +0 -8
- package/src/serve/hub-app/review/group-block.tsx +8 -7
- package/src/serve/hub-app/review/heard-line.tsx +4 -3
- package/src/serve/hub-app/review/instructions-view.tsx +3 -2
- package/src/serve/hub-app/review/item-verdict.tsx +40 -40
- package/src/serve/hub-app/review/kind-states.tsx +5 -4
- package/src/serve/hub-app/review/kit.tsx +24 -4
- package/src/serve/hub-app/review/lane-bar.tsx +30 -28
- package/src/serve/hub-app/review/lightbox.tsx +6 -4
- package/src/serve/hub-app/review/live-bar.tsx +7 -6
- package/src/serve/hub-app/review/live-view.tsx +6 -5
- package/src/serve/hub-app/review/object-card.tsx +2 -1
- package/src/serve/hub-app/review/object-panel.tsx +11 -10
- package/src/serve/hub-app/review/pano-view.tsx +3 -2
- package/src/serve/hub-app/review/question-views.tsx +6 -5
- package/src/serve/hub-app/review/review-cells.tsx +21 -20
- package/src/serve/hub-app/review/review-host.ts +3 -0
- package/src/serve/hub-app/review/review-kit.ts +7 -5
- package/src/serve/hub-app/review/review-list.tsx +98 -52
- package/src/serve/hub-app/review/review-page.tsx +3 -3
- package/src/serve/hub-app/review/review-st.ts +70 -14
- package/src/serve/hub-app/review/review-thread.tsx +234 -138
- package/src/serve/hub-app/review/review-views.tsx +166 -191
- package/src/serve/hub-app/review/space3d.tsx +17 -9
- package/src/serve/hub-app/review/thread-close.tsx +24 -32
- package/src/serve/hub-app/review/thread-st.ts +39 -25
- package/src/serve/hub-app/review/trailer-body.tsx +5 -4
- package/src/serve/hub-app/review/trailer-page.tsx +18 -16
- package/src/serve/hub-app/review/trailer-st.ts +3 -2
- package/src/serve/hub-app/review/trailer-timeline.tsx +10 -9
- package/src/serve/hub-app/review/trailer-voices.tsx +29 -28
- package/src/serve/hub-app/review.css +159 -42
- package/src/serve/hub-app/row-acts.tsx +126 -0
- package/src/serve/hub-app/row-face.tsx +29 -0
- package/src/serve/hub-app/running-rows.tsx +142 -0
- package/src/serve/hub-app/running-st.ts +110 -0
- package/src/serve/hub-app/search-view.tsx +3 -2
- package/src/serve/hub-app/secrets-page.tsx +290 -0
- package/src/serve/hub-app/secrets-st.ts +181 -0
- package/src/serve/hub-app/secrets.css +65 -0
- package/src/serve/hub-app/section-head.tsx +3 -2
- package/src/serve/hub-app/session-chips.tsx +55 -0
- package/src/serve/hub-app/shell.ts +56 -0
- package/src/serve/hub-app/site/site-part.tsx +6 -5
- package/src/serve/hub-app/site/site-st.ts +0 -6
- package/src/serve/hub-app/site.css +0 -1
- package/src/serve/hub-app/social/calendar.tsx +7 -6
- package/src/serve/hub-app/social/comms-page.tsx +29 -26
- package/src/serve/hub-app/social/group-editor.tsx +2 -1
- package/src/serve/hub-app/social/kit.tsx +12 -11
- package/src/serve/hub-app/social/next-release.tsx +3 -2
- package/src/serve/hub-app/social/post-card.tsx +21 -20
- package/src/serve/hub-app/social/post-page.tsx +2 -1
- package/src/serve/hub-app/social/problems.tsx +3 -2
- package/src/serve/hub-app/social/social-page.tsx +29 -27
- package/src/serve/hub-app/social/social-st.ts +4 -2
- package/src/serve/hub-app/social/stage-popup.tsx +11 -10
- package/src/serve/hub-app/social.css +7 -5
- package/src/serve/hub-app/source-acts.ts +79 -0
- package/src/serve/hub-app/source-page.tsx +17 -0
- package/src/serve/hub-app/space-view.tsx +5 -4
- package/src/serve/hub-app/stores/stores-page.tsx +21 -19
- package/src/serve/hub-app/stores/stores-st.ts +1 -1
- package/src/serve/hub-app/stores.css +1 -1
- package/src/serve/hub-app/terminal-history-st.ts +112 -0
- package/src/serve/hub-app/terminal-keys.ts +79 -0
- package/src/serve/hub-app/terminal-lib.ts +110 -0
- package/src/serve/hub-app/terminal-links.ts +55 -0
- package/src/serve/hub-app/terminal-list-st.ts +304 -0
- package/src/serve/hub-app/terminal-log-st.ts +242 -0
- package/src/serve/hub-app/terminal-out.ts +135 -0
- package/src/serve/hub-app/terminal-pages.tsx +115 -0
- package/src/serve/hub-app/terminal-panel.tsx +60 -9
- package/src/serve/hub-app/terminal-sources.tsx +335 -0
- package/src/serve/hub-app/terminal-st.ts +447 -167
- package/src/serve/hub-app/terminal-stream.ts +233 -0
- package/src/serve/hub-app/terminal-tab.tsx +64 -0
- package/src/serve/hub-app/terminal-widths.ts +30 -0
- package/src/serve/hub-app/terminal.css +50 -4
- package/src/serve/hub-app/test-view.tsx +5 -3
- package/src/serve/hub-app/tests-view.tsx +16 -15
- package/src/serve/hub-app/theme-st.ts +5 -0
- package/src/serve/hub-app/thread-row.tsx +39 -31
- package/src/serve/hub-app/time-ago.tsx +3 -2
- package/src/serve/hub-app/time-view.tsx +2 -1
- package/src/serve/hub-app/time.css +1 -1
- package/src/serve/hub-app/timeline-chart.tsx +5 -4
- package/src/serve/hub-app/timeline-view.tsx +10 -9
- package/src/serve/hub-app/tips.ts +247 -0
- package/src/serve/hub-app/tree-build.ts +40 -8
- package/src/serve/hub-app/tree-svc.ts +167 -134
- package/src/serve/hub-app/unit-icons.ts +26 -0
- package/src/serve/hub-app/url-address.ts +154 -0
- package/src/serve/hub-app/url-faces.ts +88 -0
- package/src/serve/hub-app/url-forms.tsx +183 -0
- package/src/serve/hub-app/urls-svc.ts +167 -5
- package/src/serve/hub-app/urls-view.tsx +56 -20
- package/src/serve/hub-app/urls.css +26 -0
- package/src/serve/hub-app/vault-view.tsx +5 -4
- package/src/serve/hub-app/veille/veille-page.tsx +34 -33
- package/src/serve/hub-app/veille/veille-st.ts +6 -3
- package/src/serve/hub-app/view-layout.css +3 -3
- package/src/serve/hub-app/when-view.tsx +5 -4
- package/src/serve/hub-app/wikis-view.tsx +6 -5
- package/src/serve/hub-app/words.tsx +9 -2
- package/src/serve/hub-runtime.ts +3 -2
- package/src/serve/orchestrator-host.ts +58 -0
- package/src/serve/page-live.ts +147 -0
- package/src/serve/project-gutter-route.ts +63 -2
- package/src/serve/read-worker.ts +7 -2
- package/src/serve/runs-stamp.ts +33 -0
- package/src/serve/secrets-read.ts +156 -0
- package/src/serve/serve-hub.ts +71 -22
- package/src/serve/terminal-claudes.ts +185 -0
- package/src/serve/terminal-guard.ts +10 -5
- package/src/serve/terminal-host.ts +517 -0
- package/src/serve/terminal-record.ts +104 -0
- package/src/serve/terminal-route.ts +466 -103
- package/src/serve/terminal-shells.ts +3 -0
- package/src/serve/terminal-watch.ts +102 -0
- package/src/shipkit-files.ts +9 -4
- package/src/shot/client.ts +4 -9
- package/src/shot/shooter.ts +2 -4
- package/src/shot/shot-ask.ts +2 -7
- package/src/shot/shot-theme.ts +6 -17
- package/src/social/routes.ts +2 -2
- package/src/social/writes.ts +3 -0
- package/src/suite/test-units.ts +6 -2
- package/src/trailer/sound/eleven.ts +1 -0
- package/src/urls/added.ts +111 -0
- package/src/urls/icons.ts +294 -0
- package/src/urls/places.ts +139 -0
- package/src/urls/routes.ts +17 -7
- package/src/urls/rows.ts +48 -15
- package/src/urls/unit.ts +57 -3
- package/src/urls/write-routes.ts +207 -0
- package/src/vault/vault-destroy.ts +2 -1
- package/src/vault/vault-import.ts +4 -11
- package/src/vault/vault-restore.ts +3 -2
- package/src/veille/chrome.ts +18 -3
- package/src/veille/identity.ts +6 -0
- package/src/view3d/cam.ts +30 -46
- package/src/view3d/lib.ts +20 -2
- package/src/view3d/viewer.ts +62 -88
- package/src/wiki/agent-paths.ts +2 -1
- package/src/orchestrator/deliver.ts +0 -81
- package/src/orchestrator/drill.ts +0 -129
- package/src/orchestrator/keeper.ts +0 -332
- package/src/orchestrator/pm.ts +0 -20
- package/src/orchestrator/state.ts +0 -92
- package/src/orchestrator/switch.ts +0 -86
- package/src/orchestrator/tmux.ts +0 -82
- package/src/serve/hub-app/rail-fly.tsx +0 -95
- package/src/serve/hub-app/side-lists.ts +0 -72
- package/src/serve/hub-app/sidebar.tsx +0 -62
- package/src/serve/hub-app/tree-row.tsx +0 -125
|
@@ -13,6 +13,10 @@ import { applyRunEvent, idleRun, startRun, stripText, type RunProgress } from '.
|
|
|
13
13
|
import type { GateBlock, Resource, ResourceState, SlowSuite, CheckEvent } from './hub-types.ts'
|
|
14
14
|
import { lineText } from '../../core/wire.ts'
|
|
15
15
|
import { ownTrouble, reach } from './reach.ts'
|
|
16
|
+
import { termStream } from './terminal-stream.ts'
|
|
17
|
+
|
|
18
|
+
/** one event of a run, as the hub says it: a wire line, a check that reported, the end */
|
|
19
|
+
type RunEvent = { t?: string; text?: string; code?: number } & Partial<CheckEvent>
|
|
16
20
|
|
|
17
21
|
/** the colour rule, the SAME one the server applies, because a row must not
|
|
18
22
|
* change meaning between a live result and the poll that confirms it */
|
|
@@ -26,6 +30,10 @@ const stateOf = (e: CheckEvent): ResourceState => {
|
|
|
26
30
|
/** what a page keeps from a streaming run: enough to read what happened,
|
|
27
31
|
* bounded so a runaway check cannot grow it forever */
|
|
28
32
|
const MAX_LIVE_LINES = 400
|
|
33
|
+
/** a run whose socket ended goes on in the hub: its live view is read this often until it says no run is in flight,
|
|
34
|
+
* and given up after this many reads in a row that failed */
|
|
35
|
+
const ONWARD_MS = 1_000
|
|
36
|
+
const ONWARD_FAILS = 5
|
|
29
37
|
|
|
30
38
|
export class ChecksSvc {
|
|
31
39
|
/** check id → what it just reported, for the run in flight */
|
|
@@ -58,8 +66,9 @@ export class ChecksSvc {
|
|
|
58
66
|
/** the slow suite form under the test check */
|
|
59
67
|
suite: SlowSuite = { file: '', catches: '', whyNotFast: '' }
|
|
60
68
|
|
|
61
|
-
|
|
62
|
-
|
|
69
|
+
/** `o`: the wait between two reads of a run that goes on without its socket (a test) */
|
|
70
|
+
constructor(private st: RepoSt, private o: { onwardMs?: number } = {}) {
|
|
71
|
+
makeAutoObservable<this, 'st' | 'o' | 'clearTimer'>(this, { st: false, o: false, clearTimer: false })
|
|
63
72
|
}
|
|
64
73
|
|
|
65
74
|
get busy(): boolean {
|
|
@@ -191,10 +200,81 @@ export class ChecksSvc {
|
|
|
191
200
|
return checks.filter((u) => gate || !u.build).map((u) => u.checkId)
|
|
192
201
|
}
|
|
193
202
|
|
|
194
|
-
/** run the
|
|
195
|
-
*
|
|
196
|
-
*
|
|
197
|
-
*
|
|
203
|
+
/** the events of a run the hub is asked for, one at a time, until its `done`. Where the terminals answer (this
|
|
204
|
+
* Mac) and the page's socket is open, the run is a part of that socket (terminal-stream.ts `hold`): the page
|
|
205
|
+
* holds no request open for it. Else (his phone, a socket that is down, a hub from before that part) they are the
|
|
206
|
+
* NDJSON body of the one request, held for as long as the run. The ask goes out once either way: a run asked
|
|
207
|
+
* twice would run twice */
|
|
208
|
+
private async events(ask: Record<string, unknown>, take: (e: RunEvent) => void): Promise<void> {
|
|
209
|
+
const url = this.st.url('/api/check/run')
|
|
210
|
+
const post = (body: Record<string, unknown>): Promise<Response> => reach(url, { method: 'POST', body: JSON.stringify(body) })
|
|
211
|
+
let over: (why?: string) => void = () => {}
|
|
212
|
+
const ended = new Promise<void>((done, fail) => { over = (why) => (why == null ? done() : fail(new Error(why))) })
|
|
213
|
+
// told down before the hub answered the ask: said below, where the answer is read
|
|
214
|
+
ended.catch(() => {})
|
|
215
|
+
const part = this.st.home.terminal.available
|
|
216
|
+
? termStream(this.st.home).hold({
|
|
217
|
+
base: this.st.base,
|
|
218
|
+
line: (l) => {
|
|
219
|
+
if (l.t !== 'r') return
|
|
220
|
+
take(l.e as RunEvent)
|
|
221
|
+
if (l.e.t === 'done') over()
|
|
222
|
+
},
|
|
223
|
+
down: (why) => over(why),
|
|
224
|
+
})
|
|
225
|
+
: null
|
|
226
|
+
let r: Response
|
|
227
|
+
try {
|
|
228
|
+
r = await post(part == null ? ask : { ...ask, page: part.page, key: part.key })
|
|
229
|
+
if (part != null && r.status === 204) return await ended.catch((e: Error) => this.onward(e.message))
|
|
230
|
+
// the hub restarted since the socket's hello: it started nothing, and is asked once more with no part
|
|
231
|
+
if (part != null && r.status === 410) r = await post(ask)
|
|
232
|
+
} finally {
|
|
233
|
+
part?.end()
|
|
234
|
+
}
|
|
235
|
+
const rd = r.body!.getReader()
|
|
236
|
+
const dec = new TextDecoder()
|
|
237
|
+
let buf = ''
|
|
238
|
+
for (;;) {
|
|
239
|
+
const { done, value } = await rd.read()
|
|
240
|
+
if (done) break
|
|
241
|
+
buf += dec.decode(value, { stream: true })
|
|
242
|
+
const lines = buf.split('\n')
|
|
243
|
+
// the tail is whatever arrived half written; it completes on the next chunk
|
|
244
|
+
buf = lines.pop() ?? ''
|
|
245
|
+
for (const l of lines) {
|
|
246
|
+
if (l === '') continue
|
|
247
|
+
try { take(JSON.parse(l) as RunEvent) } catch { continue }
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/** the socket ended while the hub runs what it took: the run goes on there, and nothing of it reaches this page
|
|
253
|
+
* any more. The run stays this page's (its button taken, so no second run is asked on top of it) until the hub's
|
|
254
|
+
* live view says, twice in a row, that no run the hub was asked for is in flight; its results come with the poll
|
|
255
|
+
* after */
|
|
256
|
+
private async onward(why: string): Promise<void> {
|
|
257
|
+
runInAction(() => { this.note = `${why}: the hub runs it on, its results come as it ends` })
|
|
258
|
+
for (let fails = 0, idle = 0; fails < ONWARD_FAILS; ) {
|
|
259
|
+
await new Promise((r) => setTimeout(r, this.o.onwardMs ?? ONWARD_MS))
|
|
260
|
+
try {
|
|
261
|
+
const r = await reach(this.st.url('/api/live.json'))
|
|
262
|
+
if (!r.ok) throw new Error(await r.text())
|
|
263
|
+
const v = (await r.json()) as { runs?: { by?: string }[] }
|
|
264
|
+
fails = 0
|
|
265
|
+
// a run of a terminal or of the schedule is not this page's: only one the hub was asked for holds it
|
|
266
|
+
idle = (v.runs ?? []).some((x) => x.by === 'hub') ? 0 : idle + 1
|
|
267
|
+
if (idle >= 2) return runInAction(() => { this.note = 'the run ended in the hub' })
|
|
268
|
+
} catch {
|
|
269
|
+
fails++
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
throw new Error(`${why}, and the hub no longer says whether the run goes on`)
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/** run the whole health pass, the whole gate, or a named set of checks. Wire lines feed the raw card, check
|
|
276
|
+
* events colour the rows and move the header state. The page never shells anything, and there is no second run
|
|
277
|
+
* mechanism. */
|
|
198
278
|
async run(only?: string[], o: { gate?: boolean; label?: string } = {}): Promise<void> {
|
|
199
279
|
if (this.busy) return
|
|
200
280
|
const gate = o.gate === true
|
|
@@ -210,33 +290,17 @@ export class ChecksSvc {
|
|
|
210
290
|
this.note = `running ${label}…`
|
|
211
291
|
})
|
|
212
292
|
try {
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
// the tail is whatever arrived half written; it completes on
|
|
223
|
-
// the next chunk
|
|
224
|
-
buf = lines.pop() ?? ''
|
|
225
|
-
for (const l of lines) {
|
|
226
|
-
if (l === '') continue
|
|
227
|
-
let e: { t?: string; text?: string; code?: number } & Partial<CheckEvent>
|
|
228
|
-
try { e = JSON.parse(l) as typeof e } catch { continue }
|
|
229
|
-
runInAction(() => { this.progress = applyRunEvent(this.progress, e as Record<string, unknown>) })
|
|
230
|
-
if (e.t === 'line' && e.text != null) {
|
|
231
|
-
runInAction(() => this.pushLine(e.text!))
|
|
232
|
-
this.st.health.appendLine(e.text)
|
|
233
|
-
} else if (e.t === 'check') {
|
|
234
|
-
runInAction(() => this.apply(e as unknown as CheckEvent))
|
|
235
|
-
} else if (e.t === 'done') {
|
|
236
|
-
runInAction(() => { this.note = e.code === 0 ? 'done, green' : `done, exit ${e.code ?? '?'}` })
|
|
237
|
-
}
|
|
293
|
+
await this.events({ ...(only == null ? {} : { only }), ...(gate ? { gate } : {}) }, (e) => {
|
|
294
|
+
runInAction(() => { this.progress = applyRunEvent(this.progress, e as Record<string, unknown>) })
|
|
295
|
+
if (e.t === 'line' && e.text != null) {
|
|
296
|
+
runInAction(() => this.pushLine(e.text!))
|
|
297
|
+
this.st.health.appendLine(e.text)
|
|
298
|
+
} else if (e.t === 'check') {
|
|
299
|
+
runInAction(() => this.apply(e as unknown as CheckEvent))
|
|
300
|
+
} else if (e.t === 'done') {
|
|
301
|
+
runInAction(() => { this.note = e.code === 0 ? 'done, green' : `done, exit ${e.code ?? '?'}` })
|
|
238
302
|
}
|
|
239
|
-
}
|
|
303
|
+
})
|
|
240
304
|
} catch (e) {
|
|
241
305
|
runInAction(() => { this.note = `stream broke: ${(e as Error).message}` })
|
|
242
306
|
this.st.health.appendLine(`FAIL: stream broke: ${(e as Error).message}`)
|
|
@@ -5,18 +5,22 @@
|
|
|
5
5
|
// only the small components that READ `now` repaint when it moves. An age of a
|
|
6
6
|
// minute or more waits on a coarser step (`halfMinute`, `halfHour`), so an idle
|
|
7
7
|
// page with many ages runs one derivation a tick, not one an age.
|
|
8
|
+
// A hidden tab holds no interval: nobody reads an age there.
|
|
8
9
|
import { computed, makeAutoObservable, runInAction } from 'mobx'
|
|
9
10
|
|
|
10
11
|
export class ClockSvc {
|
|
11
12
|
now = Date.now()
|
|
12
|
-
/** the live interval, or null
|
|
13
|
+
/** the live interval, or null: none while it is stopped, and none while the tab is hidden */
|
|
13
14
|
running: ReturnType<typeof setInterval> | null = null
|
|
14
15
|
|
|
15
16
|
/** the pace of the running interval */
|
|
16
17
|
private everyMs = 0
|
|
18
|
+
/** started and not stopped since */
|
|
19
|
+
private wanted = false
|
|
20
|
+
private readonly onVisible = (): void => this.arm()
|
|
17
21
|
|
|
18
22
|
constructor() {
|
|
19
|
-
makeAutoObservable<this, 'everyMs'>(this, { everyMs: false, halfMinute: computed, halfHour: computed })
|
|
23
|
+
makeAutoObservable<this, 'everyMs' | 'wanted' | 'onVisible' | 'arm'>(this, { everyMs: false, wanted: false, onVisible: false, arm: false, halfMinute: computed, halfHour: computed })
|
|
20
24
|
}
|
|
21
25
|
|
|
22
26
|
/** the clock in half minutes: what an age in minutes waits on */
|
|
@@ -32,17 +36,29 @@ export class ClockSvc {
|
|
|
32
36
|
this.now = at
|
|
33
37
|
}
|
|
34
38
|
|
|
35
|
-
/** ticks every `everyMs
|
|
39
|
+
/** ticks every `everyMs` while the tab shows; a running clock takes the new pace */
|
|
36
40
|
start(everyMs = 1_000): void {
|
|
37
|
-
if (this.
|
|
38
|
-
if (this.running != null) clearInterval(this.running)
|
|
41
|
+
if (this.wanted && this.everyMs === everyMs) return
|
|
39
42
|
this.everyMs = everyMs
|
|
40
|
-
this.
|
|
43
|
+
if (!this.wanted) globalThis.document?.addEventListener?.('visibilitychange', this.onVisible)
|
|
44
|
+
this.wanted = true
|
|
45
|
+
this.arm()
|
|
41
46
|
}
|
|
42
47
|
|
|
43
48
|
stop(): void {
|
|
44
|
-
if (this.
|
|
45
|
-
|
|
49
|
+
if (!this.wanted) return
|
|
50
|
+
this.wanted = false
|
|
51
|
+
globalThis.document?.removeEventListener?.('visibilitychange', this.onVisible)
|
|
52
|
+
this.arm()
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/** the interval as the clock stands: none while stopped or hidden. A tab shown again reads the time at once, so
|
|
56
|
+
* no age waits a step to be right */
|
|
57
|
+
private arm(): void {
|
|
58
|
+
if (this.running != null) clearInterval(this.running)
|
|
46
59
|
this.running = null
|
|
60
|
+
if (!this.wanted || globalThis.document?.visibilityState === 'hidden') return
|
|
61
|
+
if (Date.now() - this.now >= this.everyMs) runInAction(() => this.tick())
|
|
62
|
+
this.running = setInterval(() => runInAction(() => this.tick()), this.everyMs)
|
|
47
63
|
}
|
|
48
64
|
}
|
|
@@ -44,7 +44,7 @@ function refresh(block: Element): void {
|
|
|
44
44
|
for (const b of row.querySelectorAll<HTMLButtonElement>('.mdterm, .mdcopy1')) {
|
|
45
45
|
b.classList.toggle('off', why != null)
|
|
46
46
|
b.setAttribute('aria-disabled', String(why != null))
|
|
47
|
-
b.
|
|
47
|
+
b.dataset.tip = why ?? (b.classList.contains('mdterm') ? 'type this command into the terminal (⌃`): Enter stays yours' : 'copy this command')
|
|
48
48
|
}
|
|
49
49
|
const reason = row.querySelector<HTMLElement>('.mdreason')
|
|
50
50
|
if (reason != null && (why == null || !reason.hidden)) {
|
|
@@ -12,6 +12,7 @@ import { ReaderChips } from './reader-chips.tsx'
|
|
|
12
12
|
import type { Readers } from '../../collections/collection-types.ts'
|
|
13
13
|
import { ThreadControl, threadHost } from './review/thread-control.tsx'
|
|
14
14
|
import { AskSteps, stepsWords } from './ask-steps.tsx'
|
|
15
|
+
import { tip } from './tips.ts'
|
|
15
16
|
|
|
16
17
|
// creds carry no truth file: the name is the id, the words after it are the
|
|
17
18
|
// service and what its probe last said, and the slot says present or missing
|
|
@@ -52,7 +53,7 @@ const StoredBy = ({ names, readers }: { names: string[]; readers: Record<string,
|
|
|
52
53
|
/** the ask's thread, whole: its messages, its proof url, done and « I will not do this » */
|
|
53
54
|
const OpenThread = ({ app, head }: { app: RepoSt; head: string }) => (
|
|
54
55
|
<div className="row">
|
|
55
|
-
<button className="ghost"
|
|
56
|
+
<button className="ghost" {...tip('its messages, its proof url, done and « I will not do this »')} onClick={() => threadHost(app).openThread(head)}>open the thread ↗</button>
|
|
56
57
|
</div>
|
|
57
58
|
)
|
|
58
59
|
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
// back to it.
|
|
4
4
|
//
|
|
5
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
|
|
7
|
-
//
|
|
6
|
+
// (hub.css .lrow, .lband through social/kit.tsx KeptBand), the column the review's (review.css .rv-listcol), its head
|
|
7
|
+
// and search every list panel's (list-head.tsx), and tests/asks-page.test.tsx fails a sheet rule that gives them a look of their own
|
|
8
8
|
import { observer } from 'mobx-react-lite'
|
|
9
9
|
import { Fragment, type ReactNode } from 'react'
|
|
10
10
|
import { Panel, Separator } from 'react-resizable-panels'
|
|
@@ -12,12 +12,17 @@ import { ColCard } from './col-card.tsx'
|
|
|
12
12
|
import type { ColListSt } from './col-list-st.ts'
|
|
13
13
|
import type { Resource } from './hub-types.ts'
|
|
14
14
|
import { KeptCols, LIST_COL, PANEL } from './kept-cols.tsx'
|
|
15
|
-
import {
|
|
15
|
+
import { ListHead, type TallyItem } from './list-head.tsx'
|
|
16
|
+
import { openFirst } from './list-walk.ts'
|
|
16
17
|
import type { RepoSt } from './repo-st.ts'
|
|
17
18
|
import { PhoneTop } from './review/phone-top.tsx'
|
|
18
19
|
import { KeptBand } from './social/kit.tsx'
|
|
19
20
|
|
|
20
21
|
export type ColListWords<K extends string> = {
|
|
22
|
+
/** the list's name, its head's title */
|
|
23
|
+
title: string
|
|
24
|
+
/** a band's colour in the head's tally, where it needs him (an open ask); dim else */
|
|
25
|
+
tone?: Partial<Record<K, TallyItem['tone']>>
|
|
21
26
|
/** the filter's placeholder and label */
|
|
22
27
|
search: string
|
|
23
28
|
/** the list's name for a screen reader */
|
|
@@ -51,9 +56,10 @@ const List = observer(<K extends string>({ app, st, words, row }: Props<K>) => {
|
|
|
51
56
|
const groups = st.groups
|
|
52
57
|
return (
|
|
53
58
|
<div className="rv-listcol">
|
|
54
|
-
<
|
|
55
|
-
|
|
56
|
-
|
|
59
|
+
<ListHead title={words.title} n={st.all.length} tally={st.list.groups(st.all).map((g) => {
|
|
60
|
+
const word = words.band[g.key].split(':')[0]!
|
|
61
|
+
return { k: g.key, n: g.rows.length, glyph: '', word, tone: words.tone?.[g.key] ?? 'quiet', says: `${g.rows.length} ${words.band[g.key]}` }
|
|
62
|
+
})} search={{ value: st.query, set: (v) => st.setQuery(v), keep: (el) => { st.searchEl = el }, placeholder: words.search, label: words.search, onEnter: (f) => openFirst(st.side, f) }} />
|
|
57
63
|
<nav className="rv-listscroll" aria-label={words.nav}>
|
|
58
64
|
{groups.map((g) => {
|
|
59
65
|
// a folded band still shows the row shown
|
|
@@ -69,7 +69,7 @@ export class ColListSt<K extends string> implements Folds {
|
|
|
69
69
|
return bandOf(this.list.col, g)
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
/** the rows
|
|
72
|
+
/** the rows ⇧↑ ⇧↓ step, in the order drawn: a folded band hides its own, never the one shown */
|
|
73
73
|
get visible(): Resource[] {
|
|
74
74
|
const cur = this.currentId
|
|
75
75
|
return this.groups.flatMap((g) => g.rows.filter((r) => r.id === cur || this.isOpen(this.band(g.key), !g.foldedByDefault)))
|
|
@@ -96,13 +96,23 @@ export class ColListSt<K extends string> implements Folds {
|
|
|
96
96
|
this.st.cols.select(this.list.col, id)
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
/**
|
|
99
|
+
/** ⇧← ⇧→: the band of the row shown folds or opens, the row kept in sight; false with none or while it filters */
|
|
100
|
+
foldCurrent(fold: boolean): boolean {
|
|
101
|
+
const cur = this.currentId
|
|
102
|
+
const g = this.groups.find((x) => x.rows.some((r) => r.id === cur))
|
|
103
|
+
if (g == null || this.query.trim() !== '') return false
|
|
104
|
+
this.st.cols.setGroupFolded(this.band(g.key), fold)
|
|
105
|
+
return true
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/** the list as column 2 (columns.ts): a walk with ⇧↑ ⇧↓ is one history entry, ⇧← ⇧→ fold its band */
|
|
100
109
|
get side(): SideList {
|
|
101
110
|
return sideOf({
|
|
102
111
|
ids: () => this.visible.map((r) => r.id),
|
|
103
112
|
current: () => this.currentId,
|
|
104
113
|
open: (id) => this.st.walk(() => this.open(id)),
|
|
105
114
|
filter: () => this.searchEl,
|
|
115
|
+
fold: (fold) => this.foldCurrent(fold),
|
|
106
116
|
})
|
|
107
117
|
}
|
|
108
118
|
}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
// The checks page
|
|
1
|
+
// The checks page and every other collection: one dense
|
|
2
2
|
// table each, in the activity page's table style, one line per item under
|
|
3
3
|
// group headers that count their lines. What needs attention comes first; the
|
|
4
4
|
// quiet groups (passing, off) fold by default and each viewer's fold choice is
|
|
5
|
-
// kept (the asks
|
|
5
|
+
// kept (the asks and the secrets are lists of their own, asks-page.tsx, secrets-page.tsx). The filter
|
|
6
6
|
// input and the severity keys narrow the lines, since both read
|
|
7
7
|
// `visibleInstances`. The checks page opens on the line that counts where
|
|
8
8
|
// its checks run. Groups, order and words: col-tables.ts.
|
|
9
9
|
import { observer } from 'mobx-react-lite'
|
|
10
10
|
import type { ReactNode } from 'react'
|
|
11
11
|
import { checkName } from './check-words.ts'
|
|
12
|
-
import { checkGroups, itemGroups,
|
|
13
|
-
import { ReaderChips } from './reader-chips.tsx'
|
|
12
|
+
import { checkGroups, itemGroups, findingLine, planWord, type TableGroup } from './col-tables.ts'
|
|
14
13
|
import { durationTone, fmtMs } from './dur.ts'
|
|
15
14
|
import type { CheckOwner } from './hash-route.ts'
|
|
16
15
|
import type { Resource } from './hub-types.ts'
|
|
@@ -18,8 +17,9 @@ import { sectionLabel } from './keys.ts'
|
|
|
18
17
|
import type { RepoSt } from './repo-st.ts'
|
|
19
18
|
import { TimeAgo } from './time-ago.tsx'
|
|
20
19
|
import { SectionHead } from './section-head.tsx'
|
|
20
|
+
import { tip } from './tips.ts'
|
|
21
21
|
|
|
22
|
-
const emptyWords = (app: RepoSt): string => (app.filter === 'red' ? 'no reds here' : app.filter === 'needs' ? 'nothing here needs you' :
|
|
22
|
+
const emptyWords = (app: RepoSt): string => (app.filter === 'red' ? 'no reds here' : app.filter === 'needs' ? 'nothing here needs you' : 'nothing here yet')
|
|
23
23
|
|
|
24
24
|
/** the page frame: the collection's title and count, a line under it when
|
|
25
25
|
* the page has one, then the table */
|
|
@@ -71,7 +71,7 @@ const CheckRow = observer(({ app, r }: { app: RepoSt; r: Resource }) => {
|
|
|
71
71
|
const finding = findingLine(c)
|
|
72
72
|
const tone = durationTone(c.lastMs, c.timeoutMs, c.budgetMs)
|
|
73
73
|
return (
|
|
74
|
-
<tr className={`ctrow s-${c.status ?? 'never'}`} data-k={c.checkId} onClick={() => app.cols.select(r.collection, r.id)}
|
|
74
|
+
<tr className={`ctrow s-${c.status ?? 'never'}`} data-k={c.checkId} onClick={() => app.cols.select(r.collection, r.id)} {...tip(c.description)}>
|
|
75
75
|
<td className={`ctdot ${dot.tone}`}>{dot.mark}</td>
|
|
76
76
|
<td className={`ctid ${c.status === 'fail' ? 't-red' : c.status === 'warn' ? 't-warn' : ''}`}>{c.checkId}</td>
|
|
77
77
|
<td className="cttitle">{name.title === c.checkId ? '' : name.title}</td>
|
|
@@ -80,7 +80,7 @@ const CheckRow = observer(({ app, r }: { app: RepoSt; r: Resource }) => {
|
|
|
80
80
|
{c.lastMs == null ? null : <span className={`dnum ${tone ?? ''}`}>{fmtMs(c.lastMs)}</span>}
|
|
81
81
|
<span className="ctbudget">{` / ${fmtMs(c.budgetMs)}`}</span>
|
|
82
82
|
</td>
|
|
83
|
-
<td className="ctfind"
|
|
83
|
+
<td className="ctfind" {...tip(c.lastLines.length > 0 ? c.lastLines.join('\n') : undefined)}>{finding}</td>
|
|
84
84
|
<td className="ctplan">{planWord(c)}</td>
|
|
85
85
|
</tr>
|
|
86
86
|
)
|
|
@@ -104,46 +104,10 @@ export const CheckTable = observer(({ app, id, from }: { app: RepoSt; id: string
|
|
|
104
104
|
)
|
|
105
105
|
})
|
|
106
106
|
|
|
107
|
-
const SECRET_TONE: Record<string, string> = { missing: 't-red', minor: 'acdim', present: 't-ok' }
|
|
108
|
-
|
|
109
|
-
/** a secret's sentence without its own name in front, which the name column says */
|
|
110
|
-
const secretSentence = (r: Resource): string => (r.text.startsWith(r.title) ? r.text.slice(r.title.length).replace(/^[\s,]+/, '') : r.text)
|
|
111
|
-
|
|
112
|
-
const SecretRow = observer(({ app, r }: { app: RepoSt; r: Resource }) => {
|
|
113
|
-
const slot = r.slot ?? 'present'
|
|
114
|
-
const tone = SECRET_TONE[slot] ?? ''
|
|
115
|
-
return (
|
|
116
|
-
<tr className={`ctrow s-${slot}`} data-k={r.id} onClick={() => app.cols.select(r.collection, r.id)} title={r.text}>
|
|
117
|
-
<td className={`ctdot ${tone}`}>{slot === 'minor' ? '○' : '●'}</td>
|
|
118
|
-
<td className="ctid">{r.title}</td>
|
|
119
|
-
<td className="ctwho"><ReaderChips who={r.who} lead="who can read it" /></td>
|
|
120
|
-
<td className={`ctkind ${tone}`}>{slot}</td>
|
|
121
|
-
<td className="ctfind">{secretSentence(r)}</td>
|
|
122
|
-
</tr>
|
|
123
|
-
)
|
|
124
|
-
})
|
|
125
|
-
|
|
126
|
-
/** the secrets page: one line per credential, never a card */
|
|
127
|
-
export const SecretTable = observer(({ app, id }: { app: RepoSt; id: string }) => {
|
|
128
|
-
const col = app.cols.sidebarCols.find((x) => x.id === id)
|
|
129
|
-
if (col == null) return <div className="stagewrap"><div className="ph">collection vanished — the truth moved on</div></div>
|
|
130
|
-
const items = app.cols.visibleInstances(col)
|
|
131
|
-
const cols = (
|
|
132
|
-
<>
|
|
133
|
-
<col className="c-dot" /><col className="c-name" /><col className="c-who" /><col className="c-kind" /><col />
|
|
134
|
-
</>
|
|
135
|
-
)
|
|
136
|
-
return (
|
|
137
|
-
<Page title={col.title} n={items.length} cols={cols} empty={emptyWords(app)}>
|
|
138
|
-
{secretGroups(items).map((g) => <Group key={g.key} app={app} col={col.id} g={g} span={5} row={(r) => <SecretRow key={r.id} app={app} r={r} />} />)}
|
|
139
|
-
</Page>
|
|
140
|
-
)
|
|
141
|
-
})
|
|
142
|
-
|
|
143
107
|
const ITEM_TONE: Record<string, string> = { red: 't-red', warn: 't-warn', ok: 't-ok', idle: '', quiet: 'acdim' }
|
|
144
108
|
|
|
145
109
|
const ItemRow = observer(({ app, r }: { app: RepoSt; r: Resource }) => (
|
|
146
|
-
<tr className={`ctrow s-${r.state}`} data-k={r.id} onClick={() => app.cols.select(r.collection, r.id)}
|
|
110
|
+
<tr className={`ctrow s-${r.state}`} data-k={r.id} onClick={() => app.cols.select(r.collection, r.id)} {...tip(r.file ?? r.text)}>
|
|
147
111
|
<td className={`ctdot ${ITEM_TONE[r.state] ?? ''}`}>●</td>
|
|
148
112
|
<td className={`cttext ${ITEM_TONE[r.state] ?? ''}`}>{r.text}</td>
|
|
149
113
|
<td className="ctkind">{r.slot ?? ''}</td>
|
|
@@ -169,20 +169,6 @@ export function askGroups(rows: readonly Resource[]): TableGroup<AskGroupKey>[]
|
|
|
169
169
|
return groups.filter((g) => g.rows.length > 0)
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
-
export type SecretGroupKey = 'missing' | 'minor' | 'present'
|
|
173
|
-
|
|
174
|
-
/** the secrets in the order a reader wants them: what is missing first, a
|
|
175
|
-
* minor one nothing uses yet next, then what is present, each by name */
|
|
176
|
-
export function secretGroups(rows: readonly Resource[]): TableGroup<SecretGroupKey>[] {
|
|
177
|
-
const by = (key: SecretGroupKey): Resource[] => rows.filter((r) => (r.slot ?? 'present') === key).sort((a, b) => a.title.localeCompare(b.title))
|
|
178
|
-
const groups: TableGroup<SecretGroupKey>[] = [
|
|
179
|
-
{ key: 'missing', label: `${by('missing').length} missing`, rows: by('missing'), foldedByDefault: false },
|
|
180
|
-
{ key: 'minor', label: `${by('minor').length} minor`, rows: by('minor'), foldedByDefault: false },
|
|
181
|
-
{ key: 'present', label: `${by('present').length} present`, rows: by('present'), foldedByDefault: false },
|
|
182
|
-
]
|
|
183
|
-
return groups.filter((g) => g.rows.length > 0)
|
|
184
|
-
}
|
|
185
|
-
|
|
186
172
|
export type ItemGroupKey = 'red' | 'warn' | 'rest'
|
|
187
173
|
|
|
188
174
|
/** any other collection, one line per item: what is red first, then what
|
|
@@ -25,6 +25,9 @@ const readFolds = (): Map<string, boolean> => {
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
/** the hub answered, with an error status: its text is the reason (problems/failure-words.ts), never a page it missed */
|
|
29
|
+
class Answered extends Error {}
|
|
30
|
+
|
|
28
31
|
/** what /api/resources.json answers */
|
|
29
32
|
type Answer = { collections: ColMeta[]; resources: Resource[]; planned?: PlanRow[] | null; hub?: HubProblem[] }
|
|
30
33
|
|
|
@@ -146,7 +149,7 @@ export class ColsSvc {
|
|
|
146
149
|
async poll(fresh = false): Promise<void> {
|
|
147
150
|
try {
|
|
148
151
|
const r = await reach(this.st.url(fresh ? '/api/resources.json?fresh=1' : '/api/resources.json'))
|
|
149
|
-
if (!r.ok) throw new
|
|
152
|
+
if (!r.ok) throw new Answered(await r.text())
|
|
150
153
|
// the browser revalidates the tag and hands back what it holds:
|
|
151
154
|
// the same tag is the same answer, so nothing is parsed or swapped
|
|
152
155
|
const tag = r.headers.get('ETag')
|
|
@@ -170,7 +173,7 @@ export class ColsSvc {
|
|
|
170
173
|
} catch (e) {
|
|
171
174
|
// a dead server must SAY so, in the header, never leave a tree
|
|
172
175
|
// that reads like a healthy repo. The last rows stay, dated by it
|
|
173
|
-
runInAction(() => { this.fetchErr = ownTrouble(e, this.st.home.machine, (m) => `the page cannot reach this hub: ${m}`) || null })
|
|
176
|
+
runInAction(() => { this.fetchErr = ownTrouble(e, this.st.home.machine, (m) => (e instanceof Answered ? `this hub's rows do not load: ${m}` : `the page cannot reach this hub: ${m}`)) || null })
|
|
174
177
|
}
|
|
175
178
|
}
|
|
176
179
|
|
|
@@ -203,14 +206,9 @@ export class ColsSvc {
|
|
|
203
206
|
|
|
204
207
|
needsItem = (i: Resource): boolean => i.severity != null
|
|
205
208
|
isOpen(c: Col): boolean {
|
|
206
|
-
// a live search must SHOW its matches — folds yield while it runs
|
|
207
|
-
if (this.st.query.trim() !== '') return true
|
|
208
209
|
return this.foldOverride.get(c.id) ?? c.instances.some(this.needsItem)
|
|
209
210
|
}
|
|
210
211
|
toggleFold(c: Col): void {
|
|
211
|
-
// folds yield to a live search — toggling then would do nothing
|
|
212
|
-
// visibly and snap shut when the query clears
|
|
213
|
-
if (this.st.query.trim() !== '') return
|
|
214
212
|
this.foldOverride.set(c.id, !this.isOpen(c))
|
|
215
213
|
}
|
|
216
214
|
openSection(c: Col): void {
|
|
@@ -219,11 +217,9 @@ export class ColsSvc {
|
|
|
219
217
|
/** a table group is folded: a live search shows every match, and a group
|
|
220
218
|
* the viewer never touched folds by its default */
|
|
221
219
|
groupFolded(key: string, byDefault: boolean): boolean {
|
|
222
|
-
if (this.st.query.trim() !== '') return false
|
|
223
220
|
return this.tableFolds.get(key) ?? byDefault
|
|
224
221
|
}
|
|
225
222
|
toggleGroup(key: string, byDefault: boolean): void {
|
|
226
|
-
if (this.st.query.trim() !== '') return
|
|
227
223
|
this.setGroupFolded(key, !this.groupFolded(key, byDefault))
|
|
228
224
|
}
|
|
229
225
|
/** a group's fold as the viewer leaves it, kept per browser */
|
|
@@ -242,9 +238,7 @@ export class ColsSvc {
|
|
|
242
238
|
const f = this.st.filter
|
|
243
239
|
const base = f === 'all' ? c.instances
|
|
244
240
|
: c.instances.filter((i) => (f === 'red' ? i.severity === 'red' : this.needsItem(i)))
|
|
245
|
-
|
|
246
|
-
if (q === '') return base
|
|
247
|
-
return base.filter((i) => i.text.toLowerCase().includes(q) || (i.file ?? '').toLowerCase().includes(q))
|
|
241
|
+
return base
|
|
248
242
|
}
|
|
249
243
|
get redCount(): number {
|
|
250
244
|
return this.resources.filter((i) => i.severity === 'red').length
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
// the two columns the arrows move in, and the ONE place that says what each holds on the page shown: column 1 the main
|
|
2
|
+
// panel (main-panel.tsx), every row top to bottom; column 2 the list panel of the entry shown: the entry's list, else the
|
|
3
|
+
// list its page draws. ⌘↑ ⌘↓ step column 1, ⇧↑ ⇧↓ column 2 (page-keys.ts), both stop at their ends. A column keeps no
|
|
4
|
+
// cursor of its own: its selection is the row whose page shows, the row lit, so a key and a click can never disagree.
|
|
5
|
+
// A page with a list of its own gives it as a SideList (list-walk.ts sideOf), names it below, and marks its rows with
|
|
6
|
+
// `listRow` (list-row.ts): a browser check reads both columns as drawn (tests/browser/hub-keys-check.ts)
|
|
7
|
+
import type { HomeSt } from './home-st.ts'
|
|
8
|
+
import type { Col } from './keys.ts'
|
|
9
|
+
import { entryFoldId } from './list-row.ts'
|
|
10
|
+
import { sideOf, stepSide, type SideList } from './list-walk.ts'
|
|
11
|
+
import { panelSteps } from './panel-walk.ts'
|
|
12
|
+
import { railOf } from './rail-groups.ts'
|
|
13
|
+
export { PROFILE_KEY } from './panel-walk.ts'
|
|
14
|
+
import type { RepoSt } from './repo-st.ts'
|
|
15
|
+
import { SPACE_ENTRIES, type SpaceEntry } from './space-st.ts'
|
|
16
|
+
import { entriesOf } from './time-pages.tsx'
|
|
17
|
+
import { TIME_ENTRIES, type TimeEntry } from './time-st.ts'
|
|
18
|
+
import { VAULT_ENTRIES, type VaultEntry } from './vault-st.ts'
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
/** column 1: the main panel's rows in the order drawn (panel-walk.ts panelSteps: one row a page), the one lit, each
|
|
22
|
+
* opened as a click opens it */
|
|
23
|
+
export function mainColumn(home: HomeSt): SideList {
|
|
24
|
+
return sideOf({
|
|
25
|
+
ids: () => panelSteps(home).map((s) => s.key),
|
|
26
|
+
current: () => panelSteps(home).find((s) => s.lit())?.key ?? null,
|
|
27
|
+
open: (key) => panelSteps(home).find((s) => s.key === key)?.open(),
|
|
28
|
+
})
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/** a repo page's list panel: the list its page draws, else the entry's list (entry-list.tsx); null with neither */
|
|
32
|
+
export function repoList(app: RepoSt): SideList | null {
|
|
33
|
+
const t = app.sel?.t
|
|
34
|
+
return t === 'review' ? app.review.side
|
|
35
|
+
: t === 'trailer' ? app.trailer.cutSide
|
|
36
|
+
: t === 'stores' ? app.stores.side
|
|
37
|
+
: t === 'comms' ? app.social.draftSide
|
|
38
|
+
: t === 'social' ? app.social.accountSide
|
|
39
|
+
: app.asks.shown ? app.asks.side
|
|
40
|
+
: app.reflections.shown ? app.reflections.side
|
|
41
|
+
: app.secrets.shown ? app.secrets.side
|
|
42
|
+
: app.tree.list != null ? app.tree.listSide
|
|
43
|
+
: null
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/** column 2: the list panel of the page shown, null where the page draws none */
|
|
47
|
+
export function listColumn(home: HomeSt): SideList | null {
|
|
48
|
+
if (home.page === 'repo') return home.shown == null ? null : repoList(home.shown)
|
|
49
|
+
if (home.page === 'identities') return home.identities.side
|
|
50
|
+
if (home.page === 'inbox') return home.inbox.side
|
|
51
|
+
if (home.page === 'time') {
|
|
52
|
+
const t = home.time
|
|
53
|
+
// as drawn (time-view.tsx): a folded group keeps only the entry shown
|
|
54
|
+
return sideOf({ ids: () => entriesOf(t.scope).filter((e) => e.id === t.entry || t.folds.isOpen(e.group, true)).map((e) => e.id), current: () => t.entry, open: (id) => { if ((TIME_ENTRIES as readonly string[]).includes(id)) t.setEntry(id as TimeEntry) } })
|
|
55
|
+
}
|
|
56
|
+
if (home.page === 'database') {
|
|
57
|
+
const l = home.database.list
|
|
58
|
+
return sideOf({ ids: () => l.visible.map((e) => e.id), current: () => l.currentId, open: (id) => l.open(id) })
|
|
59
|
+
}
|
|
60
|
+
if (home.page === 'vault') {
|
|
61
|
+
const v = home.vault
|
|
62
|
+
return sideOf({ ids: () => [...VAULT_ENTRIES], current: () => v.entry, open: (id) => v.open(id as VaultEntry, 'replace') })
|
|
63
|
+
}
|
|
64
|
+
if (home.page === 'space') {
|
|
65
|
+
const s = home.space
|
|
66
|
+
return sideOf({ ids: () => [...SPACE_ENTRIES], current: () => s.entry, open: (id) => s.open(id as SpaceEntry, 'replace') })
|
|
67
|
+
}
|
|
68
|
+
return null
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/** the fold id of the list panel of the page shown (LayoutSt.foldedOn(id, 'left')): W hides that panel and shows it
|
|
72
|
+
* again, on every page that has one; null where the page draws none. A repo page with a list of its own folds under
|
|
73
|
+
* its page's name, an entry's list under its entry's: one fold for every part of a merged entry (the checks) */
|
|
74
|
+
export function listFoldId(home: HomeSt): string | null {
|
|
75
|
+
if (listColumn(home) == null) return null
|
|
76
|
+
const app = home.page === 'repo' ? home.shown : null
|
|
77
|
+
if (app == null) return home.page
|
|
78
|
+
return repoFoldId(app)
|
|
79
|
+
}
|
|
80
|
+
export function repoFoldId(app: RepoSt): string | null {
|
|
81
|
+
const t = app.sel?.t
|
|
82
|
+
return t != null && OWN_FOLD.has(t) ? t : app.asks.shown ? 'asks' : app.reflections.shown ? 'reflections' : app.secrets.shown ? 'secrets' : app.tree.list != null ? entryFoldId(railOf(app.tree.list.id)) : null
|
|
83
|
+
}
|
|
84
|
+
const OWN_FOLD: ReadonlySet<string> = new Set(['review', 'trailer', 'stores', 'comms', 'social'])
|
|
85
|
+
|
|
86
|
+
/** the column a key names, on the page shown */
|
|
87
|
+
export const columnOf = (home: HomeSt, col: Col): SideList | null => (col === 'main' ? mainColumn(home) : listColumn(home))
|
|
88
|
+
|
|
89
|
+
/** the row above (-1) or below (1) the column's selection, opened: the page follows, the ends stop; a page with no
|
|
90
|
+
* list panel has nothing to step */
|
|
91
|
+
export function stepColumn(home: HomeSt, col: Col, by: -1 | 1): void {
|
|
92
|
+
const c = columnOf(home, col)
|
|
93
|
+
if (c != null) stepSide(c, by)
|
|
94
|
+
}
|