Skip to content

Conversation

@lucasgoral
Copy link
Contributor

@lucasgoral lucasgoral commented Aug 1, 2025

What this PR does / why we need it:

Show resource errors popover for MCP

Example:
image

@lucasgoral lucasgoral marked this pull request as ready for review August 4, 2025 06:44
@lucasgoral lucasgoral requested review from Hubert-Szczepanski-SAP and andreaskienle and removed request for andreaskienle August 4, 2025 09:51
@andreaskienle andreaskienle requested a review from Copilot August 4, 2025 10:28
Copy link
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 implements a resource errors popover for MCP (Managed Control Plane) resources, enhancing the user interface to display detailed error information when resource statuses are not healthy.

  • Adds message and reason fields to various API type definitions for better error reporting
  • Replaces the simple ResourceStatusCell with a new interactive ResourceStatusCellWithButton component that shows detailed error information in a popover
  • Improves type safety by removing any types and adding proper TypeScript interfaces

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/lib/api/types/flux/listKustomization.ts Adds message and reason fields to condition types
src/lib/api/types/flux/listGitRepo.ts Adds optional message and reason fields to condition types
src/lib/api/types/crossplane/listProviders.ts Adds optional message and reason fields to condition types
src/lib/api/types/crossplane/listManagedResources.ts Adds optional message and reason fields to condition types
src/components/Yaml/YamlViewButton.tsx Adds debug console log statement
src/components/Shared/ResourceStatusCellWithButton.tsx New component implementing popover functionality for resource status display
src/components/Projects/ProjectsList.tsx Improves TypeScript types and removes eslint disable comments
src/components/ControlPlane/ProvidersConfig.tsx Adjusts YAML column width
src/components/ControlPlane/Providers.tsx Integrates new status cell component and adds message handling
src/components/ControlPlane/ManagedResources.tsx Integrates new status cell component and adds message handling
src/components/ControlPlane/MCPHealthPopoverButton.tsx Improves TypeScript types and code organization
src/components/ControlPlane/FluxList.tsx Integrates new status cell component and adds message handling

Copy link
Contributor

@andreaskienle andreaskienle left a comment

Choose a reason for hiding this comment

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

Overall nice work 👍 Looking forward to seeing the users' feedback!

I noticed an issue with the new popovers. Here's how to reproduce it:

  1. Click on icon A – popover a will open (✅)
  2. Click on icon B – popover a will close, popover b will open (✅)
  3. Click on icon A again – nothing (❌ would have expected popover a to open)
  4. Click on icon A again – popover a will open (✅)

I think we just need to add the ⁠onClose prop to fix this.

Otherwise, everything works great from what I can see 👍

Copy link
Contributor

@andreaskienle andreaskienle left a comment

Choose a reason for hiding this comment

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

Works well for me now, thanks 🙌👍

@lucasgoral lucasgoral merged commit 8e17251 into main Aug 8, 2025
5 checks passed
@lucasgoral lucasgoral deleted the feat/show-resource-errors branch August 8, 2025 08:14
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.

2 participants