Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.
feat(agent-tui): padded user prompt, bulleted answers, notice glyphs and a Worked-for receipt
Akarshan Biswas281d17e3fa07
diff --git a/docs/src/pages/docs/agent/console.mdx b/docs/src/pages/docs/agent/console.mdxindex ce4ecb448..b6f06cbb1 100644--- a/docs/src/pages/docs/agent/console.mdx+++ b/docs/src/pages/docs/agent/console.mdx@@ -25,14 +25,16 @@ jan --task "..." # with a first message already sent─────────────────────────────────────────────────────────────────────────────────────MCP ready: sequential-thinking, serper- > add a --version flag++ › add a --version flag+• Read 3 files• Edited src/cli.rs- Done - the flag is wired up and documented.+ • Done - the flag is wired up and documented.- 2026-07-29 11:32:02 ↑ 43K ↓ 1.1K ⏱ 1.8s ⚡ 109.8/s+ Worked for 12s • 14:02 • ↑ 43K ↓ 1.1K • 45.6/s─────────────────────────────────────────────────────────────────────────────────────> Type here to chat with agent@@ -43,10 +45,21 @@ jan --task "..." # with a first message already sent| --- | --- || Header | Model, reasoning effort, clock, turn count, context usage, prompt-cache hit rate, throughput, state || Transcript | The conversation, with tool calls folded into summary rows |-| Receipt | Per turn: context sent, tokens produced, elapsed, rate |+| Receipt | Per turn: how long it took, when it finished, context sent, tokens produced, rate || Input | Where you type || Footer | Working directory and git branch |+Your own messages are the one filled block in the transcript: a full-width tinted bubble with a+row of padding above and below, the text behind a `›`. A `/command` or skill you invoke shows in+the same bubble. The agent's answer starts with a dim `•` and the rest of it - code boxes and+tables included - is indented under it. When the turn ends, a dim receipt lines up under the+answer: `Worked for 12s • 14:02 • ↑ 43K ↓ 1.1K • 45.6/s` - the duration, the time it finished+(with the date when it was not today, `Oct 7 14:02`), context sent, tokens produced, and+throughput when there was output to measure.++Notes from Jan itself carry a glyph in the left column: `•` for information, a yellow `⚠` for a+warning, and a red `■` for an error, so a failure stands out even without colour.+Tool rows fold to one line each: a `•` bullet, then the verb and what it acted on (`Ran cargotest`, `Edited src/cli.rs`). The bullet's colour is the call's state: it pulses while the callruns, then turns green when it succeeds, red when it fails, and yellow when the turn was cancelleddiff --git a/docs/src/pages/docs/agent/context.mdx b/docs/src/pages/docs/agent/context.mdxindex aa71bd083..311a23745 100644--- a/docs/src/pages/docs/agent/context.mdx+++ b/docs/src/pages/docs/agent/context.mdx@@ -26,10 +26,11 @@ only when a turn ends.At the end of a turn you get a receipt:```-2026-07-29 11:32:02 ↑ 43K ↓ 1.1K ⏱ 1.8s ⚡ 109.8/s+ Worked for 12s • 14:02 • ↑ 43K ↓ 1.1K • 45.6/s```-`↑` is context sent, `↓` tokens produced, then elapsed time and throughput. The two differ on+First how long the turn took and when it finished, then `↑` context sent, `↓` tokens produced, and+throughput. The two differ onpurpose: context is the size of the request, output is what came back.### The `/context` overlaydiff --git a/docs/src/pages/docs/agent/quickstart.mdx b/docs/src/pages/docs/agent/quickstart.mdxindex eb9754216..d95d02c18 100644--- a/docs/src/pages/docs/agent/quickstart.mdx+++ b/docs/src/pages/docs/agent/quickstart.mdx@@ -137,10 +137,10 @@ Press <kbd>y</kbd> to allow it once, <kbd>a</kbd> to stop being asked for that kWhile the agent runs you'll see each tool call as it happens, and a receipt when the turn ends:```-2026-07-29 11:32:02 ↑ 43K ↓ 1.1K ⏱ 1.8s ⚡ 109.8/s+ Worked for 12s • 14:02 • ↑ 43K ↓ 1.1K • 45.6/s```-That's the time, context sent, tokens produced, how long it took, and throughput.+That's how long the turn took, when it finished, context sent, tokens produced, and throughput.Press <kbd>Esc</kbd> at any point to cancel the current turn. Press <kbd>Ctrl</kbd>+<kbd>D</kbd> toquit.diff --git a/src-tauri/src/core/cli/tui.rs b/src-tauri/src/core/cli/tui.rsindex 73d92f62a..aa9c6c75f 100644--- a/src-tauri/src/core/cli/tui.rs+++ b/src-tauri/src/core/cli/tui.rs@@ -41,8 +41,8 @@ mod theme;mod vibe_setting;use markdown::{- format_markdown_lines, live_assistant_lines, reasoning_detail_lines, reasoning_summary_row,- reasoning_tail_lines,+ answer_lines, format_markdown_lines, live_assistant_lines, reasoning_detail_lines,+ reasoning_summary_row, reasoning_tail_lines,};use super::agent_status::AgentStatusReporter;@@ -424,6 +424,10 @@ enum Kind {/// one marker.const SYSTEM_GLYPH: &str = "•";+/// Gutter glyphs for a warning and an error note.+const WARN_GLYPH: &str = "⚠";+const ERROR_GLYPH: &str = "■";+/// Gutter glyph for goal-loop lines, matching the header's `◎ /goal` badge.const GOAL_GLYPH: &str = "◎";@@ -447,12 +451,25 @@ enum Level {}impl Level {+ /// Gutter glyph: the shape repeats the colour's message, so an error or a+ /// warning still stands out on a terminal that drops the colour.+ fn glyph(self) -> &'static str {+ match self {+ Level::Info | Level::Good => SYSTEM_GLYPH,+ Level::Warn => WARN_GLYPH,+ Level::Error => ERROR_GLYPH,+ }+ }+/// `(gutter, body)` styles. The gutter always carries colour so the marker/// is scannable down the left edge even when the body is dim.fn styles(self) -> (Style, Style) {match self {Level::Info => (Style::new().light_blue(), Style::new().dim()),- Level::Warn => (Style::new().yellow(), Style::new().yellow()),+ Level::Warn => {+ let warn = Style::new().fg(theme::warning());+ (warn, warn)+ }Level::Error => (Style::new().red().bold(), Style::new().red().bold()),Level::Good => (Style::new().green(), Style::new().green().bold()),}@@ -1828,7 +1845,7 @@ impl RowKind {fn render(&self, width: u16) -> Vec<Line<'static>> {match self {RowKind::Line(line) => vec![line.clone()],- RowKind::Markdown(text) => format_markdown_lines(text, width),+ RowKind::Markdown(text) => answer_lines(text, width),RowKind::Banner(banner) => banner_lines(banner, width),RowKind::System {glyph,@@ -1854,7 +1871,7 @@ impl RowKind {)],);match bg {- Some(bg) => band_rows(lines, *bg),+ Some(bg) => band_rows(lines, *bg, width),None => lines,}}@@ -3506,8 +3523,8 @@ impl App {}/// Append a line the *app* is saying, in its own gutter column. Every other- /// transcript class owns one (the user bubble, `• ` tool, `┊ ` reasoning), so- /// without it a note is indistinguishable from model prose. `glyph` names the+ /// transcript class owns one (the user's `› ` bubble, `• ` tool, `┊ ` reasoning),+ /// so without it a note is indistinguishable from model prose. `glyph` names the/// category and `level` carries severity.fn system_marked(&mut self, glyph: &'static str, level: Level, text: &str) {self.scrollback = 0;@@ -3523,7 +3540,7 @@ impl App {}fn system(&mut self, level: Level, text: &str) {- self.system_marked(SYSTEM_GLYPH, level, text);+ self.system_marked(level.glyph(), level, text);}/// A dim informational note: the common case, and what every `/command`@@ -5444,16 +5461,10 @@ impl App {// A `System` row rather than a `Line`: a pasted or shift-entered message// carries its own newlines, and a single `Line` renders those as blank// cells in one run-on row.- self.push_row(RowKind::System {- glyph: "",- cont: "",- gutter: Style::new().light_magenta().bold(),- body: vec![Span::styled(- text.to_string(),- Style::new().bold().fg(user_bubble_fg()),- )],- bg: Some(user_bubble_bg()),- });+ self.push_row(user_bubble(vec![Span::styled(+ text.to_string(),+ Style::new().bold().fg(user_bubble_fg()),+ )]));for name in images {let label = if name.is_empty() {"[IMAGE]".to_string()@@ -5481,13 +5492,7 @@ impl App {));}self.gap(Kind::User);- self.push_row(RowKind::System {- glyph: "",- cont: "",- gutter: Style::new().light_magenta().bold(),- body,- bg: Some(user_bubble_bg()),- });+ self.push_row(user_bubble(body));}/// The row a slash invocation commits, plus its journal entry -- the two@@ -7044,10 +7049,12 @@ impl App {.and_then(|u| u.completion_tokens).unwrap_or(0);}+ let now = chrono::Local::now();let stats = turn_stats_line(self.turn_prompt_tokens,self.turn_output_tokens,started.elapsed(),+ receipt_clock(now, now.date_naive()),);self.gap(Kind::Meta);self.push(stats);@@ -8429,25 +8436,47 @@ fn user_bubble_fg() -> Color {t.fit(user_bubble_fg_for(t.light))}-/// Tint a run of gutter rows as one filled bubble: every span carries the-/// background and each row is padded to the widest so the block reads as a card-/// rather than a ragged run of tinted fragments. The padded width is capped at-/// the frame so the extra column never forces a wrap.-fn band_rows(lines: Vec<Line<'static>>, bg: Color) -> Vec<Line<'static>> {- let target = lines.iter().map(row_width).max().unwrap_or(0);- lines- .into_iter()- .map(|line| {- let pad = target.saturating_sub(row_width(&line)) + 1;- let mut spans: Vec<Span<'static>> = line- .spans- .into_iter()- .map(|s| Span::styled(s.content, s.style.bg(bg)))- .collect();- spans.push(Span::styled(" ".repeat(pad), Style::new().bg(bg)));- Line::from(spans)- })- .collect()+/// Gutter glyph on a user turn's first line; continuations indent under it.+const USER_GLYPH: &str = "›";++/// A user turn (typed prompt or slash/skill invocation label): `body` in the+/// filled full-width bubble behind an accent `›` gutter. The bubble is the+/// only filled element in the transcript, so the user's own words are what the+/// eye lands on when scanning back.+fn user_bubble(body: Vec<Span<'static>>) -> RowKind {+ RowKind::System {+ glyph: USER_GLYPH,+ cont: " ",+ gutter: Style::new().fg(theme::accent()).bold(),+ body,+ bg: Some(user_bubble_bg()),+ }+}++/// Tint a run of gutter rows as one filled bubble spanning the whole transcript+/// `width`, with a blank tinted row above and below the text. Every span+/// carries the background and each row is padded to the frame edge, so the+/// block reads as a card -- the one filled element in the transcript -- rather+/// than a ragged run of tinted fragments.+fn band_rows(lines: Vec<Line<'static>>, bg: Color, width: u16) -> Vec<Line<'static>> {+ let fill = |n: usize| Span::styled(" ".repeat(n), Style::new().bg(bg));+ let width = width as usize;+ let mut out = Vec::with_capacity(lines.len() + 2);+ out.push(Line::from(fill(width)));+ for line in lines {+ let pad = width.saturating_sub(row_width(&line));+ let mut spans: Vec<Span<'static>> = line+ .spans+ .into_iter()+ .map(|s| Span::styled(s.content, s.style.bg(bg)))+ .collect();+ if pad > 0 {+ spans.push(fill(pad));+ }+ out.push(Line::from(spans));+ }+ out.push(Line::from(fill(width)));+ out}/// The band behind a changed diff row at the theme's depth, or `None` on a@@ -21525,28 +21554,42 @@ fn compact_tokens(n: u64) -> String {}}-/// Per-turn receipt: wall-clock, context sent, tokens produced, elapsed, rate.-fn turn_stats_line(prompt_tokens: u64, output_tokens: u64, elapsed: Duration) -> Line<'static> {- let secs = elapsed.as_secs_f64();- let rate = tokens_per_second(output_tokens, elapsed.as_millis() as u64);- let dim = Style::new().fg(theme::muted());- let mut spans = vec![Span::styled(local_timestamp(), dim)];- for (glyph, value) in [- ("↑", compact_tokens(prompt_tokens)),- ("↓", compact_tokens(output_tokens)),- ("⏱", format!("{secs:.1}s")),- ("⚡", format!("{rate:.1}/s")),- ] {- spans.push(Span::styled(format!(" {glyph} "), dim));- spans.push(Span::styled(value, Style::new().dim()));+/// Per-turn receipt, one dim line indented under the answer:+/// `Worked for 12s • 14:02 • ↑ 43K ↓ 1.1K • 45.6/s`. The rate is left out+/// when the turn produced no measurable output.+fn turn_stats_line(+ prompt_tokens: u64,+ output_tokens: u64,+ elapsed: Duration,+ clock: String,+) -> Line<'static> {+ let mut parts = vec![+ format!("Worked for {}", format_elapsed(elapsed.as_secs())),+ clock,+ format!(+ "↑ {} ↓ {}",+ compact_tokens(prompt_tokens),+ compact_tokens(output_tokens)+ ),+ ];+ if output_tokens > 0 {+ let rate = tokens_per_second(output_tokens, elapsed.as_millis() as u64);+ parts.push(format!("{rate:.1}/s"));}- Line::from(spans)+ Line::from(Span::styled(+ format!(" {}", parts.join(" • ")),+ Style::new().fg(theme::muted()),+ ))}-/// `YYYY-MM-DD HH:MM` in local time, without pulling in a date library:-/// `chrono` is already a dependency, so this is just the formatting choice.-fn local_timestamp() -> String {- chrono::Local::now().format("%Y-%m-%d %H:%M").to_string()+/// When a turn finished, for its receipt: `14:02` when that is `today`, else+/// `Oct 7 14:02`, so a receipt never reads as today's when it is not.+fn receipt_clock(finished: chrono::DateTime<chrono::Local>, today: chrono::NaiveDate) -> String {+ if finished.date_naive() == today {+ finished.format("%H:%M").to_string()+ } else {+ finished.format("%b %-d %H:%M").to_string()+ }}/// Compact elapsed time: `12s`, `1m 05s`, `1h 02m`. The zero-padded second@@ -23869,8 +23912,9 @@ mod tests {}/// The user turn renders as a filled bubble (the terminal analog of the- /// desktop's `bg-secondary` chat bubble), so every wrapped line carries the- /// background across the gutter, the text and the trailing padding.+ /// desktop's `bg-secondary` chat bubble): full transcript width, one tinted+ /// padding row above and below the text, an accent `›` on the first line+ /// and a two-column indent on the rest.#[test]fn user_message_renders_as_a_filled_bubble() {let mut app = test_app();@@ -23879,30 +23923,75 @@ mod tests {let fg = super::user_bubble_fg();let row = app.transcript.last().expect("no user row");let lines = row.lines(60);- assert_eq!(lines.len(), 2, "one bubble line per source line");+ let text: Vec<String> = lines.iter().map(line_text).collect();+ assert_eq!(text.len(), 4, "padding, two text lines, padding: {text:?}");+ assert!(text[0].trim().is_empty(), "padding row above: {text:?}");+ assert!(text[3].trim().is_empty(), "padding row below: {text:?}");+ assert_eq!(text[1].trim_end(), "\u{203a} first line");+ assert_eq!(text[2].trim_end(), " second line");+ assert_eq!(+ lines[1].spans[0].style.fg,+ Some(super::theme::accent()),+ "the glyph takes the accent"+ );for line in &lines {assert!(line.spans.iter().all(|s| s.style.bg == Some(bg)),"every span must carry the bubble background: {line:?}");+ assert_eq!(super::row_width(line), 60, "bubble spans the width: {line:?}");+ }+ for line in &lines[1..3] {assert!(line.spans.iter().any(|s| !s.content.trim().is_empty() && s.style.fg == Some(fg)),"the message text must carry the contrast foreground: {line:?}");- let last = line.spans.last().expect("empty bubble line");- assert!(- last.content.chars().all(|c| c == ' '),- "bubble ends in a padding column: {last:?}"- );- assert!(- super::row_width(line) <= 60,- "bubble padding must not overflow the frame: {line:?}"- );}}+ /// The bubble is the transcript's one filled element: notes, tool rows,+ /// answers and the receipt leave the background alone.+ #[test]+ fn only_the_user_bubble_fills_its_background() {+ let mut app = test_app();+ app.submit_user("go".into());+ app.note("model switched");+ app.system(super::Level::Warn, "finished early");+ app.system(super::Level::Error, "502 from the provider");+ app.apply(StreamEvent::ToolCall {+ id: "t1".into(),+ name: "bash".into(),+ args: json!({"command": "ls"}),+ });+ app.apply(StreamEvent::ToolResult {+ id: "t1".into(),+ content: "ok".into(),+ is_error: false,+ diff: None,+ });+ app.finalize_tool_group();+ app.assistant_buf = "Done, see `main.rs`.\n\n```rust\nfn main() {}\n```".into();+ app.flush_assistant();+ app.on_done("stop".into(), None);+ let bubble = super::user_bubble_bg();+ let mut filled = 0;+ for row in &app.transcript {+ for line in row.lines(60) {+ for span in &line.spans {+ match span.style.bg {+ Some(bg) if bg == bubble => filled += 1,+ Some(bg) => panic!("{bg:?} fill outside the bubble: {line:?}"),+ None => {}+ }+ }+ assert_eq!(line.style.bg, None, "line-level fill: {line:?}");+ }+ }+ assert!(filled > 0, "the user turn lost its bubble");+ }+/// The expanded (Ctrl-O) view is where the full output lives, so a line/// wider than the terminal wraps there instead of eliding.#[test]@@ -33112,11 +33201,11 @@ mod tests {"diff panel: {resumed}");assert!(resumed.contains("Answer."), "{resumed}");- // Every rendered row returns; the turn receipt (`↑ tokens ⏱ elapsed`) is+ // Every rendered row returns; the turn receipt (`Worked for ...`) is// deliberately transient, like notes and permission prompts.assert!(live.lines()- .filter(|l| !l.contains('⏱'))+ .filter(|l| !l.contains("Worked for ")).all(|l| resumed.contains(l.trim_end())),"every live row must come back\nlive:\n{live}\nresumed:\n{resumed}");@@ -38766,6 +38855,33 @@ mod tests {assert_eq!(format_elapsed(3720), "1h 02m");}+ #[test]+ fn turn_receipt_reads_as_one_dim_worked_for_line() {+ let line = |out, ms| {+ let l =+ super::turn_stats_line(43_000, out, Duration::from_millis(ms), "14:02".into());+ (l.spans.iter().map(|s| s.content.to_string()).collect::<String>(), l)+ };+ let (text, l) = line(1_100, 12_000);+ assert_eq!(+ text,+ " Worked for 12s \u{2022} 14:02 \u{2022} \u{2191} 43K \u{2193} 1.1K \u{2022} 91.7/s"+ );+ assert!(l.spans.iter().all(|s| s.style.fg == Some(super::theme::muted())), "{l:?}");+ // No output, no rate: `0.0/s` would read as a stalled model.+ let (text, _) = line(0, 65_000);+ assert_eq!(text, " Worked for 1m 05s \u{2022} 14:02 \u{2022} \u{2191} 43K \u{2193} 0");+ }++ #[test]+ fn receipt_clock_names_the_day_only_when_it_is_not_today() {+ use chrono::TimeZone;+ let finished = chrono::Local.with_ymd_and_hms(2026, 10, 7, 14, 2, 0).unwrap();+ assert_eq!(super::receipt_clock(finished, finished.date_naive()), "14:02");+ let next_day = finished.date_naive().succ_opt().unwrap();+ assert_eq!(super::receipt_clock(finished, next_day), "Oct 7 14:02");+ }+/// The working row carries the cancel hint on one row, is exactly as wide/// in both motion modes, and sheds the hint as the terminal narrows instead/// of wrapping. The elapsed time is the header's alone: the input row never@@ -39663,7 +39779,7 @@ mod tests {.expect("the separator rule is on screen");let last_prose = rows[..rule].iter()- .rposition(|r| r.trim() == "an answer")+ .rposition(|r| r.trim() == "\u{2022} an answer").expect("the answer is on screen");// Literal, not derived from the constant: the point is the geometry on// screen, and reading the expectation back off `TRANSCRIPT_BOTTOM_PAD`@@ -42573,13 +42689,15 @@ mod tests {assert_eq!(last_row(&app)[0].0, "\u{2022} ", "system note");// The user turn distinguishes itself with a filled bubble background- // rather than a gutter glyph.+ // (its first rendered row is the bubble's padding) and a `›` gutter.app.push_user_line("do it", &[]);assert_eq!(last_row(&app)[0].1.bg,Some(super::user_bubble_bg()),"user message");+ let text = app.transcript.last().expect("a row").lines(80).remove(1);+ assert_eq!(text.spans[0].content, "\u{203a} ", "user glyph");app.apply(StreamEvent::ToolCall {id: "t1".into(),@@ -42601,15 +42719,12 @@ mod tests {"tool row");- // Model prose is the one class with no gutter, which is what makes the- // others readable as "not the model".+ // Model prose leads with the same bullet shape, but dim and colourless:+ // the answer reads as the turn's main item without passing for a note.app.assistant_buf = "Done.".into();app.flush_assistant();let prose = last_row(&app);- assert!(- !prose[0].0.starts_with('\u{2022}') && !prose[0].0.starts_with('>'),- "prose took a gutter: {prose:?}"- );+ assert_eq!(prose[0], ("\u{2022} ".to_string(), Style::new().dim()), "answer");}#[test]@@ -42621,11 +42736,17 @@ mod tests {assert_eq!(info[0].1.fg, Some(Color::LightBlue), "info gutter");assert!(info[1].1.add_modifier.contains(Modifier::DIM), "info body");+ assert_eq!(info[0].0, "\u{2022} ", "info glyph");+app.system(super::Level::Warn, "finished early");- assert_eq!(last_row(&app)[0].1.fg, Some(Color::Yellow));+ let warn = last_row(&app);+ assert_eq!(warn[0].0, "\u{26a0} ", "warn glyph");+ assert_eq!(warn[0].1.fg, Some(super::theme::warning()));+ assert_eq!(warn[1].1.fg, Some(super::theme::warning()));app.system(super::Level::Error, "denied: rm -rf /");let err = last_row(&app);+ assert_eq!(err[0].0, "\u{25a0} ", "error glyph");assert_eq!(err[0].1.fg, Some(Color::Red));assert!(err[1].1.add_modifier.contains(Modifier::BOLD), "{err:?}");diff --git a/src-tauri/src/core/cli/tui/markdown.rs b/src-tauri/src/core/cli/tui/markdown.rsindex 890bb0062..d327851e4 100644--- a/src-tauri/src/core/cli/tui/markdown.rs+++ b/src-tauri/src/core/cli/tui/markdown.rs@@ -18,13 +18,51 @@ pub(super) fn format_assistant_lines(let next = if reasoning {reasoning_detail_lines(&seg)} else {- format_markdown_lines(&seg, width)+ answer_lines(&seg, width)};append_band(&mut lines, next);}lines}+/// Columns the answer gutter takes: a dim `• ` on the first row, two blanks+/// on every row after it.+const ANSWER_GUTTER_COLS: u16 = 2;++/// An answer block as the transcript shows it: the markdown laid out at+/// `width - 2`, the first row behind a dim `• ` and every other row (code+/// boxes and tables included) indented two columns under it. Prose rows are+/// pre-wrapped here rather than left to the body `Paragraph`, whose wrap would+/// start each continuation at the left edge, outside the indent. The committed+/// row and the live tail both go through this, so nothing reflows when the+/// stream commits.+pub(super) fn answer_lines(text: &str, width: u16) -> Vec<Line<'static>> {+ let inner = width.saturating_sub(ANSWER_GUTTER_COLS).max(1);+ let mut out = Vec::new();+ for line in format_markdown_lines(text, inner) {+ if line.spans.iter().all(|s| s.content.is_empty()) {+ out.push(line);+ continue;+ }+ let rows = if super::fits_one_row(&line, inner) {+ vec![line.spans]+ } else {+ wrap_spans_at_words(line.spans, inner as usize)+ };+ for spans in rows {+ let gutter = if out.is_empty() {+ Span::styled("\u{2022} ", Style::new().dim())+ } else {+ Span::raw(" ")+ };+ let mut row = vec![gutter];+ row.extend(spans);+ out.push(Line::from(row).style(line.style));+ }+ }+ out+}+/// Append `next` under `lines`, separated by the blank row the committed path/// puts between bands (`gap(Kind::Reasoning)` / `gap(Kind::Prose)` in/// `push_assistant_blocks`). Reasoning and answer are different bands, so@@ -90,7 +128,7 @@ pub(super) fn live_assistant_lines(} else if seg.trim().is_empty() {continue;} else {- format_markdown_lines(&seg, width)+ answer_lines(&seg, width)};append_band(&mut lines, next);}@@ -1017,8 +1055,9 @@ fn group_by_style(chars: &[(char, Style)]) -> Vec<(Style, String)> {#[cfg(test)]mod tests {use super::{- format_markdown_lines, render_table, segment_reasoning_steps, segment_reasoning_steps_with,- split_reasoning_paragraphs, wrap_spans_at_words,+ answer_lines, format_markdown_lines, live_assistant_lines, render_table,+ segment_reasoning_steps, segment_reasoning_steps_with, split_reasoning_paragraphs,+ wrap_spans_at_words,};use ratatui::prelude::*;@@ -1026,6 +1065,40 @@ mod tests {line.spans.iter().map(|s| s.content.as_ref()).collect()}+ #[test]+ fn answer_leads_with_a_dim_bullet_and_indents_the_rest() {+ let md = concat!(+ "one two three four five six seven\n\n",+ "```rust\nfn main() {}\n```\n\n",+ "| a | b |\n|---|---|\n| 1 | 2 |",+ );+ let lines = answer_lines(md, 20);+ let first = &lines[0].spans[0];+ assert_eq!(first.content, "\u{2022} ");+ assert_eq!(first.style, Style::new().dim());+ for line in &lines[1..] {+ let text = line_text(line);+ assert!(+ text.is_empty() || text.starts_with(" "),+ "row escaped the indent: {text:?}"+ );+ assert!(line.width() <= 20, "row overflows: {text:?}");+ }+ let text: Vec<String> = lines.iter().map(line_text).collect();+ assert!(text.iter().any(|t| t.starts_with(" \u{250c}")), "code box: {text:?}");+ assert!(text.iter().any(|t| t.starts_with(" ") && t.contains('1')), "table: {text:?}");+ }++ /// The live tail lays the answer out exactly as the committed row does, so+ /// nothing reflows when the stream commits.+ #[test]+ fn live_answer_matches_the_committed_layout() {+ let md = "a long enough answer to wrap at this width\n\n- item";+ for fold in [false, true] {+ assert_eq!(live_assistant_lines(md, &[], 24, fold, true), answer_lines(md, 24));+ }+ }+#[test]fn paragraphs_split_on_blank_lines_only() {// A single newline stays within a step (soft wrap / list item); a blankdiff --git a/src-tauri/src/core/cli/tui/tests/snapshot.rs b/src-tauri/src/core/cli/tui/tests/snapshot.rsindex bf856ab5d..378fe8c3a 100644--- a/src-tauri/src/core/cli/tui/tests/snapshot.rs+++ b/src-tauri/src/core/cli/tui/tests/snapshot.rs@@ -29,7 +29,7 @@use super::*;use crate::core::agent::todo::TodoStatus::{Abandoned, Completed, InProgress, Pending as Open};use crate::core::cli::tui::motion::{with_mode, MotionMode};-use crate::core::cli::tui::{input_box_height, Level, TRANSCRIPT_BOTTOM_PAD};+use crate::core::cli::tui::{input_box_height, turn_stats_line, Level, TRANSCRIPT_BOTTOM_PAD};use crate::core::cli::tui::theme::{with_theme, ColorDepth, Theme};use ratatui::backend::TestBackend;use ratatui::widgets::Paragraph;@@ -594,9 +594,9 @@ fn body(app: &mut App) -> Buffer {buf}-/// End the turn with a receipt, as the stream's `Done` does, then pin the-/// receipt's clock-derived fields (the local timestamp, the elapsed time and-/// the rate it implies) so the row is a pure function of the token counts.+/// End the turn with a receipt, as the stream's `Done` does, then redraw the+/// receipt with its clock-derived inputs (the elapsed time and the time of+/// day) pinned, so the row is a pure function of the token counts.fn finish_turn(app: &mut App, prompt: u64, output: u64) {app.apply(StreamEvent::TurnUsage {usage: Usage {@@ -613,17 +613,11 @@ fn finish_turn(app: &mut App, prompt: u64, output: u64) {.transcript.iter().rposition(|r| {- matches!(&r.kind, RowKind::Line(l) if line_text(l).contains('\u{23f1}'))+ matches!(&r.kind, RowKind::Line(l) if line_text(l).contains("Worked for "))}).expect("the turn left a receipt");- let RowKind::Line(line) = &app.transcript[receipt].kind else {- unreachable!("matched a line row above");- };- let mut spans = line.spans.clone();- for (i, pinned) in [(0, "2026-01-02 03:04"), (6, "2.0s"), (8, "60.0/s")] {- spans[i].content = pinned.into();- }- app.transcript[receipt] = Row::line(Line::from(spans));+ let pinned = turn_stats_line(prompt, output, Duration::from_secs(2), "03:04".into());+ app.transcript[receipt] = Row::line(pinned);}fn tool_call(app: &mut App, id: &str, name: &str, args: serde_json::Value) {diff --git a/src-tauri/src/core/cli/tui/tests/snapshots/todo_panel_single_phase.snap b/src-tauri/src/core/cli/tui/tests/snapshots/todo_panel_single_phase.snapindex de9161613..d1285138a 100644--- a/src-tauri/src/core/cli/tui/tests/snapshots/todo_panel_single_phase.snap+++ b/src-tauri/src/core/cli/tui/tests/snapshots/todo_panel_single_phase.snap@@ -1,13 +1,14 @@---source: src/core/cli/tui/tests/snapshot.rs+assertion_line: 162expression: render_snapshot(buf)---| 👋 gpt-5-mini effort medium ctx 0K/128K fallback ◉ [working] ||────────────────────────────────────────────────────────────────────────────────|| || |+|› plan it || |-| plan it || ||✓ Todos · 2/4 /todo || ☑ scaffold the crate |@@ -24,9 +25,11 @@ expression: render_snapshot(buf)0 14..29 fg=#E5C07B0 55..57 fg=#56B6C20 57..66 fg=#56B6C2 mod=BOLD- 5 0..1 fg=LightMagenta bg=#282C3A mod=BOLD- 5 1..8 fg=#E9ECF2 bg=#282C3A mod=BOLD- 5 8..9 bg=#282C3A+ 3 0..80 bg=#282C3A+ 4 0..2 fg=#56B6C2 bg=#282C3A mod=BOLD+ 4 2..9 fg=#E9ECF2 bg=#282C3A mod=BOLD+ 4 9..80 bg=#282C3A+ 5 0..80 bg=#282C3A7 0..2 fg=#56B6C27 2..7 fg=#56B6C2 mod=BOLD7 7..13 mod=DIMdiff --git a/src-tauri/src/core/cli/tui/tests/snapshots/todo_panel_split_with_agents.snap b/src-tauri/src/core/cli/tui/tests/snapshots/todo_panel_split_with_agents.snapindex bf2bc48bc..a32274d49 100644--- a/src-tauri/src/core/cli/tui/tests/snapshots/todo_panel_split_with_agents.snap+++ b/src-tauri/src/core/cli/tui/tests/snapshots/todo_panel_split_with_agents.snap@@ -1,5 +1,6 @@---source: src/core/cli/tui/tests/snapshot.rs+assertion_line: 162expression: render_snapshot(buf)---| 👋 gpt-5-mini effort medium ctx 0K/128K fallback ◉ [working] |@@ -9,8 +10,8 @@ expression: render_snapshot(buf)| || || |+|› build it || |-| build it || ||✓ Todos · 1/2 · backend 1/3 /todo │ ≡ 1 agent || ☑ scaffold │ • api-review 6t · 6r · 9.4% · 75% cached |@@ -26,9 +27,11 @@ expression: render_snapshot(buf)0 14..29 fg=#E5C07B0 55..57 fg=#56B6C20 57..66 fg=#56B6C2 mod=BOLD- 8 0..1 fg=LightMagenta bg=#282C3A mod=BOLD- 8 1..9 fg=#E9ECF2 bg=#282C3A mod=BOLD- 8 9..10 bg=#282C3A+ 6 0..100 bg=#282C3A+ 7 0..2 fg=#56B6C2 bg=#282C3A mod=BOLD+ 7 2..10 fg=#E9ECF2 bg=#282C3A mod=BOLD+ 7 10..100 bg=#282C3A+ 8 0..100 bg=#282C3A10 0..2 fg=#56B6C210 2..7 fg=#56B6C2 mod=BOLD10 7..13 fg=#56B6C2diff --git a/src-tauri/src/core/cli/tui/tests/snapshots/todo_panel_stacked_narrow.snap b/src-tauri/src/core/cli/tui/tests/snapshots/todo_panel_stacked_narrow.snapindex 438939a92..0a0a888db 100644--- a/src-tauri/src/core/cli/tui/tests/snapshots/todo_panel_stacked_narrow.snap+++ b/src-tauri/src/core/cli/tui/tests/snapshots/todo_panel_stacked_narrow.snap@@ -1,13 +1,14 @@---source: src/core/cli/tui/tests/snapshot.rs+assertion_line: 162expression: render_snapshot(buf)---| 👋 gpt-5-mini effort medium ctx 0K/128K fallback ◉ [wo||────────────────────────────────────────────────────────────|| || |+|› build it || |-| build it || ||✓ Todos · 0/2 /todo || ☐ routes |@@ -26,9 +27,11 @@ expression: render_snapshot(buf)0 14..29 fg=#E5C07B0 55..57 fg=#56B6C20 57..60 fg=#56B6C2 mod=BOLD- 5 0..1 fg=LightMagenta bg=#282C3A mod=BOLD- 5 1..9 fg=#E9ECF2 bg=#282C3A mod=BOLD- 5 9..10 bg=#282C3A+ 3 0..60 bg=#282C3A+ 4 0..2 fg=#56B6C2 bg=#282C3A mod=BOLD+ 4 2..10 fg=#E9ECF2 bg=#282C3A mod=BOLD+ 4 10..60 bg=#282C3A+ 5 0..60 bg=#282C3A7 0..2 fg=#56B6C27 2..7 fg=#56B6C2 mod=BOLD7 7..13 mod=DIMdiff --git a/src-tauri/src/core/cli/tui/tests/snapshots/transcript_closed_tool_group.snap b/src-tauri/src/core/cli/tui/tests/snapshots/transcript_closed_tool_group.snapindex 49af3c8fa..0d60e144a 100644--- a/src-tauri/src/core/cli/tui/tests/snapshots/transcript_closed_tool_group.snap+++ b/src-tauri/src/core/cli/tui/tests/snapshots/transcript_closed_tool_group.snap@@ -3,12 +3,16 @@ source: src/core/cli/tui/tests/snapshot.rsassertion_line: 162expression: render_snapshot(buf)----| where is the parser? |+| |+|› where is the parser? |+| || ||• Read 2 files; ran 1 search, 1 file search |- 0 0..1 fg=LightMagenta bg=#282C3A mod=BOLD- 0 1..21 fg=#E9ECF2 bg=#282C3A mod=BOLD- 0 21..22 bg=#282C3A- 2 0..2 fg=#98C379 mod=BOLD- 2 2..6 mod=BOLD+ 0 0..80 bg=#282C3A+ 1 0..2 fg=#56B6C2 bg=#282C3A mod=BOLD+ 1 2..22 fg=#E9ECF2 bg=#282C3A mod=BOLD+ 1 22..80 bg=#282C3A+ 2 0..80 bg=#282C3A+ 4 0..2 fg=#98C379 mod=BOLD+ 4 2..6 mod=BOLDdiff --git a/src-tauri/src/core/cli/tui/tests/snapshots/transcript_edit_with_diff.snap b/src-tauri/src/core/cli/tui/tests/snapshots/transcript_edit_with_diff.snapindex 37ec55b30..ad520e6a9 100644--- a/src-tauri/src/core/cli/tui/tests/snapshots/transcript_edit_with_diff.snap+++ b/src-tauri/src/core/cli/tui/tests/snapshots/transcript_edit_with_diff.snap@@ -3,7 +3,9 @@ source: src/core/cli/tui/tests/snapshot.rsassertion_line: 162expression: render_snapshot(buf)----| use u64 for the area |+| |+|› use u64 for the area |+| || ||• Edited geometry.rs || ┌───────────────────────────────────┐ |@@ -14,60 +16,62 @@ expression: render_snapshot(buf)| │ w * h │ || └───────────────────────────────────┘ |- 0 0..1 fg=LightMagenta bg=#282C3A mod=BOLD- 0 1..21 fg=#E9ECF2 bg=#282C3A mod=BOLD- 0 21..22 bg=#282C3A- 2 0..2 fg=#98C379 mod=BOLD- 2 2..8 mod=BOLD- 3 0..41 fg=DarkGray- 4 0..6 fg=DarkGray- 4 6..20 fg=Cyan mod=DIM- 4 20..41 fg=DarkGray- 5 0..6 fg=DarkGray- 5 6..7 mod=DIM- 5 7..10 fg=#B48EAD- 5 10..20 fg=#C0C5CE- 5 20..41 fg=DarkGray- 6 0..5 fg=DarkGray- 6 5..6 fg=DarkGray bg=#421A1E- 6 6..7 fg=Red bg=#421A1E mod=BOLD- 6 7..9 fg=#B48EAD bg=#421A1E- 6 9..10 fg=#C0C5CE bg=#421A1E- 6 10..14 fg=#8FA1B3 bg=#421A1E- 6 14..15 fg=#C0C5CE bg=#421A1E- 6 15..16 fg=#BF616A bg=#421A1E- 6 16..18 fg=#C0C5CE bg=#421A1E- 6 18..21 fg=#B48EAD bg=#421A1E- 6 21..23 fg=#C0C5CE bg=#421A1E- 6 23..24 fg=#BF616A bg=#421A1E- 6 24..26 fg=#C0C5CE bg=#421A1E- 6 26..29 fg=#B48EAD bg=#421A1E- 6 29..34 fg=#C0C5CE bg=#421A1E- 6 34..37 fg=#B48EAD bg=#421A1E- 6 37..39 fg=#C0C5CE bg=#421A1E- 6 39..40 fg=DarkGray bg=#421A1E- 6 40..41 fg=DarkGray- 7 0..5 fg=DarkGray- 7 5..6 fg=DarkGray bg=#163420- 7 6..7 fg=Green bg=#163420 mod=BOLD- 7 7..9 fg=#B48EAD bg=#163420- 7 9..10 fg=#C0C5CE bg=#163420- 7 10..14 fg=#8FA1B3 bg=#163420- 7 14..15 fg=#C0C5CE bg=#163420- 7 15..16 fg=#BF616A bg=#163420- 7 16..18 fg=#C0C5CE bg=#163420- 7 18..21 fg=#B48EAD bg=#163420- 7 21..23 fg=#C0C5CE bg=#163420- 7 23..24 fg=#BF616A bg=#163420- 7 24..26 fg=#C0C5CE bg=#163420- 7 26..29 fg=#B48EAD bg=#163420- 7 29..34 fg=#C0C5CE bg=#163420- 7 34..37 fg=#B48EAD bg=#163420- 7 37..39 fg=#C0C5CE bg=#163420- 7 39..40 fg=DarkGray bg=#163420- 7 40..41 fg=DarkGray- 8 0..6 fg=DarkGray- 8 6..7 mod=DIM- 8 7..16 fg=#C0C5CE- 8 16..41 fg=DarkGray- 9 0..41 fg=DarkGray+ 0 0..80 bg=#282C3A+ 1 0..2 fg=#56B6C2 bg=#282C3A mod=BOLD+ 1 2..22 fg=#E9ECF2 bg=#282C3A mod=BOLD+ 1 22..80 bg=#282C3A+ 2 0..80 bg=#282C3A+ 4 0..2 fg=#98C379 mod=BOLD+ 4 2..8 mod=BOLD+ 5 0..41 fg=DarkGray+ 6 0..6 fg=DarkGray+ 6 6..20 fg=Cyan mod=DIM+ 6 20..41 fg=DarkGray+ 7 0..6 fg=DarkGray+ 7 6..7 mod=DIM+ 7 7..10 fg=#B48EAD+ 7 10..20 fg=#C0C5CE+ 7 20..41 fg=DarkGray+ 8 0..5 fg=DarkGray+ 8 5..6 fg=DarkGray bg=#421A1E+ 8 6..7 fg=Red bg=#421A1E mod=BOLD+ 8 7..9 fg=#B48EAD bg=#421A1E+ 8 9..10 fg=#C0C5CE bg=#421A1E+ 8 10..14 fg=#8FA1B3 bg=#421A1E+ 8 14..15 fg=#C0C5CE bg=#421A1E+ 8 15..16 fg=#BF616A bg=#421A1E+ 8 16..18 fg=#C0C5CE bg=#421A1E+ 8 18..21 fg=#B48EAD bg=#421A1E+ 8 21..23 fg=#C0C5CE bg=#421A1E+ 8 23..24 fg=#BF616A bg=#421A1E+ 8 24..26 fg=#C0C5CE bg=#421A1E+ 8 26..29 fg=#B48EAD bg=#421A1E+ 8 29..34 fg=#C0C5CE bg=#421A1E+ 8 34..37 fg=#B48EAD bg=#421A1E+ 8 37..39 fg=#C0C5CE bg=#421A1E+ 8 39..40 fg=DarkGray bg=#421A1E+ 8 40..41 fg=DarkGray+ 9 0..5 fg=DarkGray+ 9 5..6 fg=DarkGray bg=#163420+ 9 6..7 fg=Green bg=#163420 mod=BOLD+ 9 7..9 fg=#B48EAD bg=#163420+ 9 9..10 fg=#C0C5CE bg=#163420+ 9 10..14 fg=#8FA1B3 bg=#163420+ 9 14..15 fg=#C0C5CE bg=#163420+ 9 15..16 fg=#BF616A bg=#163420+ 9 16..18 fg=#C0C5CE bg=#163420+ 9 18..21 fg=#B48EAD bg=#163420+ 9 21..23 fg=#C0C5CE bg=#163420+ 9 23..24 fg=#BF616A bg=#163420+ 9 24..26 fg=#C0C5CE bg=#163420+ 9 26..29 fg=#B48EAD bg=#163420+ 9 29..34 fg=#C0C5CE bg=#163420+ 9 34..37 fg=#B48EAD bg=#163420+ 9 37..39 fg=#C0C5CE bg=#163420+ 9 39..40 fg=DarkGray bg=#163420+ 9 40..41 fg=DarkGray+10 0..6 fg=DarkGray+10 6..7 mod=DIM+10 7..16 fg=#C0C5CE+10 16..41 fg=DarkGray+11 0..41 fg=DarkGraydiff --git a/src-tauri/src/core/cli/tui/tests/snapshots/transcript_error_and_warning_notes.snap b/src-tauri/src/core/cli/tui/tests/snapshots/transcript_error_and_warning_notes.snapindex d0e4a3839..5bcedaa27 100644--- a/src-tauri/src/core/cli/tui/tests/snapshots/transcript_error_and_warning_notes.snap+++ b/src-tauri/src/core/cli/tui/tests/snapshots/transcript_error_and_warning_notes.snap@@ -1,18 +1,23 @@---source: src/core/cli/tui/tests/snapshot.rs+assertion_line: 162expression: render_snapshot(buf)---|• model switched to gpt-5-mini |-|• press Ctrl-C or Ctrl-D again to quit |+|⚠ press Ctrl-C or Ctrl-D again to quit || |-| summarize the log || |-|• error: 502 Bad Gateway from the provider |+|› summarize the log |+| |+| |+|■ error: 502 Bad Gateway from the provider |0 0..2 fg=LightBlue0 2..30 mod=DIM- 1 0..38 fg=Yellow- 3 0..1 fg=LightMagenta bg=#282C3A mod=BOLD- 3 1..18 fg=#E9ECF2 bg=#282C3A mod=BOLD- 3 18..19 bg=#282C3A- 5 0..42 fg=Red mod=BOLD+ 1 0..38 fg=#E5C07B+ 3 0..80 bg=#282C3A+ 4 0..2 fg=#56B6C2 bg=#282C3A mod=BOLD+ 4 2..19 fg=#E9ECF2 bg=#282C3A mod=BOLD+ 4 19..80 bg=#282C3A+ 5 0..80 bg=#282C3A+ 7 0..42 fg=Red mod=BOLDdiff --git a/src-tauri/src/core/cli/tui/tests/snapshots/transcript_failed_tool_call.snap b/src-tauri/src/core/cli/tui/tests/snapshots/transcript_failed_tool_call.snapindex 6cd8d2647..cc51e732e 100644--- a/src-tauri/src/core/cli/tui/tests/snapshots/transcript_failed_tool_call.snap+++ b/src-tauri/src/core/cli/tui/tests/snapshots/transcript_failed_tool_call.snap@@ -3,12 +3,16 @@ source: src/core/cli/tui/tests/snapshot.rsassertion_line: 162expression: render_snapshot(buf)----| open the notes |+| |+|› open the notes |+| || ||• Read missing.md |- 0 0..1 fg=LightMagenta bg=#282C3A mod=BOLD- 0 1..15 fg=#E9ECF2 bg=#282C3A mod=BOLD- 0 15..16 bg=#282C3A- 2 0..2 fg=Red mod=BOLD- 2 2..6 mod=BOLD+ 0 0..80 bg=#282C3A+ 1 0..2 fg=#56B6C2 bg=#282C3A mod=BOLD+ 1 2..16 fg=#E9ECF2 bg=#282C3A mod=BOLD+ 1 16..80 bg=#282C3A+ 2 0..80 bg=#282C3A+ 4 0..2 fg=Red mod=BOLD+ 4 2..6 mod=BOLDdiff --git a/src-tauri/src/core/cli/tui/tests/snapshots/transcript_finished_shell_command.snap b/src-tauri/src/core/cli/tui/tests/snapshots/transcript_finished_shell_command.snapindex 54a2126a0..9a5e82c64 100644--- a/src-tauri/src/core/cli/tui/tests/snapshots/transcript_finished_shell_command.snap+++ b/src-tauri/src/core/cli/tui/tests/snapshots/transcript_finished_shell_command.snap@@ -3,12 +3,16 @@ source: src/core/cli/tui/tests/snapshot.rsassertion_line: 162expression: render_snapshot(buf)----| run the tests |+| |+|› run the tests |+| || ||• Ran cargo test --lib parser |- 0 0..1 fg=LightMagenta bg=#282C3A mod=BOLD- 0 1..14 fg=#E9ECF2 bg=#282C3A mod=BOLD- 0 14..15 bg=#282C3A- 2 0..2 fg=#98C379 mod=BOLD- 2 2..5 mod=BOLD+ 0 0..80 bg=#282C3A+ 1 0..2 fg=#56B6C2 bg=#282C3A mod=BOLD+ 1 2..15 fg=#E9ECF2 bg=#282C3A mod=BOLD+ 1 15..80 bg=#282C3A+ 2 0..80 bg=#282C3A+ 4 0..2 fg=#98C379 mod=BOLD+ 4 2..5 mod=BOLDdiff --git a/src-tauri/src/core/cli/tui/tests/snapshots/transcript_finished_shell_command_open.snap b/src-tauri/src/core/cli/tui/tests/snapshots/transcript_finished_shell_command_open.snapindex 1ea4eb8f6..ffeab8d0c 100644--- a/src-tauri/src/core/cli/tui/tests/snapshots/transcript_finished_shell_command_open.snap+++ b/src-tauri/src/core/cli/tui/tests/snapshots/transcript_finished_shell_command_open.snap@@ -1,8 +1,11 @@---source: src/core/cli/tui/tests/snapshot.rs+assertion_line: 162expression: render_snapshot(buf)----| run the tests |+| |+|› run the tests |+| || ||│ ┌──────────────────────────────────────────────────────────────────────────┐||│ │ $ cargo test --lib parser │|@@ -15,31 +18,33 @@ expression: render_snapshot(buf)|│ │ ✓ │||│ └──────────────────────────────────────────────────────────────────────────┘|- 0 0..1 fg=LightMagenta bg=#282C3A mod=BOLD- 0 1..14 fg=#E9ECF2 bg=#282C3A mod=BOLD- 0 14..15 bg=#282C3A- 2 0..80 fg=DarkGray- 3 0..6 fg=DarkGray- 3 6..8 fg=Cyan mod=BOLD- 3 8..31 mod=BOLD- 3 31..80 fg=DarkGray- 4 0..6 fg=DarkGray- 4 6..21 mod=DIM- 4 21..80 fg=DarkGray+ 0 0..80 bg=#282C3A+ 1 0..2 fg=#56B6C2 bg=#282C3A mod=BOLD+ 1 2..15 fg=#E9ECF2 bg=#282C3A mod=BOLD+ 1 15..80 bg=#282C3A+ 2 0..80 bg=#282C3A+ 4 0..80 fg=DarkGray5 0..6 fg=DarkGray- 5 6..31 mod=DIM+ 5 6..8 fg=Cyan mod=BOLD+ 5 8..31 mod=BOLD5 31..80 fg=DarkGray6 0..6 fg=DarkGray- 6 6..32 mod=DIM- 6 32..80 fg=DarkGray+ 6 6..21 mod=DIM+ 6 21..80 fg=DarkGray7 0..6 fg=DarkGray- 7 6..33 mod=DIM- 7 33..80 fg=DarkGray- 8 0..80 fg=DarkGray+ 7 6..31 mod=DIM+ 7 31..80 fg=DarkGray+ 8 0..6 fg=DarkGray+ 8 6..32 mod=DIM+ 8 32..80 fg=DarkGray9 0..6 fg=DarkGray- 9 6..41 mod=DIM- 9 41..80 fg=DarkGray-10 0..6 fg=DarkGray-10 6..7 fg=Green-10 7..80 fg=DarkGray-11 0..80 fg=DarkGray+ 9 6..33 mod=DIM+ 9 33..80 fg=DarkGray+10 0..80 fg=DarkGray+11 0..6 fg=DarkGray+11 6..41 mod=DIM+11 41..80 fg=DarkGray+12 0..6 fg=DarkGray+12 6..7 fg=Green+12 7..80 fg=DarkGray+13 0..80 fg=DarkGraydiff --git a/src-tauri/src/core/cli/tui/tests/snapshots/transcript_folded_reasoning_and_answer.snap b/src-tauri/src/core/cli/tui/tests/snapshots/transcript_folded_reasoning_and_answer.snapindex bbc372eac..9defde824 100644--- a/src-tauri/src/core/cli/tui/tests/snapshots/transcript_folded_reasoning_and_answer.snap+++ b/src-tauri/src/core/cli/tui/tests/snapshots/transcript_folded_reasoning_and_answer.snap@@ -1,26 +1,24 @@---source: src/core/cli/tui/tests/snapshot.rs+assertion_line: 162expression: render_snapshot(buf)----| is 91 prime? |+| |+|› is 91 prime? |+| || ||┊ Thought for 3s || |-|No: 91 = 7 x 13. |+|• No: 91 = 7 x 13. || |-|2026-01-02 03:04 ↑ 900 ↓ 40 ⏱ 2.0s ⚡ 60.0/s |+| Worked for 2s • 03:04 • ↑ 900 ↓ 40 • 20.0/s |- 0 0..1 fg=LightMagenta bg=#282C3A mod=BOLD- 0 1..13 fg=#E9ECF2 bg=#282C3A mod=BOLD- 0 13..14 bg=#282C3A- 2 0..2 fg=DarkGray- 2 2..16 mod=DIM | ITALIC- 6 0..20 fg=#808080- 6 20..23 mod=DIM- 6 23..27 fg=#808080- 6 27..29 mod=DIM- 6 29..33 fg=#808080- 6 33..37 mod=DIM- 6 37..40 fg=#808080- 6 41..42 fg=#808080- 6 42..48 mod=DIM+ 0 0..80 bg=#282C3A+ 1 0..2 fg=#56B6C2 bg=#282C3A mod=BOLD+ 1 2..14 fg=#E9ECF2 bg=#282C3A mod=BOLD+ 1 14..80 bg=#282C3A+ 2 0..80 bg=#282C3A+ 4 0..2 fg=DarkGray+ 4 2..16 mod=DIM | ITALIC+ 6 0..2 mod=DIM+ 8 0..45 fg=#808080diff --git a/src-tauri/src/core/cli/tui/tests/snapshots/transcript_markdown_answer_with_receipt.snap b/src-tauri/src/core/cli/tui/tests/snapshots/transcript_markdown_answer_with_receipt.snapindex 07fc47eea..2b31e21bb 100644--- a/src-tauri/src/core/cli/tui/tests/snapshots/transcript_markdown_answer_with_receipt.snap+++ b/src-tauri/src/core/cli/tui/tests/snapshots/transcript_markdown_answer_with_receipt.snap@@ -1,36 +1,34 @@---source: src/core/cli/tui/tests/snapshot.rs+assertion_line: 162expression: render_snapshot(buf)----| how do I build the cli? || |-|Building |+|› how do I build the cli? || |-|Run these from src-tauri: || |-|- stub the resources with node ../scripts/stub-tauri-resources.mjs |-|- then cargo build --features cli |+|• Building || |-|The binary lands in target/debug. |+| Run these from src-tauri: || |-|2026-01-02 03:04 ↑ 12K ↓ 120 ⏱ 2.0s ⚡ 60.0/s |+| - stub the resources with node ../scripts/stub-tauri-resources.mjs |+| - then cargo build --features cli |+| |+| The binary lands in target/debug. |+| |+| Worked for 2s • 03:04 • ↑ 12K ↓ 120 • 60.0/s |- 0 0..1 fg=LightMagenta bg=#282C3A mod=BOLD- 0 1..24 fg=#E9ECF2 bg=#282C3A mod=BOLD- 0 24..25 bg=#282C3A- 2 0..8 fg=Cyan mod=BOLD- 4 15..24 fg=Cyan- 6 0..2 fg=Cyan- 6 26..66 fg=Cyan- 7 0..2 fg=Cyan- 7 7..33 fg=Cyan- 9 20..32 fg=#FFA500 mod=BOLD-11 0..20 fg=#808080-11 20..23 mod=DIM-11 23..27 fg=#808080-11 27..30 mod=DIM-11 30..34 fg=#808080-11 34..38 mod=DIM-11 38..41 fg=#808080-11 42..43 fg=#808080-11 43..49 mod=DIM+ 0 0..80 bg=#282C3A+ 1 0..2 fg=#56B6C2 bg=#282C3A mod=BOLD+ 1 2..25 fg=#E9ECF2 bg=#282C3A mod=BOLD+ 1 25..80 bg=#282C3A+ 2 0..80 bg=#282C3A+ 4 0..2 mod=DIM+ 4 2..10 fg=Cyan mod=BOLD+ 6 17..26 fg=Cyan+ 8 2..4 fg=Cyan+ 8 28..68 fg=Cyan+ 9 2..4 fg=Cyan+ 9 9..35 fg=Cyan+11 22..34 fg=#FFA500 mod=BOLD+13 0..46 fg=#808080diff --git a/src-tauri/src/core/cli/tui/tests/snapshots/transcript_running_shell_command.snap b/src-tauri/src/core/cli/tui/tests/snapshots/transcript_running_shell_command.snapindex 88b29bd68..9efee01dc 100644--- a/src-tauri/src/core/cli/tui/tests/snapshots/transcript_running_shell_command.snap+++ b/src-tauri/src/core/cli/tui/tests/snapshots/transcript_running_shell_command.snap@@ -1,8 +1,11 @@---source: src/core/cli/tui/tests/snapshot.rs+assertion_line: 162expression: render_snapshot(buf)----| build it |+| |+|› build it |+| || ||│ ┌──────────────────────────────────────────────────────────────────────────┐||│ │ $ make build │|@@ -12,24 +15,26 @@ expression: render_snapshot(buf)|│ │ • 0s │||│ └──────────────────────────────────────────────────────────────────────────┘|- 0 0..1 fg=LightMagenta bg=#282C3A mod=BOLD- 0 1..9 fg=#E9ECF2 bg=#282C3A mod=BOLD- 0 9..10 bg=#282C3A- 2 0..80 fg=DarkGray- 3 0..6 fg=DarkGray- 3 6..8 fg=Cyan mod=BOLD- 3 8..18 mod=BOLD- 3 18..80 fg=DarkGray- 4 0..6 fg=DarkGray- 4 6..20 mod=DIM- 4 20..80 fg=DarkGray+ 0 0..80 bg=#282C3A+ 1 0..2 fg=#56B6C2 bg=#282C3A mod=BOLD+ 1 2..10 fg=#E9ECF2 bg=#282C3A mod=BOLD+ 1 10..80 bg=#282C3A+ 2 0..80 bg=#282C3A+ 4 0..80 fg=DarkGray5 0..6 fg=DarkGray- 5 6..19 mod=DIM- 5 19..80 fg=DarkGray+ 5 6..8 fg=Cyan mod=BOLD+ 5 8..18 mod=BOLD+ 5 18..80 fg=DarkGray6 0..6 fg=DarkGray- 6 6..17 mod=DIM- 6 17..80 fg=DarkGray+ 6 6..20 mod=DIM+ 6 20..80 fg=DarkGray7 0..6 fg=DarkGray- 7 6..8 fg=Cyan- 7 8..80 fg=DarkGray- 8 0..80 fg=DarkGray+ 7 6..19 mod=DIM+ 7 19..80 fg=DarkGray+ 8 0..6 fg=DarkGray+ 8 6..17 mod=DIM+ 8 17..80 fg=DarkGray+ 9 0..6 fg=DarkGray+ 9 6..8 fg=Cyan+ 9 8..80 fg=DarkGray+10 0..80 fg=DarkGraydiff --git a/src-tauri/src/core/cli/tui/tests/snapshots/transcript_user_tool_and_answer.snap b/src-tauri/src/core/cli/tui/tests/snapshots/transcript_user_tool_and_answer.snapindex c0004f3f0..e5909f49b 100644--- a/src-tauri/src/core/cli/tui/tests/snapshots/transcript_user_tool_and_answer.snap+++ b/src-tauri/src/core/cli/tui/tests/snapshots/transcript_user_tool_and_answer.snap@@ -3,26 +3,23 @@ source: src/core/cli/tui/tests/snapshot.rsassertion_line: 162expression: render_snapshot(buf)----| what does main do? |+| |+|› what does main do? |+| || ||• Read main.rs || |-|It hands off to app_lib::run, which starts the app. |+|• It hands off to app_lib::run, which starts the app. || |-|2026-01-02 03:04 ↑ 3.1K ↓ 18 ⏱ 2.0s ⚡ 60.0/s |+| Worked for 2s • 03:04 • ↑ 3.1K ↓ 18 • 9.0/s |- 0 0..1 fg=LightMagenta bg=#282C3A mod=BOLD- 0 1..19 fg=#E9ECF2 bg=#282C3A mod=BOLD- 0 19..20 bg=#282C3A- 2 0..2 fg=#98C379 mod=BOLD- 2 2..6 mod=BOLD- 4 16..28 fg=Cyan- 6 0..20 fg=#808080- 6 20..24 mod=DIM- 6 24..28 fg=#808080- 6 28..30 mod=DIM- 6 30..34 fg=#808080- 6 34..38 mod=DIM- 6 38..41 fg=#808080- 6 42..43 fg=#808080- 6 43..49 mod=DIM+ 0 0..80 bg=#282C3A+ 1 0..2 fg=#56B6C2 bg=#282C3A mod=BOLD+ 1 2..20 fg=#E9ECF2 bg=#282C3A mod=BOLD+ 1 20..80 bg=#282C3A+ 2 0..80 bg=#282C3A+ 4 0..2 fg=#98C379 mod=BOLD+ 4 2..6 mod=BOLD+ 6 0..2 mod=DIM+ 6 18..30 fg=Cyan+ 8 0..45 fg=#808080