iachat/app/builders
Rodribm10 e9b8b6e587 feat(reports): filtro por inbox no Relatório do Bot
Hoje as métricas e séries do BotReports agregam toda a conta — não dá pra ver
"a Jasmine da PrimeAL está errando mais que a do Qnn01". Cada unidade tem
prompt próprio, então um sintoma localizado precisa de medição localizada.

Backend:
- Inbox#has_many :reporting_events (relação inversa que faltava)
- BotMetricsBuilder aceita inbox_id e filtra bot_conversations + base_reporting_events
- bot_metrics endpoint passa inbox_id pelos params permitidos
- count_report_builder já suporta scope=inbox; agora funciona pra
  bot_resolutions_count e bot_handoffs_count graças à relação acima

Frontend:
- BotReports.vue: ReportFilters com filter-type='inboxes' e dropdown ativo
- Quando uma inbox é escolhida, requestPayload inclui inboxId/type/id e os
  fetches (BotMetrics + ReportContainer) passam o filtro
- API client getBotMetrics aceita inboxId; getBotSummary aceita type+id
- Sem inbox selecionada: comportamento antigo (agregação da conta)

Bonus na rake task de retroativo:
- rebuild_bot_resolved.rake: Message.unscope(:order) pra evitar conflito
  PG::InvalidColumnReference (DISTINCT + ORDER BY default scope)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 11:47:46 -03:00
..
campaigns fix: correct typo in CampaignConversationBuilder (#11336) 2025-04-21 11:57:38 +05:30
csat_surveys feat: Add CSAT response APIs (#2503) 2021-06-29 20:59:41 +05:30
email feat: Clean up email configuration for from and reply to emails (#12453) 2025-09-24 11:36:53 -07:00
messages feat: add audio transcoding support for WhatsApp Cloud API (#220) 2026-02-22 16:21:50 -03:00
v2 feat(reports): filtro por inbox no Relatório do Bot 2026-04-26 11:47:46 -03:00
account_builder.rb fix: account email validation during signup (#11307) 2025-05-20 20:45:39 -07:00
agent_builder.rb feat: setup invite to handle SAML enabled account [CW-5613] (#12439) 2025-09-17 19:33:38 +05:30
contact_inbox_builder.rb feat: outbound voice call essentials (#12782) 2025-11-24 17:47:00 -08:00
contact_inbox_with_contact_builder.rb feat: Instagram Inbox using Instagram Business Login (#11054) 2025-04-08 10:47:41 +05:30
conversation_builder.rb fix(whatsapp): update conversation lookup to handle multiple contact inboxes in single conversation mode (#197) 2026-01-25 19:51:56 -03:00
notification_builder.rb fix: Exclude notifications for blocked contacts, except mentions (#10659) 2025-01-12 15:30:27 +05:30
notification_subscription_builder.rb chore: Use "create!" and "save!" bang methods when not checking the result (#5358) 2022-09-13 17:40:06 +05:30
year_in_review_builder.rb feat(ce): Add Year in review feature (#13078) 2025-12-15 17:24:45 -08:00