fix(web): skip Reload history for Docker and adopted panes, label the × for what the bar carries (#814)

- _historyReloadActionEligible() leaves out Docker and adopted sessions, whose nested tmux client keeps the local pane in the alternate screen so ?full=1 returns one screen the downgrade guard refuses; remote sessions stay eligible.
- The bar's × is labelled "Dismiss Reload history" when the bar carries no truncation notice, with a zh-CN entry.
This commit is contained in:
Hadrien Kerlero committed 2026-11-23 12:07:13 +01:00
1 parent 4848886330
commit 82071d47bd
4 files changed
+27 -3

No files matched your search

+9 -2
View File
@@ -10003,8 +10003,14 @@ class CodemanApp {
// opens the gap (#814). A pane that really holds no history (fullscreen
// Claude) captures one screen, `_replayWouldShrinkBuffer` refuses it, and the
// refusal dismisses the action until the next `mux-full-history` replay.
// Docker and adopted sessions are left out: their local pane hosts a nested
// tmux client in the alternate screen, so `?full=1` returns one screen that
// the downgrade guard always refuses (the exclusions `paneKeepsNoHistory`
// uses in selectSession). Remote sessions stay eligible, since the route
// splices the remote scrollback into their capture.
return !!(this.loadAppSettingsFromStorage?.()?.historyReloadAction !== false &&
session && session.mode !== 'shell' && this._liveOutputSinceFullPull?.has(sessionId) &&
session && session.mode !== 'shell' && !session.docker && !session.adopt &&
this._liveOutputSinceFullPull?.has(sessionId) &&
!this._isLoadingBuffer &&
!this.terminalLoadStates?.has(sessionId) && // Tab switches set this before the buffer load opens.
this._terminalRefreshOwner?.sessionId !== sessionId && // A drop-recovery refresh is fetching.
@@ -10125,7 +10131,8 @@ class CodemanApp {
const dismiss = document.createElement('button');
dismiss.type = 'button';
dismiss.className = 'history-trunc-dismiss';
dismiss.setAttribute('aria-label', 'Dismiss history notice');
// Name what the × actually dismisses: a reload-only bar has no notice.
dismiss.setAttribute('aria-label', showNotice ? 'Dismiss history notice' : 'Dismiss Reload history');
dismiss.textContent = '×';
dismiss.onclick = () => {
// One × dismisses everything this bar carried. A notice dismissal sticks
+1
View File
@@ -757,6 +757,7 @@
'Recent output may be missing from this view.': '此视图可能缺少最近的输出。',
'Reload history': '重新加载历史',
'Load full history': '加载完整历史',
'Dismiss Reload history': '忽略“重新加载历史”',
'Auto Copy Selection': '自动复制选中内容',
'Selection & clipboard': '选中与剪贴板',
'Auto Copy: selection copied': '自动复制:已复制选中内容',