Skip to content

fix(admin): exclude trials from Paid via Subscription count - #3372

Draft
riderx wants to merge 1 commit into
mainfrom
fix/admin-exclude-trials-paid-via-subscription
Draft

riderx wants to merge 1 commit into
mainfrom
fix/admin-exclude-trials-paid-via-subscription

Conversation

@riderx

@riderx riderx commented Sep 17, 2026 •

Copy link
Copy Markdown
Member

Summary (AI generated)

  • Stop counting trial organizations in the admin Paid via Subscription card.
  • Require paid_at and an ended trial (trial_at <= now) so the live count matches a real paid subscription.
  • Update the card helper text to Paid subscriptions, excluding trials.

Motivation (AI generated)

Trials are stored as status = succeeded and is_good_plan = true, so the live admin breakdown treated unpaid trial orgs as paying subscribers. That made Paid via Subscription (~1,591) look much larger than Total Paying (~1,041).

Business Impact (AI generated)

Admin revenue metrics no longer inflate paid-subscriber counts with trials. Internal reporting and conversion math based on that card stay trustworthy.

Test Plan (AI generated)

  • Local tests/admin-stats.test.ts case: trial org is excluded, paid org is included, live breakdown matches the paid-subscription filters.
  • After deploy, confirm Paid via Subscription sits next to Total Paying (live vs daily snapshot only), not hundreds of trials higher.
  • Confirm Paid via Credits and Total Paid Organizations still include credit-only orgs.

Generated with AI

Made with Cursor


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Review in cubic

Trials are stored as succeeded + is_good_plan, so the live admin card was counting unpaid trial orgs as paying subscribers.

Co-authored-by: Cursor <cursoragent@cursor.com>
@riderx
riderx deployed to deepsec-pr September 17, 2026 13:46 — with GitHub Actions Active
@coderabbitai

coderabbitai Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codspeed

codspeed Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will improve performance by 27.93%

⚡ 1 improved benchmark
✅ 42 untouched benchmarks
⏩ 2 skipped benchmarks1

Performance Changes

Benchmark BASE HEAD Efficiency
⚡ sha256 checksum for medium bundle payload 1.7 ms 1.3 ms +27.93%

Tip

Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.


Comparing fix/admin-exclude-trials-paid-via-subscription (3b70460) with main (d0406ae)

Open in CodSpeed

Footnotes

  1. 2 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@sonarqubecloud

Copy link
Copy Markdown

This branch was successfully deployed

1 active deployment
deepsec-pr — 3b704604 Deployed Sep 17, 2026 by riderx via Scan PR changes #7237
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