Skip to content

Sync builders directory state to the URL - #370

Open
Johnpii1 wants to merge 2 commits into
boundlessfi:mainfrom
Johnpii1:main
Open

Sync builders directory state to the URL#370
Johnpii1 wants to merge 2 commits into
boundlessfi:mainfrom
Johnpii1:main

Conversation

@Johnpii1

Copy link
Copy Markdown

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.

@vercel

vercel Bot commented Aug 26, 2026

Copy link
Copy Markdown

@Johnpii1 is attempting to deploy a commit to the Threadflow Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Aug 26, 2026

Copy link
Copy Markdown

@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! 🚀

Learn more about application limits

@Benjtalkshow Benjtalkshow left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! tsc and build pass here, but npm run lint fails at builders-view.tsx:122.

Blocking:

  1. use-builders.ts:54 calls /users/directory/filters. Should be /users/filters, so filters 404 now.
  2. builders-view.tsx:121 drops typed characters. Type abc, pause, type de fast.
  3. :98 role is the account role, not a job title. Leave it out.
  4. :92 id fallback makes links the profile route cannot open.

Please add a screenshot.

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.

Sync builders directory state to the URL

2 participants