fix(insights): keep the stored model when opening settings (#366)

* fix(insights): keep the stored model when opening settings

The editable model combo resets its text on its own during
instantiation (initial model assignment, derived provider notification,
and a deferred first polish), and the live write-back mistook those
resets for user edits, wiping cfg_aiInsightsModel on page open. Saving
then persisted the empty value, so the popup asked for reconfiguration
even when nothing was changed.

Only a focused edit now writes back; an unfocused change restores the
setting instead of adopting the reset. A mouse selection commits through
onActivated, which fires only for user interaction. The provider handler
leaves an already empty list alone and preserves the model across a real
clear, like the endpoint and reply handlers. The stored model also seeds
the picker menu, so it is never empty on open; a connection test still
replaces it with the live list.

Regression coverage instantiates the production handlers with KCM-style
creation properties and a real editable combo.

* test(insights): cover the popup model pick and drop covered assertions

A mouse pick from the model popup is now exercised through a real
editable combo: the popup click never focuses the combo, so the
unfocused guard restores the text first and the activation handler must
still commit the pick. Removing the handler turns the test red.

The static fragments for the focus guard, the write-back, and the
activation handler are removed: the copied handlers already fail the
QtTests when that behavior breaks. The activation handler follows the
existing optional-handler pattern so behavior decides the result.

Also simplify the activation guard, describe when the seeded picker
entry is replaced, state the changelog entry as the observable result,
and list the third settings harness in the development guide.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
73724e2099Simone committed on 9/24/2026, 4:40:56 PM· committed by GitHubparent5dbd069
4 files changedLine totals unavailable