fix(orchestrator): hide Workflows tab from User profile entity pages#3741
Open
its-mitesh-kumar wants to merge 1 commit into
Conversation
Fixes: https://redhat.atlassian.net/browse/RHDHBUGS-3245 Signed-off-by: its-mitesh-kumar <itsmiteshkumar98@gmail.com>
Changed Packages
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
Fixes unintended 'Workflows' tab appearing on User profile entity pages. The
IsOrchestratorCatalogTabAvailablecondition function was implemented as a React component usinguseEntity()hook, which is incompatible with the RHDH dynamic-plugin framework's expected(e: Entity) => booleansignature. This caused the condition to not properly filter out User entities, making the Workflows tab appear on all entity pages including the My Profile page.Root cause
IsOrchestratorCatalogTabAvailableinCatalogTab.tsxwas a React component that used theuseEntity()hook instead of accepting the entity as a parameter. The RHDH dynamic-plugin framework expects customifcondition functions to follow the(e: Entity) => booleansignature and calls them as plain functions with the entity — the hook-based implementation did not work correctly in this context.Additionally, the
app-config.yamlmount point condition referenced this broken custom component instead of using the framework's built-inhasAnnotationchecker. The combination caused the Workflows tab to appear unconditionally on all entity pages, including User profile pages where it should not be shown.Changes
CatalogTab.tsx: ChangedIsOrchestratorCatalogTabAvailablefrom a React hook-based component to a pure predicate function(entity: Entity) => boolean. Compatible with both the legacyEntityLayout.Routeifprop and the RHDH dynamic-pluginif.anyOfcondition system.app-config.yaml: Replaced the customIsOrchestratorCatalogTabAvailablereference with the built-inhasAnnotation: orchestrator.io/workflowschecker for reliable entity filtering in the dynamic plugin system.Fixed
Test Plan
orchestrator.io/workflowsannotationorchestrator.io/workflowsannotationChecklist
Note