From 30fb97c45fefe4add294fa1b4a4986d9b729b5e9 Mon Sep 17 00:00:00 2001
From: oncenot0 <225936783+oncenot0@users.noreply.github.com>
Date: Wed, 11 Nov 2026 01:41:34 +0300
Subject: [PATCH 01/13] Flash tab title and icon when the game starts or a
spawn is needed
---
resources/lang/en.json | 6 +
src/client/ClientGameRunner.ts | 15 +++
src/client/Main.ts | 4 +
src/client/TabAttention.ts | 175 ++++++++++++++++++++++++++++++
src/client/UserSettingModal.ts | 19 ++++
src/client/UserSettings.ts | 10 ++
tests/client/TabAttention.test.ts | 141 ++++++++++++++++++++++++
7 files changed, 370 insertions(+)
create mode 100644 src/client/TabAttention.ts
create mode 100644 tests/client/TabAttention.test.ts
diff --git a/resources/lang/en.json b/resources/lang/en.json
index 0201c472a45..2b48090442e 100644
--- a/resources/lang/en.json
+++ b/resources/lang/en.json
@@ -2743,6 +2743,10 @@
"none": "You don't have an active subscription.",
"title": "Your Subscription"
},
+ "tab_attention": {
+ "pick_spawn": "Choose your spawn!",
+ "starting": "Game starting!"
+ },
"team_colors": {
"blue": "Blue",
"bot": "Tribes",
@@ -3047,6 +3051,8 @@
"steam_lobby_links_label": "Open Lobby Links in Steam",
"swap_direction": "Swap Rocket Direction",
"swap_direction_desc": "Toggle rocket launch direction (up/down).",
+ "tab_attention_desc": "Flash the tab title and icon when the game is starting or you still need to pick a spawn while this tab is in the background.",
+ "tab_attention_label": "Flash Tab When Game Starts",
"tab_audio": "Audio",
"tab_display": "Display",
"tab_gameplay": "Gameplay",
diff --git a/src/client/ClientGameRunner.ts b/src/client/ClientGameRunner.ts
index c7d58ef5a01..ed8db5fefeb 100644
--- a/src/client/ClientGameRunner.ts
+++ b/src/client/ClientGameRunner.ts
@@ -71,6 +71,7 @@ import { ALL_UNIT_TYPES, UnitState } from "./render/types";
import { versionedPathForMismatchedGame } from "./ServerList";
import { audioMixer, initAudioMixer } from "./sound/AudioMixer";
import { SoundManager } from "./sound/SoundManager";
+import { tabAttention } from "./TabAttention";
import { reportGameError } from "./Telemetry";
import {
loadCachedTerrainMap,
@@ -1074,6 +1075,7 @@ export class ClientGameRunner {
this.gameView.update(gu);
this.webglBuilder?.update(this.gameView);
this.renderer.tick();
+ this.updateTabAttention();
if (gu.tickExecutionDuration !== undefined) {
this.metrics?.recordTickExecution(gu.tickExecutionDuration);
}
@@ -1234,7 +1236,20 @@ export class ClientGameRunner {
void this.transport.rejoinGame(0);
}
+ // Flash the tab while the player still has to pick a spawn and has switched
+ // to another tab; the flashing ends once they spawn or the phase is over.
+ private updateTabAttention(): void {
+ const needsSpawn =
+ this.gameView.inSpawnPhase() && !this.gameView.myPlayer()?.hasSpawned();
+ if (needsSpawn) {
+ tabAttention.request("spawn");
+ } else {
+ tabAttention.release();
+ }
+ }
+
public stop() {
+ tabAttention.release();
this.soundManager.dispose();
this.graphicsListenerAbort?.abort();
// Detach the input handler's window/canvas listeners and its EventBus
diff --git a/src/client/Main.ts b/src/client/Main.ts
index 7ffbe3d27da..6270243993d 100644
--- a/src/client/Main.ts
+++ b/src/client/Main.ts
@@ -169,6 +169,7 @@ import {
import "./UserMeBroadcast";
import { classicReplayHref } from "./replay/ReplayEntry";
import { parseReplayViewerHash } from "./replay/ReplayViewerRoute";
+import { tabAttention } from "./TabAttention";
// The UsernameInput class is used as a type; retain this for registration.
// oxlint-disable-next-line import/no-duplicates -- Required custom-element registration.
import "./UsernameInput";
@@ -2001,6 +2002,9 @@ class Client {
// through the wait (e.g. the featured-stream panel) hide at this point instead of on join.
this.menuTornDown = true;
document.dispatchEvent(new CustomEvent("game-starting"));
+ // Flash the tab if the player has switched away while waiting; the game
+ // runner takes over (and stops it) once the spawn phase is under way.
+ tabAttention.request("starting");
// Earliest point the lobby is provably closed: the server has stopped
// broadcasting lobby_info and refuses new seats, so the shell must stop
// advertising this as joinable even though terrain is still loading.
diff --git a/src/client/TabAttention.ts b/src/client/TabAttention.ts
new file mode 100644
index 00000000000..0e09deed3fe
--- /dev/null
+++ b/src/client/TabAttention.ts
@@ -0,0 +1,175 @@
+import { UserSettings } from "./UserSettings";
+import { translateText } from "./Utils";
+
+export type TabAttentionKind = "starting" | "spawn";
+
+// Two full blinks per second: alert<->normal flips every 250 ms (500 ms per cycle).
+const FLASH_INTERVAL_MS = 250;
+// A safety net: if the game never reaches (or never leaves) the spawn phase,
+// stop flashing rather than blinking in a background tab forever.
+const MAX_FLASH_MS = 2 * 60 * 1000;
+
+// The game's own warship favicon on a white tile. Same pixels and the same
+// padded -2 -2 15 15 framing as Favicon.svg (which has a black tile), so the
+// ship stays the same size and only the background flips between black and
+// white. Inline so it needs no asset pipeline entry.
+const ALERT_ICON_SVG =
+ ``;
+const ALERT_ICON_SVG_HREF =
+ "data:image/svg+xml," + encodeURIComponent(ALERT_ICON_SVG);
+
+/**
+ * Flashes the tab title and favicon while the page is in a background tab and
+ * the player still has something to do (the game is starting, or they have yet
+ * to pick a spawn). Flashing stops as soon as the tab is visible again, and
+ * resumes if the player leaves while the need remains.
+ */
+export class TabAttention {
+ private kind: TabAttentionKind | null = null;
+ private timer: ReturnType | null = null;
+ private startedAt = 0;
+ private alertShown = false;
+ private originalTitle: string | null = null;
+ private originalIconHref: string | null = null;
+ private originalIconType: string | null = null;
+ private listening = false;
+ // Starts as the SVG; swapped for a PNG once it has been rendered, since not
+ // every browser draws SVG favicons from data URIs reliably.
+ private alertIconHref = ALERT_ICON_SVG_HREF;
+ private alertIconType = "image/svg+xml";
+ private pngRequested = false;
+
+ /**
+ * @param isEnabled Whether the player has the feature turned on. Checked on
+ * every request and every blink, so switching it off takes effect at once.
+ */
+ constructor(private readonly isEnabled: () => boolean = () => true) {}
+
+ /** Ask for the player's attention. Safe to call repeatedly. */
+ request(kind: TabAttentionKind): void {
+ if (!this.isEnabled()) {
+ this.release();
+ return;
+ }
+ if (this.kind === null) this.startedAt = Date.now();
+ this.kind = kind;
+ this.listen();
+ this.preparePngIcon();
+ this.sync();
+ }
+
+ /** The player no longer needs to be alerted. Safe to call repeatedly. */
+ release(): void {
+ if (this.kind === null) return;
+ this.kind = null;
+ this.sync();
+ }
+
+ private listen(): void {
+ if (this.listening || typeof document === "undefined") return;
+ this.listening = true;
+ document.addEventListener("visibilitychange", this.sync);
+ window.addEventListener("focus", this.sync);
+ }
+
+ private readonly sync = (): void => {
+ const expired =
+ this.kind !== null && Date.now() - this.startedAt > MAX_FLASH_MS;
+ if (expired) this.kind = null;
+ if (this.kind !== null && !this.isEnabled()) this.kind = null;
+ const shouldFlash = this.kind !== null && document.hidden;
+ if (shouldFlash) {
+ this.startFlashing();
+ } else {
+ this.stopFlashing();
+ }
+ };
+
+ private startFlashing(): void {
+ if (this.timer !== null) return;
+ this.originalTitle = document.title;
+ const link = this.iconLink();
+ this.originalIconHref = link?.getAttribute("href") ?? null;
+ this.originalIconType = link?.getAttribute("type") ?? null;
+ this.alertShown = false;
+ this.flash();
+ this.timer = setInterval(this.flash, FLASH_INTERVAL_MS);
+ }
+
+ private stopFlashing(): void {
+ if (this.timer === null) return;
+ clearInterval(this.timer);
+ this.timer = null;
+ this.apply(false);
+ }
+
+ private readonly flash = (): void => {
+ if (Date.now() - this.startedAt > MAX_FLASH_MS || !this.isEnabled()) {
+ this.kind = null;
+ this.stopFlashing();
+ return;
+ }
+ this.apply(!this.alertShown);
+ };
+
+ private apply(alert: boolean): void {
+ this.alertShown = alert;
+ const link = this.iconLink();
+ if (alert) {
+ document.title = this.message();
+ if (link) {
+ link.setAttribute("type", this.alertIconType);
+ link.setAttribute("href", this.alertIconHref);
+ }
+ return;
+ }
+ if (this.originalTitle !== null) document.title = this.originalTitle;
+ if (link && this.originalIconHref !== null) {
+ link.setAttribute("href", this.originalIconHref);
+ if (this.originalIconType !== null) {
+ link.setAttribute("type", this.originalIconType);
+ } else {
+ link.removeAttribute("type");
+ }
+ }
+ }
+
+ private preparePngIcon(): void {
+ if (this.pngRequested || typeof Image === "undefined") return;
+ this.pngRequested = true;
+ const img = new Image();
+ img.onload = () => {
+ try {
+ const canvas = document.createElement("canvas");
+ canvas.width = 64;
+ canvas.height = 64;
+ const ctx = canvas.getContext("2d");
+ if (!ctx) return;
+ ctx.imageSmoothingEnabled = false;
+ ctx.drawImage(img, 0, 0, 64, 64);
+ this.alertIconHref = canvas.toDataURL("image/png");
+ this.alertIconType = "image/png";
+ } catch {
+ // Keep the SVG icon.
+ }
+ };
+ img.src = ALERT_ICON_SVG_HREF;
+ }
+
+ private message(): string {
+ return this.kind === "spawn"
+ ? translateText("tab_attention.pick_spawn")
+ : translateText("tab_attention.starting");
+ }
+
+ private iconLink(): HTMLLinkElement | null {
+ return document.querySelector('link[rel~="icon"]');
+ }
+}
+
+export const tabAttention = new TabAttention(() =>
+ new UserSettings().tabAttention(),
+);
diff --git a/src/client/UserSettingModal.ts b/src/client/UserSettingModal.ts
index c6f110df069..6440848c779 100644
--- a/src/client/UserSettingModal.ts
+++ b/src/client/UserSettingModal.ts
@@ -527,6 +527,16 @@ export class UserSettingModal extends BaseModal {
this.requestUpdate();
}
+ private toggleTabAttention() {
+ this.userSettings.toggleTabAttention();
+ console.log(
+ "🔔 Tab Attention:",
+ this.userSettings.tabAttention() ? "ON" : "OFF",
+ );
+
+ this.requestUpdate();
+ }
+
/** The ratio the player is actually attacking with right now. */
private currentAttackRatio(): number {
return this.uiState?.attackRatio ?? this.userSettings.attackRatio();
@@ -2058,6 +2068,15 @@ export class UserSettingModal extends BaseModal {
}}
>
+
+
+
({
+ translateText: (key: string) => key,
+}));
+
+vi.mock("../../src/client/UserSettings", () => ({
+ UserSettings: class {
+ tabAttention() {
+ return true;
+ }
+ },
+}));
+
+import { TabAttention } from "../../src/client/TabAttention";
+
+const ORIGINAL_HREF = "/images/Favicon.svg";
+
+function setHidden(hidden: boolean) {
+ Object.defineProperty(document, "hidden", {
+ configurable: true,
+ get: () => hidden,
+ });
+ document.dispatchEvent(new Event("visibilitychange"));
+}
+
+function iconHref(): string | null {
+ return document.querySelector('link[rel~="icon"]')!.getAttribute("href");
+}
+
+describe("TabAttention", () => {
+ let attention: TabAttention;
+ let enabled = true;
+
+ beforeEach(() => {
+ vi.useFakeTimers();
+ document.head.innerHTML = ``;
+ document.title = "OpenFront";
+ setHidden(false);
+ enabled = true;
+ attention = new TabAttention(() => enabled);
+ });
+
+ afterEach(() => {
+ attention.release();
+ vi.useRealTimers();
+ });
+
+ it("does nothing while the tab is visible", () => {
+ attention.request("spawn");
+ vi.advanceTimersByTime(5000);
+ expect(document.title).toBe("OpenFront");
+ expect(iconHref()).toBe(ORIGINAL_HREF);
+ });
+
+ it("alternates title and icon while the tab is hidden", () => {
+ setHidden(true);
+ attention.request("spawn");
+ expect(document.title).toBe("tab_attention.pick_spawn");
+ expect(iconHref()).not.toBe(ORIGINAL_HREF);
+
+ vi.advanceTimersByTime(250);
+ expect(document.title).toBe("OpenFront");
+ expect(iconHref()).toBe(ORIGINAL_HREF);
+
+ vi.advanceTimersByTime(250);
+ expect(document.title).toBe("tab_attention.pick_spawn");
+ });
+
+ it("uses the starting message before the spawn phase", () => {
+ setHidden(true);
+ attention.request("starting");
+ expect(document.title).toBe("tab_attention.starting");
+ });
+
+ it("restores the title and icon when the tab becomes visible", () => {
+ setHidden(true);
+ attention.request("spawn");
+ setHidden(false);
+ expect(document.title).toBe("OpenFront");
+ expect(iconHref()).toBe(ORIGINAL_HREF);
+ vi.advanceTimersByTime(5000);
+ expect(document.title).toBe("OpenFront");
+ });
+
+ it("resumes when the player leaves again while still needed", () => {
+ attention.request("spawn");
+ setHidden(true);
+ expect(document.title).toBe("tab_attention.pick_spawn");
+ });
+
+ it("stops and restores on release", () => {
+ setHidden(true);
+ attention.request("spawn");
+ attention.release();
+ expect(document.title).toBe("OpenFront");
+ expect(iconHref()).toBe(ORIGINAL_HREF);
+ vi.advanceTimersByTime(5000);
+ expect(document.title).toBe("OpenFront");
+ });
+
+ it("gives up after two minutes", () => {
+ setHidden(true);
+ attention.request("spawn");
+ vi.advanceTimersByTime(2 * 60 * 1000 + 500);
+ expect(document.title).toBe("OpenFront");
+ expect(iconHref()).toBe(ORIGINAL_HREF);
+ });
+
+ it("does nothing when the setting is off", () => {
+ enabled = false;
+ setHidden(true);
+ attention.request("spawn");
+ vi.advanceTimersByTime(5000);
+ expect(document.title).toBe("OpenFront");
+ expect(iconHref()).toBe(ORIGINAL_HREF);
+ });
+
+ it("stops and restores if the setting is switched off mid-flash", () => {
+ setHidden(true);
+ attention.request("spawn");
+ expect(document.title).toBe("tab_attention.pick_spawn");
+ enabled = false;
+ vi.advanceTimersByTime(250);
+ expect(document.title).toBe("OpenFront");
+ expect(iconHref()).toBe(ORIGINAL_HREF);
+ vi.advanceTimersByTime(5000);
+ expect(document.title).toBe("OpenFront");
+ });
+
+ it("flashes again once the setting is switched back on", () => {
+ enabled = false;
+ setHidden(true);
+ attention.request("spawn");
+ expect(document.title).toBe("OpenFront");
+ enabled = true;
+ attention.request("spawn");
+ expect(document.title).toBe("tab_attention.pick_spawn");
+ });
+});
From 33d552f5005358dbcb97da79bd2334d25a820328 Mon Sep 17 00:00:00 2001
From: oncenot0 <225936783+oncenot0@users.noreply.github.com>
Date: Wed, 11 Nov 2026 17:41:54 +0300
Subject: [PATCH 02/13] Address review feedback on tab flash
---
src/client/ClientGameRunner.ts | 25 ++++++++++++++++++++-----
src/client/TabAttention.ts | 28 +++++++++++++++++++++-------
tests/client/TabAttention.test.ts | 21 +++++++++++++++++++++
3 files changed, 62 insertions(+), 12 deletions(-)
diff --git a/src/client/ClientGameRunner.ts b/src/client/ClientGameRunner.ts
index ed8db5fefeb..cfb2c104ea6 100644
--- a/src/client/ClientGameRunner.ts
+++ b/src/client/ClientGameRunner.ts
@@ -313,6 +313,8 @@ export function joinLobby(
console.error("error creating client game", e);
currentGameRunner = null;
+ // The game never started, so stop any "starting" tab flash.
+ tabAttention.release();
const startingModal = document.querySelector(
"game-starting-modal",
@@ -455,6 +457,8 @@ export function joinLobby(
currentGameRunner.stop();
currentGameRunner = null;
} else {
+ // Left during prestart, before a runner exists to release the flash.
+ tabAttention.release();
transport.leaveGame();
}
return true;
@@ -1239,12 +1243,23 @@ export class ClientGameRunner {
// Flash the tab while the player still has to pick a spawn and has switched
// to another tab; the flashing ends once they spawn or the phase is over.
private updateTabAttention(): void {
- const needsSpawn =
- this.gameView.inSpawnPhase() && !this.gameView.myPlayer()?.hasSpawned();
- if (needsSpawn) {
- tabAttention.request("spawn");
- } else {
+ const config = this.gameView.config();
+ const canPickSpawn =
+ this.gameView.inSpawnPhase() &&
+ !config.isRandomSpawn() &&
+ !config.isReplay() &&
+ !config.isIntentionalSpectator();
+ if (!canPickSpawn) {
+ tabAttention.release();
+ return;
+ }
+ const me = this.gameView.myPlayer();
+ // Before the player shows up in the view, leave any "starting" flash alone.
+ if (me === null) return;
+ if (me.hasSpawned()) {
tabAttention.release();
+ } else {
+ tabAttention.request("spawn");
}
}
diff --git a/src/client/TabAttention.ts b/src/client/TabAttention.ts
index 0e09deed3fe..6f376d83938 100644
--- a/src/client/TabAttention.ts
+++ b/src/client/TabAttention.ts
@@ -36,6 +36,9 @@ export class TabAttention {
private originalIconHref: string | null = null;
private originalIconType: string | null = null;
private listening = false;
+ // Set when the two-minute limit ran out. Requests are ignored until the
+ // need is released, so repeated requests can't restart the limit.
+ private expired = false;
// Starts as the SVG; swapped for a PNG once it has been rendered, since not
// every browser draws SVG favicons from data URIs reliably.
private alertIconHref = ALERT_ICON_SVG_HREF;
@@ -54,6 +57,7 @@ export class TabAttention {
this.release();
return;
}
+ if (this.expired) return;
if (this.kind === null) this.startedAt = Date.now();
this.kind = kind;
this.listen();
@@ -63,6 +67,7 @@ export class TabAttention {
/** The player no longer needs to be alerted. Safe to call repeatedly. */
release(): void {
+ this.expired = false;
if (this.kind === null) return;
this.kind = null;
this.sync();
@@ -76,9 +81,9 @@ export class TabAttention {
}
private readonly sync = (): void => {
- const expired =
- this.kind !== null && Date.now() - this.startedAt > MAX_FLASH_MS;
- if (expired) this.kind = null;
+ if (this.kind !== null && Date.now() - this.startedAt > MAX_FLASH_MS) {
+ this.expire();
+ }
if (this.kind !== null && !this.isEnabled()) this.kind = null;
const shouldFlash = this.kind !== null && document.hidden;
if (shouldFlash) {
@@ -107,7 +112,12 @@ export class TabAttention {
}
private readonly flash = (): void => {
- if (Date.now() - this.startedAt > MAX_FLASH_MS || !this.isEnabled()) {
+ if (Date.now() - this.startedAt > MAX_FLASH_MS) {
+ this.expire();
+ this.stopFlashing();
+ return;
+ }
+ if (!this.isEnabled()) {
this.kind = null;
this.stopFlashing();
return;
@@ -115,6 +125,11 @@ export class TabAttention {
this.apply(!this.alertShown);
};
+ private expire(): void {
+ this.kind = null;
+ this.expired = true;
+ }
+
private apply(alert: boolean): void {
this.alertShown = alert;
const link = this.iconLink();
@@ -170,6 +185,5 @@ export class TabAttention {
}
}
-export const tabAttention = new TabAttention(() =>
- new UserSettings().tabAttention(),
-);
+const userSettings = new UserSettings();
+export const tabAttention = new TabAttention(() => userSettings.tabAttention());
diff --git a/tests/client/TabAttention.test.ts b/tests/client/TabAttention.test.ts
index 080c4f8d045..fd294ebd009 100644
--- a/tests/client/TabAttention.test.ts
+++ b/tests/client/TabAttention.test.ts
@@ -108,6 +108,27 @@ describe("TabAttention", () => {
expect(iconHref()).toBe(ORIGINAL_HREF);
});
+ it("does not restart the two-minute limit on repeated requests", () => {
+ setHidden(true);
+ attention.request("spawn");
+ vi.advanceTimersByTime(2 * 60 * 1000 + 500);
+ expect(document.title).toBe("OpenFront");
+ // A game tick asks again; it must stay stopped.
+ attention.request("spawn");
+ vi.advanceTimersByTime(5000);
+ expect(document.title).toBe("OpenFront");
+ expect(iconHref()).toBe(ORIGINAL_HREF);
+ });
+
+ it("allows a new two-minute period after the need is released", () => {
+ setHidden(true);
+ attention.request("spawn");
+ vi.advanceTimersByTime(2 * 60 * 1000 + 500);
+ attention.release();
+ attention.request("spawn");
+ expect(document.title).toBe("tab_attention.pick_spawn");
+ });
+
it("does nothing when the setting is off", () => {
enabled = false;
setHidden(true);
From 1ace60626913e5876da8e749cc9ef15c1240c334 Mon Sep 17 00:00:00 2001
From: oncenot0 <225936783+oncenot0@users.noreply.github.com>
Date: Wed, 11 Nov 2026 18:18:35 +0300
Subject: [PATCH 03/13] Don't let a stopped lobby clear a newer lobby's tab
flash
---
src/client/ClientGameRunner.ts | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/src/client/ClientGameRunner.ts b/src/client/ClientGameRunner.ts
index cfb2c104ea6..02ddb395940 100644
--- a/src/client/ClientGameRunner.ts
+++ b/src/client/ClientGameRunner.ts
@@ -154,6 +154,9 @@ export function joinLobby(
const transport = new Transport(lobbyConfig, eventBus);
let currentGameRunner: ClientGameRunner | null = null;
+ // Set once this lobby has been left. A load that was still pending can reject
+ // after a newer lobby has requested tab attention, and must not clear it.
+ let lobbyStopped = false;
const onconnect = async () => {
// Drop the tag if the ownership check failed; the server re-checks anyway.
@@ -313,8 +316,9 @@ export function joinLobby(
console.error("error creating client game", e);
currentGameRunner = null;
- // The game never started, so stop any "starting" tab flash.
- tabAttention.release();
+ // The game never started, so stop any "starting" tab flash, unless
+ // this lobby was already left (a newer lobby may own the flash now).
+ if (!lobbyStopped) tabAttention.release();
const startingModal = document.querySelector(
"game-starting-modal",
@@ -453,12 +457,15 @@ export function joinLobby(
return false;
}
console.log("leaving game");
+ const alreadyStopped = lobbyStopped;
+ lobbyStopped = true;
if (currentGameRunner) {
currentGameRunner.stop();
currentGameRunner = null;
} else {
// Left during prestart, before a runner exists to release the flash.
- tabAttention.release();
+ // A repeated stop must not clear a newer lobby's flash.
+ if (!alreadyStopped) tabAttention.release();
transport.leaveGame();
}
return true;
From 9ca3e2f62a785f6f69671ad0c6c961e5e09297fa Mon Sep 17 00:00:00 2001
From: oncenot0 <225936783+oncenot0@users.noreply.github.com>
Date: Wed, 11 Nov 2026 18:40:08 +0300
Subject: [PATCH 04/13] Start tab flash limit when flashing begins; don't start
runner for a stopped lobby
---
src/client/ClientGameRunner.ts | 10 ++++++++--
src/client/TabAttention.ts | 7 +++++--
tests/client/TabAttention.test.ts | 13 +++++++++++++
3 files changed, 26 insertions(+), 4 deletions(-)
diff --git a/src/client/ClientGameRunner.ts b/src/client/ClientGameRunner.ts
index 02ddb395940..8bd0d899538 100644
--- a/src/client/ClientGameRunner.ts
+++ b/src/client/ClientGameRunner.ts
@@ -309,6 +309,12 @@ export function joinLobby(
terrainMapFileLoader,
)
.then((r) => {
+ if (lobbyStopped) {
+ // The lobby was left while this was loading. Dispose the runner
+ // without starting it, and leave any newer lobby's flash alone.
+ r.stop(false);
+ return;
+ }
currentGameRunner = r;
r.start();
})
@@ -1270,8 +1276,8 @@ export class ClientGameRunner {
}
}
- public stop() {
- tabAttention.release();
+ public stop(releaseTabAttention: boolean = true) {
+ if (releaseTabAttention) tabAttention.release();
this.soundManager.dispose();
this.graphicsListenerAbort?.abort();
// Detach the input handler's window/canvas listeners and its EventBus
diff --git a/src/client/TabAttention.ts b/src/client/TabAttention.ts
index 6f376d83938..f6548b54a60 100644
--- a/src/client/TabAttention.ts
+++ b/src/client/TabAttention.ts
@@ -38,6 +38,7 @@ export class TabAttention {
private listening = false;
// Set when the two-minute limit ran out. Requests are ignored until the
// need is released, so repeated requests can't restart the limit.
+ // startedAt is when the current flashing run began (not when it was requested).
private expired = false;
// Starts as the SVG; swapped for a PNG once it has been rendered, since not
// every browser draws SVG favicons from data URIs reliably.
@@ -58,7 +59,6 @@ export class TabAttention {
return;
}
if (this.expired) return;
- if (this.kind === null) this.startedAt = Date.now();
this.kind = kind;
this.listen();
this.preparePngIcon();
@@ -81,7 +81,9 @@ export class TabAttention {
}
private readonly sync = (): void => {
- if (this.kind !== null && Date.now() - this.startedAt > MAX_FLASH_MS) {
+ // The limit only counts time spent actually flashing in a hidden tab, so a
+ // long wait in a visible tab doesn't use it up.
+ if (this.timer !== null && Date.now() - this.startedAt > MAX_FLASH_MS) {
this.expire();
}
if (this.kind !== null && !this.isEnabled()) this.kind = null;
@@ -95,6 +97,7 @@ export class TabAttention {
private startFlashing(): void {
if (this.timer !== null) return;
+ this.startedAt = Date.now();
this.originalTitle = document.title;
const link = this.iconLink();
this.originalIconHref = link?.getAttribute("href") ?? null;
diff --git a/tests/client/TabAttention.test.ts b/tests/client/TabAttention.test.ts
index fd294ebd009..436ba3a4f6c 100644
--- a/tests/client/TabAttention.test.ts
+++ b/tests/client/TabAttention.test.ts
@@ -120,6 +120,19 @@ describe("TabAttention", () => {
expect(iconHref()).toBe(ORIGINAL_HREF);
});
+ it("does not use up the limit while the tab is visible", () => {
+ attention.request("spawn");
+ // Waiting in a visible tab for longer than the limit, with game ticks.
+ for (let i = 0; i < 5; i++) {
+ vi.advanceTimersByTime(60 * 1000);
+ attention.request("spawn");
+ }
+ setHidden(true);
+ expect(document.title).toBe("tab_attention.pick_spawn");
+ vi.advanceTimersByTime(2 * 60 * 1000 + 500);
+ expect(document.title).toBe("OpenFront");
+ });
+
it("allows a new two-minute period after the need is released", () => {
setHidden(true);
attention.request("spawn");
From 4b2dff8d1cff80b726a9218b335e891a96a055c1 Mon Sep 17 00:00:00 2001
From: oncenot0 <225936783+oncenot0@users.noreply.github.com>
Date: Thu, 12 Nov 2026 18:03:45 +0300
Subject: [PATCH 05/13] Terminate worker when a runner for a stopped lobby is
disposed
---
src/client/ClientGameRunner.ts | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/client/ClientGameRunner.ts b/src/client/ClientGameRunner.ts
index 8bd0d899538..2a138a1ca97 100644
--- a/src/client/ClientGameRunner.ts
+++ b/src/client/ClientGameRunner.ts
@@ -1288,11 +1288,13 @@ export class ClientGameRunner {
// disposals around it.
this.input.destroy();
this.disposeRenderer?.();
+ // Terminate the worker even if the runner never started (a lobby left while
+ // it was loading), otherwise nothing else would ever stop it. Idempotent.
+ this.worker.cleanup();
if (!this.isActive) return;
this.isActive = false;
this.metrics?.stop();
- this.worker.cleanup();
this.transport.leaveGame();
if (this.connectionCheckInterval) {
clearInterval(this.connectionCheckInterval);
From 6251d9e454216a1b974506e2e378c63b29674ab5 Mon Sep 17 00:00:00 2001
From: oncenot0 <225936783+oncenot0@users.noreply.github.com>
Date: Thu, 12 Nov 2026 18:38:38 +0300
Subject: [PATCH 06/13] Scope flash expiry to its kind; only release a flash
the lobby requested
---
src/client/ClientGameRunner.ts | 18 ++++++++++++++----
src/client/TabAttention.ts | 15 ++++++++-------
tests/client/TabAttention.test.ts | 17 +++++++++++++++++
3 files changed, 39 insertions(+), 11 deletions(-)
diff --git a/src/client/ClientGameRunner.ts b/src/client/ClientGameRunner.ts
index 2a138a1ca97..3251c28e665 100644
--- a/src/client/ClientGameRunner.ts
+++ b/src/client/ClientGameRunner.ts
@@ -140,9 +140,18 @@ export function joinLobby(
// Mutable clientID state — assigned by server (multiplayer) or derived from gameStartInfo (singleplayer)
let clientID: ClientID | undefined;
+ // True once this lobby's own prestart resolved: Main only requests the
+ // "starting" tab flash after that, so only then is there a flash to release.
+ let prestarted = false;
let resolvePrestart: () => void;
let resolveJoin: () => void;
- const prestartPromise = new Promise((r) => (resolvePrestart = r));
+ const prestartPromise = new Promise(
+ (r) =>
+ (resolvePrestart = () => {
+ prestarted = true;
+ r();
+ }),
+ );
const joinPromise = new Promise((r) => (resolveJoin = r));
console.log(`joining lobby: gameID: ${lobbyConfig.gameID}`);
@@ -469,9 +478,10 @@ export function joinLobby(
currentGameRunner.stop();
currentGameRunner = null;
} else {
- // Left during prestart, before a runner exists to release the flash.
- // A repeated stop must not clear a newer lobby's flash.
- if (!alreadyStopped) tabAttention.release();
+ // Left after prestart but before a runner exists to release the flash.
+ // A lobby that never reached prestart (e.g. a superseded join) or was
+ // already stopped must not clear a newer lobby's flash.
+ if (prestarted && !alreadyStopped) tabAttention.release();
transport.leaveGame();
}
return true;
diff --git a/src/client/TabAttention.ts b/src/client/TabAttention.ts
index f6548b54a60..6f61f839ea6 100644
--- a/src/client/TabAttention.ts
+++ b/src/client/TabAttention.ts
@@ -36,10 +36,11 @@ export class TabAttention {
private originalIconHref: string | null = null;
private originalIconType: string | null = null;
private listening = false;
- // Set when the two-minute limit ran out. Requests are ignored until the
- // need is released, so repeated requests can't restart the limit.
- // startedAt is when the current flashing run began (not when it was requested).
- private expired = false;
+ // The kind whose two-minute limit ran out. Requests for that kind are ignored
+ // until the need is released, so repeated requests can't restart the limit.
+ // A different kind (e.g. "spawn" after "starting" timed out) is a new need and
+ // gets its own run. startedAt is when the current flashing run began.
+ private expiredKind: TabAttentionKind | null = null;
// Starts as the SVG; swapped for a PNG once it has been rendered, since not
// every browser draws SVG favicons from data URIs reliably.
private alertIconHref = ALERT_ICON_SVG_HREF;
@@ -58,7 +59,7 @@ export class TabAttention {
this.release();
return;
}
- if (this.expired) return;
+ if (kind === this.expiredKind) return;
this.kind = kind;
this.listen();
this.preparePngIcon();
@@ -67,7 +68,7 @@ export class TabAttention {
/** The player no longer needs to be alerted. Safe to call repeatedly. */
release(): void {
- this.expired = false;
+ this.expiredKind = null;
if (this.kind === null) return;
this.kind = null;
this.sync();
@@ -129,8 +130,8 @@ export class TabAttention {
};
private expire(): void {
+ if (this.kind !== null) this.expiredKind = this.kind;
this.kind = null;
- this.expired = true;
}
private apply(alert: boolean): void {
diff --git a/tests/client/TabAttention.test.ts b/tests/client/TabAttention.test.ts
index 436ba3a4f6c..4bab1b4df8b 100644
--- a/tests/client/TabAttention.test.ts
+++ b/tests/client/TabAttention.test.ts
@@ -133,6 +133,23 @@ describe("TabAttention", () => {
expect(document.title).toBe("OpenFront");
});
+ it("still flashes for a spawn request after the starting flash timed out", () => {
+ setHidden(true);
+ attention.request("starting");
+ vi.advanceTimersByTime(2 * 60 * 1000 + 500);
+ expect(document.title).toBe("OpenFront");
+
+ // Same kind stays ignored (no restart from repeated requests)...
+ attention.request("starting");
+ expect(document.title).toBe("OpenFront");
+
+ // ...but a different need gets its own two minutes.
+ attention.request("spawn");
+ expect(document.title).toBe("tab_attention.pick_spawn");
+ vi.advanceTimersByTime(2 * 60 * 1000 + 500);
+ expect(document.title).toBe("OpenFront");
+ });
+
it("allows a new two-minute period after the need is released", () => {
setHidden(true);
attention.request("spawn");
From 112083b5bb2f168a410333a06a6025ca01ff88d9 Mon Sep 17 00:00:00 2001
From: oncenot0 <225936783+oncenot0@users.noreply.github.com>
Date: Thu, 12 Nov 2026 18:56:23 +0300
Subject: [PATCH 07/13] Restart github actions
From 27d13d42fac4251676799ece73dcd0a16f868c9b Mon Sep 17 00:00:00 2001
From: oncenot0 <225936783+oncenot0@users.noreply.github.com>
Date: Fri, 13 Nov 2026 19:39:16 +0300
Subject: [PATCH 08/13] Restart github actions
From faab402e5bf51d53d8757d91632183321f10cd9f Mon Sep 17 00:00:00 2001
From: oncenot0 <225936783+oncenot0@users.noreply.github.com>
Date: Fri, 13 Nov 2026 20:16:41 +0300
Subject: [PATCH 09/13] Another fix
---
src/client/TabAttention.ts | 4 ++++
tests/client/TabAttention.test.ts | 32 +++++++++++++++++++++++++++++++
2 files changed, 36 insertions(+)
diff --git a/src/client/TabAttention.ts b/src/client/TabAttention.ts
index 6f61f839ea6..aeb31e8caa5 100644
--- a/src/client/TabAttention.ts
+++ b/src/client/TabAttention.ts
@@ -60,6 +60,10 @@ export class TabAttention {
return;
}
if (kind === this.expiredKind) return;
+ // A different need gets its own full run, rather than inheriting whatever
+ // is left of the previous kind's limit (which could be a second or less).
+ // The same kind keeps its deadline so repeated requests can't extend it.
+ if (kind !== this.kind) this.startedAt = Date.now();
this.kind = kind;
this.listen();
this.preparePngIcon();
diff --git a/tests/client/TabAttention.test.ts b/tests/client/TabAttention.test.ts
index 4bab1b4df8b..ffb12222304 100644
--- a/tests/client/TabAttention.test.ts
+++ b/tests/client/TabAttention.test.ts
@@ -150,6 +150,38 @@ describe("TabAttention", () => {
expect(document.title).toBe("OpenFront");
});
+ it("gives a different kind its own two minutes when it replaces a run that is nearly over", () => {
+ setHidden(true);
+ attention.request("starting");
+ vi.advanceTimersByTime(119 * 1000);
+
+ // The game starts a second before the starting run would have ended.
+ attention.request("spawn");
+ // Well past the old deadline, spawn must still be flashing...
+ vi.advanceTimersByTime(30 * 1000);
+ const titles = new Set();
+ for (let i = 0; i < 4; i++) {
+ titles.add(document.title);
+ vi.advanceTimersByTime(250);
+ }
+ expect(titles.has("tab_attention.pick_spawn")).toBe(true);
+
+ // ...and it still ends after its own two minutes.
+ vi.advanceTimersByTime(2 * 60 * 1000);
+ expect(document.title).toBe("OpenFront");
+ expect(iconHref()).toBe(ORIGINAL_HREF);
+ });
+
+ it("keeps the deadline when the same kind is requested again", () => {
+ setHidden(true);
+ attention.request("spawn");
+ vi.advanceTimersByTime(119 * 1000);
+ attention.request("spawn");
+ vi.advanceTimersByTime(2 * 1000);
+ expect(document.title).toBe("OpenFront");
+ expect(iconHref()).toBe(ORIGINAL_HREF);
+ });
+
it("allows a new two-minute period after the need is released", () => {
setHidden(true);
attention.request("spawn");
From 2782f37b997152b2e76372050db83dd1cb18bcb7 Mon Sep 17 00:00:00 2001
From: oncenot0 <225936783+oncenot0@users.noreply.github.com>
Date: Sat, 14 Nov 2026 16:42:02 +0300
Subject: [PATCH 10/13] another fix
---
.../assets/maps/brahmaputra/info.json | 2 +-
map-generator/assets/maps/canada/info.json | 2 +-
map-generator/assets/maps/london/info.json | 2 +-
map-generator/assets/maps/mexico/info.json | 2 +-
.../assets/maps/ottomanempire/info.json | 2 +-
map-generator/assets/maps/paris/info.json | 2 +-
map-generator/assets/maps/turkiye/info.json | 2 +-
.../assets/maps/world10000/info.json | 2 +-
map-generator/assets/maps/world4000/info.json | 2 +-
map-generator/assets/maps/zealandia/info.json | 2 +-
packages/engine-api/src/game/Maps.gen.ts | 20 +++++++++----------
resources/maps/brahmaputra/manifest.json | 2 +-
resources/maps/canada/manifest.json | 2 +-
resources/maps/london/manifest.json | 2 +-
resources/maps/mexico/manifest.json | 2 +-
resources/maps/ottomanempire/manifest.json | 2 +-
resources/maps/paris/manifest.json | 2 +-
resources/maps/turkiye/manifest.json | 2 +-
resources/maps/world10000/manifest.json | 2 +-
resources/maps/world4000/manifest.json | 2 +-
resources/maps/zealandia/manifest.json | 2 +-
src/client/ClientGameRunner.ts | 4 ++++
22 files changed, 34 insertions(+), 30 deletions(-)
diff --git a/map-generator/assets/maps/brahmaputra/info.json b/map-generator/assets/maps/brahmaputra/info.json
index 47cef95a049..7dd1aae6844 100644
--- a/map-generator/assets/maps/brahmaputra/info.json
+++ b/map-generator/assets/maps/brahmaputra/info.json
@@ -3,7 +3,7 @@
"id": "Brahmaputra",
"name": "Brahmaputra",
"translation_key": "map.brahmaputra",
- "categories": ["asia"],
+ "categories": ["asia", "new"],
"location": { "lat": 26.5, "lon": 92.5 },
"author": "novc",
"description": "The Brahmaputra splits Assam in two. North bank against south bank, with Majuli and the sandbar islands in between. You can cross the river by boat almost anywhere, so the whole bank is the front line.",
diff --git a/map-generator/assets/maps/canada/info.json b/map-generator/assets/maps/canada/info.json
index 677cd3e852d..6834355ff7b 100644
--- a/map-generator/assets/maps/canada/info.json
+++ b/map-generator/assets/maps/canada/info.json
@@ -3,7 +3,7 @@
"id": "Canada",
"name": "Canada",
"translation_key": "map.canada",
- "categories": ["north_america", "countries"],
+ "categories": ["north_america", "new", "countries"],
"location": {
"lat": 60,
"lon": -95
diff --git a/map-generator/assets/maps/london/info.json b/map-generator/assets/maps/london/info.json
index a55787fbaa5..a176f701ec2 100644
--- a/map-generator/assets/maps/london/info.json
+++ b/map-generator/assets/maps/london/info.json
@@ -6,7 +6,7 @@
"location": { "lat": 51.3, "lon": 0 },
"author": "Tristar",
"description": "A map of the Greater London area. Founded by the Romans in AD 43 as a settlement named Londinium, London is the capital city of England and the United Kingdom, and its largest metropolis. It is also the country's economic, transportation, and cultural center with a history spanning nearly 2,000 years.",
- "categories": ["europe"],
+ "categories": ["new", "europe"],
"nations": [
{
"coordinates": [1396, 1285],
diff --git a/map-generator/assets/maps/mexico/info.json b/map-generator/assets/maps/mexico/info.json
index 4fe3f36b8f2..9637f4f18ae 100644
--- a/map-generator/assets/maps/mexico/info.json
+++ b/map-generator/assets/maps/mexico/info.json
@@ -3,7 +3,7 @@
"id": "Mexico",
"name": "Mexico",
"translation_key": "map.mexico",
- "categories": ["north_america", "countries"],
+ "categories": ["north_america", "new", "countries"],
"location": { "lat": 23, "lon": -102 },
"author": "crunchybbb",
"description": "A country located in the southern part of North America, sandwiched between the Pacific and the Gulf of Mexico. The country is primarily mountainous, with hot deserts in the north and wet jungles in the south.",
diff --git a/map-generator/assets/maps/ottomanempire/info.json b/map-generator/assets/maps/ottomanempire/info.json
index 765d2ea3b15..d14a53fed16 100644
--- a/map-generator/assets/maps/ottomanempire/info.json
+++ b/map-generator/assets/maps/ottomanempire/info.json
@@ -3,7 +3,7 @@
"id": "OttomanEmpire",
"name": "Ottoman Empire",
"translation_key": "map.ottomanempire",
- "categories": ["europe", "asia", "africa", "countries"],
+ "categories": ["europe", "asia", "africa", "countries", "new"],
"location": { "lat": 39, "lon": 29 },
"nations": [
{
diff --git a/map-generator/assets/maps/paris/info.json b/map-generator/assets/maps/paris/info.json
index 58641575158..914fa7b0b43 100644
--- a/map-generator/assets/maps/paris/info.json
+++ b/map-generator/assets/maps/paris/info.json
@@ -3,7 +3,7 @@
"id": "Paris",
"name": "Paris",
"translation_key": "map.paris",
- "categories": ["europe"],
+ "categories": ["europe", "new"],
"nations": [
{
"coordinates": [1702, 321],
diff --git a/map-generator/assets/maps/turkiye/info.json b/map-generator/assets/maps/turkiye/info.json
index 6156d497440..550e653ee4c 100644
--- a/map-generator/assets/maps/turkiye/info.json
+++ b/map-generator/assets/maps/turkiye/info.json
@@ -5,7 +5,7 @@
"display_name": "Türkiye",
"translation_key": "map.turkiye",
"location": { "lat": 39, "lon": 35 },
- "categories": ["countries", "europe", "asia"],
+ "categories": ["countries", "europe", "asia", "new"],
"nations": [
{
"coordinates": [439, 212],
diff --git a/map-generator/assets/maps/world10000/info.json b/map-generator/assets/maps/world10000/info.json
index 7a92bd83074..6654d285b76 100755
--- a/map-generator/assets/maps/world10000/info.json
+++ b/map-generator/assets/maps/world10000/info.json
@@ -5,7 +5,7 @@
"translation_key": "map.world10000",
"author": "Patrick Plays Badly",
"description": "Oh my gosh, what have they done?!? Why, why would they have done it?? Shirley you don't just listen when people ask for a stupid huge map? And I can't play it on mobile? - A lot, of love, thats right, you got it, and don't call me Shirley.",
- "categories": ["world"],
+ "categories": ["new", "world"],
"nations": [
{
"coordinates": [6518, 1576],
diff --git a/map-generator/assets/maps/world4000/info.json b/map-generator/assets/maps/world4000/info.json
index 6761eed774e..5224517376e 100755
--- a/map-generator/assets/maps/world4000/info.json
+++ b/map-generator/assets/maps/world4000/info.json
@@ -3,7 +3,7 @@
"id": "World4000",
"name": "World 4000",
"translation_key": "map.world4000",
- "categories": ["featured", "world"],
+ "categories": ["new", "featured", "world"],
"author": "evanpelle",
"description": "Rebuild by Patrick Plays Badly. This is an overhaul of Giant World. Did you know Giant World was originally a test map? It was too laggy for public play. When first released some major water ways were still missing. Oops!",
"forced_modifiers": ["isCrowded:50"],
diff --git a/map-generator/assets/maps/zealandia/info.json b/map-generator/assets/maps/zealandia/info.json
index 61f33626a17..a56b5530b7a 100644
--- a/map-generator/assets/maps/zealandia/info.json
+++ b/map-generator/assets/maps/zealandia/info.json
@@ -4,7 +4,7 @@
"name": "Zealandia",
"translation_key": "map.zealandia",
"location": { "lat": -28, "lon": 161 },
- "categories": ["oceania", "fictional"],
+ "categories": ["oceania", "new", "fictional"],
"nations": [
{
"coordinates": [378, 1075],
diff --git a/packages/engine-api/src/game/Maps.gen.ts b/packages/engine-api/src/game/Maps.gen.ts
index 494354d5233..2aae443b323 100644
--- a/packages/engine-api/src/game/Maps.gen.ts
+++ b/packages/engine-api/src/game/Maps.gen.ts
@@ -516,7 +516,7 @@ export const maps: readonly MapInfo[] = [
id: "Brahmaputra",
type: GameMapType.Brahmaputra,
translationKey: "map.brahmaputra",
- categories: ["asia"],
+ categories: ["asia", "new"],
defaultNationCount: 37,
specialTeamCount: 2,
themes: ["asia"],
@@ -568,7 +568,7 @@ export const maps: readonly MapInfo[] = [
id: "Canada",
type: GameMapType.Canada,
translationKey: "map.canada",
- categories: ["north_america", "countries"],
+ categories: ["north_america", "new", "countries"],
defaultNationCount: 38,
themes: ["north_america"],
customTribes: [
@@ -1684,7 +1684,7 @@ export const maps: readonly MapInfo[] = [
id: "London",
type: GameMapType.London,
translationKey: "map.london",
- categories: ["europe"],
+ categories: ["new", "europe"],
defaultNationCount: 32,
themes: ["europe"],
author: "Tristar",
@@ -1917,7 +1917,7 @@ export const maps: readonly MapInfo[] = [
id: "Mexico",
type: GameMapType.Mexico,
translationKey: "map.mexico",
- categories: ["north_america", "countries"],
+ categories: ["north_america", "new", "countries"],
defaultNationCount: 32,
themes: ["north_america"],
author: "crunchybbb",
@@ -2066,7 +2066,7 @@ export const maps: readonly MapInfo[] = [
id: "OttomanEmpire",
type: GameMapType.OttomanEmpire,
translationKey: "map.ottomanempire",
- categories: ["europe", "asia", "africa", "countries"],
+ categories: ["europe", "asia", "africa", "countries", "new"],
defaultNationCount: 46,
themes: ["europe", "asia", "africa"],
location: { lat: 39, lon: 29 },
@@ -2083,7 +2083,7 @@ export const maps: readonly MapInfo[] = [
id: "Paris",
type: GameMapType.Paris,
translationKey: "map.paris",
- categories: ["europe"],
+ categories: ["europe", "new"],
defaultNationCount: 60,
themes: ["europe"],
customTribes: [
@@ -2449,7 +2449,7 @@ export const maps: readonly MapInfo[] = [
id: "Turkiye",
type: GameMapType.Turkiye,
translationKey: "map.turkiye",
- categories: ["countries", "europe", "asia"],
+ categories: ["countries", "europe", "asia", "new"],
defaultNationCount: 30,
themes: ["europe", "asia"],
location: { lat: 39, lon: 35 },
@@ -2658,7 +2658,7 @@ export const maps: readonly MapInfo[] = [
id: "World10000",
type: GameMapType.World10000,
translationKey: "map.world10000",
- categories: ["world"],
+ categories: ["new", "world"],
defaultNationCount: 377,
layers: [
{ id: "w10kland", placement: "land", nukeable: true },
@@ -2671,7 +2671,7 @@ export const maps: readonly MapInfo[] = [
id: "World4000",
type: GameMapType.World4000,
translationKey: "map.world4000",
- categories: ["featured", "world"],
+ categories: ["new", "featured", "world"],
defaultNationCount: 111,
featuredRank: 1,
forcedModifiers: ["isCrowded:50"],
@@ -2727,7 +2727,7 @@ export const maps: readonly MapInfo[] = [
id: "Zealandia",
type: GameMapType.Zealandia,
translationKey: "map.zealandia",
- categories: ["oceania", "fictional"],
+ categories: ["oceania", "new", "fictional"],
defaultNationCount: 27,
themes: ["under_ocean", "oceania"],
location: { lat: -28, lon: 161 },
diff --git a/resources/maps/brahmaputra/manifest.json b/resources/maps/brahmaputra/manifest.json
index d07e04d67d5..928900a58a6 100644
--- a/resources/maps/brahmaputra/manifest.json
+++ b/resources/maps/brahmaputra/manifest.json
@@ -151,7 +151,7 @@
"name": "Jakar"
}
],
- "categories": ["asia"],
+ "categories": ["asia", "new"],
"id": "Brahmaputra",
"map": {
"height": 1024,
diff --git a/resources/maps/canada/manifest.json b/resources/maps/canada/manifest.json
index 9f8f33d93e9..29ae8ecd0bd 100644
--- a/resources/maps/canada/manifest.json
+++ b/resources/maps/canada/manifest.json
@@ -1,5 +1,5 @@
{
- "categories": ["north_america", "countries"],
+ "categories": ["north_america", "new", "countries"],
"custom_tribes": [
{
"coordinates": [2538, 2415],
diff --git a/resources/maps/london/manifest.json b/resources/maps/london/manifest.json
index 4f7582c963f..f80983f4923 100644
--- a/resources/maps/london/manifest.json
+++ b/resources/maps/london/manifest.json
@@ -151,7 +151,7 @@
"name": "Bloomsbury"
}
],
- "categories": ["europe"],
+ "categories": ["new", "europe"],
"id": "London",
"map": {
"height": 1700,
diff --git a/resources/maps/mexico/manifest.json b/resources/maps/mexico/manifest.json
index 3a5be207dfe..d72d37f9d38 100644
--- a/resources/maps/mexico/manifest.json
+++ b/resources/maps/mexico/manifest.json
@@ -1,5 +1,5 @@
{
- "categories": ["north_america", "countries"],
+ "categories": ["north_america", "new", "countries"],
"id": "Mexico",
"map": {
"height": 2100,
diff --git a/resources/maps/ottomanempire/manifest.json b/resources/maps/ottomanempire/manifest.json
index e815d00734c..f9685a8f345 100644
--- a/resources/maps/ottomanempire/manifest.json
+++ b/resources/maps/ottomanempire/manifest.json
@@ -1,5 +1,5 @@
{
- "categories": ["europe", "asia", "africa", "countries"],
+ "categories": ["europe", "asia", "africa", "countries", "new"],
"id": "OttomanEmpire",
"map": {
"height": 2132,
diff --git a/resources/maps/paris/manifest.json b/resources/maps/paris/manifest.json
index fa089b12c14..de4ec7efc64 100644
--- a/resources/maps/paris/manifest.json
+++ b/resources/maps/paris/manifest.json
@@ -1,5 +1,5 @@
{
- "categories": ["europe"],
+ "categories": ["europe", "new"],
"custom_tribes": [
"Bonne-Nouvelle",
"Croulebarbe",
diff --git a/resources/maps/turkiye/manifest.json b/resources/maps/turkiye/manifest.json
index 92404299030..42ce1481504 100644
--- a/resources/maps/turkiye/manifest.json
+++ b/resources/maps/turkiye/manifest.json
@@ -1,5 +1,5 @@
{
- "categories": ["countries", "europe", "asia"],
+ "categories": ["countries", "europe", "asia", "new"],
"display_name": "Türkiye",
"id": "Turkiye",
"map": {
diff --git a/resources/maps/world10000/manifest.json b/resources/maps/world10000/manifest.json
index 3e6a218e9bd..9b7392f913f 100644
--- a/resources/maps/world10000/manifest.json
+++ b/resources/maps/world10000/manifest.json
@@ -21,7 +21,7 @@
"name": "Nikola123"
}
],
- "categories": ["world"],
+ "categories": ["new", "world"],
"id": "World10000",
"layers": [
{
diff --git a/resources/maps/world4000/manifest.json b/resources/maps/world4000/manifest.json
index 6617263c80f..498ee6e20af 100644
--- a/resources/maps/world4000/manifest.json
+++ b/resources/maps/world4000/manifest.json
@@ -1,5 +1,5 @@
{
- "categories": ["featured", "world"],
+ "categories": ["new", "featured", "world"],
"featured_rank": 1,
"forced_modifiers": ["isCrowded:50"],
"id": "World4000",
diff --git a/resources/maps/zealandia/manifest.json b/resources/maps/zealandia/manifest.json
index db9d5b443be..c5883ef5ee8 100644
--- a/resources/maps/zealandia/manifest.json
+++ b/resources/maps/zealandia/manifest.json
@@ -1,5 +1,5 @@
{
- "categories": ["oceania", "fictional"],
+ "categories": ["oceania", "new", "fictional"],
"id": "Zealandia",
"map": {
"height": 1888,
diff --git a/src/client/ClientGameRunner.ts b/src/client/ClientGameRunner.ts
index 2f2adfdd74c..0d86504dec7 100644
--- a/src/client/ClientGameRunner.ts
+++ b/src/client/ClientGameRunner.ts
@@ -1314,6 +1314,7 @@ export class ClientGameRunner {
void this.transport.rejoinGame(0);
}
+<<<<<<< HEAD
// Flash the tab while the player still has to pick a spawn and has switched
// to another tab; the flashing ends once they spawn or the phase is over.
private updateTabAttention(): void {
@@ -1339,12 +1340,15 @@ export class ClientGameRunner {
public stop(releaseTabAttention: boolean = true) {
if (releaseTabAttention) tabAttention.release();
+=======
+ public stop() {
if (this.healthTimer !== null) clearInterval(this.healthTimer);
this.healthTimer = null;
document.removeEventListener("visibilitychange", this.updateHealth);
this.healthIndicators?.remove();
this.healthIndicators = null;
this.health.reset(performance.now());
+>>>>>>> upstream/main
this.soundManager.dispose();
this.graphicsListenerAbort?.abort();
// Detach the input handler's window/canvas listeners and its EventBus
From 91308eacfe9725d4681621005b76d98670c2204d Mon Sep 17 00:00:00 2001
From: oncenot0 <225936783+oncenot0@users.noreply.github.com>
Date: Sat, 14 Nov 2026 16:53:40 +0300
Subject: [PATCH 11/13] Restart github actions
From ce355c8e8af5acf459c5e346c4dda26a8980dac8 Mon Sep 17 00:00:00 2001
From: oncenot0
Date: Sat, 14 Nov 2026 13:32:58 +0000
Subject: [PATCH 12/13] Scope tab flash release to the lobby that requested it
A superseded local join still reaches prestart inside joinLobby(), so the
prestarted/lobbyStopped flags treated it as owning a flash it never asked
for, and stopping it cleared the current lobby's flash.
Give each lobby a token (LobbyConfig.tabAttentionOwner, created in Main and
passed to both request("starting") and the runner). TabAttention.release(owner)
only acts for the current owner, and a new owner starts with a fresh kind,
deadline and expiry. This replaces the prestarted/alreadyStopped/lobbyStopped
guards around release with one rule, and drops ClientGameRunner.stop's
releaseTabAttention flag.
---
src/client/ClientGameRunner.ts | 60 +++++++++++-----------
src/client/Main.ts | 6 ++-
src/client/TabAttention.ts | 36 +++++++++++--
tests/client/TabAttention.test.ts | 84 +++++++++++++++++++++++++++++++
4 files changed, 150 insertions(+), 36 deletions(-)
diff --git a/src/client/ClientGameRunner.ts b/src/client/ClientGameRunner.ts
index 0d86504dec7..b63d0639b27 100644
--- a/src/client/ClientGameRunner.ts
+++ b/src/client/ClientGameRunner.ts
@@ -73,7 +73,7 @@ import { ALL_UNIT_TYPES, UnitState } from "./render/types";
import { versionedPathForMismatchedGame } from "./ServerList";
import { audioMixer, initAudioMixer } from "./sound/AudioMixer";
import { SoundManager } from "./sound/SoundManager";
-import { tabAttention } from "./TabAttention";
+import { tabAttention, type TabAttentionOwner } from "./TabAttention";
import { reportGameError } from "./Telemetry";
import {
loadCachedTerrainMap,
@@ -127,6 +127,10 @@ export interface LobbyConfig {
// Host only: the play token the lobby was created under, used for the
// first join so the host joins as the creator (see createLobby).
creatorToken?: string;
+ // Who owns this lobby's tab flash. Main passes the same token to
+ // tabAttention.request("starting"), so leaving this lobby only ever clears
+ // its own flash, never a newer lobby's.
+ tabAttentionOwner?: TabAttentionOwner;
}
export interface JoinLobbyResult {
@@ -142,18 +146,12 @@ export function joinLobby(
// Mutable clientID state — assigned by server (multiplayer) or derived from gameStartInfo (singleplayer)
let clientID: ClientID | undefined;
- // True once this lobby's own prestart resolved: Main only requests the
- // "starting" tab flash after that, so only then is there a flash to release.
- let prestarted = false;
+ // Tab-flash ownership for this lobby; see LobbyConfig.tabAttentionOwner.
+ const attentionOwner: TabAttentionOwner = lobbyConfig.tabAttentionOwner ?? {};
+ lobbyConfig.tabAttentionOwner = attentionOwner;
let resolvePrestart: () => void;
let resolveJoin: () => void;
- const prestartPromise = new Promise(
- (r) =>
- (resolvePrestart = () => {
- prestarted = true;
- r();
- }),
- );
+ const prestartPromise = new Promise((r) => (resolvePrestart = r));
const joinPromise = new Promise((r) => (resolveJoin = r));
console.log(`joining lobby: gameID: ${lobbyConfig.gameID}`);
@@ -165,8 +163,8 @@ export function joinLobby(
const transport = new Transport(lobbyConfig, eventBus);
let currentGameRunner: ClientGameRunner | null = null;
- // Set once this lobby has been left. A load that was still pending can reject
- // after a newer lobby has requested tab attention, and must not clear it.
+ // Set once this lobby has been left, so a load that was still pending
+ // doesn't start a runner for it.
let lobbyStopped = false;
const onconnect = async () => {
@@ -322,8 +320,8 @@ export function joinLobby(
.then((r) => {
if (lobbyStopped) {
// The lobby was left while this was loading. Dispose the runner
- // without starting it, and leave any newer lobby's flash alone.
- r.stop(false);
+ // without starting it; its release only touches this lobby's flash.
+ r.stop();
return;
}
currentGameRunner = r;
@@ -333,9 +331,8 @@ export function joinLobby(
console.error("error creating client game", e);
currentGameRunner = null;
- // The game never started, so stop any "starting" tab flash, unless
- // this lobby was already left (a newer lobby may own the flash now).
- if (!lobbyStopped) tabAttention.release();
+ // The game never started, so stop this lobby's "starting" tab flash.
+ tabAttention.release(attentionOwner);
const startingModal = document.querySelector(
"game-starting-modal",
@@ -474,16 +471,14 @@ export function joinLobby(
return false;
}
console.log("leaving game");
- const alreadyStopped = lobbyStopped;
lobbyStopped = true;
if (currentGameRunner) {
currentGameRunner.stop();
currentGameRunner = null;
} else {
- // Left after prestart but before a runner exists to release the flash.
- // A lobby that never reached prestart (e.g. a superseded join) or was
- // already stopped must not clear a newer lobby's flash.
- if (prestarted && !alreadyStopped) tabAttention.release();
+ // No runner yet to release the flash. Only this lobby's own flash is
+ // cleared: a no-op if it never asked, or if a newer lobby has since.
+ tabAttention.release(attentionOwner);
transport.leaveGame();
}
return true;
@@ -1314,7 +1309,6 @@ export class ClientGameRunner {
void this.transport.rejoinGame(0);
}
-<<<<<<< HEAD
// Flash the tab while the player still has to pick a spawn and has switched
// to another tab; the flashing ends once they spawn or the phase is over.
private updateTabAttention(): void {
@@ -1324,31 +1318,35 @@ export class ClientGameRunner {
!config.isRandomSpawn() &&
!config.isReplay() &&
!config.isIntentionalSpectator();
+ const owner = this.attentionOwner();
if (!canPickSpawn) {
- tabAttention.release();
+ tabAttention.release(owner);
return;
}
const me = this.gameView.myPlayer();
// Before the player shows up in the view, leave any "starting" flash alone.
if (me === null) return;
if (me.hasSpawned()) {
- tabAttention.release();
+ tabAttention.release(owner);
} else {
- tabAttention.request("spawn");
+ tabAttention.request("spawn", owner);
}
}
- public stop(releaseTabAttention: boolean = true) {
- if (releaseTabAttention) tabAttention.release();
-=======
+ // The lobby's own token (set by joinLobby), so this runner only ever starts
+ // or clears its own lobby's flash.
+ private attentionOwner(): TabAttentionOwner {
+ return (this.lobby.tabAttentionOwner ??= {});
+ }
+
public stop() {
+ tabAttention.release(this.attentionOwner());
if (this.healthTimer !== null) clearInterval(this.healthTimer);
this.healthTimer = null;
document.removeEventListener("visibilitychange", this.updateHealth);
this.healthIndicators?.remove();
this.healthIndicators = null;
this.health.reset(performance.now());
->>>>>>> upstream/main
this.soundManager.dispose();
this.graphicsListenerAbort?.abort();
// Detach the input handler's window/canvas listeners and its EventBus
diff --git a/src/client/Main.ts b/src/client/Main.ts
index 2d023a96462..10cddf0537e 100644
--- a/src/client/Main.ts
+++ b/src/client/Main.ts
@@ -1962,7 +1962,11 @@ class Client {
void showInGameAlert(translateText("error_modal.game_client_failed"));
return;
}
+ // This join's tab-flash owner: a join that gets superseded can then only
+ // ever release its own flash, never the newer join's.
+ const attentionOwner = {};
const newLobbyHandle = joinLobby(this.eventBus, {
+ tabAttentionOwner: attentionOwner,
gameID: lobby.gameID,
cosmetics: await getPlayerCosmeticsRefs({
verified: resolvedName.verified,
@@ -2008,7 +2012,7 @@ class Client {
document.dispatchEvent(new CustomEvent("game-starting"));
// Flash the tab if the player has switched away while waiting; the game
// runner takes over (and stops it) once the spawn phase is under way.
- tabAttention.request("starting");
+ tabAttention.request("starting", attentionOwner);
// Earliest point the lobby is provably closed: the server has stopped
// broadcasting lobby_info and refuses new seats, so the shell must stop
// advertising this as joinable even though terrain is still loading.
diff --git a/src/client/TabAttention.ts b/src/client/TabAttention.ts
index aeb31e8caa5..2b0ecfdf1d2 100644
--- a/src/client/TabAttention.ts
+++ b/src/client/TabAttention.ts
@@ -3,6 +3,13 @@ import { translateText } from "./Utils";
export type TabAttentionKind = "starting" | "spawn";
+/**
+ * Identifies who asked for attention (one per lobby). Only the current owner
+ * can release it, so a lobby that was left, or superseded by a newer one, can
+ * never clear the flash the newer lobby is showing.
+ */
+export type TabAttentionOwner = object;
+
// Two full blinks per second: alert<->normal flips every 250 ms (500 ms per cycle).
const FLASH_INTERVAL_MS = 250;
// A safety net: if the game never reaches (or never leaves) the spawn phase,
@@ -29,6 +36,9 @@ const ALERT_ICON_SVG_HREF =
*/
export class TabAttention {
private kind: TabAttentionKind | null = null;
+ // Who holds the current request. Kept after a timeout so the owner can still
+ // release the expired need, and replaced when another owner asks.
+ private owner: TabAttentionOwner | null = null;
private timer: ReturnType | null = null;
private startedAt = 0;
private alertShown = false;
@@ -53,12 +63,24 @@ export class TabAttention {
*/
constructor(private readonly isEnabled: () => boolean = () => true) {}
- /** Ask for the player's attention. Safe to call repeatedly. */
- request(kind: TabAttentionKind): void {
+ /**
+ * Ask for the player's attention. Safe to call repeatedly. A request from a
+ * different owner takes over: it is a new need, so it never inherits the
+ * previous owner's kind, deadline or expiry.
+ */
+ request(
+ kind: TabAttentionKind,
+ owner: TabAttentionOwner | null = null,
+ ): void {
if (!this.isEnabled()) {
this.release();
return;
}
+ if (owner !== this.owner) {
+ this.owner = owner;
+ this.expiredKind = null;
+ this.kind = null;
+ }
if (kind === this.expiredKind) return;
// A different need gets its own full run, rather than inheriting whatever
// is left of the previous kind's limit (which could be a second or less).
@@ -70,9 +92,15 @@ export class TabAttention {
this.sync();
}
- /** The player no longer needs to be alerted. Safe to call repeatedly. */
- release(): void {
+ /**
+ * The player no longer needs to be alerted. Safe to call repeatedly. With an
+ * owner, this only acts if that owner still holds the request; without one it
+ * always releases (used when the setting is turned off).
+ */
+ release(owner?: TabAttentionOwner): void {
+ if (owner !== undefined && owner !== this.owner) return;
this.expiredKind = null;
+ this.owner = null;
if (this.kind === null) return;
this.kind = null;
this.sync();
diff --git a/tests/client/TabAttention.test.ts b/tests/client/TabAttention.test.ts
index ffb12222304..5fe0ae0295b 100644
--- a/tests/client/TabAttention.test.ts
+++ b/tests/client/TabAttention.test.ts
@@ -221,4 +221,88 @@ describe("TabAttention", () => {
attention.request("spawn");
expect(document.title).toBe("tab_attention.pick_spawn");
});
+
+ describe("ownership", () => {
+ const lobbyA = {};
+ const lobbyB = {};
+
+ it("lets the owner release its own flash", () => {
+ setHidden(true);
+ attention.request("starting", lobbyA);
+ expect(document.title).toBe("tab_attention.starting");
+ attention.release(lobbyA);
+ expect(document.title).toBe("OpenFront");
+ expect(iconHref()).toBe(ORIGINAL_HREF);
+ });
+
+ it("ignores a release from an owner that never asked (a superseded lobby)", () => {
+ setHidden(true);
+ attention.request("starting", lobbyB);
+ attention.release(lobbyA);
+ expect(document.title).toBe("tab_attention.starting");
+ vi.advanceTimersByTime(250);
+ expect(document.title).toBe("OpenFront");
+ vi.advanceTimersByTime(250);
+ expect(document.title).toBe("tab_attention.starting");
+ });
+
+ it("ignores a release from an owner that a newer owner has replaced", () => {
+ setHidden(true);
+ attention.request("starting", lobbyA);
+ attention.request("starting", lobbyB);
+ attention.release(lobbyA);
+ expect(document.title).toBe("tab_attention.starting");
+ attention.release(lobbyB);
+ expect(document.title).toBe("OpenFront");
+ });
+
+ it("still releases when no owner is given (setting switched off)", () => {
+ setHidden(true);
+ attention.request("starting", lobbyA);
+ attention.release();
+ expect(document.title).toBe("OpenFront");
+ });
+
+ it("gives a new owner a fresh run after the previous owner timed out", () => {
+ setHidden(true);
+ attention.request("spawn", lobbyA);
+ vi.advanceTimersByTime(2 * 60 * 1000 + 500);
+ expect(document.title).toBe("OpenFront");
+ // Same kind, but a different lobby: its own need, its own two minutes.
+ attention.request("spawn", lobbyB);
+ expect(document.title).toBe("tab_attention.pick_spawn");
+ });
+
+ it("keeps an owner's expiry from restarting on repeated requests", () => {
+ setHidden(true);
+ attention.request("spawn", lobbyA);
+ vi.advanceTimersByTime(2 * 60 * 1000 + 500);
+ attention.request("spawn", lobbyA);
+ expect(document.title).toBe("OpenFront");
+ });
+
+ it("lets the owner release an expired need so it can ask again", () => {
+ setHidden(true);
+ attention.request("spawn", lobbyA);
+ vi.advanceTimersByTime(2 * 60 * 1000 + 500);
+ attention.release(lobbyA);
+ attention.request("spawn", lobbyA);
+ expect(document.title).toBe("tab_attention.pick_spawn");
+ });
+
+ it("regression: a stale join released after the current lobby asked keeps the flash running", () => {
+ setHidden(true);
+ // Lobby B is current and has asked; stale lobby A (which never asked) is
+ // stopped afterwards, as Main does for a superseded join.
+ attention.request("starting", lobbyB);
+ attention.release(lobbyA);
+ attention.release(lobbyA);
+ const titles = new Set();
+ for (let i = 0; i < 4; i++) {
+ titles.add(document.title);
+ vi.advanceTimersByTime(250);
+ }
+ expect(titles).toEqual(new Set(["tab_attention.starting", "OpenFront"]));
+ });
+ });
});
From 4d0c8ac49416157cff64d95baea3530f5c0141a1 Mon Sep 17 00:00:00 2001
From: oncenot0
Date: Sat, 14 Nov 2026 14:01:02 +0000
Subject: [PATCH 13/13] Restore map files to upstream/main
The merge brought back the "new" category that #6422 removed, so the PR was
carrying unrelated map changes. Take upstream's versions.
---
.../assets/maps/brahmaputra/info.json | 2 +-
map-generator/assets/maps/canada/info.json | 2 +-
map-generator/assets/maps/london/info.json | 2 +-
map-generator/assets/maps/mexico/info.json | 2 +-
.../assets/maps/ottomanempire/info.json | 2 +-
map-generator/assets/maps/paris/info.json | 2 +-
map-generator/assets/maps/turkiye/info.json | 2 +-
.../assets/maps/world10000/info.json | 2 +-
map-generator/assets/maps/world4000/info.json | 2 +-
map-generator/assets/maps/zealandia/info.json | 2 +-
packages/engine-api/src/game/Maps.gen.ts | 20 +++++++++----------
resources/maps/brahmaputra/manifest.json | 2 +-
resources/maps/canada/manifest.json | 2 +-
resources/maps/london/manifest.json | 2 +-
resources/maps/mexico/manifest.json | 2 +-
resources/maps/ottomanempire/manifest.json | 2 +-
resources/maps/paris/manifest.json | 2 +-
resources/maps/turkiye/manifest.json | 2 +-
resources/maps/world10000/manifest.json | 2 +-
resources/maps/world4000/manifest.json | 2 +-
resources/maps/zealandia/manifest.json | 2 +-
21 files changed, 30 insertions(+), 30 deletions(-)
diff --git a/map-generator/assets/maps/brahmaputra/info.json b/map-generator/assets/maps/brahmaputra/info.json
index 7dd1aae6844..47cef95a049 100644
--- a/map-generator/assets/maps/brahmaputra/info.json
+++ b/map-generator/assets/maps/brahmaputra/info.json
@@ -3,7 +3,7 @@
"id": "Brahmaputra",
"name": "Brahmaputra",
"translation_key": "map.brahmaputra",
- "categories": ["asia", "new"],
+ "categories": ["asia"],
"location": { "lat": 26.5, "lon": 92.5 },
"author": "novc",
"description": "The Brahmaputra splits Assam in two. North bank against south bank, with Majuli and the sandbar islands in between. You can cross the river by boat almost anywhere, so the whole bank is the front line.",
diff --git a/map-generator/assets/maps/canada/info.json b/map-generator/assets/maps/canada/info.json
index 6834355ff7b..677cd3e852d 100644
--- a/map-generator/assets/maps/canada/info.json
+++ b/map-generator/assets/maps/canada/info.json
@@ -3,7 +3,7 @@
"id": "Canada",
"name": "Canada",
"translation_key": "map.canada",
- "categories": ["north_america", "new", "countries"],
+ "categories": ["north_america", "countries"],
"location": {
"lat": 60,
"lon": -95
diff --git a/map-generator/assets/maps/london/info.json b/map-generator/assets/maps/london/info.json
index a176f701ec2..a55787fbaa5 100644
--- a/map-generator/assets/maps/london/info.json
+++ b/map-generator/assets/maps/london/info.json
@@ -6,7 +6,7 @@
"location": { "lat": 51.3, "lon": 0 },
"author": "Tristar",
"description": "A map of the Greater London area. Founded by the Romans in AD 43 as a settlement named Londinium, London is the capital city of England and the United Kingdom, and its largest metropolis. It is also the country's economic, transportation, and cultural center with a history spanning nearly 2,000 years.",
- "categories": ["new", "europe"],
+ "categories": ["europe"],
"nations": [
{
"coordinates": [1396, 1285],
diff --git a/map-generator/assets/maps/mexico/info.json b/map-generator/assets/maps/mexico/info.json
index 9637f4f18ae..4fe3f36b8f2 100644
--- a/map-generator/assets/maps/mexico/info.json
+++ b/map-generator/assets/maps/mexico/info.json
@@ -3,7 +3,7 @@
"id": "Mexico",
"name": "Mexico",
"translation_key": "map.mexico",
- "categories": ["north_america", "new", "countries"],
+ "categories": ["north_america", "countries"],
"location": { "lat": 23, "lon": -102 },
"author": "crunchybbb",
"description": "A country located in the southern part of North America, sandwiched between the Pacific and the Gulf of Mexico. The country is primarily mountainous, with hot deserts in the north and wet jungles in the south.",
diff --git a/map-generator/assets/maps/ottomanempire/info.json b/map-generator/assets/maps/ottomanempire/info.json
index d14a53fed16..765d2ea3b15 100644
--- a/map-generator/assets/maps/ottomanempire/info.json
+++ b/map-generator/assets/maps/ottomanempire/info.json
@@ -3,7 +3,7 @@
"id": "OttomanEmpire",
"name": "Ottoman Empire",
"translation_key": "map.ottomanempire",
- "categories": ["europe", "asia", "africa", "countries", "new"],
+ "categories": ["europe", "asia", "africa", "countries"],
"location": { "lat": 39, "lon": 29 },
"nations": [
{
diff --git a/map-generator/assets/maps/paris/info.json b/map-generator/assets/maps/paris/info.json
index 914fa7b0b43..58641575158 100644
--- a/map-generator/assets/maps/paris/info.json
+++ b/map-generator/assets/maps/paris/info.json
@@ -3,7 +3,7 @@
"id": "Paris",
"name": "Paris",
"translation_key": "map.paris",
- "categories": ["europe", "new"],
+ "categories": ["europe"],
"nations": [
{
"coordinates": [1702, 321],
diff --git a/map-generator/assets/maps/turkiye/info.json b/map-generator/assets/maps/turkiye/info.json
index 550e653ee4c..6156d497440 100644
--- a/map-generator/assets/maps/turkiye/info.json
+++ b/map-generator/assets/maps/turkiye/info.json
@@ -5,7 +5,7 @@
"display_name": "Türkiye",
"translation_key": "map.turkiye",
"location": { "lat": 39, "lon": 35 },
- "categories": ["countries", "europe", "asia", "new"],
+ "categories": ["countries", "europe", "asia"],
"nations": [
{
"coordinates": [439, 212],
diff --git a/map-generator/assets/maps/world10000/info.json b/map-generator/assets/maps/world10000/info.json
index 6654d285b76..7a92bd83074 100755
--- a/map-generator/assets/maps/world10000/info.json
+++ b/map-generator/assets/maps/world10000/info.json
@@ -5,7 +5,7 @@
"translation_key": "map.world10000",
"author": "Patrick Plays Badly",
"description": "Oh my gosh, what have they done?!? Why, why would they have done it?? Shirley you don't just listen when people ask for a stupid huge map? And I can't play it on mobile? - A lot, of love, thats right, you got it, and don't call me Shirley.",
- "categories": ["new", "world"],
+ "categories": ["world"],
"nations": [
{
"coordinates": [6518, 1576],
diff --git a/map-generator/assets/maps/world4000/info.json b/map-generator/assets/maps/world4000/info.json
index 5224517376e..6761eed774e 100755
--- a/map-generator/assets/maps/world4000/info.json
+++ b/map-generator/assets/maps/world4000/info.json
@@ -3,7 +3,7 @@
"id": "World4000",
"name": "World 4000",
"translation_key": "map.world4000",
- "categories": ["new", "featured", "world"],
+ "categories": ["featured", "world"],
"author": "evanpelle",
"description": "Rebuild by Patrick Plays Badly. This is an overhaul of Giant World. Did you know Giant World was originally a test map? It was too laggy for public play. When first released some major water ways were still missing. Oops!",
"forced_modifiers": ["isCrowded:50"],
diff --git a/map-generator/assets/maps/zealandia/info.json b/map-generator/assets/maps/zealandia/info.json
index a56b5530b7a..61f33626a17 100644
--- a/map-generator/assets/maps/zealandia/info.json
+++ b/map-generator/assets/maps/zealandia/info.json
@@ -4,7 +4,7 @@
"name": "Zealandia",
"translation_key": "map.zealandia",
"location": { "lat": -28, "lon": 161 },
- "categories": ["oceania", "new", "fictional"],
+ "categories": ["oceania", "fictional"],
"nations": [
{
"coordinates": [378, 1075],
diff --git a/packages/engine-api/src/game/Maps.gen.ts b/packages/engine-api/src/game/Maps.gen.ts
index 2aae443b323..494354d5233 100644
--- a/packages/engine-api/src/game/Maps.gen.ts
+++ b/packages/engine-api/src/game/Maps.gen.ts
@@ -516,7 +516,7 @@ export const maps: readonly MapInfo[] = [
id: "Brahmaputra",
type: GameMapType.Brahmaputra,
translationKey: "map.brahmaputra",
- categories: ["asia", "new"],
+ categories: ["asia"],
defaultNationCount: 37,
specialTeamCount: 2,
themes: ["asia"],
@@ -568,7 +568,7 @@ export const maps: readonly MapInfo[] = [
id: "Canada",
type: GameMapType.Canada,
translationKey: "map.canada",
- categories: ["north_america", "new", "countries"],
+ categories: ["north_america", "countries"],
defaultNationCount: 38,
themes: ["north_america"],
customTribes: [
@@ -1684,7 +1684,7 @@ export const maps: readonly MapInfo[] = [
id: "London",
type: GameMapType.London,
translationKey: "map.london",
- categories: ["new", "europe"],
+ categories: ["europe"],
defaultNationCount: 32,
themes: ["europe"],
author: "Tristar",
@@ -1917,7 +1917,7 @@ export const maps: readonly MapInfo[] = [
id: "Mexico",
type: GameMapType.Mexico,
translationKey: "map.mexico",
- categories: ["north_america", "new", "countries"],
+ categories: ["north_america", "countries"],
defaultNationCount: 32,
themes: ["north_america"],
author: "crunchybbb",
@@ -2066,7 +2066,7 @@ export const maps: readonly MapInfo[] = [
id: "OttomanEmpire",
type: GameMapType.OttomanEmpire,
translationKey: "map.ottomanempire",
- categories: ["europe", "asia", "africa", "countries", "new"],
+ categories: ["europe", "asia", "africa", "countries"],
defaultNationCount: 46,
themes: ["europe", "asia", "africa"],
location: { lat: 39, lon: 29 },
@@ -2083,7 +2083,7 @@ export const maps: readonly MapInfo[] = [
id: "Paris",
type: GameMapType.Paris,
translationKey: "map.paris",
- categories: ["europe", "new"],
+ categories: ["europe"],
defaultNationCount: 60,
themes: ["europe"],
customTribes: [
@@ -2449,7 +2449,7 @@ export const maps: readonly MapInfo[] = [
id: "Turkiye",
type: GameMapType.Turkiye,
translationKey: "map.turkiye",
- categories: ["countries", "europe", "asia", "new"],
+ categories: ["countries", "europe", "asia"],
defaultNationCount: 30,
themes: ["europe", "asia"],
location: { lat: 39, lon: 35 },
@@ -2658,7 +2658,7 @@ export const maps: readonly MapInfo[] = [
id: "World10000",
type: GameMapType.World10000,
translationKey: "map.world10000",
- categories: ["new", "world"],
+ categories: ["world"],
defaultNationCount: 377,
layers: [
{ id: "w10kland", placement: "land", nukeable: true },
@@ -2671,7 +2671,7 @@ export const maps: readonly MapInfo[] = [
id: "World4000",
type: GameMapType.World4000,
translationKey: "map.world4000",
- categories: ["new", "featured", "world"],
+ categories: ["featured", "world"],
defaultNationCount: 111,
featuredRank: 1,
forcedModifiers: ["isCrowded:50"],
@@ -2727,7 +2727,7 @@ export const maps: readonly MapInfo[] = [
id: "Zealandia",
type: GameMapType.Zealandia,
translationKey: "map.zealandia",
- categories: ["oceania", "new", "fictional"],
+ categories: ["oceania", "fictional"],
defaultNationCount: 27,
themes: ["under_ocean", "oceania"],
location: { lat: -28, lon: 161 },
diff --git a/resources/maps/brahmaputra/manifest.json b/resources/maps/brahmaputra/manifest.json
index 928900a58a6..d07e04d67d5 100644
--- a/resources/maps/brahmaputra/manifest.json
+++ b/resources/maps/brahmaputra/manifest.json
@@ -151,7 +151,7 @@
"name": "Jakar"
}
],
- "categories": ["asia", "new"],
+ "categories": ["asia"],
"id": "Brahmaputra",
"map": {
"height": 1024,
diff --git a/resources/maps/canada/manifest.json b/resources/maps/canada/manifest.json
index 29ae8ecd0bd..9f8f33d93e9 100644
--- a/resources/maps/canada/manifest.json
+++ b/resources/maps/canada/manifest.json
@@ -1,5 +1,5 @@
{
- "categories": ["north_america", "new", "countries"],
+ "categories": ["north_america", "countries"],
"custom_tribes": [
{
"coordinates": [2538, 2415],
diff --git a/resources/maps/london/manifest.json b/resources/maps/london/manifest.json
index f80983f4923..4f7582c963f 100644
--- a/resources/maps/london/manifest.json
+++ b/resources/maps/london/manifest.json
@@ -151,7 +151,7 @@
"name": "Bloomsbury"
}
],
- "categories": ["new", "europe"],
+ "categories": ["europe"],
"id": "London",
"map": {
"height": 1700,
diff --git a/resources/maps/mexico/manifest.json b/resources/maps/mexico/manifest.json
index d72d37f9d38..3a5be207dfe 100644
--- a/resources/maps/mexico/manifest.json
+++ b/resources/maps/mexico/manifest.json
@@ -1,5 +1,5 @@
{
- "categories": ["north_america", "new", "countries"],
+ "categories": ["north_america", "countries"],
"id": "Mexico",
"map": {
"height": 2100,
diff --git a/resources/maps/ottomanempire/manifest.json b/resources/maps/ottomanempire/manifest.json
index f9685a8f345..e815d00734c 100644
--- a/resources/maps/ottomanempire/manifest.json
+++ b/resources/maps/ottomanempire/manifest.json
@@ -1,5 +1,5 @@
{
- "categories": ["europe", "asia", "africa", "countries", "new"],
+ "categories": ["europe", "asia", "africa", "countries"],
"id": "OttomanEmpire",
"map": {
"height": 2132,
diff --git a/resources/maps/paris/manifest.json b/resources/maps/paris/manifest.json
index de4ec7efc64..fa089b12c14 100644
--- a/resources/maps/paris/manifest.json
+++ b/resources/maps/paris/manifest.json
@@ -1,5 +1,5 @@
{
- "categories": ["europe", "new"],
+ "categories": ["europe"],
"custom_tribes": [
"Bonne-Nouvelle",
"Croulebarbe",
diff --git a/resources/maps/turkiye/manifest.json b/resources/maps/turkiye/manifest.json
index 42ce1481504..92404299030 100644
--- a/resources/maps/turkiye/manifest.json
+++ b/resources/maps/turkiye/manifest.json
@@ -1,5 +1,5 @@
{
- "categories": ["countries", "europe", "asia", "new"],
+ "categories": ["countries", "europe", "asia"],
"display_name": "Türkiye",
"id": "Turkiye",
"map": {
diff --git a/resources/maps/world10000/manifest.json b/resources/maps/world10000/manifest.json
index 9b7392f913f..3e6a218e9bd 100644
--- a/resources/maps/world10000/manifest.json
+++ b/resources/maps/world10000/manifest.json
@@ -21,7 +21,7 @@
"name": "Nikola123"
}
],
- "categories": ["new", "world"],
+ "categories": ["world"],
"id": "World10000",
"layers": [
{
diff --git a/resources/maps/world4000/manifest.json b/resources/maps/world4000/manifest.json
index 498ee6e20af..6617263c80f 100644
--- a/resources/maps/world4000/manifest.json
+++ b/resources/maps/world4000/manifest.json
@@ -1,5 +1,5 @@
{
- "categories": ["new", "featured", "world"],
+ "categories": ["featured", "world"],
"featured_rank": 1,
"forced_modifiers": ["isCrowded:50"],
"id": "World4000",
diff --git a/resources/maps/zealandia/manifest.json b/resources/maps/zealandia/manifest.json
index c5883ef5ee8..db9d5b443be 100644
--- a/resources/maps/zealandia/manifest.json
+++ b/resources/maps/zealandia/manifest.json
@@ -1,5 +1,5 @@
{
- "categories": ["oceania", "new", "fictional"],
+ "categories": ["oceania", "fictional"],
"id": "Zealandia",
"map": {
"height": 1888,