Skip to content

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

Open
danvernon wants to merge 2 commits into
pingdotgg:mainfrom
danvernon:t3code/fix-mobile-done-status
Open

fix(mobile): show done for unread completions#4961
danvernon wants to merge 2 commits into
pingdotgg:mainfrom
danvernon:t3code/fix-mobile-done-status

Conversation

@danvernon

@danvernon danvernon commented Jul 30, 2026

Copy link
Copy Markdown

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

Before After
Completed turn falls back to a timestamp Completed turn shows Done
Before After

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: WorkingDone → 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.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

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.

@github-actions github-actions Bot added size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Jul 30, 2026
@danvernon
danvernon marked this pull request as ready for review July 30, 2026 11:01
@macroscopeapp

macroscopeapp Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

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.

@danvernon
danvernon force-pushed the t3code/fix-mobile-done-status branch from f2dd3fa to 9e212e9 Compare July 30, 2026 13:45
Comment thread apps/mobile/src/features/threads/ThreadRouteScreen.tsx
@danvernon
danvernon force-pushed the t3code/fix-mobile-done-status branch from 7036b36 to 6c625c8 Compare July 30, 2026 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Mobile thread list never shows Done after a turn completes

1 participant