Skip to content

Refuse clipboard sends when no session is running - #46

Merged
rangoDJ merged 1 commit into
mainfrom
fix/clipboard-send-without-session
Oct 7, 2026
Merged

rangoDJ merged 1 commit into
mainfrom
fix/clipboard-send-without-session

Conversation

@rangoDJ

@rangoDJ rangoDJ commented Oct 7, 2026

Copy link
Copy Markdown
Owner

Fixes #45

What changed

  • SessionManager.set_clipboard() returns "No session is running" (400 from the API) when no client process is alive, instead of writing to an X clipboard nothing reads.
  • The Clipboard drawer says "Sent to the remote session's clipboard." on success (not "Windows", which was wrong for VNC/SSH) and "Not sent to the remote session: …" on failure, shown in the error style. Before, every result used the same unstyled box.

Testing

  • pytest: 227 passed, 3 skipped. New tests: no session → refused with xclip never run; an exited client → refused; a running session → text goes to xclip as UTF-8. The first two fail without the fix.
  • UI checked in the local dev server (no session): the drawer shows the red "Not sent to the remote session: No session is running" message. Screenshot below is described rather than attached.
  • Not tested against a live RDP/VNC/SSH session.

🤖 Generated with Claude Code

The Clipboard drawer reported "Sent to Windows clipboard." even with no
session connected: the text only reached the container's X clipboard,
where nothing reads it. set_clipboard() now refuses without a running
client, and the drawer shows failures as errors and names the session's
clipboard instead of assuming Windows.

Fixes #45

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rangoDJ
rangoDJ merged commit 350e9ec into main Oct 7, 2026
4 checks passed
@rangoDJ
rangoDJ deleted the fix/clipboard-send-without-session branch October 7, 2026 22:03
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.

Clipboard drawer says "Sent to Windows clipboard" when no session is running

1 participant