Skip to content

Conversation

@EhabY
Copy link
Collaborator

@EhabY EhabY commented Dec 16, 2025

Problem

Commands with authentication requirements (like Logout, Create Workspace, Refresh Workspaces) were appearing in the Command Palette even when the user wasn't logged in. This happened because when clauses placed directly on command definitions do not affect the Command Palette visibility.

Solution

  • Move all when clauses from command definitions to menus.commandPalette where they actually control visibility
  • Standardize command titles to use category: "Coder" instead of prefixing titles with "Coder:"

Additional Changes (Sonarlint fixes)

  • Use node:fs/promises import protocol for consistency
  • Make string sorting explicit with localeCompare() to avoid locale-dependent behavior

Move "when" clauses from command definitions to menus.commandPalette
section. This fixes commands like Logout and Create Workspace appearing
in the palette before the user is authenticated.
@EhabY EhabY force-pushed the fix-package-json-when-clause branch from ae0e56a to 24f644b Compare December 16, 2025 09:48
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.

1 participant