fix(embedded): block layout should not be dependent on viewport#3621
fix(embedded): block layout should not be dependent on viewport#3621icecrasher321 merged 2 commits intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview Embedded mode now schedules Written by Cursor Bugbot for commit b188e6a. Configure here. |
Greptile SummaryThis PR fixes an embedded workflow viewer bug where the initial Key changes:
Issues found:
Confidence Score: 3/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[ReactFlow onInit fires] --> B{embedded?}
B -- yes --> C[return early — no fitView]
B -- no --> D[requestAnimationFrame → fitView + setIsCanvasReady]
E[isWorkflowReady becomes true] --> F[Effect 1: canvasContainerRef ready]
F --> G[scheduleEmbeddedFit]
F --> H[ResizeObserver.observe container]
H -- container resized --> G
I[displayNodes changes] --> J[Effect 2]
J --> G
G --> K[cancelAnimationFrame pending RAF]
K --> L[requestAnimationFrame]
L --> M{container rect valid?}
M -- no --> N[return — spinner remains]
M -- yes --> O{nodes.length > 0?}
O -- yes --> P[fitView with duration:0]
O -- no --> Q{initialFit done?}
P --> Q
Q -- no --> R[hasCompletedInitialEmbeddedFitRef = true\nsetIsCanvasReady true]
Q -- yes --> S[done]
R --> S
Last reviewed commit: 3162641 |
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/workflow.tsx
Outdated
Show resolved
Hide resolved
|
bugbot run |
|
bugbot run |
* fix(embedded): block layout should not be dependent on viewport * address comments
Summary
Block layout should not be dependent on embedded view sizing.
Type of Change
Testing
Tested manually
Checklist