Repository navigation
Closed
Labels
Description
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:
handleAnalyzeNewalready computespromptsWithoutVolume= active prompts with noprompt_volumesrow, 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
quotais tracked (quota.remaining/quota.limit), with aquotaExhaustedflag.
Proposed
- Compute
unanalyzedCount= active prompts without aprompt_volumesrow (the existingpromptsWithoutVolumelogic, 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 (reusehandleAnalyzeNew, which already targetspromptsWithoutVolumefirst). - 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:checkfromweb/pass.
Activity
feat(prompts): banner for unanalyzed keywords with one-click Analyze (#…