From 8c1b6b7467a30d82a0aab34209138f135bdd7113 Mon Sep 17 00:00:00 2001 From: iris <2+iris@noreply.localhost> Date: Sun, 30 Aug 2026 02:18:31 -0400 Subject: [PATCH] Sit the transcript on the bottom when it does not fill the screen A session whose loaded rows were shorter than the viewport drew them against the top of the list, leaving a gap between the newest message and the box you type in -- and nothing to scroll, because there was no overflow. Opening the keyboard shrank the viewport enough for the content to overflow it and the list snapped down, which made a placement fault look like a scrolling one. `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 only consulted when the content does not fill the viewport, which is why this sat here since 2026-08-28 without being seen: it needs a session that loads less than a screenful, and a page of tool calls collapsing to one "Called 80 tools" row is how a long conversation manages that. --- .../main/kotlin/com/example/aiapp/SessionScreen.kt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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 309d934..4b49186 100644 --- a/app/androidApp/src/main/kotlin/com/example/aiapp/SessionScreen.kt +++ b/app/androidApp/src/main/kotlin/com/example/aiapp/SessionScreen.kt @@ -1057,7 +1057,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