Skip to content

User curation page improvements#1259

Open
fbacall wants to merge 3 commits intomasterfrom
faster-user-curation-page
Open

User curation page improvements#1259
fbacall wants to merge 3 commits intomasterfrom
faster-user-curation-page

Conversation

@fbacall
Copy link
Member

@fbacall fbacall commented Mar 13, 2026

Summary of changes

  • Add a "max age" filter to the user curation page to limit query based on user registration date.
  • Apply 1 month max age when visiting from email notification/user menu.
  • I18n for user curation page.

Motivation and context

Initial load was very slow on ELIXIR TeSS due to the "with content" check iterating over a large number of users.

Checklist

  • I have read and followed the CONTRIBUTING guide.
  • I confirm that I have the authority necessary to make this contribution on behalf of its copyright owner and agree to license it to the TeSS codebase under the BSD license.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR improves the curator “Users” page performance and usability by introducing a “max age” (registration date) filter, defaulting that filter when navigating from notifications/menus, and moving user-curation UI strings toward I18n.

Changes:

  • Add max_age filtering to CuratorController#users and surface it as a new dropdown filter on the curation page.
  • Default curation links (user menu + approval emails) to max_age=1.month to reduce slow initial loads.
  • Introduce I18n keys for the user curation page and refactor recent activity formatting / curation JS into app/assets/javascripts/curation.js.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
test/controllers/curator_controller_test.rb Update assertions for recent activity text formatting.
config/locales/en.yml Add I18n keys for user curation page UI and activity strings.
app/views/layouts/_user_menu.html.erb Add default max_age param to “Curate users” link.
app/views/curator/users.html.erb Add max-age dropdown, apply I18n, refactor page structure, remove inline JS.
app/views/curation_mailer/user_requires_approval.text.erb Add default max_age param to email deep-link.
app/views/curation_mailer/user_requires_approval.html.erb Add default max_age param to email deep-link.
app/helpers/curators_helper.rb Add max-age option helper + I18n-based approval labels.
app/controllers/curator_controller.rb Implement max_age parsing/filtering for the users query.
app/assets/javascripts/curation.js Add JS helpers for filter param application and curate-user AJAX.
app/assets/javascripts/application.js Initialize Curation.init() on Turbolinks load.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@fbacall fbacall marked this pull request as ready for review March 17, 2026 11:14
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.

2 participants