Chat View Refinement

Nucleic-Session: 4E56990A-96AE-4597-9140-753CB82E769D
Co-authored-by: Nucleic <[email protected]>
This commit is contained in:
2026-07-05 01:12:57 -07:00
co-authored by Nucleic
parent 6f492de70f
commit 3c26b29505
@@ -21,39 +21,16 @@ struct SessionDetailView: View {
} }
var body: some View { var body: some View {
Group { TranscriptList(events: store.openEvents)
if tab == 0 { // The chat bar floats over the scrolling content on Liquid Glass instead of sitting
TranscriptList(events: store.openEvents) // in a boxed strip below it, so the transcript runs the full height of the screen.
} else if store.capabilities.canFetchDiff || store.openDiff != nil { .safeAreaInset(edge: .bottom) { actionArea }
SessionDiffView(diff: store.openDiff, loading: store.diffLoading) .navigationTitle(summary?.title ?? "Session")
.onAppear { store.fetchDiff(sessionID) } .navigationBarTitleDisplayMode(.inline)
} else { .toolbar {
// Older host with no on-demand diff — the stat summary is all it projects. ToolbarItem(placement: .topBarTrailing) { sessionMenu }
DiffSummaryView(diffStat: summary?.diffStat)
} }
} .sheet(isPresented: $showDiff) { diffSheet }
// The chat bar floats over the scrolling content on Liquid Glass instead of sitting in
// a boxed strip below it, so the transcript runs the full height of the screen.
.safeAreaInset(edge: .bottom) { actionArea }
.navigationTitle(summary?.title ?? "Session")
.navigationBarTitleDisplayMode(.inline)
.toolbar {
// Transcript/Diff lives in the navigation bar (icon segments) rather than a
// dedicated row — it's a mode flip, not content, and shouldn't cost chat height.
ToolbarItem(placement: .topBarTrailing) {
Picker("View", selection: $tab) {
Image(systemName: "text.bubble").tag(0)
.accessibilityLabel("Transcript")
Image(systemName: "plus.forwardslash.minus").tag(1)
.accessibilityLabel("Diff")
}
.pickerStyle(.segmented)
.fixedSize()
}
if let summary, store.canControl {
ToolbarItem(placement: .topBarTrailing) { sessionMenu(summary) }
}
}
.alert("Rename chat", isPresented: $showRename) { .alert("Rename chat", isPresented: $showRename) {
TextField("Title", text: $renameDraft) TextField("Title", text: $renameDraft)
Button("Cancel", role: .cancel) {} Button("Cancel", role: .cancel) {}