Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 17 additions & 9 deletions app/src/ai/blocklist/agent_view/orchestration_pill_bar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand All @@ -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);
Expand Down
Loading