Skip to content

Conversation

@juliajforesti
Copy link
Contributor

@juliajforesti juliajforesti commented Jan 21, 2026

CORE-1749

Proposed changes (including videos or screenshots)

Issue(s)

Steps to test or reproduce

Further comments

Summary by CodeRabbit

  • Refactor

    • Unified menus and option UIs and reorganized filter layouts across audit, marketplace, and omnichannel for a more consistent experience.
    • Date range presets UI refreshed for clearer selection.
  • New Features

    • Non-compact logs view adds a Severity filter and consolidated filter controls; compact view shows streamlined filter options.
  • Tests

    • E2E tests updated to improve modal/overlay handling.
  • Localization

    • Added translation for "Date range presets."

✏️ Tip: You can customize this high-level summary in your review settings.

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Jan 21, 2026

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is targeting the wrong base branch. It should target 8.2.0, but it targets 8.1.0

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link

changeset-bot bot commented Jan 21, 2026

⚠️ No Changeset found

Latest commit: 6e4ec6a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 21, 2026

Walkthrough

Replaces legacy Menu/Option usages with GenericMenu across audit, marketplace, and omnichannel UIs; converts keyed preset/option objects into flat item arrays with id/icon/content/onClick handlers; adjusts some layouts and filter grouping; adds a translation key and updates e2e test/menu page-object helpers to target new menu structure.

Changes

Cohort / File(s) Summary
Audit — DateRangePicker
apps/meteor/client/views/audit/components/forms/DateRangePicker.tsx
Swap Menu/Option presets for GenericMenu; convert presets from keyed object to item array (id, icon, content, onClick); add alignItems='center'; remove fuselage Menu import.
Omnichannel — DateRangePicker
apps/meteor/client/views/omnichannel/analytics/DateRangePicker.tsx
Replace Menu with GenericMenu; change presets to item array with onClick handlers; rename label→content and action→onClick; update imports.
Marketplace — App Logs Filters (filter components)
apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppLogs/Filters/AppLogsFilter.tsx, .../AppLogsFilterOptions.tsx, .../CompactFilterOptions.tsx
Reorganize non-compact filter layout (consolidate Time/Instance/Severity blocks); move Refresh/Export placement; replace Menu-based options with GenericMenu items arrays; add alignItems='flex-end' and disabled state for refresh.
Omnichannel — Departments Menu
apps/meteor/client/views/omnichannel/departments/DepartmentsTable/DepartmentItemMenu.tsx
Replace Menu with GenericMenu; switch to const { t } = useTranslation(); memoize items array; conditional edit/archive/unarchive/delete items with conditional icons, content, disabled/tooltip states.
E2E tests — menu helpers & usages
apps/meteor/tests/e2e/page-objects/fragments/menu.ts, apps/meteor/tests/e2e/page-objects/omnichannel/omnichannel-departments.ts, apps/meteor/tests/e2e/omnichannel/omnichannel-departaments.spec.ts
Add getMenuItem(itemName) helper and MenuOptions class; switch tests/page-objects to use MenuOptions.getMenuItem; update test signature to include page and add Escape presses to dismiss overlays.
Localization
packages/i18n/src/locales/en.i18n.json
Add Date_range_presets → "Date range presets".

Sequence Diagram(s)

(omitted)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

stat: ready to merge

Suggested reviewers

  • aleksandernsilva
  • gabriellsh
  • tassoevan

Poem

🐰 I swapped old Menus for GenericMenu bright,
Items now lined up, each with its click delight,
Presets hop forward, translations in tow,
Tests learn new paths, and the UI does glow,
A little rabbit jig—refactor done right! 🥕✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the main refactoring: replacing legacy Menu components with GenericMenu across multiple files.
Linked Issues check ✅ Passed All code changes directly address CORE-1749 by systematically replacing Menu with GenericMenu in DateRangePicker, AppLogsFilter, AppLogsFilterOptions, CompactFilterOptions, DepartmentItemMenu, and related test utilities.
Out of Scope Changes check ✅ Passed All changes are in-scope: Menu→GenericMenu replacements, supporting test updates, and one i18n key addition directly supporting the refactored DateRangePicker presets.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/menu-replacement

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 21, 2026

