diff --git a/scarf/scarf/Features/Chat/Views/ChatView.swift b/scarf/scarf/Features/Chat/Views/ChatView.swift index 470ec1b..d1e42c4 100644 --- a/scarf/scarf/Features/Chat/Views/ChatView.swift +++ b/scarf/scarf/Features/Chat/Views/ChatView.swift @@ -15,6 +15,13 @@ struct ChatView: View { errorBanner chatArea } + // Clamp the outer VStack to the detail column's offered + // space. Without this, the chat area's intrinsic height (a + // RichChatView whose message list grows with content) can + // bubble up through NavigationSplitView's detail slot and + // push the whole window past the screen. Same pattern as + // the Sessions tab fix in the v2.3 branch. + .frame(maxWidth: .infinity, maxHeight: .infinity) .navigationTitle("Chat") .task { await viewModel.loadRecentSessions() diff --git a/scarf/scarf/Features/Projects/Views/ProjectsView.swift b/scarf/scarf/Features/Projects/Views/ProjectsView.swift index 37325e6..77424a3 100644 --- a/scarf/scarf/Features/Projects/Views/ProjectsView.swift +++ b/scarf/scarf/Features/Projects/Views/ProjectsView.swift @@ -367,6 +367,16 @@ struct ProjectsView: View { } } } + // Clamp the container VStack to the detail column's + // offered space. Without it, any tab whose content is + // taller than the window (long Sessions list, tall + // README block in a dashboard's text widget, etc.) can + // bubble its intrinsic height up through + // NavigationSplitView's detail slot and push the whole + // window past the screen. widgetsTab's own ScrollView + // and siteTab's explicit maxHeight both cooperate; the + // sessions tab needs this as well. + .frame(maxWidth: .infinity, maxHeight: .infinity) } else if let error = viewModel.dashboardError { ContentUnavailableView { Label("No Dashboard", systemImage: "square.grid.2x2")