From d1f5d0e2fd87cc37f83b0a220e6fb72cc774a03b Mon Sep 17 00:00:00 2001 From: Scott Idem Date: Fri, 22 May 2026 19:05:16 -0400 Subject: [PATCH] fix(launcher): clear ae_loc in cache cleanup; align tech help Clear & Reload MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit menu_launcher_controls: handle_cache_cleanup now removes both ae_events_loc and ae_loc from localStorage, giving a true clean slate on reload. e_app_help_tech: Clear & Reload button no longer silently re-saves ae_loc after clearing — if edit mode wipes localStorage, ae_loc goes with it. Updated confirm message and title tooltip to say "you will be signed out" instead of the previous misleading "sign-in will be preserved." Co-Authored-By: Claude Sonnet 4.6 --- src/lib/app_components/e_app_help_tech.svelte | 7 ++----- .../[event_id]/(launcher)/menu_launcher_controls.svelte | 1 + 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/lib/app_components/e_app_help_tech.svelte b/src/lib/app_components/e_app_help_tech.svelte index 479da6d6..b90f9192 100644 --- a/src/lib/app_components/e_app_help_tech.svelte +++ b/src/lib/app_components/e_app_help_tech.svelte @@ -459,7 +459,7 @@ class:to-90%={$ae_sess.show_help_tech} --> onclick={async () => { const edit_mode = $ae_loc.edit_mode; const confirm_msg = edit_mode - ? 'Clear all IDB caches, localStorage, and sessionStorage? Your sign-in will be preserved. This will reload the page.' + ? 'Clear all IDB caches, localStorage, and sessionStorage? This will reload the page and sign you out.' : 'Clear all IDB caches? This will reload the page.'; if (!confirm(confirm_msg)) return; @@ -472,11 +472,8 @@ class:to-90%={$ae_sess.show_help_tech} --> } if (edit_mode) { - // Preserve ae_loc (sign-in credentials + permissions) across the wipe. - const ae_loc_saved = localStorage.getItem('ae_loc'); localStorage.clear(); sessionStorage.clear(); - if (ae_loc_saved) localStorage.setItem('ae_loc', ae_loc_saved); } window.location.reload(); @@ -489,7 +486,7 @@ class:to-90%={$ae_sess.show_help_tech} --> transition-all {btn_class} " - title="Clear & Reload: Delete all IDB caches and reload. In edit mode also clears localStorage/sessionStorage, preserving your sign-in."> + title="Clear & Reload: Delete all IDB caches and reload. In edit mode also clears localStorage/sessionStorage — you will be signed out."> Clear & Reload diff --git a/src/routes/events/[event_id]/(launcher)/menu_launcher_controls.svelte b/src/routes/events/[event_id]/(launcher)/menu_launcher_controls.svelte index adbcfdfe..7d872be0 100644 --- a/src/routes/events/[event_id]/(launcher)/menu_launcher_controls.svelte +++ b/src/routes/events/[event_id]/(launcher)/menu_launcher_controls.svelte @@ -85,6 +85,7 @@ async function handle_cache_cleanup() { cache_status = 'Clearing...'; try { localStorage.removeItem('ae_events_loc'); + localStorage.removeItem('ae_loc'); indexedDB.deleteDatabase('ae_events_db'); cache_status = 'Done — reloading...'; setTimeout(() => window.location.reload(), 800);