iachat/app/javascript
Rodribm10 6aa328e329 fix(aggressive-alert): hidrata tracker de inatividade no boot
Bug reportado em 2026-04-24: só o banner vermelho status→open
funcionava. 5/15/28min nunca disparavam.

Causa: o tracker só era alimentado via websocket ao vivo
(message.created). Se a msg do cliente chegou ANTES da aba carregar
(ou depois de F5), o tracker ficava vazio, setInterval nunca começava,
thresholds nunca disparavam.

Fix:
- Nova função `hydrateFromConversations(convs)` no tracker. Varre
  conversas em 'open', pega a última msg não-activity, se for de
  Contact registra com timestamp REAL (msg.created_at), não Date.now().
  Isso fecha o gap de tempo: se o cliente falou 7min atrás, o YELLOW
  já dispara na hora.
- AggressiveConversationBanner.vue tem agora `watch: allConversations`
  chamando hydrate toda vez que a lista muda (boot + F5 + navegação).
- parseCreatedAt() suporta Unix seconds + ISO.
- findLastNonActivityMessage() ignora mensagens de sistema.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 08:00:38 -03:00
..
dashboard fix(aggressive-alert): hidrata tracker de inatividade no boot 2026-04-24 08:00:38 -03:00
design-system feat: Add histoire for component playground (#10256) 2024-10-09 22:10:53 -07:00
entrypoints fix: Prioritize SDK enableFileUpload flag when explicitly set (#13091) 2025-12-17 19:03:54 +05:30
portal fix: use safe DOM manipulation for article heading permalinks (#13239) 2026-01-21 13:44:15 +05:30
sdk revert: "fix(sdk): Ignore messages from a different origin and sanitizee URLs (#8879)" (#12248) 2025-08-20 21:39:50 +02:00
shared feat(dashboard): aggressive alert on conversation reopening 2026-04-23 18:03:26 -03:00
superadmin_pages chore: fix circleci on vite build (#10214) 2024-10-07 15:27:41 +05:30
survey chore: Updated Hebrew translations (#12883) 2025-12-17 17:34:42 -08:00
v3 fix: url endpoint 2026-02-25 12:28:30 -03:00
widget chore: Update theme colors and add new Inter variable fonts (#13347) 2026-01-28 14:36:04 -08:00
histoire.setup.ts feat: Migrate availability mixins to composable and helper (#11596) 2025-08-22 00:43:34 +05:30