Skip to content

feat(settings): configure workspaces in a Settings tab - #426

Merged
edenreich merged 3 commits into
mainfrom
feat/settings-workspaces
Nov 5, 2026
Merged

edenreich merged 3 commits into
mainfrom
feat/settings-workspaces

Conversation

@edenreich

@edenreich edenreich commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Workspaces - the compute an agent's own computer runs on - could only be set up by editing ~/.infer/daemon.yaml by hand. This adds Settings > Workspaces: a list of the daemon's workspaces with their reachability, and a form to add, edit and delete them. Kubernetes is the only type for now, and the form has a Type selector so more can be added.

Part of #417. It covers that issue's Settings part on top of the daemon workspaces from #422, which replaced the issue's pure-kubectl design. Moving a running chat to a workspace is not in this PR.

Changes

  • frontend/components/WorkspacesTab.tsx: the tab. Each workspace shows its type, context and namespace, and whether the daemon can reach it, with the daemon's error when it cannot.
  • The form covers type, name, Kubernetes context (suggested from the kubeconfig), namespace, image, storage, idle time, retention, provider key names (gateway_env), forwarded variables (forward_env) and environment.
  • backend/src/workspace_settings.rs: workspace_configs, save_workspace, delete_workspace and kube_contexts. An edit keeps the keys the form does not know, such as mode, and every other entry of daemon.yaml. A new workspace with a name that exists is refused.
  • A workspace of a type the form does not know can be deleted but not edited.
  • The daemon reads daemon.yaml when it starts, so a change shows a Restart CLI now button. It is not automatic, because the restart stops running chats.
  • Detect clusters adds a Kubernetes workspace for every kubeconfig context that has none yet: named after the context, in the infer-workspaces namespace, with the CLI image of the installed infer version and the names of the saved API keys for its gateway. Existing workspaces are never replaced.
  • Each Kubernetes workspace shows a prerequisites check, run when the tab opens and on demand: cluster reachable, agent-sandbox, the Gateway API, the Inference Gateway operator, the namespace and its inference-gateway.com/managed label. A cluster that has everything gets a check mark, one that does not gets a warning naming what is missing and how to fix it. It reads the cluster with kubectl.
  • Each Kubernetes workspace shows a badge with the number of sessions running in its cluster, and the suspended count on hover.
  • frontend/lib/workspace-form.ts: form parsing and validation, with unit tests.
  • e2e: tests/workspace-settings.yaml adds a workspace through the form and finds it in daemon.yaml.
  • AGENTS.md adds the new button names and input ids to the DOM contract, and the README points at the tab.

Testing

  • task e2e -- tests/workspace-settings.yaml passes. The rest of the macOS e2e suite was not run.
  • task dev against a real daemon.yaml with two Kubernetes workspaces, read-only: both are listed, one reachable and one unreachable with the daemon's error.
  • Saving, editing and deleting against a real daemon.yaml, and the restart button, were only exercised through the e2e test's own home directory and the unit tests.
  • Detect clusters was run once through the e2e runner with a fixture kubeconfig of two contexts: both became workspaces and a second click added nothing. It is not a permanent e2e test, since the runner has no kubeconfig fixture.
  • task dev against two real clusters, read-only: one shows "Cluster has everything it needs" with a "0 running" badge, the other a warning that it cannot be reached. A badge above zero was not seen for real, the count is unit-tested.
  • The prerequisites check looks at CRDs and the namespace, not at whether the controllers run.
  • Frontend build and unit tests, cargo fmt --check, clippy and backend tests pass.

Settings > Workspaces lists the workspaces of ~/.infer/daemon.yaml with their reachability and adds, edits and deletes Kubernetes ones. An edit keeps the keys the form does not know and every other entry of the file.

Part of #417
…running sessions

Detect clusters adds a Kubernetes workspace for every kubeconfig context that has none. Each Kubernetes workspace shows whether its cluster has agent-sandbox, the Gateway API, the operator and a managed namespace, and how many sessions run there.
@edenreich
edenreich marked this pull request as ready for review November 5, 2026 16:38
@edenreich
edenreich merged commit 80fd9c0 into main Nov 5, 2026
1 check passed
@edenreich
edenreich deleted the feat/settings-workspaces branch November 5, 2026 16:50
@inference-gateway-maintainer

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.53.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@inference-gateway-maintainer inference-gateway-maintainer Bot added the released Shipped in a release label Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Shipped in a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant