Files
club-3090/tools
b50567b451 Add model-scope dropdown + group-by-model to c3 Catalog (#495)
The flat Catalog variant table dropped the model→slugs grouping that
`switch.sh --list` shows. Restore it on two surfaces:

- A leading "model" column with group-by-model sort: a model's lanes sit
  together in registry (first-seen) order, the model name shown on the
  first row of each group and blank on the repeats — the `switch.sh
  --list` "model header, then its slugs" look. The sort lives in
  `_filtered_entries()` so the table render and the cursor→entry mapping
  stay consistent.
- A "model name only" scope dropdown (irrespective of provider/quant),
  toggle-hidden by `[\]` like the text filter so it stays out of the
  Tab/focus chain — an always-visible focusable Select destabilised the
  focus-model + teardown tests. Picking a model AND-combines with the
  text filter; the active scope surfaces in the status line; Esc hides
  the control but keeps the scope; a scoped model that vanishes on the
  next load resets to "All models".

Tests: assert the "model" column leads, the dropdown options/scope/AND-
combine/vanished-model reset, group-by-model ordering on interleaved
input, the toggle visibility, and blank-on-repeat rendering. Full
cockpit suite green (743 passed).


Claude-Session: https://claude.ai/code/session_01EfF565T9eSLaqGzidyJ1Pm

Co-authored-by: noonghunna <[email protected]>
Co-authored-by: Claude Opus 4.8 <[email protected]>
2026-06-27 21:40:04 +05:00
..