Skip to content

Conversation

@andyra
Copy link
Contributor

@andyra andyra commented Jan 12, 2026

Currently, on an account with 1,000 cards…

  • nearing_plan_cards_limit?
  • exceeding_card_limit? 🚫

Seems like we should use <= and >= respectively for these checks so that on a plan with 1,000 cards…

  • nearing_plan_cards_limit? 🚫
  • exceeding_card_limit?

https://app.fizzy.do/5986089/cards/3491

@andyra andyra requested a review from jorgemanrubia January 12, 2026 17:19

def exceeding_card_limit?
plan.limit_cards? && billed_cards_count > plan.card_limit
plan.limit_cards? && billed_cards_count >= plan.card_limit
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this should be just > so that the account can't simultaneously be near and over the limit?

This conceptually also makes sense - on the free plan you can publish 1000 cards, but you can't publish the 1001st card since it's over the limit.


def exceeding_card_limit?
plan.limit_cards? && billed_cards_count > plan.card_limit
plan.limit_cards? && billed_cards_count >= plan.card_limit
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I agree with @monorkin, I think this should be just >.

I am curious, was this causing some user-facing bug in the app?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue is stated well in the Fizzy card. Right now, after you've created 1000 cards and go to create another one, the message says "You've used 1000 of 1000 cards", but you can still create another one (card 1001). Seems like the Upgrade prompt should kick in when you have 1000 cards, not 1001.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think @andyra's logic is correct here, we want to check for >=. It might be the name that's confusing us: the state we're trying to detect is "reached plan limit", not exceeded it, I think?

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.

5 participants