Skip to content

Conversation

@ggazzo
Copy link
Member

@ggazzo ggazzo commented Dec 9, 2025

extracted from #37612

FB-65

Proposed changes (including videos or screenshots)

Issue(s)

Steps to test or reproduce

Further comments

Summary by CodeRabbit

  • Tests
    • Simplified mock provider for subscription tests: replaced array-based subscription setup with a single-subscription configuration and streamlined mock shapes.
    • Updated test specs to use the new single-subscription mock builder and removed now-unused type imports.

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

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Dec 9, 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 Dec 9, 2025

⚠️ No Changeset found

Latest commit: 7551f5c

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

@ggazzo ggazzo added this to the 7.14.0 milestone Dec 9, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 9, 2025

Walkthrough

Updated mock test infrastructure to support a single SubscriptionWithRoom via a new withSubscription() API on MockedAppRootBuilder. Tests were updated to use the single-subscription call instead of array-based withSubscriptions(). Query helpers were adjusted to surface the dedicated subscription alongside existing arrays.

Changes

Cohort / File(s) Summary
Mock Provider Infrastructure
packages/mock-providers/src/MockedAppRootBuilder.tsx
Added withSubscription(subscription: SubscriptionWithRoom): this and a private subscription field. querySubscription now returns the dedicated subscription snapshot. querySubscriptions prepends the dedicated subscription to the subscriptions array when present. Removed ISubscription type usage from the public wiring.
Test Hook Updates
apps/meteor/client/views/navigation/sidepanel/hooks/useRoomMenuActions.spec.ts, apps/meteor/client/views/room/contextualBar/Info/hooks/actions/useRoomLeave.spec.ts
Replaced array-based .withSubscriptions([ ... ]) calls with .withSubscription({ ... }). Simplified mock subscription shape (uses fname directly). Removed SubscriptionWithRoom import where no longer needed.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Pay attention to: querySubscriptions behavior when both subscription and subscriptions exist; ensure snapshot shapes match callers.
  • Verify tests that previously relied on array semantics still behave as expected when a single subscription is provided.

Possibly related PRs

Suggested labels

stat: ready to merge, stat: QA assured

Suggested reviewers

  • aleksandernsilva
  • tassoevan

Poem

🐰 I hopped through mocks and tests today,
One subscription now leads the way.
Builders tidy, snapshots sing,
Mocks aligned — a joyful spring! ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Linked Issues check ❓ Inconclusive Linked issue FB-65 provides insufficient detail to assess whether code changes meet its requirements; the issue context is not available for validation. Provide more details about FB-65 requirements or confirm that this refactoring is a prerequisite for the stated objective.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: adding withSubscription method to MockedAppRootBuilder, which is the primary focus of all code modifications.
Out of Scope Changes check ✅ Passed All changes are directly related to the withSubscription API addition: test updates use the new API, and the MockedAppRootBuilder implements the feature consistently across all files.
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 chore/mocked

📜 Recent 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 1ad257a and 7551f5c.

📒 Files selected for processing (2)
  • apps/meteor/client/views/navigation/sidepanel/hooks/useRoomMenuActions.spec.ts (5 hunks)
  • apps/meteor/client/views/room/contextualBar/Info/hooks/actions/useRoomLeave.spec.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • apps/meteor/client/views/room/contextualBar/Info/hooks/actions/useRoomLeave.spec.ts
  • apps/meteor/client/views/navigation/sidepanel/hooks/useRoomMenuActions.spec.ts
⏰ 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

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.

@ggazzo ggazzo marked this pull request as ready for review December 9, 2025 16:17
@ggazzo ggazzo requested a review from a team as a code owner December 9, 2025 16:17
@github-actions
Copy link
Contributor

github-actions bot commented Dec 9, 2025

📦 Docker Image Size Report

📈 Changes

Service Current Baseline Change Percent
sum of all images 1.2GiB 1.2GiB +12MiB
rocketchat 360MiB 349MiB +12MiB
omnichannel-transcript-service 132MiB 132MiB -3.5KiB
queue-worker-service 132MiB 132MiB +115B
ddp-streamer-service 126MiB 126MiB +131B
account-service 113MiB 113MiB +695B
stream-hub-service 111MiB 111MiB +77B
authorization-service 111MiB 111MiB -193B
presence-service 111MiB 111MiB +55B

📊 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 15:01", "12/09 16:53 (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]
  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]
  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]
  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]
  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]
  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]
  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.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]
Loading

Statistics (last 16 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-37746
  • Baseline: develop
  • Timestamp: 2025-12-09 16:53:55 UTC
  • Historical data points: 16

Updated: Tue, 09 Dec 2025 16:53:56 GMT

@ggazzo ggazzo added the stat: QA assured Means it has been tested and approved by a company insider label Dec 9, 2025
@ggazzo ggazzo merged commit 06991bc into develop Dec 9, 2025
72 of 75 checks passed
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Dec 9, 2025
@ggazzo ggazzo deleted the chore/mocked branch December 9, 2025 16:57
@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