Skip to content

Compare browser lists entries that exist only in the compared repository after all the base repository's entries, out of name order #503

Open

Description

@matt-edmondson

What's wrong

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:

IEnumerable<RelativePath> allFilesystemEntries = BrowserContentsBase.Union(BrowserContentsCompare);   // ProjectDirector.cs:2076
...
Collection<RelativePath> files = allFilesystemEntries.Except(directories).ToCollection();             // :2080

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.

Suggested fix / acceptance criteria

Activity

  1. matt-edmondson commented on Oct 19, 2026

    @matt-edmondson
    ContributorAuthor

    Triage


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions