Skip to content

Show users with a hover card where they render as plain text (backport 2.1 #37773) - #37835

Merged
shah-harshit merged 3 commits into
2.1from
shah-harshit/backport-2.1-37773
Nov 16, 2026
Merged

shah-harshit merged 3 commits into
2.1from
shah-harshit/backport-2.1-37773

Conversation

@shah-harshit

@shah-harshit shah-harshit commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Describe your changes:

Backports #37773 to 2.1.
Part of #37117 and open-metadata/openmetadata-collate#6243

This cherry-picks a9852c3 (the squash of #37773). There is one conflict: DocumentsView.test.tsx differs on 2.1 (it renders with render, not renderWithQueryClient, and the core-components mock is smaller). I took the 2.1 file and re-applied this PR's test changes on top: the UserPopOverCard mock, the Box test double forwarding onClick (with its justified eslint-disable), the updated-by assertion, and the "does not open the preview when the updated-by user is clicked" test. Product code applied cleanly.

Depends on #37127 reaching 2.1. #37127 (UserPopOverCard resolves the display name itself) is still open on main. Until it lands on 2.1, the sites that only have a login (announcement author, document updater, version history author) show the login, now with the hover card. For that reason, the ContextCenterPermission.spec.ts updated-by check in this backport asserts the login (responseData.name), unlike main. Switch it to getUserDisplayName() together with the #37127 backport.

Type of change:

  • Bug fix

Tests:

  • Jest on 2.1 across the touched folders (Announcement, DocumentsView, VersionHistoryDrawer, settings/announcements, OwnerFeed, CreateMemoryModal, KnowledgeCard, FeedbackApprovalTask): 21 suites, 220 tests passed.
  • ESLint (--fix), organize-imports and Prettier on the 16 changed files: no errors and no changes. tsc reports no errors in the changed files. ESLint on ContextCenterPermission.spec.ts is clean.
  • Playwright: not run locally. Pending: Features/ContextCenterPermission.spec.ts, Features/Announcements/*, Features/PersonaAIContext.spec.ts.

Screenshots and the full description are on #37773. Collate 2.1 backport: open-metadata/openmetadata-collate#8582

Checklist:

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge.

Summary

Adds user hover cards to announcements, document metadata, and version history.

  • Announcement and version-history authors open a user card.
  • Activity-feed and knowledge-page owners show usable names.
  • Document updater names open a card without opening the file.
  • Memory read-only messages name the owner or last updater.
  • Feedback submitter details show a card only when a login is available.

Reviews (2) · Last reviewed commit: "Fall back to the login when an owner or ..." · Reviewed by Greptile

* Show users with a hover card where they render as plain text

Announcements (feed card, settings table), Context Center documents and
persona version history now render the user through UserPopOverCard, so
they get the shared hover card and the display name it resolves. The
owner feed chip and the read-only memory banner fall back to the login
when an owner has no display name instead of rendering blank or the raw
login. Clicking the user in a document row no longer opens the preview.

* Let UserPopOverCard resolve display names for owners and feedback authors

CreateMemoryModal, KnowledgeCard and FeedbackApprovalTask passed
getEntityName(ref) as displayName. getEntityName falls back to the login,
so the prop always won and UserPopOverCard never looked up the display
name for a reference without one. Pass the reference's own displayName
instead. FeedbackApprovalTask also no longer renders a '-' user (and a
lookup for it) when createdBy has no name.

Also shortens an over-long eslint-disable comment in DocumentsView.test.

(cherry picked from commit a9852c3)
@shah-harshit
shah-harshit requested a review from a team as a code owner November 16, 2026 05:39
@shah-harshit
shah-harshit requested review from chirag-madlani and removed request for a team November 16, 2026 05:39
@shah-harshit shah-harshit added UI UI specific issues safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check labels Nov 16, 2026
@shah-harshit shah-harshit self-assigned this Nov 16, 2026
@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.

…s 2.1

UserPopOverCard on 2.1 renders displayName ?? userName and the row only
passes the login, so the display-name assertion would fail on the
release branch.
2.1's UserPopOverCard renders displayName ?? userName, so an empty
displayName left the name blank. Pass undefined instead in KnowledgeCard,
the memory owner chip and FeedbackApprovalTask. The KnowledgeCard owner
chip moves into its own component to stay within the complexity limit.
@gitar-bot

gitar-bot Bot commented Nov 16, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 🟡 Medium risk 1 closed / 1 findings

Adding user hover cards across announcement, document, version-history, and knowledge views changes interactions; incorrect click handling could disrupt previews or navigation.

Backports the hover-card change that renders users as plain text on the 2.1 branch, adapting the DocumentsView test to 2.1's render helper. The E2E updated-by assertion that expected a display name the 2.1 UserPopOverCard cannot show was resolved by asserting the login instead. No open issues found.

✅ 1 closed
✅ Bug: E2E assertion expects display name that 2.1 UserPopOverCard can't show

📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/ContextCenterPermission.spec.ts:1178-1180 📄 openmetadata-ui/src/main/resources/ui/src/components/ContextCenter/DocumentsView/DocumentsView.component.tsx:717-722
document-updated-by gets only file.updatedBy, which is a login. On 2.1, UserPopOverCard renders displayName ?? userName (UserPopOverCard.tsx:104) and never looks up the profile, so this row shows the login. Playwright users are created with a displayName that differs from name, so toContainText(createAllUser.getUserDisplayName()) will fail on 2.1 until #37127 is backported. The PR description says so. Two ways to fix it: keep asserting createAllUser.responseData.name in this backport and move to the display name when #37127 reaches 2.1, or hold this PR until #37127 is on 2.1. Otherwise this merges a spec that is known to fail on the release branch.

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

@shah-harshit
shah-harshit merged commit d3e0093 into 2.1 Nov 16, 2026
60 checks passed
@shah-harshit
shah-harshit deleted the shah-harshit/backport-2.1-37773 branch November 16, 2026 07:57
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 UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant