Repository navigation
Description
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
ArrowRighticon — same visual language as the other teaser links on the page. - Target:
/dashboard/competitors, usingLinkfrom@/i18n/navigation(locale-aware). - Layout: title left, link right (
flex items-center justify-betweenin the header), muted style that becomes foreground on hover.
2. Sidebar removal
- Remove the
Competitorsitem from theAnalyticssection inweb/src/config/dashboard.ts(single source both navs render from). - Remove the now-dead
Competitorslabel mapping inweb/src/components/layout/sidebar.tsxandweb/src/components/layout/mobile-nav.tsx.
3. What must keep working
- The
/dashboard/competitorsroute 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_trackingwho 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/competitorswith the locale preserved. /dashboard/competitorsstill loads directly by URL, including its plan-gate and empty states.yarn lint,yarn typecheckandyarn format:checkpass fromweb/.
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
abdullah91111 commentedon Jul 22, 2026
im on it
abdullah91111 commentedon Jul 22, 2026
#506
please review