Skip to content

InfoTab: Fix slow loading time#293

Merged
illume merged 1 commit into
Azure:mainfrom
skoeva:infotab
Feb 25, 2026
Merged

InfoTab: Fix slow loading time#293
illume merged 1 commit into
Azure:mainfrom
skoeva:infotab

Conversation

@skoeva
Copy link
Copy Markdown
Collaborator

@skoeva skoeva commented Feb 24, 2026

The Info tab was loading indefinitely and taking too long when it did load. There are two root causes:

  • t (translation function) was in useEffect dependency arrays - since t is recreated on every render, this caused an infinite loop
  • getClusterResourceIdAndGroup (az aks list) was called to look up the resource group, even though it was already available in the namespace label aks-desktop/project-resource-group - the same way ScalingTab and MetricsTab get it

To address this, we read resourceGroup from the namespace label directly and remove the az aks list call and its associated state entirely.

Fixes: #280

Testing

  • Open a project and navigate to the Info tab
  • Verify it loads without spinning indefinitely
  • Verify networking and compute settings appear correctly
  • Verify the Update button works

Signed-off-by: Evangelos Skopelitis <eskopelitis@microsoft.com>
@skoeva skoeva self-assigned this Feb 24, 2026
Copilot AI review requested due to automatic review settings February 24, 2026 13:02
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a critical performance issue in the Info tab that caused infinite loading and excessive network requests. The root cause was the translation function t being included in useEffect dependency arrays, causing re-execution on every render. Additionally, the code was making an expensive az aks list Azure CLI call to fetch the resource group, even though this information was already available in the namespace labels.

Changes:

  • Removed t from the useEffect dependency array to fix the infinite loop
  • Eliminated the getClusterResourceIdAndGroup call and its associated state by reading resourceGroup directly from the aks-desktop/project-resource-group namespace label
  • Consolidated two useEffect hooks into one, simplifying the component logic

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Collaborator

@illume illume left a comment

Choose a reason for hiding this comment

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

🎉 thanks!

@illume illume merged commit 6f39a82 into Azure:main Feb 25, 2026
11 checks passed
@skoeva skoeva deleted the infotab branch February 26, 2026 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Info Tab: Doesn't load, infinite loop

3 participants