Skip to content

Fixes 35875: user profile readable in AI mode dark theme; faster activity feed - #35893

Merged
sweta1308 merged 43 commits into
mainfrom
fix/ui-review-p1-dark-profile-ontology-default
Oct 26, 2026
Merged

sweta1308 merged 43 commits into
mainfrom
fix/ui-review-p1-dark-profile-ontology-default

Conversation

@sweta1308

@sweta1308 sweta1308 commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Describe your changes:

Fixes #35875

This fixes two problems on the user profile page (/users/<name>), which a UI review rated P1:

  • In AI mode with the dark theme, the page was unreadable.
  • The Activity feed took about 40 s to show its descriptions.

The profile cards now use Tailwind tokens and core components instead of LESS. They are readable in dark mode and unchanged in light mode.

Profile cards on Tailwind and core components

  • Cards: Persona and Default Persona, Domains, Teams, Roles and Inherited Roles (UserProfilePersona, DomainLabel, UserProfileTeams, UserProfileRoles, UserProfileInheritedRoles).
    • They dropped user-profile-card, user-profile-card-header, user-profile-card-body, user-page-icon and default-persona-text for Tailwind tokens: tw:bg-surface, tw:border-secondary, tw:rounded-xl, and the same spacing.
    • Before, the cards had background: white with text that flips to near-white, so they were unreadable in dark mode.
  • Header card (ProfileSectionUserDetailsCard): it dropped profile-section-user-details-card, profile-details-title, profile-details-email and user-details-menu-icon.
    • The name uses tw:text-primary; it used --om-color-gray-900, which stayed near-black on the dark card.
    • The email uses tw:text-brand-secondary.
  • Measured in a browser: in light mode, the computed margins, padding, border, radius, title and email styles match the old LESS exactly. The only difference is the icon box: 16 px instead of 14 px, from the core icon.
  • users.less: the rules for those classes are deleted, and no new LESS is added. One existing rule value, .domain-link-name:hover, moves to the brand token, which is the same colour in light mode.
  • Icons: the Persona and Roles cards, and the top-bar profile dropdown, use core icons from @openmetadata/ui-core-components/icons instead of ic-persona.svg and ic-roles.svg, which had #292929 baked in and vanished on dark cards. Each is the closest core match to the old design:
    • Roles: ActivityOwnerChanged, a person with a gear, the same design as before.
    • Persona: Role, an ID card with a person and text lines. Core has no exact match for the old stacked badge.
  • "+N more" chip (Chip): it uses core Badge color="brand", which follows the theme, instead of the white .chip-text fill.
  • Card dividers: Default Persona now has the same divider column as Persona (it was an ml-8 indent), and the Domains divider gets the same tw:mx-2 as the other cards.
  • Hook dependencies: the useMemo/useEffect dependency lists flagged in DomainLabel, UserProfileRoles and UserProfileTeams are complete. fetchRoles is a stable useCallback, so this changes no behaviour.

Activity feed descriptions took ~40 s to appear (components/ActivityFeed/ActivityFeedCard/FeedCardBody/FeedCardBodyNew.tsx)

  • Cause: each feed description renders RichTextEditorPreviewNew, which mounts a full read-only TipTap BlockEditor. The Activity tab mounted all 51 at once.
    • Measured on /users/admin: 51 editors, 38.9 s of main-thread long tasks, and a single 21.9 s freeze.
    • Every API call had returned within ~4 s.
  • Fix: each preview is wrapped in the existing DeferredWidget (already used by the home page). It mounts the editor only when the card is within 200 px of the viewport and keeps it mounted afterwards. DeferredWidget mounts eagerly in Jest and without IntersectionObserver.
  • No blank descriptions while loading: each description shows a two-line Skeleton until its preview has rendered content.
    • Content means text, or an image, divider, table, embed or custom node, so image-only posts also swap in.
    • The previewer mounts hidden, and a MutationObserver swaps it in.
    • DeferredWidget has no minHeight, so the skeleton holds the space only while loading.
    • In a browser check (every 100 ms for 15 s), no visible description was ever blank.
  • After: 4 editors on load, 4.2 s of long tasks, longest 1.2 s, and descriptions at ~7 s instead of ~42 s (Vite dev server). Scrolling mounts the rest.
  • Hook dependencies in the same file: the useMemo dependency lists are complete. The second memo lists handleSave, so editing a post still saves the latest text. The unused isPost is no longer destructured; the props interface is unchanged.

