fix(terminal): no paneHistoryLines for a remote session (#583/#602 integration)

A remote session's local pane hosts the remote tmux client in the alternate
screen, so its history_size is always 0. #583 read that as "nothing to load"
and hid the partial-history notice, but with #602 a full=1 load reads the real
scrollback from the remote tmux. The route now leaves the field out for remote
sessions, so their notice keeps the byte-based wording and its Load full
history button.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Codeman maintainer committed 2026-10-13 18:05:30 +02:00
1 parent 628b6e5832
commit 5b8313988f
4 files changed
+33 -4

No files matched your search

+5 -2
View File
@@ -3353,8 +3353,11 @@ export function registerSessionRoutes(
// pull can add. `truncated` measures the BYTE stream, and for a pane that
// keeps no scrollback (a fullscreen CLI in the alternate screen) the bytes
// a tail cut drops are old repaints that no request can bring back, so a
// client must not offer to load them. Absent when the pane was not read.
paneHistoryLines: hasLiveMuxBuffer ? captureOpts.capturedHistoryLines : undefined,
// client must not offer to load them. Absent when the pane was not read,
// and for a remote session: its local pane hosts the remote tmux client in
// the alternate screen, so it always reports 0, while a `full=1` load reads
// the real scrollback from the remote tmux (`fetchRemoteScrollback`).
paneHistoryLines: hasLiveMuxBuffer && !session.remote ? captureOpts.capturedHistoryLines : undefined,
};
});