Skip to content

refactor: Remove local definitions of DeepWritable - #41185

Merged
ggazzo merged 1 commit into
developfrom
refactor/deep-writable
Jul 6, 2026
Merged

refactor: Remove local definitions of DeepWritable#41185
ggazzo merged 1 commit into
developfrom
refactor/deep-writable

Conversation

@tassoevan

@tassoevan tassoevan commented Jul 4, 2026

Copy link
Copy Markdown
Member

Proposed changes (including videos or screenshots)

This pull request refactors the usage of the DeepWritable type in both the ChatMessages client library and the Messages model by removing local definitions and consistently importing it from the shared @rocket.chat/core-typings package. This helps reduce code duplication and ensures type consistency across the codebase.

Type definition cleanup and consistency

  • Replaced local DeepWritable type definitions in apps/meteor/app/ui/client/lib/ChatMessages.ts and packages/models/src/models/Messages.ts with imports from @rocket.chat/core-typings, ensuring a single source of truth for this utility type. [1] [2] [3] [4]

Issue(s)

Steps to test or reproduce

Further comments

Review in cubic

Summary by CodeRabbit

  • Refactor
    • Updated message-related type handling to use a shared, centrally maintained deep-writable typing utility.
    • Removed duplicated local type definitions while preserving existing runtime behavior and public interfaces.
    • Improves consistency of deep-writable structures across the UI and model layers with no expected behavior change.

Task: ARCH-2278

@tassoevan tassoevan added this to the 8.7.0 milestone Jul 4, 2026
@tassoevan
tassoevan requested a review from a team as a code owner July 4, 2026 05:13
@dionisio-bot

dionisio-bot Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

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

@changeset-bot

changeset-bot Bot commented Jul 4, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 578ba65

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

coderabbitai Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4133a9b7-6cfb-4501-a368-1efbe210e65a

📥 Commits

Reviewing files that changed from the base of the PR and between fe6f0f6 and 578ba65.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (2)
  • apps/meteor/app/ui/client/lib/ChatMessages.ts
  • packages/models/src/models/Messages.ts
✅ Files skipped from review due to trivial changes (2)
  • packages/models/src/models/Messages.ts
  • apps/meteor/app/ui/client/lib/ChatMessages.ts
📜 Recent review details
⏰ Context from checks skipped due to timeout. (3)
  • GitHub Check: 📦 Build Packages
  • GitHub Check: CodeQL-Build
  • GitHub Check: CodeQL-Build

Walkthrough

Removed local DeepWritable<T> aliases from ChatMessages.ts and Messages.ts, and switched both files to use the shared DeepWritable type from @rocket.chat/core-typings.

Changes

DeepWritable type consolidation

Layer / File(s) Summary
Replace local type alias with shared import
apps/meteor/app/ui/client/lib/ChatMessages.ts, packages/models/src/models/Messages.ts
Both files now import DeepWritable from @rocket.chat/core-typings and no longer declare the type locally.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Suggested labels: type: chore

🚥 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 clearly describes the main change: removing local DeepWritable definitions in favor of a shared import.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 3 files

Re-trigger cubic

@codecov

codecov Bot commented Jul 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.27%. Comparing base (0759f83) to head (578ba65).
⚠️ Report is 5 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #41185      +/-   ##
===========================================
- Coverage    69.29%   69.27%   -0.03%     
===========================================
  Files         3551     3551              
  Lines       139776   139776              
  Branches     24891    24832      -59     
===========================================
- Hits         96863    96835      -28     
- Misses       38893    38919      +26     
- Partials      4020     4022       +2     
Flag Coverage Δ
e2e 59.37% <ø> (-0.04%) ⬇️
e2e-api 49.77% <ø> (-0.03%) ⬇️
unit 70.12% <ø> (-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.

@tassoevan
tassoevan force-pushed the refactor/deep-writable branch from cfacb04 to fe6f0f6 Compare July 4, 2026 12:06
@tassoevan
tassoevan force-pushed the refactor/deep-writable branch from fe6f0f6 to 578ba65 Compare July 6, 2026 14:07
@tassoevan tassoevan added the stat: QA assured Means it has been tested and approved by a company insider label Jul 6, 2026
@dionisio-bot dionisio-bot Bot added the stat: ready to merge PR tested and approved waiting for merge label Jul 6, 2026
@tassoevan
tassoevan enabled auto-merge July 6, 2026 21:25
@ggazzo
ggazzo disabled auto-merge July 6, 2026 21:49
@ggazzo
ggazzo merged commit 44f2b6b into develop Jul 6, 2026
47 checks passed
@ggazzo
ggazzo deleted the refactor/deep-writable branch July 6, 2026 21:49
@ggazzo

ggazzo commented Jul 20, 2026

Copy link
Copy Markdown
Member

/jira ARCH-2228

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 type: chore

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants