Skip to content

fix(web): drive the sandbox overview metrics from the api#339

Merged
tiana-code merged 1 commit into
mainfrom
fix/overview-live-metrics
Jun 28, 2026
Merged

fix(web): drive the sandbox overview metrics from the api#339
tiana-code merged 1 commit into
mainfrom
fix/overview-live-metrics

Conversation

@tiana-code

Copy link
Copy Markdown
Owner

What

The sandbox Overview landing page showed fabricated headline KPIs. This wires them to the live API with an honest fallback.

  • New useOverviewMetrics hook reads transaction/payment/account totals (via totalElements) and the open-case count from the real endpoints.
  • liveKpis builds the four headline cards from those counts. Metrics that have no public endpoint (decision latency, "today" windows) are intentionally not surfaced.
  • Overview now has three states: live (green notice, real counts), loading, and offline (amber notice, clearly labelled sample values). The activity feed and API playground remain illustrative samples (no public event-stream endpoint yet).
  • KpiDatum.spark is optional: live counts omit the sparkline because a single count has no time series, so a trend line would be fabricated.
  • Renames the demo tenant to a neutral placeholder.

Verification

  • npm run typecheck: clean.
  • npm run test: 64 passed (Overview test now covers both the offline fallback and the live path).
  • npm run lint: 0 errors (2 pre-existing warnings).

read the transaction, payment and account totals and the open-case count from
the live sandbox api instead of hardcoded sample numbers. fall back to clearly
labelled sample values with an offline notice when the api is unreachable, and
drop the fabricated sparkline trend from live counts. rename the demo tenant to
a neutral placeholder.
@tiana-code tiana-code merged commit ba71936 into main Jun 28, 2026
10 checks passed
@tiana-code tiana-code deleted the fix/overview-live-metrics branch June 28, 2026 23:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant