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
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: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 inALL_LANGUAGES. If not, fall back to the default language config.Generated by Claude Code, version 2.1.72