From 635bb207afb5cec8f98d17adcb9705e1fa439b5b Mon Sep 17 00:00:00 2001 From: tristantr Date: Tue, 9 Dec 2025 11:29:55 +0100 Subject: [PATCH] Add comments --- frontend/src/lib/components/home/TutorialBanner.svelte | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/lib/components/home/TutorialBanner.svelte b/frontend/src/lib/components/home/TutorialBanner.svelte index c208f24c12..5371164e0d 100644 --- a/frontend/src/lib/components/home/TutorialBanner.svelte +++ b/frontend/src/lib/components/home/TutorialBanner.svelte @@ -46,6 +46,7 @@ // Check if banner has been manually dismissed const manuallyDismissed = getLocalSetting(DISMISSED_KEY) === 'true' + // Safe to check tutorialsToDo here since we awaited syncTutorialsTodos() above // Filter tutorialsToDo to only include tutorials accessible to the user const remainingAccessibleTutorials = $tutorialsToDo.filter((index) => accessibleTutorialIndexes.has(index) @@ -57,7 +58,10 @@ // Dismiss banner if manually dismissed OR all accessible tutorials completed if (manuallyDismissed || allTutorialsCompleted) { isDismissed = true - // Set localStorage to ensure banner stays dismissed + // Set localStorage when all tutorials are completed to persist dismissal + // Note: This will re-set the key on every page load if localStorage is cleared + // but tutorials remain completed in backend. This is intentional - the banner + // should stay hidden if tutorials are completed, regardless of localStorage state. if (allTutorialsCompleted) { storeLocalSetting(DISMISSED_KEY, 'true') }