fix: show new msg when token not found on search#24569
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
app/components/Views/TrendingView/components/EmptyErrorState/EmptySearchResultState.test.tsx
Outdated
Show resolved
Hide resolved
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsThe changes are isolated to the TrendingTokens feature, which is a feature-flagged functionality. The modifications include:
Key observations:
Since there are no E2E tests for this feature and the changes are low-risk UI improvements with proper unit test coverage, no E2E test tags need to be run. |
| <EmptySearchResultState /> | ||
| ) : ( | ||
| <EmptyErrorTrendingState onRetry={handleRefresh} /> | ||
| ) |
There was a problem hiding this comment.
Race condition shows wrong empty state during search debounce
Low Severity
The condition searchQuery.trim().length > 0 checks the component's immediate state, but searchResults comes from useTrendingSearch which uses an internal 200ms debounced query. During the debounce period, searchQuery can be non-empty while searchResults still reflects the previous (empty) trending results. If trending returns empty results, users will briefly see "No tokens found" when they start typing, before the actual search executes - implying a search was performed when it hasn't.
There was a problem hiding this comment.
I don't think this comment applies. If searchQuery is still loading, isLoading will prevent any of this from rendering.
|



Description
Show a custom msg when user searches for a token that is not found
Changelog
CHANGELOG entry: show custom error msg page when user searches for token not found on trending page
Related issues
Fixes: #24566
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Adds a dedicated empty search state for Trending Tokens and wires it into the full view with tests and i18n.
EmptySearchResultState(design-system layout) with new i18n strings:trending.empty_search_result_state.{title,description}TrendingTokensFullViewto renderEmptySearchResultStatewhensearchQuery.trim().length > 0and no results; otherwise falls back toEmptyErrorTrendingState; loading still shows skeletonsEmptySearchResultState; updatesTrendingTokensFullViewtests to cover empty-without-search vs empty-with-search pathsWritten by Cursor Bugbot for commit c0db669. This will update automatically on new commits. Configure here.