tui: standardize tree prefix glyphs to └ (#2274)

Replace mixed `⎿` and `L` prefixes with `└` in TUI rendering.

<img width="454" height="659" alt="Screenshot 2025-08-13 at 4 02 03 PM"
src="https://github.com/user-attachments/assets/61c9c7da-830b-4040-bb79-a91be90870ca"
/>
This commit is contained in:
Jeremy Rose
2025-08-13 19:14:03 -04:00
committed by GitHub
parent cbf972007a
commit bb9ce3cb78
5 changed files with 21 additions and 21 deletions

View File

@@ -143,7 +143,7 @@ pub(crate) fn create_diff_summary(
spans.push(RtSpan::raw(")"));
let mut line = RtLine::from(spans);
let prefix = if idx == 0 { " " } else { " " };
let prefix = if idx == 0 { " " } else { " " };
line.spans.insert(0, prefix.into());
line.spans
.iter_mut()

View File

@@ -367,7 +367,7 @@ impl HistoryCell {
ParsedCommand::Unknown { cmd } => format!("⌨️ {}", shlex_join_safe(cmd)),
};
let first_prefix = if i == 0 { " L " } else { " " };
let first_prefix = if i == 0 { " " } else { " " };
for (j, line_text) in text.lines().enumerate() {
let prefix = if j == 0 { first_prefix } else { " " };
lines.push(Line::from(vec![
@@ -804,7 +804,7 @@ impl HistoryCell {
),
};
let prefix = if idx == 0 {
Span::raw(" ")
Span::raw(" ")
} else {
Span::raw(" ")
};
@@ -892,7 +892,7 @@ impl HistoryCell {
if !stdout.trim().is_empty() {
let mut iter = stdout.lines();
for (i, raw) in iter.by_ref().take(TOOL_CALL_MAX_LINES).enumerate() {
let prefix = if i == 0 { " " } else { " " };
let prefix = if i == 0 { " " } else { " " };
let s = format!("{prefix}{raw}");
lines.push(ansi_escape_line(&s).dim());
}
@@ -945,7 +945,7 @@ fn output_lines(
for (i, raw) in lines[..head_end].iter().enumerate() {
let mut line = ansi_escape_line(raw);
let prefix = if i == 0 && include_angle_pipe {
" "
" "
} else {
" "
};
@@ -1019,7 +1019,7 @@ mod tests {
}];
let lines = HistoryCell::exec_command_lines(&[], &parsed, None);
assert!(lines.len() >= 3);
assert_eq!(lines[1].spans[0].content, " L ");
assert_eq!(lines[1].spans[0].content, " ");
assert_eq!(lines[2].spans[0].content, " ");
}
}

View File

@@ -3,7 +3,7 @@ source: tui/src/diff_render.rs
expression: terminal.backend()
---
"proposed patch to 1 file (+2 -0) "
" README.md (+2 -0) "
" README.md (+2 -0) "
" 1 +first line "
" 2 +second line "
" "

View File

@@ -3,7 +3,7 @@ source: tui/src/diff_render.rs
expression: terminal.backend()
---
"proposed patch to 1 file (+1 -1) "
" src/lib.rs → src/lib_new.rs (+1 -1) "
" src/lib.rs → src/lib_new.rs (+1 -1) "
" 1 line one "
" 2 -line two "
" 2 +line two changed "