[PR #13813] app: refactor server management backend #14820

Open
opened 2026-02-16 18:19:34 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/13813

State: open
Merged: No


Refactors the server management backend (no ui changes) to do a few things:

  • Hoist desktop- and web-specific logic outside of app
    • Default url has been hoisted as desktop always supplies its own, and the other calculation logic was web-specific
    • Servers that aren't managed by app (sidecar, ssh, etc.) can be provided externally, to make data flow nicer
  • app is now aware of plain http connections as well as other types (sidecar, ssh, WSL) which all use the same http type internally (which has username + password)
  • Sidecar password is no longer exposed via __OPENCODE.serverPassword, instead it's injected as the password for a custom server
  • Usage of createOpencodeClient has been replaced by a wrapper that takes a ServerConnection to ensure that SDK clients are always created with the server's username + password

Still TODO:

  • Convert context/server to only use ServerConnection
  • Test remote connections
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/13813 **State:** open **Merged:** No --- Refactors the server management backend (no ui changes) to do a few things: - Hoist desktop- and web-specific logic outside of `app` - Default url has been hoisted as desktop always supplies its own, and the other calculation logic was web-specific - Servers that aren't managed by `app` (sidecar, ssh, etc.) can be provided externally, to make data flow nicer - `app` is now aware of plain http connections as well as other types (sidecar, ssh, WSL) which all use the same http type internally (which has username + password) - Sidecar password is no longer exposed via `__OPENCODE.serverPassword`, instead it's injected as the password for a custom server - Usage of `createOpencodeClient` has been replaced by a wrapper that takes a `ServerConnection` to ensure that SDK clients are always created with the server's username + password Still TODO: - [ ] Convert context/server to only use ServerConnection - [ ] Test remote connections
yindo added the pull-request label 2026-02-16 18:19:34 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#14820