Session Chat Auto-Scroll Adjustment
Nucleic-Session: 8FCEB1B7-A6C0-44E2-B00A-E4786F41A1FA Co-authored-by: Nucleic <[email protected]>
This commit is contained in:
@@ -241,6 +241,15 @@ struct SessionDetailView: View {
|
|||||||
/// pending. Content scrolls beneath it; nothing renders when there's nothing to act on.
|
/// pending. Content scrolls beneath it; nothing renders when there's nothing to act on.
|
||||||
private var actionArea: some View {
|
private var actionArea: some View {
|
||||||
VStack(spacing: 8) {
|
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
|
// 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.
|
// disabled composer reads as "offline / read-only history" rather than broken.
|
||||||
if !store.connectivity.isLive { disconnectedBanner }
|
if !store.connectivity.isLive { disconnectedBanner }
|
||||||
@@ -248,6 +257,7 @@ struct SessionDetailView: View {
|
|||||||
}
|
}
|
||||||
.padding(.horizontal, 12)
|
.padding(.horizontal, 12)
|
||||||
.padding(.bottom, 8)
|
.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
|
/// The offline notice over the transcript: the chat's history is cached and readable, but the
|
||||||
|
|||||||
Reference in New Issue
Block a user