Skip to content

feat(portal): add run detail pages#34

Draft
vincentkoc wants to merge 13 commits intomainfrom
feat/portal-run-detail
Draft

feat(portal): add run detail pages#34
vincentkoc wants to merge 13 commits intomainfrom
feat/portal-run-detail

Conversation

@vincentkoc
Copy link
Copy Markdown
Member

Summary

  • add /portal/runs/:id as a human run detail page with command metadata, result summary, event timeline, and retained log tail
  • keep /portal/runs/:id/logs and /portal/runs/:id/events as raw text/JSON endpoints
  • link recent run IDs from lease detail pages and update docs/changelog

Verification

  • npm run format:check --prefix worker
  • npm run lint --prefix worker
  • npm run check --prefix worker
  • npm test --prefix worker -- test/fleet.test.ts
  • npm test --prefix worker
  • npm run build --prefix worker
  • node scripts/build-docs-site.mjs

@vincentkoc
Copy link
Copy Markdown
Member Author

Deployed this branch to the live coordinator for browser review.

Preview link after login:
https://crabbox.openclaw.ai/portal/runs/run_c0bca46efa56

Deploy:

  • Worker version: 34236461-46d9-47b9-901e-8bacb6456473
  • Routes: crabbox.openclaw.ai/*, crabbox-access.openclaw.ai/*, workers.dev fallback

Live checks:

  • GET /v1/health -> 200 on crabbox.openclaw.ai
  • GET /v1/health -> 200 on workers.dev
  • GET /portal/runs/run_c0bca46efa56 with local auth -> 200 text/html; charset=utf-8
  • GET /portal/runs/run_c0bca46efa56/logs with local auth -> 200 text/plain; charset=utf-8
  • GET /portal/runs/run_c0bca46efa56/events with local auth -> 200 application/json; charset=utf-8
  • unauthenticated browser request redirects to /portal/login?returnTo=...

Wrangler tail during the probe showed outcome=ok, HTTP 200, and zero exceptions for /portal, run detail, logs, and events.

@vincentkoc
Copy link
Copy Markdown
Member Author

Updated and redeployed the branch with portal table controls.

Live review link after login:
https://crabbox.openclaw.ai/portal/runs/run_c0bca46efa56

What changed:

  • every portal <table> is now enhanced with search and pagination (leases, lease recent runs, run events)
  • run log tail now has a copy icon button
  • docs/changelog updated

Deploy:

  • Worker version: d1c7fc70-8322-49d7-91a1-6c4e65c99c22
  • Commit: 8ca88aebfe8f783bc64a47e19e74d1883b2fd7cb

Validation:

  • npm run format:check --prefix worker
  • npm run lint --prefix worker
  • npm run check --prefix worker
  • npm test --prefix worker -- test/fleet.test.ts
  • npm test --prefix worker
  • npm run build --prefix worker
  • node scripts/build-docs-site.mjs
  • CI: Go, Worker, Docs, Release Check all passing

Live probes:

  • GET /portal -> 200 and includes table controls
  • GET /portal/leases/cbx_3e69e0b25fb2 -> 200
  • GET /portal/runs/run_c0bca46efa56 -> 200 and includes table controls + log copy target
  • GET /portal/runs/run_c0bca46efa56/events -> 200
  • Wrangler tail during probes: zero exceptions, no 5xx outcomes

@vincentkoc
Copy link
Copy Markdown
Member Author

Updated and redeployed the branch with the /portal lease-history fix.

Live review:
https://crabbox.openclaw.ai/portal

What changed:

  • /portal now renders all visible owner-scoped leases instead of dropping non-active leases server-side
  • lease table has active / ended / all filters, plus existing search + pagination
  • default view is active when active leases exist, otherwise all leases so the page no longer looks empty
  • ended lease detail pages no longer show VNC/code/stop/run affordances as if the box is alive
  • docs/changelog updated

Deploy:

  • Worker version: ebcf0d38-63c4-4fc0-893f-4baf55c95435
  • Commit: 9dec84ab2863460e39e4af6084be864b16968ba1

Validation:

  • npm run format:check --prefix worker
  • npm run lint --prefix worker
  • npm run check --prefix worker
  • npm test --prefix worker -- test/fleet.test.ts
  • npm test --prefix worker
  • npm run build --prefix worker
  • node scripts/build-docs-site.mjs
  • CI: Go, Worker, Docs, Release Check all passing

Live probes:

  • GET /portal -> 200, includes active/ended/all filter controls, defaulted to all on the current live data, no no active leases empty state
  • GET /portal/runs/run_c0bca46efa56 -> 200, table controls + log copy still present
  • Wrangler tail during probes: zero exceptions, no 5xx outcomes

@vincentkoc
Copy link
Copy Markdown
Member Author

Polish pass is pushed and deployed.\n\nChanges:\n- added compact provider/target badges on portal lease, lease detail, run detail, and VNC pages\n- added filter chips for leases by state/provider/target, recent runs by state, and events by type/stream\n- tightened portal header spacing and made portal/VNC chrome sticky\n- updated coordinator docs and changelog\n\nVerification:\n- npm run format:check --prefix worker\n- npm run check --prefix worker\n- npm test --prefix worker -- test/fleet.test.ts\n- npm run lint --prefix worker\n- npm test --prefix worker\n- npm run build --prefix worker\n- node scripts/build-docs-site.mjs && git diff --check\n- deployed crabbox-coordinator version ba500773-e2c8-4bc7-a594-308885ca6156\n- live probes: /portal 200 and /portal/runs/run_c0bca46efa56 200 with provider icons, target icons, filter controls, sticky portal/VNC CSS present\n- Wrangler tail during probes: 854 lines, 0 exceptions, 0 non-ok outcomes\n- PR checks: Docs, Go, Release Check, Worker all pass\n

@vincentkoc
Copy link
Copy Markdown
Member Author

Data-grid polish is pushed and deployed.\n\nChanges:\n- converted portal/lease table surfaces into viewport-fitted shells so the lease table owns the scroll region instead of the page\n- wrapped enhanced tables in a .table-scroll container with sticky column headers\n- tightened row/header/button/search/filter density and added fixed column widths/ellipsis for DataTables-style scanning\n- kept run detail scrollable where logs/failures can legitimately exceed one viewport, but capped log/event panels so tables remain contained\n- updated coordinator docs and changelog\n\nVerification:\n- npm run format:check --prefix worker\n- npm run check --prefix worker\n- npm test --prefix worker -- test/fleet.test.ts\n- npm run lint --prefix worker\n- npm test --prefix worker\n- npm run build --prefix worker\n- node scripts/build-docs-site.mjs && git diff --check\n- deployed crabbox-coordinator version 8046a486-2216-4fb3-8ba7-87ca16d86203\n- live probes: /portal, one lease detail page, and /portal/runs/run_c0bca46efa56 all 200 with portal shell, table panel, table scroll wrapper, sticky headers, dense row CSS, fixed viewport CSS, and filters present\n- Wrangler tail during probes: 639 lines, 0 exceptions, 0 non-ok outcomes\n- PR checks: Docs, Go, Release Check, Worker all pass\n

@vincentkoc
Copy link
Copy Markdown
Member Author

Copy-local fix is pushed and deployed.\n\nFix:\n- command rows now render a copy icon button\n- button copies the sibling <code> command in the same row, so shell/run/WebVNC/code commands do not depend on generated ids\n- retained log-tail copy still uses the existing target selector path\n\nVerification:\n- npm run format:check --prefix worker\n- npm run check --prefix worker\n- npm test --prefix worker -- test/fleet.test.ts\n- npm run lint --prefix worker\n- npm test --prefix worker\n- npm run build --prefix worker\n- node scripts/build-docs-site.mjs && git diff --check\n- deployed crabbox-coordinator version 430b34b5-13b9-44e8-8443-7c5ff4685948\n- live run detail probe: 200 with command copy buttons, command copy handler, and log-tail copy present\n- no active lease was visible during live probe, so active lease command rows are covered by fleet tests\n- Wrangler tail during probes: 639 lines, 0 exceptions, 0 non-ok outcomes\n- PR checks: Docs, Go, Release Check, Worker all pass\n

@vincentkoc
Copy link
Copy Markdown
Member Author

Windows label polish is pushed and deployed.\n\nFix:\n- Windows normal target badges now render as win\n- Windows WSL2 target badges now render as win (wsl2)\n- filter/data target remains windows, so the existing Windows filter still works\n\nVerification:\n- npm run format:check --prefix worker\n- npm run check --prefix worker\n- npm test --prefix worker -- test/fleet.test.ts\n- npm run lint --prefix worker\n- npm test --prefix worker\n- npm run build --prefix worker\n- node scripts/build-docs-site.mjs && git diff --check\n- deployed crabbox-coordinator version d6618d10-892b-4a02-b9aa-d38dd6d0026f\n- live /portal probe: 200, has data-target=windows, has win, has win (wsl2), no windows / normal\n- Wrangler tail during probe: 213 lines, 0 exceptions, 0 non-ok outcomes\n- PR checks: Docs, Go, Release Check, Worker all pass\n

@vincentkoc
Copy link
Copy Markdown
Member Author

Access/time polish is pushed and deployed.\n\nChanges:\n- lease access column now uses icon-only capabilities: server always, VS Code and VNC when available on active leases\n- table time cells now render relative labels with ISO timestamps kept in title/datetime\n- sortable metadata is stored in data-sort so relative labels still sort by real time\n- table headers are now click/keyboard sortable with aria-sort updates\n- removed wide action buttons and Zulu timestamp cells from the grid surfaces\n\nVerification:\n- npm run format:check --prefix worker\n- npm run check --prefix worker\n- npm test --prefix worker -- test/fleet.test.ts\n- npm run lint --prefix worker\n- npm test --prefix worker\n- npm run build --prefix worker\n- node scripts/build-docs-site.mjs && git diff --check\n- deployed crabbox-coordinator version 664899dc-c2a6-4893-a6d1-c047fded00fb\n- live probes: /portal and /portal/runs/run_c0bca46efa56 200 with access icons, relative time labels, sortable headers, sort metadata, and no Zulu table cells\n- Wrangler tail during probes: 1280 lines, 0 exceptions, 0 non-ok outcomes\n- PR checks: Docs, Go, Release Check, Worker all pass\n

@vincentkoc
Copy link
Copy Markdown
Member Author

Latest portal runner-lease pass on feat/portal-run-detail:\n\n- Added admin/operator portal visibility for non-owned runner leases with mine / system filters, while normal browser sessions stay owner/org scoped.\n- Made portal lease detail, Code, and VNC drilldowns use the same admin-aware visibility as the table.\n- Live UX pass found and fixed crabbox webvnc --stop leaving the child bridge alive; stop now kills the daemon process group.\n\nVerification:\n- npm run format:check --prefix worker\n- npm run check --prefix worker\n- npm test --prefix worker -- fleet.test.ts\n- npm run lint --prefix worker\n- npm run docs:check\n- go test ./internal/cli -run 'TestStopDaemonProcessKillsProcessGroup|TestWebVNCDaemon'\n- go test ./internal/cli\n- Deployed Worker version ecda15da-e529-4d6c-9510-a0f303f1e29e to crabbox.openclaw.ai.\n- Live lease UX proof: warmed cbx_56df0a89efe1 / swift-shrimp with AWS Linux desktop+code bootstrap, confirmed VNC on loopback, code-server on loopback, Code bridge connects, WebVNC daemon connects, and webvnc --stop leaves no child bridge process.\n- Wrangler tail around live probes showed healthy outcomes: health 200, unauth portal redirect 302, GitHub-token whoami 200, no Worker exceptions.\n- PR checks are green: Docs, Go, Release Check, Worker.

@vincentkoc
Copy link
Copy Markdown
Member Author

Follow-up for the Code bridge unloaded state:\n\n- Replaced the bare Code error card with the same full-height waiting shell style as VNC.\n- Added bridge status polling via /code/health, a status pill, reload button, and copyable bridge command.\n- The page now auto-reloads into the proxied workspace once the local Code bridge connects.\n- Checked recent local run/bridge logs for cbx_56df0a89efe1; no backend errors. Cleaned up a leftover local SSH tunnel from manual bridge testing.\n\nVerification:\n- npm run format:check --prefix worker\n- npm run check --prefix worker\n- npm test --prefix worker -- fleet.test.ts\n- npm run lint --prefix worker\n- npm run docs:check\n- Deployed Worker version 1de96c1f-761b-49a8-a5f9-f7752da1086c.\n- Live authenticated fetch confirmed the deployed Code page includes code-wait-page, code-status, code-copy, /code/health, and auto-reload wiring.\n- Live /code/health flips false -> true while crabbox code --id cbx_56df0a89efe1 is running, then false again after stopping.\n- Wrangler tail for health/Code probes showed 200s and no Worker exceptions.\n- PR checks green: Go, Worker, Docs, Release Check.

@vincentkoc vincentkoc force-pushed the feat/portal-run-detail branch from 9e8c4a0 to 7b699f4 Compare May 6, 2026 05:17
@vincentkoc
Copy link
Copy Markdown
Member Author

vincentkoc commented May 6, 2026

Telemetry slice landed on this draft.

What changed:

  • coordinator heartbeats now accept and store a sanitized latest telemetry snapshot on the lease
  • CLI heartbeats collect best-effort Linux load/memory/root-disk/uptime over SSH
  • crabbox status --json, human status, and portal lease detail pages render the latest snapshot
  • docs/changelog updated

Verification:

  • go test ./internal/cli
  • npm run format:check --prefix worker
  • npm run lint --prefix worker
  • npm run check --prefix worker
  • npm test --prefix worker -- fleet.test.ts
  • npm run build --prefix worker
  • deployed Worker version 3600c53c-2aa6-4047-91ec-cf4368156e48
  • live lease cbx_56df0a89efe1 / swift-shrimp stores telemetry after heartbeat: load 0.00, mem 1.3GiB/61.4GiB, disk 4.1GiB/386.4GiB, uptime ~1h12m
  • Wrangler tail for the live status request showed status 200 and no exceptions

Left cbx_56df0a89efe1 running for reuse.

@vincentkoc
Copy link
Copy Markdown
Member Author

Run telemetry summary slice is now on this draft.

What changed:

  • finished runs can store sanitized start/end Linux telemetry snapshots
  • crabbox history human output now appends compact resources= when run telemetry exists
  • run history/log JSON includes the run telemetry summary
  • portal recent-runs tables gained a compact box resource column
  • portal run detail pages render box load/memory/disk plus memory/disk deltas
  • docs/changelog updated

Verification:

  • go test ./internal/cli
  • npm run format:check --prefix worker
  • npm run lint --prefix worker
  • npm run check --prefix worker
  • npm test --prefix worker -- fleet.test.ts
  • npm run build --prefix worker
  • deployed Worker version cd3faf4d-3151-4059-bfd3-88a7211a31a7
  • live proof run run_6a408d88a29f on kept lease cbx_a92849940bff / coral-crab succeeded and stored start/end telemetry
  • crabbox history --limit 2 showed resources=load=0.63 mem=2% disk=1% mem_delta=-35.0MiB
  • Wrangler tail for live run/log/status reads showed status 200 and no exceptions

Notes:

  • old proof lease cbx_56df0a89efe1 / swift-shrimp had expired before this slice, so I created and kept cbx_a92849940bff / coral-crab for reuse.
  • removed the temporary 8 MiB proof file from the kept box after collecting the run summary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant