Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
214b800
Agent: move gpui to Zed c7bea343
AnthonyRonning Nov 11, 2026
b27807c
Agent: drop the terminal experiment from the gpui pin note
AnthonyRonning Nov 11, 2026
f34a561
Agent: draw gpui's frame times with MAPLE_FRAME_STATS
AnthonyRonning Nov 11, 2026
acdad79
Agent: add purposeful motion across chat, composer, menus and settings
matthewrball Nov 11, 2026
e4306d6
Agent: move reversible motion onto springs, with timing in one place
AnthonyRonning Nov 11, 2026
0f80e3b
Agent: one short call for an eased hover, used everywhere
AnthonyRonning Nov 11, 2026
23b8258
Agent: share the composer's layout numbers with its transition
AnthonyRonning Nov 11, 2026
9141605
Agent: stop the thread jumping when a message sends
AnthonyRonning Nov 12, 2026
9b2d5a1
Agent: Fold a turn's steps under one line that times the work
matthewrball Nov 12, 2026
5bbe505
Agent: Keep a turn's time under the turn the run worked on
matthewrball Nov 12, 2026
1d00136
Agent: Time only the runs a view watched from start to end
matthewrball Nov 12, 2026
f2c9e3c
Agent: Keep a run untimed once the view missed part of it
matthewrball Nov 12, 2026
8b21c25
Agent: Stop timing a run when a paged-back view skips its rows
matthewrball Nov 12, 2026
ece647e
Merge branch 'master' into ux/turn-timer
matthewrball Nov 17, 2026
3517bf7
Agent: add the Korean turn-line strings
matthewrball Nov 17, 2026
561955d
Agent: calm the turn line's mark and count whole seconds
matthewrball Nov 17, 2026
b80d096
Merge branch 'master' into ux/turn-timer
matthewrball Nov 17, 2026
5f8b47e
Agent: rest the whole mark between pulses and keep the finished time …
matthewrball Nov 17, 2026
b5dec06
Merge branch 'master' into ux/turn-timer
matthewrball Nov 18, 2026
359c89e
Agent: lap the mark's pulse all the way around the M
matthewrball Nov 18, 2026
f8be5a3
Agent: keep a shining line's letters in place as the band passes
matthewrball Nov 17, 2026
6e1499b
Agent: draw the mark's M as a stroke, then rest
matthewrball Nov 19, 2026
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
8 changes: 8 additions & 0 deletions apps/maple-agent/app/locales/de/app.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -1599,6 +1599,14 @@ chat-permission-reason-uncertain = Maple ist nicht sicher, ob diese Aktion siche
chat-permission-reason-unavailable = Maple konnte diese Aktion nicht prüfen.
chat-permission-reason-too-long = Diese Aktion ist zu lang, um von Maple geprüft zu werden.
chat-thinking-label = Maple denkt nach
chat-turn-working = Maple arbeitet
chat-turn-writing = Maple schreibt
chat-turn-waiting = Wartet auf dich
chat-turn-worked = Gearbeitet
# $seconds is a whole number of seconds, under 60.
chat-turn-worked-seconds = { $seconds } s gearbeitet
# $minutes is a whole number of minutes; $seconds is the rest, under 60.
chat-turn-worked-minutes = { $minutes } min { $seconds } s gearbeitet
chat-settings = Einstellungen
chat-usage = Nutzung
chat-usage-unavailable = Nutzung nicht verfügbar
Expand Down
8 changes: 8 additions & 0 deletions apps/maple-agent/app/locales/en/app.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -1599,6 +1599,14 @@ chat-permission-reason-uncertain = Maple isn't sure this is safe to run.
chat-permission-reason-unavailable = Maple couldn't check this action.
chat-permission-reason-too-long = This action is too long for Maple to check.
chat-thinking-label = Maple is thinking
chat-turn-working = Maple is working
chat-turn-writing = Maple is writing
chat-turn-waiting = Waiting for you
chat-turn-worked = Worked
# $seconds is a whole number of seconds, under 60.
chat-turn-worked-seconds = Worked for { $seconds }s
# $minutes is a whole number of minutes; $seconds is the rest, under 60.
chat-turn-worked-minutes = Worked for { $minutes }m { $seconds }s
chat-settings = Settings
chat-usage = Usage
chat-usage-unavailable = Usage unavailable
Expand Down
8 changes: 8 additions & 0 deletions apps/maple-agent/app/locales/es/app.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -1486,6 +1486,14 @@ chat-permission-reason-uncertain = Maple no está seguro de que sea seguro ejecu
chat-permission-reason-unavailable = Maple no pudo revisar esta acción.
chat-permission-reason-too-long = Esta acción es demasiado larga para que Maple la revise.
chat-thinking-label = Maple está pensando
chat-turn-working = Maple está trabajando
chat-turn-writing = Maple está escribiendo
chat-turn-waiting = Esperando tu respuesta
chat-turn-worked = Trabajó
# $seconds is a whole number of seconds, under 60.
chat-turn-worked-seconds = Trabajó { $seconds } s
# $minutes is a whole number of minutes; $seconds is the rest, under 60.
chat-turn-worked-minutes = Trabajó { $minutes } min { $seconds } s
chat-settings = Configuración
chat-usage = Uso
chat-usage-unavailable = Uso no disponible
Expand Down
8 changes: 8 additions & 0 deletions apps/maple-agent/app/locales/ko/app.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -1545,6 +1545,14 @@ chat-permission-reason-uncertain = Maple이 이 동작의 안전 여부를 확
chat-permission-reason-unavailable = Maple이 이 동작을 검사하지 못했어요.
chat-permission-reason-too-long = 이 동작은 너무 길어 Maple이 검사할 수 없어요.
chat-thinking-label = Maple이 생각하는 중이에요
chat-turn-working = Maple이 작업하는 중이에요
chat-turn-writing = Maple이 작성하는 중이에요
chat-turn-waiting = 응답을 기다리고 있어요
chat-turn-worked = 작업 완료
# $seconds is a whole number of seconds, under 60.
chat-turn-worked-seconds = { $seconds }초 동안 작업했어요
# $minutes is a whole number of minutes; $seconds is the rest, under 60.
chat-turn-worked-minutes = { $minutes }분 { $seconds }초 동안 작업했어요
chat-settings = 설정
chat-usage = 사용량
chat-usage-unavailable = 사용량을 확인할 수 없음
Expand Down
69 changes: 54 additions & 15 deletions apps/maple-agent/app/src/ui/chat/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ mod summaries;
mod tests;
mod thinking;
mod transcript;
mod turn;
#[cfg(test)]
mod upload_tests;
mod uploads;
Expand All @@ -68,7 +69,6 @@ use self::sidebar::SessionActivity;
use self::sidebar::{Sidebar, SidebarEvent, TaskActivity, session_summary_eq};
use self::transcript::{
ActiveSubagent, PlanEntry, PlanStatus, plan_entries, plan_finished, render_question_card,
render_waiting_indicator,
};

