code-charity / code-charity/youtube
🐞 Search Remove Related Search Results broken
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 4.6k
- Forks
- 996
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 7
Description
Bug Report:
- Description: General -> Search -> Remove related search results toggle is broken, trending search results are still shown. The screenshot below is from an account that has all activity tracking (watch history, etc) all turned off. They are entirely suggested by what's currently trending, and I have not interacted with or know any of these things/channels:
- Steps to reproduce this: Turn on remove related search results, then click the search bar on the homepage.
- Since when?: No clue
- Browser: Firefox 141.0.3
- Are any errors shown in the Browser-Console?: No
- ImprovedTube Version 4.1320
Crucial info:
When the search bar is clicked, the browser sends a GET request to an URL which begins with https://suggestqueries-clients6.youtube.com/complete/search?. When there isn't anything typed into the search bar, this XHR request URL ends with the following: ytvs=1&gs_id=0&q=&cp=0. Note the q=& part. That's the search query, and in this instance I didn't type anything into the search field, so it was empty. Maybe this could be used to block this XHR request if that's something ImprovedTube can do? If yes, take note that gs_id value changes each time the XHR request isn't successful to an alphanumeric value.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start from the Search settings toggle and the homepage search-bar interaction described in the report, then trace the empty-query request to suggestqueries-clients6.youtube.com. Confirm that enabling “Remove related search results” prevents trending suggestions when q= is empty, including after gs_id changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, search
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100