Skip to content

Conversation

@MartinSchoeler
Copy link
Member

@MartinSchoeler MartinSchoeler commented Jan 20, 2026

Proposed changes (including videos or screenshots)

Issue(s)

SUP-955

Steps to test or reproduce

Further comments

Summary by CodeRabbit

  • Bug Fixes

    • Encryption toggle and related fields properly reflect parent channel encryption when creating a discussion.
  • Enhancements

    • Autocomplete now exposes room encryption status and displays a key icon for encrypted rooms.
  • Tests

    • Added interactive stories and accessibility tests for discussion creation, covering encrypted-parent scenarios.
  • Chores

    • Released a patch changeset addressing encrypted discussion creation.

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

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Jan 20, 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 20, 2026

🦋 Changeset detected

Latest commit: ab17cf4

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

This PR includes changesets to release 40 packages
Name Type
@rocket.chat/meteor Patch
@rocket.chat/core-typings Patch
@rocket.chat/rest-typings Patch
@rocket.chat/uikit-playground 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/fuselage-ui-kit Patch
@rocket.chat/gazzodown Patch
@rocket.chat/http-router Patch
@rocket.chat/livechat Patch
@rocket.chat/model-typings Patch
@rocket.chat/ui-avatar Patch
@rocket.chat/ui-client Patch
@rocket.chat/ui-contexts Patch
@rocket.chat/ui-voip Patch
@rocket.chat/web-ui-registration Patch
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/abac Patch
@rocket.chat/federation-matrix Patch
@rocket.chat/license Patch
@rocket.chat/media-calls Patch
@rocket.chat/omnichannel-services 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/mock-providers Patch
@rocket.chat/ui-video-conf 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 Jan 20, 2026

Walkthrough

Adds propagation of parent-room encryption status into discussion creation UI and autocomplete results: the server now returns encrypted in room autocomplete, RoomAutoComplete can render an icon and uses a callback signature change, CreateDiscussion accepts encryptedParentRoom to disable controls when parent is encrypted, plus tests and a story.

Changes

Cohort / File(s) Summary
API Endpoint
apps/meteor/app/api/server/lib/rooms.ts
Include encrypted in projection for findChannelAndPrivateAutocomplete so autocomplete results contain encryption status.
CreateDiscussion UI
apps/meteor/client/components/CreateDiscussion/CreateDiscussion.tsx
Added encryptedParentRoom?: boolean prop; initialize form encrypted from it; track encryptedDisabled state; add onParentRoomChange to sync encrypted value and disable first-message field when parent is encrypted.
RoomAutoComplete
apps/meteor/client/components/RoomAutoComplete/RoomAutoComplete.tsx
Change setSelectedRoom prop type from `Dispatch<SetStateAction<IRoom
Integration Points
apps/meteor/client/components/message/toolbar/useNewDiscussionMessageAction.tsx, apps/meteor/client/views/room/composer/messageBox/MessageBoxActionsToolbar/hooks/useCreateDiscussionAction.tsx
Pass encryptedParentRoom={room?.encrypted} into CreateDiscussion modal invocation.
Stories & Tests
apps/meteor/client/components/CreateDiscussion/CreateDiscussion.stories.tsx, apps/meteor/client/components/CreateDiscussion/CreateDiscussion.spec.tsx
Add Storybook story with mocked endpoints and tests (render + a11y) covering encrypted-parent scenarios and UI behavior.
Release Metadata
.changeset/odd-gorillas-obey.md
Add changeset note bumping @rocket.chat/meteor patch with description about encrypted parent channel behavior.

Sequence Diagram(s)

sequenceDiagram
    actor User
    participant CreateDiscussion
    participant RoomAutoComplete
    participant Form
    participant Server

    User->>CreateDiscussion: Open modal (may include encryptedParentRoom)
    CreateDiscussion->>Form: Initialize (encrypted = encryptedParentRoom)
    CreateDiscussion->>RoomAutoComplete: Render (renderRoomIcon, setSelectedRoom)
    User->>RoomAutoComplete: Select parent room
    RoomAutoComplete->>CreateDiscussion: setSelectedRoom(selectedRoom)
    CreateDiscussion->>Server: (optional) GET /v1/rooms.info or use selectedRoom.encrypted
    alt parent room is encrypted
        CreateDiscussion->>Form: set encrypted = true (disabled)
        CreateDiscussion->>Form: disable first-message input
    else parent room unencrypted
        CreateDiscussion->>Form: allow toggling encrypted
        CreateDiscussion->>Form: enable first-message input
    end
    Form->>User: Update UI state
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

Suggested reviewers

  • gabriellsh
  • cardoso

🐰 I hopped through code with care,
Found keys and toggles hiding there,
Parent rooms now softly say,
“I lock the chat, you’ll loose the fray,”
So discussions bloom the right way. 🌿

🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ 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 describes the main fix: preventing creation of non-encrypted discussions when the parent room is encrypted.
Linked Issues check ✅ Passed The PR addresses SUP-955 by ensuring the frontend does not attempt to create non-encrypted discussions from encrypted parent rooms, aligning with backend behavior.
Out of Scope Changes check ✅ Passed All changes are scoped to the fix: updating CreateDiscussion to handle encrypted parent rooms, modifying RoomAutoComplete for icon rendering, and adding tests.

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

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/encrypted-discussion

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.

@codecov
Copy link

codecov bot commented Jan 20, 2026

Codecov Report

❌ Patch coverage is 96.29630% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.86%. Comparing base (464adcb) to head (ab17cf4).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #38279      +/-   ##
===========================================
+ Coverage    70.79%   70.86%   +0.06%     
===========================================
  Files         3158     3160       +2     
  Lines       109390   109768     +378     
  Branches     19682    19705      +23     
===========================================
+ Hits         77445    77788     +343     
- Misses       29919    29964      +45     
+ Partials      2026     2016      -10     
Flag Coverage Δ
e2e 60.39% <76.92%> (+0.01%) ⬆️
e2e-api 47.79% <ø> (-0.04%) ⬇️
unit 72.06% <96.15%> (+0.09%) ⬆️

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.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 20, 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/28 14:12 (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-38279
  • Baseline: develop
  • Timestamp: 2026-01-28 14:12:34 UTC
  • Historical data points: 30

Updated: Wed, 28 Jan 2026 14:12:35 GMT

@MartinSchoeler MartinSchoeler marked this pull request as ready for review January 21, 2026 17:13
@MartinSchoeler MartinSchoeler requested review from a team as code owners January 21, 2026 17:13
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 8 files

Copy link
Member

@abhinavkrin abhinavkrin left a comment

Choose a reason for hiding this comment

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

The endpoint rooms.createDiscussion does allow creating unencrypted discussions for encrypted rooms. It accepts a field encrypted which if not provided defaults to the parent room encryption status.
So, if the endpoint allows it, IMO, we should not prevent it from being done in the UI.

The encrypted parent room
Image

The unecrypted discussion
Image

@MartinSchoeler
Copy link
Member Author

The endpoint rooms.createDiscussion does allow creating unencrypted discussions for encrypted rooms. It accepts a field encrypted which if not provided defaults to the parent room encryption status. So, if the endpoint allows it, IMO, we should not prevent it from being done in the UI.

The encrypted parent room Image

The unecrypted discussion Image

Currently the UI is always creating an encrypted discussion, just to be sure, lets confirm with product what is the expected behavior, since FE and BE have discordant behaviors

@dougfabris dougfabris added this to the 8.2.0 milestone Jan 23, 2026
@dougfabris dougfabris added the stat: QA assured Means it has been tested and approved by a company insider label Jan 27, 2026
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Jan 27, 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.

I'm looking for the changeset

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 @.changeset/odd-gorillas-obey.md:
- Line 5: Update the changeset description in .changeset/odd-gorillas-obey.md by
correcting the two typos: replace "unencrtypted" with "unencrypted" and
"disscussion" with "discussion" in the line "Fixes issue when trying to create
an unencrtypted disscussion when a parent channel is encrypted", then save the
file so the changeset reads "Fixes issue when trying to create an unencrypted
discussion when a parent channel is encrypted".

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@kodiakhq kodiakhq bot merged commit 3a8520f into develop Jan 28, 2026
44 checks passed
@kodiakhq kodiakhq bot deleted the fix/encrypted-discussion branch January 28, 2026 14:33
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