diff --git a/NucleicRemote/NucleicRemote/Views/SessionsView.swift b/NucleicRemote/NucleicRemote/Views/SessionsView.swift index 9144239..b370bba 100644 --- a/NucleicRemote/NucleicRemote/Views/SessionsView.swift +++ b/NucleicRemote/NucleicRemote/Views/SessionsView.swift @@ -85,53 +85,13 @@ struct SessionsView: View { } } } - // A floating "new chat" affordance in the lower-right, mirroring the Mac's per-project - // "New chat" button. Picks a project + prompt in a sheet, then kicks off the chat. - .overlay(alignment: .bottomTrailing) { - if canStartChat { newChatButton } - } - .sheet(isPresented: $showNewChat) { - NavigationStack { - ScrollView { - StartChatComposer(onStart: { showNewChat = false }) - .padding() - } - .navigationTitle("New chat") - .navigationBarTitleDisplayMode(.inline) - .toolbar { - ToolbarItem(placement: .topBarLeading) { - Button("Cancel") { showNewChat = false } - } - } - } - // The composer needs only a fraction of the screen — a compact height by default, - // still expandable if the advanced options are opened. - .presentationDetents([.height(360), .large]) - .presentationDragIndicator(.visible) - } .safeAreaInset(edge: .bottom) { ConnectionChip().padding(.bottom, 8) } + // A floating "new chat" affordance in the lower-right, mirroring the Mac's per-project + // "New chat" button. Picks a project + prompt in a glass sheet, then kicks off the chat. + .newChatAffordance(isPresented: $showNewChat) } } - /// The circular plus button, on Liquid Glass rather than a solid teal disc — an accent-tinted - /// glyph over a translucent glass circle so it reads as a floating control, not a stamped - /// button. Sits low over the list, clear of the connection chip. - private var newChatButton: some View { - Button { - showNewChat = true - } label: { - Image(systemName: "plus") - .font(.system(size: 22, weight: .semibold)) - .foregroundStyle(Palette.accent) - .frame(width: 56, height: 56) - .glassCircle() - } - .buttonStyle(.plain) - .padding(.trailing, 20) - .padding(.bottom, 6) - .accessibilityLabel("New chat") - } - /// Push the session a notification tap asked for, then clear the request. private func consumeRoute() { guard let route = store.pendingRoute else { return }