feat(app): segmented glass top bar across the app

Extract the chat's segmented bar into lib/ui/adaptive (SegmentedBar,
GlassPill, SegmentedBarOverlay) and use it for the shell bar, DetailPane
and every page-level bar. Pieces are frosted glass over a fading scrim;
only pills take taps. Actions keep their natural width so the title gives
way before a model name. The chat transcript scrolls behind its header.
This commit is contained in:
2026-10-31 00:21:27 +00:00
parent 4a85a12cf7
commit 0582bfc34f
42 changed files with 1391 additions and 571 deletions
@@ -1,3 +1,4 @@
import '../../../ui/adaptive/segmented_bar.dart';
import '../../../ui/theme/app_theme.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@@ -392,15 +393,17 @@ class _ArtifactGalleryPageState extends State<ArtifactGalleryPage> {
// Sections paint the grouped background; the page must match it or a
// white seam shows below the last section in light mode.
backgroundColor: AppColors.groupedBackground,
navigationBar: const CupertinoNavigationBar(
middle: Text(artifactGalleryTitle),
navigationBar: const SegmentedBar(
cupertino: true,
title: artifactGalleryTitle,
),
child: SafeArea(child: body),
);
}
return Scaffold(
appBar: AppBar(title: const Text(artifactGalleryTitle)),
body: SafeArea(top: false, child: body),
extendBodyBehindAppBar: true,
appBar: const SegmentedBar(cupertino: false, title: artifactGalleryTitle),
body: SafeArea(child: body),
);
}
}
@@ -1,3 +1,4 @@
import '../../../ui/adaptive/segmented_bar.dart';
import '../../../ui/theme/app_theme.dart';
import '../../../ui/input/arrow_key_pager.dart';
import 'dart:convert';
@@ -252,15 +253,14 @@ class _ArtifactViewerPageState extends State<ArtifactViewerPage> {
if (usesCupertinoHost(context)) {
return CupertinoPageScaffold(
backgroundColor: AppColors.groupedBackground,
navigationBar: CupertinoNavigationBar(
middle: Text(title, overflow: TextOverflow.ellipsis),
),
navigationBar: SegmentedBar(cupertino: true, title: title),
child: SafeArea(child: body),
);
}
return Scaffold(
appBar: AppBar(title: Text(title, overflow: TextOverflow.ellipsis)),
body: SafeArea(top: false, child: body),
extendBodyBehindAppBar: true,
appBar: SegmentedBar(cupertino: false, title: title),
body: SafeArea(child: body),
);
}
}