Repository navigation
Conversation
/games could only be filtered by tag and always listed recently updated games first. Add a search box (?q=, debounced, matching name or description, case- insensitive) and a sort control (?sort= updated, newest or name; unknown values fall back to updated, and orderBy is picked from a whitelist). Both combine with the tag filters, which now keep the other parameters when toggled, and with infinite scroll; an id tiebreak keeps pages from overlapping. Fixes #206. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
engleek
force-pushed
the
feat/games-search-sort
branch
from
October 4, 2026 08:25
1238f8a to
40a2c33
Compare
Contributor
Author
|
Superseded by #249, which merged this change into main. |
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.
Fixes #206. (Rebuilt on
mainnow that #229 is merged: a single commit.)/gamescould only be filtered by tag, and always listed recently updated games first.Change
Search (
?q=): debounced (300 ms). It matches the name or the description, case-insensitive (Prismacontains,mode: 'insensitive'). I chose that over the full-text helper because it combines simply with the tagANDs. Blank means no search.Sort (
?sort=):updated, recently updated: the default, and the old order;newest, recently added;name, name A–Z.orderByis picked from a whitelist, so unknown values fall back to the default. Anidtiebreak keeps infinite-scroll pages from overlapping when values tie.Tag filters keep
qandsortwhen toggled. Before,setSearchParams({ tags })dropped every other parameter.Tag counts follow the search, since they share its
where.Layout: the search box and sort select sit above the tag filter. On a phone they wrap with no horizontal scroll; I checked at 375px.
Tests
A new e2e test:
?sort=nameorders the cards A–Z and the select shows it;q, keepssort, and only matching games remain;qandsort;?sort=bogusstill renders;On
main: it fails. Locally: the full e2e suite (39) and the unit and story tests (51) pass.🤖 Generated with Claude Code