feat: Seamless RDP Session Reconnection for RemoteApp Windows #398
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This PR implements automatic RDP session reconnection for WinBoat RemoteApp windows, making the platform the first container-based Windows virtualization solution to provide truly seamless recovery from connection interruptions.
When a user loses their RDP session (due to network issues, FreeRDP crashes, or system suspend), RemoteApp windows are now automatically restored without manual intervention, maintaining their position and state.
Key Features
What Changed
New Components
Guest Server (Go)
GET /windows- Returns active RAIL windows with metadatascripts/get-windows.ps1- Enumerates Win32 windows via P/Invokewinboat-*window classesHost Application (TypeScript/Vue)
WindowStateManager (
src/renderer/lib/WindowStateManager.ts): Core state management~/.winboat/window-states.jsonReconnection Logic (
src/renderer/lib/winboat.ts):syncWindowStates(): Polls guest every 1s for window updatesattemptWindowReconnection(): Relaunches disconnected applicationsUI Component (
src/renderer/components/ReconnectionOverlay.vue):Modified Files
guest_server/main.go: Added/windowsendpoint handlersrc/renderer/lib/winboat.ts: Integrated reconnection managersrc/renderer/App.vue: Added ReconnectionOverlay componentReconnection Flow
Testing
Manual Testing
Debug Tools
Configuration
Prerequisites
{ "rdpMonitoringEnabled": true }State Persistence
Window states stored at:
~/.winboat/window-states.jsonTunable Parameters
monitoringInterval: 2000ms (process health check)syncInterval: 1000ms (guest window sync)maxReconnectAttempts: 5 attemptsstaleWindowTimeout: 5 minutesKnown Limitations
Window Position Restoration: Position metadata is captured but not yet applied
FreeRDP PID Tracking: PIDs not captured due to background execution (
&in command)process.kill(pid, 0)check with null handlingSession Pooling: Each app still creates new RDP connection
Future Enhancements
Tier 1 (Next Sprint)
child_process.spawn()Tier 2 (Future)
Tier 3 (Upstream Contribution)
Screenshots
Before
After
Deployment Notes:
Breaking Changes: None
Migration Required: No