Repository navigation
Description
Describe the feature
Add a quick, one-click way in the desktop UI to get/copy a terminal pane's session ID (the terminalId, and ideally the chatSessionId for chat panes).
Today there is no direct UI affordance to retrieve a session's ID. The closest existing feature is the Remote Control button's "Copy link", but that copies a shareable remote-control URL containing a remote-control sessionId (a separate concept) — not the terminal/chat session ID. The TerminalSessionDropdown displays the terminalId, but it isn't selectable or copyable.
Motivation
A terminal/chat session ID is the handle needed to communicate with or steer another session — e.g. building the deep link superset://v2-workspace/<workspaceId>?terminalId=<sessionId> (see #5029), or driving an existing session via CLI/MCP (see #4813). Right now you can't easily grab the ID of a session you're looking at, so handing one session's ID to another for cross-session coordination is awkward (hand-building URLs, digging through dropdowns, or guessing).
A small "Copy session ID" affordance closes that gap and makes the deep-linking (#5029) and CLI/MCP control (#4813) workflows usable from the UI.
Proposed UX
Any one (or more) of:
- A "Copy session ID" item in the terminal pane's header menu /
TerminalHeaderExtras(next to the Remote Control button). - A copy icon next to each session's
terminalIdinTerminalSessionDropdown. - A command palette action, e.g.
terminal.copySessionId, that copies the active pane's session ID. - For chat panes, the equivalent for
chatSessionId.
Nice-to-have: a menu option to copy the ready-to-open deep link (superset://v2-workspace/<workspaceId>?terminalId=<sessionId>) rather than just the raw ID.
Implementation pointers
- Terminal pane header extras:
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/usePaneRegistry/components/TerminalPane/components/TerminalHeaderExtras/TerminalHeaderExtras.tsx - Existing remote-control button (pattern +
useCopyToClipboardusage):.../TerminalPane/components/TerminalRemoteControlButton/TerminalRemoteControlButton.tsx - Session dropdown that already renders
terminalId:.../TerminalPane/components/TerminalSessionDropdown/TerminalSessionDropdown.tsx
The useCopyToClipboard hook is already used in the remote-control button, so the clipboard plumbing exists.
Related
- Session deep-linking (chatSessionId/terminalId) is undocumented and not exposed by the CLI #5029 — Session deep-linking (
chatSessionId/terminalId) is undocumented and not exposed by the CLI - [feat] Expose controllable workspace terminal sessions via CLI/MCP #4813 — Expose controllable workspace terminal sessions via CLI/MCP
- CLI-created terminals not visible in Desktop UI: pty-daemon unaware of Drizzle ORM sessions #5103 — CLI-created terminals not visible in Desktop UI
Activity
feat: copy a terminal pane's session ID from the UI (#5108)