feat(editor): make layer locking actually prevent accidental canvas s… - #542
Open
fortusfederal wants to merge 1 commit into
Open
fortusfederal wants to merge 1 commit into
fortusfederal wants to merge 1 commit into
Conversation
…election toggleNodeLocked already existed at the mutation layer and the tree row showed a lock glyph once a node was already locked, but there was no discoverable way to lock a node (only Spotlight's command palette called the action), and canvas click-to-select ignored the locked flag entirely -- so locking a layer didn't protect it from being selected by an accidental click, which was the whole point of the feature. - Add a Lock/Unlock item to the layer context menu (canvas + DOM panel), mirroring the existing Hide/Unhide item's structure and multi-select awareness. - CanvasRoot's onNodeClick now skips selection for locked nodes. Right- click (context menu) still targets them, so Unlock stays reachable from the canvas, not just the Layers panel. - Update the pre-existing "Hide first with a divider" menu-order test to account for the new Lock item, and add coverage for Lock/Unlock show/click behavior and root-node exclusion. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
fortusfederal
marked this pull request as ready for review
September 18, 2026 00:59
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
toggleNodeLockedalready existed at the mutation layer, and a tree row rendered a lock glyph once a node was locked — but there was no discoverable way to lock a node (only Spotlight's command palette called the action), and canvas click-to-select ignored the locked flag entirely. Locking a layer therefore did not protect it from being selected by an accidental click, which is the point of the feature.CanvasRoot'sonNodeClicknow skips selection for locked nodes. Right-click still targets them, so Unlock stays reachable.Verification
bun run buildbun testbun run lintChecklist
layerNodeContextMenu.test.tsx🤖 Generated with Claude Code