Skip to content

Conversation

enrico-kaack-comp
Copy link
Contributor

What this PR does / why we need it:

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

@andreaskienle andreaskienle requested a review from Copilot July 10, 2025 13:56
Copilot

This comment was marked as outdated.

@andreaskienle andreaskienle requested a review from Copilot July 10, 2025 14:00
Copy link
Contributor

@Copilot 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 adds support for the new enableSystemIdentityProvider flag in the control plane spec, surfaces it through the ListControlPlanes JQ query, and updates the UI logic (and tests) so that the Connect button is enabled only when the system IdP is turned on.

  • Extend ControlPlaneType.spec with authentication.enableSystemIdentityProvider and adjust the JQ extractor
  • Update the test helper in controlPlanes.spec.ts to include the new authentication field
  • Simplify ControlPlaneCard to read the flag directly from the passed-in spec instead of fetching a separate resource

Reviewed Changes

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

File Description
src/lib/api/types/crate/controlPlanes.ts Add authentication to spec interface and include it in the JQ query
src/components/ControlPlanes/controlPlanes.spec.ts Modify createControlPlane to supply enableSystemIdentityProvider in tests
src/components/ControlPlanes/ControlPlaneCard/ControlPlaneCard.tsx Remove useResource logic and derive the system IdP flag directly from controlPlane.spec
Comments suppressed due to low confidence (1)

src/components/ControlPlanes/controlPlanes.spec.ts:15

  • [nitpick] The current test helper always sets enableSystemIdentityProvider: true. Consider adding a variant or parameter to create a control plane with enableSystemIdentityProvider: false and a corresponding test for the disabled scenario to cover the new conditional logic.
const createControlPlane = (conditions: ControlPlaneStatusCondition[]): ControlPlaneType => ({

….tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@andreaskienle andreaskienle merged commit b0d3186 into main Jul 10, 2025
5 checks passed
@andreaskienle andreaskienle deleted the fix/connect-button branch July 10, 2025 14:07
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.

3 participants