chore(dev): remove Electric and Caddy from the dev stack

Merged
SA
3mo ago
+27-1005

Summary

Electric sync was replaced with plain tRPC + React Query in #6328, but the dev stack kept all the Electric/Caddy machinery. The teardown script's leftover docker ps -a probe (no timeout) hangs when Docker Desktop is wedged, which made every workspace delete stall to the 60s teardown cap and throw the "Teardown timed out" dialog — the undeletable-workspaces report that started this branch.

This removes Electric and Caddy end to end from the dev stack:

  • .superset/ setup/teardown: drop the Electric container start/stop and replication-cleanup steps, the caddy/docker dependency checks, all ELECTRIC_* env writes, Caddyfile generation, and the electric-proxy .dev.vars. Retired port offsets (+9/+10/+12) stay unassigned so surviving offsets don't shift under existing allocations.
  • apps/electric-proxy: deleted, along with its deploy-electric-proxy production CI job. The already-deployed Cloudflare worker intentionally stays up until pre-1.21 clients drain (forced-update notice re-armed 2026-08-19 is draining them); decommissioning the worker + deleting the NEXT_PUBLIC_ELECTRIC_URL GitHub secret is a later, dashboard-side step.
  • docker-compose.yml: remove the electric service and the logical-replication postgres flags it required.
  • package.json / turbo.jsonc: drop dev:caddy and the electric-proxy dev filter.
  • Desktop: remove NEXT_PUBLIC_ELECTRIC_URL / ELECTRIC_PORT env plumbing (schemas, vite defines, CSP entry) and the dead clearElectricCache tRPC router (no callers).
  • Docs: DEVELOPMENT.md no longer asks contributors to install Caddy.

Test plan

  • bash -n on all eight touched shell scripts
  • bun run typecheck — 37/37 tasks green
  • bun run lint:fix — clean
  • bunx sherif — no workspace issues after removing the electric-proxy package
  • Fresh ./.superset/setup.local.sh in a new worktree brings up pg/neon-proxy/redis/srh without Electric

https://claude.ai/code/session_01Law6XbGYUMMgimvXm6WLHT


Summary by cubic

Removes Electric SQL and Caddy from the dev stack to stop Docker hangs that caused workspace teardown timeouts. Before: setup/teardown started Electric and Caddy and probed Docker; after: dev runs without Electric/Caddy (tRPC + React Query only) and teardown no longer touches Docker.

  • .superset setup/teardown: removed Electric container start/stop, replication cleanup, caddy/docker checks, ELECTRIC_* env writes, and Caddyfile generation; retired port offsets +9/+10/+12 without reassignment; updated ports.json.

  • Deleted apps/electric-proxy and its production deploy job; GitHub workflows no longer reference NEXT_PUBLIC_ELECTRIC_URL (the deployed worker stays up for legacy clients).

  • docker-compose.yml: removed the electric service and Postgres logical-replication flags.

  • Desktop: dropped Electric env plumbing and the CSP entry; removed the dead clearElectricCache tRPC router.

  • Tooling: removed dev:caddy and electric-proxy filters from package.json/turbo.jsonc; updated scripts/check-dev-ports.ts.

  • Docs: DEVELOPMENT.md no longer requires Caddy; Caddyfile.example removed.

  • Developers: re-run ./.superset/setup.local.sh in each worktree to refresh .env and ports.json.

  • Stop any local Caddy process and delete Caddyfile; do not use dev:caddy.

  • Ops: keep the deployed Electric proxy worker for pre-1.21 clients; decommission it and remove the NEXT_PUBLIC_ELECTRIC_URL secret in a later infra change.

Summary by CodeRabbit

  • Removed Components

    • Removed the Electric SQL synchronization service and local proxy.
    • Removed Caddy-based local HTTPS proxying and related configuration.
  • Development Experience

    • Simplified local setup, teardown, Docker Compose services, environment files, and port management.
    • Development commands now start only the remaining application services.
  • Deployment

    • Updated production deployment configuration to support required integration credentials.
  • Documentation

    • Updated development instructions to reflect the streamlined setup without Electric or Caddy.