-
-
Notifications
You must be signed in to change notification settings - Fork 159
feat(remote): proxy core commands via daemon #121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
This is ready: #114 should I merge it? |
|
#114 still looks relevant to merge. It enables a native Windows build, but it does not address the core #54 constraint: keeping The optional remote backend work discussed in #54 remains useful for WSL2, dev boxes, containers, and stricter privilege boundaries. In practice, #114 makes that direction more valuable by providing a solid native Windows client baseline. So yes, feel free to merge #114. It should not block #121 or the rest of the #54 plan. |
|
@codex review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6ec46ebf58
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
6ec46eb to
f8b7c5a
Compare
|
@codex review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 404dae659c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
src-tauri/src/remote_backend.rs
Outdated
| .send(message) | ||
| .map_err(|_| DISCONNECTED_MESSAGE.to_string())?; | ||
|
|
||
| rx.await | ||
| .map_err(|_| DISCONNECTED_MESSAGE.to_string())? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid hanging calls after remote disconnect
If the daemon drops the TCP connection (e.g., a remote backend restart), the reader task exits and drains only the pending requests that existed at that moment, but call() still allows new requests to be enqueued and then awaits a oneshot with no timeout. Because the write task can still accept the send even though the socket is closed, those later calls can wait forever with no response and no disconnect error surfaced to the UI. This will leave any remote-mode Tauri command hanging indefinitely until the app restarts. Consider marking the client disconnected when the read loop ends or propagating write failures to drain pending/new calls.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pushed a small follow-up that prevents remote-mode commands from hanging after a daemon disconnect (restart, TCP drop).
- The client now tracks a shared
connectedflag. - When the read loop ends or the write loop hits an IO error, it marks the client disconnected and drains
pending, completing all waiting calls withremote backend disconnected. - New calls fail fast once disconnected.
Commit: 214785c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small correction: the fix was rebased, so the current commit in the PR is 65b28e5 (fix(remote): fail fast on daemon disconnect).
404dae6 to
65b28e5
Compare
Part of the optional remote backend mode RFC (#54).
What
Adds a Tauri-side remote backend proxy layer that can (optionally) forward a subset of backend commands to the daemon introduced in #58.
src-tauri/src/remote_backend.rsWhy
This is the next incremental step after:
backendMode,remoteBackendHost,remoteBackendToken)The goal is to allow the UI to keep using the same Tauri commands/events, while the Rust side can swap between:
local(current behaviour)remote(daemon over localhost JSON-RPC)Notes
backendMode=remote.Validation
npm cinpm run typechecknpm run buildRust compilation/tests require platform WebKitGTK deps on Linux; CI should cover this.