iOS: guide-locked composer bar with static-inequality keyboard absorption
Follow-up to https://github.com/manaflow-ai/cmux/pull/10594 from dogfood: the composer bar should stay pixel-locked to the keyboard through the whole leg, the way the guide-era builds felt. iOS keyboards animate with a private spring that notification-driven followers only approximate, so the dock seat returns to UIKeyboardLayoutGuide wherever it is trustworthy (chrome visible, iOS ≤ 26), falling back to #10518's notification seat on iOS 27, while chrome is hidden, under the remote ios-keyboard-dock-rebuild-revert kill switch, and under the DEBUG rebuild forces.
The race that originally forced the guide out is removed structurally: blank-space absorption is now three static constraints — wrapper.bottom <= host.bottom, wrapper.bottom <= dock.top + chrome + blank, and an optional priority-750 pull to the natural position — whose constants change only on chrome/content changes, never during a keyboard leg. The wrapper's target comes out of the same layout solve and animation transaction that moves the dock, so the bar and terminal share one timeline by construction on both seat authorities.
The kill-switch and defaults parameters on the host are meaningful again (they select the seat authority); MobileKeyboardFrameTracker still heals the keyboard model after detached transitions on every OS. Default-path UITest expects layoutGuide again; the forced-rebuild tests exercise the notification seat.
HIG: same Virtual keyboards guidance as #10594 — this change moves the dock onto the keyboard layout guide, which is the HIG-recommended integration.
🤖 Generated with Claude Code
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.
Summary by cubic
Locks the composer bar to the keyboard using UIKeyboardLayoutGuide where reliable and makes keyboard absorption static. Old behavior: notification-driven docking that approximated keyboard motion. New behavior: guide-seated docking on iOS ≤26 when chrome is visible, falling back to notifications on iOS 27, while chrome is hidden, under the ios-keyboard-dock-rebuild-revert kill switch, or under DEBUG forces. Result: pixel-locked, smoother follow with no mid-leg retargets; wrapper and dock move in the same UIKit transaction.
- Absorption is now static inequalities: wrapper.bottom ≤ host.bottom and ≤ dock.top + chrome + blank, plus an optional 750 pull to host.bottom; constants update only on chrome/content changes.
- Seat authority swaps at runtime when chrome toggles; production callers pass
.standarddefaults, andkeyboardDockRebuildRevertEnabledselects the notification seat. MobileKeyboardFrameTrackercontinues to heal keyboard height/visibility after detached transitions.
Migration
- No API changes; ensure the remote kill switch is configured as needed and pass
.standardfor defaults in production. - Update tests that asserted a fixed
keyboardDockSource: derive the expected seat from the runtime OS (layoutGuide on iOS ≤26, notification on iOS 27).
Summary by CodeRabbit
-
Bug Fixes
- Improved terminal and composer positioning as the keyboard appears, disappears, or changes size.
- Improved handling of hidden bottom chrome and keyboard layouts across supported iOS versions.
- Reduced unwanted movement and spacing when presenting terminal content above the keyboard.
- Improved keyboard docking behavior for newer iOS versions and different display configurations.
-
Tests
- Updated keyboard docking validation to account for the appropriate behavior across supported iOS versions.