Skip to content

feat(prompts): banner for unanalyzed keywords with one-click Analyze (All Prompts) #290

Closed

Description

@gkhngyk

What

On the All Prompts view (/dashboard/prompts?tab=all), keywords that haven't had their search-volume analysis run show blank Volume and Competition columns. There's no explanation on screen, so users don't know the columns are empty because the keyword simply hasn't been analyzed yet.

Add a contextual banner/card that appears when there are unanalyzed keywords, e.g. "7 keywords haven't been analyzed yet — Analyze", with a one-click action to analyze just those.

Why

  • The blank Volume/Competition cells read like missing/broken data rather than "not analyzed yet."
  • The trigger already exists but is a generic "Re-analyze Keywords" button in the header — not discoverable and not contextual to how many are pending.
  • Surfacing the count + a focused CTA turns a confusing empty state into a clear next step.

Current state (already in place)

In prompts/page.tsx:

  • handleAnalyzeNew already computes promptsWithoutVolume = active prompts with no prompt_volumes row, and analyzes them (falling back to all active prompts when none are missing).
  • Volume/Competition render via VolumePill / CompetitionBars; absent data → blank.
  • A monthly volume quota is tracked (quota.remaining / quota.limit), with a quotaExhausted flag.

Proposed

  • Compute unanalyzedCount = active prompts without a prompt_volumes row (the existing promptsWithoutVolume logic, lifted so it can drive the UI).
  • When unanalyzedCount > 0, render a dismissible banner/card above the table: "{n} keyword{s} haven't been analyzed yet" + an Analyze button that runs volume analysis for just those prompts (reuse handleAnalyzeNew, which already targets promptsWithoutVolume first).
  • Hide the banner when unanalyzedCount === 0.
  • Respect the volume quota: when quotaExhausted, disable the action and show a "monthly limit reached — upgrade" hint instead (consistent with the existing quota messaging).

Acceptance

  • With ≥1 active prompt lacking volume data, a banner shows the correct count and an Analyze CTA on /dashboard/prompts?tab=all.
  • Clicking Analyze runs volume analysis for the unanalyzed prompts and the banner disappears once they're done.
  • No banner when every active prompt already has volume data.
  • When the volume quota is exhausted, the CTA is disabled with a clear upgrade/limit message.
  • yarn lint / typecheck / format:check from web/ pass.

Activity

  1. added
    enhancement
    good first issue
    on Jun 22, 2026
  2. added a commit that references this issue on Jun 23, 2026
    25704d8
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

    enhancementgood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions