Skip to content

feat: support connecting desktop app to an existing remote t3 server#1013

Open
Microck wants to merge 6 commits intopingdotgg:mainfrom
Microck:feat/desktop-remote-tailscale
Open

feat: support connecting desktop app to an existing remote t3 server#1013
Microck wants to merge 6 commits intopingdotgg:mainfrom
Microck:feat/desktop-remote-tailscale

Conversation

@Microck
Copy link

@Microck Microck commented Mar 13, 2026

What Changed

Adds a small remote-connect workflow for the desktop app so it can connect to an already-running t3 server on a VPS or Tailnet host.

Changes included in this PR:

  • added a Connection URL field in desktop Settings
  • the desktop app remembers the saved connection URL on that machine
  • added t3 --remote as a shortcut for remote-friendly server startup
  • t3 --remote uses port 3773 by default unless --port is provided
  • t3 --remote prefers a Tailscale IP when one is available and prints a paste-ready desktop connection URL
  • in remote mode, the desktop app avoids the local folder picker and falls back to manual remote path entry

Default local desktop behavior is unchanged.

Why

This makes the desktop app usable in headless and VPS workflows without requiring the bundled local backend to run on the same machine as the desktop shell.

The intended flow is:

  1. Run t3 --remote on the VPS
  2. Copy the printed URL
  3. Paste it into the desktop app once
  4. Reopen the app later without re-entering it

This PR intentionally does not add provisioning, automatic pairing, protocol changes, or profile management.

UI Changes

Demo video:
https://github.com/user-attachments/assets/13f48bda-3dbe-4978-a1a0-ddf01dc35f33

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included a video for interaction changes

Note

Add remote server connection support to the desktop app

  • Adds a --remote flag to the server CLI that binds to 0.0.0.0 on port 3773, suppresses browser launch, and prints a desktop-ready connection URL on startup (detecting Tailscale and other external interfaces).
  • Adds connection settings persistence in the desktop main process: settings (mode, remote URL, auth token) are read/written to desktop-connection.json in Electron's userData path.
  • In remote mode, the desktop skips starting the local backend and uses the configured WebSocket URL via T3CODE_DESKTOP_WS_URL instead.
  • Adds a Connection section in the Settings UI where users can paste a server URL; saving triggers an app restart to apply the change.
  • The Sidebar adapts to remote mode by skipping the native folder picker and prompting for a manual path instead.
  • Behavioral Change: desktop startup flow now resolves connection mode before registering IPC handlers; local backend is not spawned in remote mode.

Macroscope summarized 0a9e8ed.

@coderabbitai
Copy link

coderabbitai bot commented Mar 13, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 603e90cf-5474-4419-b7b8-0f4dc0b58ba5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

CodeRabbit can scan for known vulnerabilities in your dependencies using OSV Scanner.

OSV Scanner will automatically detect and report security vulnerabilities in your project's dependencies. No additional configuration is required.

@github-actions github-actions bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:XXL 1,000+ changed lines (additions + deletions). labels Mar 13, 2026
@github-actions github-actions bot added size:XL 500-999 changed lines (additions + deletions). and removed size:XXL 1,000+ changed lines (additions + deletions). labels Mar 13, 2026
@Microck Microck changed the title feat: support connecting desktop to an existing remote t3 server feat: support connecting desktop app to an existing remote t3 server Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL 500-999 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant