fix(insights): clear the tested model list when the Ollama address changes (#357)

* fix(insights): clear the tested model list when the Ollama address changes

A finished Test connection left the previous server's models in the combo
box after the address was edited, so an untested address could present a
model it never listed as working. The endpoint handler retired a running
test and cleared the result text but kept availableModels, unlike the
provider switch which clears both. Clear the list too, matching the
documented "describes only the address it listed" behavior.

Regression: test_endpointChangeClearsTheFinishedResult now asserts the
model list is empty after the edit. Fails before (list keeps qwen3:4b),
passes after.

* test(insights): assert the typed model survives the Ollama address edit

The finished-result test now checks both halves of the observable result:
no stale completions (availableModels is empty) and the typed text kept
(modelCombo.editText unchanged). Fails if the endpoint handler clears the
combo text.

* fix(insights): keep the chosen model when the Ollama address changes

Clearing the listed models replaces the editable model combo's model,
which resets its edit text; the combo then writes the empty text back to
the model setting. After a successful connection test, editing the
Ollama address therefore erased the chosen model. Restore it after
clearing the list, as the model-list reply already does.

The settings harness now uses a real editable ComboBox, so the reset is
reproduced: the new regression test fails without the restore.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FH68FN52tUdZCcBqB4BGNk

---------

Co-authored-by: Claude <noreply@anthropic.com>
38895e087dSimone committed on 9/24/2026, 1:34:38 PM· committed by GitHubparent392cbda
3 files changedLine totals unavailable