Skip to content

Desktop: Forward file args from secondary launches to the running instance via local socket#4123

Open
timon-schelling wants to merge 4 commits intomasterfrom
desktop-socket-mvp
Open

Desktop: Forward file args from secondary launches to the running instance via local socket#4123
timon-schelling wants to merge 4 commits intomasterfrom
desktop-socket-mvp

Conversation

@timon-schelling
Copy link
Copy Markdown
Member

@timon-schelling timon-schelling commented May 7, 2026

supersedes #4117

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 10 files

Confidence score: 5/5

  • This PR looks low risk to merge: the only reported issue is a low-severity documentation/comment mismatch (2/10) rather than a functional change.
  • In deny.toml, the new inline comment references /deny.toml instead of /about.toml, which could mislead maintainers but should not affect runtime behavior.
  • Pay close attention to deny.toml - correct the inline path reference to avoid future configuration confusion.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="deny.toml">

<violation number="1" location="deny.toml:66">
P3: The new inline comment points to `/deny.toml` (the current file), which is misleading. It should reference `/about.toml` like the other license entries.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Comment thread deny.toml Outdated
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request implements cross-platform single-instance behavior by using a local socket to communicate between instances. When a second instance of the application is launched with file arguments, it attempts to send those paths to the already running instance via the interprocess crate before exiting. The existing macOS-specific launch document logic has been refactored into a unified OpenFiles event. Feedback from the review highlights a security concern regarding potential resource exhaustion when reading from the socket without size limits or timeouts, as well as a potential naming collision for Windows named pipes in multi-user environments.

Comment thread desktop/src/socket.rs
Comment thread desktop/src/socket.rs Outdated
…nstance

Also adds socket infrastructure that can be used in the future to allow dispatching actions from another process
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