🤖 feat: add Change SSH Host for existing workspaces#2603
🤖 feat: add Change SSH Host for existing workspaces#2603coadler wants to merge 3 commits intocoder:mainfrom
Conversation
|
@codex review |
Add schema, service method, and router handler to allow changing a workspace's runtime config (e.g. SSH host) without losing chat history. The runtime is recreated fresh on every sendMessage from metadata.runtimeConfig, so updating runtimeConfig in config.json takes effect immediately.
…d command palette - WorkspaceContext: add updateWorkspaceRuntimeConfig method following updateWorkspaceTitle pattern, wired into actionsValue useMemo - ChangeSSHHostDialog: new Radix Dialog using existing Dialog/Button/Input UI primitives, resets state on open, preserves all SSH config fields (srcBaseDir, identityFile, port, coder) when changing host - WorkspaceActionsMenuContent: add onChangeSSHHost prop with Globe icon, rendered between Edit Title and Configure MCP items - WorkspaceMenuBar: wire sshHostDialogOpen state and pass to both menu content and dialog, conditionally shown for SSH workspaces - WorkspaceListItem: same wiring as MenuBar for sidebar context menu - commandIds: add workspaceChangeSSHHost command ID - sources.ts: register Change SSH Host command with select+text prompt, only visible when SSH workspaces exist - App.tsx: add changeSSHHostFromPalette callback that gets current runtimeConfig and spreads host change, wired to buildCoreSources
6de3d8f to
9b22b8b
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9b22b8badb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review Addressed your P2 comment: replaced with the same + path-fallback pattern used by , so legacy workspaces without in config are still found and updated correctly. |
|
Codex Review: Didn't find any major issues. 👍 ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
cc @ThomasK33 doesn't seem like I can get integration tests working as a pr from a fork, but this is ready otherwise |
Summary
Add the ability to change the SSH host of an existing workspace from the workspace actions menu and command palette, so users don't lose chat history when a server changes address.
Background
Users who create SSH workspaces currently have no way to change the SSH host after creation. If a server changes hostname/IP or the user needs to switch machines, they must create a new workspace and lose their entire chat history. Since the runtime is recreated fresh on every
sendMessagefrommetadata.runtimeConfig, updatingruntimeConfigin config.json takes effect on the very next message — no restart needed.Implementation
Backend (3 files):
updateRuntimeConfigIPC schema inapi.tswithworkspaceId+runtimeConfiginputupdateRuntimeConfig()method inworkspaceService.tsfollowing the exactupdateTitlepattern (validate workspace → update config → emit metadata)router.tswired to the service methodconfig.updateWorkspaceMetadata()which already acceptsruntimeConfigFrontend (8 files):
updateWorkspaceRuntimeConfigcallback toWorkspaceContextfollowingupdateWorkspaceTitlepatternChangeSSHHostDialog.tsx— Radix Dialog that preserves all SSH config fields (srcBaseDir, identityFile, port, coder) via spread, only changinghostonChangeSSHHostmenu item toWorkspaceActionsMenuContent(only shown for SSH workspaces)WorkspaceMenuBar.tsxandWorkspaceListItem.tsxws:change-ssh-hostcommand palette command (only visible when SSH workspaces exist) with select+text prompt patternApp.tsxValidation
make static-checkpasses (typecheck, lint, fmt, broken-links)Generated with
mux• Model:anthropic:claude-opus-4-6• Thinking:high• Cost:$1.02