Repository navigation
tui: fix holding Up in the model picker - #94
Merged
Merged
Conversation
Down did `selected += 1` with no upper bound. Holding Down past the last model ran the index far beyond the list (the render clamped it, so it looked stuck on the last row); every Up afterwards only walked that hidden index back, so the highlight didn't move until it got below the list end. Up/Down now go through step_selection, which keeps the index inside the filtered list, and the picker's filter is shared via visible_models. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014BrrmTaVCX3fyMxqpJiZXL
|
Graphify reviews are paused for this workspace because nobody has used it in 7 days. A workspace owner can resume reviews from the Repositories page: https://app.graphify.com/angus-lab/repositories |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by jack mini · project thread
问题
模型选择列表里长按 Down 能连续移动,长按 Up 却不动。
原因
Popup::Models的 Down 是*selected += 1,没有上界。长按 Down 到底部后索引会继续往上涨(渲染时被 clamp,所以看起来停在最后一行)。之后每次 Up 只是在把这个"隐藏"的超出值往回减,减到列表长度以内之前高亮一直不动。和 #93 的键盘增强无关(只开了DISAMBIGUATE_ESCAPE_CODES,Up/Down 处理是同一路径)。修复
step_selection,索引始终限制在过滤后的列表范围内。visible_models,按键处理和渲染共用。picker_tests:修复前失败(长按 40 次 Down 后索引为 40),修复后通过。cargo test131 个通过,cargo clippy --all-targets无警告。Generated by Claude Code