Skip to content

fix: preserve repeated group roles in VS Code Compare #52

Closed

Description

@Ramlaoui

Follow-up to PR #50 and the review finding.

The storage format permits the same record in multiple roles within a group. set_compare([{record: 0, label: "reactant"}, {record: 0, label: "product"}]) produces duplicate record IDs and overwrites one label. Compare keys its viewer list by record ID, so opening this valid group can throw a duplicate-key error.

Preserve membership identity, or deliberately deduplicate and retain all role labels. Apply the MAX_COMPARE limit after the chosen policy. Add a regression case with the same record in two roles.

Acceptance: Compare renders the group without throwing, and users can see both roles without silently losing a label.

Explicitly deferred from PR #50 at the user's request; avoid sending groups with repeated members to Compare until fixed.

Activity

  1. added a commit that references this issue on Sep 30, 2026
    40fb441
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