Skip to content

refactor(cloud): kill containers feature, merge into agents UI#7886

Merged
lalalune merged 5 commits into
developfrom
feat/kill-containers-feature
May 22, 2026
Merged

refactor(cloud): kill containers feature, merge into agents UI#7886
lalalune merged 5 commits into
developfrom
feat/kill-containers-feature

Conversation

@standujar
Copy link
Copy Markdown
Collaborator

@standujar standujar commented May 21, 2026

Summary

The /dashboard/containers route was a parallel CRUD UI for user-deployed Docker workloads. In practice zero containers ever ran in prod (31 rows, all failed or stopped) — the feature never shipped. Meanwhile the actual running compute lives under /dashboard/agents (eliza sandboxes), which was importing components from containers/_components/. Two UIs for the same data, one ghost feature, dead routes that 500.

This collapses them into a single /dashboard/agents surface.

What changes

Frontend

  • Move 13 eliza-* + agent-actions + agent-cost-badge + docker-logs-viewer components from dashboard/containers/_components/ to dashboard/agents/_components/ (git mv preserves history)
  • Delete dashboard/containers/Page.tsx, [id]/Page.tsx, agents/[id]/Page.tsx (dead duplicate of agents/[id]/Page.tsx), and 5 container-only components
  • Delete lib/data/containers.ts (only used by the deleted pages)
  • Redirect /dashboard/containers* to /dashboard/agents* via React Router. DashboardRedirect now substitutes :id params so deep links still work
  • Update internal links: sidebar, my-agents, agents-section, app-monetization-settings, agent-card, ui/cloud-dashboard-components, onboarding-chat reply

Backend

  • Delete 9 user-facing /api/v1/containers/* routes (route.ts, [id]/*, quota, credentials, [id]/metrics, [id]/health, [id]/logs, [id]/logs/stream, [id]/deployments)
  • Admin (/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.ts helper stays (still used by admin + cron + provisioning daemon)

Surfaces / metadata

  • Drop containers.manage and containers.quota from cloud-capabilities/registry.ts
  • Drop list_containers / get_container_health from MCP info route
  • Drop dashboard.containers URL from mobile-client map
  • Remove dead generateContainerMetadata SEO helper
  • Mark containers DB table as LEGACY in the schema doc comment (rows kept for history; admin infra dashboard still reads them)

Tests

  • E2E cloud-routes.spec.ts: containers paths moved from renders to dashboardRedirects list
  • E2E route-coverage.spec.ts: containers overrides removed
  • onboarding-chat.test.ts: expected reply text + URL fixtures point to /dashboard/agents/...

Out of scope

Left untouched in this PR:

  • feature-flags.ts containers entry + 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

  • Typecheck: cloud-frontend, cloud-api, cloud-shared (only pre-existing core/shared noise remains; PR adds no new errors)
  • Hit /dashboard/containers on a preview, observe redirect to /dashboard/agents
  • Hit /dashboard/containers/<id>, observe redirect to /dashboard/agents/<id>
  • Hit /dashboard/containers/agents/<id>, observe redirect to /dashboard/agents/<id>
  • /dashboard/agents list renders + create dialog opens
  • /dashboard/agents/<id> detail page renders, tabs (logs, backups, wallet, transactions, policies) all work
  • Sidebar no longer shows "Containers" nav item
  • gh run watch on cloud-cf-deploy.yml (auto-trigger on push to develop)

Greptile Summary

This PR removes the defunct /dashboard/containers feature surface (user-deployed Docker workloads that never launched in production) and collapses it into the existing /dashboard/agents UI. 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 shared eliza-* components are moved via git mv from containers/_components/ to agents/_components/ without modification, preserving git history.

  • Frontend: Dead container pages deleted; DashboardRedirect now resolves :param placeholders using useParams() so deep links like /dashboard/containers/:id correctly land on /dashboard/agents/:id; all internal links and the sidebar updated.
  • Backend: 9 user-facing container routes unregistered from the generated router; admin/cron/provisioning-daemon routes and the control-plane helper remain untouched.
  • Shared: containers.manage and containers.quota capabilities dropped from the registry; generateContainerMetadata SEO helper deleted; schema comment marks the containers table 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

Filename Overview
packages/cloud-frontend/src/App.tsx Container lazy-loaded pages removed; DashboardRedirect extended with useParams() to resolve :param placeholders in redirect templates; three container routes replaced with redirect elements. Route ordering (containers/agents/:id before containers/:id) is handled correctly by React Router v6 specificity rules.
packages/cloud-frontend/src/dashboard/Page.tsx Stat card switches from useContainers() to useAgents(); running-instances filter changed from status "running"
packages/cloud-frontend/tests/e2e/cloud-routes.spec.ts Container paths correctly moved from the renders list to dashboardRedirects, with regex assertions that verify deep-link param substitution works end-to-end.
packages/cloud-frontend/tests/e2e/aesthetic-audit.spec.ts Still contains three /dashboard/containers entries (not updated in this PR). Because the route now redirects, the screenshots captured for these entries will show the agents UI under containers-labelled slugs.
packages/cloud-api/src/_router.generated.ts Nine /api/v1/containers/* routes cleanly unregistered; route count updated from 568 to 559. Admin/cron routes untouched.
packages/cloud-shared/src/lib/cloud-capabilities/registry.ts containers.manage and containers.quota capabilities removed; remaining capabilities and the registry structure are unchanged.
packages/cloud-shared/src/lib/services/eliza-app/onboarding-chat.ts controlPanelUrl() updated from /dashboard/containers/agents/:id to /dashboard/agents/:id; matching test fixtures updated consistently.
packages/cloud-shared/src/db/schemas/agent-sandboxes.ts containers table doc comment updated to LEGACY; implementation detail bullets removed; table rows and admin read path preserved as stated.

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)"]
    end
Loading

Reviews (4): Last reviewed commit: "fix(cloud-frontend): import ApiError in ..." | Re-trigger Greptile

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 21, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 24253d99-dab1-46a2-97ea-6446052458df

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/kill-containers-feature

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Comment thread packages/cloud-frontend/src/App.tsx
standujar added 2 commits May 21, 2026 22:32
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.
@standujar standujar force-pushed the feat/kill-containers-feature branch from d51257e to 3642373 Compare May 21, 2026 22:01
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented May 21, 2026

Claude encountered an error —— View job


I'll analyze this and get back to you.

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented May 21, 2026

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
Copy link
Copy Markdown
Contributor

claude Bot commented May 21, 2026

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
Copy link
Copy Markdown
Contributor

claude Bot commented May 21, 2026

Claude encountered an error —— View job


I'll analyze this and get back to you.

@lalalune lalalune merged commit 2ef6138 into develop May 22, 2026
31 of 40 checks passed
@lalalune lalalune deleted the feat/kill-containers-feature branch May 22, 2026 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants