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
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
// the forms of the urls section of the main panel (wiki tools/shipkit/urls.md, The page): a url added
|
|
2
|
+
// or changed (its « + », its « ⋯ »), one removed, and a login typed into the vault. Each sends through the urls store
|
|
3
|
+
// (urls-svc.ts) and says its answer in its own last line.
|
|
4
|
+
// The one constraint a reader breaks first: the password field is uncontrolled. Its value is read once, at the
|
|
5
|
+
// submit, passed to the one request, and the field is emptied at the answer: no state, no storage, no address and no
|
|
6
|
+
// log of the page ever holds it (tests/browser/urls-panel-check.ts greps the whole page for a planted one)
|
|
7
|
+
import { observer } from 'mobx-react-lite'
|
|
8
|
+
import { useEffect, useRef, useState, type FormEvent, type ReactNode } from 'react'
|
|
9
|
+
import type { UrlRow } from '../../urls/rows.ts'
|
|
10
|
+
import { URL_ENV_WORDS, URL_ENVS, type UrlEnv } from '../../urls/unit.ts'
|
|
11
|
+
import { Icon, ICON } from './icons.tsx'
|
|
12
|
+
import type { RepoSt } from './repo-st.ts'
|
|
13
|
+
import { tip } from './tips.ts'
|
|
14
|
+
import { chipKey, envGuess, hostName, withScheme } from './urls-svc.ts'
|
|
15
|
+
|
|
16
|
+
/** one field of a login as a chip: a click copies it (UrlsSvc.copy), a password is never drawn. Above a url's frame
|
|
17
|
+
* (urls-view.tsx) and under a login just stored */
|
|
18
|
+
export const Chip = observer(({ app, u, login, field, text }: { app: RepoSt; u: UrlRow; login: number; field: 'account' | 'password'; text: string }) => {
|
|
19
|
+
const said = app.urls.copied === chipKey(u.id, login, field)
|
|
20
|
+
return (
|
|
21
|
+
<button type="button" className={`urlchip${said ? ' said' : ''}`} {...tip(`copy the ${field} of ${u.logins[login]?.label ?? 'this login'}`)} onClick={() => void app.urls.copy(u.id, login, field)}>
|
|
22
|
+
<Icon d={ICON.copy} />
|
|
23
|
+
<span>{said ? 'copied' : text}</span>
|
|
24
|
+
</button>
|
|
25
|
+
)
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
/** a form's last line: what it is doing, or why it was refused */
|
|
29
|
+
type Said = { words: string; bad?: boolean } | null
|
|
30
|
+
|
|
31
|
+
/** the attributes every field of these forms wears: no spell check, no password manager of the hub's own origin */
|
|
32
|
+
const PLAIN = { spellCheck: false, autoCorrect: 'off', autoCapitalize: 'off', 'data-1p-ignore': '', 'data-lpignore': 'true' } as const
|
|
33
|
+
|
|
34
|
+
/** the first field takes the focus as the form shows, wherever it floats */
|
|
35
|
+
const useFirst = <T extends HTMLElement>() => {
|
|
36
|
+
const el = useRef<T>(null)
|
|
37
|
+
useEffect(() => el.current?.focus(), [])
|
|
38
|
+
return el
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const Line = ({ said }: { said: Said }) => (said == null ? null : <div className={`urlsaid${said.bad === true ? ' bad' : ''}`} role="status">{said.words}</div>)
|
|
42
|
+
|
|
43
|
+
const Field = ({ label, children }: { label: string; children: ReactNode }) => (
|
|
44
|
+
<label className="urlfield"><span>{label}</span>{children}</label>
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
/** a url to add, or one added here to change: the url first (pasted), its name (its host by default, « / » makes
|
|
48
|
+
* folders), dev, prod or ext (guessed from the url until he picks) */
|
|
49
|
+
export const UrlForm = observer(({ app, u, close }: { app: RepoSt; u?: UrlRow; close: () => void }) => {
|
|
50
|
+
const [url, setUrl] = useState(u?.url ?? '')
|
|
51
|
+
const [label, setLabel] = useState(u?.label ?? '')
|
|
52
|
+
const [picked, setPicked] = useState<UrlEnv | null>(u?.env ?? null)
|
|
53
|
+
const [said, setSaid] = useState<Said>(null)
|
|
54
|
+
const first = useFirst<HTMLInputElement>()
|
|
55
|
+
const env = picked ?? envGuess(url, app.urls.list) ?? 'dev'
|
|
56
|
+
const host = hostName(url)
|
|
57
|
+
const send = async (e: FormEvent): Promise<void> => {
|
|
58
|
+
e.preventDefault()
|
|
59
|
+
if (host === '') return setSaid({ words: 'paste the url first', bad: true })
|
|
60
|
+
setSaid({ words: u == null ? 'adding…' : 'saving…' })
|
|
61
|
+
// a name left empty: none on an add (the host), and on an edit `""`, which clears the one it had
|
|
62
|
+
const d = { url: withScheme(url), env, ...(label.trim() === '' && u == null ? {} : { label: label.trim() }) }
|
|
63
|
+
const why = u == null ? await app.urls.add(d).then((r) => ('why' in r ? r.why : null)) : await app.urls.edit(u.id, d)
|
|
64
|
+
if (why != null) return setSaid({ words: why, bad: true })
|
|
65
|
+
close()
|
|
66
|
+
}
|
|
67
|
+
return (
|
|
68
|
+
<form className="urlform" onSubmit={(e) => void send(e)} aria-label={u == null ? 'add a url' : `edit ${u.label}`}>
|
|
69
|
+
<Field label="url">
|
|
70
|
+
<input ref={first} name="url" type="text" inputMode="url" placeholder="https://… or 192.168.1.20" value={url} onChange={(e) => setUrl(e.target.value)} {...PLAIN} />
|
|
71
|
+
</Field>
|
|
72
|
+
<Field label="name">
|
|
73
|
+
<input name="label" type="text" placeholder={host === '' ? 'its host' : host} value={label} onChange={(e) => setLabel(e.target.value)} {...PLAIN} {...tip('the row\'s name; « / » makes folders: shop/admin')} />
|
|
74
|
+
</Field>
|
|
75
|
+
<div className="urlfield">
|
|
76
|
+
<span>env</span>
|
|
77
|
+
<span className="urlenvs" role="radiogroup" aria-label="env">
|
|
78
|
+
{URL_ENVS.map((x) => (
|
|
79
|
+
<button key={x} type="button" role="radio" data-env={x} aria-pressed={env === x} aria-checked={env === x} className={`urlenv ${x}${env === x ? ' on' : ''}`}
|
|
80
|
+
{...tip(URL_ENV_WORDS[x])} onClick={() => setPicked(x)}>{x}</button>
|
|
81
|
+
))}
|
|
82
|
+
</span>
|
|
83
|
+
</div>
|
|
84
|
+
<Line said={said} />
|
|
85
|
+
<div className="urlbtns">
|
|
86
|
+
<button type="button" className="ghost" onClick={close}>cancel</button>
|
|
87
|
+
<button type="submit" className="primary" data-act={u == null ? 'add' : 'save'}>{u == null ? 'add' : 'save'}</button>
|
|
88
|
+
</div>
|
|
89
|
+
</form>
|
|
90
|
+
)
|
|
91
|
+
})
|
|
92
|
+
|
|
93
|
+
/** a url added here, removed after one question that names the logins that leave with it */
|
|
94
|
+
export const RemoveForm = observer(({ app, u, back, close }: { app: RepoSt; u: UrlRow; back: () => void; close: () => void }) => {
|
|
95
|
+
const [said, setSaid] = useState<Said>(null)
|
|
96
|
+
const names = u.logins.map((l) => l.label)
|
|
97
|
+
const go = async (e: FormEvent): Promise<void> => {
|
|
98
|
+
e.preventDefault()
|
|
99
|
+
setSaid({ words: 'removing…' })
|
|
100
|
+
const why = await app.urls.remove(u.id)
|
|
101
|
+
if (why != null) return setSaid({ words: why, bad: true })
|
|
102
|
+
close()
|
|
103
|
+
}
|
|
104
|
+
return (
|
|
105
|
+
<form className="urlform" onSubmit={(e) => void go(e)} aria-label={`remove ${u.label}`}>
|
|
106
|
+
<div className="urlask">
|
|
107
|
+
remove <b>{u.label}</b>?
|
|
108
|
+
{names.length === 0 ? null : <> Its login{names.length === 1 ? '' : 's'} <b>{names.join(', ')}</b> leave{names.length === 1 ? 's' : ''} with it: the vault keeps {names.length === 1 ? 'its value' : 'their values'} deleted, undoable.</>}
|
|
109
|
+
</div>
|
|
110
|
+
<Line said={said} />
|
|
111
|
+
<div className="urlbtns">
|
|
112
|
+
<button type="button" className="ghost" onClick={back}>keep</button>
|
|
113
|
+
<button type="submit" className="primary danger" data-act="remove">remove</button>
|
|
114
|
+
</div>
|
|
115
|
+
</form>
|
|
116
|
+
)
|
|
117
|
+
})
|
|
118
|
+
|
|
119
|
+
/** a login of url `u` into the vault: its name, its account, its password, one value each. Once stored, the name it
|
|
120
|
+
* is stored as and its two copy chips */
|
|
121
|
+
export const LoginForm = observer(({ app, u, back, close }: { app: RepoSt; u: UrlRow; back: () => void; close: () => void }) => {
|
|
122
|
+
const [label, setLabel] = useState('')
|
|
123
|
+
const [account, setAccount] = useState('')
|
|
124
|
+
const [said, setSaid] = useState<Said>(null)
|
|
125
|
+
const [stored, setStored] = useState<{ name: string; label: string } | null>(null)
|
|
126
|
+
const [busy, setBusy] = useState(false)
|
|
127
|
+
const first = useFirst<HTMLInputElement>()
|
|
128
|
+
const pass = useRef<HTMLInputElement>(null)
|
|
129
|
+
const send = async (e: FormEvent): Promise<void> => {
|
|
130
|
+
e.preventDefault()
|
|
131
|
+
const el = pass.current
|
|
132
|
+
if (el == null || busy) return
|
|
133
|
+
const name = label.trim() === '' ? 'login' : label.trim()
|
|
134
|
+
setBusy(true)
|
|
135
|
+
setSaid({ words: 'storing…' })
|
|
136
|
+
const r = await app.urls.storeLogin(u.id, name, account.trim(), el.value)
|
|
137
|
+
// the answer empties the form, a refusal too: he types the password again
|
|
138
|
+
el.value = ''
|
|
139
|
+
setLabel('')
|
|
140
|
+
setAccount('')
|
|
141
|
+
setBusy(false)
|
|
142
|
+
if ('why' in r) return setSaid({ words: r.why, bad: true })
|
|
143
|
+
setSaid(null)
|
|
144
|
+
setStored({ name: r.stored, label: name })
|
|
145
|
+
}
|
|
146
|
+
if (stored != null) {
|
|
147
|
+
const now = app.urls.find(u.id) ?? u
|
|
148
|
+
const at = now.logins.map((l) => l.label).lastIndexOf(stored.label)
|
|
149
|
+
return (
|
|
150
|
+
<div className="urlform">
|
|
151
|
+
<div className="urlstored">stored as <code>{stored.name}</code></div>
|
|
152
|
+
{at < 0 ? null : (
|
|
153
|
+
<div className="urllogin">
|
|
154
|
+
<Chip app={app} u={now} login={at} field="account" text={now.logins[at]?.account ?? 'account'} />
|
|
155
|
+
<Chip app={app} u={now} login={at} field="password" text="password" />
|
|
156
|
+
</div>
|
|
157
|
+
)}
|
|
158
|
+
<div className="urlbtns">
|
|
159
|
+
<button type="button" className="ghost" onClick={back}>back</button>
|
|
160
|
+
<button type="button" className="primary" data-act="done" onClick={close}>done</button>
|
|
161
|
+
</div>
|
|
162
|
+
</div>
|
|
163
|
+
)
|
|
164
|
+
}
|
|
165
|
+
return (
|
|
166
|
+
<form className="urlform" onSubmit={(e) => void send(e)} autoComplete="off" aria-label={`a login of ${u.label}`}>
|
|
167
|
+
<Field label="name">
|
|
168
|
+
<input ref={first} name="label" type="text" placeholder="login" value={label} onChange={(e) => setLabel(e.target.value)} {...PLAIN} />
|
|
169
|
+
</Field>
|
|
170
|
+
<Field label="account">
|
|
171
|
+
<input name="account" type="text" autoComplete="off" placeholder="the email or user name" value={account} onChange={(e) => setAccount(e.target.value)} {...PLAIN} />
|
|
172
|
+
</Field>
|
|
173
|
+
<Field label="password">
|
|
174
|
+
<input ref={pass} name="password" type="password" autoComplete="new-password" {...PLAIN} />
|
|
175
|
+
</Field>
|
|
176
|
+
<Line said={said} />
|
|
177
|
+
<div className="urlbtns">
|
|
178
|
+
<button type="button" className="ghost" onClick={back}>back</button>
|
|
179
|
+
<button type="submit" className="primary" data-act="store" disabled={busy}>save into the vault</button>
|
|
180
|
+
</div>
|
|
181
|
+
</form>
|
|
182
|
+
)
|
|
183
|
+
})
|
|
@@ -4,9 +4,13 @@
|
|
|
4
4
|
import { makeAutoObservable, runInAction } from 'mobx'
|
|
5
5
|
import type { FrameMode } from '../../urls/frame.ts'
|
|
6
6
|
import type { LoginField, RepoUrls, UrlRow } from '../../urls/rows.ts'
|
|
7
|
+
import { envOfUrl, nearHost, type UrlEnv, type UrlOpens } from '../../urls/unit.ts'
|
|
7
8
|
import { urlFrameOrigin } from '../../http/door-names.ts'
|
|
9
|
+
import type { ActSaid, RowTab } from './panel-source.ts'
|
|
8
10
|
import type { RepoSt } from './repo-st.ts'
|
|
9
11
|
import { reach } from './reach.ts'
|
|
12
|
+
import { addressAt, keepAddresses, keptAddresses } from './url-address.ts'
|
|
13
|
+
import { PlacesSvc } from './places-svc.ts'
|
|
10
14
|
|
|
11
15
|
/** how long a chip says copied */
|
|
12
16
|
const SAID_MS = 1600
|
|
@@ -44,7 +48,63 @@ export function frameChoice(u: UrlRow, mode: FrameMode | null, page: { protocol:
|
|
|
44
48
|
return { src: `${origin}${url.pathname}${url.search}${url.hash}` }
|
|
45
49
|
}
|
|
46
50
|
|
|
47
|
-
|
|
51
|
+
/** what a new tab opens for url `u`, `at` the address he is on in its site: that address, or the same path under
|
|
52
|
+
* the home's hop where the hub found the url behind a basic login it declares (the hop adds the login, so the tab
|
|
53
|
+
* never asks it). Named as the url, with its logins' labels for the chips of a project app's tab */
|
|
54
|
+
export function tabOf(u: UrlRow, at: string, mode: FrameMode | null, page: { protocol: string; hostname: string; port: string } | null, repo: string | null): RowTab {
|
|
55
|
+
const tab = { href: at, name: u.label, chips: { urlId: u.id, logins: u.logins.map((l) => l.label) } }
|
|
56
|
+
if (mode?.frame !== 'hop' || !mode.login || repo == null || page == null || !loopPage(page.hostname)) return tab
|
|
57
|
+
const origin = urlFrameOrigin(u.id, repo, page.port || (page.protocol === 'https:' ? '443' : '80'))
|
|
58
|
+
let a: URL
|
|
59
|
+
try { a = new URL(at) } catch { return tab }
|
|
60
|
+
return origin == null ? tab : { ...tab, href: `${origin}${a.pathname}${a.search}${a.hash}` }
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export const chipKey =(id: string, login: number, field: LoginField): string => `${id}/${login}/${field}`
|
|
64
|
+
|
|
65
|
+
/** a url as he typed or pasted it, with its scheme: none typed, http for a machine of his, https for any other name */
|
|
66
|
+
export function withScheme(text: string): string {
|
|
67
|
+
const t = text.trim()
|
|
68
|
+
if (t === '' || /^[a-z][a-z0-9+.-]*:\/\//i.test(t)) return t
|
|
69
|
+
const host = t.split(/[/?#]/)[0]!.replace(/:\d+$/, '')
|
|
70
|
+
return `${nearHost(host) ? 'http' : 'https'}://${t}`
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/** the env a url most likely is as he types it (unit.ts envOfUrl), `rows` the repo's urls; null while it is no url */
|
|
74
|
+
export const envGuess = (url: string, rows: readonly Pick<UrlRow, 'env' | 'url'>[] = []): UrlEnv | null =>
|
|
75
|
+
envOfUrl(withScheme(url), rows.filter((r) => r.env === 'prod').map((r) => r.url))
|
|
76
|
+
|
|
77
|
+
/** its host, the name a url gets when he gives none; '' while it is no url */
|
|
78
|
+
export function hostName(url: string): string {
|
|
79
|
+
try {
|
|
80
|
+
return new URL(withScheme(url)).host
|
|
81
|
+
} catch {
|
|
82
|
+
return ''
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/** where the page runs: a project's app, a page of this Mac (the home app, a browser), or another device of the
|
|
87
|
+
* tailnet, whose Chrome is not the Mac's */
|
|
88
|
+
export type Seat = 'project' | 'mac' | 'remote'
|
|
89
|
+
|
|
90
|
+
export const seatOf = (shell: { kind: string } | null | undefined, page: { hostname: string }): Seat =>
|
|
91
|
+
!loopPage(page.hostname) ? 'remote' : shell?.kind === 'project' ? 'project' : 'mac'
|
|
92
|
+
|
|
93
|
+
/** what a plain click on a url opens: his choice, else a tab of the project's app in one, else the identity's Chrome.
|
|
94
|
+
* Another device opens no Chrome of the Mac: a tab there */
|
|
95
|
+
export function opensOf(u: Pick<UrlRow, 'opens'>, seat: Seat): UrlOpens {
|
|
96
|
+
const chosen = u.opens ?? (seat === 'project' ? 'tab' : 'chrome')
|
|
97
|
+
return seat === 'remote' && chosen === 'chrome' ? 'tab' : chosen
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/** a url as the add or edit form sends it */
|
|
101
|
+
export type UrlDraft = { url: string; label?: string; env: UrlEnv }
|
|
102
|
+
|
|
103
|
+
/** what a write of the urls store answered: its json, or the line that says why not */
|
|
104
|
+
type Wrote = { ok: true; json: Record<string, unknown> } | { ok: false; why: string }
|
|
105
|
+
|
|
106
|
+
/** a password longer than this is a file's, refused here as the hub refuses it */
|
|
107
|
+
const MAX_PASSWORD = 16 * 1024
|
|
48
108
|
|
|
49
109
|
export class UrlsSvc {
|
|
50
110
|
list: UrlRow[] = []
|
|
@@ -56,26 +116,64 @@ export class UrlsSvc {
|
|
|
56
116
|
failed: string | null = null
|
|
57
117
|
/** how the hub frames each url it was asked about, by id */
|
|
58
118
|
frames: Record<string, FrameMode> = {}
|
|
119
|
+
/** the address he is on inside each url, by id: a path, query and fragment, kept by this browser (url-address.ts);
|
|
120
|
+
* none: its start */
|
|
121
|
+
at: Record<string, string>
|
|
122
|
+
/** why the last plain click opened nothing (the identity's Chrome refused), said under the section's head; '' */
|
|
123
|
+
note = ''
|
|
124
|
+
/** the repo's urls and processes on its other places, on the home's hub alone (places-svc.ts) */
|
|
125
|
+
readonly places: PlacesSvc
|
|
59
126
|
private timer: ReturnType<typeof setTimeout> | null = null
|
|
60
127
|
|
|
61
128
|
constructor(private st: RepoSt) {
|
|
62
|
-
|
|
129
|
+
this.at = keptAddresses(st.key)
|
|
130
|
+
this.places = new PlacesSvc(st.key)
|
|
131
|
+
makeAutoObservable<this, 'st' | 'timer'>(this, { st: false, timer: false, places: false })
|
|
63
132
|
}
|
|
64
133
|
|
|
65
134
|
find(id: string | null): UrlRow | null {
|
|
66
135
|
return id == null ? null : (this.list.find((u) => u.id === id) ?? null)
|
|
67
136
|
}
|
|
68
137
|
|
|
69
|
-
|
|
138
|
+
keepAt(id: string, path: string): void {
|
|
139
|
+
if (this.at[id] === path) return
|
|
140
|
+
this.at[id] = path
|
|
141
|
+
keepAddresses(this.st.key, this.at)
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/** back to the url's start: nothing is kept of it */
|
|
145
|
+
dropAt(id: string): void {
|
|
146
|
+
if (!(id in this.at)) return
|
|
147
|
+
delete this.at[id]
|
|
148
|
+
keepAddresses(this.st.key, this.at)
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/** what a new tab opens for a url: the site alone at the address he is on, named as the url (tabOf) */
|
|
152
|
+
tab(u: UrlRow): RowTab {
|
|
153
|
+
return tabOf(u, addressAt(u.url, this.at[u.id]), this.frames[u.id] ?? null, globalThis.location ?? null, this.st.base === '' ? null : this.st.key)
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/** the same for the url a process serves; null when it serves none */
|
|
157
|
+
tabOfProcess(id: string): RowTab | null {
|
|
158
|
+
const u = this.list.find((x) => x.process === id)
|
|
159
|
+
return u == null ? null : this.tab(u)
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/** `icons`: the list once the hub has the pictures it is asking the sites for (urls/icons.ts) */
|
|
163
|
+
async load(icons = false): Promise<void> {
|
|
164
|
+
// a hub of its own has no home to ask
|
|
165
|
+
if (!icons && this.st.base !== '') void this.places.load()
|
|
70
166
|
try {
|
|
71
|
-
const r = await reach(this.st.url(
|
|
167
|
+
const r = await reach(this.st.url(`/api/urls.json${icons ? '?icons=wait' : ''}`))
|
|
72
168
|
if (!r.ok) throw new Error(`${r.status} ${await r.text()}`)
|
|
73
|
-
const j = (await r.json()) as { urls: UrlRow[]; problem: string | null }
|
|
169
|
+
const j = (await r.json()) as { urls: UrlRow[]; problem: string | null; iconsPending?: boolean }
|
|
74
170
|
runInAction(() => {
|
|
75
171
|
this.list = j.urls
|
|
76
172
|
this.problem = j.problem
|
|
77
173
|
this.loaded = true
|
|
78
174
|
})
|
|
175
|
+
// asked once more, never in a loop: that answer waits for the pictures and says none is pending
|
|
176
|
+
if (j.iconsPending === true && !icons) void this.load(true)
|
|
79
177
|
} catch (e) {
|
|
80
178
|
runInAction(() => {
|
|
81
179
|
this.problem = `the urls did not load: ${(e as Error).message}`
|
|
@@ -99,6 +197,70 @@ export class UrlsSvc {
|
|
|
99
197
|
runInAction(() => { this.frames[id] = mode })
|
|
100
198
|
}
|
|
101
199
|
|
|
200
|
+
/** one write of the urls store (wiki tools/shipkit/urls.md, The page): the list is read again once
|
|
201
|
+
* it took it */
|
|
202
|
+
private async write(path: string, body: Record<string, unknown>): Promise<Wrote> {
|
|
203
|
+
try {
|
|
204
|
+
const r = await reach(this.st.url(`/api/urls/${path}`), { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify(body) })
|
|
205
|
+
if (!r.ok) return { ok: false, why: (await r.text()) || `the hub answered ${r.status}` }
|
|
206
|
+
const json = (await r.json().catch(() => ({}))) as Record<string, unknown>
|
|
207
|
+
await this.load()
|
|
208
|
+
return { ok: true, json }
|
|
209
|
+
} catch (e) {
|
|
210
|
+
return { ok: false, why: (e as Error).message }
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/** a url added from the hub; its id, or why not */
|
|
215
|
+
async add(d: UrlDraft): Promise<{ id: string } | { why: string }> {
|
|
216
|
+
const w = await this.write('add', d)
|
|
217
|
+
return w.ok ? { id: String(w.json.id ?? '') } : { why: w.why }
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/** a url added from the hub, changed; null, or why not */
|
|
221
|
+
async edit(id: string, d: UrlDraft): Promise<string | null> {
|
|
222
|
+
const w = await this.write('edit', { id, ...d })
|
|
223
|
+
return w.ok ? null : w.why
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/** a url added from the hub, gone with its logins; null, or why not */
|
|
227
|
+
async remove(id: string): Promise<string | null> {
|
|
228
|
+
const w = await this.write('remove', { id })
|
|
229
|
+
return w.ok ? null : w.why
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/** what a plain click on url `id` opens from now on */
|
|
233
|
+
async choose(id: string, opens: UrlOpens): Promise<ActSaid | null> {
|
|
234
|
+
const w = await this.write('opens', { id, opens })
|
|
235
|
+
return w.ok ? null : { words: w.why, bad: true }
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/** url `u` in a popup of the identity's Chrome profile, at the address he is on: the hub opens it, on its declared
|
|
239
|
+
* origin */
|
|
240
|
+
async chrome(u: UrlRow): Promise<ActSaid> {
|
|
241
|
+
const at = this.at[u.id]
|
|
242
|
+
try {
|
|
243
|
+
const r = await reach(this.st.url('/api/urls/open'), { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ id: u.id, ...(at == null ? {} : { at }) }) })
|
|
244
|
+
return r.ok ? { words: `${u.label}: opened in Chrome` } : { words: (await r.text()) || `the hub answered ${r.status}`, bad: true }
|
|
245
|
+
} catch (e) {
|
|
246
|
+
return { words: (e as Error).message, bad: true }
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/** a plain click's answer, under the section's head: its refusal, or nothing once one opened */
|
|
251
|
+
say(said: ActSaid): void {
|
|
252
|
+
this.note = said.bad === true ? said.words : ''
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/** a login typed in the hub into the vault: the password goes in this one request and nowhere else, never into
|
|
256
|
+
* this state. The name it is stored as, or why not */
|
|
257
|
+
async storeLogin(id: string, label: string, account: string, password: string): Promise<{ stored: string } | { why: string }> {
|
|
258
|
+
if (password === '') return { why: 'type the password' }
|
|
259
|
+
if (/[\r\n]/.test(password) || password.length > MAX_PASSWORD) return { why: 'a value of several lines or over 16 KiB is a file: store it with `sk secret set <name> < file`' }
|
|
260
|
+
const w = await this.write('login', { id, label, account, password })
|
|
261
|
+
return w.ok ? { stored: String(w.json.stored ?? '') } : { why: w.why }
|
|
262
|
+
}
|
|
263
|
+
|
|
102
264
|
private async read(id: string, login: number, field: LoginField): Promise<string> {
|
|
103
265
|
const r = await reach(this.st.url('/api/urls/copy'), { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ id, login, field }) })
|
|
104
266
|
if (!r.ok) throw new Error((await r.text()) || `the hub answered ${r.status}`)
|
|
@@ -1,33 +1,51 @@
|
|
|
1
|
-
// the urls page of a repo (wiki tools/shipkit/urls.md): a url
|
|
2
|
-
// frame, one click a copy; with none opened, the list of every url, dev and
|
|
1
|
+
// the urls page of a repo (wiki tools/shipkit/urls.md): a url previewed is framed alone, its logins as chips above the
|
|
2
|
+
// frame, one click a copy, and the identity's Chrome one click away; with none opened, the list of every url, dev and
|
|
3
|
+
// prod, a click opening each as it says. A password is never drawn
|
|
4
|
+
import { untracked } from 'mobx'
|
|
3
5
|
import { observer } from 'mobx-react-lite'
|
|
4
|
-
import { useEffect, useRef, useState } from 'react'
|
|
6
|
+
import { useCallback, useEffect, useRef, useState } from 'react'
|
|
5
7
|
import type { ProcessRow } from '../../home/process-rows.ts'
|
|
6
8
|
import type { UrlRow } from '../../urls/rows.ts'
|
|
7
|
-
import {
|
|
9
|
+
import { clickUrl } from './live-sources.ts'
|
|
10
|
+
import { openTab, panelProfile } from './panel-repo.ts'
|
|
8
11
|
import type { RepoSt } from './repo-st.ts'
|
|
9
|
-
import {
|
|
12
|
+
import { Chip } from './url-forms.tsx'
|
|
13
|
+
import { addressAt, watchFrame } from './url-address.ts'
|
|
14
|
+
import { frameChoice, seatOf } from './urls-svc.ts'
|
|
15
|
+
import { tip } from './tips.ts'
|
|
10
16
|
|
|
11
17
|
const hostOf = (url: string): string => url.replace(/^https?:\/\//, '').replace(/\/$/, '')
|
|
12
18
|
|
|
13
19
|
/** the process that serves a url, as pm reports it: null when none is declared or pm does not say */
|
|
14
20
|
const processOf = (app: RepoSt, u: UrlRow): ProcessRow | null => (u.process == null ? null : (app.globalProcesses.find((r) => r.id === u.process) ?? null))
|
|
15
21
|
|
|
16
|
-
|
|
17
|
-
|
|
22
|
+
/** « open in a tab »: the site alone at the address he is on, a tab of a project's app named as the url */
|
|
23
|
+
const OutLink = observer(({ app, u }: { app: RepoSt; u: UrlRow }) => {
|
|
24
|
+
const tab = app.urls.tab(u)
|
|
25
|
+
return <a className="urlout" href={tab.href} target="_blank" rel="noopener" {...tip(`open ${tab.href} in a tab`)} onClick={(e) => { e.preventDefault(); openTab(tab.href, tab.name, tab.chips) }}>open in a tab</a>
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
/** « open in <identity>'s Chrome »: a popup of its Chrome profile, where its sign-ins and saved passwords are; none on
|
|
29
|
+
* another device, whose Chrome is not the Mac's. A refusal is said in the bar */
|
|
30
|
+
const ChromeLink = observer(({ app, u }: { app: RepoSt; u: UrlRow }) => {
|
|
31
|
+
const [why, setWhy] = useState<string | null>(null)
|
|
32
|
+
if (seatOf(app.home.shell, location) === 'remote') return null
|
|
33
|
+
const who = panelProfile(app.home)?.name
|
|
18
34
|
return (
|
|
19
|
-
|
|
20
|
-
<
|
|
21
|
-
<
|
|
22
|
-
|
|
35
|
+
<>
|
|
36
|
+
{why == null ? null : <span className="urlfail">{why}</span>}
|
|
37
|
+
<button type="button" className="ghost" data-act="chrome" {...tip(`a popup of ${who ?? 'the identity'}'s Chrome profile, at the address you are on: its saved passwords fill the login there`)}
|
|
38
|
+
onClick={() => void app.urls.chrome(u).then((s) => setWhy(s.bad === true ? s.words : null))}>open in {who == null ? 'Chrome' : `${who}'s Chrome`}</button>
|
|
39
|
+
</>
|
|
23
40
|
)
|
|
24
41
|
})
|
|
25
42
|
|
|
26
|
-
/** above the frame: the url's name, each login as two chips, then reload and
|
|
27
|
-
|
|
43
|
+
/** above the frame: the url's name (a click goes back to its start address), each login as two chips, then reload and
|
|
44
|
+
* open in a tab */
|
|
45
|
+
const UrlBar = observer(({ app, u, reload, home }: { app: RepoSt; u: UrlRow; reload: () => void; home: () => void }) => (
|
|
28
46
|
<div className="urlbar">
|
|
29
47
|
<span className={`urlenv ${u.env}`}>{u.env}</span>
|
|
30
|
-
<
|
|
48
|
+
<button className="urlname" onClick={home} {...tip(`back to ${u.url}, its start address`)}>{u.label}</button>
|
|
31
49
|
{u.logins.length === 0 ? <span className="dim">no login declared</span> : u.logins.map((l, i) => (
|
|
32
50
|
<span className="urllogin" key={i}>
|
|
33
51
|
<span className="dim">{l.label}</span>
|
|
@@ -36,11 +54,24 @@ const UrlBar = observer(({ app, u, reload }: { app: RepoSt; u: UrlRow; reload: (
|
|
|
36
54
|
</span>
|
|
37
55
|
))}
|
|
38
56
|
<span className="sp" />
|
|
39
|
-
<button className="ghost" onClick={reload}
|
|
40
|
-
<
|
|
57
|
+
<button className="ghost" onClick={reload} {...tip('load the address you are on again')}>reload</button>
|
|
58
|
+
<ChromeLink app={app} u={u} />
|
|
59
|
+
<OutLink app={app} u={u} />
|
|
41
60
|
</div>
|
|
42
61
|
))
|
|
43
62
|
|
|
63
|
+
/** the frame on the address it was sent to, and what it says of its address from then on (url-address.ts). `sent` is
|
|
64
|
+
* read once a load: his moves inside the frame never load it again */
|
|
65
|
+
const UrlFrame = ({ app, u, start, back }: { app: RepoSt; u: UrlRow; start: string; back: () => void }) => {
|
|
66
|
+
const el = useRef<HTMLIFrameElement>(null)
|
|
67
|
+
const [sent] = useState(() => addressAt(start, untracked(() => app.urls.at[u.id])))
|
|
68
|
+
useEffect(() => {
|
|
69
|
+
if (el.current == null) return
|
|
70
|
+
return watchFrame(el.current, { sent, start }, { keep: (path) => app.urls.keepAt(u.id, path), drop: () => app.urls.dropAt(u.id), back })
|
|
71
|
+
}, [app, u.id, sent, start, back])
|
|
72
|
+
return <iframe ref={el} className="urlframe" src={sent} title={u.label} referrerPolicy="strict-origin" />
|
|
73
|
+
}
|
|
74
|
+
|
|
44
75
|
const UrlStage = observer(({ app, u }: { app: RepoSt; u: UrlRow }) => {
|
|
45
76
|
const [epoch, setEpoch] = useState(0)
|
|
46
77
|
const proc = processOf(app, u)
|
|
@@ -58,9 +89,14 @@ const UrlStage = observer(({ app, u }: { app: RepoSt; u: UrlRow }) => {
|
|
|
58
89
|
void app.urls.probe(u.id, true)
|
|
59
90
|
setEpoch((n) => n + 1)
|
|
60
91
|
}
|
|
92
|
+
// the start address: by the name in the bar, and by itself when the address kept answers an error
|
|
93
|
+
const home = useCallback((): void => {
|
|
94
|
+
app.urls.dropAt(u.id)
|
|
95
|
+
setEpoch((n) => n + 1)
|
|
96
|
+
}, [app, u.id])
|
|
61
97
|
return (
|
|
62
98
|
<>
|
|
63
|
-
<UrlBar app={app} u={u} reload={reload} />
|
|
99
|
+
<UrlBar app={app} u={u} reload={reload} home={home} />
|
|
64
100
|
{app.urls.failed == null ? null : <div className="urlfail">the copy failed: {app.urls.failed}</div>}
|
|
65
101
|
{down ? (
|
|
66
102
|
<div className="urlnote">
|
|
@@ -68,11 +104,11 @@ const UrlStage = observer(({ app, u }: { app: RepoSt; u: UrlRow }) => {
|
|
|
68
104
|
{m == null ? null : <button disabled={starting} onClick={() => void m.processAct(proc.id, 'start')}>{starting ? `starting ${proc.label}…` : `start ${proc.label}`}</button>}
|
|
69
105
|
</div>
|
|
70
106
|
) : 'src' in choice ? (
|
|
71
|
-
<
|
|
107
|
+
<UrlFrame key={`${u.id}:${epoch}:${choice.src}`} app={app} u={u} start={choice.src} back={home} />
|
|
72
108
|
) : 'why' in choice ? (
|
|
73
109
|
<div className="urlnote">
|
|
74
110
|
<span>{choice.why}</span>
|
|
75
|
-
<
|
|
111
|
+
<OutLink app={app} u={u} />
|
|
76
112
|
</div>
|
|
77
113
|
) : (
|
|
78
114
|
<div className="urlnote"><span>asking {choice.reading} how it answers…</span></div>
|
|
@@ -99,7 +135,7 @@ export const UrlsPage = observer(({ app, id }: { app: RepoSt; id: string | null
|
|
|
99
135
|
{list.map((u) => {
|
|
100
136
|
const proc = processOf(app, u)
|
|
101
137
|
return (
|
|
102
|
-
<button key={u.id} role="listitem" className="urlrow" onClick={() => app.
|
|
138
|
+
<button key={u.id} role="listitem" className="urlrow" onClick={() => clickUrl(app.home, u.id)} {...tip(`${u.url}, declared in ${u.file}`)}>
|
|
103
139
|
<span className={`urlenv ${u.env}`}>{u.env}</span>
|
|
104
140
|
<i className={`pdot ${proc?.dot ?? (u.process == null ? 'none' : 'unknown')}`} />
|
|
105
141
|
<b>{u.label}</b>
|
|
@@ -13,8 +13,12 @@ button.urlrow:hover{background:var(--panel2)}
|
|
|
13
13
|
.urlhost{font:11.5px ui-monospace,Menlo,monospace;color:var(--dim);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
|
|
14
14
|
.urlenv{flex:none;width:34px;text-align:center;font:10px ui-monospace,Menlo,monospace;letter-spacing:.04em;border:1px solid var(--line);border-radius:3px;color:var(--dim);line-height:16px}
|
|
15
15
|
.urlenv.prod{color:var(--warn);border-color:var(--warn)}
|
|
16
|
+
/* a third party's site: not ours, so a dashed edge */
|
|
17
|
+
.urlenv.ext{border-style:dashed}
|
|
16
18
|
.pdot.none{visibility:hidden}
|
|
17
19
|
.urlbar{flex:none;display:flex;align-items:center;gap:var(--s2);flex-wrap:wrap;padding:var(--s2) var(--s4);border-bottom:1px solid var(--line);background:var(--bg-top);font-size:12.5px}
|
|
20
|
+
button.urlname{padding:0;border:0;border-radius:0;background:none;color:inherit;font:inherit;font-weight:700;cursor:pointer}
|
|
21
|
+
button.urlname:hover{text-decoration:underline}
|
|
18
22
|
.urllogin{display:inline-flex;align-items:center;gap:var(--s1);margin-left:var(--s2)}
|
|
19
23
|
button.urlchip{display:inline-flex;align-items:center;gap:var(--s1);min-height:26px;padding:0 var(--s2);font:12px ui-monospace,Menlo,monospace;cursor:pointer}
|
|
20
24
|
button.urlchip svg{width:13px;height:13px;flex:none}
|
|
@@ -23,6 +27,28 @@ a.urlout{color:var(--accent);font-size:12px;white-space:nowrap}
|
|
|
23
27
|
.urlfail{flex:none;color:var(--red);font-size:12.5px;padding:var(--s2) var(--s4)}
|
|
24
28
|
.urlnote{flex:1;display:flex;flex-direction:column;align-items:flex-start;gap:var(--s2);padding:var(--s4);color:var(--dim);font-size:13px}
|
|
25
29
|
iframe.urlframe{flex:1;min-height:0;width:100%;border:0;display:block}
|
|
30
|
+
|
|
31
|
+
/* the forms of the urls section of the main panel (url-forms.tsx): a url to add or change under the head's « + »,
|
|
32
|
+
a login or a removal in a row's flyout. A label over its field, the answer's line, the buttons at the right */
|
|
33
|
+
.mpform{width:300px;max-width:min(300px,92vw);padding:var(--s2) var(--s3) var(--s3);font:12px/1.4 system-ui,sans-serif}
|
|
34
|
+
.urlform{display:flex;flex-direction:column;gap:var(--s2);margin-top:var(--s2)}
|
|
35
|
+
.mpform .urlform{margin-top:0}
|
|
36
|
+
.urlfield{display:flex;flex-direction:column;gap:var(--s0);color:var(--dim);font-size:11px}
|
|
37
|
+
.urlfield input{height:26px;padding:0 var(--s2);border:1px solid var(--line);border-radius:4px;background:var(--bg);color:var(--ink);font:12.5px system-ui,sans-serif}
|
|
38
|
+
.urlfield input[name=url]{font:12px ui-monospace,Menlo,monospace}
|
|
39
|
+
.urlfield input:focus{outline:none;border-color:var(--accent)}
|
|
40
|
+
.urlenvs{display:inline-flex;gap:var(--s1)}
|
|
41
|
+
button.urlenv{width:auto;padding:0 var(--s2);line-height:20px;cursor:pointer;background:none}
|
|
42
|
+
button.urlenv.on{color:var(--ink);border-color:var(--ink)}
|
|
43
|
+
button.urlenv.prod.on{color:var(--warn);border-color:var(--warn)}
|
|
44
|
+
.urlsaid{color:var(--dim);font-size:11.5px}
|
|
45
|
+
.urlsaid.bad{color:var(--red)}
|
|
46
|
+
.urlbtns{display:flex;justify-content:flex-end;gap:var(--s2)}
|
|
47
|
+
button.danger{color:var(--red);border-color:var(--red)}
|
|
48
|
+
.urlstored{color:var(--ok);font-size:12px;overflow-wrap:anywhere}
|
|
49
|
+
.urlstored code{font:11.5px ui-monospace,Menlo,monospace;color:var(--ink)}
|
|
50
|
+
.urlform .urllogin{margin-left:0;flex-wrap:wrap}
|
|
51
|
+
.urlask{font-size:12px;color:var(--ink)}
|
|
26
52
|
@media (max-width:700px){
|
|
27
53
|
.urlhost{display:none}
|
|
28
54
|
button.urlrow{min-height:44px}
|
|
@@ -18,6 +18,7 @@ import { terminalReach } from './terminal-st.ts'
|
|
|
18
18
|
import { plainClick, repoPage, type HomeSt } from './home-st.ts'
|
|
19
19
|
import { type Col, Hint, Table } from './time-charts.tsx'
|
|
20
20
|
import { entryMark, factsOf, VAULT_ENTRIES, type VaultEntry, type VaultSt } from './vault-st.ts'
|
|
21
|
+
import { tip } from './tips.ts'
|
|
21
22
|
|
|
22
23
|
const clock = (at: number): string => new Date(at).toTimeString().slice(0, 5)
|
|
23
24
|
|
|
@@ -121,8 +122,8 @@ const RevealCell = ({ r }: { r: SecretRow }) => {
|
|
|
121
122
|
)
|
|
122
123
|
return (
|
|
123
124
|
<span className="vtreveal">
|
|
124
|
-
<button type="button" className="ghost" disabled={busy}
|
|
125
|
-
{err !== '' ? <span className="vt-danger"
|
|
125
|
+
<button type="button" className="ghost" disabled={busy} {...tip("read its value now and show it here for 30 s: never written to a log, a thread or this browser's storage")} onClick={() => void show()}>show</button>
|
|
126
|
+
{err !== '' ? <span className="vt-danger" {...tip(err)}>✗ {err.length > 60 ? `${err.slice(0, 59)}…` : err}</span> : null}
|
|
126
127
|
</span>
|
|
127
128
|
)
|
|
128
129
|
}
|
|
@@ -147,7 +148,7 @@ const Secrets = observer(({ app, st }: { app: HomeSt; st: VaultSt }) => {
|
|
|
147
148
|
cells: [
|
|
148
149
|
<NameCell r={r} />,
|
|
149
150
|
<span className={`vth vt-${h.tone}`}>{h.text}</span>,
|
|
150
|
-
<span
|
|
151
|
+
<span {...tip(writtenWords(r, d.at))}>{writtenShort(r, d.at)}</span>,
|
|
151
152
|
r.chips == null || r.chips.length === 0 ? r.who : <ReaderChips who={{ long: r.who, chips: r.chips }} lead="who reads it" />,
|
|
152
153
|
r.ask == null ? '' : <Hint tip={r.ask.title}><In href={askHref(r.ask.repo, r.ask.id)} go={() => app.openItem(r.ask!.repo, 'asks', `ask:${r.ask!.id}`)}>{askWords(r.ask)}</In></Hint>,
|
|
153
154
|
<RevealCell key={r.name} r={r} />,
|
|
@@ -195,7 +196,7 @@ export const VaultView = observer(({ app }: { app: HomeSt }) => {
|
|
|
195
196
|
</div>
|
|
196
197
|
{st.error !== '' ? <div className="hnote mcerr">{st.error}</div> : null}
|
|
197
198
|
{d == null ? null : (
|
|
198
|
-
<EntryCols narrow={narrow} bar={<EntryBar label="the vault's entries" entries={VAULT_ENTRIES} current={st.entry} open={(e) => st.open(e as VaultEntry)} mark={(e) => entryMark(factsOf(d, e as VaultEntry))} tabs={narrow} />}>
|
|
199
|
+
<EntryCols narrow={narrow} fold={{ layout: app.layout, id: 'vault' }} bar={<EntryBar label="the vault's entries" entries={VAULT_ENTRIES} current={st.entry} open={(e) => st.open(e as VaultEntry)} mark={(e) => entryMark(factsOf(d, e as VaultEntry))} tabs={narrow} />}>
|
|
199
200
|
<Dangers app={app} st={st} />
|
|
200
201
|
{st.entry === 'passwords' ? <Secrets app={app} st={st} /> : <Facts app={app} st={st} e={st.entry} />}
|
|
201
202
|
</EntryCols>
|