Skip to content

fix(desktop): poll buffer when remote peers are connected - #278

Merged
johncarmack1984 merged 1 commit into
mainfrom
fix/ios-remote-buffer-poll
Aug 17, 2026
Merged

fix(desktop): poll buffer when remote peers are connected#278
johncarmack1984 merged 1 commit into
mainfrom
fix/ios-remote-buffer-poll

Conversation

@johncarmack1984

Copy link
Copy Markdown
Owner

Summary

  • The bufferSet event never reaches the iOS webview, so when a guest or another device changes the buffer via the ctl frame path, the lights update but the phone UI stays frozen
  • Poll sync_buffer at 200 ms while useRemotePeers reports at least one connected peer or guest — a cheap mutex read matching the state echo's coalesce window
  • Polling stops entirely when the desk is solo; TanStack Query pauses it when the app is backgrounded

Test plan

  • Open a shared desk from a guest device, move a fader — verify the host phone's UI updates within ~200 ms
  • Verify the host's desktop UI still updates instantly (event listener path unchanged)
  • Close the guest desk / sign out — verify polling stops (no sync_buffer IPC calls in logs when solo)
  • Verify fader drag on the host phone is still smooth (optimistic state, not affected by poll)

The bufferSet event that carries out-of-band buffer changes to the
frontend never reaches the webview on iOS. When a guest or another
device changes the buffer via the ctl frame path, the Rust backend
applies it and the lights update, but the UI stays frozen.

Poll sync_buffer at 200 ms (a cheap mutex read, matching the state
echo's coalesce window) while useRemotePeers reports at least one
connected peer or guest. Polling stops entirely when the desk is solo.
@johncarmack1984
johncarmack1984 merged commit 3ac56a9 into main Aug 17, 2026
14 checks passed
@johncarmack1984
johncarmack1984 deleted the fix/ios-remote-buffer-poll branch August 17, 2026 08:13
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