Fixed choice menu not appearing when option descriptions span more than 3 terminal lines - #160
Merged
oleg68 merged 1 commit intoJun 29, 2026
Conversation
…an 3 terminal lines ScreenContentDetector.detectChoiceMenu() scanned upward through the screen and incremented continuationCount for every non-option, non-blank line. When option 1 had a 4-line description, continuationCount reached 4 (> 3 limit) and the scan stopped before collecting option 1. Since the cursor glyph (❯) was only on option 1, the cursor guard then rejected the entire menu as a false positive. Fix: raise the continuationCount limit from 3 to 8, and skip structural separator lines (────) so they don't consume the budget. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
ScreenContentDetector.detectChoiceMenu()scanned upward collecting options and incrementedcontinuationCountfor every non-option, non-blank line. When option 1 had a 4-line description,continuationCountexceeded the limit of 3 and the scan stopped before reaching option 1.ChoiceMenuPanelnever appeared.Test plan
long-option-descriptions.src.txt/.expectedRes.jsonreproduces the failing case (4-line description on option 1, separator between options 4 and 5) — passes after the fixScreenContentDetectorTestcases pass (mvn test -Dtest=ScreenContentDetectorTest)ChoiceMenuPanelshould appear🤖 Generated with Claude Code