Skip to content

fix: prevent workflow preview resize observer loop#35936

Merged
lyzno1 merged 1 commit into
mainfrom
codex/preview
May 9, 2026
Merged

fix: prevent workflow preview resize observer loop#35936
lyzno1 merged 1 commit into
mainfrom
codex/preview

Conversation

@lyzno1
Copy link
Copy Markdown
Member

@lyzno1 lyzno1 commented May 8, 2026

Summary

  • Debounced workflow canvas, right panel, and bottom panel size writes with requestAnimationFrame to break the resize feedback loop that was triggering the dev overlay.
  • Added equality checks in the workflow layout store so repeated size values no longer emit redundant updates.
  • Aligned the panel resize hook to a fixed callback-only signature and removed the extra dependency spread.
  • Updated the workflow panel/operator tests to cover the async resize flow.

Testing

  • pnpm type-check
  • pnpm test --run app/components/workflow/panel/__tests__/index.spec.tsx app/components/workflow/operator/__tests__/index.spec.tsx app/components/workflow/store/workflow/__tests__/layout-slice.spec.ts app/components/workflow/store/__tests__/workflow-store.spec.ts
  • Chrome UI verification: reopened the workflow preview panel and confirmed the ResizeObserver overlay no longer appears.

@lyzno1 lyzno1 requested review from iamjoel and zxhlyh as code owners May 8, 2026 12:08
@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. javascript Pull requests that update javascript code labels May 8, 2026
@github-actions github-actions Bot added the web This relates to changes on the web. label May 8, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 8, 2026

Codecov Report

❌ Patch coverage is 75.34247% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.82%. Comparing base (cb0356e) to head (9497f7b).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
web/app/components/workflow/index.tsx 25.00% 12 Missing ⚠️
web/app/components/workflow/operator/index.tsx 75.00% 4 Missing ⚠️
web/app/components/workflow/panel/index.tsx 90.47% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #35936      +/-   ##
==========================================
- Coverage   85.83%   85.82%   -0.01%     
==========================================
  Files        4461     4461              
  Lines      209224   209273      +49     
  Branches    39168    39186      +18     
==========================================
+ Hits       179583   179614      +31     
- Misses      26466    26484      +18     
  Partials     3175     3175              
Flag Coverage Δ
dify-ui 94.23% <ø> (ø)
web 86.75% <75.34%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label May 9, 2026
@lyzno1 lyzno1 added this pull request to the merge queue May 9, 2026
Merged via the queue into main with commit 2710190 May 9, 2026
32 of 33 checks passed
@lyzno1 lyzno1 deleted the codex/preview branch May 9, 2026 01:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

javascript Pull requests that update javascript code lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files. web This relates to changes on the web.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants