mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-14 10:39:32 +01:00
fix(terminal): the history notice waits for the pull already in flight (#583 merge-time fix)
_smoothScrollBy and the touch paths call _maybeLoadMoreHistoryOnScroll on every frame. Once the viewport sat at row 0, the next frame hit the real pull's in-flight early return, so its reveal ran at once and the notice showed the pre-pull tail state for the whole pull. A later frame now leaves the reveal to the call that started the pull. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
f2d5af2b4c
commit
ee038ad83c
2 files changed
+29
No files matched your search
@@ -3681,6 +3681,9 @@ Object.assign(CodemanApp.prototype, {
|
||||
return;
|
||||
}
|
||||
if (lines === 0 || this.terminal?.buffer?.active?.viewportY !== 0) return;
|
||||
// An earlier frame of this gesture already started the pull; its own
|
||||
// completion reveals the notice, so do not flash the pre-pull state now.
|
||||
if (this._fullHistoryRepullInFlight || this._isLoadingBuffer) return;
|
||||
const sessionId = this.activeSessionId;
|
||||
Promise.resolve(this._maybeRefetchFullHistory?.())
|
||||
.catch(() => {})
|
||||
|
||||
Reference in new issue
Block a user