Walkthrough
-
Mobile registration retains a previously observed native push token when a later lookup fails. It reports a tokenless registration as failed when notifications are enabled. Relay device listings report notifications as enabled only when the saved preference is enabled and a push token exists.
Changes: Push notification registration
Layer / File(s) Summary Mobile token handling and registration status
apps/mobile/src/features/agent-awareness/remoteRegistration.ts,apps/mobile/src/features/agent-awareness/remoteRegistration.test.tsMobile registration caches native tokens and falls back to the cached token when a new lookup fails. It derives registration status from the payload. Android tests cover initial registration and refresh after token lookup failures. Relay notification state in device listings
infra/relay/src/agentActivity/Devices.ts,infra/relay/src/agentActivity/Devices.test.tsDevice listings report notifications as enabled only when the saved preference is enabled and the device has a push token. Tests cover null and non-null tokens. Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Bug fix · Severity of issue fixed: Medium
Possibly related issues
- pingdotgg/t3code#26678: The issue identifies tokenless registration as a possible cause of missing notifications; this change prevents tokenless registrations from reporting notifications as enabled.
Suggested reviewers:
pixpmusic,maria-rcks,t3dotgg
Merge Risk: External image Low · up to fe445
-
In a narrow timing window, a rotated push token could be replaced by a stale one in the app's cache. Notifications would then appear registered while delivery fails. The core change otherwise behaves as intended, so this is worth fixing but is not a broad merge risk.
Pre-merge checks: Passed 4
-
Check name Status Explanation Title check Passed The title clearly and concisely describes the main fix: mobile push-token failures no longer falsely report notifications as enabled. Description check Passed The description includes all required sections: Problem, Change, Scope and approval, and Verification. It explains the failure, implementation across mobile and relay components, linked issue, test re… Linked Issues check Passed Issue #26530requires token-fetch failures to avoid false successful notification registration and to preserve an accepted notification state during refresh.nativePushTokenRegistrationkeeps notifi…Out of Scope Changes check Passed The changes stay within issue #26530. The production changes update mobile token handling, registration status, relay token preservation, and relay device listing. The added tests directly verify thes…Full details: Description check
-
Explanation
The description includes all required sections: Problem, Change, Scope and approval, and Verification. It explains the failure, implementation across mobile and relay components, linked issue, test results, and unverified device checks.
Full details: Linked Issues check
-
Explanation
Issue
#26530requires token-fetch failures to avoid false successful notification registration and to preserve an accepted notification state during refresh.nativePushTokenRegistrationkeeps notifications enabled after permission is granted, reuses the session token when available, and sends no token when lookup fails.registerDeviceWithRelayreportsfailedwhen notifications are enabled without a token.Devices.listForUserreports notifications enabled only when a push token exists. The added mobile and relay tests cover these cases.
Full details: Out of Scope Changes check
-
Explanation
The changes stay within issue
#26530. The production changes update mobile token handling, registration status, relay token preservation, and relay device listing. The added tests directly verify these behaviors. No unrelated product behavior is identified.
-
Finishing Touches
-
Generate docstrings
-
- Commit to this branch
- Create a new PR
Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Usage-based review receipt
- Mode: Continue automatically
- Reviewed files: 2
- Charged: $0.50
- View usage details
Note
This review was completed with usage-based billing: files reviewed beyond your plan's included limits are billed at $0.25/file. View usage-based billing.