Skip to content

Add persistence to the collapsed state of Properties panel node sections - #4300

Merged
Keavon merged 3 commits into
masterfrom
persist-properties-collapsed
Jul 1, 2026
Merged

Keavon merged 3 commits into
masterfrom
persist-properties-collapsed

Conversation

@Keavon

@Keavon Keavon commented Jul 1, 2026

Copy link
Copy Markdown
Member

No description provided.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 9 files

Confidence score: 4/5

  • In editor/src/messages/portfolio/document/document_message_handler.rs, using Vec<NodeId> as a set makes each contains/remove O(n) during properties panel renders and toggles, which can cause avoidable UI slowdown as selection size grows—switch to HashSet<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

Comment thread editor/src/messages/portfolio/document/document_message_handler.rs
Comment thread editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs Outdated

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@GraphiteEditor GraphiteEditor deleted a comment from gemini-code-assist Bot Jul 1, 2026
@Keavon
Keavon merged commit 7ae7bda into master Jul 1, 2026
10 checks passed
@Keavon
Keavon deleted the persist-properties-collapsed branch July 1, 2026 11:54

This branch was successfully deployed

1 active deployment
graphite-dev (Preview) bb6d0242 Deployed Jul 1, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant