From 3f9d4a9fa69df69f927fa7cf10bffbeabea07684 Mon Sep 17 00:00:00 2001 From: Andrew Blakeslee Moore Date: Sun, 5 Jul 2026 04:55:14 -0700 Subject: [PATCH] Add New Chat Button Nucleic-Session: BB7AA593-185A-4A8F-A3DA-598EE63874E2 Co-authored-by: Nucleic --- NucleicRemote/NucleicRemote/Views/SessionsView.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/NucleicRemote/NucleicRemote/Views/SessionsView.swift b/NucleicRemote/NucleicRemote/Views/SessionsView.swift index 22fb067..9f515fd 100644 --- a/NucleicRemote/NucleicRemote/Views/SessionsView.swift +++ b/NucleicRemote/NucleicRemote/Views/SessionsView.swift @@ -6,8 +6,13 @@ import NucleicProtocol struct SessionsView: View { @EnvironmentObject var store: RemoteStore @State private var showArchived = false + @State private var showNewChat = false @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])] { let pool = (showArchived ? store.sessions : store.liveSessions) .sorted(by: StatusStyle.attentionThenRecency)