Skip to content

fix(menu): keep the task summary visible after a task; ASCII title frame - #6

Merged
jsdiazp merged 2 commits into
mainfrom
fix/menu-keep-summary
Nov 3, 2026
Merged

jsdiazp merged 2 commits into
mainfrom
fix/menu-keep-summary

Conversation

@jsdiazp

@jsdiazp jsdiazp commented Nov 3, 2026

Copy link
Copy Markdown
Owner

Problem

After a task finishes, setup.sh returns to a menu whose first render runs clear. On xterm-like terminals clear also sends ESC[3J, which erases the scrollback, so the task's summary table was wiped immediately and could not be scrolled back to. Terminals that ignore 3J kept it, hence "lost in some terminals".

Change

  • MENU_KEEP_SCREEN=1 (one-shot, set by setup.sh after running a task) makes the next menu skip its clear, so the menu is drawn below the summary. Later menus clear as before.
  • Menu titles are drawn in a plain-ASCII frame sized to the title (+---+ / | title | / +---+), same colors, NO_COLOR honored.

Test

tests/test_menu_pty.sh runs setup.sh under 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 in setup.sh makes 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

jsdiazp and others added 2 commits November 3, 2026 09:38
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]>
@jsdiazp
jsdiazp merged commit 6c15689 into main Nov 3, 2026
10 of 12 checks passed
@jsdiazp
jsdiazp deleted the fix/menu-keep-summary branch November 3, 2026 14:58
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