Repository navigation
feat(topics): switch the Topics overview to prompt-level Visibility Rate - #499
Merged
Merged
Conversation
Part of #493. The leaderboard's Visibility (30d) column, the Best performer / Biggest gap / Top mover KPI cards, sorting and the CSV export now use the #490 rate (distinct prompts the brand appeared in ÷ distinct prompts with results, same appeared rule as Insights) instead of the raw score average that read near zero for most brands. The 7d change is the rate difference in points, the sparkline tracks the daily visible-answer share, the cell tooltip shows appeared-in X of Y prompts, and the export gains visible_prompts / active_prompts columns. The topic detail page still reads from the Insights primitives and remains #493 scope.
This was referenced Jul 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Part of #493 — the Topics page must read on the same scale as the Insights headline. The overview's "Visibility (30d)" column previously averaged raw visibility scores across all results, which reads near zero for most brands (every answer without an appearance contributes 0). It now shows the #490 Visibility Rate: distinct prompts the brand appeared in ÷ distinct prompts that produced results, same "appeared" rule (≥1 mention or citation) and 30d window as Insights.
avg_visibility_score→visibility_rate, plus newvisible_prompts/active_promptscolumns.Verified against production data: rates now spread meaningfully (e.g. 88.2% / 23.5% / 18.2% across topics) instead of clustering near zero.
The topic detail page reads from the Insights primitives via a separate action and still shows the score — that remains open under #493 (this PR does not close it).
Related issue
Part of #493
Type of change
feat— New featureHow to test
/dashboard/topicsfor a brand with tracking history.± N ptsvalue when a topic has results in both 7d windows; the trend column's delta also reads in pts.visibility_rate,visible_prompts,active_promptscolumns are present and consistent with the table.Checklist
feature/,fix/,chore/,docs/) — see CONTRIBUTING.mdyarn lintpasses (run fromweb/)yarn typecheckpasses (run fromweb/)yarn format:checkpasses (run fromweb/)