Merge branch 'fix/mobile-motion'

This commit is contained in:
2026-11-07 02:47:45 +00:00
11 changed files with 409 additions and 458 deletions
@@ -28,14 +28,10 @@ class ChatPanePresentation extends InheritedWidget {
/// The conversation's bar under a [ChatPanePresentation].
///
/// Without one the bar is itself. As its chat becomes active the bar fades
/// and slides down into place over the transcript, which already keeps clear
/// of it. As its chat becomes the peek the bar fades out in place, keeping
/// its height until it has gone (by then the arriving chat covers it). A
/// resting peek keeps the bar offstage: not painted, taking no height, no
/// pointers and no semantics, so its transcript starts at the top, yet still
/// mounted, so the next switch fades the same bar rather than building a new
/// one (whose pieces would replay their entrances).
/// Both header and composer use the same retained tree. Opacity, slide and
/// occupied height follow the pane's reveal together, so the peek has no
/// controls or reserved chrome space. Repaint boundaries retain each bar's
/// picture; changing the real viewport height still requires transcript layout.
class ChatPaneBarReveal extends StatelessWidget {
const ChatPaneBarReveal({super.key, required this.bar});
@@ -55,16 +51,20 @@ class ChatPaneBarReveal extends StatelessWidget {
animation: reveal,
child: IgnorePointer(
ignoring: peek,
child: FadeTransition(
opacity: reveal,
child: SlideTransition(
position: Tween<Offset>(
begin: const Offset(0, -slide),
end: Offset.zero,
).animate(reveal),
// The bar's own picture holds while it slides; only its offset
// and alpha change per tick.
child: RepaintBoundary(child: bar),
child: SizeTransition(
alignment: Alignment.topCenter,
sizeFactor: reveal,
child: FadeTransition(
opacity: reveal,
child: SlideTransition(
position: Tween<Offset>(
begin: const Offset(0, -slide),
end: Offset.zero,
).animate(reveal),
// The bar's own picture holds while it slides; only its offset
// and alpha change per tick.
child: RepaintBoundary(child: bar),
),
),
),
),
@@ -1072,7 +1072,7 @@ class _ChatThreadViewState extends State<ChatThreadView> {
),
);
final page = FloatingBarOverlay(
bar: composerBar,
bar: ChatPaneBarReveal(bar: composerBar),
child: SegmentedBarOverlay(
bar: ChatPaneBarReveal(bar: _header(context, inShellBar)),
child: NotificationListener<ScrollMetricsNotification>(