feat(app): Runs and Chat tabs badge running runs and unread chats; unread chat rows carry a New badge

This commit is contained in:
2026-10-23 20:15:01 +01:00
parent 11ab9beb7b
commit d373f4c48e
7 changed files with 247 additions and 5 deletions
+19 -1
View File
@@ -81,8 +81,26 @@ class _AdaptiveShellState extends State<AdaptiveShell> {
/// The destination's icon; only Runs carries the attention count.
Widget _icon(AppDestination destination, IconData data) {
final icon = Icon(data);
Widget icon = Icon(data);
if (destination == AppDestination.chat) {
return ActivityBadge(
key: const ValueKey('shell.badge.chat.unread'),
count: _bar.badge(destination, ShellBadgeKind.unread),
label: 'unread chats',
cupertino: widget.cupertino,
child: icon,
);
}
if (destination != AppDestination.runs) return icon;
// Runs in progress at the bottom, runs that need you at the top.
icon = ActivityBadge(
key: const ValueKey('shell.badge.runs.running'),
count: _bar.badge(destination, ShellBadgeKind.running),
label: 'runs in progress',
cupertino: widget.cupertino,
bottom: true,
child: icon,
);
return AttentionDestinationIcon(
count: widget.attentionCount,
cupertino: widget.cupertino,