This PR adds inbox filtering to the conversation traffic heatmap,
allowing users to analyze patterns for specific inboxes. Additionally,
it also adds a new resolution count heatmap that shows when support
teams are most active in resolving conversations, using a green color to
distinguish it from the blue conversation heatmap.
The PR also reorganizes heatmap components into a cleaner structure with
a shared `BaseHeatmapContainer` that handles common functionality like
date range selection, inbox filtering, and data fetching. This makes it
easy to add new heatmap metrics in the future - just create a wrapper
component specifying the metric type and color scheme.
<img width="1926" height="1670" alt="CleanShot 2025-10-13 at 14 01
35@2x"
src="https://github.com/user-attachments/assets/67822a34-6170-4d19-9e11-7ad4ded5c388"
/>
<img width="1964" height="1634" alt="CleanShot 2025-10-13 at 14 03
00@2x"
src="https://github.com/user-attachments/assets/e4613c08-64b8-4fa6-91d8-7510946dd75d"
/>
Unrelated change, the data seeder conversation resolution would not work
correctly, we've fixed it.
---------
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.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>