From cb3a09756f4287e5a53a31f42f7a24d1aa0a033d Mon Sep 17 00:00:00 2001 From: bvandeusen Date: Mon, 6 Apr 2026 17:46:23 -0400 Subject: [PATCH] fix: create conversations with empty title so server auto-names them The app was creating conversations with title 'New conversation'. The server only generates a title when conv_title is falsy (empty). With a non-empty title, should_gen_title is False for the first message (msg_count % 10 != 0), so auto-naming never fired. Now creates with empty title (matching web app behaviour). The list still displays 'New conversation' as a UI placeholder until the server-generated title arrives. Co-Authored-By: Claude Sonnet 4.6 --- lib/screens/chat/conversations_tab_screen.dart | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/screens/chat/conversations_tab_screen.dart b/lib/screens/chat/conversations_tab_screen.dart index 68f6c7c..a82cb07 100644 --- a/lib/screens/chat/conversations_tab_screen.dart +++ b/lib/screens/chat/conversations_tab_screen.dart @@ -23,7 +23,7 @@ class ConversationsTabScreen extends ConsumerWidget { onPressed: () async { final conv = await ref .read(conversationsProvider.notifier) - .create('New conversation'); + .create(''); if (context.mounted) { context.push(Routes.chat.replaceFirst(':id', '${conv.id}')); } @@ -52,7 +52,7 @@ class ConversationsTabScreen extends ConsumerWidget { onPressed: () async { final conv = await ref .read(conversationsProvider.notifier) - .create('New conversation'); + .create(''); if (context.mounted) { context.push( Routes.chat.replaceFirst(':id', '${conv.id}')); @@ -71,8 +71,10 @@ class ConversationsTabScreen extends ConsumerWidget { final c = convs[i]; return ListTile( leading: const Icon(Icons.chat_bubble_outline), - title: Text(c.title, - maxLines: 1, overflow: TextOverflow.ellipsis), + title: Text( + c.title.isEmpty ? 'New conversation' : c.title, + maxLines: 1, + overflow: TextOverflow.ellipsis), subtitle: Text( _relativeTime(c.updatedAt), style: theme.textTheme.labelSmall,