iachat/app/javascript/dashboard/api/captain
Rodrigo Borba 87bff8126c feat(captain): add AI reports page with insights generation
Implementa a página Relatórios IA com geração de análises semanais
por IA baseadas nas conversas de cada unidade/caixa de entrada.

Funcionalidades:
- Página /settings/captain/reports com dois tabs (Insights IA / Operacional)
- Botão "Gerar Análise" que enfileira job Sidekiq
- Filtro por unidade ou caixa de entrada
- Exibe insights com status (pendente/processando/concluído/falhou)
- Mostra top_topics, ai_failures e period_summary
- Estado vazio com CTA para gerar primeiro relatório

Backend:
- InsightsController com endpoints index/show/generate
- GenerateInsightsJob que processa conversas com LLM
- ConversationInsightService com chunking e merge inteligente
- Migração para adicionar inbox_id à tabela captain_conversation_insights
- Link sidebar "Relatórios IA" em /settings/captain/reports

Frontend:
- Vuex store captainReports com actions/mutations/getters
- API client CaptainReportsAPI (getInsights, generateInsight)
- i18n en e pt_BR para CAPTAIN_REPORTS.*

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 07:05:58 -03:00
..
assistant.js feat: Allow customizing the responses, flows in Captain (#11385) 2025-04-29 15:42:15 -07:00
bulkActions.js feat: Add support for bulk action for Captain FAQs (#10905) 2025-02-27 17:05:33 -08:00
copilotMessages.js feat: Add stores for copilotMessages and copilotThreads (#11603) 2025-05-27 18:36:32 -06:00
copilotThreads.js feat: Add stores for copilotMessages and copilotThreads (#11603) 2025-05-27 18:36:32 -06:00
customTools.js feat: Add UI for custom tools (#12585) 2025-10-06 09:05:54 -07:00
document.js feat: Add assistant filter support to documents page (#10697) 2025-01-15 21:41:07 -08:00
galleryItems.js chore(style): fix rubocop offenses and update typing indicators 2026-02-25 15:06:58 -03:00
inboxes.js feat(ee): Add Captain features (#10665) 2025-01-14 16:15:47 -08:00
preferences.js feat: add global config for captain settings (#13141) 2026-01-12 19:54:19 +05:30
reports.js feat(captain): add AI reports page with insights generation 2026-02-27 07:05:58 -03:00
reservations.js chore(style): fix rubocop offenses and update typing indicators 2026-02-25 15:06:58 -03:00
response.js feat: allow searching captain responses [CW-5631] (#12463) 2025-09-18 14:44:56 +05:30
scenarios.js feat: New Scenarios page (#11975) 2025-07-30 19:34:27 +05:30
tasks.js feat: new Captain Editor (#13235) 2026-01-21 13:39:07 +05:30
tools.js feat: New Scenarios page (#11975) 2025-07-30 19:34:27 +05:30
units.js chore(style): fix rubocop offenses and update typing indicators 2026-02-25 15:06:58 -03:00