Skip to content
Open
Show file tree
Hide file tree
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
15 changes: 11 additions & 4 deletions app/src/ai/agent_management/view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ use crate::ai::blocklist::format_credits;
use crate::ai::conversation_details_panel::{
ConversationDetailsData, ConversationDetailsPanel, ConversationDetailsPanelEvent,
};
use crate::ai::conversation_status_ui::render_status_element;
use crate::ai::harness_availability::HarnessAvailabilityModel;
use crate::ai::harness_display;
use crate::app_state::PersistedAgentManagementFilters;
Expand All @@ -48,7 +47,9 @@ use crate::editor::{
use crate::menu::{MenuItem, MenuItemFields};
use crate::notebooks::NotebookId;
use crate::settings::ai::AISettings;
use crate::ui_components::agent_icon::agent_conversation_entry_icon_variant;
use crate::ui_components::avatar::{Avatar, AvatarContent};
use crate::ui_components::icon_with_status::render_icon_with_status;
use crate::util::time_format::format_approx_duration_from_now_utc;
use crate::view_components::action_button::{
ActionButton, ButtonSize, NakedTheme, PrimaryTheme, SecondaryTheme,
Expand Down Expand Up @@ -105,8 +106,9 @@ const CARD_CONTENT_PADDING: f32 = 12.;
const CARD_BORDER_RADIUS: f32 = 4.;
const CARD_MARGIN_BOTTOM: f32 = 8.;

const STATUS_ICON_SIZE: f32 = 12.;
const BUTTON_SIZE: f32 = 20.;
/// Total size of the agent icon-with-status component rendered in each card's header row.
const CARD_AGENT_ICON_SIZE: f32 = 24.;
const CREATOR_AVATAR_FONT_SIZE: f32 = 10.;

const SESSION_EXPIRED_TEXT: &str = "Sessions expire after one week and cannot be opened.";
Expand Down Expand Up @@ -1719,8 +1721,13 @@ impl AgentManagementView {

let title_text = Text::new_inline(entry.display.title.clone(), font_family, font_size)
.with_color(theme.active_ui_text_color().into());
let status_icon =
render_status_element(&entry.display.status, STATUS_ICON_SIZE, appearance);
let status_icon = render_icon_with_status(
agent_conversation_entry_icon_variant(entry),
CARD_AGENT_ICON_SIZE,
0.,
theme,
internal_colors::fg_overlay_1(theme),
);
let time_str = format_approx_duration_from_now_utc(entry.display.last_updated);
let time_text = Text::new_inline(time_str, font_family, font_size)
.with_color(theme.nonactive_ui_text_color().into());
Expand Down
6 changes: 3 additions & 3 deletions app/src/ui_components/agent_icon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,16 @@ pub(crate) fn terminal_view_agent_icon_variant(

pub(crate) fn agent_conversation_entry_icon_variant(
entry: &AgentConversationEntry,
) -> Option<IconWithStatusVariant> {
) -> IconWithStatusVariant {
let status = entry.display.status.to_conversation_status();
let is_ambient = matches!(entry.provenance, AgentConversationProvenance::AmbientRun)
|| entry.backing.has_ambient_run
|| entry.identity.ambient_agent_task_id.is_some();
Some(agent_icon_variant_for_run(
agent_icon_variant_for_run(
entry.display.harness.unwrap_or(Harness::Oz),
status,
is_ambient,
))
)
}

/// Primitive inputs to the terminal-view waterfall, gathered once from the live
Expand Down
2 changes: 1 addition & 1 deletion app/src/ui_components/agent_icon_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ fn non_ambient_entry_uses_display_harness() {
},
};

let variant = agent_conversation_entry_icon_variant(&entry).unwrap();
let variant = agent_conversation_entry_icon_variant(&entry);
assert_eq!(
AgentIconFields::from_variant(&variant).unwrap(),
AgentIconFields {
Expand Down
27 changes: 8 additions & 19 deletions app/src/workspace/view/conversation_list/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::ai::active_agent_views_model::ActiveAgentViewsModel;
use crate::ai::agent_conversations_model::{
AgentConversationEntry, AgentConversationEntryId, AgentConversationProvenance,
};
use crate::ai::conversation_status_ui::{render_status_element, STATUS_ELEMENT_PADDING};
use crate::ai::conversation_status_ui::STATUS_ELEMENT_PADDING;
use crate::appearance::Appearance;
use crate::drive::sharing::dialog::SharingDialog;
use crate::menu::Menu;
Expand Down Expand Up @@ -213,24 +213,13 @@ pub fn render_item(props: ItemProps<'_>, app: &AppContext) -> Box<dyn Element> {
}

let status_element_size = font_size + STATUS_ELEMENT_PADDING * 2.;
// Prefer the unified agent icon-with-status circle (brand color + cloud lobe for
// ambient runs) so the row matches the vertical tab / pane header. Fall back to the
// plain status-only icon when the helper can't produce an agent variant (never today,
// but keeps the surface future-proof).
let icon_element: Box<dyn Element> = match agent_conversation_entry_icon_variant(conversation) {
Some(variant) => render_icon_with_status(
variant,
LIST_ITEM_AGENT_SIZE,
LIST_ITEM_OVERLAY_EXTRA_OVERHANG,
theme,
theme.background(),
),
None => render_status_element(
&conversation.display.status.to_conversation_status(),
font_size,
appearance,
),
};
let icon_element = render_icon_with_status(
agent_conversation_entry_icon_variant(conversation),
LIST_ITEM_AGENT_SIZE,
LIST_ITEM_OVERLAY_EXTRA_OVERHANG,
theme,
theme.background(),
);

let icon_and_title_row = Shrinkable::new(
1.0,
Expand Down
Loading