fix(mobile): keep the file tree clear of the translucent header - #8129
fix(mobile): keep the file tree clear of the translucent header#8129Xalior wants to merge 2 commits into
Conversation
The header overlays the list on every iOS version, but the inset that compensates for it was only calculated where liquid glass is available. Below that the value was zero, so rows scrolled under a transparent header and were unreadable, and the scroll indicator ran under it too. Who applies the inset is what differs by version, not whether one is needed: with liquid glass the system adjusts the content itself, so the padding is added by hand only where it does not. Co-Authored-By: Claude Fable 5.0 <noreply@anthropic.com>
|
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 |
| windowSize={5} | ||
| contentContainerStyle={{ paddingTop: 8, paddingBottom: 8 }} | ||
| contentContainerStyle={{ | ||
| paddingTop: NATIVE_LIQUID_GLASS_SUPPORTED ? 8 : headerInset + 8, |
There was a problem hiding this comment.
🟡 Medium files/FileTreeBrowser.tsx:256
On Android, contentContainerStyle.paddingTop adds insets.top + IOS_NAV_BAR_HEIGHT + 8 before the first file row, creating an unnecessary large blank gap because AndroidScreenHeader and its search row already render outside the list. The same unconditional headerInset also offsets the scroll indicator; gate both legacy-header insets to iOS rather than all non-Liquid-Glass platforms.
🤖 Copy this AI Prompt to have your agent fix this:
In file @apps/mobile/src/features/files/FileTreeBrowser.tsx around line 256:
On Android, `contentContainerStyle.paddingTop` adds `insets.top + IOS_NAV_BAR_HEIGHT + 8` before the first file row, creating an unnecessary large blank gap because `AndroidScreenHeader` and its search row already render outside the list. The same unconditional `headerInset` also offsets the scroll indicator; gate both legacy-header insets to iOS rather than all non-Liquid-Glass platforms.
ApprovabilityVerdict: Would Approve Macroscope's review found this PR approvable — This is a focused one-file mobile layout fix that adds manual clearance for legacy iOS headers while preserving automatic Liquid-Glass behavior. A Medium-severity finding remains about the same inset being applied to Android’s in-flow header, creating possible excess top spacing and requiring attention before merge. Not approved because:
Adjust the Minimum Blocking Severity for this repo — including turning it Off — in Settings. You can add or adjust custom eligibility rules. Learn more. |
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 2913955. Configure here.
| contentContainerStyle={{ | ||
| paddingTop: NATIVE_LIQUID_GLASS_SUPPORTED ? 8 : headerInset + 8, | ||
| paddingBottom: 8, | ||
| }} |
There was a problem hiding this comment.
Android gets unwanted top inset
Medium Severity
paddingTop falls back to headerInset + 8 whenever NATIVE_LIQUID_GLASS_SUPPORTED is false. That flag is false on Android, so the list gains safe-area plus a 44pt nav bar even though both Android call sites already render their own headers above FileTreeBrowser. Pre-change paddingTop was only 8 on Android; this opens a large empty gap at the top of the Files tree on Android.
Reviewed by Cursor Bugbot for commit 2913955. Configure here.


Tiny fix, for an older iPadOS (non Liquid Glass) UX issue
What Changed
Add inset to files sidebar top on iPadOS<26.
Why
The Files pane header sits over the list scrolls so this just adds an addition inset when there's no Liquid Glass.
Testing
One binary on two iPad (A16) simulators, iOS 18.5 and iOS 26.0, against the same workspace.
Open files sidebar, look at top header. On 18.5 the rows sat under the header before, and below header after - screenshots in UI Changes section, below.
Change:
Dead simple, compute a new const - and then offset by it.
UI Changes
Before:

After:

iOS26 unchanged, since I presume most folks don't keep old iPads around for legacy app testing like I do ;-)
Checklist
Harness: T3-Code as I worked on it, my local fork
Model: Opus & FAble 5, via my model proxy idea I stole off Theo
Note
Low Risk
UI-only layout change on non–Liquid Glass iOS; Liquid Glass path keeps prior padding behavior. Worth a quick check that scroll indicators and top spacing look correct on both paths.
Overview
Fixes the files sidebar FlatList rendering under the navigation header on iOS when Liquid Glass is off (e.g. older iPadOS), where automatic scroll insets do not apply to this nested list.
headerInsetis alwaysinsets.top + IOS_NAV_BAR_HEIGHT(not only when Liquid Glass is supported).scrollIndicatorInsetsalways uses that top inset.contentContainerStyle.paddingTopstays8withcontentInsetAdjustmentBehavior: "automatic"on Liquid Glass; otherwise padding isheaderInset + 8with adjustment set tonever, matching the manual offset path.Reviewed by Cursor Bugbot for commit 4139ec9. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
[!NOTE]
Fix
FileTreeBrowsercontent overlap with translucent headerWhen
NATIVE_LIQUID_GLASS_SUPPORTEDis false, the file tree list no longer sits under the translucent header.headerInsetis now alwaysinsets.top + IOS_NAV_BAR_HEIGHT,scrollIndicatorInsetsalways applies the top inset, andpaddingTopusesheaderInset + 8instead of a flat8. Risk: list content shifts downward on devices whereNATIVE_LIQUID_GLASS_SUPPORTEDis false; verify the extra padding does not cause unwanted whitespace on screens with smallinsets.top.Macroscope summarized 4139ec9.