Skip to content

fix: remove 30-minute recency window that silently drops notifications - #3

Open
jeffstieler wants to merge 1 commit into
LiboShen:mainfrom
jeffstieler:fix/silent-notification-drops
Open

jeffstieler wants to merge 1 commit into
LiboShen:mainfrom
jeffstieler:fix/silent-notification-drops

Conversation

@jeffstieler

Copy link
Copy Markdown

Summary

  • Removes the _notificationRecencyWindow (30-minute) check in _handleAgentNotification that silently drops push notifications when the last WebRTC session was more than 30 minutes ago
  • This is the primary use case for AFK — the user stepped away from their desk and wants to be notified when their coding agent finishes a task
  • The APNs token check remains as a valid guard (no token = can't deliver)

Context

The full notification flow: CLI → Unix socket → CliServer → _handleAgentNotification → signaling server → APNs → phone.

The CLI side works perfectly — socket connects, data flushes, exits 0. But inside _handleAgentNotification, the 30-minute recency check silently discards the notification before it reaches the signaling server. The user gets no feedback that their notification was dropped.

See #2 for the full root cause analysis.

Test plan

  • Pair phone with host, establish a WebRTC session, then disconnect
  • Wait >30 minutes
  • Run afk notify 'test'
  • Verify notification is delivered to phone

The _notificationRecencyWindow check causes agent notifications to be
silently discarded when the last WebRTC session was more than 30 minutes
ago. This is the primary use case for AFK — the user stepped away and
wants to be notified when their agent finishes.

The APNs token check remains as a valid guard (no token = no way to
deliver), but the time-based gate defeats the purpose of the app.

Fixes LiboShen#2
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