Skip to content

fix(game): preserve search query parameters when navigating game pages (#59) - #60

Open
isihin-3 wants to merge 1 commit into
neo773:masterfrom
isihin-3:fix/preserve-search-query
Open

isihin-3 wants to merge 1 commit into
neo773:masterfrom
isihin-3:fix/preserve-search-query

Conversation

@isihin-3

Copy link
Copy Markdown

Closes #59

Summary

Preserves search query and filter parameters when navigating between homepage search/filter results and game detail pages:

  • Appends active search and filter parameters (q, chipset, performance, playMethod, genre) to GameCard links via buildGameCardHref.
  • Updates the game detail page breadcrumb via buildGameBackLink to contextually link back to the search results (< Back to search results) or filtered list (< Back to games) instead of unconditionally resetting to /.
  • Preserves search query parameters across permanent slug redirects.
  • Keeps search query state synchronized when navigating via browser native Back and Forward buttons.

Verification

  • Tested locally with bun run dev:server and bun run dev:vinext.
  • bun run lint (0 errors, 0 warnings).
  • bun run format:check (clean).
  • bunx tsc --noEmit (clean at root and in packages/macgamingdb-server).
  • bun run test (122 tests passing across 21 test files, including new unit tests for buildSearchQueryString, buildGameCardHref, and buildGameBackLink).
  • bun run build:vinext (standalone output generated successfully).

This branch has not been deployed

No deployments
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.

fix(ux): preserve search query when navigating back from game page / consider global search

1 participant