Skip to content

fix(desktop): poll the buffer while a scene fade is in flight - #284

Merged
johncarmack1984 merged 1 commit into
mainfrom
fix/fade-follow-ios
Aug 23, 2026
Merged

fix(desktop): poll the buffer while a scene fade is in flight#284
johncarmack1984 merged 1 commit into
mainfrom
fix/fade-follow-ios

Conversation

@johncarmack1984

Copy link
Copy Markdown
Owner

Clicking a scene on a solo desk faded the lights but left the faders frozen on iOS: the fade's bufferSet ticks never reach the iOS webview, and the 200 ms buffer poll from #278 runs only while a remote peer or guest is connected.

recallScene (both the scenes panel and the plan desk go through it) now records the fade window — the scene's fadeMs plus 500 ms slack, defaulting to 2 s on a cache miss — and invalidates the buffer query to start the interval from its idle state. useBuffer's refetchInterval is now a function: 200 ms while a peer is connected or a fade is in flight, off otherwise, so the solo idle desk still never polls. The fade clock lives in its own module so the action that sets it and the hook that reads it don't import each other.

Frontend-only; all gates green locally.

A recall writes the buffer from the backend for its whole fade, and the
bufferSet events that carry those ticks never reach the webview on iOS
— so on a solo desk the lights faded while the faders stayed frozen.
The buffer poll previously ran only while a remote peer or guest was
connected.

recallScene now marks the fade window (the scene's fadeMs plus slack)
and kicks the buffer query; useBuffer's refetch interval keeps polling
at 200 ms until the window closes, then stops, so an idle solo desk
still never polls.
@johncarmack1984
johncarmack1984 merged commit b0216a2 into main Aug 23, 2026
14 checks passed
@johncarmack1984
johncarmack1984 deleted the fix/fade-follow-ios branch August 23, 2026 15:04
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