Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 4, 2026

When players exit a private Arena/Combat match via the "Social Lobby" button, they should automatically rejoin a new social lobby together if the match originated from one.

Implementation

Tracking origin

  • Added OriginSocialID field to MatchLabel and MatchSettings
  • lobbyCreate detects when private matches spawn from social lobbies and stores the origin ID

Auto-rejoin trigger

  • MatchLeave: Creates new social lobby when match empties
  • MatchTerminate: Creates new social lobby on match termination
  • Only applies to private Arena/Combat matches (excludes social lobbies)

Rejoin behavior

  • createSocialLobbyRejoin creates new social lobby with:
    • All match participants as 1-minute reservations
    • Same group ID to preserve party communication
    • Public social mode for seamless transition
// Match creation from social lobby now tracks origin
if (params.Mode == evr.ModeArenaPrivate || params.Mode == evr.ModeCombatPrivate) && 
   !params.CurrentMatchID.IsNil() {
    if currentLabel.Mode == evr.ModeSocialPublic {
        settings.OriginSocialID = &params.CurrentMatchID.UUID
    }
}

Files Changed

  • evr_match_label.go: Added OriginSocialID field
  • evr_match.go: Added rejoin logic in MatchLeave/MatchTerminate, implemented createSocialLobbyRejoin
  • evr_lobby_create.go: Origin tracking during match creation
  • evr_match_social_rejoin_test.go: Unit tests for new functionality
Original prompt

This section details on the original issue you should resolve

<issue_title>Auto-group social lobby rejoin after private match</issue_title>
<issue_description>Feature: When players exit a private match (triggered via the "Social Lobby" button on
the terminal), check if the match originated from a social lobby. If so, after the match
completes, automatically send all participants to the same new social lobby and create
one-minute reservations for each player in that lobby. If possible, ensure seamless
group transition so prior group communications persist within the new social lobby session.</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 4 commits January 4, 2026 16:01
- Added OriginSocialID field to MatchLabel to track social lobby origin
- Added OriginSocialID field to MatchSettings for initialization
- Modified lobbyCreate to detect and track when private matches are created from social lobbies
- Implemented createSocialLobbyRejoin function to create new social lobby with 1-minute reservations
- Updated MatchLeave to trigger auto-rejoin when match empties
- Updated MatchTerminate to trigger auto-rejoin on match termination
- Applied OriginSocialID from settings during match preparation

Co-authored-by: thesprockee <962164+thesprockee@users.noreply.github.com>
- Added missing evr package import to evr_lobby_create.go
- Fixed uuid.UUID handling in createSocialLobbyRejoin function
- Corrected LobbyGameServerAllocate parameter types

Co-authored-by: thesprockee <962164+thesprockee@users.noreply.github.com>
- Added unit tests for OriginSocialID in MatchLabel and MatchSettings
- Added tests for IsPrivateMatch helper method
- All tests pass successfully

Co-authored-by: thesprockee <962164+thesprockee@users.noreply.github.com>
- Fixed logic to explicitly exclude social lobbies and only handle Arena/Combat matches
- Added clarifying comments explaining that all participants rejoin together
- Improved readability of conditional checks

Co-authored-by: thesprockee <962164+thesprockee@users.noreply.github.com>
Copilot AI changed the title [WIP] Add auto-group rejoin feature for social lobby after private match Auto-rejoin social lobby after private match completion Jan 4, 2026
Copilot AI requested a review from thesprockee January 4, 2026 16:10
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.

Auto-group social lobby rejoin after private match

2 participants