You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Content: KPI cards mix page-scoped stats with the brand-wide total #662
Since server-side pagination (#610), opportunities holds at most one page (PAGE_SIZE = 100). Three KPI cards — High Impact, Avg. Score, Sent — are still computed by filtering/averaging that loaded page, while the Total card next to them shows the server-side count of all matching rows. On a brand with more than 100 opportunities the row reads e.g. "Total 340 · High Impact 12 · Avg. Score 61" where the last two describe only the first 100 rows — and they silently change when the user pages. Users read these as brand-wide metrics.
Fix (pick one — the first is the good-first-issue version)
Label version: add "on this page" subtext to the three page-scoped cards so their scope is explicit, and keep Total as-is.
Data version (larger): extend the list endpoint to return aggregate counts (high-impact count, avg score, sent count) for the whole filtered set and bind the cards to those.
Acceptance criteria
KPI numbers can no longer be misread as brand-wide when they aren't: either correctly scoped labels (option 1) or truly brand-wide values (option 2).
Paging no longer silently changes unlabeled metrics.
@BharadwajKanneveti assigned — thanks! Either fix option from the issue works: the label version is the quick win, but given your track record, the data version (server-side aggregates for the whole filtered set) would be the more valuable close if you're up for it. Your call.
Activity
BharadwajKanneveti commentedon Aug 8, 2026
@gkhngyk I will work on this issue
gkhngyk commentedon Aug 8, 2026
@BharadwajKanneveti assigned — thanks! Either fix option from the issue works: the label version is the quick win, but given your track record, the data version (server-side aggregates for the whole filtered set) would be the more valuable close if you're up for it. Your call.