Conversation
Add public setUniqueIdGenerator for custom ID generation
Add frame selection overhaul for grid shapes
* selecting assets now has no margin * +1 px hover area * Revert comment back --------- Co-authored-by: Kazuho Okui <kazuho@lumalabs.ai>
PR SummaryMedium Risk Overview Adjusts selection/editing behavior: double-click-to-edit now respects Reworks Reviewed by Cursor Bugbot for commit 19fde0f. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Redundant readonly check after
canEditShapeguard- Removed the redundant readonly/canEditInReadonly check on lines 154-158 since canEditShape already guarantees this condition is satisfied when it returns true.
Or push these changes by commenting:
@cursor push fc13a8d3cb
Preview (fc13a8d3cb)
diff --git a/packages/tldraw/src/lib/tools/SelectTool/childStates/PointingShape.ts b/packages/tldraw/src/lib/tools/SelectTool/childStates/PointingShape.ts
--- a/packages/tldraw/src/lib/tools/SelectTool/childStates/PointingShape.ts
+++ b/packages/tldraw/src/lib/tools/SelectTool/childStates/PointingShape.ts
@@ -151,13 +151,6 @@
if (!this.editor.canEditShape(selectingShape)) return
- const util = this.editor.getShapeUtil(selectingShape)
- if (this.editor.getIsReadonly()) {
- if (!util.canEditInReadonly(selectingShape)) {
- return
- }
- }
-
this.editor.setEditingShape(selectingShape.id)
this.editor.setCurrentTool('select.editing_shape')You can send follow-ups to the cloud agent here.
Reviewed by Cursor Bugbot for commit 19fde0f. Configure here.
| if (!util.canEditInReadonly(selectingShape)) { | ||
| return | ||
| } | ||
| } |
There was a problem hiding this comment.
Redundant readonly check after canEditShape guard
Low Severity
The canEditInReadonly check on lines 154–158 is fully redundant with the canEditShape guard on line 152. canEditShape already returns false when getIsReadonly() is true and canEditInReadonly() is false (see Editor.ts line 2701). If canEditShape returns true, the readonly/canEditInReadonly condition here can never trigger. Additionally, setEditingShape internally calls canEditShape again, making this a third redundant layer.
Reviewed by Cursor Bugbot for commit 19fde0f. Configure here.



Long-running integration branch for Luma's v5.0 patches on top of
v5.0.x.Change type
otherTest plan
API changes
Editor.components.ShapeRendererslot, withDefaultShapeRendererandTLShapeRendererPropsexported from@tldraw/editor.setUniqueIdGenerator()for customizing ID generation (from Add public setUniqueIdGenerator for custom ID generation #7).Code changes
Rolled-up commits
DefaultShapeRenderer/ShapeRenderercomponent slotcanEditInReadonlyvisitDescendantstraverse children in ordervisitDescendantsto iterative traversal with cycle protectionsetUniqueIdGeneratorfor custom ID generation