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 <noreply@anthropic.com>
This commit is contained in:
2026-04-06 17:46:23 -04:00
parent d441dcf954
commit cb3a09756f
@@ -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,