Repository navigation
fix(patches): keep patch descriptions inside the display - #51
Closed
arena-ai-coding-agent[bot] wants to merge 1 commit into
Closed
arena-ai-coding-agent[bot] wants to merge 1 commit into
arena-ai-coding-agent[bot] wants to merge 1 commit into
Conversation
dialog draws the highlighted patch's description on the very last line of the terminal. With the fullscreen '-1 -1 0' sizing the checklist box ended exactly on that line, so the description was painted over the bottom border and chopped off at the screen edge when longer than the display. Size the checklist explicitly (box ends one line above the bottom) and truncate descriptions to the terminal width so the help line always fits, matching how every other --item-help menu in the app is sized. Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.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.
Problem
On the Patch Selection Menu, the highlighted patch's description went beyond the display — it was painted over the box's bottom border and chopped off mid-word at the screen edge.
Root cause
dialogalways draws the highlighted item's description (via--item-help) on the very last line of the terminal (dlg_item_help()doeswmove(stdscr, LINES - 1, 0)). The patches list was opened with auto full-screen sizing (-1 -1 0), so the box grew down to exactly that line — its bottom border landed on the same row where descriptions are drawn. Descriptions longer than the screen width were also cut off at the edge with no truncation marker.Fix
In
modules/json/patches.sh:tput lines/tput colsso the box ends one line above the bottom and the description gets its own clean line below the box. This matches how every other--item-helpmenu in the app (Custom_keystore.sh,Bundle_Parser.sh,import.sh) is already sized — the patches list was the only one using full-screen-1 -1 0....suffix) so the help line always fits; dialog's own edge-truncation remains as a backstop.tputfailure → 24×80, and minimums for box height / list height / description length on tiny screens.Verification
Reproduced and verified with a locally built
dialog(1.3) driving the realmanagePatchesfunction end-to-end on rendered terminal captures:TASK=CHOOSE_APPWindow too bigerrortputfailure falls back to safe defaults;bash -nclean on all repo scripts