Fix Shaking a Text layer breaks its type signature#3899
Fix Shaking a Text layer breaks its type signature#3899Annonnymmousss wants to merge 1 commit intoGraphiteEditor:masterfrom
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request resolves a bug where manipulating a text layer could lead to its type signature being incorrectly broken within the node graph. The fix involves a precise adjustment to the node graph's input disconnection logic. Previously, inputs might have been disconnected even when no upstream connector was present, or under conditions that incorrectly identified an upstream node as unselected. The updated logic now ensures that disconnections only occur when an upstream connector exists and its associated node is explicitly not among the currently selected nodes, thereby preserving the integrity of the graph's connections. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Pull request overview
Fixes the ShakeNode behavior in the node graph so shaking selected nodes (notably Text layers) doesn’t inadvertently alter their inferred/serialized type signature by issuing disconnects for inputs that aren’t actually connected.
Changes:
- Adjust the shake-time input disconnection condition to only disconnect when an upstream connector exists.
- Preserve unconnected inputs (those without an upstream output connector) during
ShakeNode.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
There was a problem hiding this comment.
Code Review
This pull request fixes an issue where shaking a Text layer could break its type signature. The change correctly adjusts the logic for disconnecting node inputs during a 'shake' operation. Previously, it would attempt to disconnect inputs that were not connected, which could lead to issues. The new logic ensures that a disconnection is only attempted if there is an upstream connection, and that connection is to a node that is not part of the selection being shaken.
| if network_interface | ||
| .upstream_output_connector(&input_connector, selection_network_path) | ||
| .and_then(|connector| connector.node_id()) | ||
| .is_some_and(|node_id| all_selected_nodes.contains(&node_id)) | ||
| .is_some_and(|connector| connector.node_id().map_or(true, |node_id| !all_selected_nodes.contains(&node_id))) |
There was a problem hiding this comment.
e58c1de to
df8001f
Compare
closes #3896
Screen.Recording.2026-03-14.at.1.22.26.PM.mov