Skip to content

Conversation

@aleksandernsilva
Copy link
Contributor

@aleksandernsilva aleksandernsilva commented Nov 27, 2025

Proposed changes (including videos or screenshots)

Screenshot 2025-12-12 at 16 38 59

Issue(s)

FB-64

Steps to test or reproduce

Further comments

Summary by CodeRabbit

  • New Features

    • Invitation badge added to sidebars and side panels, showing pending invitation status with a human-readable relative/date title.
    • New unread badge component for sidebar items with accessible status label and count.
  • Tests

    • Added snapshot and accessibility tests for the invitation badge and stories; expanded coverage across sidebar locations and date formats.
  • Localization

    • Added English translation: "Invited {{date}}".
  • Chores

    • Release changeset recording the UI update.

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

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Nov 27, 2025

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link

changeset-bot bot commented Nov 27, 2025

🦋 Changeset detected

Latest commit: a492ca8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 42 packages
Name Type
@rocket.chat/meteor Patch
@rocket.chat/i18n Patch
@rocket.chat/mock-providers Patch
@rocket.chat/ui-contexts Patch
@rocket.chat/web-ui-registration Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/fuselage-ui-kit Patch
@rocket.chat/ui-client Patch
@rocket.chat/ui-voip Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/gazzodown Patch
@rocket.chat/livechat Patch
@rocket.chat/ui-avatar Patch
@rocket.chat/ui-video-conf Patch
@rocket.chat/queue-worker Patch
@rocket.chat/core-typings Patch
@rocket.chat/rest-typings Patch
@rocket.chat/api-client Patch
@rocket.chat/apps Patch
@rocket.chat/core-services Patch
@rocket.chat/cron Patch
@rocket.chat/ddp-client Patch
@rocket.chat/freeswitch Patch
@rocket.chat/http-router Patch
@rocket.chat/model-typings Patch
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/presence-service Patch
@rocket.chat/stream-hub-service Patch
@rocket.chat/federation-matrix Patch
@rocket.chat/license Patch
@rocket.chat/media-calls Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/models Patch
@rocket.chat/network-broker Patch
@rocket.chat/omni-core-ee Patch
@rocket.chat/instance-status Patch
@rocket.chat/omni-core Patch

Not sure what this means? Click here to learn what changesets are.

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 27, 2025

Walkthrough

Adds a new InvitationBadge component (with Storybook stories and tests), integrates it into multiple sidebar/sidepanel badge renderers, introduces an UnreadBadge component, adds an English translation key, and includes a changeset documenting the UI change.

Changes

