Add New Chat Button

Nucleic-Session: BB7AA593-185A-4A8F-A3DA-598EE63874E2
Co-authored-by: Nucleic <[email protected]>
This commit is contained in:
2026-07-05 04:55:14 -07:00
co-authored by Nucleic
parent 8726a66ab7
commit 3f9d4a9fa6
@@ -6,8 +6,13 @@ import NucleicProtocol
struct SessionsView: View { struct SessionsView: View {
@EnvironmentObject var store: RemoteStore @EnvironmentObject var store: RemoteStore
@State private var showArchived = false @State private var showArchived = false
@State private var showNewChat = false
@State private var path = NavigationPath() @State private var path = NavigationPath()
/// The floating New-chat button only makes sense when this device can control a Mac and there's
/// at least one project to start a chat in; otherwise the composer it opens would be inert.
private var canStartChat: Bool { store.canControl && !store.dashboard.projects.isEmpty }
private var grouped: [(title: String, rows: [WireSessionSummary])] { private var grouped: [(title: String, rows: [WireSessionSummary])] {
let pool = (showArchived ? store.sessions : store.liveSessions) let pool = (showArchived ? store.sessions : store.liveSessions)
.sorted(by: StatusStyle.attentionThenRecency) .sorted(by: StatusStyle.attentionThenRecency)