Repository navigation
Deliver Windows launch links once - #18
Conversation
…connects. A beam restart was opening the original URL again, and a link that arrived with no client was discarded. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
Bugbot Autofix is ON, but it could not run because on-demand usage is turned off. To enable Bugbot Autofix, turn on on-demand usage and set a spend limit in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 842e340. Configure here.
| client_sock_ = s; | ||
| buffer_.clear(); | ||
| WSAAsyncSelect(client_sock_, notify_hwnd_, WM_EDW_SOCKET, FD_READ | FD_CLOSE); | ||
| flush_queued(); |
There was a problem hiding this comment.
Queued links lost on reconnect
High Severity
flush_queued runs in accept_client as soon as the TCP socket is accepted, before the Elixir client finishes initialize. Transport.connect/2 is still in recv_result/3 and discards any frame that is not that initialize reply, so a protocol URL queued while the BEAM is down is consumed and never reaches EventBridge.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 842e340. Configure here.
flush_queued ran as soon as the TCP socket was accepted. Transport.connect is still in recv_result and drops every frame except the initialize reply, so a protocol URL queued while BEAM was down never reached EventBridge. Co-authored-by: Dominic Letz <dominicletz@users.noreply.github.com>


Summary
event.system.open_urlin the event bridge untilDesktop.Envis up.Test plan
Made with Cursor
Note
Medium Risk
Changes cold-start argv/env forwarding and the timing of open-url delivery across BEAM restarts and RPC connect; incorrect behavior could drop or duplicate deep links.
Reviewed by Cursor Bugbot for commit 842e340. Configure here.
Summary
initialize. TCP accept is too early:Transport.connect/2discards every frame except that reply, so a protocol URL queued while BEAM was down never reached EventBridge.event.system.open_urlin the event bridge untilDesktop.Envis up.Test plan
initialize.mix test test/desktop_webview/transport_connect_test.exs— a notification written before the initialize result is dropped; one written after it is delivered.