fix branch picker: escape to dismiss, error display, backdrop click

Branch picker now handles Escape key to dismiss, shows an × close
button in the header, and displays error/empty states instead of
silently showing nothing. Dialog backdrop is click-to-dismiss (the
dialog content stops propagation so clicks inside don't close it).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-23 00:57:46 +02:00
co-authored by Claude Opus 4.6
parent 2561329836
commit 8b6fdbd294
2 changed files with 87 additions and 47 deletions
+10 -4
View File
@@ -93,10 +93,16 @@ class DialogHost extends StatelessWidget {
final b = router.current;
if (b == null) return const SizedBox.shrink();
return Positioned.fill(
child: ColoredBox(
color: backdropColor,
child: Center(
child: b(ctx, router.dismiss),
child: GestureDetector(
onTap: () => router.dismiss(),
child: ColoredBox(
color: backdropColor,
child: Center(
child: GestureDetector(
onTap: () {},
child: b(ctx, router.dismiss),
),
),
),
),
);