Changing sort updates results without losing filters or pagination
Why it matters
When changing sort order wipes active filters, the user watches their carefully refined query collapse back to the unfiltered state in one click. They rebuild the filters, sort again, and it collapses again — or they give up. This is a state-management bug that reads to the user as the directory being fundamentally unreliable. Sort is a refinement of the existing result set, not a reset, and confusing the two guarantees the user never trusts the interface enough to commit to a listing.
Severity rationale
High because silent filter loss destroys user work and signals the interface cannot be trusted to preserve intent across interactions.
Remediation
Update the sort query parameter by cloning the existing URLSearchParams, setting only sort and resetting page to 1, then calling router.push. Do not construct a new params object from scratch. Edit components/SortControl.tsx:
const params = new URLSearchParams(searchParams)
params.set('sort', newSort)
params.set('page', '1')
router.push(`?${params}`)
This preserves category, price, and every other active filter.
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the Search & Discovery UX Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
Taxons
History
- 2026-04-18·v1.0.0·Initial import from directory-search-discovery·automated