fix(mobile): force refresh active sessions - #4952
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryNo code changed since the previous review at Files Reviewed (0 files)
Previous findings reconciliation
These threads remain on the PR for human resolution; they are not re-reported here because they fall outside the incremental changed-line scope. Assumptions
Previous Review Summary (commit 1889a09)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 1889a09)Status: 3 Issues Found | Recommendation: Address before merge Executive Summary
Overview
Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (3 files)
Verified and not flagged
Assumptions
Reviewed by claude-opus-5 · Input: 20 · Output: 3.1K · Cached: 344.5K Review guidance: REVIEW.md from base branch |
Summary
What
Why
After a long background suspension, a missed connection transition can leave the Active now tray stale or empty. A plain query refetch can race with the live-sync owner and be cancelled.
How
useAgentSessions().refetch()choose the owner path or the plain-query fallback, never both.Verification
apps/mobile: pnpm test(297 files, 2583 tests)apps/mobile: pnpm format && pnpm typecheck && pnpm lint && pnpm check:unusedpnpm typecheckgit diff --checkVERIFICATION PASSED.— live Active now tray, pull-to-refresh with a live tray, and pull-to-refresh with an empty tray.Visual Changes
N/A — no UI change; this changes the manual-refresh code path only.