frontend: crd: Fix Served column displaying storage value#6095
frontend: crd: Fix Served column displaying storage value#6095mahesh-09-12 wants to merge 1 commit into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mahesh-09-12 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Pull request overview
This PR fixes the CRD Details “Versions” table so the Served column correctly reflects version.served (instead of incorrectly showing version.storage). It also updates Storybook fixtures/snapshots and adds a regression test to prevent this mismatch from reappearing.
Changes:
- Update the “Served” column getter to use
version.served. - Adjust the CRD Storybook mock data to include differing
served/storagevalues and update the corresponding snapshot. - Add a Vitest regression test verifying Served/Storage remain independent.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| frontend/src/components/crd/storyHelper.ts | Updates mock CRD version data to expose served vs storage differences. |
| frontend/src/components/crd/Details.tsx | Fixes the Served column getter to use version.served. |
| frontend/src/components/crd/Details.test.tsx | Adds regression coverage for Served/Storage column mapping. |
| frontend/src/components/crd/snapshots/CustomResourceDefinition.Details.stories.storyshot | Updates snapshot output to match corrected Served display. |
illume
left a comment
There was a problem hiding this comment.
Thanks for the contribution.
There are some open Copilot review comments — could you take a look at them? Please mark each one as resolved once you've addressed it.
The Versions table used the storage field for both the Served and Storage columns, causing the Served value to be displayed incorrectly when served and storage differ. Update the Served column to use the correct field and add regression coverage for CRD versions with distinct served and storage values. Signed-off-by: mahesh-09-12 <m8143177@gmail.com>
6f6440b to
b17420d
Compare
|
@illume addressed the Copilot feedback, ready for another review when convenient. |
Summary
This PR fixes an issue in the CRD Details Versions table where the Served column displayed the
storagevalue instead of theservedvalue.It also adds regression coverage to ensure the Served and Storage columns remain independent and updates the Storybook fixture to expose this scenario.
Related Issue
Fixes #6094
Changes
version.servedservedandstoragevaluesservedandstorageSteps to Test
Run the test suite:
npm testOpen the CRD Details story in Storybook.
Navigate to the Versions section.
Verify that:
truefalsewhen the underlying version data has
served: trueandstorage: false.Screenshots (if applicable)
N/A
Notes for the Reviewer
servedandstorage, which masked the issue.