Skip to content

Add direct connection support and fix persistent mode#58

Merged
PureWeen merged 1 commit intomainfrom
dev/redth/fix-persistent-server
Feb 11, 2026
Merged

Add direct connection support and fix persistent mode#58
PureWeen merged 1 commit intomainfrom
dev/redth/fix-persistent-server

Conversation

@Redth
Copy link
Collaborator

@Redth Redth commented Feb 11, 2026

Direct Connection (Tailscale/LAN/VPN):

  • Add ServerPassword and DirectSharingEnabled to ConnectionSettings
  • Support password auth in WsBridgeServer (alongside DevTunnel token)
  • Create TailscaleService for auto-detecting Tailscale IP/DNS via local API
  • Add Direct Connection UI section in desktop Settings with password, LAN IP detection, QR code generation, and Tailscale integration
  • Update mobile connection UI labels to be transport-agnostic
  • Auto-start direct sharing on app launch when previously enabled
  • WsBridgeServer can now run independently of DevTunnelService

Fix persistent mode showing Disconnected:

  • SDK CliUrl + headless server mode hangs on StartAsync due to UseLoggedInUser auth flow bug (see github/copilot-sdk for details)
  • Replace headless server approach with embedded stdio mode using CliPath for both Embedded and Persistent connection modes
  • Sessions still persist via SDK's built-in ResumeSessionAsync

Debugging improvements:

  • Add ILogger for structured logging via MauiDevFlow
  • Add try/catch around StartAsync for clearer error reporting
  • Add .mauidevflow config for MauiDevFlow CLI port auto-detection

Direct Connection (Tailscale/LAN/VPN):
- Add ServerPassword and DirectSharingEnabled to ConnectionSettings
- Support password auth in WsBridgeServer (alongside DevTunnel token)
- Create TailscaleService for auto-detecting Tailscale IP/DNS via local API
- Add Direct Connection UI section in desktop Settings with password,
  LAN IP detection, QR code generation, and Tailscale integration
- Update mobile connection UI labels to be transport-agnostic
- Auto-start direct sharing on app launch when previously enabled
- WsBridgeServer can now run independently of DevTunnelService

Fix persistent mode showing Disconnected:
- SDK CliUrl + headless server mode hangs on StartAsync due to
  UseLoggedInUser auth flow bug (see github/copilot-sdk for details)
- Replace headless server approach with embedded stdio mode using
  CliPath for both Embedded and Persistent connection modes
- Sessions still persist via SDK's built-in ResumeSessionAsync

Debugging improvements:
- Add ILogger<CopilotService> for structured logging via MauiDevFlow
- Add try/catch around StartAsync for clearer error reporting
- Add .mauidevflow config for MauiDevFlow CLI port auto-detection
@PureWeen PureWeen force-pushed the dev/redth/fix-persistent-server branch from a4ca333 to eb41d8f Compare February 11, 2026 19:30
@PureWeen PureWeen merged commit 0cd881c into main Feb 11, 2026
1 check passed
StephaneDelcroix added a commit to StephaneDelcroix/PolyPilot that referenced this pull request Feb 12, 2026
…en#58)"

This reverts commit 0cd881c which broke the Copilot CLI communication.
The change replaced the persistent mode headless server approach with
embedded stdio mode, but the SDK-spawned CLI process fails with
"unknown option --headless" when all flags are combined, causing
ConnectionLostException on StartAsync.
kubaflo pushed a commit that referenced this pull request Feb 12, 2026
…70)

This reverts commit 0cd881c which broke the Copilot CLI communication.
The change replaced the persistent mode headless server approach with
embedded stdio mode, but the SDK-spawned CLI process fails with
"unknown option --headless" when all flags are combined, causing
ConnectionLostException on StartAsync.
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