Skip to content

fix(desktop): recover signed-out sidecar and non-servers.json servers - #2282

Merged
Hona merged 1 commit into
devfrom
fix/signed-out-recovery
Dec 3, 2026
Merged

Hona merged 1 commit into
devfrom
fix/signed-out-recovery

Conversation

@Hona

@Hona Hona commented Dec 3, 2026 •

Copy link
Copy Markdown
Member

Summary

Fixes #2260.

  • Auto-recover managed local sidecar on HTTP 401:
    • apps/desktop/src/workspace/servers/health.rs: call sidecar::reconnect() on ProbeResult::Unauthorized as well as ProbeResult::Unreachable for the managed local sidecar, so rotated local credentials or a stale service.json recover automatically instead of sticking ServerKey::sidecar() in SignedOut.
    • apps/desktop/src/workspace/lifecycle/reconnect.rs: nudge servers::health immediately when Event::StreamDown transitions a server into Link::SignedOut, and avoid reporting streaming(..., true) when transitioning into SignedOut or Incompatible.
  • Always provide an actionable recovery control in signed-out UI:
    • apps/desktop/src/shell/view/server_unavailable.rs: add an explicit Recovery mapping used by both signed_out and signed_out_status so every server kind renders an actionable control instead of a dead-end Signed out of this server label:
      • Saved servers.json HTTP server -> Sign in again (opens Edit server dialog).
      • Web page server (apps/web) -> Sign in again (page_sign_in::sign_out()).
      • Plugin-contributed server -> Sign in again (plugin_host::servers::reauthenticate, falling back to health nudge + Settings > Servers).
      • Managed local sidecar -> Reconnect (wakes reconnects, nudges health/sidecar reconnect, and retries launch if offline).
      • Explicit --server / OPENCODE_SERVER_URL or unlisted server -> Reconnect (wakes reconnects, nudges health, and opens Settings > Servers).
    • apps/desktop/src/plugin_host/bridge/servers.rs: add reauthenticate helper for signed-out plugin servers.
    • apps/desktop/src/shell/view/home/servers.rs: wire ServerConn::Sidecar in authenticate() to server_unavailable::recover_signed_out instead of a no-op.

Verification

  • cargo check -j 1 -p opencode-desktop — passed on Windows.
  • cargo clippy -j 1 -p opencode-desktop --no-deps -- -D warnings — 0 diagnostics in touched files.
  • pwsh scripts/guardrails.ps1 — 11/11 passed.
  • Not run locally on macOS, Linux, wasm32, or live GUI hardware; relying on GitHub Actions CI for cross-platform builds.

…\n\nAuto-reconnect the managed local sidecar on HTTP 401 health probes and\nnudge health immediately when the event stream drops with 401/403 so\nrotated local credentials recover without leaving the session header\nstuck in Signed out of this server. Always render an actionable\nrecovery control in signed_out_status, signed_out, and Home's\nsidecar auth action for every server kind (Edit server, web page\nsign-in, plugin re-authentication, managed sidecar reconnect, or\nSettings > Servers).\n\nFixes #2260
Copilot AI balanced review requested due to automatic review settings December 3, 2026 10:31

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@Hona
Hona merged commit 4ceb37b into dev Dec 3, 2026
8 checks passed
@Hona
Hona deleted the fix/signed-out-recovery branch December 3, 2026 10:50
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.

desktop: session header shows 'Signed out of this server' with no 'Sign in again' action or recovery path

2 participants