Skip to content

Choosing Nord, Solarized Light or High Contrast crashes the app on every launch #781

Closed

Description

@EVWorth

What happens

Pick Nord, Solarized Light, High Contrast, or any imported theme in View → Appearance. The whole window is replaced by "Something went wrong" (Element type is invalid … FeatureButtons).

The choice is saved to localStorage, so every later launch crashes too. "Reload Application" doesn't help. The only way back in is clearing the app's site data. This is in 1.3.0, and in every release since #680.

Found in the UX review on the mock backend (?mock, then View → Appearance → Nord).

Cause

src/components/layout/FeatureButtons.tsx:

const themeIcons: Record<ThemeMode, typeof Sun> = { dark: Moon, light: Sun, system: Monitor };
...
const ThemeIcon = themeIcons[theme];   // theme is any theme id, e.g. "nord"

ThemeMode is string, and theme can be any theme id, but the lookup only knows the three ids the title-bar button cycles through. For any other id, ThemeIcon is undefined, and <ThemeIcon /> throws. themeLabels[theme] is also undefined there, so the tooltip and the screen-reader announcement read "Theme: undefined".

The existing tests mock the theme store with only dark/light/system, which is why this was never caught.

Fix

Fall back to an icon for the theme's base (effectiveTheme light → Sun, otherwise Moon). Label it with the theme's own name, from the built-in list or the user's custom themes. Add tests that render the buttons with every built-in theme and with an imported theme id.

Worth a patch release: 1.3.0 users who pick one of these themes are stuck.

Activity

  1. added
    bug
    on Oct 21, 2026
  2. added 2 commits that reference this issue on Oct 21, 2026
    54cc131
    0f2e969
  3. added a commit that references this issue on Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions