Skip to content

fix(ui): apply the revamped workflow-details header only in AI mode - #31259

Merged
anuj-kumary merged 2 commits into
open-metadata:mainfrom
anuj-kumary:workflow-header-ai-mode-only
Aug 10, 2026
Merged

fix(ui): apply the revamped workflow-details header only in AI mode#31259
anuj-kumary merged 2 commits into
open-metadata:mainfrom
anuj-kumary:workflow-header-ai-mode-only

Conversation

@anuj-kumary

Copy link
Copy Markdown
Member

Description

Follow-up to #31158 (Revamped workflow details header page).

The revamped HeaderShell + HeaderBreadcrumb workflow-details header is currently rendered in classic (non-AI) mode too. It should only apply to the AI experience — classic mode should keep the original TitleBreadcrumb + WorkflowHeader card.

Changes

  • WorkflowHeader: new isAiMode prop. Renders the HeaderShell gradient header when true, and the original Card layout otherwise. The edit-display-name modal and the control/badge subcomponents are shared between both layouts (no duplication of logic).
  • WorkflowBuilder: renders the legacy TitleBreadcrumb above the header in classic mode, and passes isAiMode + the AI HeaderBreadcrumb (governance → Workflows → name) to WorkflowHeader only when in AI mode. PageLayoutV1 compact variant and the removed grey background remain AI-only (unchanged from Revamped workflow details header page #31158).
  • Tests: added an AI-mode render test alongside the existing classic-mode tests.

Behaviour

Mode Header
Classic (non-AI) Original TitleBreadcrumb + white WorkflowHeader card (as before #31158)
AI Revamped gradient HeaderShell with governance HeaderBreadcrumb

All 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

  • WorkflowHeader Jest suite: 8/8 pass (classic + new AI-mode test).

🤖 Generated with Claude Code

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>
@anuj-kumary
anuj-kumary requested a review from a team as a code owner August 10, 2026 06:29
@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

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 skip-pr-checks label.

@github-actions github-actions Bot added the UI UI specific issues label Aug 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

@gitar-bot

gitar-bot Bot commented Aug 10, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Restricts the revamped workflow-details header to AI mode only while preserving the original layout and test IDs for classic mode. No issues found.

Options

Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@anuj-kumary anuj-kumary self-assigned this Aug 10, 2026
@anuj-kumary anuj-kumary added safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check To release Will cherry-pick this PR into the release branch labels Aug 10, 2026
@github-actions

github-actions Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 66%
66.24% (78224/118091) 50.25% (47253/94029) 51.45% (14230/27656)

@github-actions github-actions Bot removed the safe to test Add this label to run secure Github workflows on PRs label Aug 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

@anuj-kumary anuj-kumary added the safe to test Add this label to run secure Github workflows on PRs label Aug 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ UI Checkstyle passed — lint findings in changed files

🔍 ESLint findings in this PR's files — 0 error(s), 10 warning(s)

Errors block the build. Warnings do not yet — they are rules whose backlog is still
being worked down, listed so this PR does not add to it. See docs/ui-code-quality-gate.md.

0 error(s), 10 warning(s) across 3 changed file(s).

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

@sonarqubecloud

Copy link
Copy Markdown

@anuj-kumary
anuj-kumary added this pull request to the merge queue Aug 10, 2026
Merged via the queue into open-metadata:main with commit 27e4f48 Aug 10, 2026
139 of 150 checks passed
@anuj-kumary
anuj-kumary deleted the workflow-header-ai-mode-only branch August 10, 2026 12:41
@github-actions

Copy link
Copy Markdown
Contributor

Changes have been cherry-picked to the 2.0 branch.

github-actions Bot pushed a commit that referenced this pull request Aug 10, 2026
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)
@github-actions

Copy link
Copy Markdown
Contributor

Failed to cherry-pick changes to the 1.13 branch.
Please cherry-pick the changes manually.
You can find more details here.

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

Labels

safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check To release Will cherry-pick this PR into the release branch UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants