Skip to content

Lab dataset comparison keeps the deselected repository and clears the others #436

Description

@3219378872

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).

  1. Open /lab/report/my with a model report containing at least three dataset repositories.
  2. Click Pick for compare.
  3. Select repositories A, B and C.
  4. 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions