Skip to content

Make the drawing tools' Weight control sync with the selected layer#4120

Merged
Keavon merged 1 commit intomasterfrom
control-bar-sync-weight-with-layers
May 7, 2026
Merged

Make the drawing tools' Weight control sync with the selected layer#4120
Keavon merged 1 commit intomasterfrom
control-bar-sync-weight-with-layers

Conversation

@Keavon
Copy link
Copy Markdown
Member

@Keavon Keavon commented May 7, 2026

No description provided.

Copy link
Copy Markdown
Contributor

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

Choose a reason for hiding this comment

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

1 issue found across 7 files

Confidence score: 3/5

  • There is a concrete sync risk in editor/src/messages/portfolio/document/node_graph/node_graph_message_handler.rs: stroke-deletion detection only inspects explicit node_ids, so stroke nodes removed indirectly through delete_children can be missed.
  • Because this is a medium-severity, high-confidence logic gap (6/10, 8/10), it could cause user-visible inconsistency where deleted strokes are not fully synchronized.
  • This PR likely needs a targeted fix or follow-up before relying on deletion behavior in nested node removal paths.
  • Pay close attention to editor/src/messages/portfolio/document/node_graph/node_graph_message_handler.rs - indirect child deletions may bypass stroke-node deletion syncing.
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/node_graph/node_graph_message_handler.rs">

<violation number="1" location="editor/src/messages/portfolio/document/node_graph/node_graph_message_handler.rs:360">
P2: Stroke-deletion sync misses stroke nodes removed indirectly via `delete_children`, because detection only checks the explicit `node_ids` list.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Copy link
Copy Markdown
Contributor

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

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 stroke weight synchronization between tool options and selected layers for the Pen, Freehand, Spline, and Shape tools. It introduces helper functions in graph_modification_utils.rs and updates message handlers to trigger UI updates upon selection or value changes. Review feedback points out a critical syntax error in pen_tool.rs regarding the use of let bindings in a boolean chain and suggests refactoring duplicated logic for tool notifications and option updates across several files to improve maintainability.

Comment thread editor/src/messages/tool/tool_messages/pen_tool.rs
Comment thread editor/src/messages/tool/tool_messages/pen_tool.rs
@Keavon Keavon merged commit 1596469 into master May 7, 2026
10 checks passed
@Keavon Keavon deleted the control-bar-sync-weight-with-layers branch May 7, 2026 09:12
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