Skip to content

PhoenixKit 2.22.2: Rows per page on the Users admin tabs

PhoenixKit 2.22.2 lets admins choose how many rows the user lists show.

Users, Sessions, Live Sessions, Roles and the media picker get a Rows per page selector next to the page links. The choice is kept in the address as ?per_page=, so it survives a reload and can be shared; changing it goes back to page 1. Roles is now paginated too, 25 per page by default, and its summary cards count all roles, not just the ones on screen. On the Users tab, an Auto option picks the largest size that fits the window. The “Showing … of … results” line is now translated.

The Integrations link in the sidebar still pointed at the old /admin/settings/integrations/website address, which made the page reload in a loop. It now goes to /admin/settings/integrations.

Full release notes: PhoenixKit 2.22.2

2.22.2 · 8 September 2026

Added

  • Rows-per-page selector on the Users admin tabs. Users, Sessions, Live Sessions, Roles and the media picker each get a daisyUI <select> next to the page links (<.page_size_selector>, a sibling of <.pagination> in PhoenixKitWeb.Components.Core.Pagination). The choice lives in the URL as ?per_page= — validated against an allowlist, invalid values fall back to the tab’s default — so a size survives reload and is shareable; picking a new size lands on page 1.
  • Roles is paginated (25 per page by default). It used to render every role on one page; the summary cards now count the whole table rather than the rows on screen.
  • “Auto” page size (opt-in pilot on the Users tab). &lt;.page_size_selector auto_fit> offers an Auto option backed by a small PageSizeAutoFit JS hook that measures the table’s top offset and one row against the viewport and picks the largest allowed size that fits, re-fitting on resize. Off by default; ?fit=true in the URL.

Changed

  • Users, Sessions, Live Sessions and the media picker share the core <.pagination_controls> instead of four hand-rolled join blocks with their own page-range helpers.
  • <.pagination_info> is translated (“Showing … of … results” / “No results” were hardcoded English) and takes a noun_plural attr so a caller can name what is counted — Sessions passes gettext("sessions"), keeping the line it had before switching to the shared component.
  • Sessions now filters and pages in SQL (Sessions.list_sessions_paginated/1) instead of loading every session token and slicing the list in memory. Live Sessions keeps the in-memory slice: Presence is an ETS-backed GenServer, there is no table to push LIMIT/OFFSET down to.

Fixed

  • The Integrations sidebar tab still pointed at /admin/settings/integrations/website, the path 2.21.3 renamed to /admin/settings/integrations. That URL does not 404 as the rename note expected — it matches /admin/settings/integrations/:uuid with uuid = "website", so Repo.get/2 raises Ecto.Query.CastError and LiveView returns a 400 reload response, which loops. The two README route lists and AGENTS.md’s owner-scope note were stale from the same rename and are corrected alongside it.

PhoenixKit 2.22.2. Install or update: {:phoenix_kit, "~> 2.22"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.