Skip to content

Schedule deletion of the legacy/compatibility surface (drain-once-then-delete) #1337

@aivong-openhands

Description

@aivong-openhands

Follow-up from the Critical Carl review (CRITICAL_CARL_REVIEW.md, PR #1334).

Suggestion

Schedule deletion of the legacy / compatibility surface that currently has no removal plan.

Why this matters

There are ~83 legacy / deprecated / obsolete / backward-compat references across src. Several carry dead concepts forward indefinitely, and AGENTS.md documents them but nothing schedules their removal:

  • BUNDLED_BACKEND_ID = "default-local" — the "bundled backend" concept was removed, but the name/special id persists through the backend registry.
  • src/api/backend-registry/storage.ts:11 LEGACY_AGENT_SERVER_CONFIG_STORAGE_KEY plus readLegacyBackend / clearLegacyBackendConfig migration paths.
  • src/api/settings-service/legacy-app-preferences-migration.ts — an entire module draining two retired localStorage keys on every first getSettings().
  • src/routes/mcp-settings.tsx + mcp-settings-redirect.tsx — a compatibility route/redirect for the old /settings/mcp location.
  • services.vite accepted as a legacy alias for services.frontend in the runtime-services renderer.

Every shim is a permanent tax: contributors must remember that default-local means "the seeded backend", that /settings/mcp is really /mcp, and that two localStorage keys still need draining. This is the direct analog of the upstream "remove the remaining built-in connector compatibility surface" cleanup.

Suggested scope

  • Give each migration a drain-once-then-delete expiry. legacy-app-preferences-migration.ts and readLegacyBackend are prime deletion candidates after one release.
  • Rename BUNDLED_BACKEND_ID to what it is now (a seeded default) instead of carrying the old word.
  • Remove the /settings/mcp redirect and the services.vite alias once internal callers are migrated.
  • Add or update tests to match the post-removal behavior; update the AGENTS.md notes that currently document these shims.

Duplicate check

I searched the open agent-canvas issue set for "legacy migration cleanup" and "compatibility surface" and did not find an equivalent open issue.

Related context


This issue was created by an AI agent (OpenHands) on behalf of the user.

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions