Session Chat Auto-Scroll Adjustment

Nucleic-Session: 8FCEB1B7-A6C0-44E2-B00A-E4786F41A1FA
Co-authored-by: Nucleic <[email protected]>
This commit is contained in:
2026-07-06 03:32:53 -07:00
co-authored by Nucleic
parent c20270988a
commit 3a82a8840a
@@ -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