Symptom
The Home page "Potential Monthly Savings" KPI shows $0 while the Opportunities page shows $212 – $314 for the same dataset (same Provider/Account filters, "All / All").
Screenshots: Home reads Potential Monthly Savings: $0 (23 recommendations). Opportunities reads Potential Monthly Savings: $212 – $314 (Total Recommendations 6).
Why it's a bug
These two views must reflect the same underlying recommendation aggregate. Either:
- The Home KPI is hitting a different endpoint (or path within the same endpoint) that returns 0, or
- The Home KPI is aggregating the wrong field (e.g.
current_savings instead of potential_savings, or only "approved" recs instead of all active recs).
Note the recommendation count on Home is 23 -- which matches the variant count on Opportunities. So Home is reading the recs but failing to sum the savings.
Likely root cause hypothesis
frontend/src/dashboard.ts computes the Home KPIs from a separate API call (/api/dashboard or /api/home/kpis -- find the actual endpoint). The handler probably sums a field that is null/zero for all current recommendations. Inspect:
- The handler's SELECT to confirm which column it sums.
- The recommendation rows in the DB: do they have a
potential_monthly_savings value (or equivalent)?
- The Opportunities page handler's SELECT, which clearly does produce the correct
$212 – $314 range.
If both pages should aggregate the same dataset, the cleanest fix is to make the Home KPI handler call the same aggregation path as Opportunities (factor out a shared aggregator).
Files likely involved
frontend/src/dashboard.ts (Home KPI rendering)
internal/api/handler_home.go or handler_dashboard.go (KPI aggregator)
- Compare with
internal/api/handler_opportunities.go or equivalent
Verification
After fix:
- Home
Potential Monthly Savings matches Opportunities Potential Monthly Savings for All/All, then again with a Provider filter, then with an Account filter.
- The recommendation count on both pages also matches (depends on linked issue resolution).
Source
QA exploratory testing, 2026-05-27.
Symptom
The Home page "Potential Monthly Savings" KPI shows $0 while the Opportunities page shows $212 – $314 for the same dataset (same Provider/Account filters, "All / All").
Screenshots: Home reads
Potential Monthly Savings: $0 (23 recommendations). Opportunities readsPotential Monthly Savings: $212 – $314 (Total Recommendations 6).Why it's a bug
These two views must reflect the same underlying recommendation aggregate. Either:
current_savingsinstead ofpotential_savings, or only "approved" recs instead of all active recs).Note the recommendation count on Home is
23-- which matches the variant count on Opportunities. So Home is reading the recs but failing to sum the savings.Likely root cause hypothesis
frontend/src/dashboard.tscomputes the Home KPIs from a separate API call (/api/dashboardor/api/home/kpis-- find the actual endpoint). The handler probably sums a field that is null/zero for all current recommendations. Inspect:potential_monthly_savingsvalue (or equivalent)?$212 – $314range.If both pages should aggregate the same dataset, the cleanest fix is to make the Home KPI handler call the same aggregation path as Opportunities (factor out a shared aggregator).
Files likely involved
frontend/src/dashboard.ts(Home KPI rendering)internal/api/handler_home.goorhandler_dashboard.go(KPI aggregator)internal/api/handler_opportunities.goor equivalentVerification
After fix:
Potential Monthly Savingsmatches OpportunitiesPotential Monthly Savingsfor All/All, then again with a Provider filter, then with an Account filter.Source
QA exploratory testing, 2026-05-27.