PR-R3: Persist viewer representations in extras - #770
Open
cpignedoli wants to merge 1 commit into
Open
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feature/load-viewer-representations-from-extras #770 +/- ##
==================================================================================
Coverage ? 85.69%
==================================================================================
Files ? 18
Lines ? 3426
Branches ? 0
==================================================================================
Hits ? 2936
Misses ? 490
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This was referenced Jun 25, 2026
cpignedoli
marked this pull request as ready for review
June 25, 2026 09:08
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.
What
PR-R3 in the representation split. This is stacked on top of #769.
This PR adds the persistence side of viewer representations:
StructureData/CifDataextras;Store representationsbutton for already-stored structures;Store in AiiDApersist representation masks when a structure is first stored;Apply representationsin sync with extras when the viewer has a stored node.Why
Users can now change visualization styles without creating a new structure node. The geometry remains the same AiiDA node, while the mutable viewer state lives in extras.
Small defaulting fix
This PR also makes the
StructureManagerWidgetstorage format selector explicitly default toStructureDatawhen nonode_classis passed.Previously the
RadioButtonswidget relied on the first entry inSUPPORTED_DATA_FORMATS. That is implicit and can silently select the wrong storage type if the option order changes. The new logic keeps explicit caller choices unchanged, but falls back toStructureDatafor the default structure-manager path. This matters here because representation persistence is stored on the AiiDA node extras, so the node type must be the one the widget is actually intended to create.Chain
Implemented with Codex.
Validation
Result: 37 passed, 24 warnings.