Skip to content

fix(orchestrator): hide Workflows tab from User profile entity pages#3741

Merged
lokanandaprabhu merged 1 commit into
redhat-developer:mainfrom
its-mitesh-kumar:fix/orchestrator-RHDHBUGS-3245-remove-workflows-tab-from-profile
Jul 14, 2026
Merged

fix(orchestrator): hide Workflows tab from User profile entity pages#3741
lokanandaprabhu merged 1 commit into
redhat-developer:mainfrom
its-mitesh-kumar:fix/orchestrator-RHDHBUGS-3245-remove-workflows-tab-from-profile

Conversation

@its-mitesh-kumar

Copy link
Copy Markdown
Member

Description

Fixes unintended 'Workflows' tab appearing on User profile entity pages. The IsOrchestratorCatalogTabAvailable condition function was implemented as a React component using useEntity() hook, which is incompatible with the RHDH dynamic-plugin framework's expected (e: Entity) => boolean signature. 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

IsOrchestratorCatalogTabAvailable in CatalogTab.tsx was a React component that used the useEntity() hook instead of accepting the entity as a parameter. The RHDH dynamic-plugin framework expects custom if condition functions to follow the (e: Entity) => boolean signature and calls them as plain functions with the entity — the hook-based implementation did not work correctly in this context.

Additionally, the app-config.yaml mount point condition referenced this broken custom component instead of using the framework's built-in hasAnnotation checker. The combination caused the Workflows tab to appear unconditionally on all entity pages, including User profile pages where it should not be shown.

Changes

  1. CatalogTab.tsx: Changed IsOrchestratorCatalogTabAvailable from a React hook-based component to a pure predicate function (entity: Entity) => boolean. Compatible with both the legacy EntityLayout.Route if prop and the RHDH dynamic-plugin if.anyOf condition system.
  2. app-config.yaml: Replaced the custom IsOrchestratorCatalogTabAvailable reference with the built-in hasAnnotation: orchestrator.io/workflows checker for reliable entity filtering in the dynamic plugin system.

Fixed

  • RHDHBUGS-3245 — [Profile] Unintended 'Workflows' tab displayed under 'My profile' section

Test Plan

  • Navigate to My Profile page (click avatar → My Profile in global header)
  • Verify the Workflows tab is NOT visible on the User entity page
  • Navigate to a Component entity that HAS the orchestrator.io/workflows annotation
  • Verify the Workflows tab IS visible and shows workflow content
  • Navigate to a Component entity WITHOUT the orchestrator.io/workflows annotation
  • Verify the Workflows tab is NOT visible
  • Verify no regressions on other entity pages (API, System, Group, Domain)

Checklist

  • A changeset describing the change and affected packages. (more info)
  • Added or Updated documentation
  • Tests for new functionality and regression tests for bug fixes
  • Screenshots attached (for UI changes)

Note

This bug fix was identified and implemented using the bug-fix and raise-pr agent skills. Please verify the fix thoroughly before merging.

@rhdh-gh-app

rhdh-gh-app Bot commented Jul 13, 2026

Copy link
Copy Markdown

Changed Packages

Package Name Package Path Changeset Bump Current Version
@red-hat-developer-hub/backstage-plugin-orchestrator workspaces/orchestrator/plugins/orchestrator patch v5.9.0

@sonarqubecloud

Copy link
Copy Markdown

@lokanandaprabhu

Copy link
Copy Markdown
Member

Note: After this PR merges and the plugin is published, we also need a follow-up PR on rhdh-plugin-export-overlays to update:

  1. The commit/version reference to pick up this fix
  2. The condition at line 68 of rhdh-bsp-orchestrator.yaml from:
    if:
      anyOf:
        - IsOrchestratorCatalogTabAvailable
    to:
    if:
      anyOf:
        - hasAnnotation: orchestrator.io/workflows

Without this overlay update, the dynamic plugin deployment in RHDH will still use the old broken condition and the Workflows tab will continue appearing on User profile pages.

@lokanandaprabhu lokanandaprabhu 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 label Jul 14, 2026
@lokanandaprabhu lokanandaprabhu merged commit 41fe374 into redhat-developer:main Jul 14, 2026
22 checks passed
@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.59%. Comparing base (6898e78) to head (e4806d3).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3741   +/-   ##
=======================================
  Coverage   54.59%   54.59%           
=======================================
  Files        2360     2360           
  Lines       90121    90120    -1     
  Branches    25175    25126   -49     
=======================================
  Hits        49203    49203           
+ Misses      40621    40620    -1     
  Partials      297      297           
Flag Coverage Δ *Carryforward flag
adoption-insights 83.70% <ø> (ø) Carriedforward from 6898e78
ai-integrations 67.53% <ø> (ø) Carriedforward from 6898e78
app-defaults 69.79% <ø> (ø) Carriedforward from 6898e78
augment 46.39% <ø> (ø) Carriedforward from 6898e78
boost 73.07% <ø> (ø) Carriedforward from 6898e78
bulk-import 72.46% <ø> (ø) Carriedforward from 6898e78
cost-management 14.10% <ø> (ø) Carriedforward from 6898e78
dcm 61.81% <ø> (ø) Carriedforward from 6898e78
extensions 61.53% <ø> (ø) Carriedforward from 6898e78
global-floating-action-button 71.18% <ø> (ø) Carriedforward from 6898e78
global-header 59.71% <ø> (ø) Carriedforward from 6898e78
homepage 50.23% <ø> (ø) Carriedforward from 6898e78
install-dynamic-plugins 56.77% <ø> (ø) Carriedforward from 6898e78
konflux 91.49% <ø> (ø) Carriedforward from 6898e78
lightspeed 69.02% <ø> (ø) Carriedforward from 6898e78
mcp-integrations 85.46% <ø> (ø) Carriedforward from 6898e78
orchestrator 42.97% <0.00%> (+<0.01%) ⬆️
quickstart 65.63% <ø> (ø) Carriedforward from 6898e78
sandbox 79.56% <ø> (ø) Carriedforward from 6898e78
scorecard 82.93% <ø> (ø) Carriedforward from 6898e78
theme 61.26% <ø> (ø) Carriedforward from 6898e78
translations 7.25% <ø> (ø) Carriedforward from 6898e78
x2a 78.68% <ø> (ø) Carriedforward from 6898e78

*This pull request uses carry forward flags. Click here to find out more.


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6898e78...e4806d3. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants