fix(ui): apply the revamped workflow-details header only in AI mode - #31259
Conversation
The revamped HeaderShell + HeaderBreadcrumb workflow-details header was rendering in classic (non-AI) mode too. Gate it on isAiMode so classic mode keeps the original TitleBreadcrumb + WorkflowHeader card, and only the AI experience gets the new gradient header. - WorkflowHeader: new isAiMode prop; renders HeaderShell when true, the original Card layout otherwise (shared edit-name modal + subcomponents) - WorkflowBuilder: render TitleBreadcrumb in classic mode; pass isAiMode and the AI HeaderBreadcrumb only when in AI mode - add an AI-mode render test alongside the existing classic-mode tests Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
Code Review ✅ ApprovedRestricts the revamped workflow-details header to AI mode only while preserving the original layout and test IDs for classic mode. No issues found. OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
|
| Count | Rule |
|---|---|
| 4 | sonarjs/no-duplicate-string |
| 2 | sonarjs/cyclomatic-complexity |
| 2 | react-hooks/exhaustive-deps |
| 1 | i18next/no-literal-string |
| 1 | sonarjs/no-nested-conditional |
All findings
| Location | Rule | Message | |
|---|---|---|---|
| 🟡 | src/components/WorkflowDefinitions/WorkflowBuilder/WorkflowHeader.test.tsx:140:10 |
sonarjs/no-duplicate-string |
Define a constant instead of duplicating this literal 3 times. |
| 🟡 | src/components/WorkflowDefinitions/WorkflowBuilder/WorkflowHeader.test.tsx:206:31 |
sonarjs/no-duplicate-string |
Define a constant instead of duplicating this literal 3 times. |
| 🟡 | src/components/WorkflowDefinitions/WorkflowBuilder/WorkflowHeader.test.tsx:247:28 |
sonarjs/no-duplicate-string |
Define a constant instead of duplicating this literal 3 times. |
| 🟡 | src/components/WorkflowDefinitions/WorkflowBuilder/WorkflowHeader.test.tsx:286:54 |
i18next/no-literal-string |
disallow literal string: crumb |
| 🟡 | src/components/WorkflowDefinitions/WorkflowBuilder/WorkflowHeader.tsx:49:4 |
sonarjs/cyclomatic-complexity |
{"message":"Function has a complexity of 14 which is greater than 10 authorized.","cost":4,"secondaryLocations":[{"line":49,"column":3,"endLine":49,"endColumn": |
| 🟡 | src/pages/WorkflowDefinitions/WorkflowBuilder/WorkflowBuilder.tsx:77:4 |
sonarjs/cyclomatic-complexity |
{"message":"Function has a complexity of 23 which is greater than 10 authorized.","cost":13,"secondaryLocations":[{"line":77,"column":3,"endLine":77,"endColumn" |
| 🟡 | src/pages/WorkflowDefinitions/WorkflowBuilder/WorkflowBuilder.tsx:334:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has missing dependencies: 'edges' and 'nodes'. Either include them or remove the dependency array. |
| 🟡 | src/pages/WorkflowDefinitions/WorkflowBuilder/WorkflowBuilder.tsx:398:5 |
react-hooks/exhaustive-deps |
React Hook useCallback has missing dependencies: 't' and 'workflowLogic'. Either include them or remove the dependency array. |
| 🟡 | src/pages/WorkflowDefinitions/WorkflowBuilder/WorkflowBuilder.tsx:423:22 |
sonarjs/no-duplicate-string |
Define a constant instead of duplicating this literal 3 times. |
| 🟡 | src/pages/WorkflowDefinitions/WorkflowBuilder/WorkflowBuilder.tsx:531:23 |
sonarjs/no-nested-conditional |
Extract this nested ternary operation into an independent statement. |
Fix locally (fast - only checks files changed in this branch):
make ui-checkstyle-changed
|
27e4f48
|
Changes have been cherry-picked to the 2.0 branch. |
The revamped HeaderShell + HeaderBreadcrumb workflow-details header was rendering in classic (non-AI) mode too. Gate it on isAiMode so classic mode keeps the original TitleBreadcrumb + WorkflowHeader card, and only the AI experience gets the new gradient header. - WorkflowHeader: new isAiMode prop; renders HeaderShell when true, the original Card layout otherwise (shared edit-name modal + subcomponents) - WorkflowBuilder: render TitleBreadcrumb in classic mode; pass isAiMode and the AI HeaderBreadcrumb only when in AI mode - add an AI-mode render test alongside the existing classic-mode tests Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> (cherry picked from commit 27e4f48)
|
Failed to cherry-pick changes to the 1.13 branch. |



Description
Follow-up to #31158 (Revamped workflow details header page).
The revamped
HeaderShell+HeaderBreadcrumbworkflow-details header is currently rendered in classic (non-AI) mode too. It should only apply to the AI experience — classic mode should keep the originalTitleBreadcrumb+WorkflowHeadercard.Changes
WorkflowHeader: newisAiModeprop. Renders theHeaderShellgradient header whentrue, and the originalCardlayout otherwise. The edit-display-name modal and the control/badge subcomponents are shared between both layouts (no duplication of logic).WorkflowBuilder: renders the legacyTitleBreadcrumbabove the header in classic mode, and passesisAiMode+ the AIHeaderBreadcrumb(governance → Workflows → name) toWorkflowHeaderonly when in AI mode.PageLayoutV1compactvariant and the removed grey background remain AI-only (unchanged from Revamped workflow details header page #31158).Behaviour
TitleBreadcrumb+ whiteWorkflowHeadercard (as before #31158)HeaderShellwith governanceHeaderBreadcrumbAll existing header test-ids (
workflow-header,workflow-title,workflow-description,edit-workflow-title-button,edit-workflow-button,system-workflow-badge) are preserved in both layouts.Tests
WorkflowHeaderJest suite: 8/8 pass (classic + new AI-mode test).🤖 Generated with Claude Code