8000 Newly created resource appears on both current and next page in Authorization Resources tab · Issue #46088 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

Newly created resource appears on both current and next page in Authorization Resources tab #46088

Closed

Description

@mehmetenesturan

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?

  1. Navigate to Clients → (select a client with Authorization enabled) → Authorization → Resources tab.
  2. Create 10 resources so that page 1 is completely filled (with page size set to 10).
  3. Create an 11th resource.
  4. Observe: The newly created resource appears at the bottom of page 1 (which now shows 11 items instead of 10).
  5. Navigate to page 2.
  6. Observe: The resource that was at the bottom of page 1 also appears on page 2 (duplicate).
  7. 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.
issue.mov

Activity

  1. pedroigor commented on Feb 13, 2026

    @pedroigor
    Contributor

    For me, even after a refresh, I still see 11 items on page 1.

  2. keycloak-github-bot commented on Feb 13, 2026

    @keycloak-github-bot

    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.

  3. andreqrochaa commented on Mar 4, 2026

    @andreqrochaa
    Contributor

    Hi! I'm working on a fix for this issue. Would appreciate if you assign it to me!

  4. added a commit that references this issue on Apr 17, 2026
    95cfffc
  5. added a commit that references this issue on Jul 20, 2026
    96d54a2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Fields

    No fields configured for bug.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0