Primeira onda do roadmap de indicadores executivos do Grupo Nova. Mede
ADOÇÃO DO CANAL DIGITAL, não a operação total — banner explícito alerta
que reservas fechadas manualmente na recepção ainda não estão capturadas
(Onda 1B vai adicionar marcação manual via botão na conversa).
Backend:
- V2::Reports::ConversionFunnelBuilder — leads (novo/retorno/total),
reservas (criadas != draft, pagas in active/completed/confirmed),
taxas de conversão. Filtro opcional por inbox.
- V2::Reports::InboxBenchmarkingBuilder — uma linha por inbox com
brand_name (via Captain::UnitInbox -> Unit -> Brand)
- Endpoints GET /reports/conversion_funnel e /reports/inbox_benchmarking
- RSpec do ConversionFunnelBuilder
Frontend:
- Rota top-level Reports → Painel Diretoria
- DirectoryDashboard.vue: banner de adoção + filtros + cards + funil + tabela
benchmarking agrupada por marca com variação vs média
- API client getConversionFunnel + getInboxBenchmarking
- i18n EN + PT
Memórias suporte: feedback_metricas_adocao_canal.md + project_painel_diretoria_roadmap.md
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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>
Mede por inbox/período: leads novos (1ª conversa do contato em qualquer
inbox da rede), retorno (conversa anterior resolved há >24h) e outras
(conversa anterior open ou resolved <24h). Categorias somadas batem com
o conversations_count nativo do report — bucket "outras" garante o
fechamento.
- Novo builder V2::Reports::InboxLeadsSummaryBuilder com CTE única
- Endpoint GET /api/v2/accounts/:id/reports/inbox_leads_summary
- Tabs no InboxReportsShow (Visão Geral | Novas × Retorno)
- Componente InboxLeadsReport com 3 metric cards + barras empilhadas
- API client + Pinia (state/getters/actions/mutations)
- i18n en + pt_BR
- RSpec do builder cobrindo classificação e isolamento por inbox
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
# Pull Request Template
## Description
This PR adds support for exporting conversation summary reports as CSV.
Previously, the Conversations report incorrectly showed an option to
download agent reports; this has now been fixed to export
conversation-level data instead.
Fixes
https://linear.app/chatwoot/issue/CW-6176/conversation-reports-export-button-exports-agent-reports-instead
## Type of change
- [x] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
## How Has This Been Tested?
### Screenshot
<img width="1859" height="1154" alt="image"
src="https://github.com/user-attachments/assets/419d26f4-fda9-4782-aea6-55ffad0c37ab"
/>
## Checklist:
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [ ] I have commented on my code, particularly in hard-to-understand
areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream
modules
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
* feat: include timezone offset in summary calculation
* fix: exlcude end in date range
* test: explicit end of day
* fix: test for report builder
* fix: reports.spec.js
---------
Co-authored-by: Tejaswini Chile <tejaswini@chatwoot.com>
* feat: genearte report in a grid
* refactor: update API usage
* refactor: separate generate method
* refactor: abstract transform_data
* feat: annotate with comments
* feat: add explicit timezone
* feat: download data only in user timezone
* fix: dates included in heatmap
* feat: add heatmap component
* feat: add heatmap component
* feat: add dummy heatmap
* refactor: compact tiles
* feat: allow hour
* feat: wire up heatmap query
* feat: allow arbritrary number of weeks
* feat: update position of the widget
* chore: update heatmap title
* refactor: move traffic heatmap to overview
* chore: add comment for perf
* feat: add reconcile logic for heatmap fetching
Fetching the data for the last 6 days all the time is wasteful
So we fetch only the data for today and reconcile it with the data we already have
* refactor: re-org code for new utils
* feat: add translations
* feat: translate days of the week
* chore: update chatwoot utils
* feat: add markers to heatmap
* refactor: update class names
* refactor: move flatten as a separate method
* test: Heatmap Helpers
* chore: add comments
* refactor: method naming
* refactor: use heatmap-level mixin
* refactor: cleanup css
* chore: remove log
* refactor: reports.js to use object instead of separate params
* refactor: report store to use new API design
* refactor: rename HeatmapHelper -> ReportsDataHelper
* refactor: separate clampDataBetweenTimeline
* feat: add tests
* fix: group by hour
* feat: add scroll for smaller screens
* refactor: add base data to reconcile with
* fix: tests
* fix: overflow only on smaller screens
* feat: translate tooltip
* refactor: simplify reconcile
* chore: add docs
* chore: remoev heatmap from account report
* feat: let Heatmap handle loading state
* chore: Apply suggestions from code review
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
* feat: update css
* refactor: color assignment to range
* feat: add short circuit
* Update app/javascript/dashboard/routes/dashboard/settings/reports/components/Heatmap.vue
---------
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
* Adds filter for agents, labels and inboxes
* Added Inboxes Reports Feature
* Fixed populating of filter dropdown issue
* If applied, fixes code climate style-lint warnings
* Fixes codeclimate warnings
* if applied, Refactors sidebar file to fix codclimate warnings
* if applied, fixes the download reports button for filtered report-data
* If applied, replaces native img tag with thumbnail component
* If applied, replaces hardcoded color string with variable
* If applied, adds a11y labels to multiselect dropdowns
* If applied, Renames reports methods to generic names
* If applied, Adds test cases for Labels and Inboxes
* If applied, write a test spec for fileDownload helper
* if applied, Moves fileDownload method to a utils folder
* If applied, Fixes the report file name type
* Test Spec for Reports Store module
* Fix specs - add restoreAllMocks
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
* Chore: Enable Users to create multiple accounts
Addresses: #402
- migrations to split roles and other attributes from users table
- make changes in code to accommodate this change
Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>