feat: separate draft pull requests into their own tab

This commit is contained in:
Valdemar Lorenzen
2026-10-21 10:25:08 +02:00
parent cce3b1e469
commit 6a359cc351
9 changed files with 179 additions and 22 deletions
+10 -1
View File
@@ -3508,7 +3508,11 @@ fn pull_request_picker_renders_all_rows_without_a_pinned_offset() {
},
label: format!("#{index:02} Pull request"),
description: "open · main ← topic".into(),
category: Category::Open,
category: if index == 1 {
Category::Drafts
} else {
Category::Open
},
},
format!("2026-01-{:02}T00:00:00Z", 20 - index),
)
@@ -3548,6 +3552,11 @@ fn pull_request_picker_renders_all_rows_without_a_pinned_offset() {
);
render_diff(&mut terminal, &diff, &mut panels);
assert!(screen_text(&terminal).contains("No matching pull requests"));
diff.handle(Input::Char('\t'));
render_diff(&mut terminal, &diff, &mut panels);
let text = screen_text(&terminal);
assert!(text.contains("> #01 Pull request"));
assert!(!text.contains("#00 Pull request") && !text.contains("#19 Pull request"));
}
}