Bug
When the user selects "All languages" from the language filter dropdown, the page reloads but reverts back to "English." Users cannot browse stories in all languages.
Root Cause
PR #270 changed the language fallback in src/app/page.tsx from "all" to "English":
const lang = rawLang && (LANGUAGES as readonly string[]).includes(rawLang) ? rawLang : "English";
The problem: when the user selects "All languages", the GenreLanguageFilter component sets lang to "all" in the URL params. But "all" is not in the LANGUAGES array, so the validation rejects it and falls back to "English".
Fix
In src/app/page.tsx, allow "all" as a valid lang value:
const lang = rawLang === "all" ? "all" : rawLang && (LANGUAGES as readonly string[]).includes(rawLang) ? rawLang : "English";
This preserves the default-to-English behavior (no lang param → English) while still allowing explicit ?lang=all to show all languages.
Files to modify
src/app/page.tsx — allow "all" as valid lang param
Acceptance criteria
Bug
When the user selects "All languages" from the language filter dropdown, the page reloads but reverts back to "English." Users cannot browse stories in all languages.
Root Cause
PR #270 changed the language fallback in
src/app/page.tsxfrom"all"to"English":The problem: when the user selects "All languages", the
GenreLanguageFiltercomponent setslangto"all"in the URL params. But"all"is not in theLANGUAGESarray, so the validation rejects it and falls back to"English".Fix
In
src/app/page.tsx, allow"all"as a valid lang value:This preserves the default-to-English behavior (no
langparam → English) while still allowing explicit?lang=allto show all languages.Files to modify
src/app/page.tsx— allow"all"as valid lang paramAcceptance criteria
langparam in URL → defaults to English (existing behavior)?lang=all→ shows all languagesnpm run typecheckpasses