Skip to content

Add pre-flight credit check before PR creation on coverage dashboard#717

Merged
hiroshinishio merged 1 commit intomainfrom
wes
Feb 27, 2026
Merged

Add pre-flight credit check before PR creation on coverage dashboard#717
hiroshinishio merged 1 commit intomainfrom
wes

Conversation

@hiroshinishio
Copy link
Contributor

Summary

  • Checks credit balance before creating PRs on the coverage dashboard, blocking users with insufficient credits
  • Subscription users (e.g. SpiderPlus) bypass the check; credit users must have $7 * numPRs available
  • Shows an error modal with current balance, required amount, and a link to the credits page
  • Changed Modal component message prop from string to ReactNode to support the link

Social Media Post (GitAuto)

A user with $0 balance created two PRs from our dashboard before getting blocked by the backend credit check. The PRs already existed on GitHub by then. Now the website checks credits upfront - if you can't afford it, you see a modal with your balance and a link to buy credits. No wasted PRs.

Social Media Post (Wes)

Found a gap in our payment flow. Users could click "Create PRs" on the coverage dashboard with zero credits. The backend would reject it, but the PR was already on GitHub. Moved the credit check to the frontend - now it blocks before anything hits the API. Simple fix that should've been there from day one.

@hiroshinishio hiroshinishio self-assigned this Feb 27, 2026
@hiroshinishio hiroshinishio merged commit 17f26a8 into main Feb 27, 2026
2 checks passed
@hiroshinishio hiroshinishio deleted the wes branch February 27, 2026 00:53
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