Skip to content

Add detached mobile Safari document-scroll chat mode#47

Open
wende wants to merge 4 commits intomainfrom
codex/mobile-body-scroll-phase-one
Open

Add detached mobile Safari document-scroll chat mode#47
wende wants to merge 4 commits intomainfrom
codex/mobile-body-scroll-phase-one

Conversation

@wende
Copy link
Copy Markdown
Owner

@wende wende commented Mar 25, 2026

Summary

  • switch detached mobile web chat to document scroll on mobile width while keeping desktop and native on the existing shell
  • keep the composer static/in-flow, disable the old scroll morph, and split out a separate floating scroll-to-bottom pill with a Safari-safe bottom offset
  • preserve detached backgrounds correctly, avoid stale dev service workers on LAN/dev hosts, and document the iOS Safari findings in a dev note

Testing

  • pnpm vitest run tests/layout.test.ts tests/ChatInput.test.tsx
  • pnpm exec tsc --noEmit

Follow-up

  • BUG: Scrolling in detached mode on desktop no longer works

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 25, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
mobileclaw Error Error Mar 25, 2026 2:37pm

Copy link
Copy Markdown

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Sorry @wende, your pull request is larger than the review limit of 150000 diff characters

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 enhances the user experience for detached chat on mobile Safari by implementing a document-scroll mode. This change allows the chat interface to integrate more seamlessly with the browser's native scrolling behavior, improving responsiveness and visual consistency. Key aspects include refining the chat composer's layout, introducing a new scroll-to-bottom control, and optimizing service worker behavior for development environments. Additionally, the update expands the plugin system with new UI components for displaying various application-specific data.

Highlights

  • Mobile Safari Document Scroll Mode: The detached mobile web chat now utilizes document scrolling on mobile widths, providing a more native browsing experience. Desktop and native chat modes retain their existing shell-based behavior.
  • Composer Behavior and Scroll Pill: The chat composer remains static and in-flow, with the old scroll morphing animation disabled. A new, separate floating 'Scroll to bottom' pill has been introduced, designed with a Safari-safe bottom offset to prevent unintended activation of the browser's bottom chrome.
  • Service Worker Management: Logic has been added to prevent stale development service workers on local and private network hosts by unregistering and clearing caches in these environments.
  • Tool Call Narration and Grouping: Tool call messages now support an optional 'narration' field, and consecutive tool-only messages are grouped for a cleaner display. Existing tool calls can be updated with narration without creating duplicates.
  • New Plugin System Components: Several new plugins have been introduced, including cards for tour progress, notifications, flow lists, flow runs, and connection lists, along with corresponding input attachment chips.
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.

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.

@wende wende force-pushed the codex/mobile-body-scroll-phase-one branch from 2be74c3 to f3fe3ae Compare March 25, 2026 00:17
Copy link
Copy Markdown
Contributor

@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 introduces a new document-scroll mode for detached mobile web chat, specifically targeting iOS Safari to improve its behavior. This involved significant refactoring of scroll management, layout calculations, and UI component rendering to adapt to the document's native scrolling. New plugin components for tour progress, connections, flow runs, and notifications have also been added, and tool call handling now supports narration. A bug was identified where the input bar's morphing animation is unconditionally disabled, affecting desktop, and an improvement was suggested for the isIpV4 regex to be more precise.

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.

2 participants