From 761e6a5f43662ad04e87de10ddc258b1344753c7 Mon Sep 17 00:00:00 2001 From: advait-m Date: Mon, 18 May 2026 16:50:26 -0700 Subject: [PATCH] Use fg_overlay tokens for orchestration pill background The pill bar was rendering child pills with neutral_2/neutral_3, which pre-blend the overlay against pure theme.background(). But the pill bar sits on the agent-view surface (surface_overlay_1), so the painted color was darker than the Figma spec called for and the rest->hover contrast bump barely read. Switch to composing fg_overlay_2 (rest) and fg_overlay_3 (hover) over agent_view_bg_color and resolving to a solid so the avatar cutout ring keeps matching the painted pill exactly. Co-Authored-By: Oz --- .../agent_view/orchestration_pill_bar.rs | 26 ++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/app/src/ai/blocklist/agent_view/orchestration_pill_bar.rs b/app/src/ai/blocklist/agent_view/orchestration_pill_bar.rs index bf48bf8b3b..44e496d1a9 100644 --- a/app/src/ai/blocklist/agent_view/orchestration_pill_bar.rs +++ b/app/src/ai/blocklist/agent_view/orchestration_pill_bar.rs @@ -9,6 +9,7 @@ use std::hash::{Hash, Hasher}; use pathfinder_color::ColorU; use pathfinder_geometry::vector::vec2f; use warp_cli::agent::Harness; +use warp_core::ui::color::blend::Blend; use warp_core::ui::color::coloru_with_opacity; use warp_core::ui::theme::Fill; use warp_core::ui::{appearance::Appearance, theme::WarpTheme}; @@ -42,7 +43,9 @@ use crate::ai::blocklist::agent_view::orchestration_conversation_links::{ use crate::ai::blocklist::agent_view::orchestration_pill_bar_model::{ OrchestrationPillBarEvent, OrchestrationPillBarModel, }; -use crate::ai::blocklist::agent_view::{AgentViewController, AgentViewControllerEvent}; +use crate::ai::blocklist::agent_view::{ + agent_view_bg_color, AgentViewController, AgentViewControllerEvent, +}; use crate::ai::blocklist::orchestration_topology::descendant_conversation_ids_in_spawn_order; use crate::ai::blocklist::telemetry::{ BlocklistOrchestrationTelemetryEvent, PillBarActionKind, PillBarInteractionEvent, @@ -1681,6 +1684,17 @@ fn render_pill( let status = spec.status; let is_remote_child = spec.is_remote_child; + // Per Figma: fg_overlay_2 at rest, fg_overlay_3 on hover, composed over + // the agent-view surface. Pre-blend to a solid so the avatar cutout ring + // matches the painted pill exactly. + let pill_rest_bg = Fill::from(agent_view_bg_color(app)) + .blend(&internal_colors::fg_overlay_2(theme)) + .into_solid(); + let pill_hover_bg = Fill::from(agent_view_bg_color(app)) + .blend(&internal_colors::fg_overlay_3(theme)) + .into_solid(); + let pill_text_color = internal_colors::text_main(theme, theme.background()); + // `Hoverable::new`'s build closure is `FnOnce` (see // `crates/warpui_core/src/elements/hoverable.rs`). We can therefore move // `label` into the closure by value rather than cloning it on every @@ -1697,15 +1711,9 @@ fn render_pill( theme.background().into_solid(), ) } else if hover_state.is_hovered() || hover_state.is_clicked() || menu_is_open_for_this { - ( - warp_core::ui::theme::color::internal_colors::neutral_3(theme), - warp_core::ui::theme::color::internal_colors::text_main(theme, theme.background()), - ) + (pill_hover_bg, pill_text_color) } else { - ( - warp_core::ui::theme::color::internal_colors::neutral_2(theme), - warp_core::ui::theme::color::internal_colors::text_main(theme, theme.background()), - ) + (pill_rest_bg, pill_text_color) }; let show_dots = show_overflow_button && (hover_state.is_hovered() || menu_is_open_for_this);