From a77c6c3d9dea110611ea8a46c68e32c1ff9fd53f Mon Sep 17 00:00:00 2001 From: Evan Date: Tue, 13 Jan 2026 13:03:58 -0800 Subject: [PATCH] Inject server env vars into index.html, including instance id (#2888) ## Description: Should fix the broken 1v1 on staging. The issue was that we had multiple staging environments, and the matchmaker would often route a player to a game on a different staging server, so the client couldn't find the game. So now each deployment has a unique id, and the matchmaker only connects players & servers that have the same instance id. ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced ## Please put your Discord username so you can be contacted if a bug or regression is found: evan --- .vscode/settings.json | 3 ++ index.html | 6 +++ package-lock.json | 8 +--- package.json | 1 + src/client/JoinPrivateLobbyModal.ts | 28 ++--------- src/client/Main.ts | 2 + src/client/Matchmaking.ts | 4 +- src/server/Master.ts | 74 +++++++++++++++++++++++------ src/server/Worker.ts | 1 + vite.config.ts | 40 ++++++---------- 10 files changed, 97 insertions(+), 70 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..c0c69aab9 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "html.validate.scripts": false +} diff --git a/index.html b/index.html index a6e541a60..cad490b1c 100644 --- a/index.html +++ b/index.html @@ -56,6 +56,12 @@ /> + + +