#8249: prevent hanging hydrogen bond when typing after antisense ove…#10143
Open
guranda2626 wants to merge 3 commits into
Open
#8249: prevent hanging hydrogen bond when typing after antisense ove…#10143guranda2626 wants to merge 3 commits into
guranda2626 wants to merge 3 commits into
Conversation
added 3 commits
June 1, 2026 14:54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes a bug where an indestructible hanging hydrogen bond appears on the canvas after pressing Enter at the end of an antisense sequence and typing a nucleotide in Sequence mode.
Steps to reproduce:
RNA1{r(A)p.r(A)p.r(A)p.r(A)}|RNA2{r(U)p.r(U)p.r(U)p.r(U)}$RNA1,RNA2,11:pair-11:pair$$$V2.0Before: A hanging dashed bond appears — disconnected from any antisense nucleotide, impossible to select or delete.
After: The new
Anucleotide is added as a standalone sense node with no bond.Root cause
When a HELM structure has a partially-paired antisense chain, the
SequenceViewModelplaces unmatched antisense nucleotides into overflow positions —TwoStrandedChainItemnodes wheresenseNodeisEmptySequenceNodeandantisenseNodeis a real unmatched nucleotide.Pressing Enter at such a position calls
splitCurrentChain(), which detaches the last unmatched antisense nucleotide from the backbone. After re-render, the caret lands at the chain's end node, whosepreviousNodeInSameChainis{EmptySeq, U2}.When the user then presses A in sync edit mode, the antisense-creation condition:
evaluated
U2as truthy and fired, inserting a new antisense U into U2's existing chain and creating a hydrogen bond between a new sense A (isolated chain) and that antisense U — a bond crossing incompatible chains, making it unremovable.Fix
The sync-mode branch of the antisense condition in
add-sequence-item(SequenceMode.ts) now also requires that the triggering node'ssenseNodeis present and not anEmptySequenceNode:Issue link
Check list
#1234 – issue name