Skip to content

fix(insights): move the raw results count out of the page header (reads as a page-wide cap) #190

Closed

Description

@gkhngyk

Summary

On the Answer Engine Insights page (/dashboard/insights), the page header
subtitle shows a results count:

{brand.name} · Last run: {lastCheckedLabel} · {N} results

This count is the size of the raw "Prompt Results" list (capped at ~1000
rows fetched newest-first). Because it sits in the page header — directly above
the KPI cards, the visibility trend, and the Brand vs Competitors leaderboard —
it reads as a page-wide figure and gives the false impression that those
top-level metrics are computed from at most ~1000 results.

They are not: the KPI cards, the leaderboard, and Share of Voice all come from
server-side aggregate RPCs (insights_aggregates, competitor_aggregates,
share_of_voice_aggregates) that aggregate over the entire dataset with no
row cap. Only the raw results list (and the CSV export built from it) is bounded.

So the count is both mis-scoped (it describes the list, not the page) and
misleading (it implies a cap that the headline metrics don't actually have).

Suggested fix

Move the results count out of the page header and into the header row of the
"Prompt Results by Topic" card, where it correctly describes the list it
refers to. That card header already uses a justify-between layout with a slot
on the right (currently used for the "Showing X of Y rows" note), so the count
fits there naturally.

Keep it a pure relocation of the existing count; no change to how the number is
computed is required for this issue.

Activity

  1. added
    enhancement
    good first issue
    on Jun 8, 2026
  2. added a commit that references this issue on Jun 12, 2026
    d1ae7de
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