Skip to content

Add year filter for frequency lists#448

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/add-year-filter-frequency-lists
Draft

Add year filter for frequency lists#448
Copilot wants to merge 2 commits intomainfrom
copilot/add-year-filter-frequency-lists

Conversation

Copy link
Contributor

Copilot AI commented Feb 25, 2026

Frequency lists had no way to filter by year range, making it impossible to scope results to a specific era of questions.

Changes

  • database/qbreader/get-frequency-list.js: Accept minYear/maxYear and apply as set.year range filter in the MongoDB match document
  • routes/api/frequency-list.js: Validate and pass through minYear/maxYear query params; treated as optional (absent = no bound)
  • client/db/frequency-list/subcategory.html: Add year range slider UI (same component as play pages)
  • client/db/frequency-list/subcategory.jsx: Wire up slider events, track minYear/maxYear state, include in API request via existing filterParams utility
  • client/tools/api-docs/frequency-list.html: Document new minYear / maxYear parameters

API

The new parameters follow the same conventions as query and random-tossup/random-bonus:

GET /api/frequency-list?subcategory=Biology&minYear=2015&maxYear=2023

Both are optional integers (inclusive bounds). Omitting either applies no bound on that side.

Original prompt

This section details on the original issue you should resolve

<issue_title>Add year filter for frequency lists</issue_title>
<issue_description></issue_description>

Comments on the Issue (you are @copilot in this section)


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Co-authored-by: geoffrey-wu <42471355+geoffrey-wu@users.noreply.github.com>
Copilot AI changed the title [WIP] Add year filter for frequency lists Add year filter for frequency lists Feb 25, 2026
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.

Add year filter for frequency lists

2 participants