Skip to content

Conversation

@callzhang
Copy link
Owner

@callzhang callzhang commented Nov 19, 2025

Summary

  • allow the macOS sync engine to treat empty nonce/tag values from Android as valid plain text frames so clipboard updates decode again
  • keep LAN WebSocket connection metadata in sync with the device IDs carried by clipboard envelopes and expose a delegate callback when the device is identified
  • post device connection status updates when a device is identified and ensure connection teardown still reports the device before metadata is discarded

Testing

  • cd macos && swift test (fails: missing macOS AppKit in container)

Codex Task


Note

Treat empty nonce/tag as plaintext in sync, propagate device identity via WebSocket envelopes, and introduce a prober to infer/publish device online status from LAN activity.

  • macOS Services:
    • ConnectionStatusProber (new):
      • Periodically infers device online/offline from last activity and LAN discovery, with manual overrides, and posts DeviceConnectionStatusChanged.
      • Tracks LAN peer add/remove, activity pings, and provides immediate status publishing; started/stopped by TransportManager.
    • TransportManager:
      • Integrates ConnectionStatusProber; records activity on clipboard/device events and LAN discovery changes; replaces direct status notifications.
      • Registers notification observer for ClipboardReceivedFromDevice; cleans up observers on deinit.
    • LanWebSocketServer:
      • Keeps connectionMetadata in sync with clipboard envelope deviceId and adds delegate callback didIdentifyDevice when device is determined.
      • updateConnectionMetadata now returns metadata; adjusts close ordering to notify delegate before clearing metadata.
    • SyncEngine:
      • Decodes empty encryption.nonce/tag as plaintext mode (no decryption), restoring clipboard decode compatibility with Android.

Written by Cursor Bugbot for commit c12f1be. This will update automatically on new commits. Configure here.

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.

2 participants