Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: r-yalcin <221595382+r-yalcin@users.noreply.github.com>
r-yalcin
left a comment
There was a problem hiding this comment.
Verbessere Stabilität und Design!
Co-authored-by: r-yalcin <221595382+r-yalcin@users.noreply.github.com>
Done in 76216d1. Here's what was improved: Stability:
Design:
|
Co-authored-by: r-yalcin <221595382+r-yalcin@users.noreply.github.com>
…tests Co-authored-by: r-yalcin <221595382+r-yalcin@users.noreply.github.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cc700a7193
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
This PR implements a comprehensive sort and filter system for the job feed, replacing a placeholder with production-grade functionality including persistent user preferences, accessibility features, and extensive test coverage.
Changes:
- New pure domain module (
sortFilter.ts) with stable sorting algorithms and filter logic backed by 21 unit tests - LocalStorage persistence with safe parsing, validation, and 400ms debouncing for user filter/sort preferences
- Accessible filter panel with reduced-motion support, ARIA attributes, and premium flat UI design
- Deterministic 3-tier sort stability (primary → created_at DESC → id ASC) prevents flickering across reloads
Reviewed changes
Copilot reviewed 6 out of 8 changed files in this pull request and generated 14 comments.
Show a summary per file
| File | Description |
|---|---|
src/lib/jobs/sortFilter.ts |
Pure domain logic for sorting/filtering jobs with type guards and stable tie-breaking |
src/__tests__/jobs/sortFilter.test.ts |
21 unit tests covering sort modes, filters, edge cases, and immutability |
src/components/jobs/JobFilterSortPanel.tsx |
Filter UI with reduced-motion support, disabled CTA on zero results, ARIA attributes |
src/components/jobs/JobsList.tsx |
Integration of sort/filter with localStorage persistence, memoization, and tab animations |
vitest.config.ts |
Test infrastructure configuration with vite-tsconfig-paths for path resolution |
package.json |
Added vitest 4.0.18 and vite-tsconfig-paths 6.1.1 as dev dependencies |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ated CTA, aria-labelledby Co-authored-by: r-yalcin <221595382+r-yalcin@users.noreply.github.com>
…edundant useCallback Co-authored-by: r-yalcin <221595382+r-yalcin@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 8 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…tion or class' Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Summary
Replaces the placeholder filter button in the job feed with a fully functional sort/filter panel. Introduces a pure domain module for sort/filter logic, localStorage persistence with safe parsing, 25 unit tests, and a polished panel component with reduced-motion support and accessible markup.
Related Issues
Type of Change
What changed
src/lib/jobs/sortFilter.ts— pure domain module:SortOption,FilterState,sortJobs(stable tie-breakers: primary →created_atdesc →idasc),applyFilters(fast-path when no filters),deriveVisibleJobs(composed),SORT_META,isValidSortOptionsrc/components/jobs/JobFilterSortPanel.tsx— new bottom-sheet/modal: flat dark surface (bg-[#1a1a20]), flatbg-indigo-600CTA (no gradient fill), 44px tap targets,aria-labelledby,aria-pressedon all toggles,useReducedMotionguard on all transforms, portal rendering, safe-area footer inset, animated CTA count swap via keyedmotion.spansrc/components/jobs/JobsList.tsx— imports types/functions exclusively from domain module;deriveVisibleJobsused in twouseMemocalls;sortJobsapplied to waitlist/applied tabs; debounce timer moved intouseRefwith cleanup (no dangling module-level timer); persistence vialoadPersistedState/persistStatewith schema version + safe parse; animated tab transitions viaAnimatePresencewith directional slidesrc/__tests__/jobs/sortFilter.test.ts+vitest.config.ts— 25 unit tests covering distance/newest/wage sorts, null/undefined handling, immutability, filter combinations,deriveVisibleJobscompositionUser impact
How to test
npm test— 25 tests)Manual steps (if applicable):
/app-home/jobsas Teen → tap Filter → panel opens with sort cards, category chips, distance chipsEdge cases:
distance_kmsorted last deterministically)wage_hourly/category: jobs sink to bottom without crashlocalStorageunavailable (SSR / private browsing): falls back to defaults silentlyScreenshots / Recordings (if applicable)
Safety & Privacy (JobBridge)
AI assistance (optional)
AI Prompt Used
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.