Skip to content

#9489 - Nucleotide presets: Creating preset with the same component codes replaces properties of the existing preset - #11926

Open
beyzaevcen wants to merge 1 commit into
masterfrom
9489-fix-nucleotide-preset-same-component-codes-override
Open

beyzaevcen wants to merge 1 commit into
masterfrom
9489-fix-nucleotide-preset-same-component-codes-override

Conversation

@beyzaevcen

@beyzaevcen beyzaevcen commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

How the feature works? / How did you fix the issue?

(Screenshots, videos, or GIFs, if applicable)

Presets with different names but identical Base/Sugar/Phosphate component
codes collided during library updates:

  • The RNA preset's group template $ref was derived only from its
    components' ids, not from the preset's own name, so two presets sharing
    component codes could get the same $ref and overwrite each other in the
    library.
  • areSameMonomers in Editor.ts matched hidden monomer components by
    symbol/class/hidden only, ignoring id. A later preset's component with
    the same code silently overwrote an earlier preset's dictionary entry,
    so the later preset's own component ref was never registered and it got
    filtered out as "missing a component".
  • setDefaultPresets bailed out entirely once presetsDefault already had
    data, matching only against the first item's name, so newly added
    presets never reached Redux state until a full reload.

Fix each of the three points so presets with shared component codes but
distinct names are stored, resolved, and rendered independently.

Screenshot 2026-09-18 at 15 06 17 Screenshot 2026-09-18 at 15 06 35 Screenshot 2026-09-18 at 15 06 47

Check list

  • unit-tests written
  • e2e-tests written
  • documentation updated
  • PR name follows the pattern #1234 – issue name
  • branch name doesn't contain '#'
  • PR is linked with the issue
  • base branch (master or release/xx) is correct
  • task status changed to "Code review"
  • reviewers are notified about the pull request

@beyzaevcen beyzaevcen changed the title #9489 - fix creating a nucleotide preset with reused component codes … #9489 - Nucleotide presets: Creating preset with the same component codes replaces properties of the existing preset Sep 18, 2026
@beyzaevcen beyzaevcen self-assigned this Sep 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Nucleotide presets: Creating preset with the same component codes replaces properties of the existing preset

1 participant