Repository navigation
Fix Preferences dialog blocking on AI update check - #21501
Merged
Merged
Conversation
1 task done
Member
|
Needs a release note entry, TIA. |
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.
Closes #21498
dt_ai_models_check_updatesran synchronously on the GTK main thread when the AI preferences panel opened. Two HTTP calls to GitHub (release listing +versions.jsonfetch) with a combined 45s timeout worst case – when the network was slow or unreachable, the whole Preferences dialog froze until the calls timed out.Fix:
_check_updates_worker, network + JSON parse only, no registry access) and a main-thread idle callback (_apply_updates_idle, does the registry mutation and raisesDT_SIGNAL_AI_MODELS_CHANGED). Preferences opens instantly; the model list auto-refreshes 1–5s later when the worker completesDT_SIGNAL_AI_MODELS_CHANGEDso it re-populates when the async check finishesCONNECTTIMEOUT=5s. Caps worst-case background work at ~10s on total network failure