Skip to content

fix(mobile): keep the file tree clear of the translucent header - #8129

Open
Xalior wants to merge 2 commits into
pingdotgg:mainfrom
Xalior:fix/file-tree-header-inset
Open

fix(mobile): keep the file tree clear of the translucent header#8129
Xalior wants to merge 2 commits into
pingdotgg:mainfrom
Xalior:fix/file-tree-header-inset

Conversation

@Xalior

@Xalior Xalior commented Aug 24, 2026

Copy link
Copy Markdown

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.

const headerInset = NATIVE_LIQUID_GLASS_SUPPORTED ? insets.top + IOS_NAV_BAR_HEIGHT : 0;

UI Changes

Before:
image

After:
Screenshot 2026-08-24 at 19 58 37

iOS26 unchanged, since I presume most folks don't keep old iPads around for legacy app testing like I do ;-)

image

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

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.

headerInset is always insets.top + IOS_NAV_BAR_HEIGHT (not only when Liquid Glass is supported). scrollIndicatorInsets always uses that top inset. contentContainerStyle.paddingTop stays 8 with contentInsetAdjustmentBehavior: "automatic" on Liquid Glass; otherwise padding is headerInset + 8 with adjustment set to never, 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 FileTreeBrowser content overlap with translucent header

When NATIVE_LIQUID_GLASS_SUPPORTED is false, the file tree list no longer sits under the translucent header. headerInset is now always insets.top + IOS_NAV_BAR_HEIGHT, scrollIndicatorInsets always applies the top inset, and paddingTop uses headerInset + 8 instead of a flat 8. Risk: list content shifts downward on devices where NATIVE_LIQUID_GLASS_SUPPORTED is false; verify the extra padding does not cause unwanted whitespace on screens with small insets.top.

Macroscope summarized 4139ec9.

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>
@coderabbitai

coderabbitai Bot commented Aug 24, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e35691a7-7ae5-4380-9b0e-f45aa92cae25

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

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Aug 24, 2026
windowSize={5}
contentContainerStyle={{ paddingTop: 8, paddingBottom: 8 }}
contentContainerStyle={{
paddingTop: NATIVE_LIQUID_GLASS_SUPPORTED ? 8 : headerInset + 8,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 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.

@macroscopeapp

macroscopeapp Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: 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:

  • 1 blocking correctness issue found at or above your repo's Minimum Blocking Severity

Adjust the Minimum Blocking Severity for this repo — including turning it Off — in Settings. You can add or adjust custom eligibility rules. Learn more.

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ 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,
}}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 2913955. Configure here.

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

Labels

size:S 10-29 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant