Skip to content

fix: Maximum update depth exceeded during SplitPanel resize #4351

Draft
georgylobko wants to merge 2 commits intomainfrom
fix/split-panel-resize
Draft

fix: Maximum update depth exceeded during SplitPanel resize #4351
georgylobko wants to merge 2 commits intomainfrom
fix/split-panel-resize

Conversation

@georgylobko
Copy link
Member

@georgylobko georgylobko commented Mar 12, 2026

Description

Steps to reproduce:

Render an AppLayout with a SplitPanel and splitPanelOpen={true}
Open Chrome DevTools
Rapidly drag the split panel resize handle, or resize the browser
The crash is somewhat intermittent with the split panel, but resizing the browser will guarantee the crash.

AWSUI-61789

Fixes two infinite update loops triggered in React 19. In SplitPanelProvider, subpixel cappedSize values from getBoundingClientRect caused reportSize to refire every frame during drag - fixed by rounding before the effect. In DragHandleWrapper, visibleDirections are wrapped with ref.

Related links, issue #, if available: n/a

How has this been tested?

Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov
Copy link

codecov bot commented Mar 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.44%. Comparing base (7d1f303) to head (ee1c164).
⚠️ Report is 14 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4351      +/-   ##
==========================================
- Coverage   97.44%   97.44%   -0.01%     
==========================================
  Files         897      897              
  Lines       26397    26401       +4     
  Branches     9527     9527              
==========================================
+ Hits        25723    25726       +3     
- Misses        631      632       +1     
  Partials       43       43              

☔ 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant