Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion apps/swift-ios/Features/Workspace/WorkspaceView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ public struct WorkspaceView: View {
model: model,
thread: thread,
submitMessage: submitMessage,
onNavigateBack: closeSelectedThread
onNavigateBack: collapseToSidebar
)
.id(id)
} else {
Expand Down Expand Up @@ -638,6 +638,15 @@ public struct WorkspaceView: View {
preferredCompactColumn = .sidebar
}

/// Compact-width swipe back. Mirrors the system back button: collapse the
/// column but keep the selection so the thread view is re-shown, not
/// destroyed and recreated. Recreating it inside the split view's
/// interactive pop fires a spurious onDisappear on the next open, which
/// releases the thread mid-load and leaves stale cached content.
private func collapseToSidebar() {
preferredCompactColumn = .sidebar
}

@MainActor
private func openProjectCreation() {
showingNewTask = false
Expand Down
Loading