When opening the session picker (Ctrl+Shift+S), pressing q/Esc to cancel returns to a blank screen. The terminal only re-renders after manually resizing the window.
Root cause: The cancel path clears the screen and sends resize, but does not replay the scrollback buffer. Unlike _doAttach() (which fetches the buffer from /api/session/attach and writes it), the cancel handler just fires \x1b[2J\x1b[H + sendResize(). The PTY has no reason to redraw since the terminal dimensions haven't actually changed.
Fix: Use _doAttach() on cancel to properly restore the session view with buffer replay.
When opening the session picker (Ctrl+Shift+S), pressing q/Esc to cancel returns to a blank screen. The terminal only re-renders after manually resizing the window.
Root cause: The cancel path clears the screen and sends resize, but does not replay the scrollback buffer. Unlike
_doAttach()(which fetches the buffer from/api/session/attachand writes it), the cancel handler just fires\x1b[2J\x1b[H+sendResize(). The PTY has no reason to redraw since the terminal dimensions haven't actually changed.Fix: Use
_doAttach()on cancel to properly restore the session view with buffer replay.