Skip to content

Safe-area insets: edge to edge, shell padded by bars, cutout and keyboard - #63

Merged
Bombatomica64 merged 6 commits into
mainfrom
safe-area-insets
Oct 12, 2026
Merged

Bombatomica64 merged 6 commits into
mainfrom
safe-area-insets

Conversation

@Bombatomica64

@Bombatomica64 Bombatomica64 commented Oct 10, 2026 •

Copy link
Copy Markdown
Owner

Item 7 of CONTRIBUTING_IDEAS.md (safe-area insets).

  • gpui-mobile c71a31a (fork main, Merge android-host-insets: safe-area and keyboard insets on the host path gpui-mobile#9; upstream candidate android-host-insets): host::insets_changed carries the host's insets to the window, which implements GPUI's PlatformWindow::insets / on_insets_changed. Window::fully_visible_bounds(), safe_area_insets() and keyboard_height() now work on Android.
  • GPUI Kit e8b2816 (mobile-lab, branch input-reveal-on-focus): a focused input reveals itself when the fully visible bounds change, not only the viewport size. Without this, edge to edge left the field under the keyboard.
  • LabActivity: edge to edge (cutout SHORT_EDGES, transparent bars). Its insets listener reports systemBars | displayCutout and ime. The portrait lock is removed.
  • Shell: pads by fully_visible_bounds(), with the title bar color underneath, and flips the bar icons with the theme.
  • Diagnostics: new "Safe area (logical)" and "Fully visible (GPUI)" rows.

Checked on the OnePlus (Android 16, gesture navigation): portrait, landscape (cutout side padded), keyboard open with typing (field revealed above it). The light-theme bar icons were not checked.

Portrait Landscape Keyboard

🤖 Generated with Claude Code

Bombatomica64 and others added 5 commits October 12, 2026 08:45
LabActivity now draws behind the system bars, the display cutout and the
keyboard, and reports their insets through gpui-mobile's new
host::insets_changed. The shell pads its content by them, with the title bar
color underneath, and switches the bar icons between light and dark with the
theme. The keyboard is now an inset that GPUI handles, as on iOS, so the
SurfaceView is no longer resized when it opens. The portrait lock is gone, so
landscape and the cutout can be checked. Diagnostics shows the insets.

Pins gpui-mobile b2d1643 (fork main + android-host-insets).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… keyboard

gpui-pre already has `PlatformWindow::insets` (safe area + IME) and
`Window::fully_visible_bounds`; gpui-mobile now implements them (0dc8e30), so
the shell pads by GPUI's own geometry instead of gpui-mobile's accessors.
Kit's input reveal now follows the fully visible bounds (e8b2816): with the
keyboard reported as an inset the viewport keeps its size, and the focused
input stayed under the keyboard. Diagnostics shows the fully visible bounds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… Kit e8b2816

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Bombatomica64
Bombatomica64 marked this pull request as ready for review October 12, 2026 09:04
@Bombatomica64
Bombatomica64 merged commit 5df1ad9 into main Oct 12, 2026
2 checks passed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-12T09:05:21.767525Z ffc9604 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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.

1 participant