Skip to content

Commit 0283f8f

Browse files
JSKittyclaude
andcommitted
fix: truncate long GIF search queries in empty state display
Queries over 32 characters are truncated with ellipsis in the "No GIFs found for ..." message to prevent UI overflow. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 210f470 commit 0283f8f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/main.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2314,7 +2314,8 @@ async function searchGifs(query) {
23142314
gifCurrentOffset = data.results.length;
23152315
gifHasMore = data.results.length >= gifPageSize;
23162316
} else {
2317-
showGifEmptyState(`No GIFs found for "${query}"`);
2317+
const displayQuery = query.length > 32 ? query.slice(0, 32) + '...' : query;
2318+
showGifEmptyState(`No GIFs found for "${displayQuery}"`);
23182319
gifHasMore = false;
23192320
}
23202321
} catch (error) {

0 commit comments

Comments
 (0)