Skip to content

fix(android): add VoIP notification channel and rename Push_Troubleshooting i18n key#7119

Open
diegolmello wants to merge 6 commits intodevelopfrom
fix.android-trouble-notifications-bell
Open

fix(android): add VoIP notification channel and rename Push_Troubleshooting i18n key#7119
diegolmello wants to merge 6 commits intodevelopfrom
fix.android-trouble-notifications-bell

Conversation

@diegolmello
Copy link
Copy Markdown
Member

@diegolmello diegolmello commented Apr 9, 2026

Proposed changes

Adds VoIP "Calls" notification channel infrastructure and renames the Push_Troubleshooting i18n key to Troubleshooting.

Android Notification Channels

  • Messages (existing, renamed): Channel ID rocketchatrn_channel_01 — display name changed "All" → "Messages"
  • Calls (new): Channel ID rocketchatrn_channel_calls, IMPORTANCE_HIGH — ready for feat.voip-lib-new to route VoIP notifications here

i18n

  • en.json, cs.json, no.json: deleted Push_Troubleshooting key (self-references via i18n-js fallback)
  • pt-BR.json: replaced Push_TroubleshootingTroubleshooting with localized translation "Resolução de Problemas"
  • app/views/PushTroubleshootView/index.tsx: updated to use new key

Issue(s)

https://rocketchat.atlassian.net/browse/VMUX-65

Closes related to notification channel configuration for VoIP readiness.

How to test or reproduce

  • Android: verify "Messages" channel appears in notification settings
  • Android: verify "Calls" channel appears in notification settings
  • Verify PushTroubleshootView title renders correctly in en, pt-BR

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves a current function)
  • New feature (non-breaking change which adds functionality)
  • Documentation update (if none of the other choices applies)

Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works (if applicable)
  • I have added necessary documentation (if applicable)
  • Any dependent changes have been merged and published in downstream modules

Further comments

Known limitation: Android cannot rename a channel's display name in-place. The "All" → "Messages" rename requires deleting and recreating the channel, which resets per-channel user preferences.

i18n tooling: External tooling (Crowdin/Transifex) referencing Push_Troubleshooting will need updates.

Future work: feat.voip-lib-new will remove the VoIP early return at CustomPushNotification.java:115-118 and route VoIP notifications to the "Calls" channel.

Summary by CodeRabbit

  • New Features

    • Android notifications now use separate channels: a "Messages" channel for regular messages and a dedicated channel for calls.
  • Localization

    • Renamed troubleshooting label and updated translations across multiple languages (added a unified "Troubleshooting" key; removed old push-specific key).
    • View header updated to use the new key.

…ooting i18n key

- Add "Calls" notification channel (rocketchatrn_channel_calls, IMPORTANCE_HIGH)
  ready for feat.voip-lib-new to wire up VoIP rendering
- Rename "All" → "Messages" for the existing messages channel
- Rename i18n key Push_Troubleshooting → Troubleshooting in 4 locales
  (en, cs, no deleted the old key; pt-BR replaced with localized translation)

Known limitation: Android cannot rename a channel's display name in-place;
deleting and recreating the channel resets per-channel user preferences.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 9, 2026

Walkthrough

Introduces two Android notification channels (messages and calls) and replaces the Push_Troubleshooting i18n key with Troubleshooting in the Push Troubleshoot view and across locale files.

Changes

