Skip to content

fix(display-app): pin websocket-only transport (#2306) - #2316

Merged
jung-thomas merged 2 commits into
DEVfrom
worktree-fix-2306-display-app-ws
Sep 15, 2026
Merged

jung-thomas merged 2 commits into
DEVfrom
worktree-fix-2306-display-app-ws

Conversation

@jung-thomas

Copy link
Copy Markdown
Contributor

Closes #2306

Root cause

app/display-app/src/event-stream.ts was the only first-party socket.io client that did not set transports: ['websocket']. With the socket.io default (['polling','websocket']), the client opens with a long-polling handshake, then tries to upgrade. Behind the multi-instance CF approuter (#749 autoscaler, 1→4), the follow-up long-polling POST /socket.io/?...&sid=... returns 400 Bad Request, so the connection never establishes and the display-app is stuck on "Reconnecting…".

The three sibling clients on the same /ws/event-stream (and /display) namespace — event-display, gameboard, app-space — all already pin transports: ['websocket'] and work.

Fix

One line: pin transports: ['websocket'] in display-app's io() call, matching the siblings. WebSocket upgrade is a single persistent connection, avoiding the stateful long-polling handshake entirely.

Verification

  • npm run build (vite) passes clean.
  • Change is byte-identical in shape to the three proven-working sibling clients.
  • End-to-end proof is post-deploy: open the display-app on DEV and confirm it reaches 'connected' (no 400 on /socket.io/ POST).

Release 1.26.0 — DEV → main (PROD promotion)
The default socket.io transport (polling→upgrade) starts with a long-polling
handshake whose follow-up POST 400s behind the multi-instance CF approuter,
leaving display-app stuck 'Reconnecting…'. Match the sibling clients
(event-display, gameboard, app-space) which already pin transports:['websocket'].
@jung-thomas
jung-thomas merged commit 5ff07e5 into DEV Sep 15, 2026
4 checks passed
@jung-thomas
jung-thomas deleted the worktree-fix-2306-display-app-ws branch September 15, 2026 15:07
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