Skip to Main Content

MongoByte MongoDB Logo

Welcome to the new MongoDB Feedback Portal!

{Improvement: "Your idea"}
We’ve upgraded our system to better capture and act on your feedback.
Your feedback is meaningful and helps us build better products.

Status Submitted
Categories Compass
Created by Kushagra S N/A
Created on Dec 12, 2025

History in the query input box removes comments from the query

What problem are you trying to solve?

Focus on the what and why of the need you have, not the how you'd like it solved.

When a search query is made and it has a comment in it. After executing the query and remove its removed, in the quick history the comments are removed and lost


Type a query into the input box say

{
  user_id: ObjectId(
    "67adf4ebc6ac9b24daebd16e"
  ),
  created_at: {
    $gte: ISODate("2025-07-11T18:30:00.000Z")
  },
  tags: { $exists: true, $ne: [] },
}

Now comment one of the lines in this guery and run it.

{
  user_id: ObjectId(
    "67adf4ebc6ac9b24daebd16e"
  ),
  created_at: {
    $gte: ISODate("2025-07-11T18:30:00.000Z")
  },
  // tags: { $exists: true, $ne: [] },
}

Once done with this remove the query from the input box and try to select it using the quick history. It will give the below as your query

{
  user_id: ObjectId("67adf4ebc6ac9b24daebd16e"),
  created_at: {
    $gte: ISODate("2025-07-11T18:30:00.000Z")
  }
}

What would you like to see happen?

Describe the desired outcome or enhancement.

The comment should not disappear.

Why is this important to you or your team?

Explain how the request adds value or solves a business need.

This could be useful in certain situations, like annotating a complex query

What steps, if any, are you taking today to manage this problem?

I would like to contribute to compass and raise a PR for this if this recieves sufficient upvotes. Currently I just keep the command in my clipboard history .