Cohort / File(s) Summary
Android Notification Channel Setup
android/app/src/main/java/chat/rocket/reactnative/notification/CustomPushNotification.java
Replaced single "All" channel with Messages and added a new Calls channel (CALLS_CHANNEL_ID/CALLS_CHANNEL_NAME); now creates and registers two NotificationChannel instances.
View i18n Key Update
app/views/PushTroubleshootView/index.tsx
Changed navigation header i18n key from 'Push_Troubleshooting' to 'Troubleshooting'.
Locale Key Removals
app/i18n/locales/cs.json, app/i18n/locales/en.json, app/i18n/locales/no.json
Removed Push_Troubleshooting entries.
Locale Key Replacement (pt-BR)
app/i18n/locales/pt-BR.json
Removed Push_Troubleshooting and added Troubleshooting.
Locale Key Additions (new Troubleshooting key)
app/i18n/locales/ar.json, app/i18n/locales/bn-IN.json, app/i18n/locales/de.json, app/i18n/locales/es.json, app/i18n/locales/fi.json, app/i18n/locales/fr.json, app/i18n/locales/hi-IN.json, app/i18n/locales/hu.json, app/i18n/locales/it.json, app/i18n/locales/ja.json, app/i18n/locales/nl.json, app/i18n/locales/pt-PT.json, app/i18n/locales/ru.json, app/i18n/locales/sl-SI.json, app/i18n/locales/sv.json, app/i18n/locales/ta-IN.json, app/i18n/locales/te-IN.json, app/i18n/locales/tr.json, app/i18n/locales/zh-CN.json, app/i18n/locales/zh-TW.json
Added new Troubleshooting translation key in 20 locale files (localized strings added).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 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 (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the two main changes: adding a VoIP notification channel for Android and renaming the i18n key from 'Push_Troubleshooting' to 'Troubleshooting'.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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


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.

Copy link
Copy Markdown
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.

🧹 Nitpick comments (1)
android/app/src/main/java/chat/rocket/reactnative/notification/CustomPushNotification.java (1)

304-317: callsChannel is created but not wired to the notification building flow.

The new CALLS_CHANNEL_ID channel is defined and created in this file (lines 55, 310), but buildNotification() (line 353) always uses CHANNEL_ID instead, so the Calls notification settings won't affect actual call alerts. Additionally, voip notifications are ignored entirely (lines 117-120) and routed elsewhere via VideoConfNotification, which uses its own video-conf-call channel.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@android/app/src/main/java/chat/rocket/reactnative/notification/CustomPushNotification.java`
around lines 304 - 317, The calls NotificationChannel (callsChannel /
CALLS_CHANNEL_ID) is never used when building notifications; update
buildNotification() to select CHANNEL_ID for regular messages and
CALLS_CHANNEL_ID for call-type alerts (detect by the notification type or
payload flag used for calls/voip) so call notifications are posted to the
callsChannel; also adjust the voip handling (the voip branch and
VideoConfNotification usage) so voip/call payloads are either routed through
buildNotification() with CALLS_CHANNEL_ID or ensure VideoConfNotification
explicitly uses the same CALLS_CHANNEL_ID (instead of a separate
"video-conf-call" channel) so call-related notification settings apply
consistently.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In
`@android/app/src/main/java/chat/rocket/reactnative/notification/CustomPushNotification.java`:
- Around line 304-317: The calls NotificationChannel (callsChannel /
CALLS_CHANNEL_ID) is never used when building notifications; update
buildNotification() to select CHANNEL_ID for regular messages and
CALLS_CHANNEL_ID for call-type alerts (detect by the notification type or
payload flag used for calls/voip) so call notifications are posted to the
callsChannel; also adjust the voip handling (the voip branch and
VideoConfNotification usage) so voip/call payloads are either routed through
buildNotification() with CALLS_CHANNEL_ID or ensure VideoConfNotification
explicitly uses the same CALLS_CHANNEL_ID (instead of a separate
"video-conf-call" channel) so call-related notification settings apply
consistently.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b53f4101-f100-4052-bb71-ae2175fc624c

📥 Commits

Reviewing files that changed from the base of the PR and between cb0feee and d6e73f7.

📒 Files selected for processing (7)
  • android/app/src/main/java/chat/rocket/reactnative/notification/CustomPushNotification.java
  • app/i18n/locales/af.json
  • app/i18n/locales/cs.json
  • app/i18n/locales/en.json
  • app/i18n/locales/no.json
  • app/i18n/locales/pt-BR.json
  • app/views/PushTroubleshootView/index.tsx
💤 Files with no reviewable changes (3)
  • app/i18n/locales/en.json
  • app/i18n/locales/cs.json
  • app/i18n/locales/no.json
📜 Review details
🧰 Additional context used
📓 Path-based instructions (6)
**/*.{js,jsx,ts,tsx,json}

📄 CodeRabbit inference engine (CLAUDE.md)

Configure Prettier with tabs, single quotes, 130 character width, no trailing commas, arrow parens avoid, and bracket same line

Files:

  • app/i18n/locales/af.json
  • app/views/PushTroubleshootView/index.tsx
  • app/i18n/locales/pt-BR.json
app/i18n/**/*

📄 CodeRabbit inference engine (CLAUDE.md)

Place internationalization configuration and locales in app/i18n/ with support for 40+ languages and RTL

Files:

  • app/i18n/locales/af.json
  • app/i18n/locales/pt-BR.json
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Use ESLint with @rocket.chat/eslint-config base configuration including React, React Native, TypeScript, and Jest plugins

Files:

  • app/views/PushTroubleshootView/index.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Use TypeScript with strict mode enabled and configure baseUrl to app/ for import resolution

**/*.{ts,tsx}: Use TypeScript for type safety; add explicit type annotations to function parameters and return types
Prefer interfaces over type aliases for defining object shapes in TypeScript
Use enums for sets of related constants rather than magic strings or numbers

Files:

  • app/views/PushTroubleshootView/index.tsx
app/views/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Place screen components in app/views/ directory

Files:

  • app/views/PushTroubleshootView/index.tsx
**/*.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{js,ts,jsx,tsx}: Use descriptive names for functions, variables, and classes that clearly convey their purpose
Write comments that explain the 'why' behind code decisions, not the 'what'
Keep functions small and focused on a single responsibility
Use const by default, let when reassignment is needed, and avoid var
Prefer async/await over .then() chains for handling asynchronous operations
Use explicit error handling with try/catch blocks for async operations
Avoid deeply nested code; refactor complex logic into helper functions

Files:

  • app/views/PushTroubleshootView/index.tsx
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
Repo: RocketChat/Rocket.Chat.ReactNative PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-07T17:49:17.538Z
Learning: Applies to app/lib/services/voip/**/*.{ts,tsx} : Implement VoIP with WebRTC peer-to-peer audio calls in app/lib/services/voip/ using Zustand stores instead of Redux, with native CallKit (iOS) and Telecom (Android) integration; keep VoIP and VideoConf separate
🔇 Additional comments (4)
app/i18n/locales/af.json (1)

2-2: Good key migration for locale fallback.

Adding Troubleshooting here is consistent with the renamed key and keeps fallback behavior intact.

app/views/PushTroubleshootView/index.tsx (1)

31-31: Key rename applied correctly in navigation title.

I18n.t('Troubleshooting') matches the new locale key and keeps the screen title aligned with the i18n changes.

app/i18n/locales/pt-BR.json (1)

889-889: pt-BR translation update looks good.

"Resolução de Problemas" is a solid localized value for the renamed Troubleshooting key.

android/app/src/main/java/chat/rocket/reactnative/notification/CustomPushNotification.java (1)

54-56: Good channel split setup with stable message channel ID.

Keeping CHANNEL_ID unchanged while introducing dedicated calls constants is a safe migration approach.

PR #7119 incorrectly added Troubleshooting to af.json (unsupported locale)
instead of the 20 supported locales that were missing it.

- Revert af.json to empty {}
- Add "Troubleshooting": "Troubleshooting" to all LANGUAGES locales
  that were missing the key
diegolmello and others added 2 commits April 9, 2026 20:51
…d locales

PR #7119 only renamed Push_Troubleshooting → Troubleshooting in 4 locales,
leaving 20 supported locales without the key.

- Add "Troubleshooting" with proper translations to all LANGUAGES locales
  (ar, bn-IN, de, es, fi, fr, hi-IN, hu, it, ja, nl, pt-PT, ru, sl-SI,
   sv, ta-IN, te-IN, tr, zh-CN, zh-TW)
- Locales en, cs, no, nn, pt-BR already had the key from before the PR
- af.json reverted to {} (not a supported locale)
@diegolmello diegolmello requested a deployment to approve_e2e_testing April 9, 2026 20:59 — with GitHub Actions Waiting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant