Commit 0f000be
fix(mobile): also ping last_active_at on initial app open (#14477)
## Summary
- `useActivityPing` relied solely on `useEnterForeground` (an
`AppState.addEventListener('change')` wrapper), which only fires on
state *transitions*
- On first launch the app starts in `active` with no transition, so the
`last_active_at` ping was never sent until the user backgrounded and
re-opened the app
- Added a `useEffect` that fires the ping immediately on mount (when the
user is logged in), so first-open is now covered alongside subsequent
foreground transitions
## Test plan
- [ ] Fresh app launch with a logged-in user — verify `last_active_at`
is updated on the identity service
- [ ] Background + foreground the app — verify the ping still fires on
re-entry
- [ ] Launch while logged out, then sign in — verify no errors from the
early mount (guard on `currentUserId` prevents the call)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 129a5f6 commit 0f000be
0 file changed
0 commit comments