Context
Surfaced during code review of PR #253 (Phase 12 dashboard + docs).
Problem
LlmNudgeBanner is gated on llmConfig?.provider being falsy. A user who has installed the Claude Code hook (code-insights install-hook) and has sessions being natively analyzed via claude-code-native will still see the nudge banner — because they have no API provider configured.
With the PR #253 changes, the banner now shows the hook CTA as primary (which is actually helpful for users who haven't installed the hook yet). But for users who HAVE already installed the hook, the banner is misleading — it suggests they need to do something they've already done.
Proposed Solution
Detect whether the user has active native analysis by checking if any recent sessions have claude-code-native usage rows. If so, suppress the banner entirely (analysis is working, no nudge needed).
Options:
- Option A: Add
GET /api/config/hook-status that checks ~/.claude/settings.json for SessionEnd hook presence. Suppress banner if true.
- Option B: Check if any sessions in the last 7 days have
provider = 'claude-code-native' in analysis_usage. Suppress banner if count > 0.
- Option C: Combine both — hook installed OR recent native analysis = suppress.
Option B is the most reliable signal (proves analysis actually ran, not just that hook is installed).
Priority
Should Have — not urgent, banner behavior is a strict improvement over pre-PR #253 state. Ship after Phase 12 launch.
Size
S — single hook + API query change, no schema changes.
Context
Surfaced during code review of PR #253 (Phase 12 dashboard + docs).
Problem
LlmNudgeBanneris gated onllmConfig?.providerbeing falsy. A user who has installed the Claude Code hook (code-insights install-hook) and has sessions being natively analyzed viaclaude-code-nativewill still see the nudge banner — because they have no API provider configured.With the PR #253 changes, the banner now shows the hook CTA as primary (which is actually helpful for users who haven't installed the hook yet). But for users who HAVE already installed the hook, the banner is misleading — it suggests they need to do something they've already done.
Proposed Solution
Detect whether the user has active native analysis by checking if any recent sessions have
claude-code-nativeusage rows. If so, suppress the banner entirely (analysis is working, no nudge needed).Options:
GET /api/config/hook-statusthat checks~/.claude/settings.jsonfor SessionEnd hook presence. Suppress banner if true.provider = 'claude-code-native'inanalysis_usage. Suppress banner if count > 0.Option B is the most reliable signal (proves analysis actually ran, not just that hook is installed).
Priority
Should Have — not urgent, banner behavior is a strict improvement over pre-PR #253 state. Ship after Phase 12 launch.
Size
S — single hook + API query change, no schema changes.