Skip to content

feat(mobile): ping last_active_at on app foreground#14475

Merged
dylanjeffers merged 1 commit into
mainfrom
feat/last-active-at-ping
Jun 15, 2026
Merged

feat(mobile): ping last_active_at on app foreground#14475
dylanjeffers merged 1 commit into
mainfrom
feat/last-active-at-ping

Conversation

@dylanjeffers

Copy link
Copy Markdown
Contributor

Summary

  • Adds pingActivity function to AudiusBackend — fire-and-forget POST to /v1/users/me/ping with signature auth
  • Adds useActivityPing hook that fires on every foreground transition when user is logged in
  • Wires the hook into RootScreen alongside useResetNotificationBadgeCount

Related PRs

  • api: feat: add last_active_at column and /v1/users/me/ping endpoint
  • pedalboard: notifications: query users.last_active_at for inactive user detection

Test plan

  • Open app from background, verify network request to /v1/users/me/ping fires
  • Verify no request fires when logged out
  • Verify app behavior is unaffected if ping fails (fire-and-forget)
  • TypeScript compiles cleanly (npx tsc --noEmit --project packages/mobile/tsconfig.json)

🤖 Generated with Claude Code

Adds a pingActivity backend function and useActivityPing hook that fires
POST /v1/users/me/ping each time the mobile app enters the foreground,
recording the user's last app-open for inactivity notifications.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Jun 15, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: f73e0c1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions

Copy link
Copy Markdown
Contributor

🌐 Web preview ready

Preview URL: https://audius-web-preview-pr-14475.audius.workers.dev

Unique preview for this PR (deployed from this branch).
Workflow run

@dylanjeffers dylanjeffers merged commit c85c1d4 into main Jun 15, 2026
13 checks passed
@dylanjeffers dylanjeffers deleted the feat/last-active-at-ping branch June 15, 2026 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant