[REV-2003] Client: fix credit-pool copy that says "team" when the pool isn't team-scoped - #14855
Draft
warp-agent-staging[bot] wants to merge 2 commits into
Conversation
…l isn't team-scoped Add-on/reload purchases are attributed to the purchasing USER (personal balance, usable on the team), not a shared team pool. Several strings in Billing & Usage v2 and related banners/modals still described the pool as "team" (or a member of "any" team), which contradicted the actual grant scope and the already-correct "Personal credits" balance card. Billing & Usage v1 is intentionally left untouched per REV-2003. - billing_and_usage_page_v2.rs: renamed ADDITIONAL_ADDON_CREDITS_DESCRIPTION_FOR_TEAM -> ADDITIONAL_ADDON_CREDITS_DESCRIPTION_PERSONAL (name now matches its "personal" copy); rewrote the auto-reload tooltip, which incorrectly said "any member on your team's credit balance", to describe the requesting user's own available balance and personal landing. - buy_credits_banner.rs: dropped "for your team" from the auto-reload enable failure toast. - enable_auto_reload_modal.rs: "your team's data" -> "your billing data" in the missing-team-uid error toast. - cloud_agent_capacity_modal/mod.rs: out-of-credits explanation no longer asserts a team pool ("your team has used all available AI credits" -> "there are no AI credits available"). "Team admin" CTA copy and genuine team-membership/usage-attribution strings (billing_cycle_usage_*.rs) are left as-is per the issue's settled scope. Co-Authored-By: Warp Agent <agent@warp.dev>
…copy Review found two remaining mismatches against server behavior: - The auto-reload tooltip said the balance "reaches 100 credits remaining", but the server triggers on totalCredits.LessThan(100) (warp-server logic/ai/auto_reload.go:47-49) -- at exactly 100 nothing is purchased. Changed to "falls below 100 credits remaining". - The non-admin auto-reload description (and its no-option fallback) said auto-reload fires when the user's "personal" balance runs low, but the trigger actually counts the principal's full usable balance (TEAM + WORKSPACE + USER grants), not personal-only (logic/ai/ai_usage/usage.go:289-320, model/ai_request_bonus_grants.go:64-119). Reworded to match the tooltip's "available add-on credit balance falls below 100 credits remaining" while keeping the accurate "added to your personal balance" landing statement. Co-Authored-By: Warp Agent <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
Fixes REV-2003: several user-facing strings in Billing & Usage v2 and related banners/modals said "team" for a credit pool that is actually personal (or otherwise not team-scoped), following e62ec07c splitting Team vs Workspace balance cards.
This is a copy-only change. It does not touch server behavior, the data model, or which pool anything is purchased into.
Ground truth this is based on
usable_on_team_id= the team) — i.e. personal credits usable on that team, not a shared team pool (warp-serverlogic/billing.go:1427-1454, flagindividualize_reload_credits: truein local/staging/prod).warp-serverlogic/ai/auto_reload.go,model/ai_request_bonus_grants.go).Changes
app/src/settings_view/billing_and_usage_page_v2.rs:65-66ADDITIONAL_ADDON_CREDITS_DESCRIPTION_FOR_TEAM, body already said "personal"ADDITIONAL_ADDON_CREDITS_DESCRIPTION_PERSONAL; body text unchangedteam_count > 1) still reads correctly since the copy itself was never wrong.app/src/settings_view/billing_and_usage_page_v2.rs:1211-1215< 100, not== 100("reaches"), perwarp-server logic/ai/auto_reload.go:47-49. Purchased credits land personally.app/src/settings_view/billing_and_usage_page_v2.rs:1271-1277logic/ai/ai_usage/usage.go:289-320,model/ai_request_bonus_grants.go:64-119), not the personal balance alone, so a drained personal balance while pooled credits remain would not have matched this copy. Reworded to match the tooltip above while keeping the accurate "added to your personal balance" landing statement.app/src/terminal/buy_credits_banner.rs:247app/src/terminal/enable_auto_reload_modal.rs:407app/src/workspace/view/cloud_agent_capacity_modal/mod.rs:143Explicitly left unchanged (and why)
app/src/settings_view/billing_and_usage_page.rs(Billing & Usage v1) — out of scope per the requester (Tyler Lam); includes the stale "shared across your team" add-on string.buy_credits_banner.rs:497,765,billing_and_usage_page_v2.rs:72,74,1344non-admin warnings/CTAs) — requester explicitly wants "team admin" kept, not renamed to "workspace admin".billing_and_usage_page_v2.rs:1235,1241, "…team's monthly spend limit… Contact a team admin…") — the monthly spend limit is genuinely team-owned settings today, so this wording is accurate; only the admin CTA pattern is shared with the (correctly) kept "team admin" language.cloud_agent_capacity_modal/mod.rs:139(ConcurrentLimit variant) — "your team has reached the maximum number of concurrent cloud agents" describes a real team-level concurrency limit, not a credit pool, so it's left alone.billing_cycle_usage_rows.rs,billing_cycle_usage_section.rs,billing_cycle_usage_common.rs— audited per the issue's inventory. All "team" references here are genuine team-membership/usage-attribution language (e.g. "team-level credit usage" vs. "per-user credit attribution" describes visibility granularity of usage data, not which pool money comes from; "This is an automated agent on your team" is a membership fact). No credit-pool-scope wording needed fixing here.app/src/workspace/bonus_grant_notification_model.rs:108-116) — already matches onBonusGrantScope(User → "account", Team → "team", Workspace → "workspace"); this is the reference pattern the other fixes above follow conceptually (though those surfaces don't carry a per-grantBonusGrantScopevalue to match on — they describe purchase/auto-reload flows that are always personal in this client UI, so the copy states that directly rather than branching on scope).billing_and_usage_page_v2.rs:858,876,894) — already correct, no change needed.No code contradicted the settled rules from the issue; the fixes were a straight application of them.
Revision (post-review): code review caught two remaining boundary/scope mismatches against the server in the auto-reload copy above (threshold direction, and the non-admin description counting the personal balance instead of the full usable balance). Both are fixed in the second commit; see the updated table rows above.
Testing
cargo check -p warp --lib --all-features— compiles clean (only pre-existing, unrelated dead-code warnings).cargo fmt --checkon all touched files — clean.cargo clippy -p warp --lib --all-features -- -D warnings— no findings in any touched file (an unrelated pre-existing clippy failure exists in thewarp_completercrate, outside this change's scope).ADDITIONAL_ADDON_CREDITS_DESCRIPTION_FOR_TEAM, the old tooltip/toast/banner copy) — none exist.Screenshots / Videos
Not captured — see Testing section above for rationale.
Agent Mode
Conversation: https://staging.warp.dev/conversation/737fb6aa-1676-4687-b576-3684c890b8ee
Run: https://oz.staging.warp.dev/runs/019fe332-ea2e-730f-982f-1f81af51b63b
This PR was generated with Oz.