fix: key review checkmarks by file snapshots instead of revision pairs

This commit is contained in:
Valdemar Lorenzen
2026-10-20 11:09:48 +02:00
parent ea04e30072
commit 8f8d96ead9
9 changed files with 164 additions and 12 deletions
+7
View File
@@ -1885,6 +1885,7 @@ fn hidden_tab_diff_results_restore_visible_insert_interaction_and_route_request_
after: "working".into(),
editable_paths: Default::default(),
files: vec![ChangedFile {
review_revisions: None,
loaded: true,
path: "file.txt".into(),
old_path: None,
@@ -3050,6 +3051,7 @@ fn working_diff(editor: &mut Editor, root: &Path, paths: &[&str]) -> Box<[(PathB
let text = fs::read_to_string(root.join(path)).unwrap();
let lines: Vec<String> = text.lines().map(str::to_owned).collect();
ChangedFile {
review_revisions: None,
loaded: true,
path: PathBuf::from(*path),
old_path: None,
@@ -3109,6 +3111,7 @@ fn historical_diff(editor: &mut Editor, root: &Path, before: Vec<String>, after:
after: "head".into(),
editable_paths: Default::default(),
files: vec![ChangedFile {
review_revisions: None,
loaded: true,
path: "file.txt".into(),
old_path: None,
@@ -4071,6 +4074,7 @@ fn bookmark_refresh_reloads_paths_and_preserves_view_until_lazy_content_arrives(
let old_snapshot = editor.buffer_id();
let cursor = editor.cursor();
let file = |path: &str, loaded| ChangedFile {
review_revisions: None,
path: path.into(),
old_path: None,
status: FileStatus::Modified,
@@ -4278,6 +4282,7 @@ fn completed_working_refresh_serializes_lazy_selection_and_invalidates_pending_n
}
if changed {
let file = crate::diff::ChangedFile {
review_revisions: None,
path: "nested/new.txt".into(),
old_path: Some("nested/old.txt".into()),
status: crate::diff::FileStatus::Renamed,
@@ -4318,6 +4323,7 @@ fn lazy_lsp_target(editor: &mut Editor) -> crate::diff::ChangedFile {
let diff = editor.diff.as_mut().unwrap();
let comparison = diff.comparison.as_mut().unwrap();
comparison.files.push(ChangedFile {
review_revisions: None,
path: "nested/new.txt".into(),
old_path: Some("nested/old.txt".into()),
status: FileStatus::Renamed,
@@ -4338,6 +4344,7 @@ fn lazy_lsp_target(editor: &mut Editor) -> crate::diff::ChangedFile {
.map(|(index, file)| (index, file.path.clone())),
));
ChangedFile {
review_revisions: None,
path: "nested/new.txt".into(),
old_path: Some("nested/old.txt".into()),
status: FileStatus::Renamed,