Recover desktop startup and local fallback - #1121
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (9)
Included review availability: 2 reviews are currently available. Based on recent review activity, included reviews refill at 4 per hour. 📝 WalkthroughWalkthroughThe PR adds free desktop sandbox preference resolution, availability detection, bridge recovery telemetry, and status-aware selector behavior. It also sanitizes desktop deep-link logs by removing authentication tokens, query parameters, and full URLs. ChangesFree desktop sandbox management
Secure desktop deep-link logging
Estimated code review effort: 4 (Complex) | ~45 minutes Merge Risk: ⚪ Minimal · up to The change improves desktop/local recovery, preserves local execution when the internal bridge is unavailable, and redacts sensitive native logs. No actionable merge-blocking risk remains after normal checks and review. Sequence Diagram(s)sequenceDiagram
participant User
participant SandboxSelector
participant GlobalState
participant LocalConnections
participant ChatInput
User->>SandboxSelector: select sandbox
SandboxSelector->>GlobalState: update sandbox preference
GlobalState->>LocalConnections: inspect available runners
GlobalState-->>SandboxSelector: resolved preference and status
SandboxSelector-->>User: display selected or unavailable sandbox
ChatInput->>GlobalState: read selected preference and availability
GlobalState-->>ChatInput: availability result
ChatInput-->>User: allow send or show reconnection reason
Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Comment |
Summary
Local reconnectingorLocal unavailableinstead of falsely falling back toCloudRoot cause
The existing recovery logic retried terminal bridge failures only after a bridge had started. A readiness failure during startup moved the bridge directly to a failed state. Free Desktop sessions also forced the internal
desktoppreference and the send gate ignored a healthynpx @hackerai/localconnection. When the selected local option was missing, the selector rendered the first available option, which was Cloud. Native single-instance and deep-link logs also included complete authentication URLs.Validation
pnpm typecheckpnpm lintgit diff --checkManual verification
npx @hackerai/localrunner and interrupt the internal Desktop bridge. Confirm the selector keeps/selects the remote hostname and Agent commands still run there.Local reconnecting, thenLocal unavailable, and never changes to Cloud.~/hackerai-desktop.log. Confirm it contains no token,desktop_state, origin value, or raw deep-link query.This change does not introduce Cloud execution as a fallback; it preserves explicit local host affinity.