rtd_enhanced_search.js hits v3 API without version, RTD returns stable results on non-stable builds
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- javascript
- Domain
- documentation, frontend
Research direction
Start with src/sunpy_sphinx_theme/theme/sunpy/static/js/rtd_enhanced_search.js and trace how the search request is built, how loaded RTD Addons metadata is read, and how later metadata updates are handled. Reproduce a search on a non-default documentation build; done means only the viewed project is version-pinned, external PR builds and unavailable metadata preserve existing behavior, and other projects retain their default versions.
Written by the indexing model from the issue text.
Description
In src/sunpy_sphinx_theme/theme/sunpy/static/js/rtd_enhanced_search.js, searches on indexed non-default documentation versions return results from the project’s default version, usually stable.
This affects projects using the SunPy theme, including Astropy through the Astropy unified theme. See astropy/astropy#19866.
Reproduction:
- Open an indexed non-default build, such as
/en/latest/or a tagged release. - Run a documentation search.
- Results link to
/en/stable/.
The RTD v3 search API ignores a separate &version=<slug> parameter. Version filtering must be included in q using project:<slug>/<version>.
The fix should:
- Pin only the currently viewed project.
- Leave other projects on their default versions.
- Read already-loaded RTD Addons metadata and listen for later updates.
- Avoid pinning external PR builds, which are not indexed.
- Preserve existing behavior when RTD metadata is unavailable.
- Dominant language
- JavaScript
- Stars
- 7
- Forks
- 17
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 2
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.
More from sunpy/sunpy-sphinx-theme
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
sunpy/sunpy-sphinx-theme#321 · 1 comment ·
-
Enhancement
Difficulty 4/5 3-5 days Newbie friendliness 35/100
sunpy/sunpy-sphinx-theme#308 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
sunpy/sunpy-sphinx-theme#300 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
sunpy/sunpy-sphinx-theme#298 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
sunpy/sunpy-sphinx-theme#297 · 1 comment ·
All issues in sunpy/sunpy-sphinx-theme
Similar issues
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
optimization optimization:agents-md-curator
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
githubnext/gh-aw-cao#13143 ·
-
status: needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100