Feed card header alignment (components/ActivityFeed/ActivityFeedCardNew/ActivityFeedcardNew.component.tsx): the entity icon and link next to "created" were an inline flex box. That sat it on the text baseline, about 2 px above "created". It is now a regular flex box, so "created" and the link text both span 145–162 px, and the icon is centred.

Feed card footer alignment and hover (ActivityFeedCardV2/FeedCardFooter/FeedCardFooterNew.tsx, ActivityEventFooter.tsx)

  • Before: the replier avatar and the comment button were 40 px tall (tw:h-10!) next to a 22 px reaction button. So the reaction icon sat 10 px lower than the comment icon, and hovering the comment drew a tall, thin pill.
  • Comment button (conversation and activity cards, and the task card's reply): now core ButtonUtility with size="sm" and color="tertiary". That is a 24 px rounded square with an 18 px icon frame, the repository's minimum touch target, with no caller-side padding, radius or !important overrides. The classic add-reaction button, 22 px before this PR, uses the same ButtonUtility, so all items share one centre line and the same small hover square. The Inbox pill reaction button is unchanged.
  • Avatar: a 24 px core xs avatar in an xs ButtonUtility (28 px), inside a 28 px AvatarStack slot, centred with the icons. A 3 px margin after the stack evens out the visible gaps, because the avatar fills its button while the icons sit inside padding. The footer row gap is 4 px.
  • Icons: the comment and add-reaction icons use core icons instead of ic-reply-2.svg and ic-add-emoji.svg. Those SVGs had different greys baked in (#71717A and #52525B), so the two icons never matched and ignored the theme. The SVG files themselves are unchanged.
    • Comment: core Comment, in the conversation footer, the activity footer and the task card.
    • Add reaction: core Reactions, a smiley with a "+" like the old icon. The Inbox pill keeps the FaceSmile it already used.
  • Measured: avatar, comment and emoji centres are identical on each card. The visible gaps are 12.3 px and 12.7 px (they were 9 px and 14 px). Every button is 24×24 px. Both icons now draw in the same theme colour: rgb(123, 127, 134) in dark and rgb(113, 118, 128) in light.

No core-component files are changed.

Type of change:

  • Bug fix

High-level design:

N/A — a scoped styling fix.

Tests:

Use cases covered

  • /users/<name> in AI mode + dark theme: cards, name, icons, chips and dividers are readable on every tab (Activity, Tasks, My Data, Following, Permissions, Custom Properties, Access Token).
  • The same page in AI mode + light theme and in Classic mode is visually unchanged.
  • Activity feed: descriptions show a skeleton, then render for on-screen cards; the rest render as the feed scrolls. Image-only posts render their image.
  • Feed card header: "created", the entity icon and the link sit on one line.

Unit tests

  • The card changes are style-only (Tailwind tokens, core icons and a core Badge colour), and Jest cannot observe colours. Instead, the browser measurements above check that the light-mode layout matches the old LESS.
  • npx jest src/components/Settings/Users src/components/common/DomainLabel src/components/common/Chip src/components/ProfileCard src/components/ActivityFeed: 352 passed.
  • tsc: no errors in changed files. tw-audit, token-audit and tw-guard are clean.

Backend integration tests

  • Not applicable (no backend changes).

NOT NEEDED — UI-only change, no Java, schema, migration or pom files touched.

Ingestion integration tests

  • Not applicable (no ingestion changes).

Playwright (UI) tests

  • Not applicable: a visual fix with no flow change; the recording below shows both themes.

Manual testing performed

  1. AI mode, light theme: open /users/admin. It looks as before.
  2. Switch to dark via the user menu → Appearance → Dark. The cards are dark, and the text, name, Persona/Roles icons and dividers are readable.
  3. Click every tab. The left cards stay readable.
  4. Check Classic mode. It is unchanged.
  5. Open the Activity tab. Descriptions show a skeleton, then the formatted text; scroll down and the lower cards fill in. "created", the icon and the link are aligned.

UI screen recording:

This was recorded against a running Collate Docker stack (collate_server 2.0.0-SNAPSHOT, MySQL, Elasticsearch), with real server data and no route mocks. The UI is this branch's code, served by the Collate dev server (collate-ui, Vite) through the submodule. AI mode and its dark theme are Collate surfaces. The profile code shown has not changed since it was recorded. An on-page caption shows each step and the live URL.

User profile /users/admin (AI mode, light → dark via user menu → Appearance → Dark, then every tab):

Screen-Recording.59.mp4

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: N/A.
  • For a UI feature or feature task: N/A (bug fix). A recording is included above.
  • I have added tests (unit / integration / Playwright as applicable) and listed them above.
  • Self-review: I reviewed the final diff against REVIEW.md and fixed every 🔴 finding.
  • Decision check: no durable decision. This is a styling fix that follows the existing token rules.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

The changes appear safe to merge; no blocking issue remains from this review.

Summary

The PR updates user-profile cards to use theme-aware styles and defers rich-text previews until feed cards approach the viewport. It also updates footer buttons, icons, accessible names, and related tests.

  • User profile cards stay readable when the dark theme is on.
  • Activity feed descriptions load as cards approach the screen.
  • Feed reply and reaction buttons line up and follow the theme.

Reviews (34) · Last reviewed commit: "test(ui): drive the feed footer tests th..." · Reviewed by Greptile

@sweta1308
sweta1308 requested a review from a team as a code owner October 21, 2026 11:37
@sweta1308
sweta1308 requested a review from anuj-kumary October 21, 2026 11:37
@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR checks passed

The linked issue has a description and all required Shipping project fields set. Thanks!

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

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 79%
79.69% (130718/164033) 66.23% (46096/69590) 69.14% (26142/37808)

…n link buttons, move the Studio fallback rule to scope utils
@sweta1308
sweta1308 added this pull request to the merge queue Oct 25, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🚦 Removed from the merge queue — failed_checks (2026-10-25T17:56:19Z)

Blocked the queue: playwright-summary

  • Postgresql PR Playwright E2E Tests — playwright-summary, playwright / playwright-ci (global-state-01), playwright / playwright-ci (chromium-09), playwright / playwright-ci (chromium-02), playwright / playwright-ci (chromium-08), playwright / playwright-ci (chromium-05), playwright / playwright-ci (chromium-03)

Failed Playwright tests:

  • Features/ActivityFeed.spec.ts › A change-event activity exposes its reply editor
  • Features/ActivityFeed.spec.ts › Activity is NOT fetched on the Tasks tab
  • Features/ActivityFeed.spec.ts › All badge, header and rendered list agree on the count
  • Features/ActivityFeed.spec.ts › All tab shows BOTH the change-event activity and the conversation
  • Features/ActivityFeed.spec.ts › Auto-selects the first (newest) item on load
  • Features/ActivityFeed.spec.ts › Reacting to an activity updates its reactions in the right panel
  • Features/ActivityFeed.spec.ts › Replying to a conversation stays isolated to that thread
  • Features/ContextCenterArticles.spec.ts › Quick link lifecycle validates, creates, edits, and deletes from card
  • Features/ContextCenterArticles.spec.ts › Related assets, activity feed, user mentions, and article mentions work
  • Features/SampleDataDomainDataProduct.spec.ts › Verify TestDataProduct exists under TestDomain
  • Features/SampleDataDomainDataProduct.spec.ts › Verify TestDataProduct shows correct details and domain association
  • Features/SampleDataDomainDataProduct.spec.ts › Verify TestDomain exists from sample data ingestion
  • Pages/Lineage/LineageFilters.spec.ts › Verify Impact Analysis service filter selection
  • Pages/Lineage/LineageFilters.spec.ts › Verify Impact Analysis service type filter selection
  • Pages/Lineage/LineageFilters.spec.ts › Verify lineage service filter selection

@gitar-bot

gitar-bot Bot commented Oct 26, 2026

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

🟡 Medium risk · Deferring rich-text feed editors until cards approach the viewport changes rendering timing and could leave descriptions unavailable if visibility detection fails.

Fixes the user profile page in AI mode dark theme by moving profile cards to Tailwind tokens and core components, and defers activity feed description rendering until cards near the viewport with a skeleton placeholder. Resolved this session: the feed preview min-height no longer pads short messages, text-less messages keep the skeleton with the preview hidden, the reply button no longer overrides core Button styles with !important, ButtonUtility onPress calls now type-check, and feed preview skeleton readiness logic is covered by tests. No open issues found.

✅ 5 closed
✅ Edge Case: 3em min-height stays after mount and pads short feed messages

📄 openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCard/FeedCardBody/FeedCardBodyNew.tsx:35-39
DeferredWidget puts minHeight on its wrapper div on every render, not only while the placeholder is showing (DeferredWidget.component.tsx:166-169). With minHeight="3em", every one-line feed message, which used to be about 1.5em tall, now always takes at least 3em. That adds empty space below short posts in both themes, which goes against this PR's promise that light mode looks the same. One fix is to give the placeholder its own height (placeholder={<div style={{ minHeight: '3em' }} />}) and leave minHeight off, so the space is held only until the preview mounts. Note that DeferredWidget needs the wrapper to have some height so the observer can fire, so the placeholder has to keep that height.

✅ Edge Case: Text-less feed messages keep the skeleton and the preview stays hidden

📄 openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCard/FeedCardBody/FeedCardBodyNew.tsx:79-83 📄 openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCard/FeedCardBody/FeedCardBodyNew.tsx:97-99
FeedMessagePreviewContent only shows the previewer once container.textContent?.trim() is non-empty (lines 79-83). A message can render real content with no text: an image-only post (![](url)), a horizontal rule, or an embed or table with empty cells. RichTextEditorPreviewerNew handles empty markdown by rendering 'No description', but for these messages it renders non-text nodes. So isRendered never becomes true, the content stays inside tw:hidden, and the card shows the loading skeleton forever. Base the readiness check on rendered content rather than text alone, e.g. container.textContent?.trim() || container.querySelector('img, hr, table, iframe, video'). Another option is to have the previewer signal when it has mounted.

✅ Quality: Reply button overrides core Button padding/radius with !important

📄 openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/TaskFeedCard/TaskFeedCardFromTask.component.tsx:364-372
The new reply Button sets className="tw:size-6 tw:rounded-md! tw:p-1!". That forces padding and radius on a core component with !important. This goes against the Accepted ADR:2026-10-11-migrated-antd-components-adopt-core-styling, which says call sites must not set padding, border or radius on core components ("use the component's props … a visual gap the core API cannot express is fixed in the core component"). It also breaks the styling rule against specificity fights (tw:…!). Earlier commits in this PR add the same override in Reactions.tsx, FeedCardFooterNew.tsx and ActivityEventFooter.tsx. If the core Button's sizing changes, these overrides can break without anyone noticing. Fix: add an icon-only xs (24px) variant or size to the core Button and use it in all four places. If you need to keep the override, add a record that supersedes the ADR.

✅ Bug: ButtonUtility props don't declare onPress, so these calls fail tsc

📄 openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCardV2/FeedCardFooter/FeedCardFooterNew.tsx:111-122 📄 openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCardV2/FeedCardFooter/FeedCardFooterNew.tsx:130-137 📄 openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCardV2/FeedCardFooter/ActivityEventFooter.tsx:68-75 📄 openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/TaskFeedCard/TaskFeedCardFromTask.component.tsx:365-372
ButtonUtility's Props is ButtonProps | LinkProps, built on DetailedHTMLProps<ButtonHTMLAttributes> / AnchorHTMLAttributes (core button-utility.tsx:89-113). Neither type declares onPress, and every other ButtonUtility call in the app uses onClick. The four new call sites pass onPress, so TypeScript's excess-property check on JSX should fail the type-check/CI build. It still works at runtime only because the props get spread onto the react-aria Button. In FeedCardFooterNew, handleRepliesPress also needs a PressEvent (it calls event.continuePropagation()), and onClick doesn't supply one.

Fix: switch these to onClick. Mouse clicks bubble to the card container by default, so you can delete handleRepliesPress's continuePropagation call and its PressEvent type. The other option is to add onPress to the core ButtonUtility props, but that touches the core library, which the PR description says is out of scope.

✅ Quality: No tests for the feed preview skeleton readiness logic

📄 openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCard/FeedCardBody/FeedCardBodyNew.tsx:71-85 📄 openmetadata-ui/src/main/resources/ui/src/constants/Feeds.constants.ts:99-101
FeedMessagePreviewContent keeps the skeleton up and the previewer hidden (tw:hidden) until a MutationObserver finds text or a node matching FEED_MESSAGE_RENDERED_CONTENT_SELECTOR. If that check goes wrong, the description stays as a skeleton forever, and nothing would catch it: FeedCardBody/ has no test file. That covers the text case, the image-only case (no text but an img/hr), and the swap from skeleton to content. Please add a FeedCardBodyNew.test.tsx that mocks RichTextEditorPreviewNew to render text, render only an <img>, and start empty then fill in later. Each case should assert that feed-message-skeleton goes away and the preview becomes visible.

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

@sonarqubecloud

Copy link
Copy Markdown

@sweta1308
sweta1308 added this pull request to the merge queue Oct 26, 2026
Merged via the queue into main with commit 99f8eb4 Oct 26, 2026
86 checks passed
@sweta1308
sweta1308 deleted the fix/ui-review-p1-dark-profile-ontology-default branch October 26, 2026 08:31
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.

User profile page unreadable in AI mode dark theme; activity feed slow to render

3 participants