Lay out chat content against the animated pane viewport

This commit is contained in:
2026-11-06 21:48:25 +00:00
parent 2cd8003e3a
commit 2cadebab4b
4 changed files with 48 additions and 38 deletions
@@ -92,6 +92,17 @@ void main() {
final intermediate = tester.getSize(_rect(first)).height;
expect(intermediate, greaterThan(oldHeight));
expect(intermediate, lessThan((800 - 6) * .8));
// Content follows the animated viewport, rather than jumping to the
// target height and leaving a blank area during the transition.
expect(
tester.getSize(find.byKey(const ValueKey('a'))).height,
closeTo(intermediate, 1),
);
final shrinkingHeight = tester.getSize(_rect(second)).height;
expect(
tester.getSize(find.byKey(const ValueKey('b'))).height,
closeTo(shrinkingHeight < 300 ? 300 : shrinkingHeight, 1),
);
await tester.pumpAndSettle();
expect(controller.activePane?.sessionId, 'a');
expect(tester.getSize(_rect(first)).height, closeTo((800 - 6) * .8, 1));