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

JetBrains: Random repo got removed when user tries to add more than 10 repo. #1484

Closed
jay-fibi opened this issue May 10, 2024 · 1 comment · Fixed by #1491
Closed

JetBrains: Random repo got removed when user tries to add more than 10 repo. #1484

jay-fibi opened this issue May 10, 2024 · 1 comment · Fixed by #1491
Assignees
Labels

Comments

@jay-fibi
Copy link
Collaborator

Cody Version

v5.5.10-nightly

IDE Information

PyCharm 2023.3.3 (Community Edition)
Build #PC-233.13763.11, built on January 26, 2024
Runtime version: 17.0.9+7-b1087.11 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 14.3
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 8
Metal Rendering is ON
Non-Bundled Plugins:
com.sourcegraph.jetbrains (5.5.10-nightly)

Describe the bug

Platform: macOS

Steps to reproduce:

  1. Have Cody plugin installed in your JB PyCharm editor
  2. Login to Cody with Enterprise user
  3. Open Code context and add 10 repo
  4. Hit enter and verify the repo added correctly
  5. Now add 11th repo and verify that the text is hightlighted yellow
  6. Hit enter to save changes and verify the repo list

Observed behavior:

A random repo got removed and the yellow highlighted repo got added.

Expected behavior

The 11th repo should not be added and any random repo should not be removed.

Additional context

Video link:

https://drive.google.com/file/d/1gk9WcoAzgOIVefEQ6K2STaZeIagnF3RG/view?usp=drive_link

@jay-fibi jay-fibi added bug Something isn't working fibilabs-qa fibilabs-qa-p1 labels May 10, 2024
@dominiccooney dominiccooney self-assigned this May 13, 2024
@dominiccooney
Copy link
Contributor

Good bug.

What's happening here: We're sending all of the repos to the backend, it is returning sorted results, and we're taking the first 10. It's definitely confusing because we've been highlighting the ones added at the bottom of the list in mustard. We should prune those first.

dominiccooney added a commit that referenced this issue May 13, 2024
… list (#1491)

Fixes #1484

## Test plan

Tested manually:

- Sign into an Enterprise account
- Open the enhanced context picker and list more than ten repos, ensure
some of the yellow highlight repos are alphabetically earlier than some
of the first ten
- Cmd-Enter to save the list of repositories
- Verify that the highlighted list is what you would expect


https://github.com/sourcegraph/jetbrains/assets/55120/11c732bd-5161-4e01-8c8f-919e83192b04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants