Skip to content

feat: [UIE-10074, UIE-10076, UIE-10075] - IAM: bugs resetting to prev page#13330

Closed
aaleksee-akamai wants to merge 5 commits intolinode:developfrom
aaleksee-akamai:UIE-10074
Closed

feat: [UIE-10074, UIE-10076, UIE-10075] - IAM: bugs resetting to prev page#13330
aaleksee-akamai wants to merge 5 commits intolinode:developfrom
aaleksee-akamai:UIE-10074

Conversation

@aaleksee-akamai
Copy link
Contributor

@aaleksee-akamai aaleksee-akamai commented Jan 27, 2026

Description 📝

This PR fixes couple of bugs related to resetting page in Assigned Roles/Entities table when user Remove/Unassign/Change role/Assignment

Changes 🔄

List any change(s) relevant to the reviewer.

  • Update logic for resetting page
  • Cleanup

Scope 🚢

Upon production release, changes in this PR will be visible to:

  • All customers
  • Some customers (e.g. in Beta or Limited Availability)
  • No customers / Not applicable

Preview 📷

Before After
UIE-10074
Screen.Recording.2026-01-28.at.10.12.03.AM.mov
Screen.Recording.2026-01-28.at.10.13.25.AM.mov
UIE-10075
Screen.Recording.2026-01-28.at.10.22.19.AM.mov
Screen.Recording.2026-01-28.at.10.23.27.AM.mov
Screen.Recording.2026-01-28.at.10.24.48.AM.mov
Screen.Recording.2026-01-28.at.10.25.44.AM.mov
UIE-10076
Screen.Recording.2026-01-28.at.10.40.11.AM.mov
Screen.Recording.2026-01-28.at.10.41.03.AM.mov

How to test 🧪

Prerequisites

(How to setup test environment)

  • use iam account
  • use child account + IAM Delegation flag is enabled

Reproduction steps

(How to reproduce the issue, if applicable)

UIE-10074

  • Go to /iam/users/username/roles (or /iam/roles/defaults/roles) with 26 assigned roles
  • Go to 2. page of the table.
  • Click Remove option in the role's action menu.
  • Click Cancel button in the remove confirmation popup.

UIE-10075 - 1st issue

  • Go to /iam/users/username/roles (or /iam/roles/defaults/roles) with 26 assigned roles
  • linode_admin role is the last one on the 1st page and linode_contributer is the 1st role on the 2nd page
  • Go to 2. page of the table
  • Click Change role for linode_contributer to linode_viewer

UIE-10075 - 2nd issue

  • Go to /iam/users/username/roles (or /iam/roles/defaults/roles) with 26 assigned roles
  • Change role for any role on the 1st page

UIE-10076

  • Go to /iam/users/username/roles (or /iam/roles/defaults/roles) with 26 assigned roles
  • Go to 2. page of the table with the one entity role there
  • Click remove assignment form that role

Verification steps

(How to verify changes)

UIE-10074

  • The table should remain on the same page

UIE-10075

  • The table should remain on the same page if user changes role to a new one
  • The table should reset to the prev page if user change role to the already existing one
  • The table should remain on the same page if user changes role on the 1st page

UIE-10076

  • The table should reset to the prev page if user removes the last assignment form the role
Author Checklists

As an Author, to speed up the review process, I considered 🤔

👀 Doing a self review
❔ Our contribution guidelines
🤏 Splitting feature into small PRs
➕ Adding a changeset
🧪 Providing/improving test coverage
🔐 Removing all sensitive information from the code and PR description
🚩 Using a feature flag to protect the release
👣 Providing comprehensive reproduction steps
📑 Providing or updating our documentation
🕛 Scheduling a pair reviewing session
📱 Providing mobile support
♿ Providing accessibility support


  • I have read and considered all applicable items listed above.

As an Author, before moving this PR from Draft to Open, I confirmed ✅

  • All tests and CI checks are passing
  • TypeScript compilation succeeded without errors
  • Code passes all linting rules

// Check if the change decreased the total roles by exactly one.
// This occurs when switching to a role the user already had,
// causing the two roles to merge into a single entry.
const decreasedByOne =
Copy link
Contributor Author

Choose a reason for hiding this comment

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

why we need it:

user has linode_admin and linode_viewer. Change role action can result in 2 different outcomes:

  1. change role to a new one
    ex: changing from linode_viewer to linode_contributor
    The total number of roles does not change (one role is replaced by another)
  2. change role to an existing one
    ex: changing from linode_viewer to linode_admin(when the user already has linode_admin)
    The total number of roles decreases by one, because two roles are merged into a single role entry

So we should reset to the previous page only when the total number of roles decreases

@aaleksee-akamai aaleksee-akamai marked this pull request as ready for review January 28, 2026 09:55
@linode-gh-bot
Copy link
Collaborator

Cloud Manager UI test results

🔺 1 failing test on test run #3 ↗︎

❌ Failing✅ Passing↪️ Skipped🕐 Duration
1 Failing864 Passing11 Skipped44m 27s

Details

Failing Tests
SpecTest
create-linode-with-add-ons.spec.tsCloud Manager Cypress Tests→Create Linode with Add-ons » can select private IP during Linode Create flow

Troubleshooting

Use this command to re-run the failing tests:

pnpm cy:run -s "cypress/e2e/core/linodes/create-linode-with-add-ons.spec.ts"

@abailly-akamai
Copy link
Contributor

@aaleksee-akamai i came up with what I think is a much cleaner approach: #13346

please let me know what you think. If we go with it we should consider updating RolesTable & AssignedEntitiesTable

@abailly-akamai
Copy link
Contributor

as an alternative consideration, see #13346 which fixes those issues at the root (hook)

@aaleksee-akamai
Copy link
Contributor Author

#13346

I prefer to go ahead with your approach! I'll close this PR

@github-project-automation github-project-automation bot moved this from Review to Merged in Cloud Manager Feb 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

IAM Delegation Implementing the new Parent/Child delegation UI IAM (Identity & Access Management)

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants