Skip to content

Remove dead activity feed CSS and TypeScript (collate#9237, collate#9238) - #39670

Merged
harsh-vador merged 2 commits into
mainfrom
chore/feed-dead-ts
Dec 4, 2026
Merged

harsh-vador merged 2 commits into
mainfrom
chore/feed-dead-ts

Conversation

@harsh-vador

@harsh-vador harsh-vador commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Describe your changes:

Fixes https://github.com/open-metadata/openmetadata-collate/issues/9237
Fixes https://github.com/open-metadata/openmetadata-collate/issues/9238

Removes dead code from the activity feed: CSS that never applies, and TypeScript that nothing uses. It is the first step of the activity feed cleanup. Both parts are pure deletion, nothing users see changes, and each is its own commit. It replaces #39665, which held the CSS part.

Dead CSS (collate#9237)

Removes about 4,200 lines of activity feed CSS that never apply to anything rendered. Nothing users see changes.

  • FeedEditor/quill-emoji.css: removes the 1,302 emoji sprite-position rules (.ap-*), plus the commented-out .ap rule that used to load the sprite image.

    • The emoji plugin inserts the unicode character itself.
    • Its picker items render as span.bem.bem-<name>.ap, so no ap-* class ever reaches the DOM.
  • FeedEditor/feed-editor.less: removes 54 rules for toolbar controls the feed editor never renders:

    • the header, font, size, colour and align pickers;
    • the image file input;
    • the video and formula tooltips.

    TOOLBAR_ITEMS contains none of these, and this is the only Quill editor in OpenMetadata or Collate. Rules that also select live elements are kept.

  • ActivityFeedTab/activity-feed-tab.less: removes 10 selectors that no component uses, and the unused .feed-widget-container part of a selector it shares with .widget-wrapper-container.

    • The 10 selectors: .feed-explore-heading, .activity-feed-reply-button, .activity-feed-card-message-right-panel, .activity-feed-reply-card-message, .activity-feed-comment-text, .activity-feed-reply-card-footer, .close-tab-icon, .reply-message, .owner-team-icon and .feed-filter-icon.
  • feeds-widget.less: deleted, along with its import in ActivityFeedTab. Neither of its classes is used.

  • .feed-widget-padding: removed. It was only applied when isForFeedTab is true, and the one caller of ActivityFeedListV1New passes false.

"Unused" was checked against both this repo and openmetadata-collate, including class names built from template strings.

Not in this PR: 68 rules in feed-editor.less repeat quill.snow.css exactly. They are probably safe to remove, but they need their own visual check.

Dead TypeScript (collate#9238)

Removes activity feed TypeScript that nothing uses: components no one renders, code paths no caller reaches, helpers no one calls, and props no one reads. This is 1,432 production lines plus 637 lines of tests and mocks that covered only that code. Nothing users see changes.

"Unused" was checked against both this repo and openmetadata-collate.

Components no one renders

  • MyData/Widgets/AnnouncementsWidgetV1/ and ActivityFeed/FeedListSeparator/. Only their own tests imported them.
  • ActivityFeedList/ActivityFeedList.interface.ts, which held only FeedListSeparatorProp.

The post and widget modes of the feed card

ActivityFeedCardNew had three modes that no caller turns on: every caller passes isPost={false} or nothing, and isFeedWidget and isFullSizeWidget are only passed down, never set. This removes:

  • renderWidgetCard;
  • the post/reply branches in the card, FeedCardBodyNew and FeedCardFooterNew (the footer's only caller never passed reply or isReply);
  • the widget branch in ActivityFeedListV1New's auto-select effect.

Helpers no one calls

  • From FeedUtilsPure: getReplyText, getTestCaseNameListForResult and formatTestStatusData.
  • getEntityFieldDisplay.
  • getFeedCardClassName.
  • getEntityActivityById and getActivityCount.
  • TaskOperation and four unused colour constants.

isEntityReferenceAbout stays, but is no longer exported. getEntityTypeFromAbout and getEntityFQNFromAbout use it, and Collate uses those two.

ActivityFeedProvider values no one reads

  • focusReplyEditor, together with updateEditorFocus, whose only job was to set it;
  • updateEntityThread;
  • fetchActivityEvents, fetchMyActivityFeed and fetchFollowingActivity, together with runActivityRequest, the request guard that only those three used.

fetchEntityActivity and fetchUserActivity never used that guard. That is #39653, which will add it to them in its own PR.

Props passed but never read

  • refetchFeed and entityFeedTotalCount, passed at 23 call sites.
  • The FeedPanelBodyV1 props neither panel body reads: FeedContainerClassName, hidePopover, onAfterClose, onUpdateEntityDetails, handlePanelResize, isFullWidth, hideCardBorder and the two widget flags.
  • ActivityFeedListV1New stops taking the props it only passed down. componentsVisibility goes too, because the list never read it.
  • ActivityThreadPanel.initialView and ActivityThreadPanelBody.showHeader, which no caller sets.
feed-dead-css-evidence feed-dead-ts-evidence

Type of change:

  • Improvement

High-level design:

N/A. This only deletes code, in two commits that can be reviewed separately:

  • chore(ui): remove activity feed CSS that never applies: 8 files, 4,238 lines removed.
  • chore(ui): remove unused activity feed components, props and helpers: 62 files, 2,069 lines removed.

Tests:

Use cases covered

  • Classic mode: the feed tab, an open thread, the reply editor, the emoji picker, and inserting an emoji.
  • AI mode: an asset's Activity tab and the Inbox.

How it was verified

  • I ran a Vite dev server from this branch against a local backend and captured those 7 states. I compared them with a capture of origin/main that used the same data and viewport.
    • Comparing 23 computed properties on every rendered element (about 5,300 snapshots) gives no differences except one.
    • That one: the timestamp text had changed between the two runs ("N minutes ago" became "2 hours ago"), so the timestamp and its two containers are 8px wider.
    • One element lists the same classes in a different order, with identical styles.
  • CSS. On main the page loads 1,299 .ap-* rules, plus 109 .ql-picker rules and each of the removed selectors. With the change it loads 0, 59 (the rules from quill.snow.css itself) and 0 respectively. This shows the comparison really ran against both versions of the CSS.
  • tsc: no errors in the changed files. The 38 errors left on main are all in unrelated test files.

Unit tests

  • On the combined branch, 34 Jest suites and 328 tests pass: everything under components/ActivityFeed, plus rest/activityAPI, utils/FeedUtils* and CustomizeMyData.
  • Tests moved to live code. Four ActivityFeedProvider tests used a removed fetcher and now run against the live fetchEntityActivity, with the same assertions:
    • loading;
    • error toast;
    • no conversation request;
    • reaction sync.
  • Tests deleted. These covered only the removed code:
    • the following-feed test and two domain checks for the removed fetchers;
    • the superseded-response test for the removed guard;
    • the footer's reply-mode test;
    • the widget auto-select test;
    • the getEntityActivityById test;
    • the getActivityCount part of the entity-link test.
  • ESLint (0 errors), Prettier and organize-imports pass on the changed files and leave no diff. tw-audit passes.

Screenshots

UI screen recording:

Not applicable: this PR only removes code that never ran, so there is no behaviour to record. The before/after comparison is under Screenshots above.

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>. The issue is in openmetadata-collate, so the title names it instead.
  • My PR is linked to a GitHub issue via Fixes above (cross-repo).
  • I have commented on my code, particularly in hard-to-understand areas. No code needed comments.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed. Not applicable.
  • For a UI feature or feature task: as part of PR creation, I ran the PR build in Docker with sample data and embedded a verified GitHub-hosted recording plus build/health evidence above (or explained why this requirement is not applicable). Not applicable, explained above.
  • I have added tests (unit / integration / Playwright as applicable) and listed them above. The changed tests are listed above. No new tests are needed, because nothing users see changes.
  • Self-review: I reviewed the final diff against REVIEW.md and fixed every 🔴 finding, or answered it on the line below. "Collate builds against OpenMetadata main": every removed export, prop and context value was checked against openmetadata-collate main, and none is used there. The two helpers Collate imports stay.
  • Decision check: if this PR decides something the next contributor could undo, it adds a record under docs/decisions/. Not applicable.

🤖 Generated with Claude Code

@harsh-vador
harsh-vador requested a review from a team as a code owner December 3, 2026 10:23
@harsh-vador
harsh-vador requested review from shrabantipaul-collate and removed request for a team December 3, 2026 10:23
@harsh-vador harsh-vador added the UI UI specific issues label Dec 3, 2026
@github-actions

github-actions Bot commented Dec 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.

@harsh-vador harsh-vador changed the title Remove unused activity feed components, props and helpers (collate#9238) Remove dead activity feed CSS and TypeScript (collate#9237, collate#9238) Dec 3, 2026
@harsh-vador
harsh-vador added this pull request to stack #39734 December 4, 2026 05:23
- Delete AnnouncementsWidgetV1 and FeedListSeparator (only their own tests
  imported them) and the interface file that only served FeedListSeparator.
- Remove the isPost, isFeedWidget and isFullSizeWidget paths: every caller
  passed isPost={false} or nothing, and the widget flags were never set.
  This drops renderWidgetCard and the post/reply branches in the card,
  body and footer (FeedCardFooterNew's only caller never passed a reply).
- Remove helpers, REST functions and constants with no caller in
  OpenMetadata or Collate. isEntityReferenceAbout stays as a module-private
  helper of getEntityTypeFromAbout/getEntityFQNFromAbout, which Collate uses.
- Remove ActivityFeedProvider values nobody reads: focusReplyEditor,
  updateEditorFocus, updateEntityThread, fetchActivityEvents,
  fetchMyActivityFeed and fetchFollowingActivity, with the request runner
  only those three fetchers used.
- Stop passing props that are never read: refetchFeed and
  entityFeedTotalCount (23 callers), the panel body props neither panel
  reads, the list's pass-through props and componentsVisibility, and
  ActivityThreadPanel's initialView and showHeader.
- quill-emoji.css: drop the 1,302 emoji sprite-position rules and the
  commented-out sprite rule they depended on. The emoji plugin inserts the
  unicode character and its items carry no ap-* class.
- feed-editor.less: drop 54 toolbar rules for pickers and tooltips the feed
  editor's toolbar never renders (header/font/size/colour/align pickers,
  image input, video and formula tooltips).
- activity-feed-tab.less: drop 10 selectors no component uses, and the
  unused .feed-widget-container part of a shared selector.
- Delete feeds-widget.less (neither class used) and .feed-widget-padding
  (only set when isForFeedTab, which its one caller passes as false).
@gitar-bot

gitar-bot Bot commented Dec 4, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 🟢 Low risk

Removing verified-unused activity-feed CSS, components, helpers, and props leaves rendered UI and supported behavior unchanged, limiting impact to cleanup.

Removes about 4,200 lines of dead activity feed CSS and roughly 2,000 lines of unused activity feed TypeScript, including unused components, helpers, context values and props. No issues found.

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

@harsh-vador
harsh-vador merged commit e00b7ef into main Dec 4, 2026
34 of 36 checks passed
@harsh-vador
harsh-vador deleted the chore/feed-dead-ts branch December 4, 2026 10:54
@harsh-vador

Copy link
Copy Markdown
Contributor Author

Playwright full suite on the activity feed cleanup stack

PR CI skips Playwright here, so I ran the whole suite on the stack instead (playwright-postgresql-e2e.yml, full_suite=true). The runs were on each branch before today's rebase onto main; the rebase changed no commit in the stack.

Run Covers Passed Failed Flaky (passed on retry)
47305108815 #39670, #39733, #39779 4,799 0 2: Flow/CustomizeWidgets "Pipeline Status Widget", Pages/Glossary "Change glossary term hierarchy using menu options across glossary"
47313014687 #39670, #39733, #39779, #39791 4,799 0 2: Flow/ServiceForm "Verify form selects are working properly", DataQuality/AddTestCaseNewFlow "Add Column Test Case"
  • No infrastructure issues in either run.
  • The flaky tests: none of the four is in an area these PRs change, and none repeats across the two runs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants