REV-1625 C5: Billing & Usage free-state#12554
Draft
jefflloyd wants to merge 1 commit into
Draft
Conversation
On the gated Free plan (FREE_AI_REMOVAL arm + Free + zero base allotment), Settings > Billing & Usage stops rendering a 0-of-N base-credits meter (P16). The Balance section instead shows a 'Warp AI' card stating the Free plan includes no Warp AI usage, keeps any remaining bonus-grant balance cards, and offers 'Set up your own API key' and 'Upgrade plan' actions. The gated card also wins over a stale non-zero cached limit so a credit meter is never shown for a plan that includes no Warp AI. Co-Authored-By: Oz <oz-agent@warp.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Implements the Billing & Usage free-state (REV-1625 work item C5, TECH spec §5 / P16).
When the user is in the plan-gated free state (
FREE_AI_REMOVALarm + Free plan + zero base allotment, via C4'sAIRequestUsageModel::is_free_plan_ai_gated):FREE_PLAN_NO_AIdenial arrives before the usage refresh).NavigateToByokSettingsaction) and "Upgrade plan" (existing upgrade flow).Stacked on C4 (
jeff/rev-1625-c4-gated-states); top of the REV-1625 stack (C3 → C4 → C5).Linked Issue
Testing
cargo check -p warp,cargo clippy -p warp --tests(clean),./script/formatcargo nextest run -p warp -E 'test(billing_and_usage_page_v2)'— new unit test for the entitlement-card choice (meter vs gated card vs none), including the stale-limit case.Local testing
INSERT INTO bonus_credit_grants ...) and refresh (↻ button in the Plan row): a Personal credits card with the remaining balance renders next to the gated card.Agent Mode
Conversation: https://staging.warp.dev/conversation/b0196734-7ef9-43b3-acc2-e243d9e053d7
Run: https://oz.staging.warp.dev/runs/019eb89c-4bd7-75cd-8c8a-398dabd0afde
This PR was generated with Oz.