Skip to content

Apply sort order even if query is empty#1

Open
outjet wants to merge 1 commit into
Capitalmind:mainfrom
outjet:main
Open

Apply sort order even if query is empty#1
outjet wants to merge 1 commit into
Capitalmind:mainfrom
outjet:main

Conversation

@outjet

@outjet outjet commented Jun 25, 2025

Copy link
Copy Markdown

When running a search with an empty query (no text entered), the frontend was previously skipping the sort step and just showing the first 25 conversations in unsorted order.

This fix removes the early return in performSearch() and ensures that the selected sort order (like “Oldest First” or “Newest First”) always applies—even for empty queries.

  • Removed the if (!query) early return block that bypassed sorting.
  • Now, sortResults() runs on the full dataset, regardless of search input.
  • Limit still applies as before.

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.

1 participant