Skip to content

Banner flashes briefly on page reload when previously dismissed #665

@RisingOrange

Description

@RisingOrange

Description

When a user dismisses a banner and then reloads the page, the banner briefly flashes visible before hiding itself. This affects both regular banners and campaign banners.

2026-02-21.20-53-24.mp4

Root cause

The dismissed state is stored in localStorage, but reading it happens too late:

  1. Server renders HTML with banner visible (no localStorage access on server)
  2. Browser receives HTML and paints it → banner is visible
  3. JS bundle loads and Svelte hydrates
  4. onMount fires → reads localStorage → hides banner

The flash occurs in steps 2–3, before any JS runs.

Steps to reproduce

  1. Visit the site
  2. Dismiss a banner
  3. Reload the page
  4. Observe the banner flashing briefly before disappearing

Fix

PR #663

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions