You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Sidebar: show a "Set up" badge on the Agent item while the API key isn't configured #456
The Agent sits in the sidebar's top group, but on cloud it only works after an admin saves the org's Anthropic API key in Settings. Until then, clicking it lands on the "Add your Anthropic API key" CTA — from internal feedback, the item reads as a broken/dead entry rather than a feature awaiting one-time setup.
Moving the item to another group was considered and rejected: the agent's toolset spans the whole product (visibility summaries, trends, competitor SoV, citations, prompts — not just optimization), so its placement is right; what's missing is a signal that setup is pending.
Fix
Show a small "Set up" badge on the Agent nav item while the org has no Anthropic key configured (cloud only — self-host uses an env key and doesn't need this).
Pointers:
NavItem already supports a badge?: string field (web/src/config/dashboard.ts) and the sidebar renders it (web/src/components/layout/sidebar.tsx) — but that config is static; this badge is conditional, so it needs a dynamic override where the sidebar maps items (e.g. if (item.href === '/dashboard/agent' && agentKeyMissing) badge = 'Set up').
Key status is already exposed by GET /api/settings/anthropic-key (returns { configured }) — the same probe the agent page's cloud wrapper uses (web/src/app/[locale]/(dashboard)/dashboard/agent/page.tsx, see CloudAgentGate). Probe once per session (e.g. in the sidebar with a module-level cache, or alongside an existing provider) — do not re-fetch on every navigation.
Gate on cloud with process.env.NEXT_PUBLIC_IS_CLOUD === 'true', mirroring the agent page.
Cloud org without a saved Anthropic key: the Agent sidebar item shows a "Set up" badge; clicking still lands on the existing Settings CTA.
After the key is saved, the badge disappears (on next load is fine — no realtime requirement).
Self-host: no badge, no new network calls.
No layout shift for other nav items; collapsed-sidebar mode stays intact.
Getting started
See CONTRIBUTING.md for setup. From web/, yarn lint, yarn typecheck and yarn format:check must pass. Comment here to claim the issue before opening a PR.
Activity
feat(#456): show Set up badge on Agent nav item when Anthropic key is…