Skip to content

feat: add a seniority filter to Find Jobs - #189

Merged
husthunterpy01 merged 4 commits into
mainfrom
feat/martin/seniority-filter
Oct 11, 2026
Merged

husthunterpy01 merged 4 commits into
mainfrom
feat/martin/seniority-filter

Conversation

@husthunterpy01

Copy link
Copy Markdown
Owner

What

A Seniority filter on Find Jobs, next to Category and Country. The API already accepted ?seniority_level=; this adds the missing dropdown and an endpoint to fill it.

Backend

  • GET /api/v1/jobs/seniority-levels lists the levels that currently have jobs with their counts, lowest level first (jobs without a level are left out). It mirrors GET /jobs/countries and is declared before /{job_id}.
  • The seniority_level parameter's description points to it.
  • Documented in document/backend/SILVER_SYNC.md.

Frontend

  • A Seniority dropdown in the filter row, built from the new endpoint so it only offers levels that have jobs, with counts (for example "Senior (365)").
  • It follows the other filters: a pick only takes effect on Apply, Clear and Clear filters reset it, it is kept in the URL (?seniority=3) so a filtered list can be shared or reloaded, and a level that no longer has jobs is dropped from a stale link.
  • Level 2 is labelled "Mid-level or not stated", because jobs whose title says nothing about level are stored as mid-level (see "Default level" in SILVER_SYNC.md). The filter matches one exact level, not "and above".
  • If the levels cannot be loaded, the page still works with just "All levels".

Testing

  • Backend: ruff clean, 336 tests pass, including 7 new ones for the filter (each level, mid-level for unmarked titles, combined with other filters, invalid values, the endpoint, and that it is not swallowed by /{job_id}).
  • Frontend: format, lint, type-check and build pass; 96 node and 112 component tests pass (new ones for the option list, URL state, Apply/Clear and the service calls); 19 Playwright tests pass (3 new), stable over 8 repeats.
  • Checked against the real backend and a real browser on a throwaway database with seeded jobs: the dropdown is filled from the real endpoint, picking Senior returns exactly the senior jobs, the URL becomes ?seniority=3, and a reload keeps the choice. The Playwright tests use a hand-written mock API, so this run is what confirms the two sides agree.

Notes for review

  • With a third dropdown, Apply and Clear wrap onto a second line at desktop widths. It reads fine; narrowing the selects would put them back on one row but would truncate the longer labels.
  • Seniority comes from the job title (see the "Seniority level" section in SILVER_SYNC.md), so only the level words in a title are reliable; "Mid-level or not stated" is partly a guess.

@husthunterpy01
husthunterpy01 merged commit 2837316 into main Oct 11, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant