Matthias Nott
2026-03-24 f80bd39a62efd6862bd96a836524184245088adc
fix: strict per-session typing - no null fallthrough, explicit match only
1 files modified
changed files
lib/screens/chat_screen.dart patch | view | blame | history
lib/screens/chat_screen.dart
....@@ -218,13 +218,14 @@
218218 final typing = msg['typing'] as bool? ?? msg['isTyping'] as bool? ?? msg['active'] as bool? ?? true;
219219 final typingSession = msg['sessionId'] as String?;
220220 final activeId = ref.read(activeSessionIdProvider);
221
- // Only show typing indicator for the active session
222
- if (typingSession == null || typingSession == activeId) {
221
+ // Strict: only show typing for the ACTIVE session, ignore all others
222
+ if (activeId != null && typingSession == activeId) {
223223 ref.read(isTypingProvider.notifier).state = typing;
224224 }
225225 case 'typing_end':
226226 final endSession = msg['sessionId'] as String?;
227
- if (endSession == null || endSession == ref.read(activeSessionIdProvider)) {
227
+ final activeEndId = ref.read(activeSessionIdProvider);
228
+ if (activeEndId != null && endSession == activeEndId) {
228229 ref.read(isTypingProvider.notifier).state = false;
229230 }
230231 case 'screenshot':