Skip to content

feat: add last_active_at column and /v1/users/me/ping endpoint#952

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

feat: add last_active_at column and /v1/users/me/ping endpoint#952
dylanjeffers merged 1 commit into
mainfrom
feat/last-active-at-ping

Conversation

@dylanjeffers

Copy link
Copy Markdown
Contributor

Summary

  • Adds last_active_at TIMESTAMPTZ column to the users table (migration 0221)
  • Adds POST /v1/users/me/ping — authenticated endpoint that sets last_active_at = now() for the calling user's wallet
  • This replaces the plays-based inactivity signal with a direct app-open signal for push notifications

Related PRs

  • apps: feat(mobile): ping last_active_at on app foreground
  • pedalboard: notifications: query users.last_active_at for inactive user detection

Test plan

  • Run migration against local DB, verify column added
  • Call POST /v1/users/me/ping with valid auth headers, verify 200 and last_active_at updated
  • Call without auth, verify 401
  • Verify writePool == nil returns 503

🤖 Generated with Claude Code

Adds a `last_active_at` timestamptz column to the users table and a new
authenticated endpoint that upserts it on each app-open. This replaces
plays-based inactivity detection with a direct activity signal.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dylanjeffers dylanjeffers merged commit 1c4da26 into main Jun 15, 2026
5 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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant