Skip to content

fix(prompts): "unanalyzed" banner + button say "keywords" but count prompts #381

Closed

Description

@gkhngyk

Problem

On the Prompts page → All Prompts tab (/dashboard/prompts?tab=all), the amber "unanalyzed" banner and its action button both say keywords, but the number they show is a count of prompts, not keywords. E.g. it reads "32 keywords haven't been analyzed yet" and the button says "Analyze 32 keywords" — those are 32 prompts with no volume row yet.

Root cause (from the code)

In web/src/app/[locale]/(dashboard)/dashboard/prompts/page.tsx, unanalyzedCount counts active prompts that don't have a volume row yet:

const unanalyzedCount = useMemo(
  () => allPrompts.filter((p) => p.isActive && !volumeByPromptId.has(p.id)).length,
  [allPrompts, volumeByPromptId],
);

But the banner renders the noun as "keyword":

  • Banner text: {unanalyzedCount} keyword{unanalyzedCount === 1 ? '' : 's'} haven't been analyzed yet
  • Button label: Analyze {unanalyzedCount} keyword{unanalyzedCount === 1 ? '' : 's'}

Proposed change

Change the noun from keyword → prompt in both spots so the label matches what's being counted:

  • {unanalyzedCount} prompt{unanalyzedCount === 1 ? '' : 's'} haven't been analyzed yet
  • Analyze {unanalyzedCount} prompt{unanalyzedCount === 1 ? '' : 's'}

(Optional: the code comment just above — "Drives the 'unanalyzed keywords' banner" — can be updated to "prompts" too for consistency.)

How to test

  1. On a brand with active prompts that have no volume row yet, open /dashboard/prompts?tab=all.
  2. The amber banner reads "N prompts haven't been analyzed yet" and the button reads "Analyze N prompts" (singular "prompt" when N === 1).
  3. The count and behavior are unchanged — copy only.

Notes

  • Copy-only change, no logic touched. Good first issue.

Activity

  1. added
    bug
    good first issue
    on Jul 9, 2026
  2. Sam-syntax35 commented on Jul 9, 2026

    @Sam-syntax35
    Contributor

    hey @gkhngyk !plz assign this to me

  3. Sam-syntax35 commented on Jul 9, 2026

    @Sam-syntax35
    Contributor

    Hi @gkhngyk, could you please assign these issues to me? I've already started working on them, and assigning them will help avoid duplicate PRs. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

buggood first issue

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions