Skip to content

Fix/reports rgl loop#74

Merged
WhiteMuush merged 8 commits into
mainfrom
fix/reports-rgl-loop
Jun 19, 2026
Merged

Fix/reports rgl loop#74
WhiteMuush merged 8 commits into
mainfrom
fix/reports-rgl-loop

Conversation

@WhiteMuush

@WhiteMuush WhiteMuush commented Jun 19, 2026

Copy link
Copy Markdown
Owner

Summary

Type of change

  • feat: new feature
  • fix: bug fix
  • chore: maintenance / dependencies
  • docs: documentation
  • refactor: code refactor

Checklist

  • My code follows the project conventions
  • I have tested my changes
  • Related issue: Closes #

WhiteMuush and others added 8 commits June 19, 2026 15:50
RGL fires onLayoutChange on every layout-prop change (recreated each
render), and it always called setLayout, feeding an endless
setLayout -> render -> onLayoutChange cycle (Maximum update depth).
Skip the update when no tile actually moved or resized.
dev:turbo runs next dev --turbopack for faster cold compiles; plain dev
stays on webpack as the safe default (react-grid-layout uses require).
contentRect.width is fractional and jitters sub-pixel as tiles auto-fit;
since containerW is a fitHeights effect dependency, the raw value changed
every render and never settled. Round and dedupe it.
Replace the continuous ResizeObserver on the content probe (which
oscillated: shrink -> scrollbar -> reflow -> grow -> repeat) with an
effect keyed on a width signature. Content height only changes with
width (container queries), and height is deliberately not a dependency,
so fitHeights setting h can never retrigger the measurement. Also make
the tile body overflow-hidden so a transient scrollbar cannot reflow the
container-query content.
Reset kept stale content-fit floors (possibly measured at another zoom
level), so default heights could be wrong and tiles overlapped. Clear
minHeights and force a fresh measure via a nonce after reset.
Rounding the measured width up made the grid (rendered at width=
containerW) 1px wider than its container, toggling a horizontal
scrollbar that shrank the container and looped. Floor the width and
ignore sub-2px wobble.
Zoom toggled whether the report content overflowed, so the vertical
scrollbar appeared/disappeared and the container width jumped ~15px,
oscillating containerW forever. Force overflow-y-scroll so the scrollbar
gutter is always reserved (constant width). Also drop the rglLayout h
override so the rendered height matches stored state and RGL stops
echoing it back through onLayoutChange.
@WhiteMuush WhiteMuush merged commit f947220 into main Jun 19, 2026
10 of 11 checks passed
@WhiteMuush WhiteMuush deleted the fix/reports-rgl-loop branch June 19, 2026 14:32
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