fix(workflow): prevent canvas slowdown cascades - #6881
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryCursor Bugbot is generating a summary for commit dc131b6. Configure here. |
Contributor
Greptile SummaryThe PR reduces workflow-editor render and input cascades while deferring expensive picker and search work.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| apps/sim/app/workspace/[workspaceId]/w/[workflowId]/workflow.tsx | Adopts reference-preserving canvas reconciliation, stable edge deletion state, and one-step-per-press keyboard navigation. |
| apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/search-replace/workflow-search-replace.tsx | Splits the conditional panel mount from global command registration and restores reliable query focus for both closed and already-open states. |
| apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/connection-block-selector/connection-block-selector.tsx | Adds deferred search and observer-driven incremental browse rendering while retaining full-catalog search. |
| apps/sim/app/workspace/[workspaceId]/w/[workflowId]/utils/workflow-canvas-helpers.ts | Adds reusable keyboard-direction and reference-reconciliation helpers for canvas state. |
| apps/sim/stores/workflows/workflow/store.ts | Preserves existing graph references when dimension and edge updates do not materially change state. |
Reviews (2): Last reviewed commit: "fix(workflow): correct two regressions i..." | Re-trigger Greptile
Gating `toolBlocks` on the picker's open state also emptied it for the always-visible selected-tool chips, which silently fell through to their `getBlock` fallback — the branch documented as the exception for types hidden from the picker. Only `toolGroups`, where the expensive group build lives, is gated now. Re-invoking the find shortcut while the panel was already open stopped re-selecting the query: `open()` is a no-op when the panel is mounted, so the mount-time focus effect never re-ran. The panel publishes its focus callback so the shortcut can drive it either way. A saturated `slice` also allocated a fresh array once the limit covered a whole group, re-rendering the memoized "All blocks" group on every tools page-in — the frame cost the change set out to remove. Alongside those: fold the two reconcilers into one generic and decide reuse by identity rather than a three-write `changed` flag; record why the node comparison is deliberately asymmetric (React Flow augments node objects in place, so a symmetric `isEqual` would never reuse anything); give the browse pagination its own constant instead of borrowing the search-result cap; drop a redundant clamp and the deps it needed; inline the single-consumer `sliceGroupsToLimit`; and split the bundled ref so the hottest component stops allocating an object per render.
Collaborator
Collaborator
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 21f2022. Configure here.
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
Type of Change
Testing
Checklist