Skip to content

refactor(ui): converge app/entity, app/entityV2 and alchemy-components with SaaS - #19862

Merged
v-tarasevich-blitz-brain merged 11 commits into
masterfrom
vt--oss-saas-consolidation
Sep 22, 2026
Merged

v-tarasevich-blitz-brain merged 11 commits into
masterfrom
vt--oss-saas-consolidation

Conversation

@v-tarasevich-blitz-brain

@v-tarasevich-blitz-brain v-tarasevich-blitz-brain commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Reduces divergence between this repository and the DataHub Cloud fork under datahub-web-react, so the scheduled upstream merge conflicts less. Frontend only; no schema, API or backend changes.

45 files, +220/-442 — most of it deletion, because several changes remove duplicated machinery rather than adding anything.

Fixes

  • View builder re-queried entities forever. entities(urns:) returns a null slot for a missing or deleted entity, so the entity never landed in the cache and the effect re-ran the query on every render. ViewDefinitionBuilder now passes the URNs it has already requested, using the three-argument isResolutionRequired that app/entity/view/builder/utils already exposed, and drops a as Entity[] cast that hid the nulls from the compiler.
  • Nested anchors in the user preview. The title block was wrapped in a Link that already contained a second Link around the name.
  • DomainFilter carried its own copy of the search-and-merge machinery every other filtersV2 filter gets from BaseEntityFilter — four hooks and a utils module. Delegating to BaseEntityFilter removes all five files, plus two tests for them; nothing outside that directory imported any of them.
  • The two TermContent copies disagreed: the v2 one marks a term applied by the propagation actor with a thunderbolt, the v1 one did not.
  • EntityHealth now renders its icon for healthy entities as well as unhealthy ones, and passes only health entries that carry a message to the popover.

Shared components gain optional capabilities

All optional, all defaulting to current behaviour, so existing call sites are unaffected:

  • HierarchicalBrowseTreeRow takes multilineLabel; TreeSectionHeader takes count and shows it as a pill while collapsed.
  • Alert's action accepts a ReactNode as well as { label, onClick }, via a type guard, so a caller can supply a custom element.
  • PreviewImage, getParentContainerNames and shouldShowVerificationPrompt are exported; HTML_EXTENSIONS and setPageAttributes are unexported, having no callers outside their modules.

Styling

  • Eleven app/entity files take colours from the theme instead of ANTD_GRAY, REDESIGN_COLORS or literal hex — so they follow dark mode. ANTD_GRAY[7] -> textTertiary, [4]/[5] -> border, [1] -> bg, #373d44 -> text, #5e666e -> textSecondary, #7532a4 -> iconBrand, #f9f0ff -> bgSurfaceBrand, #8338b8 -> borderBrand, #262626 -> bgTooltip.
  • Twelve files take Tooltip/Popover from @components rather than antd, which the no-antd-imports rule wants anyway.
  • Two form-info wrappers get text-wrap: wrap so long prompt titles stop overflowing.

Summary by cubic

Reduces divergence between this repository and the DataHub Cloud fork, so the scheduled upstream merge conflicts less. Frontend only; no schema, API, or backend changes — most of the ~45-file diff is deletion.

Bug Fixes

  • ViewDefinitionBuilder now remembers the URNs it has requested, so a missing entity's null slot no longer makes the query re-run on every render.
  • The user preview no longer nests a Link inside another Link, and shows attribution details only in hover cards.
  • The v1 TermContent now marks terms applied by the propagation actor with a thunderbolt, matching the v2 copy.
  • EntityHealth now shows its icon for healthy entities, and passes only health entries that carry a message to the popover.
  • The __datahub_system actor renders as "Datahub System" instead of its raw username.

Refactors

  • DomainFilter now delegates to BaseEntityFilter, deleting four hooks, a utils module, and their tests.
  • app/entity files take colors from the theme instead of ANTD_GRAY, REDESIGN_COLORS, or literal hex, so they follow dark mode; Tooltip/Popover come from @components instead of antd.
  • HierarchicalBrowseTreeRow takes an optional multilineLabel, TreeSectionHeader takes an optional count pill, and Alert's action accepts a ReactNode — all defaulting to current behavior.
  • PreviewImage, getParentContainerNames, and shouldShowVerificationPrompt are now exported; HTML_EXTENSIONS and setPageAttributes are unexported, matching the fork.
  • Two form-info wrappers get text-wrap: wrap.

Written for commit a4f0924. Summary will update on new commits.

Review in cubic

@github-actions github-actions Bot added the product PR or Issue related to the DataHub UI/UX label Sep 18, 2026
@cursor

cursor Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

PR Summary

Overview
Aligns the open-source datahub-web-react UI with the DataHub Cloud fork: mostly refactors and bug fixes, with a large net deletion from consolidating search filter code.

Bug fixes: ViewDefinitionBuilder tracks URNs already sent to getEntities, so missing/deleted entities no longer trigger an infinite refetch loop. The corp user preview drops nested Links and only shows hover-card propagation when previewType is HOVER_CARD. v1 TermContent shows a thunderbolt for terms applied by the propagation actor. EntityHealth shows the quality icon for healthy entities as well as unhealthy, filters popover rows to entries with a message, and adds a urn-based test id.

Search: DomainFilter is a thin wrapper around BaseEntityFilter with DomainLink labels, removing the local hooks, utils, and tests.

Components & styling: Alert accepts action as either { label, onClick } or a legacy ReactNode. Browse sidebar rows support optional multilineLabel; section headers can show a collapsed child-count pill. Many app/entity surfaces swap hard-coded grays and antd Tooltip/Popover for theme tokens and @components. Form sidebar copy gets text-wrap: wrap. UserEntity labels __datahub_system as “Datahub System”.

API hygiene: Exports added for PreviewImage, getParentContainerNames, and shouldShowVerificationPrompt; HTML_EXTENSIONS and setPageAttributes are module-private.

Reviewed by Cursor Bugbot for commit a4f0924. Bugbot is set up for automated code reviews on this repo. Configure here.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 87cfc8e. Configure here.

<EntityHealthPopover health={health} baseUrl={baseUrl} placement={tooltipPlacement}>
{icon}
<EntityHealthPopover
health={health.filter((h) => h.message)}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Filtered health flips popover summary

Medium Severity

EntityHealth now passes only entries with a message into EntityHealthPopover, but the popover still derives its header icon and healthy/unhealthy label from that same array. A failing assertion or incident without a message is dropped, so the heading can read healthy while the profile icon stays unhealthy.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 87cfc8e. Configure here.

@codecov

codecov Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

Bundle Report

Changes will increase total bundle size by 525 bytes (0.0%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
datahub-react-web-esm 37.34MB 525 bytes (0.0%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: datahub-react-web-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index-*.js 525 bytes 8.9MB 0.01%

Files in assets/index-*.js:

  • ./src/app/entity/view/menu/item/IconItemTitle.tsx → Total Size: 583 bytes

  • ./src/app/entity/shared/containers/profile/header/PlatformContent/DatasetLink.tsx → Total Size: 1.03kB

  • ./src/app/entity/shared/containers/profile/header/PlatformContent/ParentNodesView.tsx → Total Size: 577 bytes

  • ./src/app/entity/shared/containers/profile/sidebar/ProfileSidebarResizer.tsx → Total Size: 1.14kB

  • ./src/alchemy-components/components/Alert/Alert.tsx → Total Size: 3.14kB

  • ./src/app/entity/shared/containers/profile/header/PlatformContent/PlatformContentView.tsx → Total Size: 4.88kB

  • ./src/app/entity/shared/containers/profile/sidebar/Platform/SelectPlatformModal.tsx → Total Size: 4.67kB

  • ./src/app/entity/shared/containers/profile/sidebar/FormInfo/OptionalPromptsRemaining.tsx → Total Size: 470 bytes

  • ./src/app/entity/shared/entityForm/FormSelectionModal/FormItem.tsx → Total Size: 3.12kB

  • ./src/app/entity/dataset/shared/FormattedBytesStat.tsx → Total Size: 501 bytes

  • ./src/app/entity/view/shared/DefaultViewIcon.tsx → Total Size: 609 bytes

  • ./src/app/entity/shared/containers/profile/sidebar/FormInfo/components.ts → Total Size: 1.34kB

  • ./src/app/entity/shared/components/styled/search/action/ActionDropdown.tsx → Total Size: 1.36kB

  • ./src/app/entity/shared/components/styled/InfoItem.tsx → Total Size: 786 bytes

  • ./src/app/entity/shared/components/styled/StatsSummary.tsx → Total Size: 814 bytes

  • ./src/app/entity/shared/entityForm/useShouldShowVerificationPrompt.ts → Total Size: 692 bytes

  • ./src/app/entity/shared/propagation/PropagationDetails.tsx → Total Size: 3.01kB

  • ./src/app/entity/view/builder/ViewDefinitionBuilder.tsx → Total Size: 3.46kB

  • ./src/app/context/import/fileImportUtils.ts → Total Size: 1.25kB

  • ./src/alchemy-components/components/Alert/components.ts → Total Size: 2.19kB

  • ./src/app/entity/view/select/ViewOptionName.tsx → Total Size: 465 bytes

  • ./src/app/entity/shared/components/styled/ExpandedOwner/OwnerContent.tsx → Total Size: 3.83kB

  • ./src/app/entity/shared/tabs/Dataset/Governance/TestResultsList.tsx → Total Size: 3.6kB

  • ./src/app/entityV2/user/User.tsx → Total Size: 1.85kB

  • ./src/app/entityV2/user/preview/Preview.tsx → Total Size: 2.24kB

  • ./src/app/entity/shared/containers/profile/header/PlatformContent/ContainerLink.tsx → Total Size: 1.0kB

@alwaysmeticulous

alwaysmeticulous Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

🔴 Meticulous spotted visual differences in 21 of 1066 screens tested: view and approve differences detected.

Meticulous evaluated ~19 hours of user flows which tested 1679/1735 of the executable lines edited in your PR1.

1. These 56 untested lines will likely automatically gain test coverage over the coming days, however if you wish to increase coverage immediately you can do so by interacting with your feature on localhost.

Last updated for commit 87cfc8e refactor(ui): reorder two options in the useGetUserGroupUrns query call. This comment will update as new commits are pushed.

@github-actions

github-actions Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Initial JS bundle size ➡️

Gzipped
Base (19cbaba) 3.71 MB
This PR 3.71 MB
Diff +0 KB (+0.0%)

Eager entry chunks (dist/assets/index-*.js) only. Codecov reports total bundle including lazy chunks — these intentionally differ.

@codecov

codecov Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 83.87097% with 5 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
.../containers/profile/sidebar/FormInfo/components.ts 60.00% 2 Missing ⚠️
...react/src/app/entityV2/user/useGetUserGroupUrns.ts 0.00% 1 Missing ⚠️
...idebar/HierarchicalBrowseSidebar/treeRow.styles.ts 95.23% 1 Missing ⚠️
datahub-web-react/src/otel.ts 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@maggiehays maggiehays added the needs-review Label for PRs that need review from a maintainer. label Sep 18, 2026
… counts

Widens three shared HierarchicalBrowseSidebar files so they carry the options the
Cloud fork already needs, and stop diverging from it:

- HierarchicalBrowseTreeRow: optional `multilineLabel` lets a row label wrap onto
  several lines instead of truncating with an ellipsis.
- treeRow.styles: `$multilineLabel` / `$multiline` handling on TreeRowContainer,
  TreeRowExpandZone, TreeRowLeftContent and TreeRowTitle, with the row padding
  factored into a `treeRowPadding` helper.
- TreeSectionHeader: optional `count` renders a Pill with the direct child count
  while the section is collapsed.

Every new prop is optional and defaults to the current behaviour, so existing call
sites (Glossary, Domains, Documents, Metrics, Marketplace) render unchanged.
…nClick }

`Alert`'s `action` accepted the structured `{ label, onClick }` shape only, so a call
site needing a custom element had nowhere to put it.

- `action` now takes `AlertAction | React.ReactNode`. A new `isAlertAction` type guard
  keeps the structured shape rendering as a variant-coloured text button; anything else
  is rendered as given.
- `AlertContainer` gains a 4px gap so a header row and body no longer sit flush.

The structured shape is still the one to prefer and its behaviour is unchanged, so
existing call sites are unaffected.
Six files still imported `Tooltip`/`Popover` straight from antd, which the
`no-antd-imports` rule rejects for anything but pre-existing call sites. Point them at
the alchemy components instead; both are re-exported from `@components`.
Export `PreviewImage` and `getParentContainerNames` from `PlatformContentView`, and
`shouldShowVerificationPrompt` from its own module. Exposing a symbol brings no
behaviour with it; it only removes the reason to keep a second copy of the file.
Eight files still picked colors from `ANTD_GRAY`, `REDESIGN_COLORS` or a literal hex,
so they did not follow the theme — dark mode in particular. Point them at the semantic
tokens instead:

- `ANTD_GRAY[7]` → `textTertiary`, `ANTD_GRAY[4]` → `border`
- `#373d44` → `text`, `#5e666e` / `ANTD_GRAY_V2[8]` → `textSecondary`
- `#7532a4` → `iconBrand`, `#f9f0ff` → `bgSurfaceBrand`, `#8338b8` → `borderBrand`

`ParentNodesView` also takes `Tooltip` from `@components` rather than antd, and the two
form-info wrappers get `text-wrap: wrap` so long prompt titles no longer overflow.
…healthy state

- `ViewDefinitionBuilder` now passes the URNs it has already requested to
  `isResolutionRequired`. A URN that comes back as a null slot never lands in the cache,
  so without this the effect re-ran the query on every render. Uses the three-argument
  form already present in `app/entity/view/builder/utils`, and drops a hand-cast of the
  query result.
- `EntityHealth` renders its icon when an entity is healthy as well as unhealthy, passes
  only health entries that carry a message to the popover, and tags the icon with a
  `data-testid` derived from the entity urn.
`DomainFilter` carried its own copy of the search-and-merge machinery every other
filtersV2 filter gets from `BaseEntityFilter`: four hooks plus a utils module to fetch
domains from aggregations and suggestions, merge them and map them to options.

Delegate to `BaseEntityFilter` and render each option with the shared `DomainLink`,
then delete what nobody needs any more:

- hooks/useDomainsFromAggregations.ts (+ test)
- hooks/useDomainsFromSuggestions.ts
- hooks/useMergedDomains.ts
- hooks/useOptionsFromDomains.ts (+ test)
- utils.ts

Nothing outside this directory imported any of them.
…e ANTD_GRAY

Same treatment as the earlier app/entity pass, for six files the first sweep missed:

- `Tooltip`/`Popover` now come from `@components` rather than antd in `OwnerContent`,
  `ActionDropdown`, `SelectPlatformModal`, `TestResultsList` and `EntityHealthPopover`.
- `DatasetLink` and `EntityHealthPopover` take their colours from the theme —
  `ANTD_GRAY[7]` → `textTertiary`, `ANTD_GRAY[1]` → `bg`, `ANTD_GRAY[5]` → `border`,
  and the popover's hardcoded `#262626` → `bgTooltip`.
- `EntityHealthPopover` also tags its content so tests can address it.
… user preview

- `app/shared/tags/term/TermContent` marks a term applied by the propagation actor with
  a thunderbolt, the way `app/sharedV2/tags/term/TermContent` already does. The two
  copies rendered the same association differently.
- The user preview wrapped its whole title block in a `Link` that already contained a
  second `Link` around the name — nested anchors. The outer one is gone.
- The preview now takes `previewType` and renders attribution details only in a hover
  card, where there is room for them; `UserEntity.renderPreview` passes the type through
  instead of discarding it.
- `UserEntity.displayName` labels the `__datahub_system` actor, next to the existing
  `__ingestion` case.
`HTML_EXTENSIONS` in the document-import helpers and `setPageAttributes` in `otel.ts`
are used only by the modules that declare them.
`skip` before `fetchPolicy`, so the hook reads the same way as its siblings. No
behaviour change.
@github-actions

Copy link
Copy Markdown
Contributor

i18n locale parity

Status: ⚠️ drift detected (warn-only) — 239 issue(s) across 13 locale(s)

Locale Missing keys Stale keys Placeholder Files
de 215 10 0 18
es 215 10 0 18
fi 245 12 0 19
fr 228 10 0 19
hu 229 10 0 19
it 228 10 0 19
ja 79 12 0 10
nb 228 10 0 19
pt-BR 229 10 0 19
ru 70 15 0 15
sv 228 10 0 19
zh-CN 69 10 0 13
zh-TW 69 14 0 14

Per-key detail is in the job summary of the datahub-web-react-lint run, or reproduce locally:

./gradlew :datahub-web-react:yarnI18nParityCheck        # all locales
cd datahub-web-react && yarn check-i18n-parity --lang de  # one locale

@maggiehays maggiehays added pending-submitter-merge and removed needs-review Label for PRs that need review from a maintainer. labels Sep 21, 2026
@v-tarasevich-blitz-brain
v-tarasevich-blitz-brain merged commit 2bdc4dc into master Sep 22, 2026
73 of 75 checks passed
@v-tarasevich-blitz-brain
v-tarasevich-blitz-brain deleted the vt--oss-saas-consolidation branch September 22, 2026 11:10

This branch was successfully deployed

3 active (1 outdated) deployments
Preview — a4f09245 Deployed Sep 21, 2026 by vercel[bot]
datahub-project-web-react — a4f09245 Deployed Sep 21, 2026 by github-actions[bot]
datahub-project-web-react (Preview) — 87cfc8eb Deployed Sep 18, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pending-submitter-merge product PR or Issue related to the DataHub UI/UX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants