Skip to content

Conversation

@pierre-lehnen-rc
Copy link
Contributor

@pierre-lehnen-rc pierre-lehnen-rc commented Jan 6, 2026

Proposed changes (including videos or screenshots)

Issue(s)

CORE-1604

Steps to test or reproduce

Further comments

Summary by CodeRabbit

  • New Features

    • Room file lists (channels, groups, direct messages) now return only confirmed (successfully attached) files by default.
  • Documentation

    • API request types and validation schemas updated to document and validate the new optional onlyConfirmed file-filter parameter.

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

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Jan 6, 2026

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 Jan 6, 2026

🦋 Changeset detected

Latest commit: 1a8346a

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/rest-typings Minor
@rocket.chat/meteor Minor
@rocket.chat/api-client Patch
@rocket.chat/core-services Patch
@rocket.chat/ddp-client Patch
@rocket.chat/http-router Patch
@rocket.chat/models Patch
@rocket.chat/ui-contexts Major
@rocket.chat/web-ui-registration Major
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/federation-matrix Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/abac Patch
@rocket.chat/network-broker Patch
@rocket.chat/omni-core-ee Patch
@rocket.chat/livechat Patch
@rocket.chat/mock-providers Patch
@rocket.chat/cron Patch
@rocket.chat/instance-status Patch
@rocket.chat/omni-core Patch
@rocket.chat/ui-client Major
@rocket.chat/media-calls Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/fuselage-ui-kit Major
@rocket.chat/gazzodown Major
@rocket.chat/ui-avatar Major
@rocket.chat/ui-video-conf Major
@rocket.chat/ui-voip Major
@rocket.chat/core-typings Minor
@rocket.chat/apps Patch
@rocket.chat/model-typings Patch
@rocket.chat/license Patch
@rocket.chat/pdf-worker 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

@pierre-lehnen-rc pierre-lehnen-rc added this to the 8.1.0 milestone Jan 6, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 6, 2026

Walkthrough

Adds an optional onlyConfirmed query parameter to channel, group, and DM file-listing endpoints and the client hook; when truthy, results exclude files with an expiresAt field (temporary/unconfirmed uploads). Corresponding REST request types and JSON schemas are extended.

Changes

Cohort / File(s) Summary
Changeset
.changeset/ninety-pans-search.md
Documents dependency bumps and behavioral change: Room Files exclude unconfirmed uploads.
API endpoints
apps/meteor/app/api/server/v1/channels.ts, apps/meteor/app/api/server/v1/groups.ts, apps/meteor/app/api/server/v1/im.ts
Read onlyConfirmed from query params; when truthy, add expiresAt: { $exists: false } to files filter.
Client
apps/meteor/client/views/room/contextualBar/RoomFiles/hooks/useFilesList.ts
Sends onlyConfirmed: true with files requests to receive only confirmed uploads.
REST typings / schemas
packages/rest-typings/src/v1/channels/ChannelsFilesListProps.ts, packages/rest-typings/src/v1/dm/DmFileProps.ts, packages/rest-typings/src/v1/groups/GroupsFilesProps.ts
Add optional onlyConfirmed?: boolean to request types and JSON schemas.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Client as Client (RoomFiles hook)
  participant API as Server API (channels/groups/im)
  participant DB as Files collection

  rect rgb(230,248,255)
  Note over Client,API: Client requests confirmed files
  Client->>API: GET /v1/.../files?onlyConfirmed=true
  end

  rect rgb(245,255,230)
  Note over API,DB: API augments filter\nwith expiresAt: {$exists: false}
  API->>DB: find(filter + expiresAt: {$exists: false}, pagination)
  DB-->>API: matched file documents
  end

  rect rgb(255,243,230)
  API-->>Client: 200 OK (filtered files)
  Note over Client: map -> UI items, decrypt if needed
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested labels

stat: QA assured

Suggested reviewers

  • rodrigok
  • ggazzo
  • sampaiodiego

Poem

I’m a rabbit in code, nibbling through queues,
I hop past the temps and fetch only the true,
Confirmed files line up in tidy array,
No stray uploads left hopping astray,
Hooray—RoomFiles is neat today! 🐰✨

