fix(mobile): remove redundant search bar insets - #4907
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit dce3c2b. Configure here.
| + [searchField.leadingAnchor constraintEqualToAnchor:glassView.contentView.leadingAnchor constant:14.0], | ||
| + [searchField.trailingAnchor constraintEqualToAnchor:glassView.contentView.trailingAnchor constant:-14.0], | ||
| + [searchField.leadingAnchor constraintEqualToAnchor:glassView.contentView.leadingAnchor constant:1.0], | ||
| + [searchField.trailingAnchor constraintEqualToAnchor:glassView.contentView.trailingAnchor constant:1.0], |
There was a problem hiding this comment.
Trailing constraint sign inverted
Medium Severity
The searchField's trailing constraint uses constant:1.0, which incorrectly pushes its trailing edge outside glassView.contentView. Unlike the previous -14.0 or parallel -8.0 values, this results in asymmetric horizontal padding and may cause content to clip.
Reviewed by Cursor Bugbot for commit dce3c2b. Configure here.
ApprovabilityVerdict: Needs human review An unresolved review comment identifies a potential bug: the trailing constraint constant should likely be -1.0, not +1.0, per iOS Auto Layout conventions. This could cause the search field to extend outside its container. Human verification is recommended. You can customize Macroscope's approvability policy. Learn more. |
|
The potential issue flagged is intentional for the sake of optical alignment based on real app screenshots. |


What Changed
Updated the
react-native-screenspatch so the native search field's leading/trailing constraints use a 1.0pt constant instead of 14.0pt (what looked best to me), removing a redundant inset that was doubling up with existing padding. Bumped the patch hash and refreshedpnpm-lock.yamlaccordingly.Why
The search bar in the glass header had extra horizontal inset baked into the native patch on top of insets already applied elsewhere, making the search field appear narrower than intended.
UI Changes
Before
After
Checklist
Note
Low Risk
Visual/layout-only change in a patched iOS native constraint; no auth, data, or business-logic impact.
Overview
Tightens horizontal layout for the fallback native search field inside the glass mail-search toolbar by changing its leading/trailing layout constraints from 14pt to 1pt, so the field is not inset twice alongside other padding.
The
react-native-screenspatch hash is updated andpnpm-lock.yamlis refreshed so installs pick up the revised patch.Reviewed by Cursor Bugbot for commit dce3c2b. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Remove redundant horizontal insets from mobile search bar
Patches
react-native-screensto reduce the leading and trailing anchor constants for the search field from 14.0pt to 1.0pt, removing the extra horizontal padding inside the glass view's content view. Applied via patches/react-native-screens@4.25.2.patch.Macroscope summarized dce3c2b.