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

@@ -85,7 +85,7 @@ export function BerthList() {
setSort,
filters,
setFilter,
setAllFilters,
applyView,
clearFilters,
setPage,
setPageSize,
@@ -183,8 +183,8 @@ export function BerthList() {
<div className="flex items-center gap-2 ml-auto">
<SavedViewsDropdown
entityType="berths"
onApplyView={(savedFilters, _savedSort) => {
setAllFilters(savedFilters);
onApplyView={(savedFilters, savedSort) => {
applyView({ filters: savedFilters, sort: savedSort });
}}
/>
<Button