Skip to content

Feature: put the models you use at the top of the picker - #58

Merged
DevMando merged 2 commits into
mainfrom
feature/model-picker-pinning
Sep 8, 2026
Merged

Feature: put the models you use at the top of the picker#58
DevMando merged 2 commits into
mainfrom
feature/model-picker-pinning

Conversation

@DevMando

@DevMando DevMando commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Summary

The Settings model picker now shows your current model instantly instead of after a network round-trip, and the models you actually use rise to the top of the list — pinned ones first, then the ones you most recently switched to.

Why this matters

Opening Settings felt laggy. The picker sat empty while two network calls ran (a connection probe, then a request for the installed model list), even though the model in use was already known from the saved configuration and needed no network at all.

Separately, anyone with a long list of installed models had to scroll past all of them every time, in a fixed alphabetical order, to reach the two or three they actually use.

What is new

  • The current model appears immediately. It is read from configuration on the first frame; the full installed-model list fills in behind it. This is the same approach the snapshot card already used.
  • Pinning. A pin on each row in the dropdown keeps a model at the top of the list. Pins are remembered across launches and apply to every agent, not just the one you are looking at.
  • Recently used models rank next. The five models you most recently switched to sit below the pinned ones.
  • Everything else stays alphabetical. Deliberately: an order that reshuffles whenever a model is pulled destroys the familiarity that makes a long list usable. Only the two short, meaningful groups move.

Two smaller corrections

  • A failed or empty model fetch no longer blanks the picker. It previously replaced the contents with an empty list, wiping a control that was showing the correct answer a moment earlier. It now keeps what it has and reports the problem.
  • A configured model the fetch does not return stays listed. A cloud model with nothing pulled locally does not come back in the installed-model list, but it is what the agent is actually running, so it belongs in the picker.

Also included: the preview pane's title icon is now a globe while the browser is showing, rather than the document icon it used for every kind of content.

Design notes for reviewers

Ranking by use, not by pull date. Ordering by how recently a model was installed was considered and rejected. It measures the wrong thing — a model tried once and abandoned would outrank the one running all day — it does not work for cloud models, which are never pulled locally and carry no useful date, and it would have required a change in the engine to carry that data through. Ranking by use is more accurate and needs no engine change, so this PR has no dependency on the engine repository.

Where the preference lives. Pins and recent use are stored with the other window-level preferences rather than in per-agent settings, because "these are my models" describes the person, not one agent. Both stored fields are optional, so existing preference files load unchanged.

Scope and risk

Low to medium, confined to the Settings model picker. No change to how models are selected, applied, or validated. The ordering logic is pure and covered by tests; the only untested part is the dropdown interaction itself.

Verification

  • 303 Desktop tests pass, including 8 new ones covering the ordering contract, case-insensitive matching, the recent-use cap, and skipping entries for models that are no longer installed.
  • Build clean with no warnings.

Needs a manual check: the pin button is handled so that clicking it does not also select that model and close the dropdown. That behaviour cannot be exercised by any test harness here, so it was verified by inspection only. Please confirm a pin click pins without changing the selected model. Pinning currently re-sorts the list immediately, so the row moves to the top as you click it; if that feels abrupt, deferring the re-sort until the dropdown is next opened is a small change.

Dependency

Stacked on #57. Merge that first, and this will retarget to the main branch automatically.

Changelog backfill (also in this PR)

An audit of the release notes against the merged pull requests found the browser and screenshot work undocumented. Four merged PRs had no entry at all: the agent-driven browser preview, screenshots handed to the model as image input, development server previews, and the screenshot-honesty work for windows that are not on screen. The existing "Shared browser tabs" entry was describing an addition to a capability the notes never mentioned existed.

Those entries are now written up, and the recorded engine safety pin has been corrected — it still read an older commit than the one the submodule actually points at.

Base automatically changed from fix/per-tab-model-restore to main September 7, 2026 23:50
@DevMando
DevMando force-pushed the feature/model-picker-pinning branch from bb2a7da to 005407b Compare September 7, 2026 23:53
Opening Settings sat on an empty model picker while two network round-trips ran
(a probe, then /api/tags), even though the configured model was already known
from config. It is now seeded from config on the first frame and the full list
fills in behind it, the way LoadSnapshotModelsAsync already does for the
snapshot card. A failed or empty fetch keeps the picker as it was rather than
assigning an empty list over a control that was showing the right answer, and a
configured model the fetch omits — a cloud model with nothing pulled locally —
stays listed, since it is what the agent is actually running.

ModelOrdering then arranges the list: pinned first, then recently used, then
everything else alphabetically. Recency of USE rather than of pull — a model
tried once and abandoned would otherwise outrank the one running all day, and
cloud models are never pulled locally so they carry no useful pull date. This
also avoids plumbing modified_at out of the engine's /api/tags parsing. The tail
stays alphabetical deliberately: an order that reshuffles whenever a model is
pulled destroys the muscle memory that makes a long dropdown usable.

Pins and recents live in panel-state.json beside the other window-level
preferences rather than in per-agent config, since "these are my models"
describes the person, not one agent. Both fields are optional so existing
panel-state files still load.

The picker's items stay plain strings so the editable ComboBox keeps showing the
model name and the existing IndexOf/Text logic is untouched; the pin rides in an
ItemTemplate over the string. The pin is handled on Tapped rather than Click so
the tap does not bubble to the ComboBoxItem and get treated as picking that
model.

Also switches the preview pane's title icon to a globe while the browser is
showing — the same glyph as the toolbar button that opens it — instead of the
document icon it used for everything.
The agent-driven browser preview, screenshots as image input, development server
previews, and the screenshot-honesty work (PRs #52 through #55) shipped without
any changelog entry. Shared browser tabs was documented on top of a capability
the notes never mentioned existed.

The recorded engine safety pin also still read 7aede43 while the submodule had
moved to 5aea416.
@DevMando
DevMando force-pushed the feature/model-picker-pinning branch from 005407b to bb2d1f3 Compare September 8, 2026 00:12
@DevMando
DevMando merged commit 38b3cf2 into main Sep 8, 2026
1 check passed
@DevMando
DevMando deleted the feature/model-picker-pinning branch September 8, 2026 00:20
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.

1 participant