refactor(cloud): kill containers feature, merge into agents UI#7886
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The /dashboard/containers route was a parallel CRUD UI for user-deployed Docker workloads. In practice zero containers ever ran (31 rows in prod, all failed/stopped) — the feature never shipped. Meanwhile the real running compute is the eliza agent sandboxes under /dashboard/agents, which were importing components from containers/_components/. Changes: - Move 13 eliza-* + agent-actions + agent-cost-badge + docker-logs-viewer components from dashboard/containers/_components/ to dashboard/agents/_components/ (git mv, history preserved) - Delete 9 user-facing /api/v1/containers/* routes + 7 frontend pages / components / hooks. Admin + cron routes that still operate on the containers table stay (ops infra). - Redirect /dashboard/containers* → /dashboard/agents* via React Router Navigate (DashboardRedirect now substitutes :id params) - Drop the containers.* cloud capability entries from the registry and the list_containers / get_container_health MCP tools — the surfaces no longer exist - Remove dead generateContainerMetadata SEO helper and /api/v1/containers from the mobile-client URL map - Update internal links: sidebar, my-agents, agents-section, app-monetization-settings, agent-card, ui/cloud-dashboard-components, onboarding-chat reply text - Update e2e route specs to expect redirects instead of renders - Mark the containers DB table as LEGACY in the schema comment (table + rows kept for history; admin infra dashboard still reads it)
…ners to useAgents After killing /dashboard/containers, the home dashboard's "Instances running" StatCard was still importing useContainers from the deleted lib/data/containers module. Repoint it at useAgents (which already returns running eliza sandbox counts under the same UI meaning) and target /dashboard/agents.
d51257e to
3642373
Compare
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
Biome wanted these one-liners after /dashboard/containers/agents/... was replaced with the shorter /dashboard/agents/... — print-width no longer forced multi-line.
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
Drive-by fix unblocking the lint-and-types CI check on PR #7886. The file referenced `ApiError` at line 48 but never imported it, causing TS2304 on every PR build. Pre-existing issue from a recent develop merge — not introduced by the kill-containers refactor, but blocks this PR from merging.
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
Summary
The
/dashboard/containersroute was a parallel CRUD UI for user-deployed Docker workloads. In practice zero containers ever ran in prod (31 rows, allfailedorstopped) — the feature never shipped. Meanwhile the actual running compute lives under/dashboard/agents(eliza sandboxes), which was importing components fromcontainers/_components/. Two UIs for the same data, one ghost feature, dead routes that 500.This collapses them into a single
/dashboard/agentssurface.What changes
Frontend
eliza-*+agent-actions+agent-cost-badge+docker-logs-viewercomponents fromdashboard/containers/_components/todashboard/agents/_components/(git mv preserves history)dashboard/containers/Page.tsx,[id]/Page.tsx,agents/[id]/Page.tsx(dead duplicate ofagents/[id]/Page.tsx), and 5 container-only componentslib/data/containers.ts(only used by the deleted pages)/dashboard/containers*to/dashboard/agents*via React Router.DashboardRedirectnow substitutes:idparams so deep links still workui/cloud-dashboard-components, onboarding-chat replyBackend
/api/v1/containers/*routes (route.ts,[id]/*,quota,credentials,[id]/metrics,[id]/health,[id]/logs,[id]/logs/stream,[id]/deployments)/api/v1/admin/infrastructure/containers/*,/api/v1/admin/containers/ingress-map) and cron routes that operate on the containers table stay (ops infra)_container-control-plane-forward.tshelper stays (still used by admin + cron + provisioning daemon)Surfaces / metadata
containers.manageandcontainers.quotafromcloud-capabilities/registry.tslist_containers/get_container_healthfrom MCP info routedashboard.containersURL frommobile-clientmapgenerateContainerMetadataSEO helpercontainersDB table as LEGACY in the schema doc comment (rows kept for history; admin infra dashboard still reads them)Tests
cloud-routes.spec.ts: containers paths moved fromrenderstodashboardRedirectslistroute-coverage.spec.ts: containers overrides removedonboarding-chat.test.ts: expected reply text + URL fixtures point to/dashboard/agents/...Out of scope
Left untouched in this PR:
feature-flags.tscontainersentry +env-validator.ts"Container Deployments" label (diagnostic / metadata, harmless)db/schemas/containers.ts,db/repositories/containers.ts,lib/services/containers.ts/container-quota.ts/container-billing-policy.ts(still consumed by admin + cron + provisioning-worker + container-control-plane)cloud-services/container-control-plane/(separate service)Test plan
/dashboard/containerson a preview, observe redirect to/dashboard/agents/dashboard/containers/<id>, observe redirect to/dashboard/agents/<id>/dashboard/containers/agents/<id>, observe redirect to/dashboard/agents/<id>/dashboard/agentslist renders + create dialog opens/dashboard/agents/<id>detail page renders, tabs (logs, backups, wallet, transactions, policies) all workgh run watchoncloud-cf-deploy.yml(auto-trigger on push to develop)Greptile Summary
This PR removes the defunct
/dashboard/containersfeature surface (user-deployed Docker workloads that never launched in production) and collapses it into the existing/dashboard/agentsUI. All 9 user-facing/api/v1/containers/*backend routes are deleted, and frontend container routes are replaced with React Router redirects to their agents equivalents. The 13 sharedeliza-*components are moved viagit mvfromcontainers/_components/toagents/_components/without modification, preserving git history.DashboardRedirectnow resolves:paramplaceholders usinguseParams()so deep links like/dashboard/containers/:idcorrectly land on/dashboard/agents/:id; all internal links and the sidebar updated.containers.manageandcontainers.quotacapabilities dropped from the registry;generateContainerMetadataSEO helper deleted; schema comment marks thecontainerstable as LEGACY.Confidence Score: 5/5
Safe to merge. The deletion of never-shipped dead routes with proper redirects, moved components with unchanged content, and consistent link updates across the codebase is low-risk.
The change is a well-scoped cleanup: all internal links are updated, React Router v6 handles the redirect specificity correctly, the moved components carry no stale container API calls, and the onboarding test fixtures are updated to match. The only finding is three local/opt-in audit test files that still list containers routes — they won't produce CI failures and the routes still resolve via redirect.
aesthetic-audit.spec.ts, cross-page-hover-audit.spec.ts, and live-auth-dashboard.spec.ts still list /dashboard/containers entries that should be removed or replaced.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD subgraph "Old routes (deleted)" CR["/dashboard/containers"] --> CP["ContainersPage"] CID["/dashboard/containers/:id"] --> CDP["ContainerDetailPage"] CAG["/dashboard/containers/agents/:id"] --> CAGP["ContainerAgentDetailPage"] end subgraph "New routes (redirects)" CR2["/dashboard/containers"] -->|DashboardRedirect| AR["/dashboard/agents"] CID2["/dashboard/containers/:id"] -->|DashboardRedirect :id| AID["/dashboard/agents/:id"] CAG2["/dashboard/containers/agents/:id"] -->|DashboardRedirect :id| AID end subgraph "Target surfaces" AR --> AgentsPage["agents/Page.tsx"] AID --> AgentDetail["agents/[id]/Page.tsx"] end subgraph "Moved components (git mv)" OC["containers/_components/eliza-* (13 files)"] -->|moved to| NC["agents/_components/eliza-* (13 files)"] endReviews (4): Last reviewed commit: "fix(cloud-frontend): import ApiError in ..." | Re-trigger Greptile