Skip to content

Insights: remove dead PlatformChart and CompetitorChart components (~180 lines) #589

Closed

Description

@gkhngyk

Problem

_charts.tsx on the Insights page exports two components that are never rendered anywhere in the app: PlatformChart and CompetitorChart. A repo-wide search finds only their definitions. They keep ~180 lines alive, including helpers used exclusively by them.

Evidence

  • _charts.tsx#L279 — export function PlatformChart (no references outside this file)
  • _charts.tsx#L608 — export function CompetitorChart (no references outside this file)
  • Helpers only they consume, removable with them: BarList, PieTooltip, CompetitorTooltip, BRAND_COLORS, PLATFORM_COLORS, DEFAULT_PLATFORM_DATA

What to keep

Other exports in the same file are live and must not be removed — e.g. TrendChart (imported by the reports detail page) and ShareOfVoicePlatformChart (used by Insights and the topic detail page). Note the similar names: ShareOfVoicePlatformChart stays, PlatformChart goes.

Suggested fix

Delete the two dead components and their now-orphaned helpers/constants, then confirm npx tsc --noEmit and the existing tests pass and the Insights, Reports, and Topic detail pages still render their charts.

Acceptance criteria

  • PlatformChart, CompetitorChart, and their exclusive helpers are removed.
  • No behavior change on any page; typecheck and tests pass.

Activity

  1. added
    good first issue
    on Aug 3, 2026
  2. BharadwajKanneveti commented on Aug 3, 2026

    @BharadwajKanneveti
    Contributor

    Hi @gkhngyk Can I work on this issue?

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

    good first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions