Skip to content

Backport ActivityFeed and Announcement lazy-loading updates to 1.13#30128

Open
shah-harshit wants to merge 1 commit into
ui/backport-group9-dataquality-incident-lazy-1.13from
ui/backport-group10-activityfeed-announcement-lazy-1.13
Open

Backport ActivityFeed and Announcement lazy-loading updates to 1.13#30128
shah-harshit wants to merge 1 commit into
ui/backport-group9-dataquality-incident-lazy-1.13from
ui/backport-group10-activityfeed-announcement-lazy-1.13

Conversation

@shah-harshit

@shah-harshit shah-harshit commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Stack

Testing

  • Scoped UI checkstyle sequence on changed source files: organize-imports-cli, ESLint --fix, Prettier.
  • git diff --check HEAD~1..HEAD

Greptile Summary

This PR backports lazy-loading utility changes for activity feeds and announcements. The main changes are:

  • Moves pure feed helpers from FeedUtils to FeedUtilsPure imports.
  • Updates activity-feed and announcement components for the new module split.
  • Adjusts related Jest mocks and pure utility imports.

Confidence Score: 4/5

The UI build is blocked by unresolved component imports and removed compatibility exports.

  • Three changed components still reference names removed from their import lists.
  • Several unchanged consumers still depend on the deleted FeedUtils re-exports.
  • The inspected block-editor pure utility migrations have compatible exports.

AnnouncementFeedCardBody.component.tsx, AnnouncementsWidget.tsx, NotificationFeedCard.component.tsx, and FeedUtils.tsx

Important Files Changed

Filename Overview
openmetadata-ui/src/main/resources/ui/src/components/Announcement/AnnouncementFeedCardBody.component.tsx Removes imports for names that remain referenced throughout the announcement card.
openmetadata-ui/src/main/resources/ui/src/components/MyData/RightSidebar/AnnouncementsWidget.tsx Removes two feed-card imports while retaining their JSX elements.
openmetadata-ui/src/main/resources/ui/src/components/NotificationBox/NotificationFeedCard.component.tsx Moves pure feed helpers but also removes two notification helpers that remain in use.
openmetadata-ui/src/main/resources/ui/src/utils/FeedUtils.tsx Removes compatibility exports while unchanged consumers still import them.
openmetadata-ui/src/main/resources/ui/src/utils/BlockEditorUtils.ts Moves editor lookup helpers to compatible exports in FeedUtilsPure.
openmetadata-ui/src/main/resources/ui/src/pages/TasksPage/shared/DescriptionTabs.tsx Moves the description-empty check to its compatible pure utility module.

Comments Outside Diff (1)

  1. openmetadata-ui/src/main/resources/ui/src/utils/FeedUtils.tsx, line 40-63 (link)

    P1 Compatibility Exports Removed Too Early

    Several unchanged source files still import pure helpers through FeedUtils, including task cards, announcement drawers, data-quality utilities, notification components, and legacy feed bodies. Removing this re-export block makes those named imports invalid and causes the application build to fail; migrate every remaining consumer in this backport or retain the compatibility exports.

    Context Used: CLAUDE.md (source)

Reviews (1): Last reviewed commit: "feat(ui): update ActivityFeed & Announce..." | Re-trigger Greptile

Greptile also left 3 inline comments on this PR.

Context used:

  • Context used - CLAUDE.md (source)
  • Context used - openmetadata-ui-core-components/CLAUDE.md (source)

… utility pattern (#29062)

* feat(ui): update ActivityFeed & Announcement components for lazy-load utility pattern

Updates ActivityFeed components to import from extracted pure utility modules. Updates FeedUtils, TasksUtils imports to use new utility structure. Updates TasksPage and tasksAPI for consistent utility usage.

Ref: open-metadata/openmetadata-collate#4230

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix imports

* address gitar-bot comments

* fix checkstyle

* fix failing tests

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
@shah-harshit
shah-harshit requested a review from a team as a code owner July 16, 2026 09:31
@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 Jul 16, 2026
@shah-harshit shah-harshit self-assigned this Jul 16, 2026
import PopoverContent from '../ActivityFeed/ActivityFeedCard/PopoverContent';
import UserPopOverCard from '../common/PopOverCard/UserPopOverCard';
import ProfilePicture from '../common/ProfilePicture/ProfilePicture';
import { getEntityFQN, getEntityType } from '../../utils/FeedUtilsPure';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Announcement Imports Become Unresolved

The component still references getEntityField, ArrowBottom, feed-card children, reaction types, useApplicationStore, and several other names removed by this hunk. Any build containing this component now fails with unresolved identifiers, so announcement cards cannot load.

Context Used: CLAUDE.md (source)

Comment on lines +22 to 23
import { getEntityFQN } from '../../../utils/FeedUtilsPure';
import ErrorPlaceHolder from '../../common/ErrorWithPlaceholder/ErrorPlaceHolder';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Widget Components Lose Their Imports

The unchanged widget body still renders FeedCardHeaderV2 and FeedCardBodyV1, but this hunk removes both imports. TypeScript therefore cannot compile the MyData announcements widget.

Context Used: CLAUDE.md (source)

import { entityDisplayName, prepareFeedLink } from '../../utils/FeedUtils';
import Fqn from '../../utils/Fqn';
import { getTaskDetailPath } from '../../utils/TasksUtils';
import { entityDisplayName, prepareFeedLink } from '../../utils/FeedUtilsPure';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Notification Helpers Become Unresolved

The component still calls getTaskDetailPath(task) and Fqn.split(...), but this import cleanup removes both names and FeedUtilsPure does not replace them. The file fails compilation, blocking task and approval notification cards.

Context Used: CLAUDE.md (source)

Comment on lines 13 to 25
import { Card, Typography } from 'antd';
import { isEqual } from 'lodash';
import { FC, Fragment } from 'react';
import { useTranslation } from 'react-i18next';
import { useNavigate } from 'react-router-dom';
import {
ANNOUNCEMENT_BG,
ANNOUNCEMENT_BORDER,
GLOBAL_BORDER,
TASK_BORDER,
} from '../../../constants/Feeds.constants';
import {
Post,
Thread,
ThreadTaskStatus,
ThreadType,
} from '../../../generated/entity/feed/thread';
import { getFeedListWithRelativeDays } from '../../../utils/FeedUtils';
import { getTaskDetailPath } from '../../../utils/TasksUtils';
import { OwnerLabel } from '../../common/OwnerLabel/OwnerLabel.component';
import { GLOBAL_BORDER } from '../../../constants/Feeds.constants';
import { Post } from '../../../generated/entity/feed/thread';
import { getFeedListWithRelativeDays } from '../../../utils/FeedUtilsPure';
import ActivityFeedCard from '../ActivityFeedCard/ActivityFeedCard';
import FeedCardFooter from '../ActivityFeedCard/FeedCardFooter/FeedCardFooter';
import ActivityFeedEditor from '../ActivityFeedEditor/ActivityFeedEditor';
import FeedListSeparator from '../FeedListSeparator/FeedListSeparator';
import AnnouncementBadge from '../Shared/AnnouncementBadge';
import TaskBadge from '../Shared/TaskBadge';
import { ActivityThreadListProp } from './ActivityThreadPanel.interface';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚨 Bug: ActivityThreadList.tsx: backport dropped required imports

The import-block rewrite in this commit removed the imports for useTranslation (react-i18next), useNavigate (react-router-dom), the Thread type (generated/entity/feed/thread), and getTaskDetailPath (utils/TasksUtils), yet all four are still referenced in the component body (t at line 36, navigate at line 37, Thread at line 45, getTaskDetailPath at line 46). This leaves undefined identifiers that break TypeScript compilation and would crash the component at runtime. Restore the dropped imports.

Re-add react-i18next, react-router-dom, Thread type, and getTaskDetailPath imports that the merge dropped.:

import { Card, Typography } from 'antd';
import { isEqual } from 'lodash';
import { FC, Fragment } from 'react';
import { useTranslation } from 'react-i18next';
import { useNavigate } from 'react-router-dom';
import { GLOBAL_BORDER } from '../../../constants/Feeds.constants';
import { Post, Thread } from '../../../generated/entity/feed/thread';
import { getFeedListWithRelativeDays } from '../../../utils/FeedUtilsPure';
import { getTaskDetailPath } from '../../../utils/TasksUtils';
  • Apply fix

Check the box to apply the fix or reply for a change | Was this helpful? React with 👍 / 👎

import PopoverContent from '../ActivityFeed/ActivityFeedCard/PopoverContent';
import UserPopOverCard from '../common/PopOverCard/UserPopOverCard';
import ProfilePicture from '../common/ProfilePicture/ProfilePicture';
import { getEntityFQN, getEntityType } from '../../utils/FeedUtilsPure';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚨 Bug: AnnouncementFeedCardBody: backport dropped required imports

The import block was collapsed to only getEntityFQN, getEntityType from FeedUtilsPure, but the component still uses getEntityField (line 40) and useApplicationStore (line 41), plus other symbols (ProfilePicture, UserPopOverCard, PopoverContent, Reaction/ReactionType/ReactionOperation, ThreadType) referenced further down. These identifiers are now undefined, breaking compilation and the component at runtime. Restore all imports removed by the merge — at minimum add getEntityField to the FeedUtilsPure import and re-add useApplicationStore and the remaining dropped imports.

Add getEntityField to the FeedUtilsPure import and restore the remaining imports (useApplicationStore, ProfilePicture, UserPopOverCard, reaction types, thread types, etc.) that the backport merge removed.:

import {
  getEntityField,
  getEntityFQN,
  getEntityType,
} from '../../utils/FeedUtilsPure';
// plus re-add the other imports the merge dropped, e.g.:
// import { useApplicationStore } from '../../hooks/useApplicationStore';
// import ProfilePicture from '../common/ProfilePicture/ProfilePicture';
// import UserPopOverCard from '../common/PopOverCard/UserPopOverCard';
// import { Reaction, ReactionType } from '../../generated/type/reaction';
// import { ReactionOperation } from '../../enums/reactions.enum';
// import { Post, ThreadType } from '../../generated/entity/feed/thread';
  • Apply fix

Check the box to apply the fix or reply for a change | Was this helpful? React with 👍 / 👎

@gitar-bot

gitar-bot Bot commented Jul 16, 2026

Copy link
Copy Markdown
Code Review 🚫 Blocked 0 resolved / 2 findings

Backports ActivityFeed and Announcement lazy-loading utilities but remains blocked due to missing imports in ActivityThreadList.tsx and AnnouncementFeedCardBody, causing broken references throughout both components.

🚨 Bug: ActivityThreadList.tsx: backport dropped required imports

📄 openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityThreadPanel/ActivityThreadList.tsx:13-25 📄 openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityThreadPanel/ActivityThreadList.tsx:36-37 📄 openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityThreadPanel/ActivityThreadList.tsx:45-46

The import-block rewrite in this commit removed the imports for useTranslation (react-i18next), useNavigate (react-router-dom), the Thread type (generated/entity/feed/thread), and getTaskDetailPath (utils/TasksUtils), yet all four are still referenced in the component body (t at line 36, navigate at line 37, Thread at line 45, getTaskDetailPath at line 46). This leaves undefined identifiers that break TypeScript compilation and would crash the component at runtime. Restore the dropped imports.

Re-add react-i18next, react-router-dom, Thread type, and getTaskDetailPath imports that the merge dropped.
import { Card, Typography } from 'antd';
import { isEqual } from 'lodash';
import { FC, Fragment } from 'react';
import { useTranslation } from 'react-i18next';
import { useNavigate } from 'react-router-dom';
import { GLOBAL_BORDER } from '../../../constants/Feeds.constants';
import { Post, Thread } from '../../../generated/entity/feed/thread';
import { getFeedListWithRelativeDays } from '../../../utils/FeedUtilsPure';
import { getTaskDetailPath } from '../../../utils/TasksUtils';
🚨 Bug: AnnouncementFeedCardBody: backport dropped required imports

📄 openmetadata-ui/src/main/resources/ui/src/components/Announcement/AnnouncementFeedCardBody.component.tsx:20 📄 openmetadata-ui/src/main/resources/ui/src/components/Announcement/AnnouncementFeedCardBody.component.tsx:40-41

The import block was collapsed to only getEntityFQN, getEntityType from FeedUtilsPure, but the component still uses getEntityField (line 40) and useApplicationStore (line 41), plus other symbols (ProfilePicture, UserPopOverCard, PopoverContent, Reaction/ReactionType/ReactionOperation, ThreadType) referenced further down. These identifiers are now undefined, breaking compilation and the component at runtime. Restore all imports removed by the merge — at minimum add getEntityField to the FeedUtilsPure import and re-add useApplicationStore and the remaining dropped imports.

Add getEntityField to the FeedUtilsPure import and restore the remaining imports (useApplicationStore, ProfilePicture, UserPopOverCard, reaction types, thread types, etc.) that the backport merge removed.
import {
  getEntityField,
  getEntityFQN,
  getEntityType,
} from '../../utils/FeedUtilsPure';
// plus re-add the other imports the merge dropped, e.g.:
// import { useApplicationStore } from '../../hooks/useApplicationStore';
// import ProfilePicture from '../common/ProfilePicture/ProfilePicture';
// import UserPopOverCard from '../common/PopOverCard/UserPopOverCard';
// import { Reaction, ReactionType } from '../../generated/type/reaction';
// import { ReactionOperation } from '../../enums/reactions.enum';
// import { Post, ThreadType } from '../../generated/entity/feed/thread';
🤖 Prompt for agents
Code Review: Backports ActivityFeed and Announcement lazy-loading utilities but remains blocked due to missing imports in ActivityThreadList.tsx and AnnouncementFeedCardBody, causing broken references throughout both components.

1. 🚨 Bug: ActivityThreadList.tsx: backport dropped required imports
   Files: openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityThreadPanel/ActivityThreadList.tsx:13-25, openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityThreadPanel/ActivityThreadList.tsx:36-37, openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityThreadPanel/ActivityThreadList.tsx:45-46

   The import-block rewrite in this commit removed the imports for `useTranslation` (react-i18next), `useNavigate` (react-router-dom), the `Thread` type (generated/entity/feed/thread), and `getTaskDetailPath` (utils/TasksUtils), yet all four are still referenced in the component body (t at line 36, navigate at line 37, Thread at line 45, getTaskDetailPath at line 46). This leaves undefined identifiers that break TypeScript compilation and would crash the component at runtime. Restore the dropped imports.

   Fix (Re-add react-i18next, react-router-dom, Thread type, and getTaskDetailPath imports that the merge dropped.):
   import { Card, Typography } from 'antd';
   import { isEqual } from 'lodash';
   import { FC, Fragment } from 'react';
   import { useTranslation } from 'react-i18next';
   import { useNavigate } from 'react-router-dom';
   import { GLOBAL_BORDER } from '../../../constants/Feeds.constants';
   import { Post, Thread } from '../../../generated/entity/feed/thread';
   import { getFeedListWithRelativeDays } from '../../../utils/FeedUtilsPure';
   import { getTaskDetailPath } from '../../../utils/TasksUtils';

2. 🚨 Bug: AnnouncementFeedCardBody: backport dropped required imports
   Files: openmetadata-ui/src/main/resources/ui/src/components/Announcement/AnnouncementFeedCardBody.component.tsx:20, openmetadata-ui/src/main/resources/ui/src/components/Announcement/AnnouncementFeedCardBody.component.tsx:40-41

   The import block was collapsed to only `getEntityFQN, getEntityType` from FeedUtilsPure, but the component still uses `getEntityField` (line 40) and `useApplicationStore` (line 41), plus other symbols (ProfilePicture, UserPopOverCard, PopoverContent, Reaction/ReactionType/ReactionOperation, ThreadType) referenced further down. These identifiers are now undefined, breaking compilation and the component at runtime. Restore all imports removed by the merge — at minimum add `getEntityField` to the FeedUtilsPure import and re-add `useApplicationStore` and the remaining dropped imports.

   Fix (Add getEntityField to the FeedUtilsPure import and restore the remaining imports (useApplicationStore, ProfilePicture, UserPopOverCard, reaction types, thread types, etc.) that the backport merge removed.):
   import {
     getEntityField,
     getEntityFQN,
     getEntityType,
   } from '../../utils/FeedUtilsPure';
   // plus re-add the other imports the merge dropped, e.g.:
   // import { useApplicationStore } from '../../hooks/useApplicationStore';
   // import ProfilePicture from '../common/ProfilePicture/ProfilePicture';
   // import UserPopOverCard from '../common/PopOverCard/UserPopOverCard';
   // import { Reaction, ReactionType } from '../../generated/type/reaction';
   // import { ReactionOperation } from '../../enums/reactions.enum';
   // import { Post, ThreadType } from '../../generated/entity/feed/thread';

Options

Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@github-actions

Copy link
Copy Markdown
Contributor

The Python checkstyle failed.

Please run make py_format and py_format_check in the root of your repository and commit the changes to this PR.
You can also use pre-commit to automate the Python code formatting.

You can install the pre-commit hooks with make install_test precommit_install.

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