Don't push history when we've gotten here via popstate

This commit is contained in:
Jack Kingsman
2026-05-13 17:05:59 -07:00
parent 76f3a59d83
commit ecdcbd85d4
+3 -1
View File
@@ -89,7 +89,9 @@ export function useAppShell(): UseAppShellResult {
const handlePopstate = () => {
const section = parseHashSettingsSection();
if (section !== null) {
pushedSettingsEntryRef.current = true;
// Don't set pushedSettingsEntryRef here — the user arrived via
// back/forward, not by opening settings. Closing settings should
// replaceState, not history.back(), to avoid popping an unrelated entry.
startTransition(() => {
setShowSettings(true);
setSettingsSection(section);