From 0e928d99026836cad6a808a2273926850efaaf01 Mon Sep 17 00:00:00 2001 From: Joshua Ricker-Rampersad Date: Tue, 11 Aug 2026 10:50:51 -0400 Subject: [PATCH 1/3] Add client-side PricingTransparency feature flag scaffolding Adds a PricingTransparency variant to the FeatureFlag enum, mirroring the server-side PricingTransparencyEnabled flag (warp-server PR #14283). Scaffolding only: not added to DOGFOOD_FLAGS, PREVIEW_FLAGS, or RELEASE_FLAGS, and not consumed anywhere yet. Display work is paused Milestone 3. Co-Authored-By: Warp Agent --- crates/warp_features/src/lib.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/crates/warp_features/src/lib.rs b/crates/warp_features/src/lib.rs index c66d3acde9..163d2658a5 100644 --- a/crates/warp_features/src/lib.rs +++ b/crates/warp_features/src/lib.rs @@ -949,6 +949,13 @@ pub enum FeatureFlag { /// between credits and dollars. When disabled (prod/stable), the footer /// falls back to a static, non-interactive credits total. TuiCostTransparency, + + /// Gates client-side display of the real dollar cost (from `RequestCost.cost_in_cents`) + /// alongside credits in the GUI footer and TUI. Mirrors the server-side + /// `PricingTransparencyEnabled` flag in warp-server, but is a fully independent + /// flag — the two do not sync automatically. Temporary rollout gate; not yet + /// consumed anywhere. + PricingTransparency, } static FLAG_STATES: [AtomicBool; cardinality::()] = From d0db6275004168409d7b985d05454720075045e1 Mon Sep 17 00:00:00 2001 From: Joshua Ricker-Rampersad Date: Tue, 11 Aug 2026 11:31:43 -0400 Subject: [PATCH 2/3] Enable PricingTransparency for dogfood builds Add FeatureFlag::PricingTransparency to DOGFOOD_FLAGS so it's on by default for the development team. Not added to PREVIEW_FLAGS or RELEASE_FLAGS, and no flag_description() entry -- that list is reserved for PREVIEW_FLAGS members only (per the doc comment on flag_description), and this flag isn't in PREVIEW_FLAGS. Co-Authored-By: Warp Agent --- crates/warp_features/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/warp_features/src/lib.rs b/crates/warp_features/src/lib.rs index 163d2658a5..6f14beb6ac 100644 --- a/crates/warp_features/src/lib.rs +++ b/crates/warp_features/src/lib.rs @@ -1032,6 +1032,7 @@ pub const DOGFOOD_FLAGS: &[FeatureFlag] = &[ FeatureFlag::WellKnownMcpIds, FeatureFlag::FactoryMcp, FeatureFlag::TuiCostTransparency, + FeatureFlag::PricingTransparency, ]; /// Features enabled for feature preview build users (e.g.: Friends of Warp). From 07eb58deb95926d70ab07618c2db574e36d4ddb7 Mon Sep 17 00:00:00 2001 From: Joshua Ricker-Rampersad Date: Tue, 11 Aug 2026 11:46:43 -0400 Subject: [PATCH 3/3] Consolidate TuiCostTransparency into PricingTransparency Replace every FeatureFlag::TuiCostTransparency reference with FeatureFlag::PricingTransparency and remove the old flag entirely (enum variant + DOGFOOD_FLAGS entry). PricingTransparency now covers the TUI credits<->dollars toggle that TuiCostTransparency used to gate, plus the still-unbuilt GUI footer display. No behavior change: PricingTransparency was already in DOGFOOD_FLAGS, so dogfood/staging + local/dev builds keep the toggle enabled exactly as before; prod/stable stays disabled. Co-Authored-By: Warp Agent --- crates/warp_features/src/lib.rs | 17 +++++++---------- .../warp_tui/src/terminal_session_view_tests.rs | 4 ++-- crates/warp_tui/src/usage.rs | 4 ++-- crates/warp_tui/src/usage_tests.rs | 6 +++--- 4 files changed, 14 insertions(+), 17 deletions(-) diff --git a/crates/warp_features/src/lib.rs b/crates/warp_features/src/lib.rs index 6f14beb6ac..f7237c59e7 100644 --- a/crates/warp_features/src/lib.rs +++ b/crates/warp_features/src/lib.rs @@ -943,18 +943,16 @@ pub enum FeatureFlag { /// setup or API key required. FactoryMcp, - /// Gates the TUI cost footer's credits⇄dollars toggle. When enabled (dogfood - /// / staging and local/dev builds), the footer usage entry follows the - /// persisted `agents.usage_display_mode` setting and is click-to-toggleable - /// between credits and dollars. When disabled (prod/stable), the footer - /// falls back to a static, non-interactive credits total. - TuiCostTransparency, - /// Gates client-side display of the real dollar cost (from `RequestCost.cost_in_cents`) /// alongside credits in the GUI footer and TUI. Mirrors the server-side /// `PricingTransparencyEnabled` flag in warp-server, but is a fully independent - /// flag — the two do not sync automatically. Temporary rollout gate; not yet - /// consumed anywhere. + /// flag — the two do not sync automatically. Consolidated from the former + /// `TuiCostTransparency` flag: when enabled (dogfood/staging and local/dev + /// builds), the TUI footer usage entry follows the persisted + /// `agents.usage_display_mode` setting and is click-to-toggleable between + /// credits and dollars; when disabled (prod/stable), it falls back to a + /// static, non-interactive credits total. Will also gate the GUI footer's + /// dollar display once that's built. PricingTransparency, } @@ -1031,7 +1029,6 @@ pub const DOGFOOD_FLAGS: &[FeatureFlag] = &[ FeatureFlag::BoxDrawingGlyphs, FeatureFlag::WellKnownMcpIds, FeatureFlag::FactoryMcp, - FeatureFlag::TuiCostTransparency, FeatureFlag::PricingTransparency, ]; diff --git a/crates/warp_tui/src/terminal_session_view_tests.rs b/crates/warp_tui/src/terminal_session_view_tests.rs index db1142a935..8f76fd8a16 100644 --- a/crates/warp_tui/src/terminal_session_view_tests.rs +++ b/crates/warp_tui/src/terminal_session_view_tests.rs @@ -4891,11 +4891,11 @@ fn footer_usage_entry_is_hidden_until_the_conversation_reports_usage() { /// still renders the usage entry — `Cost unavailable` in cost mode, never /// `$0.00` — even when credits happen to be zero. Cost mode is only reachable /// while the credits⇄dollars toggle is enabled, so this exercises the -/// `TuiCostTransparency`-on path. +/// `PricingTransparency`-on path. #[test] fn footer_usage_entry_shows_unknown_cost_even_with_zero_credits() { App::test((), |mut app| async move { - let _cost_transparency = FeatureFlag::TuiCostTransparency.override_enabled(true); + let _cost_transparency = FeatureFlag::PricingTransparency.override_enabled(true); app.update(|ctx| { ctx.add_singleton_model(|_| Appearance::mock()); let builder = TuiUiBuilder::from_app(ctx); diff --git a/crates/warp_tui/src/usage.rs b/crates/warp_tui/src/usage.rs index ba6645a618..7b4f2b344f 100644 --- a/crates/warp_tui/src/usage.rs +++ b/crates/warp_tui/src/usage.rs @@ -35,7 +35,7 @@ impl UsageToggle { /// setting (the element pass only has an immutable [`AppContext`]). /// /// The credits⇄dollars toggle is gated behind - /// [`FeatureFlag::TuiCostTransparency`]. When the flag is disabled + /// [`FeatureFlag::PricingTransparency`]. When the flag is disabled /// (prod/stable), this falls back to the pre-CODE-1831 behavior: a static, /// non-interactive credits total. The usage entry is still shown — only the /// click-to-toggle affordance is removed, and the persisted display mode is @@ -49,7 +49,7 @@ impl UsageToggle { on_click: impl FnMut(&mut TuiEventContext, &AppContext) + 'static, ) -> Box { let builder = TuiUiBuilder::from_app(app); - if !FeatureFlag::TuiCostTransparency.is_enabled() { + if !FeatureFlag::PricingTransparency.is_enabled() { return TuiText::new(entry_text(TuiUsageDisplayMode::Credits, totals)) .with_style(builder.muted_text_style()) .truncate() diff --git a/crates/warp_tui/src/usage_tests.rs b/crates/warp_tui/src/usage_tests.rs index 00cbb6ae4b..df41dd36e8 100644 --- a/crates/warp_tui/src/usage_tests.rs +++ b/crates/warp_tui/src/usage_tests.rs @@ -63,7 +63,7 @@ fn cost_mode_explicitly_marks_unknown_historical_cost() { ); } -/// The credits⇄dollars toggle is gated behind `TuiCostTransparency`: with the +/// The credits⇄dollars toggle is gated behind `PricingTransparency`: with the /// flag off (prod/stable) the footer renders a static credits total and never /// exposes the dollar cost even when the persisted mode is `Cost`; with the /// flag on (dogfood/staging + local/dev) the entry follows the persisted mode. @@ -81,7 +81,7 @@ fn footer_usage_entry_gates_the_cost_toggle_behind_the_feature_flag() { // Flag OFF: static credits; the persisted `Cost` mode is ignored so the // dollar cost is never surfaced. app.read(|ctx| { - let _guard = FeatureFlag::TuiCostTransparency.override_enabled(false); + let _guard = FeatureFlag::PricingTransparency.override_enabled(false); let entry = toggle.render_entry(TuiUsageDisplayMode::Cost, usage, ctx, |_, _| {}); let line = TuiPresenter::new() .present_element(entry, TuiRect::new(0, 0, 20, 1), ctx) @@ -101,7 +101,7 @@ fn footer_usage_entry_gates_the_cost_toggle_behind_the_feature_flag() { // Flag ON: the entry follows the persisted display mode, exposing the // dollar cost the toggle switches to. app.read(|ctx| { - let _guard = FeatureFlag::TuiCostTransparency.override_enabled(true); + let _guard = FeatureFlag::PricingTransparency.override_enabled(true); let entry = toggle.render_entry(TuiUsageDisplayMode::Cost, usage, ctx, |_, _| {}); let line = TuiPresenter::new() .present_element(entry, TuiRect::new(0, 0, 20, 1), ctx)