From 3a82a8840a110fc33b1ed1c559c56ce7dfb5c085 Mon Sep 17 00:00:00 2001 From: Andrew Blakeslee Moore Date: Mon, 6 Jul 2026 03:32:53 -0700 Subject: [PATCH] Session Chat Auto-Scroll Adjustment Nucleic-Session: 8FCEB1B7-A6C0-44E2-B00A-E4786F41A1FA Co-authored-by: Nucleic --- .../NucleicRemote/Views/SessionDetailView.swift | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/NucleicRemote/NucleicRemote/Views/SessionDetailView.swift b/NucleicRemote/NucleicRemote/Views/SessionDetailView.swift index d45693c..60bac70 100644 --- a/NucleicRemote/NucleicRemote/Views/SessionDetailView.swift +++ b/NucleicRemote/NucleicRemote/Views/SessionDetailView.swift @@ -521,16 +521,17 @@ struct TranscriptList: View { } } - /// Scroll the last message to the bottom edge; `animated: false` during the open-settle + /// Scroll the fixed bottom anchor into view; `animated: false` during the open-settle /// window so a chat that's still laying out snaps to the tail instead of easing into place. - private func scrollToLast(_ proxy: ScrollViewProxy, animated: Bool = true) { - guard let last = items.last else { return } + private func scrollToEnd(_ proxy: ScrollViewProxy, animated: Bool = true) { if animated { - withAnimation { proxy.scrollTo(last.id, anchor: .bottom) } + withAnimation { proxy.scrollTo(Self.bottomAnchorID, anchor: .bottom) } } else { - proxy.scrollTo(last.id, anchor: .bottom) + proxy.scrollTo(Self.bottomAnchorID, anchor: .bottom) } } + + private static let bottomAnchorID = "nucleic.transcript-bottom" } /// The floating "jump to the latest" chevron shown above the chat bar while the user has