d0462a87c8549e6eaedb513d80c03aecaba31d5c
useBasketUrlSync was treating every searchParams change as a URL→Store authority event. In practice this meant Back from PackagesStep to the providers map landed on `/` (no `?compare=...`) and the hook called setAll([]) — wiping the basket. Changed the semantics so that when an in-app navigation drops the `?compare=` param but the store still has items, we re-attach the store's keys to the new URL rather than clearing the store. Shared links still hydrate the store on initial mount, and the subscribe that writes store→URL on basket changes is untouched. With this, a user can: - Add a package on Provider A's page. - Back to the providers map (CompareBar stays, URL still shows `?compare=parsons:everyday`). - Navigate into Provider B's page (URL carries the Parsons item forward). - Add B's package (URL now `?compare=parsons:everyday,rankins:standard`). - Hit Compare with 2/3 basket. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Description
No description provided
Languages
TypeScript
94.6%
JavaScript
2.8%
CSS
2.5%
HTML
0.1%