fix: resolve incomplete search results in sessions tab#61427
Open
iborazzi wants to merge 6 commits into
Open
Conversation
…iltering current page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR resolves issue #61418. The current implementation of the Sessions tab search was page-local, meaning it only filtered the currently loaded set of 20 sessions instead of searching across the entire database. This fix updates the search logic to render full search results directly when a query is active, mapping them to the expected SessionInfo format.
Related Issue
Fixes #61418
Type of Change
[x] 🐛 Bug fix (non-breaking change that fixes an issue)
[ ] ✨ New feature (non-breaking change that adds functionality)
[ ] 🔒 Security fix
[ ] 📝 Documentation update
[ ] ✅ Tests (adding or improving test coverage)
[ ] ♻️ Refactor (no behavior change)
[ ] 🎯 New skill (bundled or hub)
Changes Made
web/src/pages/SessionsPage.tsx:
Introduced searchResultSessions as the primary list source when a search query is active.
Implemented mapping logic to convert SessionSearchResult objects into SessionInfo shape, providing necessary fallbacks for fields not present in search results (e.g., is_active, message_count).
Decoupled search rendering from local pagination.
How to Test
Navigate to the Sessions tab in the dashboard.
Enter a search term that exists in multiple sessions across the database (e.g., "hindsight").
Verify that the UI displays all matching sessions, rather than only those present in the first page of the default session list.
Checklist
[x] I've read the Contributing Guide
[x] My commit messages follow Conventional Commits
[x] I searched for existing PRs to make sure this isn't a duplicate
[x] My PR contains only changes related to this fix
[ ] I've run pytest tests/ -q and all tests pass
[ ] I've added tests for my changes
[x] I've tested on my platform: Windows 11
Documentation & Housekeeping
[x] I've considered cross-platform impact — N/A