From 07382aefd0e245207163dc541dfb567c4924754a Mon Sep 17 00:00:00 2001 From: Andrew Blakeslee Moore Date: Mon, 6 Jul 2026 03:31:56 -0700 Subject: [PATCH] Session Chat Auto-Scroll Adjustment Nucleic-Session: 8FCEB1B7-A6C0-44E2-B00A-E4786F41A1FA Co-authored-by: Nucleic --- .../NucleicRemote/Views/SessionDetailView.swift | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/NucleicRemote/NucleicRemote/Views/SessionDetailView.swift b/NucleicRemote/NucleicRemote/Views/SessionDetailView.swift index 0532ff6..7c2595d 100644 --- a/NucleicRemote/NucleicRemote/Views/SessionDetailView.swift +++ b/NucleicRemote/NucleicRemote/Views/SessionDetailView.swift @@ -241,6 +241,15 @@ struct SessionDetailView: View { /// pending. Content scrolls beneath it; nothing renders when there's nothing to act on. private var actionArea: some View { VStack(spacing: 8) { + // The jump-to-bottom chevron rides here, immediately above the chat bar — not as a + // transcript overlay, which aligned to the scroll view's full-height bounds and so sat + // behind this floating bar at the screen's bottom edge. Shown only while scrolled up; a + // tap bumps the same scroll request the send button uses, so following resumes once the + // transcript reaches the bottom. Mirrors the Mac's `JumpToBottomButton`. + if !isScrolledToBottom { + JumpToBottomButton { scrollToBottomRequest += 1 } + .transition(.move(edge: .bottom).combined(with: .opacity)) + } // Interacting with a chat while the owning Mac is unreachable surfaces this first, so a // disabled composer reads as "offline / read-only history" rather than broken. if !store.connectivity.isLive { disconnectedBanner } @@ -248,6 +257,7 @@ struct SessionDetailView: View { } .padding(.horizontal, 12) .padding(.bottom, 8) + .animation(.easeInOut(duration: 0.15), value: isScrolledToBottom) } /// The offline notice over the transcript: the chat's history is cached and readable, but the