Cohort / File(s) Summary
InvitationBadge component
apps/meteor/client/components/InvitationBadge/InvitationBadge.tsx, apps/meteor/client/components/InvitationBadge/index.ts, apps/meteor/client/components/InvitationBadge/InvitationBadge.stories.tsx, apps/meteor/client/components/InvitationBadge/InvitationBadge.spec.tsx
New default-exported React component rendering a mail icon with invitation status and time-ago title (accepts `string
Sidebar badge integrations
apps/meteor/client/sidebar/.../SidebarItemBadges.tsx, apps/meteor/client/sidebar/.../SidebarItemBadges.spec.tsx, apps/meteor/client/sidebarv2/.../SidebarItemBadges.tsx, apps/meteor/client/sidebarv2/.../SidebarItemBadges.spec.tsx, apps/meteor/client/views/navigation/sidebar/.../SidebarItemBadges.tsx, apps/meteor/client/views/navigation/sidebar/.../SidebarItemBadges.spec.tsx
Each renderer imports isInviteSubscription and InvitationBadge; conditionally renders <InvitationBadge mbs={2} invitationDate={room.ts} /> for invite subscriptions; tests updated to assert presence/absence and localized date label.
Sidepanel item badges
apps/meteor/client/views/navigation/sidepanel/SidepanelItem/RoomSidePanelItemBadges.tsx, apps/meteor/client/views/navigation/sidepanel/SidepanelItem/RoomSidePanelItemBadges.spec.tsx
Added isInviteSubscription import and conditional InvitationBadge render when room is an invite; tests added/updated.
UnreadBadge component
apps/meteor/client/views/navigation/sidebar/badges/UnreadBadge.tsx
New UnreadBadge default-exported component and UnreadBadgeProps type; renders SidebarV2ItemBadge with variant/title/aria-label and a child span showing the total.
Translations & changeset
packages/i18n/src/locales/en.i18n.json, .changeset/twelve-forks-destroy.md
Added Invited__date__ translation key ("Invited {{date}}") and a changeset documenting the UI change and patch bumps for relevant packages.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20–30 minutes

  • Pay attention to InvitationBadge date parsing/formatting and i18n token usage.
  • Verify consistent use of isInviteSubscription(room) and room.ts propagation across sidebar/sidepanel variants.
  • Review UnreadBadge aria-label composition for accessibility.
  • Check tests' translation mocks and snapshot expectations for date formatting stability.

Possibly related PRs

Suggested labels

stat: ready to merge, stat: QA assured

Suggested reviewers

  • ggazzo
  • tassoevan
  • dougfabris

Poem

🐰 A small mail badge hopped on the side,
Counting invites with soft, timely pride.
Stories and tests gave it wings to fly,
Sidebars now whisper the date nearby. ✨

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title accurately summarizes the main change: adding an invitation badge to the sidebar, which aligns with all file modifications.
Linked Issues check ✅ Passed The PR implements the sidebar invited status badge as specified in FB-64, including the new InvitationBadge component and its integration across multiple sidebar implementations.
Out of Scope Changes check ✅ Passed All changes are within scope: new InvitationBadge component, tests, i18n translation, and integration into three sidebar badge components, plus a bonus UnreadBadge refactor that enables multi-badge rendering.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ 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 feat/invite-sidebar-badge

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between f1967a5 and a492ca8.

⛔ Files ignored due to path filters (1)
  • apps/meteor/client/components/InvitationBadge/__snapshots__/InvitationBadge.spec.tsx.snap is excluded by !**/*.snap
📒 Files selected for processing (15)
  • .changeset/twelve-forks-destroy.md (1 hunks)
  • apps/meteor/client/components/InvitationBadge/InvitationBadge.spec.tsx (1 hunks)
  • apps/meteor/client/components/InvitationBadge/InvitationBadge.stories.tsx (1 hunks)
  • apps/meteor/client/components/InvitationBadge/InvitationBadge.tsx (1 hunks)
  • apps/meteor/client/components/InvitationBadge/index.ts (1 hunks)
  • apps/meteor/client/sidebar/badges/SidebarItemBadges.spec.tsx (2 hunks)
  • apps/meteor/client/sidebar/badges/SidebarItemBadges.tsx (2 hunks)
  • apps/meteor/client/sidebarv2/badges/SidebarItemBadges.spec.tsx (2 hunks)
  • apps/meteor/client/sidebarv2/badges/SidebarItemBadges.tsx (2 hunks)
  • apps/meteor/client/views/navigation/sidebar/badges/SidebarItemBadges.spec.tsx (2 hunks)
  • apps/meteor/client/views/navigation/sidebar/badges/SidebarItemBadges.tsx (2 hunks)
  • apps/meteor/client/views/navigation/sidebar/badges/UnreadBadge.tsx (1 hunks)
  • apps/meteor/client/views/navigation/sidepanel/SidepanelItem/RoomSidePanelItemBadges.spec.tsx (2 hunks)
  • apps/meteor/client/views/navigation/sidepanel/SidepanelItem/RoomSidePanelItemBadges.tsx (2 hunks)
  • packages/i18n/src/locales/en.i18n.json (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • apps/meteor/client/components/InvitationBadge/index.ts
🚧 Files skipped from review as they are similar to previous changes (7)
  • apps/meteor/client/sidebarv2/badges/SidebarItemBadges.spec.tsx
  • apps/meteor/client/sidebar/badges/SidebarItemBadges.tsx
  • apps/meteor/client/views/navigation/sidepanel/SidepanelItem/RoomSidePanelItemBadges.tsx
  • packages/i18n/src/locales/en.i18n.json
  • apps/meteor/client/views/navigation/sidebar/badges/SidebarItemBadges.spec.tsx
  • apps/meteor/client/sidebarv2/badges/SidebarItemBadges.tsx
  • apps/meteor/client/views/navigation/sidebar/badges/SidebarItemBadges.tsx
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js}

📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)

**/*.{ts,tsx,js}: Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests
Avoid code comments in the implementation

Files:

  • apps/meteor/client/components/InvitationBadge/InvitationBadge.spec.tsx
  • apps/meteor/client/views/navigation/sidebar/badges/UnreadBadge.tsx
  • apps/meteor/client/components/InvitationBadge/InvitationBadge.tsx
  • apps/meteor/client/sidebar/badges/SidebarItemBadges.spec.tsx
  • apps/meteor/client/components/InvitationBadge/InvitationBadge.stories.tsx
  • apps/meteor/client/views/navigation/sidepanel/SidepanelItem/RoomSidePanelItemBadges.spec.tsx
🧠 Learnings (17)
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Group related tests in the same file

Applied to files:

  • apps/meteor/client/components/InvitationBadge/InvitationBadge.spec.tsx
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Utilize Playwright fixtures (`test`, `page`, `expect`) for consistency in test files

Applied to files:

  • apps/meteor/client/components/InvitationBadge/InvitationBadge.spec.tsx
  • apps/meteor/client/views/navigation/sidepanel/SidepanelItem/RoomSidePanelItemBadges.spec.tsx
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : All test files must be created in `apps/meteor/tests/e2e/` directory

Applied to files:

  • apps/meteor/client/components/InvitationBadge/InvitationBadge.spec.tsx
📚 Learning: 2025-12-10T21:00:54.909Z
Learnt from: KevLehman
Repo: RocketChat/Rocket.Chat PR: 37091
File: ee/packages/abac/jest.config.ts:4-7
Timestamp: 2025-12-10T21:00:54.909Z
Learning: Rocket.Chat monorepo: Jest testMatch pattern '<rootDir>/src/**/*.spec.(ts|js|mjs)' is valid in this repo and used across multiple packages (e.g., packages/tools, ee/packages/omnichannel-services). Do not flag it as invalid in future reviews.

Applied to files:

  • apps/meteor/client/components/InvitationBadge/InvitationBadge.spec.tsx
  • apps/meteor/client/views/navigation/sidepanel/SidepanelItem/RoomSidePanelItemBadges.spec.tsx
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Maintain test isolation between test cases in Playwright tests

Applied to files:

  • apps/meteor/client/components/InvitationBadge/InvitationBadge.spec.tsx
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Use `test.step()` for complex test scenarios to improve organization in Playwright tests

Applied to files:

  • apps/meteor/client/components/InvitationBadge/InvitationBadge.spec.tsx
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Use `expect` matchers for assertions (`toEqual`, `toContain`, `toBeTruthy`, `toHaveLength`, etc.) instead of `assert` statements in Playwright tests

Applied to files:

  • apps/meteor/client/components/InvitationBadge/InvitationBadge.spec.tsx
  • apps/meteor/client/views/navigation/sidepanel/SidepanelItem/RoomSidePanelItemBadges.spec.tsx
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Prefer web-first assertions (`toBeVisible`, `toHaveText`, etc.) in Playwright tests

Applied to files:

  • apps/meteor/client/components/InvitationBadge/InvitationBadge.spec.tsx
  • apps/meteor/client/views/navigation/sidepanel/SidepanelItem/RoomSidePanelItemBadges.spec.tsx
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Ensure tests run reliably in parallel without shared state conflicts

Applied to files:

  • apps/meteor/client/components/InvitationBadge/InvitationBadge.spec.tsx
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to **/*.spec.ts : Use descriptive test names that clearly communicate expected behavior in Playwright tests

Applied to files:

  • apps/meteor/client/components/InvitationBadge/InvitationBadge.spec.tsx
📚 Learning: 2025-11-17T15:07:13.273Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 37398
File: packages/fuselage-ui-kit/src/surfaces/FuselageSurfaceRenderer.tsx:357-363
Timestamp: 2025-11-17T15:07:13.273Z
Learning: In packages/fuselage-ui-kit/src/surfaces/FuselageSurfaceRenderer.tsx, IconElement is a presentational, non-actionable element that does not require wrapping in AppIdProvider, similar to plain_text and mrkdwn renderers. Only actionable elements (those with actions, actionId, or interactive behavior) should be wrapped in AppIdProvider.

Applied to files:

  • apps/meteor/client/components/InvitationBadge/InvitationBadge.tsx
📚 Learning: 2025-11-19T18:20:07.720Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 37419
File: packages/i18n/src/locales/en.i18n.json:918-921
Timestamp: 2025-11-19T18:20:07.720Z
Learning: Repo: RocketChat/Rocket.Chat — i18n/formatting
Learning: This repository uses a custom message formatting parser in UI blocks/messages; do not assume standard Markdown rules. For keys like Call_ended_bold, Call_not_answered_bold, Call_failed_bold, and Call_transferred_bold in packages/i18n/src/locales/en.i18n.json, retain the existing single-asterisk emphasis unless maintainers request otherwise.

Applied to files:

  • .changeset/twelve-forks-destroy.md
📚 Learning: 2025-11-19T12:32:29.696Z
Learnt from: d-gubert
Repo: RocketChat/Rocket.Chat PR: 37547
File: packages/i18n/src/locales/en.i18n.json:634-634
Timestamp: 2025-11-19T12:32:29.696Z
Learning: Repo: RocketChat/Rocket.Chat
Context: i18n workflow
Learning: In this repository, new translation keys should be added to packages/i18n/src/locales/en.i18n.json only; other locale files are populated via the external translation pipeline and/or fall back to English. Do not request adding the same key to all locale files in future reviews.

Applied to files:

  • .changeset/twelve-forks-destroy.md
📚 Learning: 2025-12-16T17:29:45.163Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 37834
File: apps/meteor/tests/e2e/page-objects/fragments/admin-flextab-emoji.ts:12-22
Timestamp: 2025-12-16T17:29:45.163Z
Learning: In page object files under `apps/meteor/tests/e2e/page-objects/`, always import `expect` from `../../utils/test` (Playwright's async expect), not from Jest. Jest's `expect` has a synchronous signature and will cause TypeScript errors when used with web-first assertions like `toBeVisible()`.

Applied to files:

  • apps/meteor/client/views/navigation/sidepanel/SidepanelItem/RoomSidePanelItemBadges.spec.tsx
📚 Learning: 2025-09-23T19:22:59.217Z
Learnt from: dougfabris
Repo: RocketChat/Rocket.Chat PR: 36987
File: apps/meteor/tests/e2e/page-objects/fragments/room-toolbar.ts:10-20
Timestamp: 2025-09-23T19:22:59.217Z
Learning: In Playwright e2e tests, prefer stable selectors like data-qa-id attributes over localized text in getByRole() or getByText() calls to prevent test failures when UI language changes. Test translations separately by validating actual text content after ensuring UI interactions work with stable selectors.

Applied to files:

  • apps/meteor/client/views/navigation/sidepanel/SidepanelItem/RoomSidePanelItemBadges.spec.tsx
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Use `page.waitFor()` with specific conditions instead of hardcoded timeouts in Playwright tests

Applied to files:

  • apps/meteor/client/views/navigation/sidepanel/SidepanelItem/RoomSidePanelItemBadges.spec.tsx
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Implement proper wait strategies for dynamic content in Playwright tests

Applied to files:

  • apps/meteor/client/views/navigation/sidepanel/SidepanelItem/RoomSidePanelItemBadges.spec.tsx
🧬 Code graph analysis (4)
apps/meteor/client/views/navigation/sidebar/badges/UnreadBadge.tsx (1)
packages/ui-contexts/src/index.ts (1)
  • useTranslation (81-81)
apps/meteor/client/components/InvitationBadge/InvitationBadge.tsx (2)
packages/ui-contexts/src/index.ts (1)
  • useTranslation (81-81)
apps/meteor/client/lib/utils/timeAgo.ts (1)
  • timeAgo (12-26)
apps/meteor/client/sidebar/badges/SidebarItemBadges.spec.tsx (1)
apps/meteor/tests/mocks/data.ts (1)
  • createFakeSubscription (63-90)
apps/meteor/client/views/navigation/sidepanel/SidepanelItem/RoomSidePanelItemBadges.spec.tsx (1)
apps/meteor/tests/mocks/data.ts (1)
  • createFakeSubscription (63-90)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: 📦 Build Packages
  • GitHub Check: CodeQL-Build
  • GitHub Check: CodeQL-Build
🔇 Additional comments (5)
.changeset/twelve-forks-destroy.md (1)

1-6: LGTM!

The changeset correctly documents the UI change with appropriate patch-level bumps for the affected packages.

apps/meteor/client/components/InvitationBadge/InvitationBadge.spec.tsx (1)

1-18: LGTM!

The test implementation follows best practices by leveraging Storybook stories with composeStories and running both snapshot and accessibility tests across all story variants.

apps/meteor/client/sidebar/badges/SidebarItemBadges.spec.tsx (1)

54-75: LGTM!

The InvitationBadge tests are well-structured and correctly validate both the positive case (with INVITED status) and negative case (without INVITED status). The date format expectation 'Invited January 1, 2025' matches the component output.

apps/meteor/client/components/InvitationBadge/InvitationBadge.stories.tsx (1)

1-32: LGTM!

The Storybook stories effectively demonstrate the InvitationBadge component with both ISO string and Date object inputs, and properly configure the translation decorator for the Invited__date__ key.

apps/meteor/client/views/navigation/sidebar/badges/UnreadBadge.tsx (1)

1-26: The translation key __unreadTitle__from__roomTitle__ is defined and present across multiple locale files (en, sv, pt-BR, nb). The component parameters match the placeholder variables in the translation strings. No action required.


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.

@aleksandernsilva aleksandernsilva changed the title feat: Sidebar invitation badge feat: Added sidebar invitation badge Nov 27, 2025
@ricardogarim ricardogarim force-pushed the feat/invites branch 7 times, most recently from a575a7a to 5a0d940 Compare November 28, 2025 03:10
@aleksandernsilva aleksandernsilva force-pushed the feat/invite-sidebar-badge branch 2 times, most recently from 81a1dde to 77a6e7a Compare November 28, 2025 17:52
@aleksandernsilva aleksandernsilva changed the title feat: Added sidebar invitation badge feat: Added invitation badge to sidebar Nov 28, 2025
@ggazzo ggazzo force-pushed the feat/invites branch 2 times, most recently from b2cc5c0 to 0d14b19 Compare December 3, 2025 18:49
@aleksandernsilva aleksandernsilva force-pushed the feat/invite-sidebar-badge branch from 77a6e7a to 5f7daad Compare December 3, 2025 19:15
@github-actions
Copy link
Contributor

github-actions bot commented Dec 3, 2025

📦 Docker Image Size Report

📈 Changes

Service Current Baseline Change Percent
sum of all images 1.2GiB 1.2GiB +12MiB
rocketchat 358MiB 347MiB +12MiB
omnichannel-transcript-service 132MiB 132MiB +690B
queue-worker-service 132MiB 132MiB +1.2KiB
ddp-streamer-service 126MiB 126MiB +617B
account-service 113MiB 113MiB +597B
stream-hub-service 110MiB 110MiB +125B
presence-service 110MiB 110MiB +490B
authorization-service 110MiB 110MiB +706B

📊 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/15 22:28", "11/16 01:28", "11/17 23:50", "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 19:43", "12/16 21:21 (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]
  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]
  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]
  line "omnichannel-transcript-service" [0.14, 0.14, 0.14, 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]
  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]
  line "queue-worker-service" [0.14, 0.14, 0.14, 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]
  line "rocketchat" [0.36, 0.36, 0.35, 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.35]
  line "stream-hub-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]
Loading

Statistics (last 22 days):

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

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

  • Tag: pr-37635
  • Baseline: develop
  • Timestamp: 2025-12-16 21:21:05 UTC
  • Historical data points: 22

Updated: Tue, 16 Dec 2025 21:21:06 GMT

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

🧹 Nitpick comments (2)
apps/meteor/client/components/InvitationBadge/InvitationBadge.tsx (2)

14-14: Consider handling the missing date scenario more explicitly.

When invitationDate is not provided, the formatted date becomes an empty string, resulting in a title like "Invited " with no date. Consider either:

  • Making invitationDate required in the type definition if it should always be present
  • Providing a fallback message or not rendering the badge when the date is unavailable

23-23: Remove redundant aria-hidden='false'.

The aria-hidden='false' is the default behavior for elements and is redundant. Removing it simplifies the code without changing functionality.

Apply this diff to remove the redundant prop:

 		<Icon
 			size='x20'
 			{...props}
 			role='status'
 			color='info'
 			name='mail'
-			aria-hidden='false'
 			title={t('Invited__date__', { date: formattedDate })}
 		/>
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 49a18b4 and f86dc3e.

⛔ Files ignored due to path filters (1)
  • apps/meteor/client/components/InvitationBadge/__snapshots__/InvitationBadge.spec.tsx.snap is excluded by !**/*.snap
📒 Files selected for processing (1)
  • apps/meteor/client/components/InvitationBadge/InvitationBadge.tsx (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js}

📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)

**/*.{ts,tsx,js}: Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests
Avoid code comments in the implementation

Files:

  • apps/meteor/client/components/InvitationBadge/InvitationBadge.tsx
🧠 Learnings (1)
📚 Learning: 2025-11-17T15:07:13.273Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 37398
File: packages/fuselage-ui-kit/src/surfaces/FuselageSurfaceRenderer.tsx:357-363
Timestamp: 2025-11-17T15:07:13.273Z
Learning: In packages/fuselage-ui-kit/src/surfaces/FuselageSurfaceRenderer.tsx, IconElement is a presentational, non-actionable element that does not require wrapping in AppIdProvider, similar to plain_text and mrkdwn renderers. Only actionable elements (those with actions, actionId, or interactive behavior) should be wrapped in AppIdProvider.

Applied to files:

  • apps/meteor/client/components/InvitationBadge/InvitationBadge.tsx
🧬 Code graph analysis (1)
apps/meteor/client/components/InvitationBadge/InvitationBadge.tsx (2)
packages/ui-contexts/src/index.ts (1)
  • useTranslation (81-81)
apps/meteor/client/lib/utils/timeAgo.ts (1)
  • timeAgo (12-26)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: CodeQL-Build
  • GitHub Check: CodeQL-Build
🔇 Additional comments (2)
apps/meteor/client/components/InvitationBadge/InvitationBadge.tsx (2)

1-5: LGTM!

The imports are appropriate and necessary for the component implementation.


7-9: LGTM!

The type definition correctly omits the hardcoded props and allows flexible prop forwarding.

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

🧹 Nitpick comments (2)
apps/meteor/client/components/InvitationBadge/InvitationBadge.tsx (2)

7-9: Prop typing: exclude title (or make precedence explicit).
Because InvitationBadgeProps currently allows passing title via ComponentProps<typeof Icon>, callers can accidentally override the computed title={formattedDate} (or vice-versa, depending on prop spread order). Consider also omitting title from InvitationBadgeProps to keep the badge’s accessible label consistent.

-type InvitationBadgeProps = Omit<ComponentProps<typeof Icon>, 'name' | 'color' | 'role'> & {
+type InvitationBadgeProps = Omit<ComponentProps<typeof Icon>, 'name' | 'color' | 'role' | 'title'> & {
 	invitationDate?: string | Date;
 };

11-17: Minor: avoid recomputing formattedDate on every render if this badge re-renders frequently.
Not critical, but if this sits in a heavily re-rendered sidebar, wrapping the formatting in useMemo keyed by invitationDate, t, and timeAgo can reduce churn.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 5db62b3 and 5d5fc5c.

⛔ Files ignored due to path filters (1)
  • apps/meteor/client/components/InvitationBadge/__snapshots__/InvitationBadge.spec.tsx.snap is excluded by !**/*.snap
📒 Files selected for processing (2)
  • apps/meteor/client/components/InvitationBadge/InvitationBadge.tsx (1 hunks)
  • packages/i18n/src/locales/en.i18n.json (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/i18n/src/locales/en.i18n.json
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js}

📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)

**/*.{ts,tsx,js}: Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests
Avoid code comments in the implementation

Files:

  • apps/meteor/client/components/InvitationBadge/InvitationBadge.tsx
🧠 Learnings (1)
📚 Learning: 2025-11-17T15:07:13.273Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 37398
File: packages/fuselage-ui-kit/src/surfaces/FuselageSurfaceRenderer.tsx:357-363
Timestamp: 2025-11-17T15:07:13.273Z
Learning: In packages/fuselage-ui-kit/src/surfaces/FuselageSurfaceRenderer.tsx, IconElement is a presentational, non-actionable element that does not require wrapping in AppIdProvider, similar to plain_text and mrkdwn renderers. Only actionable elements (those with actions, actionId, or interactive behavior) should be wrapped in AppIdProvider.

Applied to files:

  • apps/meteor/client/components/InvitationBadge/InvitationBadge.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: 📦 Build Packages
  • GitHub Check: CodeQL-Build
  • GitHub Check: CodeQL-Build

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.

Maybe I didn't made myself clear. I will try again!

We already have a storybook for the sidebar, so I think we could generate some snapshots (e.g for sidebar which uses the InvitationBadge) adding the new invitation badge to cover this addition, instead of creating a new test file and snapshot file just for this pure visual component

@aleksandernsilva aleksandernsilva force-pushed the feat/invite-sidebar-badge branch from f1967a5 to a492ca8 Compare December 16, 2025 20:54
@aleksandernsilva
Copy link
Contributor Author

We already have a storybook for the sidebar, so I think we could generate some snapshots (e.g for sidebar which uses the InvitationBadge) adding the new invitation badge to cover this addition, instead of creating a new test file and snapshot file just for this pure visual component

@dougfabris One of the reasons why this component was added to client/components is because it is not exclusive to the sidebar. Also, although the component has very minimal logic within it, it still has it, and that justifies the existing tests. As agreed, I've restored the stories for the InvitationBadge components and adjusted the unit tests and snapshots accordingly.

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!

@ggazzo ggazzo added the stat: QA assured Means it has been tested and approved by a company insider label Dec 19, 2025
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Dec 19, 2025
@ggazzo ggazzo merged commit f056c45 into develop Dec 19, 2025
52 of 53 checks passed
@ggazzo ggazzo deleted the feat/invite-sidebar-badge branch December 19, 2025 16:42
gaolin1 pushed a commit to gaolin1/medsense.webchat that referenced this pull request Jan 6, 2026
@dougfabris dougfabris modified the milestones: 7.14.0, 8.0.0 Jan 19, 2026
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 stat: ready to merge PR tested and approved waiting for merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants