Skip to content

fix: keep full-height frames off the primary buffer during the alt-screen hop - #128

Merged
hbrooks merged 1 commit into
mainfrom
fix-altscreen-scrollback-erase
Aug 21, 2026
Merged

fix: keep full-height frames off the primary buffer during the alt-screen hop#128
hbrooks merged 1 commit into
mainfrom
fix-altscreen-scrollback-erase

Conversation

@hbrooks

@hbrooks hbrooks commented Aug 21, 2026

Copy link
Copy Markdown
Member

Important

Prevents full-height UI frames from rendering during the alternate screen transition in SessionsApp, which would cause them to paint on the primary buffer and shift the shell's scrollback history upward.

  • During the alt-screen hop (when transitioning to alternate buffer mode), fullFrameHopGap returns early with an empty box instead of rendering the navigation picker or other full-height screens.
  • Frames that render before the transition settles land on the primary buffer instead of the alternate buffer, which inadvertently scrolls the shell's history and chat transcript up into scrollback — the exact space the chat's scrollback view is meant to preserve.

This description was created by Ellipsis for ab0311f. It will automatically update as commits are pushed.

@hbrooks
hbrooks merged commit 365e5db into main Aug 21, 2026
1 check passed
@hbrooks
hbrooks deleted the fix-altscreen-scrollback-erase branch August 21, 2026 19:26

@ellipsis-dev ellipsis-dev Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Changes requested ❌ — 1 issue

Reviewed ab0311f in 8 minutes, 20 seconds.
  • Reviewed 1 commit with 26 lines of code in 1 file
  • Ran 1 review agent producing 1 comment where 1 was posted
  • This pipeline runs no gatekeeper, so findings are posted as written.
  • View full details on ellipsis.dev

This review was created by Ellipsis. You can tag @ellipsis in this pull request.

Comment thread src/ui/SessionsApp.tsx
// (and any earlier transcript) a screenful up into scrollback — exactly the
// rows the chat's scrollback view promises to leave in place. So the frames
// in the hop gap render nothing, same as the chat's own gap below.
const fullFrameHopGap = !altScreenOn

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hop gap is missing on the other primary→alt transition: ctrl+r's transcript browser still paints a full-height frame on the primary buffer. ConnectApp calls useAltScreen(windowed) at src/ui/ConnectApp.tsx:315 and throws the settled flag away, so the frame where windowed flips true commits with minHeight={rows - bottomSlack} (src/ui/ConnectApp.tsx:1526) and the <Static> transcript withheld — before the 1049h write.

In a chat whose transcript reaches the bottom of the terminal, pressing ctrl+r paints a screenful-tall frame at the cursor, scrolling the flushed transcript rows up; 1049h then saves the already-damaged primary buffer, so esc restores the shifted history. Same failure this PR fixes for the picker, reached by a different key.

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