Repository navigation
Description
Before reporting an issue
- I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.
Area
admin/ui
Describe the bug
In the Clients → Client details → Authorization → Resources tab, when the page size is set to 10 and there are already 10 resources (filling page 1), creating a new (11th) resource causes pagination issues. The newly created resource is appended to page 1 (making it show 11 items), and the resource that was already at the bottom of page 1 also appears on page 2 as a duplicate.
This is a UI-only stale state / client-side list management issue. The server-side data is correct at all times. The problem is that the client-side resource list optimistically appends the new item to the current page's array without respecting the page size limit, and does not refetch the paginated list after the creation, causing existing items to leak across page boundaries.
Version
26.5.2
Regression
- The issue is a regression
Expected behavior
When a new resource is created and the current page is full (e.g., 10 items with page size 10), the new resource should only appear on the next page (page 2). The current page should remain at 10 items, or the list should be refetched to reflect the correct paginated state.
Actual behavior
Creating the 11th resource causes it to be appended to page 1 (showing 11 items instead of 10). Additionally, the resource that was already at the bottom of page 1 also appears on page 2 as a duplicate entry across pages.
How to Reproduce?
- Navigate to Clients → (select a client with Authorization enabled) → Authorization → Resources tab.
- Create 10 resources so that page 1 is completely filled (with page size set to 10).
- Create an 11th resource.
- Observe: The newly created resource appears at the bottom of page 1 (which now shows 11 items instead of 10).
- Navigate to page 2.
- Observe: The resource that was at the bottom of page 1 also appears on page 2 (duplicate).
- Refresh the page (F5): The resource list now correctly shows 10 items on page 1 and 1 item on page 2.
Anything else?
A screen recording demonstrating the issue is attached below.
The bug is cosmetic/UI-only; the server-side state is correctly updated after the create operation. The problem is that the admin console's client-side list/pagination state is not properly invalidated or recalculated after a create operation that crosses a pagination boundary.
This could be caused by:
- The resource list component optimistically appending newly created items to the current page's array without checking the page size limit.
- Missing list refetch or cache invalidation after the create operation in the Authorization Resources tab.
Activity
pedroigor commentedon Feb 13, 2026
For me, even after a refresh, I still see 11 items on page 1.
keycloak-github-bot commentedon Feb 13, 2026
Due to the amount of issues reported by the community we are not able to prioritise resolving this issue at the moment.
If you are affected by this issue, upvote it by adding a 👍 to the description. We would also welcome a contribution to fix the issue.
andreqrochaa commentedon Mar 4, 2026
Hi! I'm working on a fix for this issue. Would appreciate if you assign it to me!
Fix duplicated resource on current and next page in Auth Resources (#…
Fix duplicated resource on current and next page in Auth Resources (k…