Skip to content

Refresh board on WebSocket reconnect and tab visibility#58

Merged
disnet merged 1 commit intomainfrom
card/3mf5trvpedk2s
Feb 18, 2026
Merged

Refresh board on WebSocket reconnect and tab visibility#58
disnet merged 1 commit intomainfrom
card/3mf5trvpedk2s

Conversation

@disnet
Copy link
Owner

@disnet disnet commented Feb 18, 2026

Summary

  • Calls onUpdate() in ws.onopen so the board refreshes immediately after WebSocket reconnection, catching up on any changes missed during the disconnect
  • Adds a visibilitychange listener that refreshes the board when the tab becomes visible after being backgrounded (critical for mobile Safari where WebSocket connections are killed in background tabs)
  • Cleans up the visibility listener in disconnect()

Test plan

  • Verify board refreshes after WebSocket disconnect/reconnect (can simulate by disabling network briefly)
  • Verify board refreshes when returning to a backgrounded tab
  • Verify no duplicate refresh on normal WebSocket operation
  • Test on mobile Safari

🤖 Generated with Claude Code

When the WebSocket reconnects after a disconnect, the board now refreshes
immediately to catch up on missed changes. Additionally, a visibilitychange
listener refreshes the board when the tab becomes visible after being
backgrounded, which is critical for mobile browsers that kill WebSocket
connections in background tabs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@disnet disnet merged commit 2bd6825 into main Feb 18, 2026
1 check passed
@disnet disnet deleted the card/3mf5trvpedk2s branch February 18, 2026 20:20
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