Skip to content

Sessions page summary KPIs (#189) - #262

Merged
unjica merged 4 commits into
developfrom
feature/sessions-summary-kpis-189
Jul 7, 2026
Merged

unjica merged 4 commits into
developfrom
feature/sessions-summary-kpis-189

Conversation

@unjica

@unjica unjica commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds GET /api/sessions/summary with five KPIs (total sessions, users, avg duration, bounce rate, crash-free rate), prior-period compare, and per-metric sparklines
  • Renders a summary metrics row on /dashboard/sessions above the sessions table, respecting app/platform/time-range filters
  • Bounce = duration under 10s (when ended) or exactly one event; crash-free = no ErrorOccurrence for the session

Closes #189

Test plan

  • pnpm lint && pnpm test && pnpm build
  • Open /dashboard/sessions with various time ranges and filters; KPI row matches list scope
  • Verify bounce/crash-free rates against known test data
  • Confirm prior-period deltas update when changing custom date range

Made with Cursor

Expose GET /api/sessions/summary with bounce and crash-free metrics, prior-period compare, and sparklines; render the KPI row on the sessions dashboard.

Co-authored-by: Cursor <[email protected]>
Scope crash-free checks to project via ErrorGroup, match bounce event
counts per app, and align summary window resolution with open-ended list
date filters.

Co-authored-by: Cursor <[email protected]>
When the list filter has only an upper bound, KPI totals, prior-period compare, and sparklines now share the same bounded last-7-days window ending at until, matching events and errors summary behavior.

Co-authored-by: Cursor <[email protected]>

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 2674577. Configure here.

Comment thread apps/api/src/routes/api.ts Resolved
GET /api/sessions now resolves started_at bounds via the same helper as /sessions/summary, so all-time and to-only filters show matching list totals and KPI counts.

Co-authored-by: Cursor <[email protected]>
@unjica
unjica merged commit ab0e56a into develop Jul 7, 2026
4 checks passed
@unjica
unjica deleted the feature/sessions-summary-kpis-189 branch July 7, 2026 21:01
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.

Sessions page: summary KPIs API (users, duration, bounce rate, crash-free)

1 participant