Skip to content

[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
masterfrom
warp1/rev-2003-client-differentiate-team-vs-workspace-credit-pool-wording
Draft

[REV-2003] Client: fix credit-pool copy that says "team" when the pool isn't team-scoped#14855
warp-agent-staging[bot] wants to merge 2 commits into
masterfrom
warp1/rev-2003-client-differentiate-team-vs-workspace-credit-pool-wording

Conversation

@warp-agent-staging

@warp-agent-staging warp-agent-staging Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

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

  • Self-serve add-on purchases and org-setting auto-reload purchases create a USER-scoped grant (usable_on_team_id = the team) — i.e. personal credits usable on that team, not a shared team pool (warp-server logic/billing.go:1427-1454, flag individualize_reload_credits: true in local/staging/prod).
  • Auto-reload fires when the requesting user's own combined usable balance (their TEAM + WORKSPACE + USER grants for that team) drops below 100 — not "any member" and not the team's balance alone (warp-server logic/ai/auto_reload.go, model/ai_request_bonus_grants.go).
  • The only TEAM-scoped auto-purchase path is enterprise tier-policy auto-reload, which doesn't go through this client UI.

Changes

File:line Before After Rule
app/src/settings_view/billing_and_usage_page_v2.rs:65-66 Constant named ADDITIONAL_ADDON_CREDITS_DESCRIPTION_FOR_TEAM, body already said "personal" Renamed to ADDITIONAL_ADDON_CREDITS_DESCRIPTION_PERSONAL; body text unchanged Constant name shouldn't contradict its own copy. Usage at line ~1174 (gated on team_count > 1) still reads correctly since the copy itself was never wrong.
app/src/settings_view/billing_and_usage_page_v2.rs:1211-1215 "When any member on your team's credit balance reaches 100 credits remaining, automatically purchase {amount}." "When your available add-on credit balance falls below 100 credits remaining, automatically purchase {amount}. Purchased credits are added to your personal balance." Factually wrong on three counts: not "any member" (only the requesting user), not "your team's credit balance" (their own combined usable balance), and the trigger is < 100, not == 100 ("reaches"), per warp-server logic/ai/auto_reload.go:47-49. Purchased credits land personally.
app/src/settings_view/billing_and_usage_page_v2.rs:1271-1277 Non-admin description: "When your personal add-on credit balance runs low, Warp will automatically purchase … and add them to your balance." (both the priced and no-option fallback text) "When your available add-on credit balance falls below 100 credits remaining, Warp will automatically purchase … and add them to your personal balance." Found in review, not in the original brief: the trigger counts the principal's full usable balance (TEAM + WORKSPACE + USER grants, logic/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:247 "Failed to enable auto-reload for your team. Please try again in Settings > Billing and Usage." "Failed to enable auto-reload. Please try again in Settings > Billing and Usage." "for your team" implied a team pool; auto-reload settings aren't a credit-pool statement, so the phrase is dropped rather than replaced with another pool noun.
app/src/terminal/enable_auto_reload_modal.rs:407 "Oops, something went wrong; your team's data could not be found." "Oops, something went wrong; your billing data could not be found." Neutral wording; the missing lookup is team-context billing data, not a claim about a credit pool.
app/src/workspace/view/cloud_agent_capacity_modal/mod.rs:143 "This cloud run stopped because your team has used all available AI credits for the current billing period." "This cloud run stopped because there are no AI credits available for the current billing period." Avoids asserting a pure team pool; talks about availability/exhaustion instead, matching the settled Personal/Team/Workspace combined-balance behavior.

Explicitly 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.
  • "Team admin" CTAs (buy_credits_banner.rs:497,765, billing_and_usage_page_v2.rs:72,74,1344 non-admin warnings/CTAs) — requester explicitly wants "team admin" kept, not renamed to "workspace admin".
  • Spend-limit warnings (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.
  • Bonus grant notification (app/src/workspace/bonus_grant_notification_model.rs:108-116) — already matches on BonusGrantScope (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-grant BonusGrantScope value 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).
  • Existing Personal/Team/Workspace balance cards (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 --check on 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 the warp_completer crate, outside this change's scope).
  • No new/updated unit tests were needed: searched the repo for any test pinning the old strings or the renamed constant (ADDITIONAL_ADDON_CREDITS_DESCRIPTION_FOR_TEAM, the old tooltip/toast/banner copy) — none exist.
  • Not manually tested end-to-end in the running app: these are logged-in billing surfaces that require a real account with a team/billing setup to reach (auto-reload settings, buy-credits banner, capacity modal), so a live UI capture was judged disproportionately expensive for a copy-only change per the task's guidance. A reviewer can eyeball the before/after table above against the running app.

Screenshots / Videos

Not captured — see Testing section above for rationale.

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI 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.

…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>
@cla-bot cla-bot Bot added the cla-signed label Aug 8, 2026
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant