fix: simplify revision diff selection into a flat list

Revisions still used ancestry lanes and placed author/date/bookmark metadata before the summary. Show short change IDs and summaries first, move metadata to a dimmed detail row, and remove the obsolete picker graph projection.
This commit is contained in:
Valdemar Lorenzen
2026-11-05 14:54:03 +01:00
parent 1afc896cab
commit 2368091d93
6 changed files with 40 additions and 293 deletions
+13 -7
View File
@@ -3561,7 +3561,7 @@ fn checkout_picker_labels_follow_the_configured_stage() {
}
#[test]
fn jj_picker_renders_graph_before_badge_and_compacts_without_losing_controls() {
fn jj_revision_picker_keeps_summaries_and_before_visible_without_graph_lanes() {
use crate::diff::{Category, RepoKind, Revision, RevisionGraph, RevisionTarget};
let mut catalog = diff_catalog();
catalog.kind = RepoKind::Jujutsu;
@@ -3582,10 +3582,10 @@ fn jj_picker_renders_graph_before_badge_and_compacts_without_losing_controls() {
change_id: change.into(),
description: format!("{change} description"),
parents: parent.into_iter().map(str::to_owned).collect(),
author: "alice".into(),
author: "An author whose name must not displace the summary".into(),
timestamp: "2026-10-23".into(),
bookmarks: if current {
"main".into()
"vl/fin-1441-1-ora-edi-recovery@origin".into()
} else {
String::new()
},
@@ -3606,10 +3606,16 @@ fn jj_picker_renders_graph_before_badge_and_compacts_without_losing_controls() {
render_diff(&mut terminal, &diff, &mut panels);
let text = screen_text(&terminal);
assert!(text.contains("Choose After"));
assert!(text.contains("@"));
assert!(text.contains("change-a [Before] alice 2026-10-23 [main] aaaa1111"));
assert!(text.contains("change-a description"));
assert!(!text.contains("Before:"));
let summary = text
.lines()
.find(|line| line.contains("change-a description"))
.unwrap();
assert!(summary.contains("[Before]"), "{text}");
assert!(!summary.contains("An author"), "{text}");
assert!(
!text.contains('~') && !text.contains('○') && !text.contains('◆'),
"{text}"
);
let buffer = terminal.backend().buffer();
let selected_rows: Vec<_> = (0..buffer.area.height)
.filter(|&y| (0..buffer.area.width).any(|x| buffer[(x, y)].bg == Color::Blue))