Skip to content

Conversation detail view shows created_at date instead of started_at date #3636

@smian1

Description

@smian1

Summary

Multiple places in the app display and filter conversations using createdAt (when the record was added to the database) instead of startedAt (when the conversation actually occurred). This causes incorrect behavior for imported, migrated, or SD card-synced conversations.

Affected Locations

1. Detail View - Date Chip

File: app/lib/pages/conversation_detail/widgets.dart (line 119)

// Current (wrong)
label: _getDateFormat(conversation.createdAt),

// Should be
label: _getDateFormat(conversation.startedAt ?? conversation.createdAt),

2. Calendar Date Filter

File: app/lib/providers/conversation_provider.dart (line 281)

// Current (wrong)
var convoDate = DateTime(convo.createdAt.year, convo.createdAt.month, convo.createdAt.day);

// Should be
var date = convo.startedAt ?? convo.createdAt;
var convoDate = DateTime(date.year, date.month, date.day);

3. Conversation Grouping Functions

File: app/lib/providers/conversation_provider.dart

Lines 324, 340, 412, 426, 586, 656 all use conversation.createdAt for grouping conversations by date.

Current vs Expected Behavior

Location Current Expected
Detail view date chip createdAt startedAt ?? createdAt
Detail view time chip startedAt ?? createdAt (already correct)
List view time startedAt ?? createdAt (already correct)
Calendar filter createdAt startedAt ?? createdAt
Date grouping createdAt startedAt ?? createdAt

Impact

  1. Imported/migrated conversations display wrong dates - Users migrating data from other platforms (e.g., Limitless, other recording apps) set accurate started_at timestamps via the API, but the UI shows "Today" instead of the actual conversation date.

  2. Calendar filter doesn't work for imported data - Filtering by December 1st won't find conversations that actually happened on December 1st if they were imported on a different date.

  3. Inconsistent UX - The time chip already uses startedAt, so showing a different date source is confusing. A conversation from December 1st might show "Today" for date but "2:30 PM" from December 1st for time.

  4. SD card imports affected - Conversations synced from SD card recordings would also show import date rather than recording date.

  5. Date grouping is wrong - Conversations are grouped under the import date instead of when they actually occurred, making it impossible to browse historical conversations by their real dates.

  6. Historical context lost - The whole point of preserving started_at is to maintain when conversations actually happened. Displaying and filtering by created_at defeats this purpose.

Steps to Reproduce

  1. Use the Developer API to create a conversation with started_at set to a past date (e.g., December 1st)
  2. Open the app and view the conversation in the list
  3. Tap into the conversation detail view
  4. Observe: The date chip shows "Today" instead of "Dec 1"
  5. Go back and try to filter by December 1st using the calendar icon
  6. Observe: The conversation doesn't appear in filtered results

Suggested Fix

Update all date display and filtering logic to use the startedAt ?? createdAt pattern, which is already correctly implemented in the list view and detail view time chip.

This is a straightforward fix - just replace createdAt with startedAt ?? createdAt in the affected locations listed above.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions