Skip to content

Conversation

@EhabY
Copy link
Collaborator

@EhabYEhabY 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.
@EhabYEhabYforce-pushed the fix-package-json-when-clause branch from ae0e56a to 24f644bCompareDecember 16, 2025 09:48
Copy link
Member

@mtojekmtojek left a comment

Choose a reason for hiding this comment

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

Ship it

@EhabYEhabY merged commit 41184c2 into coder:mainDec 17, 2025
3 checks passed
Sign up for freeto 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.

2 participants

@EhabY@mtojek