Skip to content

[REV-1603 & REV-1606] Show billing V2 for solo free users#11434

Merged
IsaiahWitzke merged 6 commits into
masterfrom
oz-agent/REV-1603-billing-v2-free-solo
May 27, 2026
Merged

[REV-1603 & REV-1606] Show billing V2 for solo free users#11434
IsaiahWitzke merged 6 commits into
masterfrom
oz-agent/REV-1603-billing-v2-free-solo

Conversation

@IsaiahWitzke
Copy link
Copy Markdown
Contributor

@IsaiahWitzke IsaiahWitzke commented May 20, 2026

Description

Routes signed-in users with no current workspace through the V2 billing and usage page when the BillingAndUsagePageV2 flag is enabled. This preserves the existing V2 routing for free/build/enterprise workspaces and the legacy routing for legacy paid workspace plans.

Linked Issue

REV-1603

  • The linked issue is labeled ready-to-spec or ready-to-implement.
  • Where appropriate, screenshots or a short video of the implementation are included below (especially for user-visible or UI changes).

Testing

  • cargo fmt --package warp
  • cargo test -p warp settings_view::billing_and_usage_dispatch::tests --lib
  • cargo clippy -p warp --lib
  • I have manually tested my changes locally with ./script/run

Free user with no team

note: no billing period at the side because technically there is no "billing period" (there's no billing) but i think the "resets at" is sufficient

TODO: we should probably show this bar as a % of the max base limit, instead of the "the max user on your team gets their bar at 100% and everyone else is normalized to that"

image

Free user with a team

image

Solo Build

image

Solo business

image

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

CHANGELOG-BUG-FIX: Fixed free solo users seeing the legacy Billing and usage settings page instead of the V2 page.

This PR was created by Oz (running Codex).

Co-Authored-By: Oz <oz-agent@warp.dev>
@cla-bot cla-bot Bot added the cla-signed label May 20, 2026
@IsaiahWitzke IsaiahWitzke marked this pull request as ready for review May 20, 2026 20:21
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 20, 2026

@IsaiahWitzke

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

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

Overview

This PR routes signed-in users with no current workspace through the Billing and Usage V2 page when BillingAndUsagePageV2 is enabled, while preserving legacy routing for legacy paid workspace plans and adding unit coverage for the routing helper.

Concerns

  • For this user-facing settings-page change, please include screenshots or a screen recording demonstrating the free solo/no-workspace billing flow working end to end. The PR description does not include visual evidence, and the repo review guidance requires it for UI-impacting behavior changes.

Verdict

Found: 0 critical, 0 important, 1 suggestions

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@IsaiahWitzke IsaiahWitzke marked this pull request as draft May 21, 2026 02:34
IsaiahWitzke and others added 2 commits May 21, 2026 18:02
- Split BillingCycleUsageSectionView::render into three cases:
  render_team_usage, render_own_usage_with_workspace, render_own_usage_solo,
  dispatched via a new shows_team_section() helper.
- Move row constructors onto MemberUsageRow as methods (for_viewer,
  for_viewer_from_total, for_other_members, for_each_member) so they only
  depend on entries/members/primitives — no Workspace, AppContext, or
  AIRequestUsageModel.
- Add viewer_base_limit helper for the workspace -> base_limit lookup;
  render helpers and build_rows resolve identity + base_limit themselves.
- Rename build_row_card to render_row_card to match the render_* convention
  for Element-producing helpers.
- Update tests to call MemberUsageRow::for_viewer.

Co-Authored-By: Oz <oz-agent@warp.dev>
@IsaiahWitzke IsaiahWitzke changed the title [REV-1603] Show billing V2 for solo free users [REV-1603 & REV-1606] Show billing V2 for solo free users May 22, 2026
Comment thread app/src/settings_view/billing_and_usage/billing_cycle_usage_rows.rs Outdated
…ta on credits_used

Co-Authored-By: Oz <oz-agent@warp.dev>
@IsaiahWitzke IsaiahWitzke marked this pull request as ready for review May 22, 2026 21:11
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 22, 2026

@IsaiahWitzke

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

pub fn has_non_viewer_data(entries: &[BillingCycleUsageEntry], viewer_uid: Option<&str>) -> bool {
entries.iter().any(|e| match &e.subject_type {
AiCreditsUsageAndCostSubjectType::Team => true,
AiCreditsUsageAndCostSubjectType::Team => e.credits_used > 0,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nice

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

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

Overview

Reviewed the Billing V2 routing change for signed-in users with no current workspace, the supporting usage-row rendering changes, and the new dispatch tests. The PR includes visual evidence for the user-facing billing page changes, and no approved spec context was available for additional spec-alignment checks.

Concerns

  • None.

Verdict

Found: 0 critical, 0 important, 0 suggestions

Approve

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

…illing-v2-free-solo

# Conflicts:
#	app/src/settings_view/billing_and_usage/billing_cycle_usage_rows.rs
#	app/src/settings_view/billing_and_usage/billing_cycle_usage_section.rs
#	app/src/settings_view/billing_and_usage_dispatch.rs
Copy link
Copy Markdown
Contributor

@tylerlam-warp tylerlam-warp left a comment

Choose a reason for hiding this comment

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

looks solid


let resets_text = self.render_resets_label(appearance, app);
let legend = self.render_legend(workspace, appearance);
let legend = workspace.and_then(|workspace| self.render_legend(workspace, appearance));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: Should we also hide the legend when they're on a free team? Because I think right now we should the legend on a free team but not when they're not on a free team - we should keep it consistent right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yeah... i didnt really want to make assumptions about the types of costs etc that you can occur when you're on a free team / no team.

for example, I can't quite remember, but i think if you churn from build, you can still use your ambient agent addon credits (??)... even if thats not the case rn, i dont want this UI to hide that when this does become the case and u get different credit types back from the usage API

i just don't show the legend in the no-workspace case because we simply don't have the data to populate a legend.

(aside: I guess more accurately we should be showing "aggregated credits used" instead of a pink for "base credits", but in 99% of the teamless case, the only usage you're going to have is base)

pub fn has_non_viewer_data(entries: &[BillingCycleUsageEntry], viewer_uid: Option<&str>) -> bool {
entries.iter().any(|e| match &e.subject_type {
AiCreditsUsageAndCostSubjectType::Team => true,
AiCreditsUsageAndCostSubjectType::Team => e.credits_used > 0,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nice

@IsaiahWitzke IsaiahWitzke enabled auto-merge (squash) May 27, 2026 00:38
@IsaiahWitzke IsaiahWitzke merged commit e6d8aee into master May 27, 2026
44 of 46 checks passed
@IsaiahWitzke IsaiahWitzke deleted the oz-agent/REV-1603-billing-v2-free-solo branch May 27, 2026 00:54
ErshovDmitry pushed a commit to ErshovDmitry/warp-i18n that referenced this pull request May 27, 2026
…#11434)

## Description
Routes signed-in users with no current workspace through the V2 billing
and usage page when the BillingAndUsagePageV2 flag is enabled. This
preserves the existing V2 routing for free/build/enterprise workspaces
and the legacy routing for legacy paid workspace plans.

## Linked Issue
REV-1603
- [ ] The linked issue is labeled `ready-to-spec` or
`ready-to-implement`.
- [ ] Where appropriate, screenshots or a short video of the
implementation are included below (especially for user-visible or UI
changes).

## Testing
- [x] `cargo fmt --package warp`
- [x] `cargo test -p warp
settings_view::billing_and_usage_dispatch::tests --lib`
- [x] `cargo clippy -p warp --lib`
- [x] I have manually tested my changes locally with `./script/run`

### Free user with no team

note: no billing period at the side because technically there is no
"billing period" (there's no billing) but i think the "resets at" is
sufficient

TODO: we should probably show this bar as a % of the max base limit,
instead of the "the max user on your team gets their bar at 100% and
everyone else is normalized to that"

<img width="1297" height="812" alt="image"
src="https://github.com/user-attachments/assets/e5427825-344c-437a-b652-eb1c188044f3"
/>

### Free user with a team

<img width="1300" height="817" alt="image"
src="https://github.com/user-attachments/assets/9585a92e-419c-4c46-9860-06fba391233e"
/>

### Solo Build

<img width="1728" height="1117" alt="image"
src="https://github.com/user-attachments/assets/e05510bf-0aba-4b9c-aae4-7b643ef5747d"
/>


### Solo business

<img width="1728" height="1117" alt="image"
src="https://github.com/user-attachments/assets/91c83df2-5e4c-49de-8188-b74a5150bb4a"
/>




## Agent Mode
- [x] Warp Agent Mode - This PR was created via Warp's AI Agent Mode

CHANGELOG-BUG-FIX: Fixed free solo users seeing the legacy Billing and
usage settings page instead of the V2 page.

_This PR was created by [Oz](https://warp.dev/oz) (running Codex)._

---------

Co-authored-by: Oz <oz-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.

2 participants