Skip to content

Rebuild the composer's autocomplete list with standard Compose - #140

Merged
Tarquinen merged 3 commits into
devfrom
autocomplete-native
Nov 18, 2026
Merged

Tarquinen merged 3 commits into
devfrom
autocomplete-native

Conversation

@Tarquinen

@Tarquinen Tarquinen commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

The @ and / suggestion list in the composer is now a standard LazyColumn instead of a frame-by-frame spring simulation ported from iOS. Rows, ordering, filtering and selection are unchanged; the motion differs in small ways, listed below. The biggest is that the chip "flight" is gone on purpose: a picked row's chip now simply appears in the text, like the transcript's dropped send flight (#62).

autocomplete-before-after.mp4

Left: dev. Right: this branch. Segments: open, filter, scroll, pick, highlight (arrow keys, both slowed 4x in editing), dark.

Open list, before | after:

Light, before and after

Dark, before and after

Now

  • Rows enter, leave and move with animateItem; the panel height animates on Motion.panelOpen/panelClose, and on Motion.layout while filtering; the highlight is an animateColorAsState background; scroll and overscroll are the platform's. Reduce Motion fades and snaps through the same roles.
  • Deleted AutocompleteSimulation, AutocompleteMotionController (+ driver), AutocompleteSpring, AutocompleteTouchTracker, AutocompleteParameters, the flight overlay and its composer anchor, and the motion-only tunables. Ported tests that only covered the simulation are dropped (noted in the parity rows). AGENTS.md now lists this motion as Android-native on purpose.
  • Unchanged: rows, ordering, filtering, selection, dismissal, copy, the 5.5-row max height, arrow/enter/tab keys, TalkBack semantics, the inline chips and the reducer/state.

Visible differences from dev

  • No chip flight: the chip appears in the text at once.
  • The highlight cross-fades between rows (about 0.2 s). On dev it jumped on arrow keys and glided when filtering moved it.
  • Filtering cross-fades rows in place (~0.2 s) instead of collapsing them; it reacts a little sooner because updates aren't coalesced.
  • Overscroll is Android's stretch, not the ported rubber band.
  • The list's motion now follows the system animator duration scale (Developer options), like the rest of the app's Compose animations; the old simulation ignored it.

Verified

  • vm.sh check (all modules).
  • Emulator with session-lab, against dev: @ and / open, filtering, zero results, scroll to both ends, tap pick and pick while appearing, dismiss by deleting the trigger, back (same as dev), arrow keys, light/dark, font scale 1.3, animator scale 5 and 0 (Reduce Motion), keyboard height changes with the list open.
  • Already on dev and not touched here: a second chip can draw over the first.

The @ and / suggestion list ran on a frame-by-frame spring simulation
ported from iOS (row collapse, highlight glide, rubber-band scroll and a
chip flight into the text). It is now a reverse-layout LazyColumn: rows
enter, leave and move with animateItem, the panel's height animates on
the Motion roles (panelOpen/panelClose, layout while filtering), the
highlight is an animateColorAsState background, and scrolling and
overscroll are the platform's. Reduce Motion fades and snaps through the
same roles. A picked row's chip now simply appears in the text.

Rows, ordering, filtering, selection, dismissal, copy, the 5.5-row max
height, hardware-key navigation, TalkBack semantics and the inline chip
bridge are unchanged; the reducer and state are untouched.

Deleted: AutocompleteSimulation, AutocompleteMotionController (+ driver),
AutocompleteSpring, AutocompleteTouchTracker, AutocompleteParameters, the
chip flight overlay and composer anchor, the flight-only highlight tones,
and the order/exit/gesture tunables. Ported tests that only tested the
simulation are dropped (ComposerAutocompleteMotionTests and the glass
growth and edge-snapping cases in ComposerAutocompleteTests); the parity
rows say so. AGENTS.md records the list's motion as Android-native on
purpose.

Verified: vm.sh check (all modules). On the emulator with session-lab,
against dev: @ and / open, filtering, zero results, scroll to both ends,
tap pick and pick while appearing, dismiss by deleting the trigger, back,
arrow keys, light/dark, font scale 1.3, animator scale 5 and 0, keyboard
height changes with the list open.
# Conflicts:
#	feature/session/src/main/kotlin/ai/opencode/feature/session/SessionViewComposer.kt
@Tarquinen
Tarquinen merged commit 3da8e20 into dev Nov 18, 2026
3 checks passed
@Tarquinen Tarquinen mentioned this pull request Nov 18, 2026

This branch was previously deployed

1 inactive deployment
release — ba44e669 Deployed Nov 18, 2026 by Tarquinen via check #466
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