Search Bar Enhancement: wire message content search - #3445
Conversation
…ats page - global-nav.tsx: fire SearchRoomMessages when searching, merge content-match rooms into bucketed list, fix empty-state check to use mergedRooms so content matches are not hidden - chats-page.tsx: same SearchRoomMessages useEffect pattern, merge content-match-only rooms into visibleRooms
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
…-Bar-Enhancement
…-Bar-Enhancement
…ch on roomCounter
| })); | ||
| }, | ||
| { limit: 50 }, | ||
| [debouncedSearch, chat.keys.roomCounter], |
There was a problem hiding this comment.
we should call refresh()/reset() directly on roomCounter change, like getRooms already does, instead of just adding it to useIteratorPixel's deps array
…-Bar-Enhancement
…-Bar-Enhancement
…-Bar-Enhancement
…-Bar-Enhancement
|
Confirmed locally: pagination is applied to matching messages, but the UI displays matching rooms. additionally infinite or additonal scroll doesnt work after. |
…-Bar-Enhancement
…moss-ui into Search-Bar-Enhancement # Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
…-Bar-Enhancement
| })); | ||
| }, | ||
| { limit: 50 }, | ||
| [debouncedSearch, chat.keys.roomCounter], |
| >( | ||
| (limit, offset) => | ||
| debouncedSearch | ||
| ? `META | SearchRoomMessages(search=["<encode>${debouncedSearch}</encode>"], project=["${SYSTEM__PLAYGROUND}"], limit=[${limit}], offset=[${offset}], includeMessageText=[false]);` |
There was a problem hiding this comment.
Can you use JSON.stringify for these params? like search=${JSON.stringify(debouncedSearch)}
| })); | ||
| }, | ||
| { limit: 50 }, | ||
| [debouncedSearch, chat.keys.roomCounter], |
|
Kaveh are you seeing my comments about |
|
should be good now. just saw this one |
|
Pushed a commit fixing the chats-page loading flash (spinner/no-chats flashing on every reload). Root cause was in the shared useIteratorPixel hook - it clears data on every dependency change, unlike useIteratorApi which deliberately doesn't. Fixed that plus reworked chats-page's loading state to dim in place instead of clearing. Made the fix directly rather than flagging it - it's existing dev behavior, not something from this PR. |
|
FE looks good to me, BE still has a comment outstanding (BE PR needs to be merged first) |
Goes with SEMOSS/Semoss#2764
Description
Formulated a more robust solution for the playground search bar that is able to search for content within different rooms.
Changes Made
How to Test
Notes