Skip to content

Conversation

@Rohit3523
Copy link
Contributor

@Rohit3523 Rohit3523 commented Jan 19, 2026

Proposed changes

Issue(s)

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

How to test or reproduce

Screenshots

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

  • Bug Fixes
    • Fixed default browser selection logic to correctly identify the currently selected option
    • Improved translation handling for browser option labels in the selection interface

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 19, 2026

Walkthrough

The DefaultBrowserView component was modified to fix browser selection and translation display issues. A new type TType defines valid browser options, the changeDefaultBrowser function now accepts typed values and resolves them against available browsers, and the selection comparison logic switched from title-based to value-based matching. Translation flags were updated to properly render translated browser names.

Changes

Cohort / File(s) Summary
Browser Selection & Translation
app/views/DefaultBrowserView/index.tsx
Introduced TType union type for browser options; changed IBrowsersValues.title from string to TType; updated changeDefaultBrowser to resolve typed values against DEFAULT_BROWSERS and BROWSERS with fallback; switched isSelected logic from title comparison to value comparison (item.value === browser); enabled translation rendering by changing translateTitle from false to true

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • OtavioStasiak
  • diegolmello

Poem

🐰 A browser's choice, now crystal clear,
No more translations to fear!
Types align, selections shine,
In-app links work by design! ✨

🚥 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 'fix: default browser setting' directly addresses the main change, referring to fixing the default browser functionality issue described in CORE-1732.
Linked Issues check ✅ Passed The code changes implement both issues from CORE-1732: fixing the default browser setting behavior by using TType values for proper matching, and fixing i18n display by changing translateTitle from false to true.
Out of Scope Changes check ✅ Passed All changes are scoped to DefaultBrowserView/index.tsx and directly address the linked issue requirements; no unrelated modifications detected.
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)

✅ Copyable Unit Test edits generated.

  • Create PR with unit tests
  • Commit unit tests in branch default-browser-fix
  • Post copyable unit tests in a comment

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 requested a deployment to approve_e2e_testing January 20, 2026 16:47 — with GitHub Actions Waiting
@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 requested a deployment to official_android_build January 20, 2026 16:50 — with GitHub Actions Waiting
@Rohit3523 Rohit3523 requested a deployment to upload_experimental_android January 20, 2026 17:24 — with GitHub Actions Waiting
@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

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.

2 participants