mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-30 16:39:33 +01:00
fix(web): offer Reload history after a burst in a session opened empty (#814)
- _historyReloadActionEligible() no longer reads _paneHistoryLines: it is recorded at the last load, so a session first opened empty kept 0 after the burst that opens the gap, and the action never appeared (found by the live #814 recipe). - A pane with no tmux history is still retired by the downgrade refusal, which dismisses the action until the next mux-full-history replay.
This commit is contained in:
1 parent
9ef47aca6c
commit
b4d729a054
4 files changed
+14
-6
No files matched your search
@@ -9924,9 +9924,14 @@ class CodemanApp {
|
||||
const sessionId = this.activeSessionId;
|
||||
const session = this.sessions.get(sessionId);
|
||||
// Cheap state checks first: the terminal is read only for a marked session.
|
||||
// `_paneHistoryLines` is deliberately not consulted: it is recorded at the last
|
||||
// load, so a session first opened empty keeps 0 after the very burst that
|
||||
// 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.
|
||||
return !!(this.loadAppSettingsFromStorage?.()?.historyReloadAction !== false &&
|
||||
session && session.mode !== 'shell' && this._liveOutputSinceFullPull?.has(sessionId) &&
|
||||
this._paneHistoryLines?.get(sessionId) !== 0 && !this._isLoadingBuffer &&
|
||||
!this._isLoadingBuffer &&
|
||||
!this._fullHistoryRepullInFlight && !this.detachedSessions?.has(sessionId) &&
|
||||
!this._historyReloadDismissed?.has(sessionId) && !this._tilesOwnTerminal?.() &&
|
||||
!this.isTerminalAtBottom());
|
||||
|
||||
Reference in new issue
Block a user