Skip to content

Invalid Playground Language State in localStorage #3645

@martin-henz

Description

@martin-henz

Issue

If a user's browser localStorage contains an invalid chapter/variant combination (e.g. chapter 1 + explicit-control, which only applies to chapter 4), the playground crashes on load with:

Error: Language config not found for chapter 1 variant explicit-control

This can happen when switching feature flags (e.g. the conductor flag) causes the playground to temporarily use a different language setting, which then gets persisted to localStorage.

Fix

When loading stored state in createStore.ts, validate that the stored chapter+variant combination exists in ALL_LANGUAGES. If not, fall back to the default language config.


Generated by Claude Code, version 2.1.72

Metadata

Metadata

Assignees

Labels

BugSomething isn't workingminorLess important than important, but more than nice-to-have

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions