Repository navigation
Keep newly set-up local models on the Agents panel index - #20167
Merged
Merged
Conversation
Contributor
[Medium impact] The PR appears safe to merge; the previous model-removal issue is fixed. SummaryKeeps newly added local models on the Agents index while setup moves into the background.
Reviews (2) · Last reviewed commit: "Recheck removedLocalModels inside deferr..." · Reviewed by Greptile |
cursor Bot
pushed a commit
to mark-groves/omarchy
that referenced
this pull request
Nov 25, 2026
* Keep newly set-up local models on the Agents panel index * Recheck removedLocalModels inside deferred removal callback
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.
Summary
Fixes a race where a local model set up from the Agents add screen finished installing and running, disappeared from the Add screen's progress bar, and never appeared on the Agents index.
Root cause
When
omarchy-models use --detachexited (exitCode === 0),Models.qml'sfinishSetup(0)clearedsettingUpsynchronously whilelocalModelFile.reload()(status.json) was still in flight asynchronously. In that window,Panel.qml'sremovedLocalModelsbinding saw!localModels[target], an emptysetupRows(), andrecipe.installed === falseinlist.json—mistaking the newly started setup for an uninstalled model and wipingusage.addedLocalModelsin memory (also emitting aBinding loop detected for property "removedLocalModels"warning).Changes
Models.qml(handingOff) untilparseLocalModelreloadsstatus.jsonwith them.settingUpLocalandhandingOffinPanel.qml'sfindRemovedLocalModels()so setups handing off to the background unit are never dropped fromaddedLocalModels.usage.removeLocalModels(...)andsettingUpLocal = ""viaQt.callLater(...)to eliminate both theremovedLocalModelsandlocalSetupQML binding loop warnings.Verification
bash test/shell.d/local-models-test.shbash test/shell.d/agents-panel-test.sh