Skip to content

fix: check for a new version when the room socket reconnects - #76

Merged
madeofpendletonwool merged 1 commit into
mainfrom
fix/update-on-reconnect
Oct 17, 2026
Merged

madeofpendletonwool merged 1 commit into
mainfrom
fix/update-on-reconnect

Conversation

@madeofpendletonwool

Copy link
Copy Markdown
Owner

After #75 was deployed, a Syncphony box that already had the page open kept running the old web app. That build ignores device.command, so Make speaker said it was handing the speaker over, but nothing happened on the box.

The page only checked for a new service worker when it loaded, and then once an hour. A deploy restarts the server, which drops every room socket. So now the room socket looks for a new version whenever it reconnects:

  • A box takes the new version by itself and reloads within moments.
  • Other clients get the usual "A new version is ready" toast.

Testing

  • Locally, end to end against the new build (Chrome via Playwright): a page paired as a box was stopped, then told to Make speaker from the owner's session. It claimed the speaker within about a second.
  • typecheck, lint and all web tests pass.

A deploy restarts the server and drops every room socket. Checking for a
new service worker on reconnect means a box picks up the new web app
within moments, instead of running the old page for up to an hour (it
ignored the new device.command until then).
@madeofpendletonwool
madeofpendletonwool merged commit 25cac67 into main Oct 17, 2026
5 checks passed
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