From cf956515d9ea46d0241eb746c4dcb6b5812ddea9 Mon Sep 17 00:00:00 2001 From: robert dennis <31261583+robertdrakedennis@users.noreply.github.com> Date: Sun, 11 Oct 2026 01:11:32 -0400 Subject: [PATCH] console scroll easing --- .../scripts/components/server/console/useTerminal.spec.tsx | 7 +++++++ resources/scripts/components/server/console/useTerminal.ts | 3 +++ 2 files changed, 10 insertions(+) diff --git a/resources/scripts/components/server/console/useTerminal.spec.tsx b/resources/scripts/components/server/console/useTerminal.spec.tsx index 2f2b0b741..95792e2a0 100644 --- a/resources/scripts/components/server/console/useTerminal.spec.tsx +++ b/resources/scripts/components/server/console/useTerminal.spec.tsx @@ -171,6 +171,13 @@ describe('useTerminal', () => { expect(Object.keys(theme)).toHaveLength(22); }); + it('scrolls without easing, so new output cannot drag a scrolled-up view along', async () => { + render(); + await waitFor(() => expect(terminals).toHaveLength(1)); + + expect(terminals[0].options.smoothScrollDuration).toBe(0); + }); + it('keeps the on-screen keyboard closed when the read-only terminal takes focus', async () => { const { container } = render(); diff --git a/resources/scripts/components/server/console/useTerminal.ts b/resources/scripts/components/server/console/useTerminal.ts index 297e756bd..80b067dec 100644 --- a/resources/scripts/components/server/console/useTerminal.ts +++ b/resources/scripts/components/server/console/useTerminal.ts @@ -76,6 +76,9 @@ const terminalProps: ITerminalOptions = { cursorBlink: false, allowTransparency: true, rows: 30, + // Ghostty eases wheel scrolls toward a target it doesn't move when output arrives, so on a busy + // console each new line dragged the view forward and swallowed most of the scroll. + smoothScrollDuration: 0, }; const countLineFeeds = (data: string | Uint8Array) =>