Skip to content

Omi cv1 Android: convos missing but appear using filter #10198

Closed

Description

@hugoaap-code

Conversations screen won't show conversations from today. Also several conversations missing. They do show when I use the date filter.

Screenshot_20260721_064849_Omi.jpg

Activity

  1. aryanorastar commented on Jul 23, 2026

    @aryanorastar
    Collaborator

    Root-caused this — it's a UTC-vs-local day-grouping bug, not data loss. The conversations exist (which is why the date filter finds them); they're just filed under the wrong day.

    started_at / created_at arrive from the API as UTC (ISO-8601 with Z), and ServerConversation.fromGenerated keeps them as UTC DateTimes. The conversations list then buckets into day-groups using those timestamps' raw UTC calendar day — app/lib/providers/conversation_provider.dart, _buildGroupedByDate (and the sibling groupers) do:

    final effectiveDate = conversation.startedAt ?? conversation.createdAt;      // UTC
    final date = DateTime(effectiveDate.year, effectiveDate.month, effectiveDate.day); // UTC day

    But the date filter builds its range from the local selectedDate (_getDateFilterRange): DateTime(selectedDate.year, .month, .day, 0,0,0) … 23:59:59 — a local-day window.

    So for any viewer east of UTC, an early-morning-local conversation is still the previous day in UTC and gets filed under "Yesterday" — absent from "Today" — while the local-day filter still returns it. Example: 06:48 local on 2026-07-21 at UTC+10 = 20:48 UTC on 2026-07-20. The screenshot's 06:48 capture time fits a positive-UTC-offset device exactly.

    Fix direction: bucket by the local calendar day (.toLocal() before truncating to y/m/d) at the grouping sites, so grouping agrees with the local-day filter and the Today/Yesterday labels. I have this implemented (one shared localDayKey helper applied at each bucketing site) and can open a PR.

    One caveat for whoever picks it up: the divergence isn't hermetically unit-testable — DateTime.toLocal() uses the ambient timezone, which is UTC in CI, so UTC-day == local-day there. On-device confirmation in a UTC+ timezone (or threading the user's UTC offset through an injectable helper) is the real proof.

  2. moved this from Someday to In review in omi TODO / bountieson Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions