e6cb993e12
The review file tree now renders per-repo top-level nodes when a task's changes span multiple repositories, so the same file path in two repos no longer collapses into a single ambiguous entry. - ReviewFile.repository_id and ReviewFile.repository_name (optional) identify which repo each file belongs to. Single-repo callers leave them unset and the tree falls back to the existing flat grouping. - buildFileTree splits into buildMultiRepoTree (when 2+ distinct repository_names are present) and buildFlatTree (the original logic). Repo roots have isRepoRoot=true and a repositoryId for downstream filters; their children are full path subtrees per repo. - collapse() skips repo roots so a repo with a single changed file still shows its repo header. - ReviewFileTree renders repo roots with a stronger label, a top border, and an "N files" count badge; data-testid="repo-root-node" for E2E coverage. File-level rendering is unchanged. - Tests cover the flat-tree fallback (no repo info, single repo), multi-repo grouping, repo-root pinning, and same-filename-different- repos isolation. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>