Skip to content

fix(tui): pin provider form fields and scroll the model list - #88

Merged
cursor[bot] merged 2 commits into
devfrom
cursor/form-model-list-scroll-214b
Aug 28, 2026
Merged

cursor[bot] merged 2 commits into
devfrom
cursor/form-model-list-scroll-214b

Conversation

@xjoker

@xjoker xjoker commented Aug 28, 2026

Copy link
Copy Markdown
Owner

Problem

On Edit provider, a long model catalog (e.g. 47 slugs) did not follow j/k. Every model was stuffed into one popup; the cursor moved while popup.scroll stayed at 0, so later rows clipped below the dialog. Alias/URL and the help line would also have scrolled away if we only bumped that offset.

Change

  • Pin Alias through Extra -c and the help line.
  • Render only a viewport of model rows (including + add model) sized to the popup inner height.
  • Keep the cursor inside that window; heading shows n/N (or + on the add row) when the list is taller than the form.
  • Reset popup scroll so the form does not double-scroll.

Tests

  • clamp_list_scroll window math
  • 47 models on an 80×24 TestBackend: cursor mid-list keeps the header, shows the selected slug, hides the first and last slugs
  • Add-row selection still shows + add model
  • Top of the list still shows model-00 and not the add row
Open in Web Open in Cursor 

The edit form stuffed every model into one popup, so j/k moved the
cursor while popup.scroll stayed at 0 and later rows clipped. Keep
Alias through Extra and the help line fixed; only the model viewport
scrolls and it always contains the cursor.

Co-authored-by: lolitaupdate <[email protected]>
@xjoker
xjoker marked this pull request as ready for review August 28, 2026 02:33
CI Format and audit uses rustfmt grouping that the previous commit
did not match (Frame/types before modules, C_GREEN before base).

Co-authored-by: lolitaupdate <[email protected]>
@cursor
cursor Bot merged commit 8055ee3 into dev Aug 28, 2026
4 checks passed
@xjoker
xjoker deleted the cursor/form-model-list-scroll-214b branch September 9, 2026 01:32
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.

2 participants