Repository navigation
Description
Problem
The brand cards at /dashboard/brands (web/src/components/dashboard/brand-card.tsx) carry more weight than they earn at the brand-list level:
- Hero gradient cover with a radial-gradient overlay
- 7-day visibility hero box with sparkline + delta
- 3-stat strip (Prompts / Mentions / Visits)
- "View Insights" CTA
All four are useful, just not here. The Insights page is one click away and is the right home for performance data. The brand list should be a navigation surface, not a mini-dashboard — one user explicitly called the current density "crowded".
Proposed change
Strip the card to a navigation menu. Three pieces, vertically stacked:
┌──────────────────────────────────┐
│ [LOGO] Acme Coffee │
│ 🌐 acme-coffee.example │
│ ─────────────────────────────── │
│ 🏷 Topics › │
│ 💬 Prompts › │
│ ⚙ Settings › │
└──────────────────────────────────┘
Concretely
- Remove: the entire gradient header (
<div className={cn('relative h-28 …', gradient)}>), the visibility hero box, the 3-stat strip, the sparkline + delta block, theView InsightsCTA, theStatusPill, theSparklinecomponent, theGRADIENTSarray +pickGradienthelper. - Keep: avatar / logo + initials fallback, brand name, primary domain row, active-card highlight (
ring-2 ring-primarywhenbrand.id === activeBrandId). - Replace the dropdown: the current
MoreHorizontaldropdown with three menu items collapses into three full-width inline link rows at the bottom of the card. Each row is a<Link>with icon + label + a trailing›chevron. Hover styles match the dashboard sidebar's nav items so the affordance reads as navigation. - Click target: each row navigates to its destination via the existing
handleSelectAndGo(sets the active brand in the store, then routes). Three destinations:/dashboard/brands/<id>/topics,/dashboard/brands/<id>/prompts,/dashboard/brands/<id>/settings. - Icons:
Tagfor Topics,MessageSquareTextfor Prompts,Settingsfor Settings — already imported in this file.
Data layer
getBrandsCardSummary is no longer called from the brand-card itself. Leave the action in place for now (other places may consume it), but the summary prop on BrandCard becomes unused and can be removed from the component signature. The brands page can stop fetching summaries entirely if BrandCard is the only caller — quick grep to confirm before deleting.
Sizing
Card height should drop ~50%. Grid layout in _brands-client.tsx stays as-is; the smaller card just makes it denser.
Acceptance criteria
- Cards render only avatar, name, domain, three nav rows
- Each nav row navigates to its destination AND sets the brand as active in the store
- Active brand still shows the
ring-2 ring-primaryoutline - No more colored cover / sparkline / 3-stat strip / View Insights button visible
-
pnpm tsc --noEmit+yarn lintclean - If the
summaryprop becomes truly unused, drop it fromBrandCardPropsand stop callinggetBrandsCardSummaryon the brands page
Out of scope
- The brand detail pages (
/dashboard/brands/<id>/...) — only the list card changes - The brand switcher in the sidebar — it has its own component (
brand-switcher.tsx) - Removing the
getBrandsCardSummaryaction itself — leave it if anywhere else still uses it - Animations on hover beyond the existing border / shadow transitions
Activity
ux(brands): slim brand list card to nav-menu shape (#154) (#156)