Issues: Critical UX: High page numbers shown in pagination but silently redirect to page 1

Posted Jul 27, 2025

closed

Problem

When visiting https://oldergay.men/users, the pagination shows:

  • "Displaying items 1-21 of 83162 in total"
  • Page numbers up to 3961
  • But clicking on page 3961 (or any page > 500) silently redirects back to page 1

This is a terrible user experience that frustrates users who are trying to browse through the member list.

Background

We recently added:

  1. MemoryEfficientPagination concern with MAX_PAGE_NUMBER = 500 limit
  2. Cursor pagination as an alternative
  3. Page limit enforcement that redirects high pages to page 1

However, the pagination UI still shows all possible page numbers based on total record count, creating this confusing situation.

Questions to Address

  1. Should we remove the page limit entirely and let users access high pages?
  2. Is cursor pagination causing memory problems that necessitated the page limit?
  3. Should we temporarily disable cursor pagination site-wide and use only standard Pagy pagination?
  4. If we keep the page limit, how do we update the UI to not show inaccessible page numbers?

User Impact

  • Users see page numbers they can't actually access
  • Clicking high page numbers silently fails with no error message
  • This breaks the expected behavior of pagination
  • Users can't browse to older members in the list

Priority

HIGH - This is actively frustrating users trying to use the site.

Related Code

  • app/controllers/concerns/memory_efficient_pagination.rb (MAX_PAGE_NUMBER = 500)
  • app/controllers/users_controller.rb (includes MemoryEfficientPagination)
  • app/middleware/high_page_protection.rb
  • Pagy pagination UI generation

Temporary Fix Options

  1. Remove page limits entirely - let users access any page
  2. Update pagination UI to hide pages > 500
  3. Show error message instead of silent redirect
  4. Disable cursor pagination temporarily if it's causing issues

Loading profiles...