🚥 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 title 'feat: hide unconfirmed uploads from room's file list' clearly and accurately summarizes the main change across all modified files.
Linked Issues check ✅ Passed The PR fully addresses CORE-1604 by implementing the onlyConfirmed parameter across channels, groups, and IM endpoints to filter out unconfirmed uploads.
Out of Scope Changes check ✅ Passed All changes are directly scoped to implementing the onlyConfirmed filtering feature; no unrelated or extraneous modifications are present.
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 feat/hide-unconfirmed-uploads

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.

@pierre-lehnen-rc pierre-lehnen-rc marked this pull request as ready for review January 6, 2026 16:19
@pierre-lehnen-rc pierre-lehnen-rc requested review from a team as code owners January 6, 2026 16:19
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
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)
.changeset/ninety-pans-search.md (1)

1-6: Clarify whether the behavioral change is default or conditional.

The changeset description states that the file list "only show files that have been successfully attached to a message," but based on the AI summary, the client-side hook passes onlyConfirmed: true by default. This suggests the filtering is now the default behavior.

However, the description doesn't clarify:

  1. Whether this filtering is always enabled or conditional on the onlyConfirmed parameter
  2. That unconfirmed (temporary) uploads are no longer visible to end users

Please refine the description to be explicit about the scope and default behavior. For example: "Changed Room Files list to exclude temporary unconfirmed uploads by default."

apps/meteor/client/views/room/contextualBar/RoomFiles/hooks/useFilesList.ts (1)

57-57: Hardcoded onlyConfirmed: true prevents viewing temporary uploads.

The client always filters out unconfirmed files. While this aligns with the PR objective, consider whether administrators or power users might need to view temporary/unconfirmed uploads for debugging or moderation purposes.

If flexibility is needed in the future, this could be made configurable through an optional parameter or user permission check.

📜 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 d3511ea and 54d7883.

📒 Files selected for processing (8)
  • .changeset/ninety-pans-search.md
  • apps/meteor/app/api/server/v1/channels.ts
  • apps/meteor/app/api/server/v1/groups.ts
  • apps/meteor/app/api/server/v1/im.ts
  • apps/meteor/client/views/room/contextualBar/RoomFiles/hooks/useFilesList.ts
  • packages/rest-typings/src/v1/channels/ChannelsFilesListProps.ts
  • packages/rest-typings/src/v1/dm/DmFileProps.ts
  • packages/rest-typings/src/v1/groups/GroupsFilesProps.ts
🧰 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:

  • packages/rest-typings/src/v1/channels/ChannelsFilesListProps.ts
  • packages/rest-typings/src/v1/dm/DmFileProps.ts
  • packages/rest-typings/src/v1/groups/GroupsFilesProps.ts
  • apps/meteor/app/api/server/v1/channels.ts
  • apps/meteor/app/api/server/v1/im.ts
  • apps/meteor/client/views/room/contextualBar/RoomFiles/hooks/useFilesList.ts
  • apps/meteor/app/api/server/v1/groups.ts
🧠 Learnings (2)
📚 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/ninety-pans-search.md
📚 Learning: 2025-10-28T16:53:42.761Z
Learnt from: ricardogarim
Repo: RocketChat/Rocket.Chat PR: 37205
File: ee/packages/federation-matrix/src/FederationMatrix.ts:296-301
Timestamp: 2025-10-28T16:53:42.761Z
Learning: In the Rocket.Chat federation-matrix integration (ee/packages/federation-matrix/), the createRoom method from rocket.chat/federation-sdk will support a 4-argument signature (userId, roomName, visibility, displayName) in newer versions. Code using this 4-argument call is forward-compatible with planned library updates and should not be flagged as an error.

Applied to files:

  • .changeset/ninety-pans-search.md
⏰ 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 (8)
apps/meteor/app/api/server/v1/groups.ts (1)

395-411: LGTM! Conditional filtering implementation is correct.

The implementation correctly filters out unconfirmed uploads by excluding documents with an expiresAt field when onlyConfirmed is truthy. The spread operator pattern cleanly handles the optional filter.

apps/meteor/app/api/server/v1/channels.ts (1)

810-832: LGTM! Consistent with other endpoints.

The filtering logic matches the implementation in groups.ts and im.ts, providing consistent behavior across all room types.

apps/meteor/app/api/server/v1/im.ts (1)

282-299: LGTM! DM endpoint filtering aligns with channels and groups.

The implementation maintains consistency across all room types (channels, groups, and DMs) by using the same filtering approach.

