Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(commands): remove duplicated commands from Cody Commands menu #5557

Merged
merged 1 commit into from
Sep 12, 2024

Conversation

abeatrix
Copy link
Contributor

@abeatrix abeatrix commented Sep 11, 2024

CLOSE https://linear.app/sourcegraph/issue/CODY-3698/remove-duplicate-command-buttons-in-ui-to-avoid-confusion

This PR fixes an issue where duplicated default commands are listed as custom commands in the Cody Commands QuickPick menu.

Root cause: All commands (including default ones) were being sent to the quick pick menu during the build step used to append to the menu.

Fix: Send only custom commands to the menu, preventing default commands from being listed as custom.

  • Update showCommandMenu function to use only custom commands
  • Modify CommandsProvider to pass only custom commands for menu display
  • Update E2E tests to verify default commands are not shown as custom
  • Refactor command menu opening functions for consistency
  • Update CHANGELOG.md to reflect the fix

This change ensures that default Cody commands are not incorrectly listed as custom commands in the Cody Commands menu, improving the user experience and reducing confusion.

Test plan

Green CI with the updated E2E test.

Manual Test:

  1. Click on the Cody icon in your editor to bring up the Cody Commands menu
  2. Verify the default commands are only showing up once

After

image

Before:

Default commands are showing up twice, once at the top and once at the bottom of the menu:

image

Changelog

…menu

Fixed an issue where duplicated default commands are listed as custom commands in the Cody Commands QuickPick menu.

Root cause: All commands (including default ones) were being sent to the
quick pick menu during the build step used to append to the menu.

Fix: Send only custom commands to the menu, preventing default commands
from being listed as custom.

- Update showCommandMenu function to use only custom commands
- Modify CommandsProvider to pass only custom commands for menu display
- Update E2E tests to verify default commands are not shown as custom
- Refactor command menu opening functions for consistency
- Update CHANGELOG.md to reflect the fix

This change ensures that default Cody commands are not incorrectly listed
as custom commands in the Cody Commands menu, improving the user experience
and reducing confusion.
@abeatrix abeatrix requested review from a team September 11, 2024 17:39
@abeatrix abeatrix enabled auto-merge (squash) September 12, 2024 16:19
Copy link
Contributor

@kalanchan kalanchan left a comment

Choose a reason for hiding this comment

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

thank you! this is nice clean up

@abeatrix abeatrix merged commit 33ea5a7 into main Sep 12, 2024
21 checks passed
@abeatrix abeatrix deleted the bee/commands-menu-fix branch September 12, 2024 18:17
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.

2 participants