frigate/web/src/views
Claude 5e40dbbcd2
fix: reliably init grid width on page refresh using useLayoutEffect
useResizeObserver reads ref.current at render time; on page refresh with
fast SWR cache, no re-render occurs after mount so ref.current remains null
in the effect, observation never starts, and containerWidth stays 0 forever.

Add a useLayoutEffect that measures offsetWidth synchronously before paint
as a seed value (effectiveWidth = containerWidth || initialWidth). Once
ResizeObserver fires normally, containerWidth takes over. The Responsive
grid is gated on effectiveWidth > 0 so it always renders correctly on both
first load and refresh.

https://claude.ai/code/session_01H1sqbcFmtwwsdNTJcJHJWd
2026-03-15 11:32:13 +00:00
..
button Implement debug live view as part of live (#20270) 2025-09-29 18:45:55 -05:00
classification Fix i18n keys (#21814) 2026-01-28 13:55:38 -07:00
events Revert "Claude/fix video stretch history ans qf" 2026-03-15 13:37:31 +11:00
explore Miscellaneous fixes (0.17 beta) (#21431) 2025-12-26 08:45:03 -06:00
live fix: reliably init grid width on page refresh using useLayoutEffect 2026-03-15 11:32:13 +00:00
motion-search Frontend fixes (#22294) 2026-03-06 13:41:15 -07:00
recording revert Update RecordingView.tsx 2026-03-15 14:31:11 +11:00
search Update frontend to React 19 (#22275) 2026-03-05 07:42:38 -07:00
settings UI tweaks (#22405) 2026-03-12 16:57:42 -06:00
system Merge branch 'blakeblackshear:dev' into dev 2026-03-15 13:55:05 +11:00