You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`user_id` - Stores randomly generated UUID for user identification
352
+
-`rate_limit_{conversationId}` - Stores rate limit data per conversation (message count, first message timestamp)
353
+
305
354
---
306
355
307
356
## Stream Chat React CSS Variable Overrides
@@ -354,6 +403,27 @@ The app uses `window.history.pushState()` to update the URL when switching conve
354
403
355
404
Theme state is managed via React Context and persisted to localStorage. The theme is applied by setting a `data-theme` attribute on the document root, which allows CSS variables to be scoped appropriately.
356
405
406
+
### Rate Limiting System
407
+
408
+
The app implements client-side rate limiting to control message sending:
409
+
410
+
-**Per-conversation limits**: Each conversation tracks its own message count independently
411
+
-**4-hour rolling window**: Limits reset automatically 4 hours after the first message
412
+
-**localStorage persistence**: Rate limit data persists across page refreshes
413
+
-**Real-time updates**: Countdown updates every minute to show time remaining
414
+
-**Graceful UI**:
415
+
- Disabled fieldset prevents all input interactions
416
+
- Amber warning banner shows informative message with countdown
417
+
- Material Symbols info icon for visual clarity
418
+
-**UUID-based users**: Each user gets a random UUID stored in localStorage
419
+
-**Override support**: `?user_id=` URL parameter allows testing with specific user IDs
420
+
421
+
**Implementation details:**
422
+
- Rate limit state checked on mount and when channel changes
423
+
- Message recorded after successful send
424
+
- Form submission blocked when limit reached
425
+
- All inputs (text, file, speech-to-text, model selector, submit) disabled via fieldset
426
+
357
427
### Automatic Conversation Summarization
358
428
359
429
The app automatically generates summaries for the first 5 messages of a conversation:
0 commit comments