Repository navigation
Morph the Session Chat composer and smooth the Android keyboard animation - #963
Conversation
The composer content was top-aligned inside a bottom-pinned shell, so switching from a permission or question to the prompt slid the old card down while the new one faded in after it. Both platforms now keep the content on the shell's bottom edge and crossfade the two modes while the shell resizes, so it reads as one surface changing shape. On iOS the corner pills and the timeline also follow the composer's edge on its own curve: a height measured for a new composer mode is applied with the composer's animation, and the end-pinned list's inset glide uses that curve instead of its spring while the composer morphs. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Two per-frame recompositions made the keyboard animation drop most frames on a Redmi Pad SE (57 ms median per frame in debug, 15-26 ms in a release-like build): - The composer was measured outside its keyboard padding, so its height changed on every inset frame and the whole screen recomposed. The chat area now takes the keyboard part above the navigation bar as layout-only inset padding, which also keeps the composer's measured height constant. - The viewport change re-pinned the list on every frame with a scroll that did not move it, flipping isProgrammaticScrolling twice and recomposing the timeline. A list already resting at its end now settles in place. Release-like build on the same tablet: 12-13 ms median, 4-10% janky frames. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Adds a turn to M3 where the agent answers with text and three images, so image galleries inside assistant replies can be checked without a server. Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
Automated review: 2 finding(s) that 2+ of 3 passes agreed on.
Outside the diff lines:
ios/OpenCode Mobile/OpenCode Mobile/UI/SessionChat/SessionChatView.swift:567medium: Stale morph timer clears flag mid-morph
1 finding(s) from a single pass, not posted
ios/OpenCode Mobile/OpenCode Mobile/UI/SessionChat/SessionChatView.swift:1002low: Async kind sync misclassifies typing growth as morph (muse-spark-1.3-contributor)
opencode pr-review · passes: muse-spark-1.3-contributor, glm-5.3-flash, deepseek-v4.1-flash · $0.141 · 1 pass(es) stopped early
| modifier = | ||
| Modifier | ||
| .weight(1f) | ||
| .windowInsetsPadding(WindowInsets.ime.exclude(WindowInsets.navigationBars)), |
There was a problem hiding this comment.
high: Double-applied IME insets leaves gap above keyboard
The timeline/composer container now pads with ime.exclude(navigationBars) while the inner composer column still pads with ime.union(navigationBars). Window insets are window-global and windowInsetsPadding does not consume them, so both paddings stack. The composer background ends up lifted by roughly 2ime instead of 1ime.
Failure scenario: Open Session Chat on a device with navigation bars and open the keyboard: the composer floats about one keyboard-height above the keyboard leaving a blank gap, and the timeline is pushed too far up, instead of sitting just above the keyboard.
Found by 2 of 3 passes.



Summary
No linked issue. This follows up on screen recordings of the composer and list animations.
MessageListTimelineHostruns its FLIP glide with that animation, usingUIView.animate(_:changes:)on iOS 18 and later.windowInsetsPadding(ime - navigationBars), which only re-runs layout, so the composer keeps a constant height.isProgrammaticScrollingand recomposed the timeline twice per frame. It now settles in place instead.Checks
MessageList*,ScrollToEnd*,SessionChatTimeline*,Playground*). Both apps build.dumpsys gfxinfowhile the keyboard opened in Session Chat, on a release-likebenchmarkbuild:Risks / Follow-ups
🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.