Repository navigation
app: preserve model selections when reconnecting a provider - #1194
Closed
monsterlag wants to merge 1 commit into
Closed
monsterlag wants to merge 1 commit into
monsterlag wants to merge 1 commit into
Conversation
Owner
|
Thank you, @monsterlag. This is on main now, exactly as you wrote it (8efd759). Refreshing a provider's models now keeps the ones a user turned off and only turns on models the endpoint never listed before, and setup records the full list it fetched so the first refresh knows what is new. Your test covers both paths. It ships in the next release.
|
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.
Note
AI-generated, not reviewed by a human. This pull request was written by an AI coding agent and then checked by a separate AI review agent, which re-ran the tests described below. No human has reviewed the code. It is submitted by @monsterlag, who runs these agents. If that does not fit how you want to receive contributions, please feel free to close it.
What this changes
Addresses the Connect/Edit models selection-reset part of #884, not the other reports in that issue. Add and connect now saves the fetched catalogue; Connect/Refresh preserves narrowed selections and deselect-all when that catalogue is known, handles legacy selections conservatively, and still enables genuinely new models and removes unavailable IDs.
Receipt
app/:npm ci --ignore-scriptsandnpm --prefix mobile ci --ignore-scriptssucceeded without lockfile changes.node node_modules/jiti/lib/jiti-cli.mjs src/components/settings/provider-selection.test.ts: before the fix, 5 passed / 4 failed / 0 skipped; after, 9 passed / 0 failed / 0 skipped. Exercises the actual hook and setup persistence with in-memory React/IPC seams.node node_modules/jiti/lib/jiti-cli.mjs src/lib/provider-setup-save.test.ts: passed; persistence waiting/rejection assertions completed.node node_modules/jiti/lib/jiti-cli.mjs src/lib/provider-discovery.test.ts: 7 checks passed.LD_PRELOAD="$TEST_SHELL_ENV" "$TEST_SUBREAPER" npm test: 837/837 test files passed, 0 failed; package-manager, private-data and coverage guards passed. This container has no/bin/zshand PID 1 does not reap orphan descendants. External environment tooling supplies zsh through PRoot only to the two shell-dependent test processes and reaps descendants; no project assertions, timeouts or runner code were changed. The initial plain run was 834/837, with those three environment failures. Tracing the entire suite resolved them but exceeded one unrelated test's timeout (836/837); the targeted environment setup above passed the complete suite. Counts are file-level; platform-dependent branches inside files are not separately counted by this runner.npm run typecheck: passed, exit 0.npm run verify:mobile: lock validation, security regression, typecheck and lint all passed, exit 0.git diff --checkandgit diff HEAD^ HEAD --check: passed.npm audit --jsonexits 1 with one high-severity Vite finding in the unchanged desktop lockfile. Dependency upgrades are outside this fix; the mobile install reports no vulnerabilities.Checklist
"draft": false, a resumed prompt equals a fresh one, and concurrent equals solo. (n/a: no inference changes.)SUMMARYline is in the receipt. (n/a: no kernel changes.)