From f07eb1d51262e1d8a952078249a7d467f2127679 Mon Sep 17 00:00:00 2001 From: Alan Silva Date: Fri, 13 Nov 2026 18:50:27 +0000 Subject: [PATCH] Leave an unknown harness out of Send to chat rows --- app/lib/application/send_to_chat.dart | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/app/lib/application/send_to_chat.dart b/app/lib/application/send_to_chat.dart index 63b74ed9..1c36d6bf 100644 --- a/app/lib/application/send_to_chat.dart +++ b/app/lib/application/send_to_chat.dart @@ -162,10 +162,7 @@ class _SendToChatSheetState extends State<_SendToChatSheet> { ListTile( leading: const Icon(Icons.chat_bubble_outline), title: Text(chatSessionTitle(row)), - subtitle: Text( - '${'${row['directory'] ?? ''}'.trim().isEmpty ? 'No folder' : row['directory']}' - ' · ${chatBackendLabel('${row['backend'] ?? row['harness'] ?? ''}')}', - ), + subtitle: Text(_chatSubtitle(row)), onTap: () => Navigator.of( context, ).pop(_ChatChoice.existing('${row['id']}')), @@ -178,3 +175,14 @@ class _SendToChatSheetState extends State<_SendToChatSheet> { ); } } + +/// The chat's folder and harness, leaving out whichever is unknown. +String _chatSubtitle(Map row) { + final folder = '${row['directory'] ?? ''}'.trim(); + final backend = '${row['backend'] ?? row['harness'] ?? ''}'.trim(); + final harness = backend.isEmpty ? '' : chatBackendLabel(backend).trim(); + return [ + folder.isEmpty ? 'No folder' : folder, + if (harness.isNotEmpty) harness, + ].join(' · '); +}