Show loudly in the chat list when a chat is waiting on the operator

The server's chat activity now counts each session's unanswered
approvals and questions (awaiting_operator) and pushes it to every
connection when it changes. A waiting chat's list row pulses in the
error colour with a solid bar on its leading edge, its avatar wears a
ringing bell in place of the spinner, and its state line leads with a
bold "Waiting for you". Reduced motion holds the pulse and the bell
still.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-24 22:54:38 +00:00
parent 50c89976fa
commit 4c82a9637e
17 changed files with 438 additions and 78 deletions
@@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import '../../../../ui/status/app_spinner.dart';
import 'chat_awaiting.dart';
/// The corner badge a chat's avatar wears for its live activity: the
/// platform's activity indicator while a turn runs; otherwise, while
@@ -8,7 +9,10 @@ import '../../../../ui/status/app_spinner.dart';
Widget? chatSessionActivityBadge({
required bool running,
required int backgroundTasks,
int awaitingOperator = 0,
}) {
// Waiting on the operator outranks everything: the agent is blocked.
if (awaitingOperator > 0) return ChatAwaitingBadge(count: awaitingOperator);
if (running) {
return Semantics(
key: const Key('chat-row-working'),