mirror of
https://github.com/layer-systems/website.git
synced 2026-09-12 13:43:01 +02:00
`mapWindow` flagged the state as changed whenever the target window id matched, even when the updater handed the very same window object back. `SET_TITLE` is guarded against a no-op title, but that guard was defeated: the reducer still returned a fresh state object, so the context value changed, every consumer re-rendered, and each app's `setTitle` effect — keyed on a `setTitle` callback that the mobile shell re-created on every render — dispatched `SET_TITLE` again. That loop ran continuously while an app was open on mobile; opening the app-switcher Sheet on top of it made Radix re-attach its composed refs on every one of those renders until React bailed out with "Maximum update depth exceeded" and the ErrorBoundary took over. Only count a window as changed when the updater actually returned a different object, and memoise the mobile shell's `setTitle`/`setParams` per window, matching what `WindowFrame` already does. Fixes #14 Claude-Session: https://claude.ai/code/session_01Trku191Ww2a2YmDWQF3fTS Co-authored-by: Claude Opus 5 <noreply@anthropic.com>