Skip to content

Replace replaceState with pushState for search filter changes#821

Open
deslawson wants to merge 1 commit into
rinafcode:mainfrom
deslawson:main
Open

Replace replaceState with pushState for search filter changes#821
deslawson wants to merge 1 commit into
rinafcode:mainfrom
deslawson:main

Conversation

@deslawson

@deslawson deslawson commented Jun 28, 2026

Copy link
Copy Markdown

Description

Search store (src/app/store/searchStore.ts) now calls pushState for significant filter changes (query, difficulty, topics, sort, price, duration, instructors) creating history entries so the Back button restores previous search state. replaceState is retained only for transient pagination cursor updates. A popstate listener restores filter state from URL on back/forward navigation. All 14 tests pass.

Related Issue

Closes #777

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • No console errors
  • Uses Lucide icons consistently
  • Responsive design implemented
  • Starknet best practices followed

Closes #777

Search store (src/app/store/searchStore.ts) now calls pushState for significant filter changes (query, difficulty, topics, sort, price, duration, instructors) creating history entries so the Back button restores previous search state. replaceState is retained only for transient pagination cursor updates. A popstate listener restores filter state from URL on back/forward navigation. All 14 tests pass.

Closes rinafcode#777
@drips-wave

drips-wave Bot commented Jun 28, 2026

Copy link
Copy Markdown

@deslawson Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Refactor] searchStore URL sync uses replaceState directly — breaks browser history

1 participant