Skip to content

upstreamable: frontend: ProjectDetails: Fix stale custom tabs#639

Open
skoeva wants to merge 1 commit into
headlamp-downstreamfrom
infotab-hl
Open

upstreamable: frontend: ProjectDetails: Fix stale custom tabs#639
skoeva wants to merge 1 commit into
headlamp-downstreamfrom
infotab-hl

Conversation

@skoeva
Copy link
Copy Markdown
Collaborator

@skoeva skoeva commented May 7, 2026

These changes fix stale custom project detail tabs by scoping plugin tab state to the current route and resolved project identity.

Related: #634

Summary

  • Adds a project identity key from the route name, project id, clusters, and namespaces
  • Remounts ProjectDetailsContent when the route or resolved project identity changes
  • Stores custom/plugin tabs separately from default tabs and tags them with the current project key
  • Clears project-specific plugin tabs while async isEnabled checks reload for the current project
  • Ignores stale async tab eligibility results after the project changes
  • Prevents blank tab content by resetting the selected tab when the previous tab no longer exists
  • Keeps default project tabs visible while custom links are being reevaluated

Testing

  • Manually verified navigating from a project with a custom Info tab to a project without that tab no longer leaves the stale Info tab visible
  • Manually verified hard reload on a project without an eligible info does not show stale tab content
  • Confirmed frontend/src/components/project/PorojectDetails.tsx has no TS errors

@skoeva skoeva self-assigned this May 7, 2026
Copilot AI review requested due to automatic review settings May 7, 2026 20:07
@skoeva skoeva added bug Something isn't working p1 priority labels May 7, 2026
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

Note

Copilot was unable to run its full agentic suite in this review.

Fixes stale custom/plugin tabs on the Project Details page by scoping tab state to the current route + resolved project identity and preventing async tab eligibility checks from applying after navigation.

Changes:

  • Introduces a project identity key derived from route name + project metadata and uses it to remount ProjectDetailsContent.
  • Separates custom/plugin tabs from default tabs and clears/reloads custom tabs on project key changes while ignoring stale async results.
  • Prevents blank/stale tab selection by falling back to the first available tab when the selected tab disappears.

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

Comment thread frontend/src/components/project/ProjectDetails.tsx Outdated
Comment thread frontend/src/components/project/ProjectDetails.tsx Outdated
Signed-off-by: Evangelos Skopelitis <eskopelitis@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working p1 priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants