Skip to content

Centralize the duplicated model display-name maps #435

Closed

Description

@gkhngyk

Problem

The map that turns raw model slugs (claude-sonnet-5, gpt-5-chat-latest, …) into display names is copy-pasted across four dashboard pages:

There's also a MODEL_TO_PROVIDER map in web/src/lib/actions/tracking.ts. When we recently added a new model slug, we had to touch every copy — a missed one means inconsistent labels.

Proposal

Move the maps next to the existing canonical map in web/src/config/platform-labels.ts (which already carries some model slugs) — e.g. one provider-level map (insights/citations/prompt-detail use "Claude") and one model-level map (competitors uses "Claude Sonnet 5"). Import from there everywhere; delete the local copies.

Careful: the four copies are not byte-identical — preserve each page's current rendered labels exactly (this is a refactor, not a copy change).

Acceptance criteria

  • One source of truth for model display names; no local MODEL_DISPLAY_NAME copies remain.
  • Every page renders exactly the same labels as before.
  • npx tsc --noEmit, npx eslint src and npm test pass in web/.

Good first issue: no behavior change, all locations are listed above, and npm run dev + the seed data (supabase/seed.sql) are enough to verify.

Activity

  1. added
    enhancement
    good first issue
    on Jul 15, 2026
  2. added a commit that references this issue on Jul 22, 2026
    8f2a12e
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

    enhancementgood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions