Skip to content

fix(composer): keep the autocomplete panel's height from going negative - #356

Merged
Tarquinen merged 1 commit into
devfrom
crash-352
Nov 29, 2026
Merged

Tarquinen merged 1 commit into
devfrom
crash-352

Conversation

@Tarquinen

Copy link
Copy Markdown
Member

Closing the composer's suggestions list could crash the app when the close spring was tuned to bounce. The list's height dipped below zero as it folded, and laying out at a negative height throws. The same dip also clipped the top of the composer bar by about 22 dp for a moment.

Now the list's height stops at zero, both where it's animated and where the list lays itself out. Nothing visible changes with the shipped springs.

  • Only reachable with Tuning on (Developer Mode in a release build) and a bouncier panelClose spring; the shipped springs never undershoot.
  • Reproduced on the emulator with motion.springs.panelClose.bounce at 0.4: dev crashes with the reported stack on the first close; this branch opens and closes it repeatedly without crashing. In slow motion the bar's top edge no longer dips below where it rests. The new test in ComposerAutocompleteTests fails on dev with the same exception. scripts/check.sh passes.

Fixes #352

A close spring tuned to bounce (Tuning, Developer Mode) undershoots the
panel's height below zero as it folds. Measuring with a negative height
throws in Constraints.copy, and the composer surface clipped the top of
its bar by the undershoot. The height now stops at zero where it's
animated and where the panel lays out.

Reproduced on the emulator with motion.springs.panelClose.bounce = 0.4
(crash on close on dev, none with the fix; in slow motion the bar's top
edge no longer dips below its rest). The new test fails on dev with the
same exception. scripts/check.sh passes.

Fixes #352
@Tarquinen
Tarquinen merged commit f123397 into dev Nov 29, 2026
3 checks passed
@Tarquinen
Tarquinen deleted the crash-352 branch November 29, 2026 23:23
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.

Crash: IllegalArgumentException in AutocompleteViewsKt.ComposerAutocompletePanel$lambda$3$0

1 participant