chat: the /model menu's current model wears no band and the picker owns the wheel - #1696
Conversation
…ns the wheel The chosen row of the /model list used to wear the ladder's selected ground, a full-width band that read as a highlighted row wherever the cursor happened to be. The band on an overlay is the cursor's language, so the menu's front mark now keeps its accent and its weight and takes no ground: the cursor alone lifts a row (palette.frontUnlifted, the picker's own grammar, said on its draw and nowhere else). Every other list that draws through the shared overlay renderer keeps the ladder's selected step for its front mark. A wheel notch with the list up used to fall all the way through to the transcript and scroll words nobody can see move. The picker now claims the wheel like every modal above it, walking its cursor, which clamps at both ends so neither the wheel nor the keys run past the list. The picker's scroll window was counted in list rows while the drawing spends extra lines on a service's heading, the machines' heading and a why line, so the cursor could sit inside the logical window and still fall past the rendered bottom edge: the highlight vanished once the list bottomed out, and the menu opened with no highlight anywhere because cursorToCurrent put it on the model in use at the bottom of just such a window. picker.follow now counts screen lines (picker.rowLines, the same costs picker.height reserves the frame with), and the menu's own door opens with the cursor visibly on the list's first selectable row. The doors that open to confirm (a settings slot, a role, a task's model word, home's draft, alt+o) keep opening ON the row they hold, and ctrl+u still returns the emptied box to the model in use. The fold tests that mean the model in use now walk to it explicitly, and the rendered-ground assertion pins a color palette so it holds on a headless runner with no terminal profile. The manual's key sheet, Scrolling section and models page name the wheel, the first-row cursor and the mark's look. Co-Authored-By: codeaf <agentfield-bot@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The two change entries were written for #1693, which this pull request replaces with the same change on a clean history, so they are renamed to the new number and their pr field says it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
models-and-cost.md still said the list opens on the model in use, in the picker paragraph and in the sort-key section, while commands.md said /model opens on the first row. Both now say what the code does: /model opens on the first row, and the doors that open to confirm open on the model they hold. Two comments that cited the old rule are corrected, and picker.follow says why the keystroke-time callers may pass a row count as their line budget. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Opening /model on the first row made Enter switch models without a choice, and a refreshed task list could replace the task's confirmation model. Every model door now opens and refreshes on the model it holds, visibly on screen. A missing held model falls back to the first selectable row. The window still counts screen lines, including service and machine headings and reason lines. Opening a fold keeps preceding context when it fits and scrolls by the least otherwise, with the cursor kept visible. Settings slot and role lists, home's draft list and the task composer's list now own wheel gestures while open and leave the page beneath still. The manual and change entries describe confirmation, refresh, wheel ownership and the current model's bold accent without a band of its own. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Taking over: checked by hand in the real binary at 120, 62 and 50 columns, with and without a second service heading. The no-band mark and the wheel work as described. One thing did not hold: after
Left for later: under |
AbirAbbas
left a comment
There was a problem hiding this comment.
Verified by hand in the real binary (120/62/50 columns, with and without a service heading). Merging.
Ready to review (still marked draft on GitHub). The reviewer's fixes are in commit
3e73b0cec, and CI is running on it. This replaces #1693 with the same change, minus senior-dev'swipcommits.Three
/modelmenu fixesTry it
make build, thenbin/codeaf./model. The cursor is on the first row, and the model in use is bold with no band.How it works
palette.frontUnlifted, is set only by the model picker. That covers/model, the settings slots, home's draft andalt+o. Every other list keeps its old look.tea.MouseWheelMsgnow has a branch for the picker, like the other menus. It reusespicker.move, which already stops at both ends.picker.follownow counts screen lines, including service headings and "why" lines, instead of list rows. That's the same countpicker.heightuses to size the menu.These still open with the cursor on the row they hold, not on the first row: a settings slot, a role, a task's model word, home's draft and
alt+o.ctrl+ustill returns the emptied box to the model in use.Tests
modelmenu_test.gotests the no-band row, the wheel and the stops at both ends.modelcursor_test.gotests that the menu opens on the first row and the cursor stays visible at the bottom.go test ./internal/tui3and./internal/manualpass ond418fcaac, according to the reviewer. On3e73b0cec, the focused model and picker runs and./internal/manualpass.Docs
3e73b0cecfixes what the review found.models-and-cost.mdstill said the list opens on the model in use, which contradictedcommands.md. Two code comments still cited that old rule.picker.follownow explains why keystroke-time calls can pass a row count as their budget.keys.mdcovers the wheel,commands.mdsays the cursor opens on the first row, andmodels-and-cost.mddescribes how the model in use looks.1696-model-menu-front-mark-and-wheel.mdand1696-model-menu-cursor-first-row.md.🤖 Generated with Claude Code