Skip to content

fix: app crashing because of ModalSectionSelects#6952

Open
divyanshu-patil wants to merge 2 commits intoRocketChat:developfrom
divyanshu-patil:fix/ModalSectionSelects_crashing_app
Open

fix: app crashing because of ModalSectionSelects#6952
divyanshu-patil wants to merge 2 commits intoRocketChat:developfrom
divyanshu-patil:fix/ModalSectionSelects_crashing_app

Conversation

@divyanshu-patil
Copy link

@divyanshu-patil divyanshu-patil commented Jan 28, 2026

Proposed changes

  • Replace <Text> wrapper with <View> - allows complex components like <Markdown> to render
  • Remove { color: themes[theme].fontDefault } inline style (no longer needed without <Text>)

Issue(s)

closes #6951

How to test or reproduce

Screenshots

app.crash.fix.mp4

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 28, 2026

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (2)
  • app/containers/UIKit/__snapshots__/UiKitMessage.test.tsx.snap is excluded by !**/*.snap
  • app/containers/UIKit/__snapshots__/UiKitModal.test.tsx.snap is excluded by !**/*.snap

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 🔍 Trigger a full review

Walkthrough

The Section component was refactored to remove Text import and theme-based color styling. Fields component now renders each field within View wrappers instead of Text components, and no longer accepts a theme parameter. This resolves the crash when rendering ModalSectionSelects with section blocks.

Changes

Cohort / File(s) Summary
Component Structure Refactor
app/containers/UIKit/Section.tsx
Removed Text import from react-native and theme constants import. Removed flex: 1 from styles.text. Modified Fields component to drop theme parameter and render fields within View wrappers instead of Text components with color styling. Updated Section to no longer pass theme prop to Fields.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Suggested reviewers

  • diegolmello

Poem

🐰 A View replaces Text with grace,
No theme to tangle up the place,
The Modal crashed, but now it's free,
One simple fix, one harmony! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The code changes directly address the root cause identified in issue #6951: removing Text wrapping and theme-based styling from the Section component to prevent layout/rendering crashes when modals contain section blocks with fields.
Out of Scope Changes check ✅ Passed All changes in Section.tsx are directly scoped to fixing the ModalSectionSelects crash by removing problematic Text wrapping and theme styling; no unrelated modifications are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title mentions fixing ModalSectionSelects crashing, which directly addresses the root cause described in the linked issue. However, the actual change (removing Text wrapping from Section component) is more specific than the title suggests.

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

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • 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.

@divyanshu-patil divyanshu-patil changed the title fix: prevnt crashing of ModalSectionSelects fix: prevent crashing of ModalSectionSelects Jan 28, 2026
@divyanshu-patil divyanshu-patil changed the title fix: prevent crashing of ModalSectionSelects fix: app crashing because of ModalSectionSelects Jan 28, 2026
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.

bug: app crashes when opening ModalSectionSelects

1 participant