Skip to content

Sonny: a link with nowhere to open is copied and said so, SSH or not - #636

Merged
lydakis merged 1 commit into
mainfrom
claude/project-thread-cf77db
Nov 1, 2026
Merged

lydakis merged 1 commit into
mainfrom
claude/project-thread-cf77db

Conversation

@lydakis

@lydakis lydakis commented Nov 1, 2026 •

Copy link
Copy Markdown
Owner

What

A tester running Sonny inside Herdr on a remote Linux machine with no display reported that clicking a link did nothing and showed no error.

Sonny's open (sonny/src/main.rs) checked "is there anywhere to open this?" using SSH_CONNECTION and SSH_TTY. A Herdr or tmux server outlives the SSH session that started it, so its panes don't have those variables. Sonny then handed the link to xdg-open, which started and failed out of sight.

Now:

  • Linux: checks for a display (DISPLAY, WAYLAND_DISPLAY, or BROWSER), with or without SSH. WSL still opens on Windows (WSL_DISTRO_NAME). With none of them, Sonny copies the link (OSC 52) and shows the notice nothing opens on this machine; copied <link>. The notice includes the link, so it can be selected even when the clipboard copy doesn't get through a multiplexer.
  • macOS: unchanged. Over SSH with no BROWSER, Sonny copies, because open would show the link on that Mac's own screen.

Plain clicks in the conversation already go to Sonny (screen.rs, Action::Open), so they take this path. Ctrl-click in Herdr still goes to the terminal, as before.

This is the first step of the two-machine design (a link that opens things on the laptop). That design isn't built yet and needs no daemon change.

Checks

  • cargo test -p sonny --bin sonny with_nothing_to_open covers Mac, Linux, SSH or not, a multiplexer server with no SSH variables, X forwarding, Wayland, BROWSER, and WSL.
  • cargo clippy -p sonny --all-targets -D warnings is clean, and cargo fmt was run.
  • No screenshot: the only visible change is the notice text quoted above.

sonny/FEATURES.md row updated.

On Linux, Sonny decided "nothing can open here" from the SSH variables.
A Herdr or tmux server outlives the SSH session that started it, so its
panes lack them, and a click on a box with no display handed the link to
an opener that failed out of sight. Now Linux checks for a display
(DISPLAY, WAYLAND_DISPLAY, BROWSER; WSL opens on Windows) and copies the
link with a notice when there is none. macOS keeps the SSH check.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013jkdGFQFsMWT3ryazYxU9H
@lydakis lydakis self-assigned this Nov 1, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-01T21:16:25.014415Z bc852bb PR opened
🔒 Security Review ✅ Completed 2026-11-01T21:17:26.129955Z bc852bb PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@lydakis
lydakis merged commit feb25ba into main Nov 1, 2026
10 checks passed
@lydakis
lydakis deleted the claude/project-thread-cf77db branch November 1, 2026 21:40
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.

2 participants