Skip to content

Bug: Incorrect creation of a battle with another user #2316

Closed

Description

@ZnAnna

Summary

To find out when an enemy joins the battle, you need to refresh the waiting information page.

Reproduction steps

1. Log in to the platform
2. Click "Create a battle"
3. Select Level in the window
4 Select Game Type = With another user
5. Set the Time control slider
6. Select a task
7. Click the "Create a battle" button in the lower right corner of the window
8. The battle creation window closes automatically
9. On the page, the "Create a battle" button changes its name to "Continue battle"
10. Clicking the "Continue battle" button opens an information window with a waiting opponent and a link to invite you to the battle
11. Refresh the page to see if your opponent has joined the battle

Expected result

The battle window opens automatically when an opponent joins the game.

Actual result

The battle window opens after refreshing the page.

Browsers

Chrome

OS

Windows

Activity

  1. Julia8886 commented on Jun 9, 2026

    @Julia8886

    Bug Report: Game state doesn't update without page refresh

    Description

    The game session/lobby does not initialize or freeze right after matchmaking. The visual interface and player actions become available only after a manual page reload (F5 / Ctrl+R).

    Steps to Reproduce

    1. Log in to Codebattle and find a match / create a game lobby.
    2. Wait for the loading screen or the countdown to finish.
    3. Observe that the game board or opponent data does not start automatically.
    4. Press F5 to refresh the page — the game state instantly updates and plays properly.

    Expected Result

    The game loop should start immediately and automatically through a live connection (WebSockets) without forcing the user to reload the page.

    Actual Result

    The page feels "dead" or stuck on a loading state until a hard refresh is performed.

    Environment

  2. vtm9 commented on Jul 23, 2026

    @vtm9
    Contributor

    Fixed in #2329. A user waiting for an opponent is redirected as soon as that same game becomes playing, including recovery from a lobby snapshot after reconnect; the game-ID guard avoids redirecting unrelated active games. This issue will close automatically when the PR is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions