feat(instantsearch): add React search results page pattern (2/4)#23
Open
vascobettencourt wants to merge 1 commit into
Open
Conversation
This was referenced May 18, 2026
Adds the canonical widget tree (SearchBox, Configure, Hits, Pagination, Stats, NoResultsBoundary), the refinements catalog (RefinementList, HierarchicalMenu, RangeInput, ToggleRefinement, CurrentRefinements, ClearRefinements), sort via SortBy with replicas, and multi-index guidance. The pattern reference points reviewers at types and live docs for prop-level details rather than baking them in. Adds evals 6 and 7 covering the full results page and a searchable refinement list with active-filter chips. Stacks on feat/instantsearch-source-of-truth.
907a605 to
f38efca
Compare
6 tasks
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 skill do?
Adds the highest-value new pattern to the InstantSearch skill: a search results page reference for React (covers faceted search, sort, pagination as one bundle, since the same widget tree underlies all three). The reference scaffolds the canonical widget tree and points at
.d.tsfiles / live docs for prop-level details rather than baking them in (those go stale).This is part 2 of 4. Stacks on #22 (PR 1), so review PR 1 first, then this.
What's in this PR
references/react/search-results-page/features.md— discovery (route, schema, refinement attributes, sort replicas), the canonical widget tree (<SearchBox>+<Configure>+<Hits>+<Pagination>+<Stats>+<NoResultsBoundary>), refinements catalog (<RefinementList>,<HierarchicalMenu>,<RangeInput>,<ToggleRefinement>,<CurrentRefinements>,<ClearRefinements>), sort with replicas, multi-index guidance, features checklist.references/react/search-results-page/styling.md—ais-*class hierarchy for results layout (refinements panel, hits grid, pagination, mobile drawer pattern).references/react/search-results-page/anti-patterns.md— pattern-specific anti-patterns (rebuilding pagination, missing no-results boundary, refinements outside their target<Index>, etc.).SKILL.md: adds the search-results-page row to the patterns table.evals/evals.json: adds eval 6 (full results page on App Router) and eval 7 (searchable refinement list + active-filter chips).Stacking note
This PR's diff against
mainlooks larger because it includes PR 1's commit until PR 1 merges. After PR 1 merges, please rebase this ontomain(or it'll auto-rebase via the merge queue). Reviewing only the second commit (feat(instantsearch): add React search results page pattern) is sufficient.Checklist
python3 scripts/validate_skills.py .passes (31/31)evals/evals.jsonhas 8 prompts after this PR../linksskills/Behavioral test
Evals 6 and 7 were exercised via fresh subagents. Eval 6 (full results page on App Router) hit 11/11 expectations:
<InstantSearchNext>at the layout level,routing={true}andinsights={true},<Configure>with the three required keys,<RefinementList>for brand and<HierarchicalMenu>for category,<SortBy>with replicas,<Pagination>(no<InfiniteHits>),NoResultsBoundaryfromuseInstantSearch().results.nbHits,<Highlight>on hit text,.d.tsprovenance for non-baked props, nogetServerStateon App Router. Eval 7 hit 6/6: searchable refinement list with type-sourced props,<CurrentRefinements>for chips, no rebuild-via-hooks.