Commit Graph

1 Commits

Author SHA1 Message Date
Peter Steinberger 475d20a034 fix(ui): stop the model picker from nagging about refresh failures (#125661)
* fix(ui): stop the model picker from nagging about refresh failures

A failed background catalog refresh rendered a "Couldn't refresh models"
banner plus a Retry button on top of a complete, working model list, and
replaced the composer trigger's model name with that error text. The
picker already keeps the last-known catalog and re-requests it on every
open, so the operator was being asked to press a button for something the
UI does by itself.

The error stays recorded on the host — it is what drops the stale
availability gate so the composer remains usable — but it is no longer
surfaced while there are models to show. Only a genuinely empty catalog
still says "Models unavailable". The new-session picker gains the chat
picker's open-triggers-revalidate behavior so re-opening it is the retry
there too, instead of dead-ending until a page reload.

Two adjacent simplifications in the same surface:

- Model rows reserve their provider-icon slot as an invisible stem, so
  names line up with the provider heading label (same 34px stem grouped
  and filtered, nothing shifts while typing).
- The "Using agent default" footer is gone: the default row already
  carries a DEFAULT badge and the checkmark. Typing "default" in the
  picker search now matches the default model instead.

Proof: scripts/capture-model-picker-proof.mts captures the open picker
against a mocked gateway; alignment delta 0px (was -24px), search
"default" matches the default row (was nothing), and a failed models.list
leaves no catalog-state element with all rows intact.

* fix(ci): register the model-picker proof script and await its picker revalidation

The unused-file scan needs every scripts/ entry point referenced, like the
sibling ui:proof:* recipes. The catalog-reconnect assertion also has to wait
for the picker's own metadata request instead of reading the log the moment
the rows render.

* test(ui): split model-catalog scenarios out of the new-session e2e file

The catalog-reconnect file hit the 1000-line cap. Its model-catalog metadata
failure/recovery pair is a separate surface from CLI-agent targets, terminal
start, and draft reconnect, so it moves to its own file rather than earning a
max-lines suppression.

* test(audit): give the pinned-reader contract test a realistic timeout

It adds a pinned-SHA git worktree and cold-compiles the audit and state
modules under tsx, which takes minutes on a contended runner. The 120s
default made it fail by construction; it timed out on an unrelated PR shard
while passing locally at ~55s.
2026-08-18 00:58:19 -07:00