Skip to content

OCPBUGS-132777: Remove the redundant detailsPage wrapper - #17413

Open
rhamilto wants to merge 1 commit into
openshift:mainfrom
rhamilto:OCPBUGS-132777
Open

rhamilto wants to merge 1 commit into
openshift:mainfrom
rhamilto:OCPBUGS-132777

Conversation

@rhamilto

@rhamilto rhamilto commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Jira: https://redhat.atlassian.net/browse/OCPBUGS-132777

Analysis / Root cause:
The detailsPage helper no longer adds layout or behavior; it only forwards props. Calling it during a parent render creates a new component type and remounts the details subtree, resetting local state. This caused the Secret reveal-state bug fixed separately in #17412.

Solution description:
Pass existing details components directly to navFactory.details for DaemonSets, StorageClasses, VolumeAttributesClasses, and Knative Routes. Remove the unused helper and its unused type import. The existing wildcard re-export no longer exposes the helper after its removal.

Screenshots / screen recording:

Test setup:
Use a cluster with resources for the affected details pages. Knative Route validation additionally requires OpenShift Serverless.

Test cases:

  • Automated validation passed: TypeScript (yarn tsc --noEmit), ESLint for all changed files, and the Secret regression and existing DetailsPage tests (2 suites, 3 tests).
  • Verify all four affected details pages render normally and preserve local state across parent rerenders and updates to the same resource.
  • Verify Secret values remain revealed during ordinary updates and hide when explicitly requested, as covered by OCPBUGS-132338: Preserve revealed Secret values across page rerenders #17412.
  • Manual browser validation of all four cleanup callers remains pending.

Browser conformance:

  • Chrome
  • Firefox
  • Safari (or Epiphany on Linux)

Additional info:
SDK exports and shared-module declarations were checked; the removed helper is not part of the public plugin API. No translatable strings or CSS changes.

Reviewers and assignees:
/assign rhamilto

Summary by CodeRabbit

  • Bug Fixes

    • Secret values now remain visible while navigating resource updates or refreshing details, and correctly reflect updated data.
    • Selecting Hide values reliably conceals secret data again.
  • Refactor

    • Improved details-page navigation across routes, DaemonSets, secrets, storage classes, and volume attribute classes, with no change to user-facing functionality.

@rhamilto rhamilto self-assigned this Oct 21, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification

This PR uses the pipeline controller for second-stage tests. Selection and triggering follow the repository configuration.

Use /test ? to list jobs and /pipeline help for commands.

