diff --git a/app/androidApp/src/main/kotlin/com/example/aiapp/SessionScreen.kt b/app/androidApp/src/main/kotlin/com/example/aiapp/SessionScreen.kt index f564464..5a1c4c0 100644 --- a/app/androidApp/src/main/kotlin/com/example/aiapp/SessionScreen.kt +++ b/app/androidApp/src/main/kotlin/com/example/aiapp/SessionScreen.kt @@ -1073,7 +1073,16 @@ fun SessionScreen( reverseLayout = true, modifier = Modifier.fillMaxSize(), contentPadding = PaddingValues(16.dp), - verticalArrangement = Arrangement.spacedBy(8.dp), + // Bottom, and it has to be said: `reverseLayout` defaults the arrangement to + // `Bottom` on its own, but naming `spacedBy` replaces that default with + // `spacedBy`'s own, which is `Top`. The arrangement is what places the content + // when there is less of it than the viewport -- so a session whose loaded rows + // did not fill the screen drew them against the *top*, leaving a gap between the + // newest message and the box you type in, and no room to scroll the gap away. + // Opening the keyboard shrank the viewport enough for the content to overflow it + // and the list snapped down, which is what made it look like a scrolling fault + // rather than a placement one. + verticalArrangement = Arrangement.spacedBy(8.dp, Alignment.Bottom), ) { // The last thing in the transcript, because that is where // they are in the session's reading of events: after