What's New
Monthly & Daily Summary Tables β The dashboard now shows a 12-month summary table (new/churned subscribers, MRR, churn rate per month) and a 30-day daily summary table. Available via Profitable.monthly_summary and Profitable.daily_summary.
period_data method β New Profitable.period_data(in_the_last:) returns all period metrics (new_customers, churned_customers, churn, new_mrr, churned_mrr, mrr_growth, revenue) in a single efficient call.
Bug Fixes
new_mrrwas countingincomplete,incomplete_expired, andunpaidsubscriptions β now only countsactivenew_subscriberswasn't filtering outtrialing/pausedsubscriptions- Status constants moved to module level so
MrrCalculatorcan reference them
Performance
Dashboard optimized from ~176 queries to 38 per page load:
- Monthly summary: 72 β 5 queries (bulk load + Ruby grouping)
- Daily summary: 60 β 2 queries
- Period cards: 27 β 18 queries (via
period_data) - Controller precomputation eliminates redundant calls from the view
Code Quality
- 5 period methods DRY'd via
_in_perioddelegation subscriptions_with_processorhelper eliminates repeated join/select/include chains- Test helper fully synced with production code
- 249 tests, 382 assertions, 94.64% coverage
What's Changed
- Add Claude Code GitHub Workflow by @rameerez in #7
- Fix bugs, DRY up code, add monthly/daily summaries, and optimize dashboard (~176 β 38 queries) by @rameerez in #8
Full Changelog: v0.3.0...v0.4.0