Repository navigation
fix(server): Starter cannot swap, Portuguese coming later, Tell me in language state (B-05, B-06, B-33) - #138
Merged
Merged
Conversation
… language state (B-05, B-06, B-33) - add-language on Starter: a language removed in the last 30 days and not purged still holds its slot, so adding a different one returns upgrade_needed; adding the removed one back restores it. Re-checked after the conditional update, so a parallel remove cannot open a swap. - Register lists Portuguese (pt) with enabled false and no features; LANGUAGES_ENABLED never switches it on; add-language refuses it. - get-language-state returns interests (the learner's Tell me languages). - Test for what pause-languages does with keep, spare room and removed ones. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
🎉 This PR is included in version 1.3.0-dev.29 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
github-actions Bot
pushed a commit
that referenced
this pull request
Oct 16, 2026
# [1.3.0-dev.32](v1.3.0-dev.31...v1.3.0-dev.32) (2026-10-16) ### Bug Fixes * **frontend:** Starter learners who removed their language can restore it from first run (D-07, D-20, D-25) ([720d7de](720d7de)), closes [#138](#138)
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.
Fixes four server problems found by the end-to-end run of multilingual round 1.
What changed
add-languagenow counts languages removed in the last 30 days that are not purged yet. So after removing German, adding Spanish returnsupgrade_needed, and adding German back restores it with its data. The race-safe conditional update stays; after it, the server counts once more and undoes the claim if a parallelremove-languageopened a gap. Paid plans keep today's behaviour.pt("Portuguese", "Português") is in the register withenabled: falseand every feature false, so clients can show it under "Coming later" with Tell me.LANGUAGES_ENABLEDnever switches it on.add-languagerefuses it withnot_available.get-language-statenow returnsinterests: LangCode[], the languages the learner asked to be told about.keepfirst in order, then the active language, then other active and paused ones oldest first, up to the limit; the rest paused; removed ones untouched.The contract (
docs/tech/multilingual-api.md, docs repo) is updated to match.Tested:
yarn testinserver/(75 suites, 1848 tests pass, in-memory MongoDB),tsc --noEmitclean.🤖 Generated with Claude Code