Skip to content

feat: add Coder Ping Workspace command#873

Open
EhabY wants to merge 1 commit intomainfrom
feat/ping-workspace
Open

feat: add Coder Ping Workspace command#873
EhabY wants to merge 1 commit intomainfrom
feat/ping-workspace

Conversation

@EhabY
Copy link
Copy Markdown
Collaborator

@EhabY EhabY commented Apr 3, 2026

Adds a coder.pingWorkspace command that runs coder ping <workspace> locally and streams output to a custom PTY terminal, helping users diagnose connection problems (latency, P2P diagnostics, DERP info).

  • Command Palette: available when authenticated, shows a workspace picker filtered to running workspaces
  • Sidebar: appears under a "Diagnostics" submenu (right-click) for running workspaces, ready for future speedtest command
  • Connected workspace: automatically pings the current workspace without prompting

Other changes:

  • Extract resolveCliEnv helper to deduplicate CLI bootstrap boilerplate between openAppStatus and pingWorkspace
  • Parameterize pickWorkspace with filter/title options and fix pre-existing QuickPick disposal leak
  • Encode workspace running status in tree item contextValue using a tag-based format (coderWorkspaceSingleAgent+running) with regex when clause matching

Closes #749

@EhabY EhabY self-assigned this Apr 3, 2026
@EhabY EhabY force-pushed the feat/ping-workspace branch 4 times, most recently from b67feba to 1f96268 Compare April 3, 2026 14:18
Add a `coder.pingWorkspace` command that runs `coder ping <workspace>`
locally and streams output to a custom PTY terminal. This helps users
diagnose connection problems by showing latency, P2P diagnostics, and
DERP info in real-time.

The command supports three invocation modes:
- Command Palette: shows a workspace picker (filtered to running)
- Sidebar context menu: under a new "Diagnostics" submenu
- When connected: pings the current workspace automatically

Other changes:
- Extract `resolveCliEnv` to deduplicate CLI bootstrap boilerplate
- Parameterize `pickWorkspace` with filter/title options and fix
  QuickPick disposal leak
- Encode workspace running status in tree item contextValue using a
  tag-based format (e.g. `coderWorkspaceSingleAgent+running`) so
  status-dependent menus use regex matching
@EhabY EhabY force-pushed the feat/ping-workspace branch from 1f96268 to 196ed90 Compare April 3, 2026 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add command to coder ping a workspace

1 participant