Skip to content

Fixed the choice dialog (e.g. /model) flickering when the scrolled menu does not start from the first item - #184

Merged
oleg68 merged 1 commit into
nbplugins:mainfrom
oleg68:bugfix/choice-menu-flicker-scrolled-window
Oct 4, 2026
Merged

oleg68 merged 1 commit into
nbplugins:mainfrom
oleg68:bugfix/choice-menu-flicker-scrolled-window

Conversation

@oleg68

@oleg68 oleg68 commented Oct 4, 2026

Copy link
Copy Markdown
Collaborator

Follow-up to #183. For a scrolled list the "question" is the scroll indicator row (e.g. ↑ 8. Fable 5), which changes with the scroll position, so the prefix/same-text hysteresis did not match and the menu was rebuilt endlessly.

isShrunkViewOf now treats two menus as the same list when their questions are equal or both are scroll indicators, and every option of the smaller menu matches an option of the active one (response + display).

Tests: added unit tests for scrolled windows. Manually verified with /model in a short window.

🤖 Generated with Claude Code

…nu does not start from the first item

The scroll indicator row (e.g. "↑ 8. Fable 5") is detected as the question and
changes with the scroll position, so a shorter window of the same list was seen
as a different menu. A menu is now treated as a shrunk view of the active one
when both questions are scroll indicators (or equal) and every option matches an
option of the active menu by response and display.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@oleg68
oleg68 merged commit fd0479a into nbplugins:main Oct 4, 2026
3 checks passed
@oleg68
oleg68 deleted the bugfix/choice-menu-flicker-scrolled-window branch October 4, 2026 17:43
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