Skip to content

feat: per-session Remote Control mode (Claude Code /remote-control) - #7

Merged
HAN-oQo merged 14 commits into
mainfrom
feat/remote-control
Jul 14, 2026
Merged

HAN-oQo merged 14 commits into
mainfrom
feat/remote-control

Conversation

@HAN-oQo

@HAN-oQo HAN-oQo commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Summary

Adds per-session Remote Control for Claude Code sessions, wrapping Claude Code's native /remote-control feature. Switchboard adds no networking of its own — Claude's Anthropic-API transport does the work.

  • Launch a session with Remote Control (claude --remote-control [name]) via a New Session checkbox (local and SSH).
  • Toggle /remote-control on a running Claude session from a header 📱 button (only when idle).
  • A 📱 badge on the sidebar and grid cards marks which sessions are remote-controlled — amber while enabling, green once confirmed.
  • Captures the printed claude.ai/code/… session URL and offers Copy link / Open so you can jump to your phone.
  • State is runtime-only: optimistic → confirmed-by-URL, auto-reverts to "unavailable" if the URL never appears; migrated across fork/plan-accept re-keys; cleared on session exit.

New pure, unit-tested module remote-control.js (+ test/remote-control.test.js), wired into main.js, preload.js, and public/{dialogs,app,index,style}.

Notes / caveats

Design spec: docs/superpowers/specs/2026-07-14-remote-control-design.md
Implementation plan: docs/superpowers/plans/2026-07-14-remote-control.md

🤖 Generated with Claude Code

HAN-oQo and others added 14 commits July 14, 2026 15:38
Design for a Switchboard feature that toggles Claude Code's native
Remote Control (/remote-control) per session, shows which sessions are
remote-controlled, and surfaces the session URL/QR. No custom networking
— Claude Code's Anthropic-API transport does the work.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
8 TDD tasks: pure remote-control.js helpers, launch-flag wiring
(local + SSH), runtime /remote-control toggle IPC, state tracking +
URL parsing + events, New Session checkbox, sidebar/grid badge,
header toggle button, and copy-link/QR.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…e to RC sessions

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ions

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… nonexistent .session-name)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adds a small popover anchored near the header RC button showing the
confirmed Remote Control URL, with Copy link (clipboard) and Open
(default browser) actions, plus a close control. Auto-opens once per
"on" streak the moment a session's URL is confirmed, and hides on
RC off/pending or when switching to a session without a confirmed URL.

QR code display is intentionally out of scope (Claude Code already
prints a scannable QR in the terminal) — no vendored QR library added.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…med sessions

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…emote toggle

- A: re-key sessionRcState/sessionRcPopoverShown/rcPopoverSessionId in
  onSessionForked so RC badge/header state survives fork/plan-accept re-keying.
- B: clear sessionRcState/sessionRcPopoverShown in onProcessExited so a stopped
  session doesn't keep showing a stale "active" RC badge.
- C: allow toggling Remote Control on remote Claude sessions at runtime — both
  the main.js IPC guard and the renderer's updateRcHeader isClaude check now
  treat session.remoteMode === 'claude' as a Claude session even though remote
  sessions are isPlainTerminal/type:'terminal'.
- D: drop a dead !session.remoteControl check and a no-op ternary in main.js;
  add a comment clarifying that manually-toggled RC inside the terminal (outside
  Switchboard's own launch-flag/button flow) is intentionally undetected.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@HAN-oQo
HAN-oQo force-pushed the feat/remote-control branch from 8052847 to d9b5d1b Compare July 14, 2026 06:41
@HAN-oQo
HAN-oQo merged commit 395ff3c into main Jul 14, 2026
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.

1 participant