Repository navigation
Connect to another computer just works: starts Solenta there, signs in, shows connection status (#1660) - #1674
Conversation
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Connect's host prepare step `open -n`ed Solenta whenever nothing answered on the web port. A running copy older than the macOS single-instance lock (or updated on disk but not restarted) never took the hand-off, so the new process booted as a second writer on the shared userData. - Already running: launch the same build with --handoff-only, and only if its main.js knows that flag; otherwise exit 5 with "turn on Serve Solenta Web there". --handoff-only exits instead of booting when it gets the lock. - macOS takes the lock but only --serve-web launches exit on it, so a prod and a nightly can still run side by side as before. - A --serve-web hand-off during boot is applied once webAccess exists. - Plain-language SSH errors for unknown host, Remote Login off, timeouts. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 19f34ffa02
ℹ️ 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".
| // ponytail: turns the saved switch on (saved LAN choice, default port); | ||
| // the other launch's --serve-web=PORT / --serve-host are not applied. | ||
| if (webAccess) { | ||
| void webAccess.setEnabled({ enabled: true }).catch((err) => |
There was a problem hiding this comment.
Honor the requested port during single-instance handoff
When Connect targets a non-default port and Solenta is already running with web access disabled, the SSH preparation launches --serve-web=<port> --handoff-only, but this handler discards the parsed port and calls setEnabled with only enabled: true. The running app therefore listens on the default port 4620 while the preparation script waits on the requested port (for example 4700) and eventually reports that Solenta failed to start. Pass the parsed port through the handoff/start path.
Useful? React with 👍 / 👎.
| const p = Number(port); | ||
| return `sh -c ' | ||
| tok() { cat "$HOME/Library/Application Support/Solenta/web-token" 2>/dev/null || cat "\${XDG_CONFIG_HOME:-$HOME/.config}/Solenta/web-token" 2>/dev/null; } | ||
| up() { command -v curl >/dev/null 2>&1 || return 0; curl -s -o /dev/null -m 2 "http://127.0.0.1:${p}/"; } |
There was a problem hiding this comment.
Probe the remote port when curl is unavailable
On a minimal Linux host without curl, up() returns success without checking the port, so the surrounding if ! up skips all cold-start logic. A host with Solenta installed but not running then either returns no token or later fails because nothing is listening, defeating the new automatic startup path; this also affects wget-only hosts that the installer explicitly supports. Use an available probe such as wget, or treat a missing probe tool as not up.
Useful? React with 👍 / 👎.
5ceac7b
into
coder/onboarding-agent-readiness-1659
…n, shows connection status (#1660) (#1674) * Remote access setup from ce03de (#1660) Co-Authored-By: Claude Opus 5.5 <[email protected]> * Never boot a second store writer when Connect hands off to a running app Connect's host prepare step `open -n`ed Solenta whenever nothing answered on the web port. A running copy older than the macOS single-instance lock (or updated on disk but not restarted) never took the hand-off, so the new process booted as a second writer on the shared userData. - Already running: launch the same build with --handoff-only, and only if its main.js knows that flag; otherwise exit 5 with "turn on Serve Solenta Web there". --handoff-only exits instead of booting when it gets the lock. - macOS takes the lock but only --serve-web launches exit on it, so a prod and a nightly can still run side by side as before. - A --serve-web hand-off during boot is applied once webAccess exists. - Plain-language SSH errors for unknown host, Remote Login off, timeouts. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Willem <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
Closes #1660. Stacked on #1673. Merge that first, then retarget this PR to
mainbefore deleting its branch.Running Solenta on a second machine used to need a prior
--serve-weblaunch, a copied token, and guesswork when it failed. Now you enter an SSH host and press Connect.A. SSH hosts just work
web-token, including the Settings switch. Its device row is renamed "SSH and command line".--serve-webhands off through the single-instance lock and turns web access on.~/solenta, and reports any missing libraries as anapt installline. Older hosts get Update. After connecting, the host's version and agent sign-ins are listed.B. Sign-in and connection status
C. Connections pane and guide
solenta --serve-webexample (no such command on macOS) and the stale--hostcomment.E. Headless
--headlessimplies--serve-weband opens no window.Safety fix found in review. The prepare step
open -ned Solenta whenever nothing answered. If the running copy was older than the macOS single-instance lock, or updated on disk but not restarted, it never took the hand-off. The new process then booted as a second writer on the shared store; this Mac's own Nightly was in that state. Now:--handoff-onlyif its bundle knows the flag. Otherwise Connect asks you to turn on Serve Solenta Web there.--handoff-onlyexits instead of booting when it gets the lock.--serve-weblaunches exit on it, so prod and nightly still run side by side as before.Tests: typecheck and
vite buildpass. Full suites in a CI-like env: renderer 3140 pass / 0 fail, electron 4899 pass / 0 fail. The prepare script ran in an arm64 Linux container against an ELF stub for four cases: cold start, running but too old (exit 5, nothing launched), running and able to take the hand-off, and not installed.Not tested end to end: a real Solenta Linux build running headless, and a real Mac host over SSH. The macOS detection lines were only dry-run read-only on this Mac.
🤖 Generated with Claude Code