feat(site): add Open Terminal and Copy SSH Command to agent chat TopBar#22529
Merged
feat(site): add Open Terminal and Copy SSH Command to agent chat TopBar#22529
Conversation
Adds two new items to the agent chat TopBar dropdown menu: - Open Terminal: opens the workspace web terminal in a new browser window, reusing the existing getTerminalHref/openAppInNewWindow infra. - Copy SSH Command: copies the ssh command (e.g. ssh agent.workspace.owner.suffix) to the clipboard with a toast confirmation. Only shown when the deployment SSH hostname suffix is configured. Both items appear after a separator below the existing editor/workspace actions.
kylecarbs
approved these changes
Mar 2, 2026
… and SSH visibility
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds two new dropdown menu items to the AgentDetailTopBar component in the Coder Agents UI: "Open Terminal" (opens a workspace web terminal in a new window) and "Copy SSH Command" (copies an SSH command to the clipboard with a toast notification). These reuse existing infrastructure (getTerminalHref/openAppInNewWindow for the terminal, and deploymentSSHConfig query for the SSH hostname suffix).
Changes:
- Added "Open Terminal" and "Copy SSH Command" menu items to the TopBar dropdown, plus a new separator between them and the "View Workspace" item.
- Wired up the necessary props (
canOpenTerminal,onOpenTerminal,sshCommand) in all three render paths ofAgentDetail.tsx, including fetchingdeploymentSSHConfig. - Updated
TopBar.stories.tsxdefault props to include the new fields.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
site/src/pages/AgentsPage/AgentDetail/TopBar.tsx |
Added Open Terminal and Copy SSH Command dropdown items with icons, separator, clipboard write, and toast feedback |
site/src/pages/AgentsPage/AgentDetail.tsx |
Added deploymentSSHConfig query, computed canOpenTerminal/terminalHref/sshCommand, implemented handleOpenTerminal, passed all new props in all three AgentDetailTopBar render invocations |
site/src/pages/AgentsPage/AgentDetail/TopBar.stories.tsx |
Added canOpenTerminal, onOpenTerminal, and sshCommand to story default props |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
DanielleMaywood
approved these changes
Mar 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds two new items to the agent chat TopBar dropdown menu:
getTerminalHref/openAppInNewWindowinfra.ssh agent.workspace.owner.suffix) to the clipboard with a toast confirmation. Only shown when the deployment SSH hostname suffix is configured.Both items appear after a separator below the existing editor/workspace actions.
Changes
TopBar.tsxOpen TerminalandCopy SSH Commanddropdown items with separator,TerminalIcon/CopyIcon, toast on copyAgentDetail.tsxgetTerminalHref,openAppInNewWindow,deploymentSSHConfigquery, and passed new props to TopBar in all 3 render pathsTopBar.stories.tsx