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

[search-in-workspace] Search finds different substrings of search term #7282

Closed
corneliusludmann opened this issue Mar 5, 2020 · 3 comments · Fixed by #7990
Closed

[search-in-workspace] Search finds different substrings of search term #7282

corneliusludmann opened this issue Mar 5, 2020 · 3 comments · Fixed by #7990
Assignees
Labels
bug bugs found in the application help wanted issues meant to be picked up, require help search in workspace issues related to the search-in-workspace

Comments

@corneliusludmann
Copy link
Contributor

Description

When I type a search term in the search widget of Theia it starts the search on keystroke in the background. However, this leads to search result with different substrings of my current search term in the result list. E.g. I search for “ContainerMod” and the result list has results where “contai”, “contain”, and “container” are highlightend as search matches:

image

As you can see, the same search result (the same line/word) is listed for each substring.

  • When I hit [Enter] the duplicated disappear.
  • When I pause typing, wait for the results and add a character to the search term, the duplicates disappear.

There seems to be race condition / sync problem in creating the result list.

Reproduction Steps

Type into the search box a search term and keep typing while the search is performed in the background. E.g. search for “ContainerModule”. Stop typing and wait for the result list. See the duplicates / substring matches.

I've seen it happen dozens of times. That means it is reproducible for me.

OS and Theia version:

  • Theia version: 42b73d5
  • OS: Arch Linux
  • Browser: Google Chrome Version 80.0.3987.106 (Official Build) (64-bit)
  • I started a Theia instance from Gitpod (yarn start)
@akosyakov akosyakov added bug bugs found in the application help wanted issues meant to be picked up, require help search in workspace issues related to the search-in-workspace labels Mar 5, 2020
@vince-fugnitto
Copy link
Member

Might it be a symptom of #889? (and potentially slow networks speeds)
I was unable to successfully reproduce it from sources.

@corneliusludmann
Copy link
Contributor Author

Maybe it really has something to do with network latencies. When I start Theia in a local Docker container I'm not able to reproduce this as well. Started in the cloud (here Gitpod) I have this almost always. Although I don't notice any other limitations in terms of internet speed.

@akosyakov
Copy link
Member

akosyakov commented Mar 5, 2020

I'm pretty sure there is a race :) Someone just needs to read the code carefully a part where we trigger search on typing and process results, something is not cancelled or queued properly and previous results override latest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application help wanted issues meant to be picked up, require help search in workspace issues related to the search-in-workspace
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants