Add persistence to the collapsed state of Properties panel node sections - #4300
Conversation
There was a problem hiding this comment.
2 issues found across 9 files
Confidence score: 4/5
- In
editor/src/messages/portfolio/document/document_message_handler.rs, usingVec<NodeId>as a set makes eachcontains/removeO(n) during properties panel renders and toggles, which can cause avoidable UI slowdown as selection size grows—switch toHashSet<NodeId>before merging to de-risk performance and duplicate-state edge cases. - In
editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs, the doc comment describes the field with imprecise “keyed collection” wording, which can mislead future changes and reviews even if runtime behavior is unaffected—tighten the comment to explicitly state it is a slice of collapsed node IDs.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="editor/src/messages/portfolio/document/document_message_handler.rs">
<violation number="1" location="editor/src/messages/portfolio/document/document_message_handler.rs:99">
P2: `Vec<NodeId>` used as a set → costly O(n) `contains`/`remove` on every properties panel render and every toggle. Use `HashSet<NodeId>` for O(1) operations and to prevent duplicates by construction.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
There was a problem hiding this comment.
Code Review
This pull request implements backend-persisted collapsed and expanded states for node sections in the Properties panel. It introduces a new ToggleNodePropertiesSectionExpanded message, tracks collapsed sections in the document message handler, prunes stale node IDs, and updates the frontend WidgetSection component to reflect and toggle this state via WASM. I have no feedback to provide as there are no review comments.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
No description provided.