packages/rest-typings/src/v1/channels/ChannelsFilesListProps.ts (3)

14-14: LGTM! Type definition correctly adds optional boolean parameter.

The addition of onlyConfirmed?: boolean properly extends the type to support the new filtering capability.


53-56: LGTM! Schema validation matches type definition.

The JSON schema correctly defines onlyConfirmed as an optional boolean with nullable: true, ensuring type-safe validation at runtime.


1-63: Type coverage confirmed across all endpoint types.

The onlyConfirmed parameter is consistently defined in all three file list prop types:

  • ChannelsFilesListProps: onlyConfirmed?: boolean (line 14, schema line 53)
  • GroupsFilesProps: onlyConfirmed?: boolean (line 13, schema line 51)
  • DmFileProps: onlyConfirmed?: boolean (line 12, schema line 51)

All type guards are exported with consistent naming conventions.

packages/rest-typings/src/v1/groups/GroupsFilesProps.ts (1)

13-13: LGTM! Type and schema changes are consistent.

The addition of the optional onlyConfirmed parameter to both the TypeScript type and JSON schema is correct. The schema properly uses nullable: true to allow the field to be omitted, and the boolean type aligns with the TypeScript definition.

Also applies to: 51-54

packages/rest-typings/src/v1/dm/DmFileProps.ts (1)

8-13: LGTM! Type and schema updates are well-structured.

The addition of the optional onlyConfirmed parameter is correctly implemented in both the type definition and schema. The type reformatting with intersection types improves clarity, and the schema validation properly uses nullable: true to make the field optional.

Also applies to: 51-54

Copy link
Member

@KevLehman KevLehman left a comment

Choose a reason for hiding this comment

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

rest looks good :)

@codecov
Copy link

codecov bot commented Jan 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.65%. Comparing base (a1dee4e) to head (1a8346a).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #38077      +/-   ##
===========================================
- Coverage    70.65%   70.65%   -0.01%     
===========================================
  Files         3145     3145              
  Lines       108772   108772              
  Branches     19547    19565      +18     
===========================================
- Hits         76855    76849       -6     
- Misses       29916    29920       +4     
- Partials      2001     2003       +2     
Flag Coverage Δ
e2e 60.14% <ø> (-0.06%) ⬇️
e2e-api 47.46% <ø> (+0.08%) ⬆️
unit 71.78% <ø> (+0.01%) ⬆️

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 6, 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/08 00:03 (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-38077
  • Baseline: develop
  • Timestamp: 2026-01-08 00:03:47 UTC
  • Historical data points: 30

Updated: Thu, 08 Jan 2026 00:03:47 GMT

pierre-lehnen-rc and others added 2 commits January 7, 2026 10:58
Co-authored-by: Ricardo Garim <rswarovsky@gmail.com>
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 (1)
packages/rest-typings/src/v1/groups/GroupsFilesProps.ts (1)

51-53: Add nullable: true to match the pattern of other optional properties.

All other optional properties in this schema (e.g., name, typeGroup, offset, count) include nullable: true in their definitions. The onlyConfirmed property should follow the same pattern for consistency and to prevent potential validation issues if null is passed.

♻️ Proposed fix
 		onlyConfirmed: {
 			type: 'boolean',
+			nullable: true,
 		},
📜 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 2f333ff and 29b9d9c.

📒 Files selected for processing (3)
  • packages/rest-typings/src/v1/channels/ChannelsFilesListProps.ts
  • packages/rest-typings/src/v1/dm/DmFileProps.ts
  • packages/rest-typings/src/v1/groups/GroupsFilesProps.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • packages/rest-typings/src/v1/channels/ChannelsFilesListProps.ts
  • packages/rest-typings/src/v1/dm/DmFileProps.ts
🧰 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:

  • packages/rest-typings/src/v1/groups/GroupsFilesProps.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
🔇 Additional comments (1)
packages/rest-typings/src/v1/groups/GroupsFilesProps.ts (1)

13-13: LGTM!

The optional onlyConfirmed boolean property correctly extends the type to support filtering unconfirmed uploads, maintaining backward compatibility.

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 7, 2026
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Jan 7, 2026
@kodiakhq kodiakhq bot merged commit 5c3c52b into develop Jan 8, 2026
44 checks passed
@kodiakhq kodiakhq bot deleted the feat/hide-unconfirmed-uploads branch January 8, 2026 00:25
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.

6 participants