Skip to content

Commit 839dac1

Browse files
authored
agent_ui: Add some UI tweaks to the subagents thread (zed-industries#49030)
Just some relatively small UI adjustments, like adding the forward arrow to make it clearer there's a hierarchy between the parent thread and the subagent thread, and a check icon to comunicate the subagent thread is done. <img width="500" height="612" alt="Screenshot 2026-02-12 at 11  47@2x" src="https://github.com/user-attachments/assets/d49319b5-9c19-435a-b5c7-424060fa0629" /> - [x] Code Reviewed - [x] Manual QA Release Notes: - N/A
1 parent 1ea2f2f commit 839dac1

3 files changed

Lines changed: 24 additions & 4 deletions

File tree

‎assets/icons/forward_arrow_up.svg‎

Lines changed: 4 additions & 0 deletions
Loading

‎crates/agent_ui/src/acp/thread_view/active_thread.rs‎

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2306,6 +2306,8 @@ impl AcpThreadView {
23062306
let title = self.thread.read(cx).title();
23072307
let server_view = self.server_view.clone();
23082308

2309+
let is_done = self.thread.read(cx).status() == ThreadStatus::Idle;
2310+
23092311
Some(
23102312
h_flex()
23112313
.h(Tab::container_height(cx))
@@ -2314,9 +2316,20 @@ impl AcpThreadView {
23142316
.w_full()
23152317
.justify_between()
23162318
.border_b_1()
2317-
.border_color(cx.theme().colors().border_variant)
2319+
.border_color(cx.theme().colors().border)
23182320
.bg(cx.theme().colors().editor_background.opacity(0.2))
2319-
.child(Label::new(title).color(Color::Muted))
2321+
.child(
2322+
h_flex()
2323+
.child(
2324+
Icon::new(IconName::ForwardArrowUp)
2325+
.size(IconSize::Small)
2326+
.color(Color::Muted),
2327+
)
2328+
.child(Label::new(title).color(Color::Muted).ml_2().mr_1())
2329+
.when(is_done, |this| {
2330+
this.child(Icon::new(IconName::Check).color(Color::Success))
2331+
}),
2332+
)
23202333
.child(
23212334
IconButton::new("minimize_subagent", IconName::Minimize)
23222335
.icon_size(IconSize::Small)
@@ -3616,6 +3629,8 @@ impl AcpThreadView {
36163629
if let Some(editing_index) = self.editing_message
36173630
&& editing_index < entry_ix
36183631
{
3632+
let is_subagent = self.is_subagent();
3633+
36193634
let backdrop = div()
36203635
.id(("backdrop", entry_ix))
36213636
.size_full()
@@ -3629,7 +3644,7 @@ impl AcpThreadView {
36293644
div()
36303645
.relative()
36313646
.child(primary)
3632-
.child(backdrop)
3647+
.when(!is_subagent, |this| this.child(backdrop))
36333648
.into_any_element()
36343649
} else {
36353650
primary
@@ -5876,7 +5891,7 @@ impl AcpThreadView {
58765891
if is_canceled_or_failed {
58775892
"Subagent Canceled"
58785893
} else {
5879-
"Spawning Subagent…"
5894+
"Creating Subagent…"
58805895
}
58815896
.into()
58825897
});

‎crates/icons/src/icons.rs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ pub enum IconName {
134134
FontSize,
135135
FontWeight,
136136
ForwardArrow,
137+
ForwardArrowUp,
137138
GenericClose,
138139
GenericMaximize,
139140
GenericMinimize,

0 commit comments

Comments
 (0)