Skip to content

Conversation

@gabriellsh
Copy link
Member

@gabriellsh gabriellsh commented Nov 12, 2025

Proposed changes (including videos or screenshots)

Introduces a new method signature to the desktop API in order to allow for dispatching custom notifications.

Issue(s)

VGA-59

Steps to test or reproduce

Further comments

Summary by CodeRabbit

  • New Features
    • Added custom notification functionality supporting voice and text notification types. Users can now configure notifications with title, body, optional avatar, silent mode, and interaction requirements.

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Nov 12, 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 12, 2025

⚠️ No Changeset found

Latest commit: dfd4bd2

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
Copy link
Contributor

coderabbitai bot commented Nov 12, 2025

Walkthrough

Introduces CustomNotificationOptions type to the desktop-api package that defines the structure for custom notifications (type, id, and payload containing title, body, avatar, silent, requireInteraction), and extends the IRocketChatDesktop interface with two new public methods: dispatchCustomNotification and closeCustomNotification.

Changes

Cohort / File(s) Summary
Custom Notification API Additions
packages/desktop-api/src/index.ts
Added new exported type CustomNotificationOptions with fields for notification type ('voice' or 'text'), optional id, and payload object. Extended IRocketChatDesktop interface with dispatchCustomNotification(options: CustomNotificationOptions): void and closeCustomNotification(id: string): void methods for managing custom notifications.

Sequence Diagram

sequenceDiagram
    participant App as Application
    participant API as DesktopAPI
    participant Notif as Notification System
    
    App->>API: dispatchCustomNotification({<br/>type: 'voice' | 'text',<br/>id?: string,<br/>payload: {...}<br/>})
    activate API
    API->>Notif: Process notification
    Notif-->>App: Display notification
    deactivate API
    
    Note over App,Notif: Notification displayed
    
    App->>API: closeCustomNotification(id)
    activate API
    API->>Notif: Dismiss notification
    Notif-->>App: Notification closed
    deactivate API
Loading

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • Type and interface definitions are straightforward additions with no implementation logic
  • Single file modification focused on API surface expansion
  • Clear, well-structured type definition following existing patterns

Poem

🐰 A rabbit's hop brings notifications near,
Voiced or textual, crystal clear!
Dispatch and close with elegant grace,
Custom messages find their place! 📬✨

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Linked Issues check ❓ Inconclusive The linked issue VGA-59 contains no specific coding requirements or objectives to validate against the changes. Review the linked issue description in the original repository to confirm the PR meets all stated requirements for updating the DesktopAPI package.
✅ 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 primary change: adding the dispatchCustomNotification method to the desktop API.
Out of Scope Changes check ✅ Passed All changes are directly related to adding custom notification methods to the desktop API as indicated by the PR objectives.
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/desktopNotif

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 Nov 12, 2025

Codecov Report

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

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #37491      +/-   ##
===========================================
- Coverage    68.98%   68.97%   -0.01%     
===========================================
  Files         3358     3358              
  Lines       114228   114228              
  Branches     20537    20537              
===========================================
- Hits         78796    78787       -9     
- Misses       33343    33352       +9     
  Partials      2089     2089              
Flag Coverage Δ
e2e 57.45% <ø> (-0.02%) ⬇️
e2e-api 42.79% <ø> (-0.06%) ⬇️

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.

@gabriellsh gabriellsh marked this pull request as ready for review November 17, 2025 14:22
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 (1)
packages/desktop-api/src/index.ts (1)

30-31: Consider consistency with existing notification API.

The new methods use different naming and type conventions compared to the existing notification API:

  • createNotification / destroyNotification vs. dispatchCustomNotification / closeCustomNotification
  • createNotification returns Promise<unknown> vs. dispatchCustomNotification returns void
  • destroyNotification takes id: unknown vs. closeCustomNotification takes id: string

If these differences are intentional (e.g., custom notifications work synchronously), consider adding JSDoc comments to clarify the distinction. Otherwise, aligning the naming and signatures would improve API consistency.

📜 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 9a57017 and dfd4bd2.

📒 Files selected for processing (1)
  • packages/desktop-api/src/index.ts (1 hunks)
⏰ 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

@gabriellsh gabriellsh added this to the 7.13.0 milestone Nov 17, 2025
@gabriellsh gabriellsh added the stat: QA assured Means it has been tested and approved by a company insider label Nov 17, 2025
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Nov 17, 2025
@github-actions
Copy link
Contributor

📦 Docker Image Size Report

📈 Changes

Service Current Baseline Change Percent
sum of all images 1.2GiB 1.2GiB +12MiB
rocketchat 365MiB 354MiB +12MiB
omnichannel-transcript-service 141MiB 141MiB -1.2KiB
queue-worker-service 141MiB 141MiB -1.6KiB
ddp-streamer-service 127MiB 127MiB +453B
account-service 114MiB 114MiB +38B
stream-hub-service 111MiB 111MiB -340B
authorization-service 111MiB 111MiB -6B
presence-service 111MiB 111MiB +2.3KiB

📊 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 19:34", "11/15 19:47", "11/15 20:39", "11/15 21:23", "11/15 21:37", "11/15 22:04", "11/15 22:28", "11/16 00:55", "11/16 01:28", "11/17 12:35", "11/17 12:48", "11/17 12:54", "11/17 14:13", "11/17 14:38 (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]
  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]
  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]
  line "omnichannel-transcript-service" [0.14, 0.14, 0.14, 0.14, 0.14, 0.14, 0.14, 0.14, 0.14, 0.14, 0.14, 0.14, 0.14, 0.14]
  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]
  line "queue-worker-service" [0.14, 0.14, 0.14, 0.14, 0.14, 0.14, 0.14, 0.14, 0.14, 0.14, 0.14, 0.14, 0.14, 0.14]
  line "rocketchat" [0.36, 0.36, 0.36, 0.36, 0.36, 0.36, 0.36, 0.36, 0.36, 0.35, 0.35, 0.35, 0.35, 0.36]
  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]
Loading

Statistics (last 13 days):

  • 📊 Average: 1.3GiB
  • ⬇️ 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-37491
  • Baseline: develop
  • Timestamp: 2025-11-17 14:38:06 UTC
  • Historical data points: 13

Updated: Mon, 17 Nov 2025 14:38:07 GMT

@kodiakhq kodiakhq bot merged commit 2b79c70 into develop Nov 17, 2025
53 checks passed
@kodiakhq kodiakhq bot deleted the feat/desktopNotif branch November 17, 2025 15:02
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.

3 participants