Skip to content

Merge persona Navigation and AI sidebar into one Navigation card - #36862

Merged
Rohit0301 merged 6 commits into
mainfrom
Rohit0301/persona-navigation-pr
Nov 3, 2026
Merged

Rohit0301 merged 6 commits into
mainfrom
Rohit0301/persona-navigation-pr

Conversation

@Rohit0301

@Rohit0301 Rohit0301 commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Describe your changes:

Related to #36707 (carries its navigation editor row styling unchanged). No issue linked yet.

The persona Customize UI showed two cards for the same thing: Navigation (classic left sidebar) and AI sidebar. There is now one Navigation card, and the editor it opens depends on the mode:

  • AI mode (settings modal, #personas/<persona>): Navigation opens the AI sidebar editor (AiSidebarEditor).
  • Classic mode (/settings/persona/<persona>): Navigation opens the classic navigation editor, as before.

Type of change:

  • Improvement

High-level design:

  • getCustomizePageCategoryCards() (utils/Persona/PersonaUtils.ts) is the list both card grids render (PersonaCustomizeGrid in the modal, CustomizeUI on the classic page). It is getCustomizePageCategories() without askCollateSidebar.

  • askCollateSidebar stays in getCustomizePageCategories(), so breadcrumbs, the /customize-page/<persona>/askCollateSidebar route and old #.../customize/askCollateSidebar links still resolve. Collate's PersonaClassCollate re-adds a category under the same key, so filtering where the cards render hides it in Collate too, with no Collate change.

  • PersonaCustomizeView maps navigation to AiSidebarEditor when useIsAiMode() is true, and to NavigationEditor otherwise. The settings modal only exists in AI mode (ADR:2026-10-21-settings-pages-are-classic-only), so in practice it always opens the AI sidebar editor there.

  • Fixes #8065: Settings modal QA fixes #36707 styling: NavigationEditor.tsx, AiSidebarEditor.tsx and SubCategoryGrid.tsx are byte-identical to Fixes #8065: Settings modal QA fixes #36707. In PersonaCustomizeGrid.tsx, Fixes #8065: Settings modal QA fixes #36707's Card.Content change is included as is; the only other change in that file is the import and call of the filter helper. A trial merge with Fixes #8065: Settings modal QA fixes #36707 auto-merges every persona file.

  • Decision records:

    • ADR:2026-11-02-persona-navigation-card-opens-the-editor-for-the-app-mode: the one-Navigation-card rule, the key each editor writes, and the dependency on Collate keeping the same key.
    • ADR:2026-11-02-persona-customize-editor-tree-rows-are-styled-at-the-call-site: a v5 amendment of ADR:2026-10-11-migrated-antd-components-adopt-core-styling. It scopes the editor row and card overrides carried from Fixes #8065: Settings modal QA fixes #36707, with an exit once core ships a divided tree row.

Tests:

Use cases covered

  • AI mode: the persona Customize UI shows one Navigation card. It opens the AI sidebar list, and hiding a module is saved.
  • Classic mode: /settings/persona/<persona> shows one Navigation card. It opens the classic navigation editor, and hiding, reordering and resetting still work.
  • The /customize-page/<persona>/askCollateSidebar route and the live AI sidebar still work.

Unit tests

  • PersonaUtils.test.ts: getCustomizePageCategoryCards drops the AI sidebar card.
  • PersonaCustomizeView.test.tsx: navigation opens navigation-editor in classic mode and ai-sidebar-editor in AI mode.
  • PersonaCustomizeGrid.test.tsx: no AI sidebar card in the modal grid.
  • yarn jest src/utils/Persona src/utils/PersonaClassBase src/components/Settings/Persona src/components/discovery/personal-space/Profile/tabs/personas src/components/discovery/personal-space/PersonaFullscreenPortal: 22 suites, 245 tests passed.

Backend integration tests

  • Not applicable (no backend changes).

Ingestion integration tests

  • Not applicable (no ingestion changes).

Playwright (UI) tests

  • Features/AIMode/PersonaSettings.spec.ts: the modal's Navigation test now opens /customize/navigation and checks the AI sidebar switches (renamed "Navigation in AI mode: hiding a module is saved"). The classic-switch Navigation test in this AI-mode spec was removed: in AI mode the modal's Navigation card now opens the AI sidebar editor, which the renamed test covers. The classic editor is covered by SettingsNavigationPage.spec.ts.

Run locally against this branch (Vite dev server, Collate backend on :8585), --project=chromium --no-deps --workers=2, PLAYWRIGHT_IS_OSS=true:

Spec Mode Result
Features/AIMode/PersonaSettings.spec.ts AI ✅ 19/19
Features/AIMode/AppModeSidebarPersonaCustomization.spec.ts AI ✅ 3/3
Features/SettingsNavigationPage.spec.ts Classic ✅ 8/8
Total ✅ 30 passed (2.5m)

An earlier run with the default worker count timed out on page loaders (all passed on a re-run with 2 workers, code unchanged). AppModeSidebarPersonaCustomization needs PLAYWRIGHT_IS_OSS=true against an OSS UI, as OSS CI sets it.

Manual testing performed

  1. Ran this branch's UI (Vite) against a local backend, signed in as admin, created a persona.
  2. AI mode: opened Settings → Personas → persona. The Customize UI shows one Navigation card, and it opens the AI sidebar list.
  3. Classic mode: opened /settings/persona/<persona>#customize-ui. One Navigation card, and it opens the classic Customize Navigation page.
  • pages/SettingsNavigationPage/SettingsNavigationPage.tsx (classic Customize Navigation). These fix visual problems from the core Tree migration (Migrate display, navigation, selection and numeric components to core #35253):
    • Icons: 24px in fg-secondary. The core tree defaulted them to 16px in fg-quaternary, so they looked faint.
    • Card: the default Card variant gives a white card with a light header divider. The ghost variant's divider inherited the dark text colour.
    • Title: "Navigation Menus" again, via label.navigation-menu-plural.
    • Icon and drag handle: the page renders the nav icon and the handle's hover group (group/nav-row) on its own row content, not through core Tree props, so it doesn't override core styling. The handle sits inside the row, before the icon, as on the old antd page. Before, it was hidden between the icon and the label but still took up space, and group-hover/tree-item never fired because a non-selectable react-aria tree item never gets data-hovered.

UI screen recording:

Screenshots below. No screen recording yet.

AI mode: one Navigation card

AI mode persona cards

AI mode: Navigation opens the AI sidebar list

AI mode navigation editor

Classic mode: one Navigation card

Classic mode persona cards

Classic mode: Navigation opens the classic sidebar list (white card, light divider, 24px icons; title restored to "Navigation Menus")

Classic mode navigation editor

Classic mode: drag handle shows inside the row, before the icon, on hover

Classic mode drag handle on hover

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.
  • I have added tests (unit / integration / Playwright as applicable) and listed them above.

🤖 Generated with Claude Code

The persona Customize UI showed both a Navigation card (classic sidebar) and
an AI sidebar card. There is now one Navigation card: the settings modal
(AI mode) opens the AI sidebar editor, and the classic /settings/persona page
keeps the classic navigation editor.

The AI sidebar stays in getCustomizePageCategories so breadcrumbs and the
/customize-page/<persona>/askCollateSidebar route still resolve, and Collate's
same-key override is hidden by the same card filter.

Carries the navigation editor row styling from #36707 unchanged so the two
PRs merge cleanly.
@github-actions github-actions Bot added the UI UI specific issues label Nov 2, 2026
@github-actions

github-actions Bot commented Nov 2, 2026

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!

The core Tree mutes item icons to 16px fg-quaternary, which made the classic
customize navigation icons faint. Render them at 24px in fg-secondary, as the
left sidebar does, and bring back the Navigation Menus card title.
@github-actions

github-actions Bot commented Nov 2, 2026

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!

The ghost Card has no border colour, so its header divider inherited the dark
text colour and the tree sat on the grey page. The default variant gives a
bg-surface card whose header divider inherits border-subtle.
@github-actions

github-actions Bot commented Nov 2, 2026

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!

The hidden handle sat between icon and label and still took up space. Move it
into the left gutter, and reveal it on the row's own :hover: a non-selectable
react-aria tree item never gets data-hovered, so group-hover never fired.
@github-actions

github-actions Bot commented Nov 2, 2026

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!

@Rohit0301 Rohit0301 self-assigned this Nov 2, 2026
@Rohit0301 Rohit0301 added the safe to test Add this label to run secure Github workflows on PRs label Nov 2, 2026
@Rohit0301
Rohit0301 marked this pull request as ready for review November 2, 2026 14:09
@Rohit0301
Rohit0301 requested a review from a team as a code owner November 2, 2026 14:09
@github-actions

github-actions Bot commented Nov 2, 2026

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.

- SettingsNavigationPage renders the nav icon and the drag-handle hover group
  on its own row content, so it no longer overrides core Tree icon colour or
  selects on react-aria's role=row.
- ADR:2026-11-02-persona-navigation-card-opens-the-editor-for-the-app-mode
  records the one-Navigation-card rule and its guards.
- ADR:2026-11-02-persona-customize-editor-tree-rows-are-styled-at-the-call-site
  (v5 amendment of the core-styling record) scopes the persona editor row
  and category card overrides carried from #36707.
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

⚠️ UI Checkstyle passed — lint findings in changed files

🔍 ESLint findings in this PR's files — 0 error(s), 6 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), 6 warning(s) across 6 changed file(s).

Count Rule
4 openmetadata-imports/no-lower-layer-page-imports
1 react-hooks/exhaustive-deps
1 openmetadata-imports/no-cross-page-imports
All findings
Location Rule Message
🟡 src/components/Settings/Persona/CustomizeUI/CustomizeUI.tsx:55:5 react-hooks/exhaustive-deps React Hook useCallback has a missing dependency: 'navigate'. Either include it or remove the dependency array. Outer scope values like 'history' aren't valid de
🟡 src/components/discovery/personal-space/Profile/tabs/personas/customize/AiSidebarEditor.tsx:28:1 openmetadata-imports/no-lower-layer-page-imports Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here.
🟡 src/components/discovery/personal-space/Profile/tabs/personas/customize/PersonaCustomizeView.test.tsx:19:1 openmetadata-imports/no-lower-layer-page-imports Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here.
🟡 src/components/discovery/personal-space/Profile/tabs/personas/customize/PersonaCustomizeView.tsx:25:1 openmetadata-imports/no-lower-layer-page-imports Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here.
🟡 src/components/discovery/personal-space/Profile/tabs/personas/customize/SubCategoryGrid.tsx:16:1 openmetadata-imports/no-lower-layer-page-imports Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here.
🟡 src/pages/SettingsNavigationPage/SettingsNavigationPage.tsx:43:1 openmetadata-imports/no-cross-page-imports Page features must not import another page feature. Move shared code to components, hooks, interfaces, or pure utilities.

Fix locally (fast - only checks files changed in this branch):

make ui-checkstyle-changed

The handle sits in the row's hover box ahead of the icon, as the antd page had
it, instead of out in the card gutter.
@gitar-bot

gitar-bot Bot commented Nov 2, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 4 closed / 4 findings

🟡 Medium risk · Routing Navigation to separate classic or AI sidebar settings changes persona customization behavior and could leave users editing a different sidebar than intended.

Merges the persona Navigation and AI sidebar cards into a single Navigation card, which opens the AI sidebar editor in AI mode and the classic navigation editor in classic mode. Four resolved findings addressed: caller-side Card/Tree styling overrides, the undocumented card-to-editor mapping, the icon colour override, and the react-aria internal selector used for the drag handle reveal. No open issues remain.

✅ 4 closed
✅ Quality: Caller overrides core Card/Tree styling, contradicting the Accepted ADR

📄 openmetadata-ui/src/main/resources/ui/src/components/discovery/personal-space/Profile/tabs/personas/customize/NavigationEditor.tsx:155-165 📄 openmetadata-ui/src/main/resources/ui/src/components/discovery/personal-space/Profile/tabs/personas/customize/NavigationEditor.tsx:195 📄 openmetadata-ui/src/main/resources/ui/src/components/discovery/personal-space/Profile/tabs/personas/customize/NavigationEditor.tsx:200 📄 openmetadata-ui/src/main/resources/ui/src/components/discovery/personal-space/Profile/tabs/personas/customize/AiSidebarEditor.tsx:184-194 📄 openmetadata-ui/src/main/resources/ui/src/components/discovery/personal-space/Profile/tabs/personas/customize/AiSidebarEditor.tsx:228 📄 openmetadata-ui/src/main/resources/ui/src/components/discovery/personal-space/Profile/tabs/personas/customize/AiSidebarEditor.tsx:233 📄 openmetadata-ui/src/main/resources/ui/src/components/discovery/personal-space/Profile/tabs/personas/PersonaCustomizeGrid.tsx:53 📄 openmetadata-ui/src/main/resources/ui/src/components/discovery/personal-space/Profile/tabs/personas/customize/SubCategoryGrid.tsx:60
ADR:2026-10-11-migrated-antd-components-adopt-core-styling (Accepted) says callers must not set padding, border, radius or background through className on a core component or its sub-components, and must not use !important. This diff does all three. It adds tw:px-3 on Card.Content in PersonaCustomizeGrid and SubCategoryGrid. It adds tw:rounded-none tw:border-b tw:border-secondary on Tree.Item. It adds tw:ml-0! tw:rounded-none tw:pl-4/pl-10 tw:pr-3.5 tw:py-0 on Tree.ItemContent, where the ! cancels the core's marginLeft indentation, which is a specificity fight. It also adds tw:rounded-xl on the editor Card. Keeping these files identical to #36707 does not exempt them from the record. Either add the full-width divided-row look to the core Tree and Card as a variant or size, with a Storybook story in both themes, or add a record that amends the ADR. That record would state: "Persona customize navigation-editor tree rows and category cards restyle core Tree/Card from the call site until core ships a full-bleed divided Tree row variant." It needs a scope and an exit condition, like the v2–v4 amendments.

✅ Quality: Card-to-editor mapping is a new rule with no decision record

📄 openmetadata-ui/src/main/resources/ui/src/utils/Persona/PersonaUtils.ts:22-31 📄 openmetadata-ui/src/main/resources/ui/src/components/discovery/personal-space/Profile/tabs/personas/customize/PersonaCustomizeView.tsx:87-93 📄 openmetadata-ui/src/main/resources/ui/src/components/Settings/Persona/CustomizeUI/CustomizeUI.tsx:30
The PR sets a rule that other code has to agree with, and only the PR description and code comments state it. The rule: "The persona customize grid shows no askCollateSidebar card. In AI mode the navigation category opens the AI sidebar editor, in classic mode it opens the classic navigation editor, and askCollateSidebar stays a routable category for breadcrumbs and /customize-page/<persona>/askCollateSidebar." Collate depends on it: the description says "Collate's PersonaClassCollate needs no change; filtering where cards render hides the AI sidebar card there too". That only holds while Collate keeps the key askCollateSidebar (APP_MODE_SIDEBAR_CUSTOMIZATION_KEY). A side effect is that classic-mode admins can no longer reach the AI sidebar editor from the CustomizeUI cards. The repository squash-merges, so this reasoning will not survive in git history. Add a record under docs/decisions/ that states the rule above, and name PersonaUtils.test.ts and PersonaCustomizeView.test.tsx as its guards.

✅ Quality: iconClassName overrides core Tree icon colour, contradicting the ADR

📄 openmetadata-ui/src/main/resources/ui/src/pages/SettingsNavigationPage/SettingsNavigationPage.tsx:108-112
This commit passes iconClassName="tw:size-6 tw:text-fg-secondary" to Tree.ItemContent. Core renders the icon as tw:w-4 tw:h-4 tw:shrink-0 tw:text-fg-quaternary and merges iconClassName after those classes, so the caller replaces the core icon colour and size. The added comment says why ("The core tree mutes item icons; this page lists them as primary content"). The Accepted record ADR:2026-10-11-migrated-antd-components-adopt-core-styling says callers must not use a className that sets text colour on a core component or its sub-components, and that "a visual gap that the core API cannot express is fixed in the core component, not at the call site". None of the v2–v4 amendments cover the Tree. There are two ways to resolve this. Option A: drop the override and accept the muted 16px icon. Option B: add a core Tree.ItemContent prop for prominent icons (for example iconEmphasis="primary" / iconSize), with a Storybook story in both themes, and use that prop here. If neither works, the PR needs a record amending the ADR for this call site.

✅ Quality: Drag handle reveal uses a selector that reaches into react-aria internals

📄 openmetadata-ui/src/main/resources/ui/src/pages/SettingsNavigationPage/SettingsNavigationPage.tsx:116-118
This commit switches the drag handle's reveal from the core Tree's own group/tree-item hook to tw:in-[[role=row]:hover]:visible. That is an ancestor selector keyed on the role="row" attribute react-aria-components puts on the tree item's DOM. That attribute is an internal of the core Tree, not part of its API. The Accepted record docs/decisions/2026-10-11-migrated-antd-components-adopt-core-styling.md rules out caller selectors that "reach into its internals" and says "a visual gap that the core API cannot express is fixed in the core component, not at the call site". If react-aria or core Tree changes the row markup, the handle silently stops appearing on hover.

The new comment's reason also looks wrong. The comment says a non-selectable item never gets data-hovered, but Tailwind v4's group-hover/<name>: variant matches the CSS :hover pseudo-class (:where(.group\/tree-item):hover *), not react-aria's data-hovered. Core sets tw:group/tree-item on AriaTreeItem (core tree.tsx:146), and this repo has no @custom-variant hover override (checked styles/tailwind.css). So the earlier tw:group-hover/tree-item:visible doesn't depend on data-hovered either way. If it really failed in the browser, the cause is something else, and the fix belongs in core Tree (for example a hover-revealed drag slot on Tree.ItemContent) rather than a role-attribute selector here.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

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

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 81%
80.97% (137075/169274) 67.88% (49194/72464) 70.93% (27688/39031)

@sonarqubecloud

sonarqubecloud Bot commented Nov 2, 2026

Copy link
Copy Markdown

@Rohit0301
Rohit0301 added this pull request to the merge queue Nov 3, 2026
Merged via the queue into main with commit 24b6ebf Nov 3, 2026
70 of 72 checks passed
@Rohit0301
Rohit0301 deleted the Rohit0301/persona-navigation-pr branch November 3, 2026 16:11
anuj-kumary added a commit that referenced this pull request Nov 4, 2026
…ation tests with the current UI (#37008)

The delete confirmation names a custom property by its display name since
#36808, and the edit step upper-cases that display name, so match the name
case-insensitively. The AI-mode Navigation card opens the AI sidebar editor
since #36862, so the unsaved-changes tests toggle ai-sidebar-switch-explore.
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.

2 participants