feat(release): surface adoption and health metrics in list and view (#463)#680
feat(release): surface adoption and health metrics in list and view (#463)#680
Conversation
…463) Add health/adoption data to the existing release commands: - Pass `health=1` to the list endpoint so each release includes per-project adoption and crash-free metrics - Add ADOPTION and CRASH-FREE columns to `release list` table - Add `health`, `adoptionStages`, and `healthStatsPeriod` query options to `getRelease()` API function - Show per-project health breakdown table in `release view` (crash-free users/sessions, adoption %, 24h user/session counts) - Color-code crash-free rates (green ≥ 99%, yellow ≥ 95%, red < 95%) - Gracefully omit health section when no project has session data
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨
Internal Changes 🔧
🤖 This preview updates automatically when you update the PR. |
|
Codecov Results 📊✅ 134 passed | Total: 134 | Pass Rate: 100% | Execution Time: 0ms 📊 Comparison with Base Branch
✨ No test changes detected All tests are passing successfully. ✅ Patch coverage is 97.74%. Project has 1483 uncovered lines. Files with missing lines (1)
Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
+ Coverage 95.44% 95.45% +0.01%
==========================================
Files 223 224 +1
Lines 32502 32618 +116
Branches 0 0 —
==========================================
+ Hits 31022 31135 +113
- Misses 1480 1483 +3
- Partials 0 0 —Generated by Codecov Action |
Address Cursor Bugbot review — deduplicate the percentage and count formatting helpers into a shared module imported by both list and view.
Support sorting releases by: date (default), sessions, users, crash_free_sessions, crash_free_users. Switches from buildOrgListCommand to buildListCommand to support the custom flag (-s alias).
…ses and session sparklines - Extract compactFormatter, formatNumber, fmtPct, fmtCount, appendUnitSuffix, formatWithUnit, formatCompactWithUnit into src/lib/formatters/numbers.ts - Update dashboard.ts to import from shared module (no behavior change) - Delete src/commands/release/format.ts — replaced by shared module - Add sort aliases: stable_sessions/cfs → crash_free_sessions, stable_users/cfu → crash_free_users - Add SESSIONS sparkline column to release list table using health stats time-series data (same [timestamp, count] format as issue stats) - Drop COMMITS column from list to make room for sparkline
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 5276d9c. Configure here.

Summary
release listandrelease viewcommandshealth=1to the releases API so adoption and crash-free metrics are populatedreleasecommand group with adoption/health subcommand #463Changes
API layer (
src/lib/api/releases.ts):listReleasesPaginatedgainshealth?: booleanoptiongetReleasegains optional{ health, adoptionStages, healthStatsPeriod }query paramsReleaseSortValuetype for future--sortsupportList command (
src/commands/release/list.ts):health=1in bothlistForOrgandlistPaginatedhasHealthData: trueView command (
src/commands/release/view.ts):health=true, adoptionStages=trueon every viewTests (
test/commands/release/view.test.ts):projects[].healthDatafields pass throughhasHealthData: false