Skip to content

Errors analytics: types, stacked chart, sparklines (#182) - #242

Merged
unjica merged 2 commits into
developfrom
feature/errors-types-sparklines-182
Jul 7, 2026
Merged

unjica merged 2 commits into
developfrom
feature/errors-types-sparklines-182

Conversation

@unjica

@unjica unjica commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds GET /api/errors/analytics with stacked error-type series and top-types panel data (share % + sparklines), sharing filters and metricsUntil with the errors summary KPIs.
  • Classifies errors by message prefix (TypeError, ReferenceError, Network Error, Validation Error, Other) in both SQL analytics and list serialization.
  • Adds dashboard panels between summary KPIs and the toolbar: stacked chart + top types; errors table gains Type badge and Trend sparkline columns.

Bugbot fixes (pre-PR)

  • Unique SVG gradient IDs per MiniSparkline instance.
  • SQL error-type classification trims messages to match JS parsing.
  • Table sparklines use the exact trend window (since / half-open upper bound) to align with trend metrics.

Test plan

  • Open /dashboard/errors — stacked chart and top types render for default range.
  • Change time range, release, status, and search — analytics panels and table sparklines update with summary KPIs.
  • Verify Type badges match stacked chart colors/segments.
  • Sort by trend / occurrences — sparklines reflect recent activity.
  • pnpm lint && pnpm test && pnpm build

Closes #182

Made with Cursor

Expose GET /api/errors/analytics and enrich the errors list with error-type badges and per-row trend sparklines aligned to the summary time window.

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 a312cbb. Configure here.

Comment thread apps/api/src/lib/errors-analytics.ts Resolved
Query top-type counts over the complete summary range while keeping the stacked chart capped, and expose chartWindow when the rendered series is truncated.

Co-authored-by: Cursor <[email protected]>
@unjica
unjica merged commit a465460 into develop Jul 7, 2026
3 checks passed
@unjica
unjica deleted the feature/errors-types-sparklines-182 branch July 7, 2026 18:08
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