From ec7973600b93083804fdd3d51d091d2a34fbf8a1 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Thu, 11 Jun 2026 20:22:04 -0700 Subject: [PATCH] feat: redesign fleet command center --- CHANGELOG.md | 9 +- README.md | 21 +- cmd/crabfleet/main.go | 4 +- docs/_layouts/default.html | 6 +- docs/admin.md | 2 +- docs/api.md | 2 +- docs/index.md | 2 +- docs/quickstart.md | 4 +- docs/spec-v2.md | 26 +- docs/spec.md | 8 +- package.json | 2 +- pnpm-lock.yaml | 146 ++---- scripts/ensure-cloudflare-domains.mjs | 19 +- scripts/generate-assets.mjs | 2 +- src/app.html | 636 +++++++++++++++++--------- src/app/components.jsx | 50 ++ src/app/fleet.jsx | 367 +++++++++++++++ src/app/main.jsx | 384 ++-------------- src/app/terminal.js | 12 +- src/app/utils.js | 67 ++- src/canonical-host.ts | 74 +++ src/index.ts | 29 +- tests/app-utils.test.ts | 23 + tests/canonical-host.test.ts | 56 +++ tests/fleet-state.test.ts | 4 +- tests/oauth.test.ts | 10 +- wrangler.jsonc | 12 +- 27 files changed, 1216 insertions(+), 761 deletions(-) create mode 100644 src/app/components.jsx create mode 100644 src/app/fleet.jsx create mode 100644 src/canonical-host.ts create mode 100644 tests/canonical-host.test.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a3c2cd..28d5c31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,9 +3,11 @@ ## Unreleased - Add Crabfleet session supervision metadata, owner/session tree listing, transcript retrieval, PTY messaging, and summary updates for Codex-spawned Codex sessions. -- Fix GitHub OAuth login after the canonical host move by honoring an explicit registered callback URL. +- Redesign Fleet as an operational command view with real readiness data, compact connection paths, clearer operator groups, and denser session cards. +- De-duplicate interactive lifecycle, status, terminal-ready, log URL, icon, and copy-command behavior across the app. +- Fix GitHub OAuth login after the canonical host move by honoring the registered `crabfleet.openclaw.ai` callback URL. - Add the Crabfleet v2 fleet-control spec, redacted fleet registry API, and dashboard summary for visible Codex crabboxes. -- Move the OpenClaw app/API canonical URL to `clawfleet.openclaw.ai`, keep legacy app hosts redirecting there, and reserve `clawfleet.ai` for the product page. +- Make `crabfleet.openclaw.ai` the OpenClaw app/API canonical URL, redirect old OpenClaw aliases there, and keep `crabfleet.ai` independent as the public product site. - Route the built-in interactive provision hook in-process and default new sessions to Cloudflare Sandbox so production creates usable Codex terminals without a crabbox adapter. - Keep Cloudflare Sandbox model and GitHub credentials in the Worker path, add DO-backed sandbox credential/checkpoint state, and add CLI lifecycle commands for doctor/status/stop/checkpoint/restore. - Show failed and expired Codex sessions as stable log replays instead of remounting Ghostty terminals. @@ -15,8 +17,7 @@ - Split Fleet and Board into separate app pages, with Fleet as the default grouped view of every visible crabbox by person. - Tighten the login SSH command width for `crabd.sh` and tuck bootstrap-token login behind a recovery disclosure. - Redesign the Crabfleet logo and favicon around a single fleet node-grid mark, and serve a real 1200×630 social card instead of stretching the 96px logo. -- Serve the app/API on `crabfleet.ai` and redirect the old `crabfleet.ai` host. -- Route `crabfleet.ai` to the Crabbox Worker and move SSH onboarding defaults to `crabd.sh`, with deploy-time domain enforcement. +- Move SSH onboarding defaults to `crabd.sh`, with deploy-time domain enforcement. ## 0.1.0 - 2026-05-24 diff --git a/README.md b/README.md index 03ede8b..5798b77 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ **Mission control for Agent runs.** -Crabfleet gives OpenClaw maintainers a fleet dashboard where every Codex crabbox is visible by operator, repo, terminal, and WebVNC state. The OpenClaw app/API canonical URL is `https://clawfleet.openclaw.ai`; `https://clawfleet.ai` is reserved for the public product page. +Crabfleet gives OpenClaw maintainers a fleet dashboard where every Codex crabbox is visible by operator, repo, terminal, and WebVNC state. The OpenClaw app/API canonical URL is `https://crabfleet.openclaw.ai`; `https://crabfleet.ai` is the public product site. ## What It Does @@ -125,7 +125,7 @@ merge: ### Prerequisites - Cloudflare account -- `clawfleet.openclaw.ai` route in Cloudflare; legacy app hosts redirect here +- `crabfleet.openclaw.ai` route in Cloudflare; legacy OpenClaw app hosts redirect here - GitHub OAuth app (optional but recommended) - Bootstrap token secret @@ -134,10 +134,11 @@ merge: Pushes to `main` run `.github/workflows/deploy-worker.yml`, which checks, tests, builds, applies remote D1 migrations, and deploys the Worker. Configure the repository secret `CLOUDFLARE_API_TOKEN` with permissions for Workers deploys and D1 migrations. -`clawfleet.openclaw.ai` and `crabd.sh` DNS/route convergence is handled by -`scripts/ensure-cloudflare-domains.mjs`; set `CLOUDFLARE_DNS_API_TOKEN` when CI should -manage those records. Without that DNS-scoped token, CI skips domain convergence and -deploys to the already configured route. +`crabfleet.ai` product routing, `crabfleet.openclaw.ai`, and `crabd.sh` DNS/route +convergence is handled by `scripts/ensure-cloudflare-domains.mjs`; set +`CLOUDFLARE_DNS_API_TOKEN` when CI should manage those records. Without that +DNS-scoped token, CI skips domain convergence. The app Worker still proxies the generic +product site for `crabfleet.ai` as a defensive fallback, never the authenticated app. Manual deploy is still available: @@ -188,10 +189,10 @@ The Crabbox namespace cutover intentionally has no old-name compatibility. Exist ### Verify Deployment ```bash -curl -I https://clawfleet.openclaw.ai/healthz +curl -I https://crabfleet.openclaw.ai/healthz # Should return: 200 OK -curl https://clawfleet.openclaw.ai/docs/spec +curl https://crabfleet.openclaw.ai/docs/spec # Should return: HTML spec document ``` @@ -241,7 +242,7 @@ The Worker exposes an internal SSH onboarding API guarded by `CRABFLEET_SSH_GATE Run the Go gateway next to a host that can accept raw SSH: ```bash -CRABFLEET_API_URL=https://clawfleet.openclaw.ai \ +CRABFLEET_API_URL=https://crabfleet.openclaw.ai \ CRABFLEET_SSH_GATEWAY_TOKEN=... \ CRABFLEET_SSH_HOST_KEY=/var/lib/crabfleet/ssh_host_ed25519_key \ CRABFLEET_SSH_ADDR=:2222 \ @@ -287,7 +288,7 @@ The release workflow builds macOS, Linux, and Windows archives, then updates `op OpenClaw can create repo-ready crabboxes for Discord-triggered work through the internal service endpoint: ```bash -curl -fsS https://clawfleet.openclaw.ai/api/openclaw/crabboxes \ +curl -fsS https://crabfleet.openclaw.ai/api/openclaw/crabboxes \ -H "authorization: Bearer $CRABBOX_OPENCLAW_TOKEN" \ -H "content-type: application/json" \ -d '{"owner":"@steipete","repo":"openclaw/crabfleet","prompt":"prep the meeting follow-up"}' diff --git a/cmd/crabfleet/main.go b/cmd/crabfleet/main.go index 513ae05..340b5ba 100644 --- a/cmd/crabfleet/main.go +++ b/cmd/crabfleet/main.go @@ -20,13 +20,13 @@ import ( "github.com/coder/websocket" ) -const defaultAPIURL = "https://clawfleet.openclaw.ai" +const defaultAPIURL = "https://crabfleet.openclaw.ai" const defaultSSHHost = "crabd.sh" var version = "dev" type cli struct { - API string `help:"Crabfleet API URL." default:"https://clawfleet.openclaw.ai" env:"CRABFLEET_API_URL"` + API string `help:"Crabfleet API URL." default:"https://crabfleet.openclaw.ai" env:"CRABFLEET_API_URL"` SSHHost string `help:"Crabfleet SSH host." default:"crabd.sh" env:"CRABFLEET_SSH_HOST"` Token string `help:"Internal API token." env:"CRABFLEET_SSH_GATEWAY_TOKEN"` Fingerprint string `help:"Linked SSH key fingerprint." env:"CRABFLEET_SSH_FINGERPRINT"` diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html index c0f4d32..8673cfc 100644 --- a/docs/_layouts/default.html +++ b/docs/_layouts/default.html @@ -9,13 +9,13 @@ - + - +