📦 Docker Image Size Report

➡️ Changes

Service Current Baseline Change Percent
sum of all images 0B 0B 0B
account-service 0B 0B 0B
authorization-service 0B 0B 0B
ddp-streamer-service 0B 0B 0B
omnichannel-transcript-service 0B 0B 0B
presence-service 0B 0B 0B
queue-worker-service 0B 0B 0B
rocketchat 0B 0B 0B

📊 Historical Trend

---
config:
  theme: "dark"
  xyChart:
    width: 900
    height: 400
---
xychart
  title "Image Size Evolution by Service (Last 30 Days + This PR)"
  x-axis ["11/18 22:53", "11/19 23:02", "11/21 16:49", "11/24 17:34", "11/27 22:32", "11/28 19:05", "12/01 23:01", "12/02 21:57", "12/03 21:00", "12/04 18:17", "12/05 21:56", "12/08 20:15", "12/09 22:17", "12/10 23:26", "12/11 21:56", "12/12 22:45", "12/13 01:34", "12/15 22:31", "12/16 22:18", "12/17 21:04", "12/18 23:12", "12/19 23:27", "12/20 21:03", "12/22 18:54", "12/23 16:16", "12/24 19:38", "12/25 17:51", "12/26 13:18", "12/29 19:01", "12/30 20:52", "01/26 13:31 (PR)"]
  y-axis "Size (GB)" 0 --> 0.5
  line "account-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.00]
  line "authorization-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.00]
  line "ddp-streamer-service" [0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.00]
  line "omnichannel-transcript-service" [0.14, 0.14, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.00]
  line "presence-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.00]
  line "queue-worker-service" [0.14, 0.14, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.00]
  line "rocketchat" [0.35, 0.35, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.00]
Loading

Statistics (last 30 days):

  • 📊 Average: 1.5GiB
  • ⬇️ Minimum: 1.4GiB
  • ⬆️ Maximum: 1.6GiB
  • 🎯 Current PR: 0B
ℹ️ About this report

This report compares Docker image sizes from this build against the develop baseline.

  • Tag: pr-38287
  • Baseline: develop
  • Timestamp: 2026-01-26 13:31:31 UTC
  • Historical data points: 30

Updated: Mon, 26 Jan 2026 13:31:31 GMT

@juliajforesti juliajforesti force-pushed the chore/menu-replacement branch from 46726fc to 5aea96e Compare January 21, 2026 19:16
@codecov
Copy link

codecov bot commented Jan 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.75%. Comparing base (08b586d) to head (996bda3).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #38287      +/-   ##
===========================================
+ Coverage    70.74%   70.75%   +0.01%     
===========================================
  Files         3159     3159              
  Lines       109384   109355      -29     
  Branches     19676    19687      +11     
===========================================
- Hits         77383    77376       -7     
+ Misses       29963    29942      -21     
+ Partials      2038     2037       -1     
Flag Coverage Δ
unit 71.93% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@juliajforesti juliajforesti force-pushed the chore/menu-replacement branch from d5549c6 to f0c0f1e Compare January 22, 2026 16:36
@juliajforesti juliajforesti marked this pull request as ready for review January 22, 2026 17:33
@juliajforesti juliajforesti requested a review from a team as a code owner January 22, 2026 17:33
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 11 files

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In
`@apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppLogs/Filters/AppLogsFilter.tsx`:
- Around line 94-97: The Severity label isn't associated with its input, so add
an accessible link: set the Label's htmlFor to 'severityFilter' (Label
htmlFor='severityFilter') and ensure the SeverityFilterSelect component accepts
and forwards the id and ref it receives from the Controller (it already receives
id='severityFilter' via {...field} — verify SeverityFilterSelect forwards that
id to the underlying HTML select/input and uses React.forwardRef to forward the
ref so screen readers and form libraries can associate the label and control).
🧹 Nitpick comments (1)
apps/meteor/tests/e2e/page-objects/omnichannel-departments.ts (1)

92-106: Consider extracting the repeated menu locator for reuse.

