From 0e30e3c00a9afbf4024716b3f6723fe27e488f1b Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Fri, 6 Feb 2026 19:53:46 +0530 Subject: [PATCH] fix: add loading and silent retry to summary reports (#13455) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For large accounts, summary report queries can take several seconds to complete, often times hitting the 15-second production request timeout. The existing implementation silently swallows these failures and provides no feedback during loading. Users see stale data with no indication that a fetch is in progress, and if they interact with filters while a request is in flight, they trigger race conditions that can result in mismatched data being displayed. This is a UX-level fix for what is fundamentally a performance problem. While the underlying query performance is addressed separately, users need proper feedback either way ## Approach The PR adds three things: 1. A loading overlay on the table, to provide feedback on loading state 2. Disabled filter inputs during loading so that the user does not request new information that can cause race conditions in updating the store 3. Silent retry before showing an error. The retry exists because these queries often succeed on the second attempt—likely due to database query caching. Rather than immediately showing an error and forcing the user to manually retry, we do it automatically. If the second attempt also fails, we show a toast so the user knows something went wrong. The store previously caught and discarded errors entirely. It now rethrows them after resetting the loading flag, allowing components to handle failures as they see fit. ### Previews #### Double Retry and Error https://github.com/user-attachments/assets/c189b173-8017-44b7-9493-417d65582c95 #### Loading State https://github.com/user-attachments/assets/9f899c20-fbad-469b-93cc-f0d05d0853b0 --------- Co-authored-by: iamsivin --- .../components/OverviewReportFilters.vue | 12 +++- .../reports/components/SummaryReports.vue | 55 +++++++++++++++++-- .../modules/specs/summaryReports.spec.js | 6 +- .../dashboard/store/modules/summaryReports.js | 6 +- 4 files changed, 68 insertions(+), 11 deletions(-) diff --git a/app/javascript/dashboard/routes/dashboard/settings/reports/components/OverviewReportFilters.vue b/app/javascript/dashboard/routes/dashboard/settings/reports/components/OverviewReportFilters.vue index 98fdb3985..95d89b3f4 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/reports/components/OverviewReportFilters.vue +++ b/app/javascript/dashboard/routes/dashboard/settings/reports/components/OverviewReportFilters.vue @@ -11,6 +11,13 @@ import { } from '../helpers/reportFilterHelper'; import { DATE_RANGE_TYPES } from 'dashboard/components/ui/DatePicker/helpers/DatePickerHelper'; +defineProps({ + disabled: { + type: Boolean, + default: false, + }, +}); + const emit = defineEmits(['filterChange']); const route = useRoute(); @@ -79,7 +86,10 @@ onMounted(() => {