Repository navigation
fix(menu): keep the task summary visible after a task; ASCII title frame - #6
Merged
Merged
Conversation
After a task, setup.sh returned to a menu whose first render ran clear, which on xterm-like terminals also erases the scrollback (ESC[3J), so the task's summary table was wiped and could not be scrolled back. A one-shot MENU_KEEP_SCREEN flag now skips that one clear. Menu titles are drawn in a plain-ASCII frame sized to the title. A PTY test reproduces the bug (red before, green after). Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
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
After a task finishes,
setup.shreturns to a menu whose first render runsclear. On xterm-like terminalsclearalso sendsESC[3J, which erases the scrollback, so the task's summary table was wiped immediately and could not be scrolled back to. Terminals that ignore3Jkept it, hence "lost in some terminals".Change
MENU_KEEP_SCREEN=1(one-shot, set bysetup.shafter running a task) makes the next menu skip its clear, so the menu is drawn below the summary. Later menus clear as before.+---+ / | title | / +---+), same colors,NO_COLORhonored.Test
tests/test_menu_pty.shrunssetup.shunder a real pty, picks UNIX -> Update OS (a stub that prints a marker) and asserts the last screen clear comes before the marker and the menu is redrawn after it. It failed before the fix (a clear 58 bytes after the summary) and passes after; removing the one-line flag insetup.shmakes it fail again. A second test pins the frame. One existing assertion was updated for the framed title line.Not changed
No boxed option list, no re-printing of old summaries; menus entered via "back" still clear.
🤖 Generated with Claude Code