fix(web): namespace the diff file tree by repo in multi-repo turn diffs - #241
Merged
LoganRupe merged 1 commit intoSep 9, 2026
Merged
Conversation
Two repo roots in one turn diff that both changed the same relative path produced two tree entries at the same path, and Pierre's PathStore threw. The tree now builds from the per-repo groups the panel already renders, with each root's files under a folder named for that root. A repeated path is dropped instead of handed to the tree. Fixes #240
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Changed
The diff file tree now mirrors the grouped rendering the diff panel already does. When a turn diff spans more than one repo root, each root's files sit under a folder named for that root (the same label as the section header). Single-root threads keep their flat paths.
diffFileTreeEntriesalso drops a repeated path instead of passing it to the tree, so a duplicate can never throw from this input again.visibleGroupsis memoised, and the tree's selected path is translated into the grouped form so a file chip in chat still highlights the right row.Why
Fixes #240. Two repos in one turn diff that both changed
README.mdproduced two tree entries at the same path. Pierre'sPathStorethrows on a duplicate, and the throw left the conversation unusable across reloads.Not changed: clicking a tree row in the grouped view still does nothing. The reveal hook waits for
AnnotatableCodeView, which the grouped renderer never mounts. That was already the case before the crash and is a separate fix.UI Changes
No visual change to the diff panel. The tree gains a top-level folder per repo in multi-repo turn diffs.