Skip to content

Gate iOS glass layout on native support#4032

Open
juliusmarminge wants to merge 1 commit into
mainfrom
t3code/fix-ios18-non-glass-overlaps
Open

Gate iOS glass layout on native support#4032
juliusmarminge wants to merge 1 commit into
mainfrom
t3code/fix-ios18-non-glass-overlaps

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Jul 16, 2026

Copy link
Copy Markdown
Member

Summary

  • Add a shared native liquid-glass capability check for iOS-only glass behavior.
  • Fall back to solid headers and non-overlapping scroll inset behavior when native glass is unavailable.
  • Adjust affected mobile home, files, thread, and sidebar screens to avoid pre-glass iOS header/content overlaps.

Testing

  • Added unit coverage for supportsNativeLiquidGlass platform and capability gating.
  • Not run: validation commands not provided in prompt.

Note

Low Risk
Presentation and scroll/header layout only, scoped to iOS when native liquid glass is unavailable; logic is centralized and covered by a small unit test.

Overview
Introduces NATIVE_LIQUID_GLASS_SUPPORTED (iOS + @callstack/liquid-glass runtime check) and replaces broad Platform.OS === "ios" glass assumptions with that flag.

Headers and scroll chrome: GLASS_HEADER_OPTIONS and the iPad sidebar stack use transparent headers, scroll-edge effects, and editor nav style only when glass is supported; otherwise they use opaque sheet-colored headers so content sits below the bar. Home, file tree, thread sidebar lists, and related screens only enable automatic content inset adjustment and glass-specific scroll indicator insets when supported.

Thread UI: ThreadRouteScreen ties usesNativeHeaderGlass / automatic content insets to the same flag; the “Working for …” pill on pre-glass iOS uses card/border styling instead of translucent neutrals.

Adds supportsNativeLiquidGlass with unit tests for platform and capability gating.

Reviewed by Cursor Bugbot for commit 9880bae. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Gate iOS glass layout behavior on native liquid glass capability

  • Introduces a NATIVE_LIQUID_GLASS_SUPPORTED runtime flag in native-glass.ts, derived from a new supportsNativeLiquidGlass helper that checks both Platform.OS === 'ios' and a native capability flag.
  • Replaces all Platform.OS === 'ios' checks for glass-related UI (transparent headers, scroll edge effects, content inset adjustments) with NATIVE_LIQUID_GLASS_SUPPORTED across screens and navigation components.
  • On iOS versions without native liquid glass support, headers render with a solid background, content insets are not auto-adjusted, and translucent pill/sidebar styles fall back to solid card styling.
  • Behavioral Change: Pre-liquid-glass iOS devices now receive the same non-glass layout as non-iOS platforms for all affected screens.
📊 Macroscope summarized 9880bae. 9 files reviewed, 0 issues evaluated, 0 issues filtered, 0 comments posted

🗂️ Filtered Issues

No issues evaluated.

- Use solid headers and standard insets when liquid glass is unavailable
- Add native glass capability helper coverage
@coderabbitai

coderabbitai Bot commented Jul 16, 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

Run ID: c42dee07-9b6f-4960-841d-8ff28919ab96

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
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch t3code/fix-ios18-non-glass-overlaps

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Jul 16, 2026
data={visibleNodes}
keyExtractor={(item) => item.node.path}
contentInsetAdjustmentBehavior={Platform.OS === "ios" ? "automatic" : "never"}
contentInsetAdjustmentBehavior={NATIVE_LIQUID_GLASS_SUPPORTED ? "automatic" : "never"}

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.

🟠 High files/FileTreeBrowser.tsx:246

On iOS devices that don't support liquid glass, contentInsetAdjustmentBehavior is now set to "never", so the FlatList receives no automatic top inset and the first file rows render beneath the native header. This regresses from the previous Platform.OS === "ios" ? "automatic" : "never" behavior, which applied the inset on all iOS versions. The gating now uses NATIVE_LIQUID_GLASS_SUPPORTED instead of Platform.OS === "ios", so pre-glass iOS loses the inset even though the header is still translucent. Consider gating on Platform.OS === "ios" (or header translucency) rather than liquid-glass capability.

🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file @apps/mobile/src/features/files/FileTreeBrowser.tsx around line 246:

On iOS devices that don't support liquid glass, `contentInsetAdjustmentBehavior` is now set to `"never"`, so the FlatList receives no automatic top inset and the first file rows render beneath the native header. This regresses from the previous `Platform.OS === "ios" ? "automatic" : "never"` behavior, which applied the inset on all iOS versions. The gating now uses `NATIVE_LIQUID_GLASS_SUPPORTED` instead of `Platform.OS === "ios"`, so pre-glass iOS loses the inset even though the header is still translucent. Consider gating on `Platform.OS === "ios"` (or header translucency) rather than liquid-glass capability.

@macroscopeapp

macroscopeapp Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

1 blocking correctness issue found. An unresolved high-severity comment identifies a potential regression on older iOS devices where content may render beneath the header due to changed inset behavior. This bug concern warrants human review before merging.

You can customize Macroscope's approvability policy. Learn more.

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

Labels

size:M 30-99 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant