[COMPASS-4760] Compass shell shows wrong autocomplete suggestions Created: 21/Apr/21  Updated: 29/Oct/23  Resolved: 21/Sep/22

Status: Closed
Project: Compass
Component/s: Embedded Shell
Affects Version/s: None
Fix Version/s: 1.34.0

Type: Bug Priority: Major - P3
Reporter: Sergey Petushkov Assignee: Sergey Petushkov
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File Kapture 2021-04-21 at 11.15.35.mp4     File Screen Recording 2021-04-21 at 10.02.11.mov    
Issue Links:
Depends
Epic Link: COMPASS-5282
Story Points: 1
Documentation Changes: Not Needed
Sprint: Iteration Jellyfish, Iteration Kraken

 Description   

Problem Description

After using autocomplete in compass UI (e.g., in Aggregations tab editor), mongosh autocomplete shows wrong results

Steps to Reproduce

  1. Open any collection, navigate to the Aggregations and create a match state for any field in the collection
  2. Open mongosh and type db., you should see no suggestions
  3. Type the first letter of the field from step 1, you should see the field being suggested

Expected Results

You get autocomplete results for whatever you're typing in the shell (e.g., db methods)

Actual Results

You get the same autocomplete results you were getting in UI

Additional Notes

The source of the issue is probably somewhere in ace editor and some singleton autocomplete state that it's sharing between all the instances



 Comments   
Comment by Githook User [ 19/Sep/22 ]

Author:

{'name': 'Sergey Petushkov', 'email': 'petushkov.sergey@gmail.com', 'username': 'gribnoysup'}

Message: fix(browser-repl): reset autocomplete on editor focus COMPASS-4760 (#1345)
Branch: 1281-dev
https://github.com/mongodb-js/mongosh/commit/f52424a4150d6136159b8ab1f3b4e935f68338a4

Comment by Githook User [ 13/Sep/22 ]

Author:

{'name': 'Sergey Petushkov', 'email': 'petushkov.sergey@gmail.com', 'username': 'gribnoysup'}

Message: fix(browser-repl): reset autocomplete on editor focus COMPASS-4760 (#1345)
Branch: main
https://github.com/mongodb-js/mongosh/commit/f52424a4150d6136159b8ab1f3b4e935f68338a4

Comment by Githook User [ 12/Sep/22 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: Merge remote-tracking branch 'origin/main' into compass-4760-autocomplete
Branch: compass-4760-autocomplete
https://github.com/mongodb-js/mongosh/commit/4a1763078bbd8163e8705261330cd9663150acc4

Generated at Wed Feb 07 22:37:23 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.