From 975e732ce3ec927a9017f6dec3762bced7d70f1f Mon Sep 17 00:00:00 2001 From: Brennan Benson <79079362+brennanb2025@users.noreply.github.com> Date: Tue, 6 Oct 2026 12:10:32 -0700 Subject: [PATCH] feat(native-chat): a solid, fading Jump to latest (#25759) "Jump to latest" was a faint, see-through pill that popped in and out. It is now a solid button that fades in and out, can't be clicked or tabbed to while hidden, and keeps focus in the composer when clicked. Co-authored-by: Kelvin Amoaba <97001695+AmoabaKelvin@users.noreply.github.com> --- .../NativeChatJumpToLatest.test.tsx | 39 +++++++++++++++++++ .../native-chat/NativeChatJumpToLatest.tsx | 36 +++++++++++++++++ .../native-chat/NativeChatMessageList.tsx | 15 +------ 3 files changed, 77 insertions(+), 13 deletions(-) create mode 100644 src/renderer/src/components/native-chat/NativeChatJumpToLatest.test.tsx create mode 100644 src/renderer/src/components/native-chat/NativeChatJumpToLatest.tsx diff --git a/src/renderer/src/components/native-chat/NativeChatJumpToLatest.test.tsx b/src/renderer/src/components/native-chat/NativeChatJumpToLatest.test.tsx new file mode 100644 index 00000000000..a7d12b2b2d3 --- /dev/null +++ b/src/renderer/src/components/native-chat/NativeChatJumpToLatest.test.tsx @@ -0,0 +1,39 @@ +// @vitest-environment happy-dom + +import '@testing-library/jest-dom/vitest' + +import { cleanup, render, screen } from '@testing-library/react' +import userEvent from '@testing-library/user-event' +import { afterEach, expect, it, vi } from 'vitest' +import { NativeChatJumpToLatest } from './NativeChatJumpToLatest' + +afterEach(cleanup) + +// The reader is usually mid-draft when they reach for this: a press must not take the caret. +it('leaves focus in the composer when pressed with the pointer', async () => { + const onJump = vi.fn() + render( + <> + +