Skip to content

fix(web): namespace the diff file tree by repo in multi-repo turn diffs - #241

Merged
LoganRupe merged 1 commit into
multi-repo-workspacesfrom
t3code/fix/diff-tree-multi-repo-paths
Sep 9, 2026
Merged

fix(web): namespace the diff file tree by repo in multi-repo turn diffs#241
LoganRupe merged 1 commit into
multi-repo-workspacesfrom
t3code/fix/diff-tree-multi-repo-paths

Conversation

@LoganRupe

Copy link
Copy Markdown
Owner

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.

diffFileTreeEntries also drops a repeated path instead of passing it to the tree, so a duplicate can never throw from this input again.

visibleGroups is 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.md produced two tree entries at the same path. Pierre's PathStore throws 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.

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
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M labels Sep 9, 2026
@LoganRupe
LoganRupe merged commit 0a96891 into multi-repo-workspaces Sep 9, 2026
7 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants