Skip to content

Remove dead webview layer (src/core/webview) still imported across the codebase #246

Description

@sydneyrenee

Per CHAT_MIGRATION_PLAN.md and src/ux/README.md, the webview/React UI is being retired in favor of native VS Code APIs. extension.ts now activates ux/ (Chat Participant + TreeView) and TaskManager; it never instantiates TheaProvider or registers a webview view provider.

But src/core/webview/ (TheaProvider, webviewMessageHandler, TheaApiManager, etc.) is still imported by ~15 files (TheaTask, services/mcp/*, WorkspaceTracker, activate/registerCommands, telemetry, …), dragging dead dependencies and obscuring the real dependency graph. webviewMessageHandler is also the only non-test consumer of ModelRegistry (see the orphaned-subsystem issue).

Scope

  • Delete src/core/webview/ (TheaProvider, webviewMessageHandler, getHtmlContent/CSP, TheaApiManager, …) once references are migrated.
  • Replace the TheaProvider-typed dependencies threaded through the codebase (see the TheaTask ↔ provider-shim issue) with a minimal native interface.
  • Remove getNonce/getUri and webview CSP helpers if unused after.

Acceptance

  • grep -rn TheaProvider src --include=*.ts returns only intentional references (ideally none).
  • Build + npm run test:unit green.

Metadata

Metadata

Assignees

No one assigned

    Labels

    architectureArchitecture / wiring / structural concernstech-debtCleanup, dead code, migration debt

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions