Skip to content

Commit bb9ce3c

Browse files
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" />
1 parent cbf9720 commit bb9ce3c

File tree

5 files changed

+21
-21
lines changed

5 files changed

+21
-21
lines changed

codex-rs/tui/src/diff_render.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ pub(crate) fn create_diff_summary(
143143
spans.push(RtSpan::raw(")"));
144144

145145
let mut line = RtLine::from(spans);
146-
let prefix = if idx == 0 { " " } else { " " };
146+
let prefix = if idx == 0 { " " } else { " " };
147147
line.spans.insert(0, prefix.into());
148148
line.spans
149149
.iter_mut()

codex-rs/tui/src/history_cell.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ impl HistoryCell {
367367
ParsedCommand::Unknown { cmd } => format!("⌨️ {}", shlex_join_safe(cmd)),
368368
};
369369

370-
let first_prefix = if i == 0 { " L " } else { " " };
370+
let first_prefix = if i == 0 { " " } else { " " };
371371
for (j, line_text) in text.lines().enumerate() {
372372
let prefix = if j == 0 { first_prefix } else { " " };
373373
lines.push(Line::from(vec![
@@ -804,7 +804,7 @@ impl HistoryCell {
804804
),
805805
};
806806
let prefix = if idx == 0 {
807-
Span::raw(" ")
807+
Span::raw(" ")
808808
} else {
809809
Span::raw(" ")
810810
};
@@ -892,7 +892,7 @@ impl HistoryCell {
892892
if !stdout.trim().is_empty() {
893893
let mut iter = stdout.lines();
894894
for (i, raw) in iter.by_ref().take(TOOL_CALL_MAX_LINES).enumerate() {
895-
let prefix = if i == 0 { " " } else { " " };
895+
let prefix = if i == 0 { " " } else { " " };
896896
let s = format!("{prefix}{raw}");
897897
lines.push(ansi_escape_line(&s).dim());
898898
}
@@ -945,7 +945,7 @@ fn output_lines(
945945
for (i, raw) in lines[..head_end].iter().enumerate() {
946946
let mut line = ansi_escape_line(raw);
947947
let prefix = if i == 0 && include_angle_pipe {
948-
" "
948+
" "
949949
} else {
950950
" "
951951
};
@@ -1019,7 +1019,7 @@ mod tests {
10191019
}];
10201020
let lines = HistoryCell::exec_command_lines(&[], &parsed, None);
10211021
assert!(lines.len() >= 3);
1022-
assert_eq!(lines[1].spans[0].content, " L ");
1022+
assert_eq!(lines[1].spans[0].content, " ");
10231023
assert_eq!(lines[2].spans[0].content, " ");
10241024
}
10251025
}

codex-rs/tui/src/snapshots/codex_tui__diff_render__tests__add_details.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ source: tui/src/diff_render.rs
33
expression: terminal.backend()
44
---
55
"proposed patch to 1 file (+2 -0) "
6-
" README.md (+2 -0) "
6+
" README.md (+2 -0) "
77
" 1 +first line "
88
" 2 +second line "
99
" "

codex-rs/tui/src/snapshots/codex_tui__diff_render__tests__update_details_with_rename.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ source: tui/src/diff_render.rs
33
expression: terminal.backend()
44
---
55
"proposed patch to 1 file (+1 -1) "
6-
" src/lib.rs → src/lib_new.rs (+1 -1) "
6+
" src/lib.rs → src/lib_new.rs (+1 -1) "
77
" 1 line one "
88
" 2 -line two "
99
" 2 +line two changed "

codex-rs/tui/tests/fixtures/ideal-binary-response.txt

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ I’m going to scan the workspace and Cargo manifests to see build profiles and
1313
dependencies that impact binary size. Then I’ll summarize the main causes.
1414

1515
⚡ Running ls -la
16-
total 6696
16+
total 6696
1717
drwxr-xr-x@ 39 easong staff 1248 Aug 9 08:49 .
1818
drwxr-xr-x@ 29 easong staff 928 Aug 9 08:50 ..
1919
-rw-r--r--@ 1 easong staff 10244 Aug 8 21:13 .DS_Store
@@ -25,7 +25,7 @@ dependencies that impact binary size. Then I’ll summarize the main causes.
2525
-rw-r--r--@ 1 easong staff 8639 Aug 6 23:30 typewriter.md
2626
-rw-r--r--@ 1 easong staff 7673 Aug 6 21:58 wrap-plan.md
2727
⚡ Running sed -n '1,200p' Cargo.toml
28-
[workspace]
28+
[workspace]
2929
members = [
3030
"ansi-escape",
3131
"apply-patch",
@@ -50,7 +50,7 @@ tui, login, ollama, and mcp.
5050
⚡ Running for d in ansi-escape apply-patch arg0 cli common core exec execpolicy
5151
file-search linux-sandbox login mcp-client mcp-server mcp-types ollama tui; do
5252
echo "--- $d/Cargo.toml"; sed -n '1,200p' $d/Cargo.toml; echo; done
53-
--- ansi-escape/Cargo.toml
53+
--- ansi-escape/Cargo.toml
5454
[package]
5555
edition = "2024"
5656
name = "codex-ansi-escape"
@@ -62,7 +62,7 @@ echo "--- $d/Cargo.toml"; sed -n '1,200p' $d/Cargo.toml; echo; done
6262
] }
6363
tracing = { version
6464
⚡ Running sed -n '1,200p' execpolicy/Cargo.toml
65-
[package]
65+
[package]
6666
name = "codex-execpolicy"
6767
version = { workspace = true }
6868
edition = "2024"
@@ -74,7 +74,7 @@ echo "--- $d/Cargo.toml"; sed -n '1,200p' $d/Cargo.toml; echo; done
7474
[dev-dependencies]
7575
tempfile = "3.13.0"
7676
⚡ Running sed -n '1,200p' file-search/Cargo.toml
77-
[package]
77+
[package]
7878
edition = "2024"
7979
name = "codex-file-search"
8080
version = { workspace = true }
@@ -86,7 +86,7 @@ echo "--- $d/Cargo.toml"; sed -n '1,200p' $d/Cargo.toml; echo; done
8686
serde_json = "1.0.142"
8787
tokio = { version = "1", features = ["full"] }
8888
⚡ Running sed -n '1,200p' linux-sandbox/Cargo.toml
89-
[package]
89+
[package]
9090
edition = "2024"
9191
name = "codex-linux-sandbox"
9292
version = { workspace = true }
@@ -98,7 +98,7 @@ echo "--- $d/Cargo.toml"; sed -n '1,200p' $d/Cargo.toml; echo; done
9898
"signal",
9999
] }
100100
⚡ Running sed -n '1,200p' login/Cargo.toml
101-
[package]
101+
[package]
102102
edition = "2024"
103103
name = "codex-login"
104104
version = { workspace = true }
@@ -110,7 +110,7 @@ echo "--- $d/Cargo.toml"; sed -n '1,200p' $d/Cargo.toml; echo; done
110110
pretty_assertions = "1.4.1"
111111
tempfile = "3"
112112
⚡ Running sed -n '1,200p' mcp-client/Cargo.toml
113-
[package]
113+
[package]
114114
name = "codex-mcp-client"
115115
version = { workspace = true }
116116
edition = "2024"
@@ -122,7 +122,7 @@ echo "--- $d/Cargo.toml"; sed -n '1,200p' $d/Cargo.toml; echo; done
122122
"time",
123123
] }
124124
⚡ Running sed -n '1,200p' mcp-server/Cargo.toml
125-
[package]
125+
[package]
126126
edition = "2024"
127127
name = "codex-mcp-server"
128128
version = { workspace = true }
@@ -134,7 +134,7 @@ echo "--- $d/Cargo.toml"; sed -n '1,200p' $d/Cargo.toml; echo; done
134134
tokio-test = "0.4"
135135
wiremock = "0.6"
136136
⚡ Running sed -n '1,200p' mcp-types/Cargo.toml
137-
[package]
137+
[package]
138138
edition = "2024"
139139
name = "mcp-types"
140140
version = { workspace = true }
@@ -146,7 +146,7 @@ echo "--- $d/Cargo.toml"; sed -n '1,200p' $d/Cargo.toml; echo; done
146146
serde = { version = "1", features = ["derive"] }
147147
serde_json = "1"
148148
⚡ Running sed -n '1,200p' ollama/Cargo.toml
149-
[package]
149+
[package]
150150
edition = "2024"
151151
name = "codex-ollama"
152152
version = { workspace = true }
@@ -158,7 +158,7 @@ echo "--- $d/Cargo.toml"; sed -n '1,200p' $d/Cargo.toml; echo; done
158158
[dev-dependencies]
159159
tempfile = "3"
160160
⚡ Running sed -n '1,200p' tui/Cargo.toml
161-
[package]
161+
[package]
162162
edition = "2024"
163163
name = "codex-tui"
164164
version = { workspace = true }
@@ -170,7 +170,7 @@ echo "--- $d/Cargo.toml"; sed -n '1,200p' $d/Cargo.toml; echo; done
170170
rand = "0.8"
171171
vt100 = "0.16.2"
172172
⚡ Running sed -n '1,200p' chatgpt/Cargo.toml
173-
[package]
173+
[package]
174174
edition = "2024"
175175
name = "codex-chatgpt"
176176
version = { workspace = true }

0 commit comments

Comments
 (0)