compass icon indicating copy to clipboard operation
compass copied to clipboard

Bug Report: document/index count not updated when clicking on collection tab

Open Mosallamy opened this issue 3 years ago • 7 comments

Bug Report

Current Behavior

When opening collections in a new tab, then clicking a collection tab button, the document/index count does not change and only reflects the count for the last opened collection.

Expected Behavior/Code

Clicking on a collection tab should update document/index count

Environment

  • node.js: 17.9.0
  • npm: 8.5.5:
  • OS: OSX 12.0.1 iMac M1 2021
  • MongoDB Compass: 1.33.1

Additional Context/Screenshots

  1. "Invoice_Item" has 4 documents Screen Shot 2022-09-18 at 2 18 15 PM

  2. Clicking on "products" collection tab still shows the count as 4 document, which should be 193

Screen Shot 2022-09-18 at 2 18 19 PM
  1. Clicking on the "products" collection from the sidebar shows the correct count Screen Shot 2022-09-18 at 2 18 43 PM

  2. "products" collection now shows correct document count Screen Shot 2022-09-18 at 2 18 49 PM

Mosallamy avatar Sep 18 '22 11:09 Mosallamy

@Mosallamy thanks for reporting this issue. I've opened ticket to keep track of this issue.

mabaasit avatar Sep 19 '22 13:09 mabaasit

@mabaasit Please let me know if I can work on fixing this issue

AishwaryaChat avatar Sep 20 '22 06:09 AishwaryaChat

Hey @AishwaryaChat, please check with one of the maintainers as I'm not working on this project.

Mosallamy avatar Sep 20 '22 08:09 Mosallamy

@mcasimir Please let me know if I can work on fixing this issue

AishwaryaChat avatar Sep 27 '22 06:09 AishwaryaChat

Hey @AishwaryaChat, sure feel free to submit a PR! please sign our https://www.mongodb.com/legal/contributor-agreement first! Thanks!!

mcasimir avatar Sep 27 '22 14:09 mcasimir

@AishwaryaChat Looking into this bug more it will likely take a good amount of knowledge of Compass state internals. While I don't want to discourage you from contributing to the project, this will be a trickier bug to tackle if you're newer to the code base. As it is a major bug the team is working on a fix currently. If you'd like to work on other bugs or features which might be more introductory into the code base I'm happy to send some over. Something like https://jira.mongodb.org/browse/COMPASS-6156 would probably be good.

Anemy avatar Oct 05 '22 01:10 Anemy

@Anemy although I already went through most of the compass code flow, but yes doing the fix requires more discussion with the team. I's not a trait forward fix. I shall work on https://jira.mongodb.org/browse/COMPASS-6156

AishwaryaChat avatar Oct 05 '22 09:10 AishwaryaChat

Hi @Mosallamy - this is fixed in the newest Compass release 1.34.1 - https://github.com/mongodb-js/compass/releases Thanks for reporting the issue and helping improve Compass!

Anemy avatar Dec 15 '22 14:12 Anemy