Skip to content

Conversation

@krishagarwal278
Copy link
Member

@krishagarwal278 krishagarwal278 commented Jan 19, 2026

Summary by CodeRabbit

  • New Features
    • Guided Tour is now governed by a server-side capability flag; visibility can be centrally enabled/disabled.
    • Default behavior remains enabled unless the server explicitly sets the Guided Tour to "Disabled".
    • Extension manifests and startup logic now recognize and require the Guided Tour capability flag for consistent behavior.

✏️ Tip: You can customize this high-level summary in your review settings.

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Jan 19, 2026

@krishagarwal278: This pull request references CONSOLE-4987 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

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-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jan 19, 2026
@coderabbitai
Copy link

coderabbitai bot commented Jan 19, 2026

📝 Walkthrough

Walkthrough

Adds a new capability feature flag, CONSOLE_CAPABILITY_GUIDEDTOUR_IS_ENABLED: declared in FLAGS, referenced in guided-tour extension manifests, initialized from server capabilities during app startup (defaults enabled unless explicitly disabled), and included in feature-flag test expectations.

Changes

Cohort / File(s) Summary
Feature flag definition
frontend/packages/console-shared/src/constants/common.ts
Added enum member CONSOLE_CAPABILITY_GUIDEDTOUR_IS_ENABLED to exported FLAGS enum.
Console extension manifests
frontend/packages/console-app/console-extensions.json, frontend/packages/dev-console/console-extensions.json
Added CONSOLE_CAPABILITY_GUIDEDTOUR_IS_ENABLED to flags.required for guided-tour extension entries.
Application initialization
frontend/public/components/app.tsx
Read GuidedTourFeature from window.SERVER_FLAGS.capabilities and dispatch/set CONSOLE_CAPABILITY_GUIDEDTOUR_IS_ENABLED (defaults to enabled unless Disabled).
Feature flag tests
frontend/public/reducers/__tests__/features.spec.tsx
Updated default feature flags expectation to include CONSOLE_CAPABILITY_GUIDEDTOUR_IS_ENABLED: undefined.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title clearly describes the main change: adding conditional rendering of Guided Tour based on a capability flag and disabling it for E2E tests, which aligns with all file changes across the codebase.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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

@openshift-ci openshift-ci bot requested review from rhamilto and sg00dwin January 19, 2026 09:13
@openshift-ci openshift-ci bot added component/core Related to console core functionality component/dev-console Related to dev-console component/shared Related to console-shared labels Jan 19, 2026
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Jan 19, 2026

@krishagarwal278: This pull request references CONSOLE-4987 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

Summary by CodeRabbit

  • New Features
  • Guided tour feature is now controlled through a server-side capability flag, enabling centralized management and visibility control across environments.

✏️ Tip: You can customize this high-level summary in your review settings.

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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
frontend/public/components/app.tsx (1)

169-196: Backend capability name GuidedTourFeature is not defined in the OpenShift API and will never be emitted.

The code searches for a capability named GuidedTourFeature, but the OpenShift API enum (vendor/github.com/openshift/api/operator/v1/types_console.go) only defines LightspeedButton and GettingStartedBanner as valid ConsoleCapabilityName values. The kubebuilder validation enforces this enum restriction, meaning:

  • The backend will never emit a capability named GuidedTourFeature
  • guidedTourCapability will always be undefined
  • The logic guidedTourCapability?.visibility?.state !== 'Disabled' will always evaluate to true
  • The flag CONSOLE_CAPABILITY_GUIDEDTOUR_IS_ENABLED will always be enabled, regardless of intent

Add GuidedTourFeature to the ConsoleCapabilityName enum in the OpenShift API types, update the kubebuilder validation enum constraint, and ensure the backend handles emitting this capability.

@krishagarwal278 krishagarwal278 changed the title CONSOLE-4987: Conditionally render Guided Tour based on capability and disable it for Console E2E tests [WIP] CONSOLE-4987: Conditionally render Guided Tour based on capability and disable it for Console E2E tests Jan 19, 2026
@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 Jan 19, 2026
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Jan 19, 2026

@krishagarwal278: This pull request references CONSOLE-4987 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

Summary by CodeRabbit

  • New Features
  • Guided Tour is now governed by a server-side capability flag; visibility can be centrally enabled/disabled.
  • Default behavior remains enabled unless the server explicitly sets the Guided Tour to "Disabled".
  • Extension manifests and startup logic now recognize and require the Guided Tour capability flag for consistent behavior.

✏️ Tip: You can customize this high-level summary in your review settings.

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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
frontend/public/components/app.tsx (1)

175-196: Backend API sync required: 'GuidedTourFeature' capability not registered.

The backend API definition (vendor/github.com/openshift/api/operator/v1/types_console.go:138) only registers "LightspeedButton" and "GettingStartedBanner" as valid capabilities. The frontend is searching for "GuidedTourFeature" (line 176), which doesn't exist in the API spec and will never be returned by the server.

The condition guidedTourCapability?.visibility?.state !== 'Disabled' evaluates to true when guidedTourCapability is undefined, accidentally enabling the tour for backwards compatibility. However, this bypasses API validation and will break if the backend enforces the capability enum.

The API types must be updated to include "GuidedTourFeature" in the ConsoleCapabilityName enum (line 138 of vendor/github.com/openshift/api/operator/v1/types_console.go), or this frontend code needs to be reverted.

@krishagarwal278
Copy link
Member Author

/retest

@krishagarwal278 krishagarwal278 force-pushed the CONSOLE-4987 branch 2 times, most recently from f26a5b3 to ff9fa0b Compare January 19, 2026 11:58
@openshift-ci openshift-ci bot added the component/backend Related to backend label Jan 20, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 20, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: krishagarwal278
Once this PR has been reviewed and has the lgtm label, please assign jhadvig for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@krishagarwal278 krishagarwal278 changed the title [WIP] CONSOLE-4987: Conditionally render Guided Tour based on capability and disable it for Console E2E tests CONSOLE-4987: Conditionally render Guided Tour based on capability and disable it for Console E2E tests Jan 20, 2026
@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 Jan 20, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 20, 2026

@krishagarwal278: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-gcp-console b44a204 link true /test e2e-gcp-console

Full PR test history. Your PR dashboard.

Details

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. I understand the commands that are listed here.

@krishagarwal278
Copy link
Member Author

/retest

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

Labels

component/backend Related to backend component/core Related to console core functionality component/dev-console Related to dev-console component/shared Related to console-shared jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants