fix(frontend): correct build time 'Used in period' always showing 0m#2033
Conversation
The statistics backend returns build_time_seconds in its response but the frontend was reading build_time_unit (which was always undefined, defaulting to 0). The percentage was correct because it comes from a separate RPC.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe PR updates the organization usage metrics to track build time in seconds instead of arbitrary units. A field named ChangesBuild Time Metric Rename
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|



Summary (AI generated)
Motivation (AI generated)
The statistics backend returns
build_time_secondsin its response, but the frontend type definitions and data aggregation code were referencingbuild_time_unit— a field that doesn't exist in the API response. This caused the value to always beundefined, falling back to0. The percentage was unaffected because it comes from a separate RPC (get_plan_usage_percent_detailed) that queries the database directly.Business Impact (AI generated)
Users see incorrect build time usage (always 0m) on the org Usage page, which prevents them from understanding their actual consumption and making informed decisions about plan upgrades.
Test Plan (AI generated)
bun typecheck— passes cleanlyGenerated with AI
Summary by CodeRabbit