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:31:56 -07:00
co-authored by Nucleic
parent 07a0db2e29
commit 07382aefd0
@@ -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