Skip to content

feat(ui): AI Profile — Members page (teams/users/admins/online) + E2E - #34607

Merged
Rohit0301 merged 87 commits into
mainfrom
ai-profile-members-page
Oct 6, 2026
Merged

Rohit0301 merged 87 commits into
mainfrom
ai-profile-members-page

Conversation

@Rohit0301

@Rohit0301 Rohit0301 commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Describe your changes:

Fixes 6441

Builds the AI-mode Profile → Members surface (hash-routed, core-ui) — Teams,
Users, Admins and Online Users — and adds comprehensive Playwright E2E coverage
for it, porting the behaviours of the classic Teams.spec / Users.spec /
OnlineUsers.spec onto the new UI.

Along the way the E2E work surfaced and fixed several real bugs in the members UI
(navigation, display names, add-user affordance, import abort overflow).

Screenshot 2026-10-05 at 1 50 07 PM Screenshot 2026-10-05 at 1 50 28 PM Screenshot 2026-10-05 at 1 50 42 PM Screenshot 2026-10-05 at 1 51 31 PM Screenshot 2026-10-05 at 1 52 03 PM Screenshot 2026-10-05 at 1 52 34 PM Screenshot 2026-10-05 at 1 52 45 PM Screenshot 2026-10-05 at 1 53 04 PM Screenshot 2026-10-05 at 2 18 29 PM

Type of change:

  • New feature
  • Bug fix

High-level design:

  • UI: components/discovery/personal-space/Profile/tabs/members/* — hash-driven
    panels (MembersPanel → team detail / users / admins / online / create / import),
    reusing useSettingsHash, core-ui Table/Tabs/Select/Autocomplete, and the
    shared SelectableList/UserTeamSelectableList. Cross-surface links go through a
    single profileHash + ProfileHashLink that writes the hash synchronously.
  • Bug fixes surfaced by the tests:
    • ProfilePage clears the stale header override on hash-driven tab changes
      (team-detail → user profile no longer shows the Members header).
    • Users/Online panels fall back to name when a team/role ref lacks
      fullyQualifiedName (was navigating to Organization).
    • Team detail: multi-select add-user popover (checkbox + update button);
      optimistically-added roles/policies keep their displayName.
    • Import: abort message now wraps inside the card (break-words).
  • Tests: playwright/e2e/Pages/AIProfile/Profile{Members,Team,User,OnlineUser}.spec.ts
    • shared playwright/utils/aiProfile.ts. Admin-authenticated via the pages
      fixture; data created via API (performAdminLogin); reliable waits, no timeouts.

Tests:

Use cases covered

  • Members landing → navigate to Teams/Users/Admins/Online sub-pages + breadcrumbs
  • Cross-surface navigation: team → user / role / policy; users & admins → team / role
  • Team detail: create (public/private), search, rename, edit email/description,
    add/remove user, user count, show-deleted, add/remove role, add/remove policy,
    child-team navigation, join/leave, soft-delete + restore, CSV export, CSV import
  • Users/Admins: create user + admin, duplicate-email guard, search, soft/hard
    delete + restore, profile preferred-name / persona / default-persona / domain,
    non-admin gating
  • Online Users: table + headers, time-window filter, bots excluded, non-admin gating

Playwright tests

  • Added the 4 specs above; yarn lint:playwright passes (0 errors).

Unit tests

  • Existing component unit tests cover the members components.

- Members navigation via local useState (like AccessControlPanel) instead of
  hash routing that did not propagate in the modal — fixes team-name,
  add-team, create-user navigation
- Extract info widgets into MembersTeamInfoWidgets; core-ui import view
- Encode fqn in hash utils; drag-move API parity; domain/owner edit in label row
- Members navigation via local useState (like AccessControlPanel) instead of
  hash routing that did not propagate in the modal — fixes team-name,
  add-team, create-user navigation
- Extract info widgets into MembersTeamInfoWidgets; core-ui import view
- Encode fqn in hash utils; drag-move API parity; domain/owner edit in label row
…-profile-members-page

# Conflicts:
#	openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/AIProfile/ProfileMembers.spec.ts
#	openmetadata-ui/src/main/resources/ui/src/components/Settings/Team/TeamDetails/TeamsHeaderSection/TeamsSubscription.component.tsx
#	openmetadata-ui/src/main/resources/ui/src/components/discovery/personal-space/Profile/profileNavConfig.tsx
#	openmetadata-ui/src/main/resources/ui/src/components/discovery/personal-space/Profile/tabs/members/Members.constants.ts
#	openmetadata-ui/src/main/resources/ui/src/components/discovery/personal-space/Profile/tabs/members/MembersCreateUserForm.tsx
#	openmetadata-ui/src/main/resources/ui/src/components/discovery/personal-space/Profile/tabs/members/MembersImportForm.tsx
#	openmetadata-ui/src/main/resources/ui/src/components/discovery/personal-space/Profile/tabs/members/MembersPanel.tsx
#	openmetadata-ui/src/main/resources/ui/src/components/discovery/personal-space/Profile/tabs/members/MembersTeamDetail.tsx
#	openmetadata-ui/src/main/resources/ui/src/components/discovery/personal-space/Profile/tabs/members/MembersTeamInfoWidgets.tsx
#	openmetadata-ui/src/main/resources/ui/src/components/discovery/personal-space/Profile/tabs/members/MembersUsersPanel.tsx
#	openmetadata-ui/src/main/resources/ui/src/locale/languages/ar-sa.json
#	openmetadata-ui/src/main/resources/ui/src/locale/languages/de-de.json
#	openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json
#	openmetadata-ui/src/main/resources/ui/src/locale/languages/es-es.json
#	openmetadata-ui/src/main/resources/ui/src/locale/languages/fr-fr.json
#	openmetadata-ui/src/main/resources/ui/src/locale/languages/gl-es.json
#	openmetadata-ui/src/main/resources/ui/src/locale/languages/he-he.json
#	openmetadata-ui/src/main/resources/ui/src/locale/languages/ja-jp.json
#	openmetadata-ui/src/main/resources/ui/src/locale/languages/ko-kr.json
#	openmetadata-ui/src/main/resources/ui/src/locale/languages/mr-in.json
#	openmetadata-ui/src/main/resources/ui/src/locale/languages/nl-nl.json
#	openmetadata-ui/src/main/resources/ui/src/locale/languages/pr-pr.json
#	openmetadata-ui/src/main/resources/ui/src/locale/languages/pt-br.json
#	openmetadata-ui/src/main/resources/ui/src/locale/languages/pt-pt.json
#	openmetadata-ui/src/main/resources/ui/src/locale/languages/ru-ru.json
#	openmetadata-ui/src/main/resources/ui/src/locale/languages/sv-se.json
#	openmetadata-ui/src/main/resources/ui/src/locale/languages/th-th.json
#	openmetadata-ui/src/main/resources/ui/src/locale/languages/tr-tr.json
#	openmetadata-ui/src/main/resources/ui/src/locale/languages/zh-cn.json
#	openmetadata-ui/src/main/resources/ui/src/locale/languages/zh-tw.json
Specs (playwright/e2e/Pages/AIProfile): ProfileMembers (landing nav +
cross-surface navigation), ProfileTeam, ProfileUser, ProfileOnlineUser,
with shared helpers in utils/aiProfile.

UI fixes surfaced while writing the tests:
- ProfilePage: clear the stale header override on a hash-driven tab change
  so team-detail -> user profile no longer shows the Members header
- Users/Online panels: team/role link falls back to name when the ref has
  no fullyQualifiedName (was navigating to Organization)
- Team detail: multi-select add-user popover (checkbox + update button);
  keep displayName on optimistically-added roles/policies
- Import: break-word the abort message so it stays inside the card
@github-actions

github-actions Bot commented Oct 3, 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.

@github-actions github-actions Bot added the UI UI specific issues label Oct 3, 2026
@github-actions

github-actions Bot commented Oct 3, 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 Oct 3, 2026
@Rohit0301 Rohit0301 added the safe to test Add this label to run secure Github workflows on PRs label Oct 3, 2026
@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

🔄 Playwright impact map auto-refreshed

This PR touched specs or UI source that changed the source→spec routing map. I regenerated .github/playwright/impact-map.generated.json and pushed the diff to this branch.

- source entries: 829 → 838
- 12 added, 3 removed, 39 changed spec-list

New source→spec entries:
  openmetadata-ui/src/main/resources/ui/playwright/utils/aiProfile.ts
  openmetadata-ui/src/main/resources/ui/src/components/discovery/personal-space/Profile/ProfileDetailsPanel.tsx
  openmetadata-ui/src/main/resources/ui/src/components/discovery/personal-space/Profile/components/DomainsRow.tsx
  openmetadata-ui/src/main/resources/ui/src/components/discovery/personal-space/Profile/components/PersonaRow.tsx
  openmetadata-ui/src/main/resources/ui/src/components/discovery/personal-space/Profile/tabs/members/MembersAddTeamForm.tsx
  openmetadata-ui/src/main/resources/ui/src/components/discovery/personal-space/Profile/tabs/members/MembersCreateUserForm.tsx
  openmetadata-ui/src/main/resources/ui/src/components/discovery/personal-space/Profile/tabs/members/MembersImportForm.tsx
  openmetadata-ui/src/main/resources/ui/src/components/discovery/personal-space/Profile/tabs/members/MembersLanding.tsx
  openmetadata-ui/src/main/resources/ui/src/components/discovery/personal-space/Profile/tabs/members/MembersOnlineUsersPanel.tsx
  openmetadata-ui/src/main/resources/ui/src/components/discovery/personal-space/Profile/tabs/members/MembersTeamDetail.tsx
  … and 2 more

Removed source→spec entries:
  openmetadata-ui/src/main/resources/ui/src/components/common/UserSelectableList/UserSelectableList.component.tsx
  openmetadata-ui/src/main/resources/ui/src/components/discovery/personal-space/Profile/tabs/access-control/AccessControlPanel.tsx
  openmetadata-ui/src/main/resources/ui/src/pages/UserListPage/UserListPageV1.tsx

Entries whose spec list changed:
  openmetadata-ui/src/main/resources/ui/playwright/e2e/Utils/appMode.ts
  openmetadata-ui/src/main/resources/ui/playwright/e2e/fixtures/pages.ts
  openmetadata-ui/src/main/resources/ui/playwright/support/access-control/PoliciesClass.ts
  openmetadata-ui/src/main/resources/ui/playwright/support/access-control/RolesClass.ts
  openmetadata-ui/src/main/resources/ui/playwright/support/domain/Domain.ts
  openmetadata-ui/src/main/resources/ui/playwright/support/persona/PersonaClass.ts
  openmetadata-ui/src/main/resources/ui/playwright/support/team/TeamClass.ts
  openmetadata-ui/src/main/resources/ui/playwright/support/user/UserClass.ts
  openmetadata-ui/src/main/resources/ui/playwright/utils/admin.ts
  openmetadata-ui/src/main/resources/ui/playwright/utils/common.ts
  … and 29 more

What is this file? It is the auto-generated half of Playwright's PR planner. It routes "if source X changes, run specs Y" by walking spec imports and cross-referencing getByTestId strings. Hand-authored routing in impact-map.json always wins on conflict.

What if I want to regenerate locally instead? Run this before pushing your next change to skip the bot commit:

python3 .github/scripts/generate_playwright_impact_map.py
git add .github/playwright/impact-map.generated.json
git commit --amend --no-edit  # or a separate commit

# Conflicts:
#	openmetadata-ui/src/main/resources/ui/src/components/discovery/personal-space/Profile/profileNavConfig.tsx
#	openmetadata-ui/src/main/resources/ui/src/constants/Profile.constants.ts
ProfileNavItem.id is typed ProfileNavId and PROFILE_NAV_IDS is new Set(PROFILE_NAV_ID_LIST),
both derived from the same tuple — a missing id is a compile error, so the runtime filter
can never fail.
…indings

- MembersPanel: key the Users and Admins branches so switching between them remounts
  MembersUsersPanel — both render the same component type and its fetch effects don't
  depend on isAdmin, so React was keeping the instance and showing the stale list.
- MembersCreateUserForm: hoist a withoutId helper so the multi-select item handler no
  longer nests a filter five levels deep (sonarjs/no-nested-functions).
- MembersPanel.test: destructure onRename in the MembersTeamDetail mock to satisfy
  react-hooks/exhaustive-deps.
The local formatter had reflowed imports to a non-prettier style; re-run prettier so
the files match the CI prettier gate (2-space, sorted).
…d team detail

The deleted-aware canEditAll hides every manage action on a soft-deleted team,
leaving an empty menu and no path to restore. Derive an ungated canRestore
(DataAssetsHeader precedent) to gate Restore, show Delete for deleted teams
(permanent-only via allowSoftDelete=false), and render a Deleted badge after
the team name in the modal header.
PersonaSelect stripped the selected persona to {id,type}, so a team's
optimistic defaultPersona had no name and the widget rendered blank until a
GET re-inflated it. Keep name/fullyQualifiedName/displayName (valid PATCH ref
fields) and drop only the server read-only ones.
…ages

Cap the dialog to the viewport (min-height:0 on the panel so the flex
chain honours the cap) and clip the ModalOverlay so a long inner page
(e.g. a big team table) scrolls in its own body instead of making the
whole dialog scroll inside the fixed overlay.

Also address Sonar warnings on the members tab: re-export LIST_CAP via
export…from, and void the floating save() promise in the Enter handler.
- Members.utils: reuse GlobalSettingOptions enum for route segments
- MembersAddTeamForm: resolve parent team via a useCallback+try/catch
  instead of inline then/catch in useEffect; combine map+filter into reduce
- MembersCreateUserForm: move flattenTeamHierarchy/withoutId/mergeRoleItems
  to utils (TeamNode to types); make fetchers stable useCallbacks and drop
  the exhaustive-deps eslint-disables; stabilise the test's t mock
… drop dead re-export

- Members.utils: move toImportRows, flatten/withoutId/mergeRoleItems, and the
  MembersPanel header-map builders (icons/descriptions/breadcrumb/title) here;
  dedupe view-type discriminants behind consts
- Members.constants/types: host the import-result keys + row types
- MembersTeamDetail.utils: drop the dead LIST_CAP re-export (consumers import it
  from PermissionsUtils directly)
- playwright/aiProfile: add createMembersTeam + createTrackedUser; ProfileTeam/
  ProfileUser delegate to them and instantiate Persona in beforeAll
Replace the exhaustive-deps disables with a latest-closure ref so each
effect keys on its intended primitives (pageSize, showDeleted, timeWindow,
team fqn, activeTab, …) while reading the current search term / fetchers
without re-firing on every keystroke:
- MembersUsersPanel: drop the redundant mount effect (it double-fetched with
  the pageSize/deleted effect) and fold it into one ref-driven effect
- MembersOnlineUsersPanel, MembersTeamDetail, useMembersTeamHeader: same ref
  pattern; MembersTeamDetail reads activeTab via a ref so fetchTeam needn't
  list it. The one remaining disable (sequential team patch) is now justified
  inline — it genuinely needs the fetched id/diff.
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

🔄 Playwright impact map auto-refreshed

This PR touched specs or UI source that changed the source→spec routing map. I regenerated .github/playwright/impact-map.generated.json and pushed the diff to this branch.

- source entries: 851 → 851
- 0 added, 0 removed, 11 changed spec-list

Entries whose spec list changed:
  openmetadata-ui/src/main/resources/ui/playwright/constant/customProperty.ts
  openmetadata-ui/src/main/resources/ui/playwright/constant/settings.ts
  openmetadata-ui/src/main/resources/ui/playwright/support/entity/Entity.interface.ts
  openmetadata-ui/src/main/resources/ui/playwright/support/fixtures/base.ts
  openmetadata-ui/src/main/resources/ui/playwright/support/team/TeamClass.ts
  openmetadata-ui/src/main/resources/ui/playwright/support/user/UserClass.ts
  openmetadata-ui/src/main/resources/ui/playwright/utils/common.ts
  openmetadata-ui/src/main/resources/ui/playwright/utils/customProperty.ts
  openmetadata-ui/src/main/resources/ui/playwright/utils/entity.ts
  openmetadata-ui/src/main/resources/ui/playwright/utils/sidebar.ts
  … and 1 more

What is this file? It is the auto-generated half of Playwright's PR planner. It routes "if source X changes, run specs Y" by walking spec imports and cross-referencing getByTestId strings. Hand-authored routing in impact-map.json always wins on conflict.

What if I want to regenerate locally instead? Run this before pushing your next change to skip the bot commit:

python3 .github/scripts/generate_playwright_impact_map.py
git add .github/playwright/impact-map.generated.json
git commit --amend --no-edit  # or a separate commit

@gitar-bot

gitar-bot Bot commented Oct 6, 2026 •

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

🔴 High risk · Adds workflows for admin-user creation and team role and policy membership changes

Builds the AI-mode Profile → Members surface with Teams, Users, Admins, and Online Users panels, backed by comprehensive Playwright E2E coverage. The work surfaced and fixed 12 real bugs including import job spinner hangs, stale profile data races, team header display issues, and i18n key coverage gaps. No open issues remain.

✅ 14 closed
✅ Bug: FAILED import job leaves the import form stuck on its spinner

📄 openmetadata-ui/src/main/resources/ui/src/components/discovery/personal-space/Profile/tabs/members/MembersImportForm.tsx:597-611
The socket handler returns early whenever response.status !== 'COMPLETED'. CSVImportAsyncWebsocketResponse.status can also be 'FAILED', and in that case processingType is never cleared. The form keeps showing the ProcessingBanner with no footer, the user can't retry, and no error is shown. Handle FAILED the way COMPLETED is handled: show response.error, clear processingType/activeJobRef, and go back to the upload or preview step.

✅ Bug: Final import shows success even when the result is Failure/Aborted

📄 openmetadata-ui/src/main/resources/ui/src/components/discovery/personal-space/Profile/tabs/members/MembersImportForm.tsx:553-567 📄 openmetadata-ui/src/main/resources/ui/src/components/discovery/personal-space/Profile/tabs/members/MembersImportForm.tsx:601-611 📄 openmetadata-ui/src/main/resources/ui/src/components/discovery/personal-space/Profile/tabs/members/MembersImportForm.tsx:712-716
handleImport moves to VALIDATION_STEP.UPDATE before the job runs. When the onValidate job completes, the handler only stores response.result and does not check result.status. At the UPDATE step, renderBody always renders SuccessContent ('imported successfully'), even if the real import came back Failure, PartialSuccess or Aborted. Check result.status for the onValidate job and show the result table, the abort card, or an error instead of the success screen.

✅ Bug: socket.off without a handler removes the global CsvJobsTray listener

📄 openmetadata-ui/src/main/resources/ui/src/components/discovery/personal-space/Profile/tabs/members/MembersImportForm.tsx:584-598
The cleanup calls socket.off(SOCKET_EVENTS.CSV_IMPORT_CHANNEL) without a handler, which removes every listener on that channel. CsvJobsTray is mounted app-wide (via CsvJobsTrayContainer in AuthenticatedApp) and subscribes fetchJobs on the same channel. After a user opens and then leaves the members import form, the jobs tray stops updating until it remounts. Keep a reference to this component's handler and pass it to socket.off.

✅ Bug: Team detail header shows the raw FQN, and renaming never updates it

📄 openmetadata-ui/src/main/resources/ui/src/components/discovery/personal-space/Profile/tabs/members/MembersPanel.tsx:95-97 📄 openmetadata-ui/src/main/resources/ui/src/components/discovery/personal-space/Profile/tabs/members/MembersPanel.tsx:235-247 📄 openmetadata-ui/src/main/resources/ui/src/components/discovery/personal-space/Profile/tabs/members/Members.utils.ts:53-55 📄 openmetadata-ui/src/main/resources/ui/src/components/discovery/personal-space/Profile/tabs/members/MembersTeamDetail.tsx:464-472
The view comes only from the hash, and parseTeamsSubPath sets name: fqn. That means titleByType['team-detail'] and the breadcrumb always show the team's FQN (e.g. PW%team-nav-…), not its displayName, even when the child-team link passes name: getEntityName(record). The onRename callbacks are no-ops ('reflected on next fetch'), so saving a new display name never changes the header. Have MembersTeamDetail report the fetched team's getEntityName(team) to MembersPanel (for example via onRename into local title state) and use that for the title and breadcrumb.

✅ Bug: Profile fetch races: stale/other user's data can stick or flash

📄 openmetadata-ui/src/main/resources/ui/src/components/discovery/personal-space/Profile/ProfilePage.tsx:99-113
fetchUser has no cancellation or staleness check, and it clears userData only when isViewingOtherUser is true. Say you go from #profile/bob to #profile/alice, or from there back to #profile or another tab, and the requests resolve out of order: whichever response lands last wins. The page can then keep showing the wrong user for good. When you go from #profile/bob back to your own profile or tab, bob's userData stays rendered under your own title until the refetch finishes. updateUserDetails patches userData.id, so an edit made in that window goes to bob. Fix: guard with a request id or AbortController, ignore stale responses, and reset userData whenever targetUsername changes rather than only when moving to another user.

...and 9 more closed from earlier reviews

Review coverage

📋 Rules No rules evaluated

🧪 Functional validation Not enabled · Set up

🤖 Auto-approval Not enabled · Set up

Options

Display: compact → Counting what did not apply, without listing it.

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 Oct 6, 2026

Copy link
Copy Markdown
Contributor

⚠️ UI Checkstyle passed — lint findings in changed files

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

Count Rule
1 react-hooks/exhaustive-deps
1 openmetadata-imports/no-lower-layer-page-imports
All findings
Location Rule Message
🟡 src/components/common/UserTeamSelectableList/UserTeamSelectableList.component.tsx:332:6 react-hooks/exhaustive-deps React Hook useEffect has a missing dependency: 'init'. Either include it or remove the dependency array.
🟡 src/utils/TableUtils.tsx:72: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.

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

make ui-checkstyle-changed

@sonarqubecloud

sonarqubecloud Bot commented Oct 6, 2026

Copy link
Copy Markdown

This branch was previously deployed

1 inactive deployment
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