Skip to content

Commit 184d14a

Browse files
committed
Join compact failure connector directly to reason
1 parent 8003b29 commit 184d14a

4 files changed

Lines changed: 11 additions & 11 deletions

File tree

‎crates/jcode-tui/src/tui/ui_messages.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2856,7 +2856,7 @@ pub(crate) fn render_background_task_message(
28562856
let timing = Line::from(Span::styled(format!(" · {timing}"), muted));
28572857
header = super::truncate_line_preserving_suffix_to_width(&header, &timing, row_width);
28582858
let reason = Line::from(vec![
2859-
Span::styled(" ╰ ", muted),
2859+
Span::styled(" ╰─", muted),
28602860
Span::styled(detail, muted),
28612861
]);
28622862
let mut lines = vec![
@@ -4176,7 +4176,7 @@ fn render_tool_failure_reason(content: &str, width: usize, indent: usize) -> Lin
41764176
let summary = summary.split_whitespace().collect::<Vec<_>>().join(" ");
41774177
super::truncate_line_with_ellipsis_to_width(
41784178
&Line::from(Span::styled(
4179-
format!("{}╰ {}", " ".repeat(indent), summary),
4179+
format!("{}╰─{}", " ".repeat(indent), summary),
41804180
Style::default().fg(dim_color()),
41814181
)),
41824182
width,

‎crates/jcode-tui/src/tui/ui_messages/gmail_drafts_tests.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ fn render_gmail_draft_failure_keeps_normal_header_without_redundant_card() {
6767

6868
assert_eq!(lines.len(), 2, "{plain}");
6969
assert!(plain.contains("✗ gmail draft"), "{plain}");
70-
assert!(plain.contains("╰ Gmail draft creation failed"), "{plain}");
70+
assert!(plain.contains("╰─Gmail draft creation failed"), "{plain}");
7171
assert!(!plain.contains("(recipient missing)"), "{plain}");
7272
assert!(!plain.contains("(no subject)"), "{plain}");
7373
assert!(!plain.contains("(empty body)"), "{plain}");

‎crates/jcode-tui/src/tui/ui_messages/tests.rs‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -889,7 +889,7 @@ fn render_background_task_failure_is_compact() {
889889
"{plain}"
890890
);
891891
assert!(
892-
plain.contains("╰ exit 101 · [E0308]: mismatched types"),
892+
plain.contains("╰─exit 101 · [E0308]: mismatched types"),
893893
"{plain}"
894894
);
895895
assert!(!plain.contains("remote build"));
@@ -940,7 +940,7 @@ fn render_background_task_failure_without_diagnostic_is_honest() {
940940
.collect::<Vec<_>>()
941941
.join("\n");
942942
assert!(plain.contains("✗ bash · took 7.1s"), "{plain}");
943-
assert!(plain.contains("╰ exit 1 · no diagnostic captured"));
943+
assert!(plain.contains("╰─exit 1 · no diagnostic captured"));
944944
}
945945

946946
#[test]
@@ -2743,7 +2743,7 @@ fn render_tool_message_keeps_error_summary_when_details_hidden() {
27432743
assert!(
27442744
extract_line_text(&lines[1])
27452745
.trim_start()
2746-
.starts_with("╰ command not found")
2746+
.starts_with("╰─command not found")
27472747
);
27482748
assert!(
27492749
lines[1]
@@ -2835,7 +2835,7 @@ fn render_tool_message_failures_keep_normal_headers_and_muted_reasons() {
28352835
assert!(
28362836
extract_line_text(&lines[1])
28372837
.trim_start()
2838-
.starts_with("╰ permission denied")
2838+
.starts_with("╰─permission denied")
28392839
);
28402840
assert!(
28412841
lines[1].spans.iter().all(
@@ -2907,7 +2907,7 @@ fn render_tool_message_mixed_batch_keeps_call_labels_and_nested_failure_reason()
29072907
assert!(
29082908
extract_line_text(&lines[2])
29092909
.trim_start()
2910-
.starts_with("╰ permission denied")
2910+
.starts_with("╰─permission denied")
29112911
);
29122912
assert!(
29132913
lines[2]
@@ -2946,7 +2946,7 @@ fn render_tool_message_batch_level_failure_does_not_invent_successful_children()
29462946
let lines = render_tool_message(&msg, 120, crate::config::DiffDisplayMode::Off);
29472947
assert_eq!(lines.len(), 2);
29482948
assert!(extract_line_text(&lines[0]).contains("✗ batch · Inspect sources"));
2949-
assert!(extract_line_text(&lines[1]).contains("╰ invalid tool_calls payload"));
2949+
assert!(extract_line_text(&lines[1]).contains("╰─invalid tool_calls payload"));
29502950
}
29512951

29522952
#[test]

‎crates/jcode-tui/src/tui/ui_tests/tools.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ Completed: 2 succeeded, 1 failed"
499499
assert!(
500500
rendered
501501
.iter()
502-
.any(|line| line.contains("╰ missing field `mode`"))
502+
.any(|line| line.contains("╰─missing field `mode`"))
503503
);
504504
assert!(
505505
rendered
@@ -552,7 +552,7 @@ fn test_render_tool_message_batch_all_failed_marks_all_children_failed() {
552552
assert_eq!(
553553
rendered
554554
.iter()
555-
.filter(|line| line.contains("╰ missing field `mode`"))
555+
.filter(|line| line.contains("╰─missing field `mode`"))
556556
.count(),
557557
3
558558
);

0 commit comments

Comments
 (0)