compass
compass copied to clipboard
Bug Report: document/index count not updated when clicking on collection tab
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
-
"Invoice_Item" has 4 documents

-
Clicking on "products" collection tab still shows the count as 4 document, which should be 193
-
Clicking on the "products" collection from the sidebar shows the correct count

-
"products" collection now shows correct document count

@Mosallamy thanks for reporting this issue. I've opened ticket to keep track of this issue.
@mabaasit Please let me know if I can work on fixing this issue
Hey @AishwaryaChat, please check with one of the maintainers as I'm not working on this project.
@mcasimir Please let me know if I can work on fixing this issue
Hey @AishwaryaChat, sure feel free to submit a PR! please sign our https://www.mongodb.com/legal/contributor-agreement first! Thanks!!
@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 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
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!