Skip to content

Implement dragging to reorder Properties panel node sections - #4299

Merged
Keavon merged 2 commits into
masterfrom
properties-panel-node-ordering
Jul 1, 2026
Merged

Keavon merged 2 commits into
masterfrom
properties-panel-node-ordering

Conversation

@Keavon

@Keavon Keavon commented Jul 1, 2026

Copy link
Copy Markdown
Member
Recording.2026-07-01.030232.mp4

@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 introduces interactive drag-and-drop reordering for Properties panel sections, allowing users to rearrange pinned nodes or nodes within a selected layer's chain. The changes span the frontend Svelte components, WASM wrapper, and backend Rust message handlers and network interfaces. Feedback on the changes highlights two key issues in the frontend drag implementation: a usability bug where aborted drags incorrectly swallow the subsequent legitimate left click, and a missing defensive check for when a dragged section is no longer found in the DOM (i.e., fromIndex is -1).

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.

Comment thread frontend/src/components/panels/Properties.svelte
Comment thread frontend/src/components/panels/Properties.svelte Outdated

@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.

6 issues found across 9 files

Confidence score: 3/5

  • In frontend/src/components/panels/Properties.svelte, the drag-start button filter is too strict, so valid drags can be blocked when the reorder handle is not a <button>, which can make section reordering appear broken to users — broaden the guard to recognize the actual drag handle instead of button-only starts before merging.
  • In frontend/src/components/panels/Properties.svelte, drag state/index handling has edge-case regressions (justFinishedDrag on Escape and missing fromIndex !== -1 guard) that can swallow the next real click or run reorder logic with an invalid index during concurrent UI updates — only set the click-suppression flag on completed drags and add an explicit fromIndex validity check.
  • In editor/src/messages/portfolio/document/document_message_handler.rs, mixed selections can still enter the single-layer reorder path and trigger chain-node reordering incorrectly, risking unintended document edits — require that no non-layer selections are present before taking that path.
  • In editor/src/messages/portfolio/document/utility_types/network_interface.rs, pinned-order pruning uses attempted deletions rather than successful deletions, so a failed delete can silently corrupt pinned display order for remaining nodes; the related recoverable path also logs at error level, which can hide real failures in noise — prune only on confirmed deletions and downgrade that log to warn/debug.

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread frontend/src/components/panels/Properties.svelte
Comment thread editor/src/messages/portfolio/document/document_message_handler.rs
Comment thread editor/src/messages/portfolio/document/utility_types/network_interface.rs Outdated
Comment thread frontend/src/components/panels/Properties.svelte Outdated
Comment thread frontend/src/components/panels/Properties.svelte
@Keavon
Keavon merged commit 1648e33 into master Jul 1, 2026
10 checks passed
@Keavon
Keavon deleted the properties-panel-node-ordering branch July 1, 2026 10:39
Keavon added a commit that referenced this pull request Jul 1, 2026
Keavon added a commit that referenced this pull request Jul 1, 2026
…ons (#4300)

* Add persistence to the collapsed state of Properties panel node sections

* Improve comments

* Fix generator node handling with #4299
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