Skip to content

Conversation

@abailly-akamai
Copy link
Contributor

@abailly-akamai abailly-akamai commented Jan 14, 2026

Description 📝

This PR improves the UX for the Parent Account users "Switch Account" and fixes a couple issues with the delegation feature.

Note

This PR only addressed the new Delegation feature. It should bring no regressions to existing Parent Account users

Changes 🔄

  • Enable the "Switch Account" button without permission (the create_child_account_token isn't user facing, so we must allow the user to access the drawer. From there, they'll either see a list of Child Account they are allowed to switch to or no account)
  • Fix query invalidation when updating the delegation
  • Improve SwitchAccountDrawer UX
    • Remove search field if empty set
    • Better messaging to the user (💡 new UI requirements)
  • Fix tests

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
Not delegated While Delegated Empty Search
Screenshot 2026-01-14 at 15 27 29 Screenshot 2026-01-14 at 15 27 03 Screenshot 2026-01-14 at 15 28 05

How to test 🧪

Prerequisites

Have both legacy and IAM parent/child accounts

Verification steps

👉 IAM Reseller Account

  • Sign in a Parent Account
    • ✅ Confirm the "Switch Account" button is enabled at /billing
    • ✅ Open the User Menu and confirm the "Switch Account" is enabled
  • Navigate to /iam/delegations and add the current user to child delegation
  • Open the SwitchAccountDrawer
    • ✅ Confirm the Child Account is listed
    • ✅ Confirm search is working as expected
  • Navigate to /iam/delegations and remove the current user to child delegation
  • Open the SwitchAccountDrawer
    • ✅ Confirm the User Search isn't rendered
    • ✅ Confirm the Child Account is not listed

👉 Legacy Parent/Child Account

  • ✅ Confirm no regression with all the steps above by comparing flow to production
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

@abailly-akamai abailly-akamai marked this pull request as ready for review January 14, 2026 15:09
@abailly-akamai abailly-akamai requested a review from a team as a code owner January 14, 2026 15:09
return allChildAccounts;
}
return data?.pages.flatMap((page) => page.data);
}, [isIAMDelegationEnabled, searchQuery, allChildAccounts, data]);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This has just been lifted to the parent

return allChildAccounts;
}
return data?.pages.flatMap((page) => page.data);
}, [isIAMDelegationEnabled, searchQuery, allChildAccounts, data]);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Did not change any functionality in this file - just lifted queries and logic here to control the display of the search field

// Invalidate all my delegated child accounts since delegation may have changed
queryClient.invalidateQueries({
queryKey: delegationQueries.myDelegatedChildAccounts._ctx.all._def,
});
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Before this, we had to refresh to get a fresh delegation state

@linode-gh-bot
Copy link
Collaborator

Cloud Manager UI test results

🎉 855 passing tests on test run #5 ↗︎

❌ Failing✅ Passing↪️ Skipped🕐 Duration
0 Failing855 Passing11 Skipped50m 7s

Copy link
Contributor

@mpolotsk-akamai mpolotsk-akamai left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thanks!

@github-project-automation github-project-automation bot moved this from Review to Approved in Cloud Manager Jan 16, 2026
@abailly-akamai abailly-akamai merged commit 8b2e89d into linode:develop Jan 16, 2026
35 checks passed
@github-project-automation github-project-automation bot moved this from Approved to Merged in Cloud Manager Jan 16, 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

Status: Merged

Development

Successfully merging this pull request may close these issues.

4 participants