Skip to content

[Bug]: Presence polling responses can overwrite newer WebSocket presence update #415

@itssagarK

Description

@itssagarK

Bug Description

The application uses WebSocket events for real-time presence updates while also running periodic HTTP polling as a fallback mechanism.

Under certain network conditions, an older polling response can arrive after a newer WebSocket event has already updated the client state. When this occurs, stale polling data overwrites the newer presence information and causes the UI to display incorrect user activity.

This can result in active developers appearing offline or inactive even though a more recent WebSocket update has already been received.

Steps to Reproduce

  1. Open the city view with presence indicators enabled.
  2. Start a coding session so a WebSocket presence update is received.
  3. Simulate network latency on the polling endpoint.
  4. Allow an older polling request to resolve after the WebSocket update.
  5. Observe that the presence state reverts to outdated information.

Expected Behavior

Newer presence updates should always take precedence over older data.

Polling responses should not overwrite more recent WebSocket state if the client has already received a newer update.

Screenshots / Screen Recordings

The issue appears to occur because polling and WebSocket updates share the same state without a mechanism to determine which update is newer.

A timestamp or version-based validation strategy could help prevent stale polling responses from overwriting recent WebSocket updates.

I would be happy to work on this issue under GSSoC 2026 if it is confirmed and assigned.

Browser

Chrome

Acknowledgements

  • I have searched existing issues to make sure this is not a duplicate.
  • I have read the CONTRIBUTING.md guidelines.
  • ⭐ I have starred this repository! (We prioritize issue assignments for stargazers)

Metadata

Metadata

Assignees

Labels

Gssoc 26Part of GirlScript Summer of Code 2026frontendgood first issueGood for newcomersgssoc:approvedApproved GSSoC contributionlevel:intermediateIntermediate difficulty leveltype:bugSomething isn't working as expected

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions