You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(remote): add built-in remote management HTTP server
Add a lightweight Axum-based HTTP server for remote provider switching
via browser/mobile. Replaces the external Python remote script to avoid
race conditions and state inconsistency.
Key features:
- Web UI at http://localhost:4000 for provider switching
- SSE events for real-time sync across multiple browser tabs
- Per-address listener management: localhost is preserved when
Tailscale IP is toggled (no "connection lost" page)
- AtomicBool runtime gate: stopped server rejects new requests even
on keep-alive connections
- Graceful shutdown with abort fallback for timed-out listeners
- Tailscale IP support for remote access from mobile devices
Architecture:
- remote/mod.rs: RemoteServer with HashMap<SocketAddr, ListenerEntry>
for incremental address updates
- remote/handlers.rs: Axum handlers with running flag checks
- remote/html.rs: Embedded responsive web UI (dark mode support)
- commands/remote.rs: Tauri commands (start/stop/restart/check)
- Frontend: RemoteSettings component with health polling and restart
flow
Bug fixes in this commit:
- health_check now returns 503 when server is stopped
- restartServer only persists settings after confirming server is up
- ManagedRemoteServer encapsulation (private field + lock() method)
- start_addrs simplified to return Vec<String> instead of Result
- Removed hardcoded "claude" in favor of REMOTE_APP constant
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
0 commit comments