diff --git a/client/public/version.js b/client/public/version.js index 7e96c6c..cc91bca 100644 --- a/client/public/version.js +++ b/client/public/version.js @@ -1,5 +1,5 @@ // Maintainer-controlled web client version. // Format: YYYY.MM.DD Rn (example: 2026.02.20 R2) -window.CHGRID_WEB_VERSION = "2026.02.22 R169"; +window.CHGRID_WEB_VERSION = "2026.02.22 R170"; // Optional display timezone for timestamps. Falls back to America/Detroit if unset/invalid. window.CHGRID_TIME_ZONE = "America/Detroit"; diff --git a/client/src/main.ts b/client/src/main.ts index 85105ff..d1f87d2 100644 --- a/client/src/main.ts +++ b/client/src/main.ts @@ -2201,9 +2201,17 @@ updateStatus('Welcome to the Chat Grid. Press the Settings button to configure y try { if (sessionStorage.getItem(AUTO_RECONNECT_AFTER_RELOAD_KEY) === '1') { sessionStorage.removeItem(AUTO_RECONNECT_AFTER_RELOAD_KEY); - if (storedNickname) { - void connect(); - } + window.setTimeout(() => { + const effectiveNickname = sanitizeName(dom.preconnectNickname.value || storedNickname); + if (effectiveNickname) { + dom.preconnectNickname.value = effectiveNickname; + state.player.nickname = effectiveNickname; + updateConnectAvailability(); + void connect(); + return; + } + updateConnectAvailability(); + }, 250); } } catch { // Ignore sessionStorage failures.