The getByRole('menu', { name: 'Options' }) locator is repeated across all four menu option getters. Per coding guidelines, commonly used locators should be stored in variables/constants for reuse.

♻️ Suggested refactor
+	private get optionsMenu() {
+		return this.page.getByRole('menu', { name: 'Options' });
+	}
+
 	get menuEditOption() {
-		return this.page.getByRole('menu', { name: 'Options' }).getByRole('menuitem', { name: 'Edit' });
+		return this.optionsMenu.getByRole('menuitem', { name: 'Edit' });
 	}
 
 	get menuDeleteOption() {
-		return this.page.getByRole('menu', { name: 'Options' }).getByRole('menuitem', { name: 'Delete' });
+		return this.optionsMenu.getByRole('menuitem', { name: 'Delete' });
 	}
 
 	get menuArchiveOption() {
-		return this.page.getByRole('menu', { name: 'Options' }).getByRole('menuitem', { name: 'Archive' });
+		return this.optionsMenu.getByRole('menuitem', { name: 'Archive' });
 	}
 
 	get menuUnarchiveOption() {
-		return this.page.getByRole('menu', { name: 'Options' }).getByRole('menuitem', { name: 'Unarchive' });
+		return this.optionsMenu.getByRole('menuitem', { name: 'Unarchive' });
 	}

Based on coding guidelines, commonly used locators should be stored in variables/constants for reuse.

@juliajforesti juliajforesti changed the title chore: replace legacy menu with GenericMenu refactor: replace legacy menu with GenericMenu Jan 22, 2026
@juliajforesti juliajforesti added this to the 8.2.0 milestone Jan 22, 2026
@dougfabris dougfabris changed the title refactor: replace legacy menu with GenericMenu refactor: replace legacy Menu with GenericMenu Jan 22, 2026
dougfabris
dougfabris previously approved these changes Jan 23, 2026
Copy link
Member

@dougfabris dougfabris left a comment

Choose a reason for hiding this comment

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

LGTM!

@dougfabris dougfabris added the stat: QA assured Means it has been tested and approved by a company insider label Jan 23, 2026
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Jan 23, 2026
@kodiakhq kodiakhq bot removed the stat: ready to merge PR tested and approved waiting for merge label Jan 23, 2026
@kodiakhq
Copy link
Contributor

kodiakhq bot commented Jan 23, 2026

This PR currently has a merge conflict. Please resolve this and then re-add the ['stat: ready to merge', 'automerge'] label.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/meteor/tests/e2e/omnichannel/omnichannel-departaments.spec.ts (1)

243-260: Wait for menu dismissal after Escape to prevent flaky overlays

Line 247 and Line 259 close the menu via Escape, but the test proceeds immediately. If the menu animates or overlays the page, subsequent steps can intermittently fail. Add an explicit expectation that the menu item is hidden before moving on.

🔧 Suggested fix
-				await page.keyboard.press('Escape');
+				await page.keyboard.press('Escape');
+				await expect(poOmnichannelDepartments.menuDeleteOption).not.toBeVisible();
-				await page.keyboard.press('Escape');
+				await page.keyboard.press('Escape');
+				await expect(poOmnichannelDepartments.menuDeleteOption).not.toBeVisible();
🧹 Nitpick comments (2)
apps/meteor/client/views/audit/components/forms/DateRangePicker.tsx (1)

186-194: Consider centralizing DateRangePicker components.

There appears to be a similar DateRangePicker in the omnichannel module with identical preset logic. This could be consolidated into a shared component to reduce duplication.

apps/meteor/client/views/omnichannel/departments/DepartmentsTable/DepartmentItemMenu.tsx (1)

22-23: Remove outdated TODO comment.

The TODO referencing "MenuV2" is now stale since this PR migrates to GenericMenu. Per coding guidelines, code comments should be avoided in the implementation.

Proposed fix
-// TODO: Use MenuV2 instead of Menu
 const DepartmentItemMenu = ({ department, archived }: DepartmentItemMenuProps): ReactElement => {

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

Labels

stat: QA assured Means it has been tested and approved by a company insider

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants