Show chat details and file details as dialogs on desktop

Phase 2b.4 of docs/plans/floating-windows.md: both use showAppDetails (a
dialog on a wide app, a bottom sheet on a phone). Implemented by pipeline
run 305; landed by hand after its UI review found the dialog clipped, which
the helper now scrolls.
This commit is contained in:
2026-11-10 22:21:15 +00:00
parent 31f495fc18
commit 286506310c
5 changed files with 107 additions and 90 deletions
@@ -56,6 +56,7 @@ import 'chat_sent_entrance.dart';
import 'chat_server_queue.dart';
import 'chat_thread_controller.dart';
import '../../../ui/adaptive/floating_bar_layout.dart';
import '../../../ui/adaptive/app_popups.dart';
import '../../../ui/adaptive/segmented_bar_overlay.dart';
import '../../../ui/layout/app_sheet_header.dart';
import '../../../ui/layout/wheel_scroll_forwarding.dart';
@@ -511,21 +512,19 @@ class _ChatThreadViewState extends State<ChatThreadView> {
/// Reports the harness's recorded usage. The standard sheet is dismissed the
/// platform's way (drag/barrier/Back, or a popup tap) and closes explicitly.
Future<void> _openInfo() async {
final cupertino =
chatControlsStyleOf(context) == ChatControlsStyle.cupertino;
final exporter = ChatExportController(
repository: ChatRepository(widget.gateway),
sessionId: widget.sessionId,
bridge: widget.fileBridge,
);
try {
await _showInfo(cupertino, exporter);
await _showInfo(exporter);
} finally {
exporter.dispose();
}
}
Future<void> _showInfo(bool cupertino, ChatExportController exporter) async {
Future<void> _showInfo(ChatExportController exporter) async {
final handoff = ChatSessionHandoff.from(widget.sessionId, widget.session);
Widget sheet() => _ChatInfoSheet(
controller: _controller,
@@ -534,23 +533,7 @@ class _ChatThreadViewState extends State<ChatThreadView> {
color: chatSessionColor(widget.session),
onColorSelected: widget.onColorSelected,
);
if (cupertino) {
await showCupertinoModalPopup<void>(
context: context,
builder: (sheetContext) => Align(
alignment: Alignment.bottomCenter,
child: SafeArea(child: CupertinoPopupSurface(child: sheet())),
),
);
return;
}
await showModalBottomSheet<void>(
context: context,
showDragHandle: true,
isScrollControlled: true,
useSafeArea: true,
builder: (sheetContext) => sheet(),
);
await showAppDetails<void>(context, builder: (_) => sheet());
}
/// The transcript in recorded order; a sent turn is part of it from the