Skip to content

Commit a8220f8

Browse files
harryalbertoz-agent
andcommitted
Fix cloud status badge using themed background instead of white
The cloud overlay in the icon-with-status component was hardcoded to ColorU::white(), making themed status icon colors (e.g. ansi_fg_green for success) nearly invisible in dark mode. Use badge_ring_background for the cloud fill instead, mirroring how the non-cloud status badge uses the same surface color for its cutout ring. Co-Authored-By: Oz <oz-agent@warp.dev>
1 parent 03ef4d0 commit a8220f8

1 file changed

Lines changed: 12 additions & 10 deletions

File tree

app/src/ui_components/icon_with_status.rs

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -125,13 +125,13 @@ pub(crate) enum IconWithStatusVariant {
125125
/// BR (more overhang) and negative values pull it inward toward the circle's center.
126126
///
127127
/// When `is_ambient` is set on an agent variant, the status badge is replaced by a
128-
/// white cloud containing the status icon.
128+
/// cloud (filled with `status_container_background`) containing the status icon.
129129
pub(crate) fn render_icon_with_status(
130130
variant: IconWithStatusVariant,
131131
total_size: f32,
132132
overlay_extra_overhang_ratio: f32,
133133
theme: &WarpTheme,
134-
badge_ring_background: WarpThemeFill,
134+
status_container_background: WarpThemeFill,
135135
) -> Box<dyn Element> {
136136
let sub_text = theme.sub_text_color(theme.background());
137137

@@ -174,7 +174,7 @@ pub(crate) fn render_icon_with_status(
174174
total_size,
175175
overlay_extra_overhang_ratio,
176176
theme,
177-
badge_ring_background,
177+
status_container_background,
178178
)
179179
}
180180
IconWithStatusVariant::CLIAgent {
@@ -201,7 +201,7 @@ pub(crate) fn render_icon_with_status(
201201
total_size,
202202
overlay_extra_overhang_ratio,
203203
theme,
204-
badge_ring_background,
204+
status_container_background,
205205
)
206206
}
207207
}
@@ -263,7 +263,7 @@ fn attach_status_overlay(
263263
total_size: f32,
264264
overlay_extra_overhang_ratio: f32,
265265
theme: &WarpTheme,
266-
badge_ring_background: WarpThemeFill,
266+
status_container_background: WarpThemeFill,
267267
) -> Box<dyn Element> {
268268
if is_ambient {
269269
render_with_cloud_status_badge(
@@ -272,6 +272,7 @@ fn attach_status_overlay(
272272
total_size,
273273
overlay_extra_overhang_ratio,
274274
theme,
275+
status_container_background,
275276
)
276277
} else {
277278
render_with_optional_status_badge(
@@ -280,24 +281,25 @@ fn attach_status_overlay(
280281
total_size,
281282
overlay_extra_overhang_ratio,
282283
theme,
283-
badge_ring_background,
284+
status_container_background,
284285
)
285286
}
286287
}
287288

288-
/// Overlays a white cloud (with the conversation status icon centered inside, if any) at
289+
/// Overlays a cloud (with the conversation status icon centered inside, if any) at
289290
/// the bottom-right of the base circle. Used for agents running in ambient/cloud mode.
290291
fn render_with_cloud_status_badge(
291292
circle: Box<dyn Element>,
292293
status: Option<&ConversationStatus>,
293294
total_size: f32,
294295
overlay_extra_overhang_ratio: f32,
295296
theme: &WarpTheme,
297+
status_container_background: WarpThemeFill,
296298
) -> Box<dyn Element> {
297299
let cloud_diameter = cloud_icon_size(total_size);
298300
let cloud = ConstrainedBox::new(
299301
WarpIcon::CloudFilled
300-
.to_warpui_icon(WarpThemeFill::Solid(ColorU::white()))
302+
.to_warpui_icon(status_container_background)
301303
.finish(),
302304
)
303305
.with_width(cloud_diameter)
@@ -361,7 +363,7 @@ fn render_with_optional_status_badge(
361363
total_size: f32,
362364
overlay_extra_overhang_ratio: f32,
363365
theme: &WarpTheme,
364-
badge_ring_background: WarpThemeFill,
366+
status_container_background: WarpThemeFill,
365367
) -> Box<dyn Element> {
366368
let Some(status) = status else {
367369
// No status badge: still occupy the full `total_size` footprint so the agent
@@ -386,7 +388,7 @@ fn render_with_optional_status_badge(
386388
// Cutout ring that visually separates the badge from the circle.
387389
let badge_with_ring = Container::new(badge)
388390
.with_uniform_padding(pad)
389-
.with_background(badge_ring_background)
391+
.with_background(status_container_background)
390392
.with_corner_radius(CornerRadius::with_all(Radius::Percentage(50.)))
391393
.finish();
392394

0 commit comments

Comments
 (0)