feat(sys-bar): full reset button for anonymous users in panel header

Anonymous users (potentially stuck on stale JS) now see a Full Reset
button in the panel header instead of Clear IDB — matching the same
compact icon+reveal-label pattern as the authenticated Clear IDB button,
but error-styled and wired to handle_clear_storage_and_idb.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Scott Idem
2026-06-24 13:04:53 -04:00
parent ad8eef0cec
commit 5bf9a72fcd

View File

@@ -320,6 +320,7 @@ function apply_theme(value: string) {
{/if}
</div>
{#if $ae_loc?.access_type && $ae_loc?.access_type !== 'anonymous'}
<!-- Button to fully clear *only* the IDB tables. This is mostly to clear up orphan records, but sometimes the table itself needs a reset. -->
<!-- Clear IDB only — *preserves* localStorage/sessionStorage -->
<button
@@ -335,6 +336,21 @@ function apply_theme(value: string) {
>Clear IDB</span>
</button>
{:else}
<!-- Anonymous users get the full reset option — they may be stuck on stale JS -->
<button
type="button"
class="btn btn-sm preset-filled-error-100-900 hover:preset-filled-error group/menu transition-all duration-200"
onclick={handle_clear_storage_and_idb}
title="Full Reset: unregister service workers, clear SW Cache Storage, delete all IndexedDB databases, clear localStorage and sessionStorage, then reload.">
<Eraser size="1.1em" />
<span
class="btn-label max-w-0 opacity-0 transition-all duration-800 hover:duration-100 group-hover/menu:max-w-24 group-hover/menu:opacity-100"
>Full Reset</span>
</button>
{/if}
<button
type="button"
class="btn btn-icon btn-sm preset-filled-tertiary-200-800 hover:preset-filled-error ml-2 shrink-0 transition-all"