feat: host remote servers in the signed-in windows desktop - #3713
feat: host remote servers in the signed-in windows desktop#3713Pimpmuckl wants to merge 14 commits into
Conversation
|
@coderabbitai review |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 4 remain after this review. 📝 WalkthroughWalkthroughAdds Merge Risk: ⚪ Minimal · up to This adds Windows signed-in desktop hosting for remote servers and saved machines, with placement validation and compatibility-aware reconnect discovery. No concrete current-head merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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. Comment |
|
✅ Action performedReview finished.
|
Greptile SummaryThis PR adds opt-in hosting of remote Herdr servers in the signed-in Windows desktop.
Confidence Score: 5/5The PR appears safe to merge; no actionable new failures or outstanding previous findings remain. The changes since the previous review correctly address managed SCP path handling and test-fixture protocol framing. The earlier desktop-server cleanup concern was manually resolved after the implementation evidence was accepted and Greptile withdrew the finding.
|
| Filename | Overview |
|---|---|
| src/platform/windows/desktop_host.rs | Implements active-session discovery, peer identity verification, temporary task launch, readiness checks, and task cleanup. |
| src/remote/attach.rs | Integrates desktop capability discovery and placement checks into direct and saved remote setup, with corrected SCP path handling. |
| src/remote/desktop.rs | Adds internal desktop inspection/start commands and transfers the SSH environment into the scheduled desktop server. |
| src/remote/host.rs | Prevents desktop-required background bridges from starting ordinary Session 0 servers and verifies the connected server. |
| src/client/endpoint/catalog.rs | Persists desktop-hosting intent with backward-compatible deserialization for existing catalogs. |
| src/platform/windows.rs | Recognizes servers in non-terminating Windows jobs as detached lifecycle-capable. |
Sequence Diagram
sequenceDiagram
participant C as Local Herdr client
participant S as Windows SSH session
participant T as Task Scheduler
participant D as Desktop Herdr server
C->>S: Inspect named session and desktop placement
alt Compatible desktop server exists
S-->>C: Ready with verified PID and session
else No eligible server exists
S-->>C: Start in unique active desktop session
C->>C: Request explicit confirmation
C->>S: Start desktop server
S->>T: Register one-time same-user task
T->>D: Launch server in selected session
S->>D: Verify named-pipe peer SID and session
S->>T: Delete temporary task
S-->>C: Desktop server ready
else Same-name server conflicts
S-->>C: Report conflict without stopping server
end
C->>D: Attach with desktop requirement
Reviews (4): Last reviewed commit: "fix: require desktop support during save..." | Re-trigger Greptile
215f379 to
1a53b82
Compare
|
@greptileai re-review the final diff pls and suggest changes for a 5/5 score |
1a53b82 to
fa0b723
Compare
|
@coderabbitai review |
|
✅ Action performedReview finished.
|
fa0b723 to
0b8605d
Compare
0b8605d to
5bec36c
Compare
|
@coderabbitai review |
|
✅ Action performedReview finished.
|
Windows SSH starts Herdr outside the signed-in desktop, so its panes cannot use desktop apps. Add
--remote-desktopto direct remote attach and saved-machine setup. After default-No confirmation, Herdr starts the final server through a temporary same-user Windows task, verifies the actual pipe peer account and active Windows session, then removes the task.Compatible desktop servers reconnect without consent or a new task. Background saved reconnect only attaches. A same-name server outside the eligible desktop is reported as a conflict before stop or handoff consent. Saved profiles store desktop intent, never consent or a Windows session/task identity. Scheduler servers in a non-killing job now correctly report detached lifecycle support.
Depends on #3687. Refs #3651.
Validation: full Windows
just check; focused desktop tests; native Windows OpenSSH direct install, default-No refusal, cold start, silent reuse, saved setup/background reconnect, absent reconnect, same-name Session 0 conflict, pane output and resize, and owned-task/environment cleanup. Server and pane ran in Windows session 1, the task was absent after readiness, and reconnect kept the server PID.Limits: native SSH acceptance used an elevated token; ordinary-user Scheduler registration was not tested. A brief console flash before process initialization remains possible. Desktop hosting does not sign in, unlock Windows, or move existing pane processes between Windows sessions.
Saved reconnect regression: with an older endpoint-capable binary first on PATH, discovery now requires desktop capability and selects the managed binary. Native before/after executable-path inspection proved the selection change while preserving the same desktop server PID; a stopped server stayed stopped.