@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Oct 21, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@rhamilto: This pull request references Jira Issue OCPBUGS-132777, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.1.0) matches configured target version for branch (5.1.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

WIP: Depends on #17412. Keep this PR in draft until #17412 merges, then rebase onto main so the diff contains only the remaining cleanup.

Jira: https://redhat.atlassian.net/browse/OCPBUGS-132777

Analysis / Root cause:
The detailsPage helper no longer adds layout or behavior; it only forwards props. Calling it during a parent render creates a new component type and remounts the details subtree, resetting local state. This caused the Secret reveal-state bug fixed separately in #17412.

Solution description:
Pass existing details components directly to navFactory.details for DaemonSets, StorageClasses, VolumeAttributesClasses, and Knative Routes. Remove the unused helper and its unused type import. The existing wildcard re-export no longer exposes the helper after its removal.

This branch currently includes the Secret fix and regression test from #17412, as well as the cleanup commit for this issue.

Screenshots / screen recording:

Test setup:
Use a cluster with resources for the affected details pages. Knative Route validation additionally requires OpenShift Serverless.

Test cases:

  • Automated validation passed: TypeScript (yarn tsc --noEmit), ESLint for all changed files, and the Secret regression and existing DetailsPage tests (2 suites, 3 tests).
  • Verify all four affected details pages render normally and preserve local state across parent rerenders and updates to the same resource.
  • Verify Secret values remain revealed during ordinary updates and hide when explicitly requested, as covered by OCPBUGS-132338: Preserve revealed Secret values across page rerenders #17412.
  • Manual browser validation of all four cleanup callers remains pending.

Browser conformance:

  • Chrome
  • Firefox
  • Safari (or Epiphany on Linux)

Additional info:
SDK exports and shared-module declarations were checked; the removed helper is not part of the public plugin API. No translatable strings or CSS changes.

Reviewers and assignees:
/assign rhamilto

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 21, 2026
@openshift-ci

openshift-ci Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@coderabbitai

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review.

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: 0701dcbd-1be2-4e22-ae09-6090e2982cfa
📥 Commits

Reviewing files that changed from the base of the PR and between 110a398 and 7a6c8ea.

📒 Files selected for processing: 7
  • frontend/packages/knative-plugin/src/components/routes/RouteDetailsPage.tsx
  • frontend/public/components/__tests__/secret.spec.tsx
  • frontend/public/components/daemon-set.tsx
  • frontend/public/components/secret.tsx
  • frontend/public/components/storage-class.tsx
  • frontend/public/components/utils/details-page.tsx
  • frontend/public/components/volume-attributes-class.tsx

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

Walkthrough

Details pages now register their components directly with navFactory.details instead of using the removed detailsPage wrapper. New Secret details tests cover value visibility across rerenders and resource updates.

Changes

Details page updates

Layer / File(s) Summary
Direct details registration
frontend/packages/knative-plugin/src/components/routes/RouteDetailsPage.tsx, frontend/public/components/daemon-set.tsx, frontend/public/components/secret.tsx, frontend/public/components/storage-class.tsx, frontend/public/components/volume-attributes-class.tsx, frontend/public/components/utils/details-page.tsx
These details pages pass their components directly to navFactory.details. The detailsPage helper is removed.
Secret value visibility tests
frontend/public/components/__tests__/secret.spec.tsx
Tests cover initially hidden values, revealing values, persistence across rerenders and resource updates, updated data, and hiding values again.

Priority: Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: logonoff

Merge Risk: Minimal · up to 7a6c8

No actionable merge-blocking issue is identified; the change is ready for normal validation and merge.

Pre-merge checks: Passed 14
Check name Status Explanation
Title check Passed The title clearly identifies the Jira issue and the primary change: removing the redundant detailsPage wrapper.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names Passed PASS: The pull request adds one test suite and one test title. describe('SecretsDetailsPage') and it('keeps values revealed across page rerenders and resource updates until hidden') use static, de…
Test Structure And Quality Passed The pull request changes no Ginkgo tests. The only added test is a Jest/React test in frontend/public/components/__tests__/secret.spec.tsx, and the remaining changes are TypeScript production files.…
Microshift Test Compatibility Passed The pull request adds no Ginkgo or Go e2e tests. The only new test is a Jest/React Testing Library test in frontend/public/components/__tests__/secret.spec.tsx, using describe and it for Secret …
Single Node Openshift (Sno) Test Compatibility Passed The pull request adds one test file, frontend/public/components/__tests__/secret.spec.tsx. It is a Jest/Testing Library unit test using describe and it, not a Ginkgo e2e test. The test covers Se…
Topology-Aware Scheduling Compatibility Passed PASS: The pull request changes only frontend TypeScript/TSX components and a Secret regression test. The diff adds or modifies no deployment manifests, operators, controllers, replica settings, affini…
Ote Binary Stdout Contract Passed PASS. The pull request changes only seven TypeScript/TSX frontend files. The authoritative diff contains no Go OTE binary code, process-level setup, or stdout writes such as fmt.Print, klog, log.Print…
Ipv6 And Disconnected Network Test Compatibility Passed PASS: The PR adds one Jest/Testing Library unit test in frontend/public/components/__tests__/secret.spec.tsx, not a Ginkgo e2e test. The changed files contain no hardcoded IPv4 assumptions or extern…
No-Weak-Crypto Passed The pull request introduces no MD5, SHA1, DES, RC4, 3DES, Blowfish, or ECB usage. It adds no custom cryptography or secret/token comparisons. The test uses Base64 only to create a Kubernetes Secret fi…
Container-Privileges Passed The pull request changes only TypeScript/TSX components and a test. The diff introduces no Kubernetes/container manifest fields or privilege settings. No added privileged: true, hostPID, `hostNetw…
No-Sensitive-Data-In-Logs Passed No logging was added or changed in the pull request. The new Secret test uses fixture password values for DOM assertions only; it does not send them to console or a logger.
Description check Passed The pull request description includes all required sections. It explains the root cause, solution, test setup, test cases, pending manual validation, browser status, additional information, and review…
Full details: Stable And Deterministic Test Names

Explanation

PASS: The pull request adds one test suite and one test title. describe('SecretsDetailsPage') and it('keeps values revealed across page rerenders and resource updates until hidden') use static, descriptive text. They contain no generated names, timestamps, UUIDs, node or namespace names, IP addresses, legacy metadata tokens, or other run-dependent values.

Full details: Test Structure And Quality

Explanation

The pull request changes no Ginkgo tests. The only added test is a Jest/React test in frontend/public/components/__tests__/secret.spec.tsx, and the remaining changes are TypeScript production files. Therefore, the stated Ginkgo test-quality requirements do not apply.

Full details: Microshift Test Compatibility

Explanation

The pull request adds no Ginkgo or Go e2e tests. The only new test is a Jest/React Testing Library test in frontend/public/components/__tests__/secret.spec.tsx, using describe and it for Secret UI behavior. The MicroShift API and feature checks do not apply.

Full details: Single Node Openshift (Sno) Test Compatibility

Explanation

The pull request adds one test file, frontend/public/components/__tests__/secret.spec.tsx. It is a Jest/Testing Library unit test using describe and it, not a Ginkgo e2e test. The test covers Secret value visibility and rerender behavior; it does not assume multiple nodes, HA, node roles, failover, scheduling, or load balancing. The remaining changes are frontend component wiring and helper removal.

Full details: Topology-Aware Scheduling Compatibility

Explanation

PASS: The pull request changes only frontend TypeScript/TSX components and a Secret regression test. The diff adds or modifies no deployment manifests, operators, controllers, replica settings, affinity, topology spread constraints, node selectors, tolerations, or PDBs. The topology-aware scheduling check is therefore not applicable.

Full details: Ote Binary Stdout Contract

Explanation

PASS. The pull request changes only seven TypeScript/TSX frontend files. The authoritative diff contains no Go OTE binary code, process-level setup, or stdout writes such as fmt.Print, klog, log.Print, or os.Stdout. The OTE Binary Stdout Contract is not applicable.

Full details: Ipv6 And Disconnected Network Test Compatibility

Explanation

PASS: The PR adds one Jest/Testing Library unit test in frontend/public/components/__tests__/secret.spec.tsx, not a Ginkgo e2e test. The changed files contain no hardcoded IPv4 assumptions or external/public network connectivity.

Full details: No-Weak-Crypto

Explanation

The pull request introduces no MD5, SHA1, DES, RC4, 3DES, Blowfish, or ECB usage. It adds no custom cryptography or secret/token comparisons. The test uses Base64 only to create a Kubernetes Secret fixture, and the production changes only replace a React component wrapper.

Full details: Container-Privileges

Explanation

The pull request changes only TypeScript/TSX components and a test. The diff introduces no Kubernetes/container manifest fields or privilege settings. No added privileged: true, hostPID, hostNetwork, hostIPC, SYS_ADMIN, allowPrivilegeEscalation: true, or root runtime configuration is present.

Full details: Description check

Explanation

The pull request description includes all required sections. It explains the root cause, solution, test setup, test cases, pending manual validation, browser status, additional information, and reviewer assignment. The Jira issue is identified. The pull request title cannot be verified because it was not provided.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

Comment @coderabbitai help to get the list of available commands.

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@rhamilto: This pull request references Jira Issue OCPBUGS-132777, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.1.0) matches configured target version for branch (5.1.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)
Details

In response to this:

WIP: Depends on #17412. Keep this PR in draft until #17412 merges, then rebase onto main so the diff contains only the remaining cleanup.

Jira: https://redhat.atlassian.net/browse/OCPBUGS-132777

Analysis / Root cause:
The detailsPage helper no longer adds layout or behavior; it only forwards props. Calling it during a parent render creates a new component type and remounts the details subtree, resetting local state. This caused the Secret reveal-state bug fixed separately in #17412.

Solution description:
Pass existing details components directly to navFactory.details for DaemonSets, StorageClasses, VolumeAttributesClasses, and Knative Routes. Remove the unused helper and its unused type import. The existing wildcard re-export no longer exposes the helper after its removal.

This branch currently includes the Secret fix and regression test from #17412, as well as the cleanup commit for this issue.

Screenshots / screen recording:

Test setup:
Use a cluster with resources for the affected details pages. Knative Route validation additionally requires OpenShift Serverless.

Test cases:

  • Automated validation passed: TypeScript (yarn tsc --noEmit), ESLint for all changed files, and the Secret regression and existing DetailsPage tests (2 suites, 3 tests).
  • Verify all four affected details pages render normally and preserve local state across parent rerenders and updates to the same resource.
  • Verify Secret values remain revealed during ordinary updates and hide when explicitly requested, as covered by OCPBUGS-132338: Preserve revealed Secret values across page rerenders #17412.
  • Manual browser validation of all four cleanup callers remains pending.

Browser conformance:

  • Chrome
  • Firefox
  • Safari (or Epiphany on Linux)

Additional info:
SDK exports and shared-module declarations were checked; the removed helper is not part of the public plugin API. No translatable strings or CSS changes.

Reviewers and assignees:
/assign rhamilto

Summary by CodeRabbit

  • Bug Fixes

  • Secret values now remain visible while navigating resource updates or refreshing details, and correctly reflect updated data.

  • Selecting Hide values reliably conceals secret data again.

  • Refactor

  • Improved details-page navigation across routes, DaemonSets, secrets, storage classes, and volume attribute classes, with no change to user-facing functionality.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci Bot added component/core Related to console core functionality component/knative Related to knative-plugin approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Oct 21, 2026
@rhamilto
rhamilto marked this pull request as ready for review October 28, 2026 18:12
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 28, 2026
Pass stable details components directly to the tab factory for DaemonSets,
StorageClasses, VolumeAttributesClasses, and Knative Routes. Creating the
wrapper during rendering remounts the details subtree and resets local
state when a parent updates.

Remove the unused helper, which only forwarded props after its layout
markup was removed.

Fixes https://redhat.atlassian.net/browse/OCPBUGS-132777
@rhamilto

Copy link
Copy Markdown
Member Author

/cherry-pick release-5.0 release-4.22 release-4.21 release-4.20

@openshift-cherrypick-robot

Copy link
Copy Markdown

@rhamilto: once the present PR merges, I will cherry-pick it on top of release-5.0 in a new PR and assign it to you.

Details

In response to this:

/cherry-pick release-5.0 release-4.22 release-4.21 release-4.20

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@logonoff logonoff left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Oct 28, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-gcp-console
/test e2e-gcp-console-techpreview

@openshift-ci

openshift-ci Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: logonoff, rhamilto

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. component/core Related to console core functionality component/knative Related to knative-plugin jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants