diff --git a/ui/src/ui/app-scroll.test.ts b/ui/src/ui/app-scroll.test.ts index 0f7cedede9c..b75fd3ce7f4 100644 --- a/ui/src/ui/app-scroll.test.ts +++ b/ui/src/ui/app-scroll.test.ts @@ -11,7 +11,7 @@ function createScrollHost(overrides: { scrollTop?: number; clientHeight?: number; overflowY?: string; -}) { +} = {}) { const { scrollHeight = 2000, scrollTop = 1500, diff --git a/ui/src/ui/app-scroll.ts b/ui/src/ui/app-scroll.ts index 55106f4fd1d..f31977b9dce 100644 --- a/ui/src/ui/app-scroll.ts +++ b/ui/src/ui/app-scroll.ts @@ -64,7 +64,7 @@ export function scheduleChatScroll(host: ScrollHost, force = false) { target.scrollTop = target.scrollHeight; host.chatUserNearBottom = true; host.chatNewMessagesBelow = false; - const retryDelay = force ? 150 : 120; + const retryDelay = effectiveForce ? 150 : 120; host.chatScrollTimeout = window.setTimeout(() => { host.chatScrollTimeout = null; const latest = pickScrollTarget(); diff --git a/ui/src/ui/app.ts b/ui/src/ui/app.ts index 8ddc93625e9..001b5bdd774 100644 --- a/ui/src/ui/app.ts +++ b/ui/src/ui/app.ts @@ -252,7 +252,7 @@ export class OpenClawApp extends LitElement { private chatScrollTimeout: number | null = null; private chatHasAutoScrolled = false; private chatUserNearBottom = true; - chatNewMessagesBelow = false; + @state() chatNewMessagesBelow = false; private nodesPollInterval: number | null = null; private logsPollInterval: number | null = null; private debugPollInterval: number | null = null;