fix(web): select pull request on review surface (#1857)

* fix(web): select pull request on review surface

* fix(web): address review feedback

* test(web): stabilize tablet review target assertion

* fix(web): address late review feedback

* test(web): cover PR review boundary branches
This commit is contained in:
José Almeida
2026-07-22 17:52:58 +01:00
committed by GitHub
parent 04899e1d78
commit d5da5d0022
65 changed files with 3021 additions and 569 deletions
@@ -93,6 +93,16 @@ describe("mapPRFilesToChangedFiles", () => {
expect(out.every((f) => f.repository_name === "frontend")).toBe(true);
});
it("stamps the exact PR key on every row", () => {
const [out] = mapPRFilesToChangedFiles(
[diffFile({ filename: "README.md" })],
"frontend",
"acme/widgets/42",
);
expect(out.prKey).toBe("acme/widgets/42");
});
it("defaults repository_name to '' when caller omits it (single-repo path)", () => {
// Empty string is meaningful: PRFilesGroupedList treats one group with
// empty name as the single-repo case and skips per-repo sub-headers.