Summary
In the Lab “My model reports” dataset comparison, deselecting one repository discards the other selected repositories and keeps the repository that was just deselected. This prevents comparing the intended remaining projects.
Reproduction
Baseline: d709b1898549c5ab4091302a4c26f45bbe198c66 (main).
- Open
/lab/report/my with a model report containing at least three dataset repositories.
- Click Pick for compare.
- Select repositories A, B and C.
- Click B again to deselect it.
Expected: A and C remain checked, B becomes unchecked, and Compare opens the comparison for A and C.
Actual: only B remains checked. A and C are unchecked, and Compare does not navigate because the selected count is now one.
The selection updater in apps/web/src/modules/lab/model/components/DataSetPanel/index.tsx returns pre.splice(pre.indexOf(shortCode), 1). splice mutates the existing state and returns the removed items rather than the remaining selection.
Validation scope
Reproduced in Chromium against the unmodified local Next.js /lab/report/my page. Only the GraphQL responses for a synthetic signed-in user and a three-repository model report were intercepted. The actual ReportItem, DataSetPanel, RepoCard, and RepoCompareBar components handled the interaction; no selection logic was copied into a reproduction component.
I can submit a minimal fix using an immutable deselection update and regression coverage for the selected checkboxes, the comparison action, and cancel/reset behavior.
Summary
In the Lab “My model reports” dataset comparison, deselecting one repository discards the other selected repositories and keeps the repository that was just deselected. This prevents comparing the intended remaining projects.
Reproduction
Baseline:
d709b1898549c5ab4091302a4c26f45bbe198c66(main)./lab/report/mywith a model report containing at least three dataset repositories.Expected: A and C remain checked, B becomes unchecked, and Compare opens the comparison for A and C.
Actual: only B remains checked. A and C are unchecked, and Compare does not navigate because the selected count is now one.
The selection updater in
apps/web/src/modules/lab/model/components/DataSetPanel/index.tsxreturnspre.splice(pre.indexOf(shortCode), 1).splicemutates the existing state and returns the removed items rather than the remaining selection.Validation scope
Reproduced in Chromium against the unmodified local Next.js
/lab/report/mypage. Only the GraphQL responses for a synthetic signed-in user and a three-repository model report were intercepted. The actualReportItem,DataSetPanel,RepoCard, andRepoCompareBarcomponents handled the interaction; no selection logic was copied into a reproduction component.I can submit a minimal fix using an immutable deselection update and regression coverage for the selected checkboxes, the comparison action, and cancel/reset behavior.