Skip to content

chore(ui): fix persona subtitle for navigation + app mode#30388

Open
chirag-madlani wants to merge 11 commits into
mainfrom
fix/persona-localization
Open

chore(ui): fix persona subtitle for navigation + app mode#30388
chirag-madlani wants to merge 11 commits into
mainfrom
fix/persona-localization

Conversation

@chirag-madlani

@chirag-madlani chirag-madlani commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

added app mode icon

Describe your changes:

Screen.Recording.2026-07-23.at.4.34.07.PM.mov

Fixes #

I worked on ... because ...

Type of change:

  • Bug fix
  • Improvement
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation

High-level design:

N/A — small change.

Tests:

Use cases covered

Unit tests

Backend integration tests

Ingestion integration tests

Playwright (UI) tests

Manual testing performed

UI screen recording / screenshots:

Not applicable.

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • My PR is linked to a GitHub issue via Fixes #<issue-number> above.
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed.
  • For UI changes: I attached a screen recording and/or screenshots above.
  • I have added tests (unit / integration / Playwright as applicable) and listed them above.

Summary by Gitar

  • UI enhancements:
    • Added a dedicated AppModeIcon for the app mode persona configuration.
    • Updated CustomizablePageHeader to support dynamic subheaders for navigation and app mode pages.
    • Wrapped customizable detail and marketplace pages in NavigationBlocker to consolidate unsaved changes handling.
  • Localization:
    • Updated i18n translation files across languages with new subheader strings for navigation and app mode.
  • Testing:
    • Added Playwright regression tests for cancel/discard behavior on customizable pages.

This will update automatically on new commits.

Greptile Summary

Updates persona customization UI behavior and coverage.

  • Displays persona-aware subtitles for navigation, app-mode, home, and entity customization pages.
  • Adds a dedicated app-mode icon and localized subtitle strings.
  • Consolidates unsaved-change handling through NavigationBlocker.
  • Adds regression coverage for customization cancellation and subtitle selection.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failures remain in the fix for the previously reported app-mode persona subtitle issue.

Important Files Changed

Filename Overview
openmetadata-ui/src/main/resources/ui/src/components/MyData/CustomizableComponents/CustomizablePageHeader/CustomizablePageHeader.tsx Selects page-specific persona subtitles and delegates dirty-page cancellation to the surrounding navigation blocker.
openmetadata-ui/src/main/resources/ui/src/pages/SettingsAppModePage/SettingsAppModePage.tsx Passes the selected persona's display name to the app-mode customization header.
openmetadata-ui/src/main/resources/ui/src/pages/SettingsNavigationPage/SettingsNavigationPage.tsx Passes persona details through to the navigation customization header.
openmetadata-ui/src/main/resources/ui/src/components/common/NavigationBlocker/NavigationBlocker.tsx Refines navigation interception so query-string and hash-only updates do not trigger the unsaved-changes dialog.
openmetadata-ui/src/main/resources/ui/src/pages/CustomizablePage/CustomizablePage.tsx Supplies loaded persona data to navigation customization rendering.

Reviews (9): Last reviewed commit: "fix(ui): don't trip NavigationBlocker on..." | Re-trigger Greptile

@chirag-madlani
chirag-madlani requested a review from a team as a code owner July 23, 2026 11:05
Copilot AI review requested due to automatic review settings July 23, 2026 11:05
@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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions github-actions Bot added safe to test Add this label to run secure Github workflows on PRs UI UI specific issues labels Jul 23, 2026
@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

✅ Playwright Results — workflow succeeded

Validated commit 6d900ac3694bce7990c167b12e9cd87e6a40a31a in Playwright run 30120886076, attempt 1.

✅ 567 passed · ❌ 0 failed · 🟡 2 flaky · ⏭️ 5 skipped · 🧰 0 lifecycle flaky

Performance

Blocking targets: ✅ met · Optimization targets: 🟡 in progress

Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting.

🕒 Full workflow signal wall (to summary) 51m 0s

⏱️ Max setup 2m 55s · max shard execution 15m 26s · max shard-job elapsed before upload 18m 39s · reporting 5s

🌐 206.31 requests/attempt · 2.78 app boots/UI scenario · 10.26% common-shard skew

