Skip to content

[ENHANCEMENT] Migrate extension-side provider comparisons to canonical identifiers #958

Description

@WebMad

Problem (one or two sentences)

Extension-side production code still compares provider names using raw string literals, including provider-specific branches under src/core. These comparisons duplicate the canonical definitions and make provider migrations harder to complete safely.

Context (who is affected and when)

This affects maintainers working on extension state, configuration, profile handling, authentication, and webview message processing. Missing one comparison during a provider change may leave only a particular extension workflow inconsistent.

This is part of the provider identifier centralization tracked by #944 and depends on the foundational registry introduced by #951.

Desired behavior (conceptual, not technical)

Internal extension logic should use canonical provider identifiers for provider comparisons and branches. Existing extension workflows, persisted settings, messages, and provider-specific behavior should remain unchanged.

Constraints / preferences (optional)

Keep serialized values, external message payloads, fixtures, translations, documentation, and separate code-index provider identifiers as literals where appropriate. This issue should cover extension-side production logic, not webview UI code.

Request checklist

  • I've searched existing Issues and Discussions for duplicates
  • This describes a specific problem with clear context and impact

Zoo Code Task Links (optional)

Parent tracking issue: #944

Foundational identifier registry: #951

Acceptance criteria (optional)

  • Appropriate extension-side provider comparisons and branches reference canonical identifiers.
  • Persisted settings and extension-webview message values remain unchanged.
  • Intentional external or serialized literals are not replaced unnecessarily.
  • Code-index provider names that are not API provider identifiers are not migrated accidentally.
  • Focused tests cover representative migrated extension workflows.
  • Existing extension tests continue to pass.

Relevant code locations

Proposed approach (optional)

Identify provider comparisons in extension production code and replace internal API-provider comparisons with canonical registry values. Keep the scope separate from webview UI migration and preserve all runtime behavior.

Trade-offs / risks (optional)

A broad mechanical replacement could incorrectly change serialized or external values or conflate API providers with code-index providers. Each occurrence should be classified before migration, and the PR may be split further if the resulting scope is too large.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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