Sync builders directory state to the URL - #370
Open
Johnpii1 wants to merge 2 commits into
Open
Conversation
…te-to-url Sync builders directory state to the URL
|
@Johnpii1 is attempting to deploy a commit to the Threadflow Team on Vercel. A member of the Team first needs to authorize it. |
|
@Johnpii1 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! 🚀 |
Benjtalkshow
requested changes
Aug 27, 2026
Contributor
There was a problem hiding this comment.
Thanks! tsc and build pass here, but npm run lint fails at builders-view.tsx:122.
Blocking:
use-builders.ts:54calls/users/directory/filters. Should be/users/filters, so filters 404 now.builders-view.tsx:121drops typed characters. Typeabc, pause, typedefast.:98roleis the account role, not a job title. Leave it out.:92idfallback makes links the profile route cannot open.
Please add a screenshot.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
close #369
Motivation
Provide a public, shareable builders directory whose filter, search, sort, and pagination state can be copied as a URL and navigated via browser history.
Persist directory controls in the query string so back/forward navigation and bookmarking produce the same filtered view.
Avoid creating a history entry per keystroke by debouncing search input and using replace navigation for search updates.
Description
Add a new builders route at app/builders/page.tsx that mounts a client BuildersView inside a Suspense boundary.
Add components/builders/use-builders.ts with useBuilders and useBuilderFilters hooks that call the backend endpoints (/users/directory and /users/directory/filters) and serialize query params.
Implement components/builders/builders-view.tsx, a URL-backed client directory that reads initial state from useSearchParams(), validates params, omits defaults when serializing, debounces search and uses router.replace for search and router.push for filter/sort/page changes, renders filter controls, skill chips, and paginated results.
Map API builder items to the existing BuilderCard view model and show skeletons / error / empty states; page size is 12 and default sort is newest.
Testing
Ran git diff --check with no reported problems.
Ran npm run lint (ESLint) which completed successfully.
Ran npx tsc --noEmit which passed type checking.
Ran npm run build which failed in this environment because Next.js could not fetch Google Fonts from fonts.googleapis.com, causing the production build to abort (network-restricted environment), not a code compile error.