Skip to content

Enhance iOS overscroll support with layout adjustments and safe area …#511

Merged
felix-schultz merged 1 commit intodevfrom
fix/497-overscroll-on-ios
Feb 14, 2026
Merged

Enhance iOS overscroll support with layout adjustments and safe area …#511
felix-schultz merged 1 commit intodevfrom
fix/497-overscroll-on-ios

Conversation

@felix-schultz
Copy link
Copy Markdown
Member

This pull request focuses on improving layout consistency, safe area handling (especially for desktop and iOS), and overall visual polish across the chat and sidebar interfaces. The changes ensure that padding, height, and overflow behaviors are correct in various environments, and that the UI adapts smoothly to device safe areas.

Safe area and layout improvements:

  • Added min-h-screen to the root layout container in apps/desktop/app/layout.tsx to ensure the app fills the viewport vertically.
  • Updated multiple components (ChatInterface, ChatHistory) to add paddingTop using CSS variables for safe area insets, improving support for devices with notches or special display areas. [1] [2]
  • Changed the chat input container to use paddingBottom that includes the safe area inset, ensuring it isn't obscured on devices with bottom safe areas.

Sidebar and main content adjustments:

  • Removed the IOSQuickMenuTrigger and adjusted sidebar and main content area heights and overflow to better fit the viewport and prevent unwanted scrolling or clipping, especially on iOS.
  • Improved the sidebar wrapper and inset CSS to use 100dvh and properly constrain overflow, ensuring the sidebar and main content fill the screen without causing body overflow.

General background and overflow fixes:

  • Applied bg-background to the html element for consistent background color across the app.
  • Updated chat container class names and layout structure to use flex-1 min-h-0 patterns, which provide more reliable flexbox sizing and overflow handling.

These changes collectively provide a more robust and visually consistent experience across different devices and environments.…handling

@felix-schultz felix-schultz linked an issue Feb 14, 2026 that may be closed by this pull request
@felix-schultz felix-schultz merged commit ef5a7fa into dev Feb 14, 2026
6 of 13 checks passed
@felix-schultz felix-schultz deleted the fix/497-overscroll-on-ios branch February 14, 2026 08:59
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @felix-schultz, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly improves the application's layout and visual consistency across various devices, with a particular focus on iOS and desktop environments. The changes ensure that UI elements correctly adapt to safe areas, prevent content overflow, and maintain a polished appearance by refining how heights, padding, and background colors are applied throughout the chat and sidebar components.

Highlights

  • Enhanced Safe Area Support: Implemented dynamic paddingTop and paddingBottom using CSS variables (--fl-safe-top, --fl-safe-bottom) to correctly account for device safe areas (e.g., notches, bottom bars) in the chat interface and history components, preventing content from being obscured.
  • Improved Layout Consistency and Overflow Handling: Adjusted core layout components to use min-h-screen on the root HTML element and flex-1 min-h-0 patterns within chat containers, ensuring proper vertical filling and overflow management across different devices, especially on iOS and desktop.
  • Sidebar Refinements: Removed the IOSQuickMenuTrigger component and refined sidebar and main content area heights and overflow properties, utilizing 100dvh and overflow: hidden to prevent unwanted scrolling and clipping, creating a more fluid user experience.
  • General Styling and Background Fixes: Applied bg-background to the html element for consistent background color and removed redundant height declarations on html and body elements for desktop apps, relying on position: fixed and inset: 0 for proper viewport sizing.
Changelog
  • apps/desktop/app/layout.tsx
    • Added min-h-screen class to the root HTML element to ensure it fills the viewport vertically.
  • apps/desktop/components/app-sidebar.tsx
    • Removed the IOSQuickMenuTrigger component.
    • Adjusted the main element's style by removing explicit height and retaining paddingTop for safe area.
    • Updated FlowBackground component to include h-full class for proper height within its flex container.
  • packages/ui/components/interfaces/chat-default.tsx
    • Applied paddingTop with safe area inset to the chat history trigger div.
  • packages/ui/components/interfaces/chat-default/chat.tsx
    • Modified the main element's classes to use flex-1 min-h-0 for better flexbox sizing and overflow handling.
    • Updated the inner content div to use flex-1 min-h-0 classes.
    • Changed the chat input container's background to bg-background and added paddingBottom with safe area inset.
  • packages/ui/components/interfaces/chat-default/history.tsx
    • Added paddingTop with safe area inset to the chat history header div.
  • packages/ui/global.css
    • Applied bg-background class to the html element for consistent background.
    • Added margin: 0, width: 100%, and height: 100% to the body element when position: fixed and inset: 0 are applied.
    • Removed explicit height declaration from html:where([data-desktop-app]).
    • Modified sidebar-wrapper styles for desktop apps to set height and max-height to 100dvh and overflow: hidden.
    • Added min-height: 0 to sidebar-inset for desktop apps to ensure it fills its parent without overflow.
Activity
  • No human activity has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request does a great job of enhancing the UI for iOS and desktop by addressing overscroll behavior and safe area insets. The layout adjustments, such as using flex-1 min-h-0 and 100dvh, are solid improvements for creating a more robust and consistent experience across devices.

I've added a few suggestions to further improve the code by using Tailwind CSS's arbitrary value syntax instead of inline styles for consistency. I also spotted a minor formatting issue. Overall, these are excellent changes that significantly improve the application's mobile experience.

}}
>
<div className="flex items-center gap-2 text-sm font-medium">
<div className="flex items-center gap-2 text-sm font-medium" style={{paddingTop: "var(--fl-safe-top, env(safe-area-inset-top, 0px))"}}>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

To maintain a consistent styling approach with Tailwind CSS, consider using an arbitrary value for padding within the className prop instead of an inline style. This keeps styling declarations consolidated and improves readability.

Suggested change
<div className="flex items-center gap-2 text-sm font-medium" style={{paddingTop: "var(--fl-safe-top, env(safe-area-inset-top, 0px))"}}>
<div className="flex items-center gap-2 text-sm font-medium pt-[var(--fl-safe-top,env(safe-area-inset-top,0px))]">

Comment on lines +345 to +351
<div
className="bg-background px-2 pb-2 max-w-screen-lg w-full mx-auto"
style={{
paddingBottom:
"calc(0.5rem + var(--fl-safe-bottom, env(safe-area-inset-bottom, 0px)))",
}}
>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

For consistency with the project's use of Tailwind CSS, it's better to use arbitrary values in the className prop instead of inline styles. This also allows removing the redundant pb-2 class, as the padding is handled by the arbitrary value.

Suggested change
<div
className="bg-background px-2 pb-2 max-w-screen-lg w-full mx-auto"
style={{
paddingBottom:
"calc(0.5rem + var(--fl-safe-bottom, env(safe-area-inset-bottom, 0px)))",
}}
>
<div className="bg-background px-2 max-w-screen-lg w-full mx-auto pb-[calc(0.5rem+var(--fl-safe-bottom,env(safe-area-inset-bottom,0px)))]">

<div className="relative border-b border-border/20 bg-background/95 backdrop-blur-md">
<div className="p-4">
<div className="flex items-center justify-between mb-4">
<div className="flex items-center justify-between mb-4" style={{paddingTop: "var(--fl-safe-top, env(safe-area-inset-top, 0px))"}}>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

To maintain a consistent styling approach with Tailwind CSS, consider using an arbitrary value for padding within the className prop instead of an inline style. This keeps styling declarations consolidated.

Suggested change
<div className="flex items-center justify-between mb-4" style={{paddingTop: "var(--fl-safe-top, env(safe-area-inset-top, 0px))"}}>
<div className="flex items-center justify-between mb-4 pt-[var(--fl-safe-top,env(safe-area-inset-top,0px))]">

</div>
<div>
<h2 className="text-lg font-semibold text-foreground">
<h2 className="text-lg font-semibold text-foreground" >
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

There's an extra space before the closing > of the h2 tag. While this is valid JSX, it's best to remove it for code cleanliness and consistency.

Suggested change
<h2 className="text-lg font-semibold text-foreground" >
<h2 className="text-lg font-semibold text-foreground">

"var(--fl-safe-bottom, env(safe-area-inset-bottom, 0px))",
}}
>
<FlowBackground
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: The SidebarInset component in the desktop app is missing bottom padding for the safe area, which will obscure UI elements on iOS devices with a home indicator.
Severity: MEDIUM

Suggested Fix

Re-add the bottom padding with safe area support to the SidebarInset component in apps/desktop/components/app-sidebar.tsx. This can be done by applying a style similar to the web app's implementation: paddingBottom: var(--fl-safe-bottom, env(safe-area-inset-bottom, 0px)).

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: apps/desktop/components/app-sidebar.tsx#L282

Potential issue: The `SidebarInset` component in the desktop app no longer provides
bottom padding to account for the safe area on mobile devices. Unlike the web app
version which retains this padding, the desktop app's change means that on most non-chat
pages (like Library, Settings, and Admin pages), content at the bottom will be obscured
by the home indicator or other system UI on iOS devices (e.g., iPhone X and newer). This
will make buttons or other interactive elements at the bottom of these pages
inaccessible to users on affected devices.

Did we get this right? 👍 / 👎 to inform future reviews.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Overscroll on IOS

1 participant