Repository navigation
Conversation
Enable connecting to a remote server in the Windows standalone desktop app (three-connection scheme). - Forward CLI arguments in Windows launcher (OpenResearch.exe) - Parse --remote, --port, --model, --no-agent in desktop app mode - Support companion configuration (OpenResearch.json) and ORX_REMOTE - Isolate remote desktop instances using host-specific single-instance mutex - Support desktop app lifecycle in up_remote (serving gateway during install/update and handling shutdown signals) - Navigate in-place within desktop webview and support custom SSH hosts in UI - Update documentation and test suites
[Medium impact] The changes affect the Windows desktop app and its remote SSH connection workflow. Fix the Linux desktop build and add a way back to the local workspace before merging. Findings
Fix with agent prompt### Issue 1
src/commands/app.rs:265
`run()` now passes a remote host to `instance::claim()`, but the Linux implementation still takes no arguments. This prevents builds with `--features desktop` from compiling. Update the Linux signature and call together.
### Issue 2
ui/src/components/RemoteHostDialog.tsx:49
Opening a remote host now replaces the local desktop page, but the remote page has no way back. Disconnect only closes SSH and leaves the window on the remote setup screen. Users must close and reopen the app to reach local projects or choose another host. Preserve the local address and provide a return action.
### Issue 3
src/commands/app.rs:494-498
Replacing every punctuation mark with `_` gives different valid hosts the same mutex name. For example, `gpu-1` and `gpu_1` both become `gpu_1`. Launching the second host then focuses the first host's window and exits without connecting. Include a hash of the full target in the name.
### Issue 4
src/commands/app.rs:781
The newly supported `--model` argument is lost when a local Windows desktop app restarts after an update. The app passes it to `up::run()`, but the Windows restart still launches only `app`. Forward the original app arguments during restart so the chosen model remains in effect.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.SummaryAdds remote connections to the standalone desktop app.
|
| // the claim (Linux relaunches by exec, which releases it). | ||
| crate::updates::await_replaced_parent(); | ||
| match instance::claim() { | ||
| match instance::claim(effective_remote.as_deref()) { |
There was a problem hiding this comment.
run() now passes a remote host to instance::claim(), but the Linux implementation still takes no arguments. This prevents builds with --features desktop from compiling. Update the Linux signature and call together.
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/commands/app.rs
Line: 265
Comment:
**Linux desktop builds fail**
`run()` now passes a remote host to `instance::claim()`, but the Linux implementation still takes no arguments. This prevents builds with `--features desktop` from compiling. Update the Linux signature and call together.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| locale: getLocale(), | ||
| }]); | ||
| if (remoteWindow) remoteWindow.location.replace(session.gatewayUrl); | ||
| else if (inDesktopApp) window.location.href = session.gatewayUrl; |
There was a problem hiding this comment.
Opening a remote host now replaces the local desktop page, but the remote page has no way back. Disconnect only closes SSH and leaves the window on the remote setup screen. Users must close and reopen the app to reach local projects or choose another host. Preserve the local address and provide a return action.
Prompt To Fix With AI
This is a comment left during a code review.
Path: ui/src/components/RemoteHostDialog.tsx
Line: 49
Comment:
**Remote page has no return**
Opening a remote host now replaces the local desktop page, but the remote page has no way back. Disconnect only closes SSH and leaves the window on the remote setup screen. Users must close and reopen the app to reach local projects or choose another host. Preserve the local address and provide a return action.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| let clean: String = r | ||
| .chars() | ||
| .map(|c| if c.is_alphanumeric() { c } else { '_' }) | ||
| .collect(); | ||
| (format!("{FOCUS_EVENT}_{clean}"), format!("{MUTEX}_{clean}")) |
There was a problem hiding this comment.
Different hosts share one window
Replacing every punctuation mark with _ gives different valid hosts the same mutex name. For example, gpu-1 and gpu_1 both become gpu_1. Launching the second host then focuses the first host's window and exits without connecting. Include a hash of the full target in the name.
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/commands/app.rs
Line: 494-498
Comment:
**Different hosts share one window**
Replacing every punctuation mark with `_` gives different valid hosts the same mutex name. For example, `gpu-1` and `gpu_1` both become `gpu_1`. Launching the second host then focuses the first host's window and exits without connecting. Include a hash of the full target in the name.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| // Dashboard server on background workers (we're inside main's runtime). | ||
| // Dashboard server / presentation gateway on background workers (we're inside main's runtime). | ||
| let remote_target = effective_remote.clone(); | ||
| let app_model = app_args.model.clone(); |
There was a problem hiding this comment.
Restart forgets the chosen model
The newly supported --model argument is lost when a local Windows desktop app restarts after an update. The app passes it to up::run(), but the Windows restart still launches only app. Forward the original app arguments during restart so the chosen model remains in effect.
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/commands/app.rs
Line: 781
Comment:
**Restart forgets the chosen model**
The newly supported `--model` argument is lost when a local Windows desktop app restarts after an update. The app passes it to `up::run()`, but the Windows restart still launches only `app`. Forward the original app arguments during restart so the chosen model remains in effect.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.- Align Linux desktop instance::claim signature to accept remote host - Include target token hash in instance mutex and socket names to avoid collision between distinct hosts - Preserve command line arguments on Windows and Linux desktop app relaunch - Preserve local workspace address when connecting to remote host in desktop app and provide return actions - Add localization for return to local workspace across all supported languages
|
All review feedback addressed in commit 378527a:
|
Closes #793
Summary
Enables the Windows standalone desktop app (
OpenResearch.exe) to connect to a remote server runningorxin the three-connection architecture (e.g.orxrunning on a local cluster/server while the Windows desktop app monitors and drives the session).Key updates:
OpenResearch.exenow forwards arguments (std::env::args_os().skip(1)) toorx.exe app, enabling--remote <host>,--port,--model, and--no-agentvia command line or desktop shortcuts.OpenResearch.json/openresearch.jsonplaced beside the executable,ORX_REMOTE/ORX_APP_REMOTEenvironment variables, anddefault_remotesettings.MUTEX_<clean_host>), allowing local and remote desktop windows to run simultaneously without conflict.up_remote::runkeeps the gateway serving so the webview can display installation/update screens and responds to window close shutdown signals.window.location.href) instead of popping open the external system browser.user@hostconnection strings and IP addresses in addition to SSH config aliases.docs/windows.mdwith usage instructions for the three-connection scheme.Test plan
cargo test --locked— 989 unit tests + integration test suites).node --test ui/tests/*.test.mjs— all 208 tests passing, including desktop in-place navigation and custom host tests).cargo fmt --all --check,cargo fmt --manifest-path windows/launcher/Cargo.toml --check, andcargo clippy --all-targets -- -D warnings.pnpm --dir ui typecheck,node ui/scripts/check-i18n.mjs, andnode ui/scripts/check-styles.mjs.pnpm --dir ui build.