Skip to content

Move Competitors out of the sidebar behind a Head-to-Head link on the Insights leaderboard #504

Closed

Description

@gkhngyk

Problem

Competitors sits as a top-level sidebar item, but its story actually starts on the Insights page: the AI Visibility Leaderboard ranks the brand against its rivals, and the natural next question — "how do I compare head-to-head with this competitor?" — is answered on the Competitors page. There is no contextual bridge between the two, while the sidebar keeps growing.

Decision: remove the sidebar entry and make the leaderboard the entry point.

Design

1. Head-to-Head link on the leaderboard

In web/src/app/[locale]/(dashboard)/dashboard/insights/page.tsx, the Leaderboard card header (search for the Leaderboard CardTitle) gets a link on its right side:

  • Text: "Head-to-Head Comparison", with a small ArrowRight icon — same visual language as the other teaser links on the page.
  • Target: /dashboard/competitors, using Link from @/i18n/navigation (locale-aware).
  • Layout: title left, link right (flex items-center justify-between in the header), muted style that becomes foreground on hover.

2. Sidebar removal

3. What must keep working

  • The /dashboard/competitors route stays — it is still the competitor management surface (add/remove) and the head-to-head report. Only the nav entry goes away.
  • The page's plan gate stays as-is: a user on a plan without competitor_tracking who follows the link lands on the existing upgrade screen. Do not hide the link behind the plan feature — the link is now the page's main discovery path, including its upsell.
  • The link renders whenever the Leaderboard card renders (including while data is refetching).

Acceptance criteria

  • Competitors no longer appears in the desktop sidebar or the mobile nav; no orphaned references to the removed item remain.
  • The Leaderboard card header shows "Head-to-Head Comparison" on the right; clicking it navigates to /dashboard/competitors with the locale preserved.
  • /dashboard/competitors still loads directly by URL, including its plan-gate and empty states.
  • yarn lint, yarn typecheck and yarn format:check pass from web/.

Getting started

See CONTRIBUTING.md for setup. npm run dev with the seed data (supabase/seed.sql) is enough to verify. Comment here to claim the issue before opening a PR.

Activity

  1. added
    enhancement
    good first issue
    help wanted
    on Jul 22, 2026
  2. abdullah91111 commented on Jul 22, 2026

    @abdullah91111
    Contributor

    im on it

  3. abdullah91111 commented on Jul 22, 2026

    @abdullah91111
    Contributor

    #506

    please review

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 issuehelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions