Skip to content

Conversation

@akiva10b
Copy link
Contributor

Redirect Voices search for valid refs to sheets-with-ref

Added a server-side redirect in voices /search when q is a valid ref, preserving other query params and sending users to /sheets-with-ref/. (views.py)
Added a client-side guard in voices search flow to redirect immediately on valid refs. (ReaderApp.jsx)

Search or Search Results page.
"""
search_params = get_search_params(request.GET)
if request.active_module == VOICES_MODULE and search_params["query"]:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have any unit tests for this feature? It feels like we should have been able to catch this.. (Although I'm still not 100% sure what the problem is)

@@ -941,6 +941,20 @@ def search(request):
Search or Search Results page.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add docstring to explain what is happening now, it is non-trivial!

@mergify
Copy link

mergify bot commented Jan 27, 2026

🧪 CI Insights

Here's what we observed from your CI run for 2107914.

❌ Job Failures

Pipeline Job Health on master Retries 🔍 CI Insights 📄 Logs
Continuous Continuous Testing: PyTest Broken 0 View View

Copy link
Contributor

@YishaiGlasner YishaiGlasner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a bug fix but new feature, and it can problematic.
Think about a case i want to search for genesis in voices...
Also, when typing a ref in library you have in autocompletions the option to search or to go to the book, topic etc. Here also you should add this to autocomletions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants