Fix onboarding language copy and configuration recovery - #343
Merged
Merged
Conversation
- Preserve config store defaults without marking config loaded on fetch or JSON errors - Keep `/api/config` eligible for a later retry after temporary network or parsing failures - Add tests covering recovery of registration and billing flags on subsequent loads - Document retry behavior in platform instructions and changelog
- Replace deprecated Starlette 422 alias with `HTTP_422_UNPROCESSABLE_CONTENT` in blocked email-domain registration - Expunge deleted flashcard instances before promotion to avoid SQLAlchemy identity-map collisions when SQLite reuses IDs - Document the registration status constant and flashcard test fix in the changelog
- Replace hardcoded target-language text in onboarding goals with a localized language name placeholder - Resolve the display name from target-language codes and fall back to the default language for unrecognized codes - Add tests covering localized subtitles, language-level naming, and safe fallback behavior during loading and failures - Update translated subtitle strings in all supported message catalogs - Document the subtitle language-display behavior in the target-language spec - Note the onboarding subtitle localization change in the changelog
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #338. Thanks to @Chevron7Locked for identifying the hardcoded English question and contributing the original fix and regression-test approach.
Onboarding language copy
en-GBdefault as a display fallback for unrecognized query values, including while language loading is pending or fails. The selected code and backend validation remain authoritative for saving.NextIntlClientProvider, message catalogs, language selector, and language store. Cover all ten UI locales, all supported target languages across the cases, both English variants, invalid/empty query values, delayed loading, and HTTP/network failures.Other commits already present on this branch
The branch includes two earlier commits that are not yet in
develop:92dac8d7: allow configuration loading to retry after network or JSON parsing failures; add recovery tests for registration and billing configuration.2a006b7c: use the current HTTP 422 constant for blocked email-domain registration, and detach deleted flashcard test instances to avoid SQLite ID-reuse identity-map collisions.Documentation
UnreleasedinCHANGELOG.md.specs/platform.instructions.md.specs/target-language.instructions.md.Validation
Local pre-push completed on this branch:
./scripts/format.sh— passed; no additional formatting changes.pytest -v— 1,417 passed; 85.86% coverage (70% required).npm run lint— passed.npx tsc --noEmit— passed.npm run test:run— 611 passed across 60 files, including the 24 onboarding regression cases.Backend tests emitted 136 SlowAPI deprecation warnings, with no failures.
Review notes
The onboarding implementation was reviewed against its parent commit; no newly introduced regressions were identified. The existing ability to advance while language loading is unavailable remains: the subtitle fallback protects display, while an invalid selected code is still rejected by the backend. Browser-level visual behavior and the complete onboarding save flow are not covered by the new subtitle tests.