Gate iOS glass layout on native support#4032
Conversation
- Use solid headers and standard insets when liquid glass is unavailable - Add native glass capability helper coverage
|
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 Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
| data={visibleNodes} | ||
| keyExtractor={(item) => item.node.path} | ||
| contentInsetAdjustmentBehavior={Platform.OS === "ios" ? "automatic" : "never"} | ||
| contentInsetAdjustmentBehavior={NATIVE_LIQUID_GLASS_SUPPORTED ? "automatic" : "never"} |
There was a problem hiding this comment.
🟠 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.
ApprovabilityVerdict: 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. |
Summary
Testing
supportsNativeLiquidGlassplatform and capability gating.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-glassruntime check) and replaces broadPlatform.OS === "ios"glass assumptions with that flag.Headers and scroll chrome:
GLASS_HEADER_OPTIONSand 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:
ThreadRouteScreentiesusesNativeHeaderGlass/ automatic content insets to the same flag; the “Working for …” pill on pre-glass iOS uses card/border styling instead of translucent neutrals.Adds
supportsNativeLiquidGlasswith 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
NATIVE_LIQUID_GLASS_SUPPORTEDruntime flag in native-glass.ts, derived from a newsupportsNativeLiquidGlasshelper that checks bothPlatform.OS === 'ios'and a native capability flag.Platform.OS === 'ios'checks for glass-related UI (transparent headers, scroll edge effects, content inset adjustments) withNATIVE_LIQUID_GLASS_SUPPORTEDacross screens and navigation components.📊 Macroscope summarized 9880bae. 9 files reviewed, 0 issues evaluated, 0 issues filtered, 0 comments posted
🗂️ Filtered Issues
No issues evaluated.