You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Compare browser lists entries that exist only in the compared repository after all the base repository's entries, out of name order #503
Since #482, RepoBrowsing.List returns a folder's entries "in name order ignoring case", so that "the browsers read the same on every machine" (ProjectDirector/RepoBrowsing.cs:26-36).
The compare browser throws that order away when it merges the two sides:
Enumerable.Union yields every distinct element of the first sequence and only then the new elements of the second. So every entry that exists only in the compared repository is appended after all the base entries, in both the folder group and the file group.
Failure scenario
The base folder holds a.txt and c.txt, and the compared folder holds b.txt and c.txt. The compare browser shows a.txt, c.txt, b.txt; checked with new[]{"a.txt","c.txt"}.Union(new[]{"b.txt","c.txt"}).
The rows that end up out of place are exactly the compared-only ones, which are the rows offering "Take". In a large folder they pile up at the bottom of each group instead of sitting next to their neighbours. The single-repo browser is not affected.
Pull the merge into a plain method (e.g. RepoBrowsing.Merge(base, compare)) and add a RepoBrowsingTests case: base [a.txt, c.txt] plus compare [b.txt, c.txt] gives [a.txt, b.txt, c.txt], each entry once, with folders and files each in name order.
Priority: Low. No data is lost and nothing does the wrong thing. Only the order of compared-only rows in the compare browser is wrong, though those are the "Take" rows.
Area / suggested owner: Compare browser (ProjectDirector.cs around SwitchCompareBrowserPath, RepoBrowsing). Owner: @matt-edmondson
Activity
matt-edmondson commentedon Oct 19, 2026
Triage
ProjectDirector.csaroundSwitchCompareBrowserPath,RepoBrowsing). Owner: @matt-edmondsonSwitchCompareBrowserPath, which is where Repo and compare browsers stat every entry on the file system on every frame (plus O(n²) Contains lookups) #498's cached listing would live. The two are best fixed together.RepoBrowsing.Merge(base, compare)with the ordinal-ignore-case sort and a unit test, and call it from the place Repo and compare browsers stat every entry on the file system on every frame (plus O(n²) Contains lookups) #498 caches the listing.Generated by Claude Code