You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Mobile Custom Vocabulary: words you type disappear with no error when adding them fails #22353
Involves data loss, failed capture, or broken sync/trust
When adding words on the mobile Custom Vocabulary page fails, the words you typed are wiped from the field and no error is shown. They were never saved, so you have to notice that no chips appeared and type them again.
Describe the bug
_addWord clears the text field before it calls UserProvider.addVocabularyWords, and does nothing when that returns false. The provider returns false without saving when the request fails (no response while offline, a non-200, a status other than ok, or an exception) and while another vocabulary update is still running. In each case the typed words are gone and the page says nothing.
To Reproduce
Open Settings → Profile → Custom Vocabulary.
Turn on airplane mode.
Type Yirgacheffe, Anthropic, Mixtral and tap +.
Current behavior
The field empties as soon as you tap +, the spinner shows while the request fails, and then no chips appear and no error is shown. The words were not saved and have to be typed again.
Expected behavior
The field clears only once the words are saved. If the save fails, the typed words stay in the field and an error says they couldn't be saved, so tapping + again retries.
Evidence (upstream main at b343f3303ab296e7aaf9d0e332692688d8c67058)
The field's submit stays active while removals are saving (only + is disabled then): #L39, #L115, #L131
updateTranscriptionVocabulary returns false while another update runs and when the save fails, and leaves the list unchanged; addVocabularyWords passes that on: app/lib/providers/user_provider.dart#L318-L348
The e2e flow calls the clear an optimistic update (app/e2e/flows/custom-vocabulary.yaml#L61), but nothing rolls it back on failure. #22308 is a separate provider bug on the same screen (an add can replace the saved list when it failed to load); its fix makes addVocabularyWords return false in that case too, which this page would also swallow.
Activity