Skip to content

Add sorting to mass closure history page#117

Merged
retlehs merged 1 commit into
mainfrom
closures-sort
Jul 7, 2026
Merged

Add sorting to mass closure history page#117
retlehs merged 1 commit into
mainfrom
closures-sort

Conversation

@retlehs

@retlehs retlehs commented Jul 7, 2026

Copy link
Copy Markdown
Member

The mass closure history page is now paginated on production, so finding the biggest events means paging through chronologically. This adds a sort control matching the front page's, with two options: Most recent (default, unchanged behavior) and Most closures (plugin_count DESC, recency as tiebreaker).

  • GET /closures?sort=closures — new whitelisted sort param; invalid values fall back to recent
  • Sort select above the event list, styled like the front page's, auto-submits on change via a reusable data-autosubmit handler in app.js (sr-only submit button as no-JS fallback)
  • Pagination links preserve the active sort
  • GET /api/closures accepts the same param and echoes "sort" in the response
  • /closures.md sibling supports it too (sort added to mdContentParams); the events heading notes the active sort
  • RSS feed stays recency-ordered
  • Tests cover both sort orders and the equal-count tiebreak

🤖 Generated with Claude Code

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@retlehs retlehs merged commit ff07a8b into main Jul 7, 2026
5 checks passed
@retlehs retlehs deleted the closures-sort branch July 7, 2026 19:15
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.

1 participant