Repository navigation
fix(drawer): let selection handle drags through instead of opening the drawer - #57
Merged
Merged
Conversation
…e drawer Dragging a reply selection handle that sits in the leading 28 dp edge (any selection starting at a line start) opened the session drawer while the selection moved too. The drawer's pan sees every touch first, and the edge always wins; iOS skipped this with BackSwipeRules.selectionHandleClaims, which Android never ported on the belief that Compose handles consume their own drags (the transcript's handles are drawn by TranscriptReplySelection, not Compose's popups). - DirectionalPan: on a shut drawer, a touch within reach of a selection handle never starts the pan (iOS DirectionalPanGestureRecognizer). - The transcript list registers its handles with the new Modifier.drawerPanSelectionHandles (TranscriptReplySelection.handleAt, 24 dp reach); SessionPageStack forwards them to the drawer. - hasBegunHold now reads positionChangeIgnoreConsumed(): positionChange() is zero once a child consumed the move, so the check could never pass. - Stale "handles consume their own drags" comments and parity rows updated. Verified: scripts/check.sh :core :feature:drawer :feature:transcript :feature:session on the Android VM. Emulator (session-lab, 3-button nav so the edge reaches the app): before, dragging the start handle of a selection at a line start opened the drawer; after, the selection moves and the drawer stays shut. Edge and mid-screen swipes on the transcript still open the drawer; long-press selection still works. Fixes anomalyco/opencode#63530
This was referenced Nov 14, 2026
Merged
Tarquinen
added a commit
that referenced
this pull request
Nov 14, 2026
The transcript list was a port of iOS's UIKit TranscriptListViewController: a top-anchored LazyColumn with ~6,000 lines of custom motion on top (a bottom follower, jump glides, row growth from one pixel, growth rides, row entrances) plus a snapshot flight from the composer into the list on every send. That motion fought LazyColumn's own layout, and sending felt unlike any Android texting app. The list's motion is now Android-native on purpose; behaviour, flows and copy still follow iOS (noted in AGENTS.md and docs/parity). The list - LazyColumn(reverseLayout = true), newest row at index 0, so new and growing rows (a streaming reply) push older content up at the end with no follower. - New rows at the end: requestScrollToItem(0) and AnimatedVisibility (expandVertically + fadeIn) on the M3 fast spatial spring. - TranscriptListScroller holds the list's own scrolls: Jump to Latest (cut to a screen above the end when far, then one glide on M3 standard easing, 0.35 to 0.55 s by distance), the borrowed drag, scroll to top, the New messages landing, and holding a toggled row in place mid-list (it grows upward at the end so the opened tools stay above the composer). - Disclosures (tool groups, inner tool rows, reasoning, Show More) move their height on one disclosure spring; a closing body takes its gap with it. Rows use a flat press tint instead of the ripple, and tool headers are one line with the glyph on the first line. - Rebuilt on the new list: reply selection and its autoscroll (reversed), the drawer's selection-handle exclusion (#57), New messages decide/fit/passed/ read and the divider glow, FirstContentFrameRendered, scroll restore by row key after process death, earlier-history paging, header backdrop, Jump to Latest visibility, the image viewport, link previews, the agent reveal, the empty loading mark, TalkBack coalescing and the timeline gate. The send - No flight. The composer card resets in one motion: a picture of the old content fades out while animateContentSize(alignment = BottomStart) slides the top edge down on the same spring; the sent photos are decoded before the bubble's first frame. The list's bottom padding reads the composer height while measuring, so the list end moves with the card. Deleted - TranscriptListController, TranscriptRowGrowth, TranscriptRowEntrance, TranscriptScrollSprings, TranscriptScrollBehavior, TranscriptMotionTrace, NewDividerMotion, SessionSendFlight, SendLift, SentImageFlight, SendLanding, ComposerSendTransition (its swipe input moves to ComposerFieldLink), the composer's shrink-on-send, image/link-preview row growth, and the tuning knobs that only served them. - Ported tests for that motion (TranscriptScrollBehaviorTests, TranscriptRowGrowthTests, TranscriptGestureReleaseTests, SentImageFlightTests, ComposerSendTransitionTests and individual growth/hand-off tests); each is listed as dropped in docs/parity. 78 files, +1,497 / -8,847 vs dev. Verified - scripts/check.sh (all modules) on the VM: build, lint and unit tests pass. - Emulator with session-lab: button, IME and Ctrl+Enter sends, steer, Queue, failed send then Retry, a new session's first message, streaming, keyboard open/close, selection (a leading-edge handle drag doesn't open the drawer), New messages divider, Jump to Latest short and far, history paging, tool group/Show More expand and collapse mid-list and at the end, header backdrop, scroll restore after process death, Reduce Motion, light and dark. - Frame-by-frame audit (transcript-audit) against 0.7.0, including 0.25x slow-motion plots of collapse and Jump to Latest. - Dan tested each round on a Galaxy S24 Ultra (120 Hz) with an R8 build.
Tarquinen
added a commit
that referenced
this pull request
Nov 14, 2026
The transcript list was a port of iOS's UIKit TranscriptListViewController: a top-anchored LazyColumn with ~6,000 lines of custom motion on top (a bottom follower, jump glides, row growth from one pixel, growth rides, row entrances) plus a snapshot flight from the composer into the list on every send. That motion fought LazyColumn's own layout, and sending felt unlike any Android texting app. The list's motion is now Android-native on purpose; behaviour, flows and copy still follow iOS (noted in AGENTS.md and docs/parity). The list - LazyColumn(reverseLayout = true), newest row at index 0, so new and growing rows (a streaming reply) push older content up at the end with no follower. - New rows at the end: requestScrollToItem(0) however many arrive at once (a steer that brings several rows lands above the composer), and up to three animate in with AnimatedVisibility (expandVertically + fadeIn) on the M3 fast spatial spring. - A growing row (a streaming reply) moves its height with animateContentSize on a 0.22 s spring, so older rows glide up rather than step by each chunk. - TranscriptListScroller holds the list's own scrolls: Jump to Latest (cut to a screen above the end when far, then one glide on M3 standard easing, 0.35 to 0.55 s by distance), the borrowed drag, scroll to top, the New messages landing, and holding a toggled row in place mid-list (it grows upward at the end so the opened tools stay above the composer). - Disclosures (tool groups, inner tool rows, reasoning, Show More) move their height on one disclosure spring; a closing body takes its gap with it. Rows use a flat press tint instead of the ripple, and tool headers are one line with the glyph on the first line. - Rebuilt on the new list: reply selection and its autoscroll (reversed), the drawer's selection-handle exclusion (#57), New messages decide/fit/passed/ read and the divider glow, FirstContentFrameRendered, scroll restore by row key after process death, earlier-history paging, header backdrop, Jump to Latest visibility, the image viewport, link previews, the agent reveal, the empty loading mark, TalkBack coalescing and the timeline gate. The send - No flight. The composer card resets in one motion: a picture of the old content fades out while animateContentSize(alignment = BottomStart) slides the top edge down on the same spring; the sent photos are decoded before the bubble's first frame. The list's bottom padding reads the composer height while measuring, so the list end moves with the card. Deleted - TranscriptListController, TranscriptRowGrowth, TranscriptRowEntrance, TranscriptScrollSprings, TranscriptScrollBehavior, TranscriptMotionTrace, NewDividerMotion, SessionSendFlight, SendLift, SentImageFlight, SendLanding, ComposerSendTransition (its swipe input moves to ComposerFieldLink), the composer's shrink-on-send, image/link-preview row growth, and the tuning knobs that only served them. - Ported tests for that motion (TranscriptScrollBehaviorTests, TranscriptRowGrowthTests, TranscriptGestureReleaseTests, SentImageFlightTests, ComposerSendTransitionTests and individual growth/hand-off tests); each is listed as dropped in docs/parity. 78 files, +1,497 / -8,847 vs dev. Verified - scripts/check.sh (all modules) on the VM: build, lint and unit tests pass. - Emulator with session-lab: button, IME and Ctrl+Enter sends, steer, Queue, failed send then Retry, a new session's first message, streaming, keyboard open/close, selection (a leading-edge handle drag doesn't open the drawer), New messages divider, Jump to Latest short and far, history paging, tool group/Show More expand and collapse mid-list and at the end, header backdrop, scroll restore after process death, Reduce Motion, light and dark. - Frame-by-frame audit (transcript-audit) against 0.7.0, including 0.25x slow-motion plots of collapse and Jump to Latest. - Dan tested each round on a Galaxy S24 Ultra (120 Hz) with an R8 build.
Tarquinen
added a commit
that referenced
this pull request
Nov 14, 2026
The transcript list was a port of iOS's UIKit TranscriptListViewController: a top-anchored LazyColumn with ~6,000 lines of custom motion on top (a bottom follower, jump glides, row growth from one pixel, growth rides, row entrances) plus a snapshot flight from the composer into the list on every send. That motion fought LazyColumn's own layout, and sending felt unlike any Android texting app. The list's motion is now Android-native on purpose; behaviour, flows and copy still follow iOS (noted in AGENTS.md and docs/parity). The list - LazyColumn(reverseLayout = true), newest row at index 0, so new and growing rows (a streaming reply) push older content up at the end with no follower. - New rows at the end: requestScrollToItem(0) however many arrive at once (a steer that brings several rows lands above the composer), and up to three animate in with AnimatedVisibility (expandVertically + fadeIn) on the M3 fast spatial spring. - A growing row (a streaming reply) moves its height with animateContentSize on a 0.22 s spring, so older rows glide up rather than step by each chunk. - TranscriptListScroller holds the list's own scrolls: Jump to Latest (cut to a screen above the end when far, then one glide on M3 standard easing, 0.35 to 0.55 s by distance), the borrowed drag, scroll to top, the New messages landing, and holding a toggled row in place mid-list (it grows upward at the end so the opened tools stay above the composer). - Disclosures (tool groups, inner tool rows, reasoning, Show More) move their height on one disclosure spring; a closing body takes its gap with it. Rows use a flat press tint instead of the ripple, and tool headers are one line with the glyph on the first line. - Rebuilt on the new list: reply selection and its autoscroll (reversed), the drawer's selection-handle exclusion (#57), New messages decide/fit/passed/ read and the divider glow, FirstContentFrameRendered, scroll restore by row key after process death, earlier-history paging, header backdrop, Jump to Latest visibility, the image viewport, link previews, the agent reveal, the empty loading mark, TalkBack coalescing and the timeline gate. The send - No flight. The composer card resets in one motion: a picture of the old content fades out while animateContentSize(alignment = BottomStart) slides the top edge down on the same spring; the sent photos are decoded before the bubble's first frame. The list's bottom padding reads the composer height while measuring, so the list end moves with the card. Deleted - TranscriptListController, TranscriptRowGrowth, TranscriptRowEntrance, TranscriptScrollSprings, TranscriptScrollBehavior, TranscriptMotionTrace, NewDividerMotion, SessionSendFlight, SendLift, SentImageFlight, SendLanding, ComposerSendTransition (its swipe input moves to ComposerFieldLink), the composer's shrink-on-send, image/link-preview row growth, and the tuning knobs that only served them. - Ported tests for that motion (TranscriptScrollBehaviorTests, TranscriptRowGrowthTests, TranscriptGestureReleaseTests, SentImageFlightTests, ComposerSendTransitionTests and individual growth/hand-off tests); each is listed as dropped in docs/parity. 78 files, +1,497 / -8,847 vs dev. Verified - scripts/check.sh (all modules) on the VM: build, lint and unit tests pass. - Emulator with session-lab: button, IME and Ctrl+Enter sends, steer, Queue, failed send then Retry, a new session's first message, streaming, keyboard open/close, selection (a leading-edge handle drag doesn't open the drawer), New messages divider, Jump to Latest short and far, history paging, tool group/Show More expand and collapse mid-list and at the end, header backdrop, scroll restore after process death, Reduce Motion, light and dark. - Frame-by-frame audit (transcript-audit) against 0.7.0, including 0.25x slow-motion plots of collapse and Jump to Latest. - Dan tested each round on a Galaxy S24 Ultra (120 Hz) with an R8 build.
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes anomalyco/opencode#63530
Bug: dragging a selection handle in an assistant reply could open the sessions drawer while the selection moved too. It happens whenever the handle sits in the leading 28 dp edge, which is any selection that starts at the beginning of a line.
Cause: the drawer's pan sees every touch first, and a drag from the edge always opens it. iOS skips touches on a selection handle (
BackSwipeRules.selectionHandleClaims). Android never ported that check because it assumed Compose's handles consume their own drags, but the transcript draws its own handles (TranscriptReplySelection).Fix:
Modifier.drawerPanSelectionHandles(backed byTranscriptReplySelection.handleAt), andSessionPageStackforwards it to the drawer.positionChangeIgnoreConsumed().positionChange()is always zero once a child has consumed the move, so the check could never pass.Verified:
scripts/check.sh :core :feature:drawer :feature:transcript :feature:sessionpasses on the Android VM.Before / after
Left: v0.6.4 release. Right: this branch. Emulator with session-lab, 3-button navigation.
pr57-before-after.mp4
Video: dragging the start handle of a selection at the start of a line opens the drawer before and only grows the selection after; then an edge swipe on the transcript still opens the drawer on both.
Mid-drag still: the drawer is half open on the left, while on the right the selection has grown to "and composer share the".