Conversation
WalkthroughThe PR adds a Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR adds a source field to all JoinLobbyEvent dispatches to track the context from which a lobby was joined. The source field was already defined in the JoinLobbyEvent interface as an optional field, and this change ensures it's populated in all cases.
Changes:
- Added source tracking to distinguish between different join contexts: "singleplayer", "matchmaking", "public", "private", and "host"
- Updated all five locations that dispatch
join-lobbyevents to include the appropriate source value - The source field is used in Main.ts to conditionally update the URL based on join context (non-public lobbies update URL immediately)
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/client/SinglePlayerModal.ts | Added source: "singleplayer" to the JoinLobbyEvent dispatch |
| src/client/Matchmaking.ts | Added source: "matchmaking" to the JoinLobbyEvent dispatch |
| src/client/JoinLobbyModal.ts | Added source: "public" for public lobby joins and source: "private" for private lobby and archived game joins |
| src/client/HostLobbyModal.ts | Added source: "host" to the JoinLobbyEvent dispatch |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description:
Added source for join context
Please complete the following:
Please put your Discord username so you can be contacted if a bug or regression is found:
w.o.n