Skip to content

Duplicate platform label map in tracking.ts has drifted from config/platform-labels.ts #552

Closed

Description

@gkhngyk

Problem

web/src/lib/actions/tracking.ts defines a private BREAKDOWN_PLATFORM_LABELS map whose doc comment says it is "Kept in sync with the mapping in insights/page.tsx" — but it has drifted from the canonical map in web/src/config/platform-labels.ts:

Slug tracking.ts config/platform-labels.ts
google-ai-overviews Google AI Overview Google AI
copilot Copilot Copilot (but copilot-web → Microsoft Copilot in both — same product, two names in one UI)

There's also drift within the config file itself: PLATFORM_LABELS has gemini-web → Google Gemini while MODEL_PROVIDER_LABELS has gemini-web → Gemini.

The result: the same platform is rendered with different names depending on which page/narrative produced the string.

Fix

  1. Delete the local BREAKDOWN_PLATFORM_LABELS map in tracking.ts and import the canonical map from @/config/platform-labels (extend the canonical map with any slugs it's missing, e.g. the google-aio/google-aimode aliases).
  2. Where the two maps disagree, prefer the longer, disambiguated label (Google AI Overview, Microsoft Copilot, Google Gemini) and update the canonical map accordingly so every surface renders the same name.

Acceptance

  • One label map, imported everywhere; no local copies with "kept in sync" comments.
  • The same platform slug renders identically across Insights narratives and the rest of the dashboard.

Activity

  1. added
    bug
    good first issue
    on Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buggood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions