Problem
The dashboard shows numbers and labels that do not match the backend data closely enough.
One concrete bug is in dashboard/src/pages/Overview/index.jsx:74: it reads mismatchStats?.total_7d, while internal/adminapi/mismatches.go:75 returns last_7_days. That card will show 0 even when the API has data.
There are also labels that overstate what the code measures. False signals caught is based on a simple webhook/final-state contradiction query. Gateway degraded in dashboard/src/pages/Overview/index.jsx:80 is inferred from exhausted merchant deliveries or rejected webhooks. Those are useful signals, but they do not prove the gateway is degraded.
Scope
- Fix the mismatch stats field name used by the overview page.
- Rename dashboard labels so they describe the underlying query exactly.
- Replace
False signals caught with a label tied to the mismatch query, for example Webhook contradictions.
- Replace
Gateway degraded with a local system or action banner based on the actual condition, such as callback delivery failures or webhook rejection rate.
- Remove unsupported gateways from mock data in
dashboard/src/lib/mockData.js:23 unless those gateways are backed by real adapters.
- Make every overview card traceable to one backend query or one documented frontend calculation.
Acceptance criteria
- The mismatch count card uses
last_7_days and shows nonzero values when the API returns them.
- Overview labels do not claim gateway outage or false-signal prevention unless the backend query proves that exact condition.
- Mock transaction gateways are PayU-only until other gateway adapters exist.
- Dashboard tests or component-level checks cover the mismatch stats mapping.
- Admin API query tests still cover the mismatch count endpoint.
Problem
The dashboard shows numbers and labels that do not match the backend data closely enough.
One concrete bug is in
dashboard/src/pages/Overview/index.jsx:74: it readsmismatchStats?.total_7d, whileinternal/adminapi/mismatches.go:75returnslast_7_days. That card will show0even when the API has data.There are also labels that overstate what the code measures.
False signals caughtis based on a simple webhook/final-state contradiction query.Gateway degradedindashboard/src/pages/Overview/index.jsx:80is inferred from exhausted merchant deliveries or rejected webhooks. Those are useful signals, but they do not prove the gateway is degraded.Scope
False signals caughtwith a label tied to the mismatch query, for exampleWebhook contradictions.Gateway degradedwith a local system or action banner based on the actual condition, such as callback delivery failures or webhook rejection rate.dashboard/src/lib/mockData.js:23unless those gateways are backed by real adapters.Acceptance criteria
last_7_daysand shows nonzero values when the API returns them.