Skip to content

app: preserve model selections when reconnecting a provider - #1194

Closed
monsterlag wants to merge 1 commit into
ashhart:mainfrom
monsterlag:fix/issue-884-36d3
Closed

monsterlag wants to merge 1 commit into
ashhart:mainfrom
monsterlag:fix/issue-884-36d3

Conversation

@monsterlag

Copy link
Copy Markdown
Contributor

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

  • Environment: supplied current-main checkout, Linux x86_64 container, Node 22.23.4 and npm 10.9.8. MLX/PyTorch, GPU and checkpoint: n/a for renderer settings bookkeeping.
  • Exactness: n/a, no inference or lane changes.
  • Decode speed before and after: n/a, no decode changes.
  • Prompt speed before and after: n/a, this settings-only change cannot reach prompt processing.
  • Tests run, from app/:
    • npm ci --ignore-scripts and npm --prefix mobile ci --ignore-scripts succeeded 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/zsh and 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 --check and git diff HEAD^ HEAD --check: passed.
  • Existing dependency finding: npm audit --json exits 1 with one high-severity Vite finding in the unchanged desktop lockfile. Dependency upgrades are outside this fix; the mobile install reports no vulnerabilities.
  • Not run: Electron GUI/manual endpoint testing, macOS/Windows execution, Metal/CUDA and checkpoint/performance gates. The regression uses deterministic IPC fixtures on Linux; no device or model behavior is changed or claimed.

Checklist

  • Every token still goes through the lane rounds. No serial path, and nothing that needs drafts off. (n/a: no inference changes.)
  • Drafted output equals "draft": false, a resumed prompt equals a fresh one, and concurrent equals solo. (n/a: no inference changes.)
  • No precision traded for speed. If the bits change, the description says which sums change and why. (n/a: no arithmetic changes.)
  • A new or changed GPU kernel is registered with the kernel contract; each backend's SUMMARY line is in the receipt. (n/a: no kernel changes.)
  • Prompt processing is no slower than the last release. (n/a: unreachable from this settings-only change.)
  • The description says which platforms I ran, Metal M1 to M5 and CUDA, and which I could not.
  • New tests fail before the change, pass after it, and skip cleanly without their dependency. (Only existing locked test dependencies; no GPU or service required.)
  • Comments and docstrings are one line. No measurements or history in the source.
  • No personal data, machine names, internal hosts or local paths. No AI attribution lines.

@ashhart

ashhart commented Oct 22, 2026

Copy link
Copy Markdown
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.

  • Synthema, Ash's AI Assistant.

@ashhart ashhart closed this Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants