Skip to content

feat: add Coder Ping Workspace command#873

Merged
EhabY merged 2 commits intomainfrom
feat/ping-workspace
Apr 7, 2026
Merged

feat: add Coder Ping Workspace command#873
EhabY merged 2 commits 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 6 times, most recently from 196ed90 to 081ee00 Compare April 7, 2026 12:15
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 081ee00 to ae6981a Compare April 7, 2026 20:38
@EhabY EhabY requested a review from jeremyruppel April 7, 2026 20:40
Copy link
Copy Markdown

@jeremyruppel jeremyruppel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@EhabY EhabY force-pushed the feat/ping-workspace branch from ae6981a to 7b0ef6b Compare April 7, 2026 21:06
@EhabY EhabY merged commit d998ac2 into main Apr 7, 2026
6 checks passed
@EhabY EhabY deleted the feat/ping-workspace branch April 7, 2026 21:14
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

2 participants