Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(mobile): show done for unread completions #4961

Closeddanvernon(GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromrefs/pull/4961/headopened View on GitHub

Mobile thread rows show Working while a turn runs, but fall straight back to a timestamp when it completes. That makes it easy to miss work that finished while the user was in another thread or app.

This adds the same unread completion model used on desktop. Mobile keeps a device-local last-visited timestamp per scoped thread and shows Done when a successful turn completed after that visit. Opening the thread advances the marker and clears the label.

The status is wired through both mobile thread-list implementations. Approval, input, active, error, and plan-ready states keep priority over Done. Visit updates are focus-aware and use atomic preference updates so startup and rapid navigation cannot drop markers.

Evidence

BeforeAfter
Completed turn falls back to a timestampCompleted turn shows Done
BeforeAfter

Native simulator recording

Verification

  • pnpm exec vp test run apps/mobile/src/features/threads/threadListV2.test.ts apps/mobile/src/features/threads/threadPresentation.test.ts apps/mobile/src/state/thread-visits.test.ts apps/mobile/src/state/preferences.test.ts (35 tests)
  • pnpm exec vp run --filter @t3tools/mobile typecheck
  • Native iOS simulator: Working → Done → timestamp after reopening
  • Structured autoreview: clean, no actionable findings

Fixes #4952

Built with gpt-5.6-sol in T3 Code through the Codex harness.

Note

Show 'Done' status pill in mobile thread lists for unread completions

  • Introduces a useThreadVisits hook backed by mobile preferences to track per-thread last-visited timestamps, with markVisited called whenever a thread screen is focused and the app is active.
  • Adds hasUnseenCompletion logic to resolveThreadStatus and resolveThreadListV2Status: returns a 'done' status when the latest turn completed after the last visit timestamp.
  • Both ThreadListRow and ThreadListV2Row now accept a lastVisitedAt prop, and HomeScreen and ThreadNavigationSidebar thread rows are wired to pass it per-thread.
  • updatePreferencesAtom is extended to accept functional updates (current state → patch) to safely merge visit timestamps.
  • Behavioral Change: thread rows that previously showed no status after an AI turn completed will now show a green 'Done' pill until the thread is visited.
Macroscope summarized 6c625c8.
    1. coderabbitai[bot](GitHub profile, opens in a new tab)commented

      Important

      Review skipped

      Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

      ⚙️ Run configuration

      Configuration used: Repository UI

      Review profile: CHILL

      Plan: Pro Plus

      Run ID: fa5d162c-b964-412d-8b45-81d462860071

      You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

      Use the checkbox below for a quick retry:

      • 🔍 Trigger review

      Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

      ❤️ Share
      Comment `@coderabbitai help` to get the list of available commands.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    3. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      Approvability

      Verdict: Needs human review

      1 blocking correctness issue found. This PR introduces a new user-facing feature (showing 'Done' status for unread completions) with new state management, persistence logic, and cross-component integration. New features that introduce user-visible behavior changes warrant human review. There's also an unresolved comment about potential issues with the visit-marking logic.

      You can customize Macroscope's approvability policy. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    4. Just hit this on the Android legacy thread list. Rows show Working while a turn runs, then fall back to a plain timestamp, so it's easy to miss which tasks finished while the phone was locked. Looking forward to seeing this merged.

    5. One small parity note: the desktop sidebar labels this state "Completed" (resolveThreadStatusPill in Sidebar.logic.ts), while this PR uses "Done" on mobile. Matching the desktop wording would keep the two surfaces consistent.

    6. Closing as part of the open-PR backlog sweep (wave 1).

      Reason: Jul conflicted mobile unread-done treatment; activity/unread model changed.

      Reopen if this is still wanted and you’re willing to rebase onto current main.

    7. juliusmarminge closed this

Sign in to join this conversation.