Skip to content

Conversation

@Rohit3523
Copy link
Contributor

@Rohit3523 Rohit3523 commented Jan 19, 2026

Proposed changes

App does not follow the default browser behavior. Even when the setting is configured to open links inside the app, links are always opened in an external browser. Additionally, instead of showing the actual text, the app displays the i18n key.

Note for reviewer

I have tested this behavior on Android and can confirm it is working correctly now. Selecting “In App” opens the link in an in-app tab instead of the external browser.
I haven’t tested this on iOS yet.

Issue(s)

https://rocketchat.atlassian.net/browse/CORE-1732

How to test or reproduce

  1. Go to settings
  2. Click on "Default Browser"
  3. It shows i18n keys
  4. Select "In App"
  5. Go to any room and click on link
  6. It opens the link in external browser

Screenshots

Screenshot 2026-01-22 at 1 01 45 AM

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 apply)

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

Summary by CodeRabbit

  • New Features

    • Added explicit browser option types and improved persistence when changing the default browser.
  • Bug Fixes

    • Fixed default browser selection detection so the correct option is shown as selected.
    • Improved translation handling for specific browser option labels.

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 19, 2026

Walkthrough

Updated DefaultBrowserView: introduced a typed browser identifier TType, switched title typing to TType, changed changeDefaultBrowser to resolve values against DEFAULT_BROWSERS/BROWSERS with fallback, persist the resolved browser key, compared selection by value instead of title, and adjusted title-translation logic to check specific items.

Changes

Cohort / File(s) Summary
Browser selection & types
app/views/DefaultBrowserView/index.tsx
Added `export type TType = 'In_app'
Selection & translation logic
app/views/DefaultBrowserView/index.tsx
Switched selection comparison to item.value === browser; changed translation behavior to conditionally translate titles by checking item.title against a set of keys instead of a fixed boolean flag.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • OtavioStasiak

Poem

🐰 In fields of code I nibble and hop,
Types snug in burrows, logic won't stop.
Titles translate, selections true,
Links now open where they’re due.
Hooray — a tidy browser hop! 🥕

🚥 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 accurately describes the main change—a fix to the default browser setting behavior and translation display issue.
Linked Issues check ✅ Passed The code changes address both objectives: respecting the default browser setting (updated ChangeDefaultBrowser logic) and displaying translated text instead of i18n keys (updated translateTitle logic).
Out of Scope Changes check ✅ Passed All changes are scoped to fixing the default browser setting behavior and i18n key translation display in the DefaultBrowserView component.
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 default-browser-fix

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.

@Rohit3523 Rohit3523 marked this pull request as ready for review January 19, 2026 20:27
@Rohit3523
Copy link
Contributor Author

@coderabbitai review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 19, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 19, 2026

Note

Unit test generation is an Early Access feature. Expect some limitations and changes as we gather feedback and continue to improve it.


Generating unit tests... This may take up to 20 minutes.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 19, 2026

Here are the copyable unit test edits:

Copyable Edits

@Rohit3523 Rohit3523 temporarily deployed to approve_e2e_testing January 20, 2026 16:47 — with GitHub Actions Inactive
@Rohit3523 Rohit3523 temporarily deployed to experimental_android_build January 20, 2026 16:50 — with GitHub Actions Inactive
@Rohit3523 Rohit3523 temporarily deployed to experimental_ios_build January 20, 2026 16:50 — with GitHub Actions Inactive
@Rohit3523 Rohit3523 had a problem deploying to official_android_build January 20, 2026 16:50 — with GitHub Actions Error
@Rohit3523 Rohit3523 had a problem deploying to upload_experimental_android January 20, 2026 17:24 — with GitHub Actions Error
@github-actions
Copy link

Android Build Available

Rocket.Chat Experimental 4.69.0.108192

Internal App Sharing: https://play.google.com/apps/test/RQVpXLytHNc/ahAO29uNQnZNMDTWcExHhSchnMlxBl-vv4Co-A_RvysQjHBXCb5SbpNQVgoKcDLLF1x63rypMIm6DPiF68j7LBiqGA

@github-actions
Copy link

iOS Build Available

Rocket.Chat Experimental 4.69.0.108193

title={item.title}
value={item.value}
translateTitle={false}
translateTitle={true}
Copy link
Contributor

Choose a reason for hiding this comment

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

IMG_6001

Browsers don't have translation.

@Rohit3523 Rohit3523 requested a deployment to approve_e2e_testing January 21, 2026 20:37 — with GitHub Actions Waiting
@Rohit3523 Rohit3523 requested a deployment to experimental_android_build January 21, 2026 20:41 — with GitHub Actions Waiting
@Rohit3523 Rohit3523 temporarily deployed to experimental_ios_build January 21, 2026 20:41 — with GitHub Actions Inactive
@Rohit3523 Rohit3523 requested a deployment to official_android_build January 21, 2026 20:41 — with GitHub Actions Waiting
@github-actions
Copy link

iOS Build Available

Rocket.Chat Experimental 4.69.0.108198

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants