Skip to content

Keep the composer off the screen edge when the navigation bar is 0 - #38

Merged
Tarquinen merged 2 commits into
devfrom
fix/composer-bottom-gap
Nov 11, 2026
Merged

Tarquinen merged 2 commits into
devfrom
fix/composer-bottom-gap

Conversation

@Tarquinen

@Tarquinen Tarquinen commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Fixes anomalyco/opencode#63019.

On HyperOS with the gesture hint hidden, the navigation bar inset is 0, so the closed composer sat flush on the screen edge. The composer now rests on the navigation bar or 8 dp, whichever is taller. The transcript, request panel room and photo sheet use the same floor so they stay lined up with the composer.

Verified on an emulator, dev vs this branch: gesture and 3-button nav are pixel-identical. With the nav bar hidden (a temporary, uncommitted change to MainActivity), the closed composer moves 8 dp off the edge, and the gap above the open keyboard stays 8 dp as on dev. Not tested on a HyperOS device.

HyperOS with the gesture hint hidden (anomalyco/opencode#63019) reports a
0 navigation-bar inset, and the composer's only bottom spacing was that
inset (bottomGap is 0, as on iOS, where the 34 pt home-indicator safe area
always sits under it), so the closed composer sat flush on the edge.

- :core ContainerInsets.kt: WindowInsets.bottomSafeArea, the navigation
  bar's bottom inset but at least 8 dp (MinimumBottomSafeArea).
- SessionView rests the composer column on it instead of
  navigationBarsPadding(); RequestPanelRoomProbe, SessionTranscriptView's
  bottom obstruction, SessionViewPhotoSheet and ComposerMorphPhotoSheet
  read the same floor, and ComposerKeyboardProgress measures the keys
  above it, so nothing placed against the composer drifts by the floor.
- ComposerKeyboardProgress: keys resting up on their target are fully up
  whatever an older animation source says, so the 8 dp keyboardGap stays
  whole instead of shrinking (the reported 1-2 dp gap above the keys).
  The ramp while the keys move is unchanged.

Gesture (24 dp) and three-button (48 dp) navigation are above the floor,
so they don't move. The Android-only floor is noted in the session and
composer parity rows.

Verified: vm.sh check (all modules) passes, with a new
ComposerKeyboardProgressTests case for the stale source. On the Pixel 8
emulator, before/after screenshots with the keyboard closed and open:
gesture and three-button navigation are pixel-identical below the status
bar; with the navigation bar hidden (a temporary, uncommitted
MainActivity experiment) the closed composer moves from flush to 8 dp off
the edge and the open gap stays 8 dp. Frame-by-frame recordings of the
keyboard opening and closing show the composer moving monotonically, with
no jumps.
Drop the keyboard-progress change and its test: the stale-source case
was never reproduced, and on dev the open-keyboard gap is already 8 dp
with a 0 navigation bar. Drop the floor in ComposerMorphPhotoSheet,
which nothing calls, and in the keyboard progress, where it changed
nothing visible. Move bottomSafeArea from :core into SessionView.kt,
its only module, and shorten the parity note.

Verified: vm.sh check :feature:session. On an emulator, dev vs this
branch: gesture and 3-button nav are pixel-identical below the status
bar (keys up and down); with the nav bar hidden (temporary
MainActivity hide, not committed) the closed composer moves up 21 px =
8 dp off the edge and the open-keyboard gap is unchanged.
@Tarquinen
Tarquinen merged commit 28251f3 into dev Nov 11, 2026
3 checks passed
Tarquinen added a commit that referenced this pull request Nov 11, 2026
…on) into feat/assistant

Only docs/parity/app.md conflicted: the assistant row and #39's local network row were both new, so both stay. MainActivity merged cleanly, with #39's permission launcher next to the assistant's code.
@Tarquinen Tarquinen mentioned this pull request Nov 12, 2026

This branch was previously deployed

1 inactive deployment
release — e5294f85 Deployed Nov 11, 2026 by Tarquinen via check #121
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