Skip to content

feat: suppress LlmNudgeBanner for users with active native analysis #254

Description

@melagiri

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.

Activity

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

    featureNew functionality

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions