Skip to content

Conversation

@Adam-D-Lewis
Copy link
Member

Summary

  • Add RemoteHandler that proxies frontend requests to a remote Nebi team server in local/desktop mode
  • Uses existing cliclient package (typed methods) for all upstream communication
  • Stores server URL and credentials in the local SQLite DB via store.Config/store.Credentials
  • Routes registered only when localMode == true under /api/v1/remote/*

Endpoints (13 total)

  • POST /connect — authenticate with remote server, store token
  • GET /server — connection status
  • DELETE /server — disconnect, clear credentials
  • GET/POST/DELETE /workspaces[/:id] — proxy CRUD
  • GET /workspaces/:id/versions — proxy version listing
  • GET /workspaces/:id/tags — proxy tag listing
  • GET /workspaces/:id/pixi-toml — proxy pixi.toml (JSON wrapped)
  • GET /workspaces/:id/versions/:version/pixi-toml — proxy (JSON wrapped)
  • GET /workspaces/:id/versions/:version/pixi-lock — proxy (JSON wrapped)
  • POST /workspaces/:id/push — proxy version push

Design decisions

  • 503 (not 400) for "not connected" errors — distinguishes client errors from config state issues
  • JSON wrapping for pixi.toml/lock endpoints — upstream returns plain text, proxy wraps in {"content": "..."} for uniform frontend consumption
  • GORM error checks on all DB writes in connect/disconnect
  • Typed cliclient methods used where available (ListWorkspaces, GetWorkspace, etc.)

Test plan

  • go vet ./...
  • 6 unit tests: server status, connect/disconnect, mock remote, not-connected proxy
  • go test ./internal/api/handlers/... ./internal/service/... ./internal/store/...
  • Frontend builds cleanly

@Adam-D-Lewis Adam-D-Lewis requested a review from aktech February 9, 2026 16:42
@aktech aktech changed the base branch from shared-service-layer to main February 11, 2026 13:11
@aktech aktech merged commit 7bab575 into main Feb 11, 2026
1 check passed
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.

2 participants