fix(editor): wrap debug SVG shapes with ShapeCullingProvider#8101
Merged
steveruizok merged 3 commits intomainfrom Feb 28, 2026
Merged
fix(editor): wrap debug SVG shapes with ShapeCullingProvider#8101steveruizok merged 3 commits intomainfrom
steveruizok merged 3 commits intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
5 Skipped Deployments
|
kaneel
reviewed
Feb 27, 2026
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
109201e to
aba4a4e
Compare
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| 🔵 In progress View logs |
branching-chat-template | aba4a4e | Feb 27 2026, 12:39 PM |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
branching-chat-template | aba4a4e | Commit Preview URL Branch Preview URL |
Feb 27 2026, 12:42 PM |
steveruizok
approved these changes
Feb 28, 2026
huppy-bot bot
pushed a commit
that referenced
this pull request
Feb 28, 2026
Closes #8100 The `ShapesWithSVGs` component (used when Debug SVG is enabled) renders `<Shape>` without a `<ShapeCullingProvider>` ancestor. Since the `Shape` component calls `useShapeCulling()`, this throws: "useShapeCulling must be used within ShapeCullingProvider". The `ShapesToDisplay` component already had this provider but `ShapesWithSVGs` was missing it. This wraps `ShapesWithSVGs` content with `<ShapeCullingProvider>`, `<CullingController>`, and the Safari reflow workaround — matching what `ShapesToDisplay` already does. ### Change type - [x] `bugfix` ### Test plan 1. Open tldraw and create some shapes on the canvas 2. Open the debug menu and enable **Debug mode** 3. Enable **Debug SVG** 4. Verify the app no longer crashes and SVG debug copies appear below each shape ### Release notes - Fix crash when enabling Debug SVG with shapes on the canvas. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk: localized change to canvas shape rendering that mainly affects debug-only `Debug SVG` mode and reuses existing culling logic. > > **Overview** > Fixes a crash when enabling **Debug SVG** by ensuring shapes rendered in that mode are wrapped in `ShapeCullingProvider` (so `useShapeCulling()` always has a provider). > > Simplifies the canvas rendering path by replacing the separate `ShapesWithSVGs`/`ShapesToDisplay` branches with a single `ShapesLayer` that toggles debug SVG copies internally while still running `CullingController` and the Safari reflow workaround. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit aba4a4e. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
huppy-bot bot
added a commit
that referenced
this pull request
Feb 28, 2026
This is an automated hotfix for dotcom deployment. Original PR: #8101 Original Author: @MitjaBezensek
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.
Closes #8100
The
ShapesWithSVGscomponent (used when Debug SVG is enabled) renders<Shape>without a<ShapeCullingProvider>ancestor. Since theShapecomponent callsuseShapeCulling(), this throws: "useShapeCulling must be used within ShapeCullingProvider". TheShapesToDisplaycomponent already had this provider butShapesWithSVGswas missing it.This wraps
ShapesWithSVGscontent with<ShapeCullingProvider>,<CullingController>, and the Safari reflow workaround — matching whatShapesToDisplayalready does.Change type
bugfixTest plan
Release notes
Note
Low Risk
Low risk: localized change to canvas shape rendering that mainly affects debug-only
Debug SVGmode and reuses existing culling logic.Overview
Fixes a crash when enabling Debug SVG by ensuring shapes rendered in that mode are wrapped in
ShapeCullingProvider(souseShapeCulling()always has a provider).Simplifies the canvas rendering path by replacing the separate
ShapesWithSVGs/ShapesToDisplaybranches with a singleShapesLayerthat toggles debug SVG copies internally while still runningCullingControllerand the Safari reflow workaround.Written by Cursor Bugbot for commit aba4a4e. This will update automatically on new commits. Configure here.