fix(audit): H15 (saved-view sort) + H14 (back/forward URL resync) in usePaginatedQuery

H15: new applyView({filters,sort}) atomic mutator (one URL write) restores a
saved view's sort, threaded through all six list components instead of being
discarded. H14: a guarded effect resyncs page/sort/filters FROM the URL on
Back/Forward; the resync setStates carry a scoped, justified
set-state-in-effect disable (loop-guarded external-URL sync).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-02 12:26:10 +02:00
parent 808e80744b
commit 29fb882478
7 changed files with 152 additions and 27 deletions

View File

@@ -110,7 +110,7 @@ export function InterestList() {
setPageSize,
filters,
setFilter,
setAllFilters,
applyView,
clearFilters,
} = usePaginatedQuery<InterestRow>({
queryKey: ['interests'],
@@ -266,8 +266,8 @@ export function InterestList() {
<>
<SavedViewsDropdown
entityType="interests"
onApplyView={(savedFilters) => {
setAllFilters(savedFilters);
onApplyView={(savedFilters, savedSort) => {
applyView({ filters: savedFilters, sort: savedSort });
}}
/>
<ColumnPicker