Optimization targets still in progress:

  • Browser traffic was 206.31 requests per attempt (convergence target: fewer than 200).
  • Application boot ratio was 2.78 per UI scenario (1708 boots / 615 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
🟡 Shard chromium-01 116 0 2 3 0 0
✅ Shard chromium-02 110 0 0 0 0 0
✅ Shard chromium-03 96 0 0 0 0 0
✅ Shard chromium-04 107 0 0 0 0 0
✅ Shard data-asset-rules-01 61 0 0 0 0 0
✅ Shard domain-isolation-01 14 0 0 0 0 0
✅ Shard global-state-01 23 0 0 0 0 0
✅ Shard ingestion-01 1 0 0 0 0 0
✅ Shard reindex-01 2 0 0 0 0 0
✅ Shard search-01 10 0 0 0 0 0
✅ Shard search-rbac-01 27 0 0 2 0 0
🟡 2 flaky test(s) (passed on retry)
  • Features/CustomizeDetailPage.spec.tsTable - customization should work (shard chromium-01, 1 retry)
  • Features/CustomizeDetailPage.spec.tscancel button on customize detail page shows confirmation modal and Discard exits the page (shard chromium-01, 1 retry)

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 65%
65.66% (76779/116917) 49.53% (46074/93020) 50.75% (13888/27363)

Copilot AI review requested due to automatic review settings July 23, 2026 12:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI review requested due to automatic review settings July 24, 2026 13:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI review requested due to automatic review settings July 24, 2026 13:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

anuj-kumary
anuj-kumary previously approved these changes Jul 24, 2026
@@ -0,0 +1,9 @@
<svg width="89" height="89" viewBox="0 0 89 89" fill="none" xmlns="http://www.w3.org/2000/svg">

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.

Can we remove the hardcoded width and height from the SVG? This will make it more reusable, to control its dimensions through props

…gression

Adding the wait for save-button:enabled between the widget-remove click and
the cancel-button click gives NavigationBlocker two React render passes to
propagate `enabled=true` and install its pushState override. Without it, a
fast Playwright click on cancel-button races the blocker's second-render
effect and the navigate goes through natively — landing on the persona
page with no modal (as seen in the failing CI screenshot).

The other two Discard tests (CustomizeLandingPage + CustomizeNavigationNewItems)
already had this wait implicitly (removeAndCheckWidget waits for the widget
to disappear; the navigation test asserts save-button:enabled) and passed
in CI.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 24, 2026 16:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

The pushState/replaceState intercepts compared the incoming URL string
against `location.pathname`. Widgets that sync filter state via
navigate/replaceState with a same-path URL that only differs in query
string (e.g. Tables widget writing `?showDeletedTables=false` on mount)
looked "different from pathname" and popped the unsaved-changes modal
unprompted — visible on the customize Database Schema page as soon as the
persona had any non-empty backend page state that made disableSave=false.

Compare pathnames only: parse the incoming URL against location.origin
and require an actual pathname change to block. Query-only ("?...") and
hash-only ("#...") strings short-circuit to false. Explains the
Database Schema Playwright timeout — the modal was covering the whole
page and intercepting every subsequent click.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@gitar-bot

gitar-bot Bot commented Jul 24, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 2 resolved / 2 findings

Updates persona subtitles for navigation and app mode headers, adds an app-mode icon, and resolves the app-mode subtitle rendering and stale test comment findings.

✅ 2 resolved
Bug: App-mode subtitle renders static label as the persona link

📄 openmetadata-ui/src/main/resources/ui/src/components/MyData/CustomizableComponents/CustomizablePageHeader/CustomizablePageHeader.tsx:140-150 📄 openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json:3159 📄 openmetadata-ui/src/main/resources/ui/src/pages/SettingsAppModePage/SettingsAppModePage.tsx:99 📄 openmetadata-ui/src/main/resources/ui/src/components/MyData/CustomizableComponents/CustomizablePageHeader/CustomizablePageHeader.tsx:145-146 📄 openmetadata-ui/src/main/resources/ui/src/components/MyData/CustomizableComponents/CustomizablePageHeader/CustomizablePageHeader.tsx:171-175
This PR changed the app-mode subheader message customize-your-app-mode-subheader to interpolate the persona name inside a link (Personalize the app mode experience for the <0>{{persona}}</0> persona.), and subTitle now routes app-mode pages to that key. But SettingsAppModePage still passes personaName={t('label.customize-your-app-mode')} (SettingsAppModePage.tsx:98), so i18Values.persona becomes the static label "Customize Your App Mode" rather than the persona's display name. The rendered subtitle will read "Personalize the app mode experience for the [Customize Your App Mode] persona." with the wrong link text. The navigation page was fixed to pass getEntityName(persona) — apply the same fix to the app-mode page (pass the persona object / its display name).

Quality: Stale test comment says CustomizeDetailsPage has no blocker

📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/CustomizeDetailPage.spec.ts:945-948 📄 openmetadata-ui/src/main/resources/ui/src/pages/CustomizeDetailsPage/CustomizeDetailsPage.tsx:79
The new test's comment states "On CustomizeDetailsPage (no blocker) the local modal is the only guard", but CustomizeDetailsPage now wraps its content in <NavigationBlocker enabled={!disableSave} onConfirm={handleSave}> and the local close modal was removed from CustomizablePageHeader. The unsaved-changes modal the test asserts actually comes from the NavigationBlocker, not a local guard. Update the comment to avoid misleading future maintainers about where the modal originates.

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 👍 / 👎 | Gitar

@sonarqubecloud

Copy link
Copy Markdown

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 UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants