R6.3 done: round 3 fix, hard links join the recent list
release / macos (push) Failing after 1s
release / windows (push) Failing after 2s
release / linux (push) Skipped

An explicit open checks the session registry by file identity, so a
hard link to a shown file joins the list. Ticked after round 3.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 5.5 committed 2026-10-15 03:36:58 -04:00
1 parent 030ecfcff6
commit 39ff567226
5 files changed
+13 -9

No files matched your search

+1 -1
View File
@@ -17,7 +17,7 @@ impl Desk {
return self.open_folder(path, cx);
}
// A shown file only takes focus; the list still learns.
let shown = self.tab_of(&path).is_some();
let shown = self.core.sessions.is_open(&path).unwrap_or(false);
self.open_file(path.clone(), cx);
if shown {
self.remember(&path, cx);
+7 -7
View File
@@ -472,19 +472,19 @@ mod window {
assert!(desk.read_with(cx, |desk, _| desk.recent.is_empty()));
let list = data.path().join("recent.json");
assert_eq!(std::fs::read_to_string(&list).expect("the list"), "[]");
// Explicit opens still join it, the restored file too.
// Explicit opens still join it: the restored file, a link.
let alias = files.path().join("alias.md");
std::fs::hard_link(&a, &alias).expect("a hard link");
open(&desk, &a, cx);
open(&desk, &alias, cx);
open(&desk, &b, cx);
assert_eq!(names(&desk, cx), ["a.md", "b.md"]);
let real = |path: &std::path::Path| dunce::canonicalize(path).expect("real");
let (a, b) = (real(&a), real(&b));
assert_eq!(
desk.read_with(cx, |desk, _| desk.recent.clone()),
[b.clone(), a.clone()]
);
let want = [real(&b), real(&alias), real(&a)];
assert_eq!(desk.read_with(cx, |desk, _| desk.recent.clone()), want);
let kept: Vec<std::path::PathBuf> =
serde_json::from_str(&std::fs::read_to_string(&list).expect("the list"))
.expect("a list");
assert_eq!(kept, [b, a]);
assert_eq!(kept, want);
}
}