gpui::actions!(
Expand Down Expand Up @@ -655,11 +655,11 @@ pub struct ChatScreen {
snapshot_revision: u64,
/// Virtualized transcript state; bottom-aligned like a chat log.
list_state: gpui::ListState,
/// First and past-last transcript rows painted in view in the last
/// frame. A wheel outside the list reports them for paging and
/// images, as the list's own wheel reports its visible range; the
/// list's scroll top names no row while it rests at the end.
painted_rows: std::rc::Rc<std::cell::Cell<Option<(usize, usize)>>>,
/// The transcript rows painted in view in the last frame. A wheel
/// outside the list reports them for paging and images, as the list's
/// own wheel reports its visible range; the list's scroll top names no
/// row while it rests at the end.
painted_rows: transcript::PaintedRows,
/// Set when the transcript should jump to its newest content on the
/// next render (session switch or send); streaming follows only while
/// the view is already at the bottom.
Expand Down Expand Up @@ -833,8 +833,8 @@ pub struct ChatScreen {
/// Focus handle of the transcript; a selection press moves focus here
/// so the copy keybinding applies.
transcript_focus: Option<gpui::FocusHandle>,
/// True from send until the first agent item of the run arrives; shows
/// the waiting indicator under the transcript.
/// True from send until the first agent item of the run arrives. The
/// turn's line waits under the transcript meanwhile.
awaiting_first_token: bool,
/// Live row entrances and reveals in the transcript, kept here so a
/// row scrolled away and back never replays them.
Expand All @@ -845,6 +845,18 @@ pub struct ChatScreen {
/// Item ids whose tool card or thinking row was clicked; membership
/// inverts the `tool_details` default for that item.
toggled_tools: HashSet<String>,
/// Each row's place in its turn, rebuilt or extended with `timeline`.
turns: turn::Turns,
/// Lead item ids of turns whose line was clicked; membership inverts
/// the `tool_details` default for whether that turn's steps show.
toggled_turns: HashSet<String>,
/// How long finished turns worked, by lead item id. Only turns this
/// window timed have one.
turn_worked: HashMap<String, std::time::Duration>,
/// Clocks of the runs this window saw start, by session id.
run_clocks: HashMap<String, turn::TimedRun>,
/// A repaint for a running turn's time is on its way.
run_tick_pending: std::cell::Cell<bool>,
/// Ticked options of a multi-select question.
question_selected: HashMap<usize, QuestionSelection>,
/// Index of the question being shown within the current card; a batch
Expand Down Expand Up @@ -1143,6 +1155,7 @@ impl ChatScreen {
/// tasks wait, run, or ended unseen, and the recent roots. Called when
/// any of them changed; the sidebar rebuilds only what moved.
fn sync_sidebar(&mut self, cx: &mut Context<Self>) {
self.sync_run_clocks();
let sessions = self.sessions.clone();
let selected = self.sidebar_selection();
let activity = self.task_activity();
Expand All @@ -1159,6 +1172,7 @@ impl ChatScreen {
/// Push only the row indicators: a question arrived or went away.
/// Other computers' sidebars show them too.
fn sync_sidebar_activity(&mut self, cx: &mut Context<Self>) {
self.sync_run_clocks();
let activity = self.task_activity();
self.sidebar
.update(cx, |sidebar, cx| sidebar.set_activity(activity, cx));
Expand Down Expand Up @@ -1680,6 +1694,11 @@ impl ChatScreen {
row_motion: transcript::RowMotion::default(),
loading_since: None,
toggled_tools: HashSet::new(),
turns: turn::Turns::default(),
toggled_turns: HashSet::new(),
turn_worked: HashMap::new(),
run_clocks: HashMap::new(),
run_tick_pending: std::cell::Cell::new(false),
question_selected: HashMap::new(),
question_step: 0,
question_step_answers: HashMap::new(),
Expand Down Expand Up @@ -3469,6 +3488,7 @@ impl ChatScreen {
self.timeline = timeline.into_iter().map(paging::normalize).collect();
self.pages.weights.clear();
self.bound_transcript_window(true);
self.turns.rebuild(&self.timeline);
self.timeline_index = self
.timeline
.iter()
Expand Down Expand Up @@ -3757,6 +3777,8 @@ impl ChatScreen {
self.attachment_queue.clear();
self.attachment_viewport = 0..0;
self.toggled_tools.clear();
self.toggled_turns.clear();
self.turn_worked.clear();
if let Some(composer) = self.composer.clone() {
composer.update(cx, |input, cx| input.reset_vim_context(cx));
}
Expand Down Expand Up @@ -6257,6 +6279,11 @@ impl ChatScreen {
// needs a fresh bounded open, so keep Reload latest available even
// after paging reaches the committed tail.
self.pages.live_has_more = true;
// A row the view did not take in: the run can no longer be
// timed, as when its task is not the one on screen.
if let Some(timed) = self.run_clocks.get_mut(session_id) {
timed.stop_timing();
}
return None;
}
if let Some(index) = alias_index
Expand All @@ -6278,6 +6305,7 @@ impl ChatScreen {
self.timeline_index.insert(item.id.clone(), (index, 0));
self.rekey_summary(&old, &item.id);
self.row_motion.rekey(&old, &item.id);
self.rekey_turn(&old, &item.id);
}
if let Some((index, _)) = self.timeline_index.get(&item.id)
&& let (Some(old), Some(new)) = (&self.timeline[*index].persisted, &item.persisted)
Expand Down Expand Up @@ -6326,6 +6354,7 @@ impl ChatScreen {
..
} = item;
let existing = &mut self.timeline[index];
let part = turn::part(existing);
existing.revision = incoming_revision;
if let Some(label) = incoming_label {
match &mut existing.label {
Expand Down Expand Up @@ -6361,6 +6390,12 @@ impl ChatScreen {
existing.output = incoming_output.or_else(|| existing.output.take());
existing.merge = incoming_merge;
}
// A row that became a step, or stopped being one, moves
// every row after it to another place in its turn.
if turn::part(&self.timeline[index]) != part {
self.turns.rebuild(&self.timeline);
self.list_state.remeasure_items(index..self.timeline.len());
}
index
}
None => {
Expand All @@ -6371,8 +6406,10 @@ impl ChatScreen {
motion::now(),
self.list_state.is_following_tail(),
);
self.turns.push(&item);
self.timeline.push(item);
self.list_state.splice(index..index, 1);
self.time_arrival(session_id, index);
index
}
};
Expand Down Expand Up @@ -6441,7 +6478,7 @@ impl ChatScreen {
}

/// Whether the slot under the transcript shows something: the message
/// being sent or the waiting dots.
/// being sent or the turn's line.
fn waiting_slot_shown(&self) -> bool {
self.has_send_feedback() || (self.awaiting_first_token && self.is_run_active())
}
Expand All @@ -6466,7 +6503,7 @@ impl ChatScreen {
let Some(index) = self.apply_timeline_item(session_id, item) else {
return;
};
// The waiting row (or the sent message's status) leaves the slot
// The turn's line (or the sent message's status) leaves the slot
// under the transcript as this row arrives: the row opens from that
// height, so nothing above it jumps.
if new_row && self.row_motion.slot_on_screen && !self.waiting_slot_shown() {
Expand Down Expand Up @@ -7119,6 +7156,11 @@ impl ChatScreen {
.timeline_revisions
.entry(session_id.to_string())
.or_insert(0) += 1;
// A run whose rows this view did not take in is no longer one it
// can time: it cannot tell where the run's turns began.
if let Some(timed) = self.run_clocks.get_mut(session_id) {
timed.stop_timing();
}
}

/// Drop every queued question of a session whose run ended.
Expand Down Expand Up @@ -7154,6 +7196,7 @@ impl ChatScreen {
AgentRunEvent::Started => {
self.active_runs
.insert(session_id.to_string(), run_id.to_string());
self.run_began(session_id, run_id, cx);
// The sections read `active_runs`; keep them in step.
self.sync_sidebar(cx);
self.start_usage_poller(session_id.to_string(), cx);
Expand Down Expand Up @@ -7279,7 +7322,7 @@ impl ChatScreen {
self.clear_session_questions(session_id, cx);
}
if self.is_selected(session_id) {
// Another task finishing must not hide the dots for
// Another task finishing must not hide the line for
// the send that is still waiting here.
self.awaiting_first_token = false;
self.refresh_context_usage(cx);
Expand Down Expand Up @@ -8462,10 +8505,6 @@ impl ChatScreen {
},
)),
)
.when(
self.awaiting_first_token && self.is_run_active(),
|column| column.child(div().mt_6().child(render_waiting_indicator())),
)
.children(privacy)
.when_some(self.runtime_error.clone(), |column, error| {
column.child(widgets::banner(widgets::Tone::Error, error).mt_6())
Expand Down
63 changes: 56 additions & 7 deletions apps/maple-agent/app/src/ui/chat/navigation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ use super::ChatScreen;
use super::commands::ChatCommand;
use super::composer::ComposerControl;
use super::transcript::{PlanStatus, attachment_refs, has_tool_input, plan_entries, plan_finished};
use super::turn::TurnRow;
use crate::ui::application_vim::{self, CountOutcome, CountState, SpatialDirection};
use crate::ui::i18n::UiText;
use crate::ui::text_input::vim::VimMode;
Expand Down Expand Up @@ -660,6 +661,11 @@ impl ChatScreen {
let Some(&(index, _)) = self.timeline_index.get(&item_id) else {
return;
};
// On a turn's first step the selection is the turn's line.
if self.turns.row(index) == TurnRow::Lead {
self.toggle_turn(&item_id, cx);
return;
}
let Some(item) = self.timeline.get(index) else {
return;
};
Expand Down Expand Up @@ -704,6 +710,15 @@ impl ChatScreen {
return;
}
let current = self.tool_details != self.toggled_tools.contains(item_id);
// A turn's first step sits under the turn's line: the line opens
// before the step's details do, and folds after them.
if self.turns.row(index) == TurnRow::Lead
&& self.turn_open(index) != expanded
&& (expanded || !current)
{
self.toggle_turn(item_id, cx);
return;
}
if current != expanded {
if !self.toggled_tools.insert(item_id.to_owned()) {
self.toggled_tools.remove(item_id);
Expand Down Expand Up @@ -782,11 +797,42 @@ impl ChatScreen {
pub(super) fn navigable_timeline_ids(&self) -> Vec<String> {
self.timeline
.iter()
.filter(|item| timeline_item_is_navigable(item))
.map(|item| item.id.clone())
.enumerate()
.filter(|(index, item)| self.timeline_row_navigable(*index, item))
.map(|(_, item)| item.id.clone())
.collect()
}

/// Whether the selection can rest on the row at `index`. A step under
/// a folded line draws nothing, and a turn's first step always draws
/// the line.
fn timeline_row_navigable(&self, index: usize, item: &AgentTimelineItem) -> bool {
match self.turns.row(index) {
TurnRow::Lead => true,
TurnRow::Step(lead) => self.turn_open(lead) && timeline_item_is_navigable(item),
TurnRow::Plain => timeline_item_is_navigable(item),
}
}

/// A turn folded: a selection on one of its steps moves to its line.
pub(super) fn keep_application_selection_shown(&mut self, lead: usize) {
if !self.application_vim_enabled {
return;
}
let Some(task_id) = self.selected_session.clone() else {
return;
};
let hidden = self
.selected_transcript_id()
.and_then(|id| self.timeline_index.get(id))
.is_some_and(|(index, _)| self.turns.row(*index) == TurnRow::Step(lead));
if hidden && let Some(item) = self.timeline.get(lead) {
self.application_vim
.transcript_by_task
.insert(task_id, item.id.clone());
}
}

fn ensure_transcript_application_selection(&mut self) {
let ids = self.navigable_timeline_ids();
let Some(task_id) = self.selected_session.clone() else {
Expand Down Expand Up @@ -935,8 +981,10 @@ impl ChatScreen {
let newest = self
.timeline
.iter()
.enumerate()
.rev()
.find(|item| timeline_item_is_navigable(item));
.find(|(index, item)| self.timeline_row_navigable(*index, item))
.map(|(_, item)| item);
if let Some(item) = newest {
self.application_vim
.transcript_by_task
Expand All @@ -962,10 +1010,11 @@ impl ChatScreen {
cx: &mut Context<Self>,
) {
if !self.application_vim_enabled
|| !self
.timeline
.iter()
.any(|item| item.id == item_id && timeline_item_is_navigable(item))
|| !self.timeline_index.get(item_id).is_some_and(|(index, _)| {
self.timeline
.get(*index)
.is_some_and(|item| self.timeline_row_navigable(*index, item))
})
{
return;
}
Expand Down
5 changes: 5 additions & 0 deletions apps/maple-agent/app/src/ui/chat/paging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,11 @@ impl ChatScreen {
.enumerate()
.map(|(i, item)| (item.id.clone(), (i, 0)))
.collect();
self.turns.rebuild(&self.timeline);
self.toggled_turns
.retain(|id| self.timeline_index.contains_key(id));
self.turn_worked
.retain(|id, _| self.timeline_index.contains_key(id));
self.markdown_cache.clear();
self.derived.clear();
self.messages = Default::default();
Expand Down
Loading
Loading