e2e: opponent presence over an advanced browser clock #199

Closed
opened 2026-09-01 13:44:41 +00:00 by root · 3 comments
root commented 2026-09-01 13:44:41 +00:00 (Migrated from gitlab.core-project.space)

Imported from GitHub amaurycoudr/chess-project#199, opened by @amaurycoudr on 2026-09-01 13:44 UTC.
Closed on GitHub on 2026-09-24 13:06 UTC as completed.


Parent

#191

What to build

A Player is told their opponent has dropped, and then, once enough time has passed, that the opponent has actually left — so they know when to stop waiting.

The flip between those two messages is driven by a timer in the browser, so the test advances the browser's clock rather than waiting in real time. This is the only hook in the entire suite that reaches below the DOM, and it is confined to this one ticket.

If clock control proves brittle, delete this test. Do not add a hook to the application to make it testable, and do not weaken it into a sleep. The Room's own idle-eviction window is server-side and lazily evaluated, so no browser-side clock reaches it; it is not attempted here.

Acceptance criteria

  • When one Player's browser closes, the other Player is told the opponent is disconnected and reconnecting
  • The disconnected Player's Seat is not freed, and the message displaces the turn indicator rather than replacing the board
  • Advancing the surviving Player's browser clock past the waiting period changes the message to say the opponent has left, marked as urgent
  • Closing a second browser tab of the same Room does not make the Player look disconnected, because a Seat holds a set of Connections
  • No hook is added to the application for this test
  • If clock control cannot be made reliable, the test is deleted rather than replaced with a fixed wait, and the ticket says so on closing
  • All five gate commands pass, and the suite passes
> _Imported from GitHub [amaurycoudr/chess-project#199](https://github.com/amaurycoudr/chess-project/issues/199), opened by [@amaurycoudr](https://github.com/amaurycoudr) on 2026-09-01 13:44 UTC._ > _Closed on GitHub on 2026-09-24 13:06 UTC as completed._ <!-- github-issue:199 --> --- ## Parent #191 ## What to build A Player is told their opponent has dropped, and then, once enough time has passed, that the opponent has actually left — so they know when to stop waiting. The flip between those two messages is driven by a timer in the browser, so the test advances the browser's clock rather than waiting in real time. This is the only hook in the entire suite that reaches below the DOM, and it is confined to this one ticket. **If clock control proves brittle, delete this test.** Do not add a hook to the application to make it testable, and do not weaken it into a sleep. The Room's own idle-eviction window is server-side and lazily evaluated, so no browser-side clock reaches it; it is not attempted here. ## Acceptance criteria - [ ] When one Player's browser closes, the other Player is told the opponent is disconnected and reconnecting - [ ] The disconnected Player's Seat is not freed, and the message displaces the turn indicator rather than replacing the board - [ ] Advancing the surviving Player's browser clock past the waiting period changes the message to say the opponent has left, marked as urgent - [ ] Closing a second browser tab of the same Room does not make the Player look disconnected, because a Seat holds a set of Connections - [ ] No hook is added to the application for this test - [ ] If clock control cannot be made reliable, the test is deleted rather than replaced with a fixed wait, and the ticket says so on closing - [ ] All five gate commands pass, and the suite passes
root commented 2026-09-01 13:44:41 +00:00 (Migrated from gitlab.core-project.space)

GitHub issue relations, imported as "related" links (GitLab CE has no sub-issues or blocking links).

> _GitHub issue relations, imported as "related" links (GitLab CE has no sub-issues or blocking links)._ <!-- github-relations --> - Blocked by: #192
root (Migrated from gitlab.core-project.space) closed this issue 2026-09-24 13:06:25 +00:00
root commented 2026-10-13 08:40:46 +00:00 (Migrated from gitlab.core-project.space)

mentioned in issue #192

mentioned in issue #192
root commented 2026-10-13 08:41:45 +00:00 (Migrated from gitlab.core-project.space)

marked this issue as related to #192

marked this issue as related to #192
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
amaurycoudr/chess-project#199
No description provided.