brennanb2025
a0de430397
Preserve terminal scrollback when restoring a hidden alternate-screen pane
...
On Windows, an alternate-screen TUI pane (Claude Code) could lose scroll-up
after being hidden (tab/worktree switch or app backgrounded) and shown again.
Root cause: on hidden->visible restore, applyMainBufferSnapshot
unconditionally wrote a destructive clear (\x1b[2J\x1b[3J\x1b[H) before
replaying the snapshot, wiping xterm's scrollback. The attach/reattach path
already guards this same clear behind !isAlternateScreen (pty-transport.ts);
the snapshot path did not.
Thread an alternateScreen flag from the backend headless serialization
through the pty:getMainBufferSnapshot IPC + preload types into
applyMainBufferSnapshot, and skip the destructive clear when restoring an
alternate-screen buffer. Add a regression test asserting the clear is NOT
emitted for an alt-screen restore (and the existing normal-buffer test still
asserts it IS).
Fixes #5723
2026-06-27 21:51:07 -07:00
..
2026-06-26 15:01:55 -07:00
2026-06-24 22:03:35 -07:00
2026-06-21 16:44:58 -07:00
2026-06-25 22:43:25 -07:00
2026-06-17 16:08:14 -07:00
2026-06-25 20:51:34 -07:00
2026-06-17 16:08:14 -07:00
2026-06-17 16:08:14 -07:00
2026-06-26 20:05:47 -07:00
2026-06-25 22:43:25 -07:00
2026-06-17 16:08:14 -07:00
2026-06-04 23:51:44 -07:00
2026-06-27 02:05:23 -07:00
2026-06-25 22:43:25 -07:00
2026-06-24 19:26:50 -07:00
2026-06-08 19:23:32 -04:00
2026-06-15 16:40:45 -07:00
2026-06-25 22:43:25 -07:00
2026-06-19 17:14:55 -07:00
2026-06-21 16:44:58 -07:00
2026-06-23 20:59:06 -07:00
2026-06-25 22:43:25 -07:00
2026-06-26 15:51:50 -07:00
2026-06-23 17:22:10 -07:00
2026-05-16 14:36:46 -07:00
2026-06-25 22:43:25 -07:00
2026-06-19 17:14:55 -07:00
2026-06-25 22:43:25 -07:00
2026-06-17 16:08:14 -07:00
2026-06-26 13:26:58 -07:00
2026-06-17 16:08:14 -07:00
2026-06-26 14:49:19 -07:00
2026-06-20 03:30:18 -07:00
2026-06-25 22:43:25 -07:00
2026-06-21 16:44:58 -07:00
2026-06-10 01:22:11 -07:00
2026-06-27 21:51:07 -07:00
2026-06-22 20:27:38 -07:00
2026-05-21 19:10:16 -07:00
2026-06-23 17:22:10 -07:00
2026-04-20 19:41:12 -07:00
2026-06-19 17:14:55 -07:00
2026-06-19 17:14:55 -07:00
2026-06-19 17:14:55 -07:00
2026-06-24 00:17:49 -07:00
2026-05-31 05:55:04 -07:00
2026-06-22 19:13:32 -07:00
2026-05-30 02:46:28 -07:00
2026-06-24 00:17:49 -07:00
2026-06-23 11:18:17 -07:00
2026-06-21 16:44:58 -07:00
2026-06-25 18:36:37 -07:00
2026-06-26 13:26:58 -07:00
2026-06-26 12:22:42 -07:00
2026-06-26 12:22:42 -07:00
2026-06-23 10:38:37 -07:00
2026-06-27 21:51:07 -07:00
2026-06-01 20:01:03 -04:00
2026-06-27 02:37:59 -07:00
2026-06-19 12:31:11 -07:00
2026-05-30 13:26:48 -07:00
2026-06-22 16:46:47 -07:00
2026-06-17 22:21:32 -07:00
2026-06-18 22:50:11 -07:00
2026-06-19 17:14:55 -07:00
2026-06-16 18:12:55 -07:00
2026-06-19 17:14:55 -07:00
2026-06-18 22:30:44 -07:00
2026-06-17 16:08:14 -07:00
2026-06-26 20:05:47 -07:00
2026-06-17 16:20:37 -07:00
2026-06-17 16:20:37 -07:00
2026-05-18 14:09:21 -07:00
2026-05-18 14:09:21 -07:00
2026-05-18 14:09:21 -07:00
2026-06-17 16:08:14 -07:00
2026-06-17 16:08:14 -07:00
2026-06-22 18:01:37 -07:00
2026-06-22 18:01:37 -07:00
2026-04-19 12:09:32 -07:00
2026-05-15 23:52:37 -07:00
2026-06-22 13:49:08 -07:00
2026-06-22 13:49:08 -07:00
2026-05-30 15:26:11 -04:00
2026-05-30 15:26:11 -04:00
2026-06-19 17:14:55 -07:00
2026-05-18 14:43:24 -07:00
2026-06-19 17:14:55 -07:00
2026-06-19 17:14:55 -07:00
2026-06-25 20:51:34 -07:00
2026-06-10 13:08:09 -07:00
2026-05-30 09:04:52 -07:00
2026-05-30 09:04:52 -07:00
2026-06-17 16:08:14 -07:00
2026-06-26 13:28:10 -07:00
2026-06-26 13:28:10 -07:00
2026-06-26 13:28:10 -07:00
2026-05-30 09:04:52 -07:00
2026-05-30 09:04:52 -07:00
2026-06-25 20:51:34 -07:00
2026-06-25 20:51:34 -07:00
2026-06-24 00:17:49 -07:00
2026-06-24 00:17:49 -07:00
2026-06-17 16:08:14 -07:00
2026-06-17 16:08:14 -07:00
2026-06-24 21:07:15 -04:00
2026-06-24 21:07:15 -04:00
2026-06-18 16:24:22 -07:00
2026-06-25 17:24:09 -07:00
2026-06-24 19:19:31 -07:00
2026-06-24 19:19:31 -07:00
2026-06-24 19:19:31 -07:00
2026-06-24 19:19:31 -07:00
2026-06-24 19:19:31 -07:00
2026-05-31 11:46:24 -07:00
2026-05-31 02:21:17 -07:00
2026-06-17 16:08:14 -07:00
2026-06-21 18:51:44 -07:00
2026-06-13 14:16:05 -07:00
2026-05-21 21:52:26 -07:00
2026-05-21 21:52:26 -07:00
2026-05-21 21:52:26 -07:00
2026-05-21 21:52:26 -07:00
2026-05-30 10:11:48 -07:00
2026-05-30 10:11:48 -07:00
2026-06-17 16:08:14 -07:00
2026-06-17 16:08:14 -07:00
2026-06-04 01:31:38 -07:00
2026-04-14 10:25:55 -07:00
2026-04-14 10:33:25 -07:00
2026-06-20 16:39:42 -07:00
2026-05-26 20:56:11 -07:00
2026-06-17 16:20:37 -07:00
2026-05-30 13:09:17 -07:00
2026-05-30 13:09:17 -07:00
2026-05-27 00:47:01 -07:00
2026-05-27 00:47:01 -07:00
2026-05-27 00:47:01 -07:00
2026-05-15 23:52:37 -07:00
2026-05-26 20:56:11 -07:00
2026-06-20 16:39:42 -07:00
2026-06-21 13:10:25 -07:00
2026-06-20 16:39:42 -07:00
2026-05-31 10:11:51 -07:00
2026-05-31 10:11:51 -07:00
2026-05-06 23:30:03 -07:00
2026-05-23 12:33:49 -07:00
2026-05-20 22:09:35 -07:00
2026-06-10 16:41:22 -04:00
2026-05-30 11:01:09 -07:00
2026-05-21 13:22:37 -07:00
2026-05-30 11:01:09 -07:00
2026-06-16 14:57:39 -07:00
2026-06-03 12:25:54 -07:00
2026-06-03 12:25:54 -07:00
2026-05-30 12:53:34 -07:00
2026-06-18 13:05:57 -07:00
2026-05-30 12:53:34 -07:00
2026-06-18 13:05:57 -07:00
2026-06-15 14:54:50 -07:00
2026-06-15 14:54:50 -07:00
2026-05-29 16:06:33 -07:00
2026-05-29 16:06:33 -07:00
2026-05-29 16:06:33 -07:00
2026-04-07 21:02:36 -04:00
2026-06-21 17:23:42 -07:00