Skip to content

[feat] One-click way to copy a terminal/chat pane's session ID in the UI #5108

Open

Description

@robertn702

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 terminalId in TerminalSessionDropdown.
  • 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 + useCopyToClipboard usage): .../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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions