Files
kandev/apps/web/components/review
José Almeida 77f7924004 fix(web): restore diff expansion for committed-source review rows (#1423)
* fix(web): restore diff expansion for committed-source review rows

#1097 narrowed the expansion gate to `source === "uncommitted"` to dodge a
trailing-context crash, which silently dropped expand controls for committed
files — the bulk of a review. The crash is now caught by the reparse guard in
useExpandableDiff, so re-enable expansion for committed rows, fetching the old
side from the repo's base branch (not HEAD, which already has the commits).

Extracts the decision into a pure `resolveDiffExpansion` helper and adds a
multi-repo guard so a committed file never borrows another repo's base branch.

* fix(web): guard diff-expansion base fallback to single-repo tasks

Resolve baseBranchByRepo once in ReviewDiffList (not per row) and only expose a
fallback base branch when the task has exactly one repo, so a committed file
with no repository_name in a multi-repo task no longer borrows an arbitrary
repo's base branch. Addresses Greptile/cubic review feedback.
2026-06-18 11:58:04 +01:00
..