Skip to content

macOS Custom Vocabulary: a change that fails to save still shows as saved, then disappears on the next load #22402

Closed

Description

@apoorvdarshan

Summary

In the macOS app, Settings > Transcription > Custom Vocabulary shows an add or remove right away: addVocabularyWord() and removeVocabularyWord() edit the list on screen, and saveVocabulary() writes it to the local copy (AssistantSettings.shared.transcriptionVocabulary) before the whole list is sent to PATCH /v1/users/transcription-preferences. That request runs in a detached Task in updateTranscriptionPreferences(...), and when it fails (offline, a server error, an expired session) the catch only calls logError.

So the pane and the local copy keep a list the account never stored, and nothing tells the user. The word looks saved, but live transcription never uses it, because a listen session loads the vocabulary from the account (listen_session_bootstrap reads get_user_transcription_preferences). The next time Settings loads the account's list, loadBackendSettings() writes it over the pane and the local copy, and the word is gone. A failed removal is the same the other way round: the word leaves the pane but stays on the account, and comes back on the next load.

Steps to reproduce

  1. Open Settings > Transcription on the Mac and let it load.
  2. Turn off the network (or make PATCH /v1/users/transcription-preferences fail).
  3. Add a word to Custom Vocabulary.

Expected: the app says the change was not saved, and the list shows what the account holds.

Actual: the word shows as added, with no error. Once the network is back, reopening Settings shows the list without it.

Code (current main)

  • desktop/macos/Desktop/Sources/MainWindow/Pages/Settings/Components/SettingsContentView+SettingsUpdates.swift: updateTranscriptionPreferences(singleLanguageMode:vocabulary:) (~lines 107-126); the catch only logs.
  • desktop/macos/Desktop/Sources/MainWindow/Pages/Settings/Sections/SettingsContentView+Transcription.swift: addVocabularyWord(), removeVocabularyWord() and saveVocabulary() (~lines 383-411) change the list and the local copy first.

Related: #22355 (a failed load makes the next edit wipe the list; #22356). The mobile app had the same save-failure problem in #22353.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions