Skip to content

Fix onboarding language copy and configuration recovery - #343

Merged
artcc merged 3 commits into
developfrom
feature/issues-pr-338
Sep 23, 2026
Merged

artcc merged 3 commits into
developfrom
feature/issues-pr-338

Conversation

@artcc

@artcc artcc commented Sep 23, 2026

Copy link
Copy Markdown
Owner

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

  • Replace the hardcoded English learning-goals question in all ten UI catalogs with the selected language's localized name.
  • Resolve names through the target-language catalog and its ISO 639-1 entries, so the subtitle names the language rather than the regional selector label.
  • Present the language as a standalone label followed by the question, avoiding language-specific articles and inflections in the interpolated name.
  • Use the language of the canonical en-GB default 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.
  • Add 24 regression cases using the real 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

  • Record the fixes under Unreleased in CHANGELOG.md.
  • Document config retry behavior in specs/platform.instructions.md.
  • Document localized language labels and the display-only fallback in specs/target-language.instructions.md.

Validation

Local pre-push completed on this branch:

  • ./scripts/format.sh — passed; no additional formatting changes.
  • Backend pytest -v — 1,417 passed; 85.86% coverage (70% required).
  • Frontend npm run lint — passed.
  • Frontend npx tsc --noEmit — passed.
  • Frontend 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.

- 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
@artcc
artcc merged commit c092f3b into develop Sep 23, 2026
2 checks passed
@artcc
artcc deleted the feature/issues-pr-338 branch September 23, 2026 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant