From 29fb882478ca69d85a13ba355271d732061388d5 Mon Sep 17 00:00:00 2001 From: Matt Date: Tue, 2 Jun 2026 12:26:10 +0200 Subject: [PATCH] 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) --- src/components/berths/berth-list.tsx | 6 +- src/components/clients/client-list.tsx | 14 +- src/components/companies/company-list.tsx | 6 +- src/components/interests/interest-list.tsx | 6 +- .../residential-interests-list.tsx | 6 +- src/components/yachts/yacht-list.tsx | 6 +- src/hooks/use-paginated-query.ts | 135 +++++++++++++++++- 7 files changed, 152 insertions(+), 27 deletions(-) diff --git a/src/components/berths/berth-list.tsx b/src/components/berths/berth-list.tsx index b94296da..d3b14a0f 100644 --- a/src/components/berths/berth-list.tsx +++ b/src/components/berths/berth-list.tsx @@ -85,7 +85,7 @@ export function BerthList() { setSort, filters, setFilter, - setAllFilters, + applyView, clearFilters, setPage, setPageSize, @@ -183,8 +183,8 @@ export function BerthList() {
{ - setAllFilters(savedFilters); + onApplyView={(savedFilters, savedSort) => { + applyView({ filters: savedFilters, sort: savedSort }); }} />