Monitor Export Progress with Real-Time Status Indicator
For large organizations with thousands of activity records, Bufdir export generation — including data aggregation, participant deduplication, category mapping, and file generation — can take 15–30 seconds or longer. Without feedback, coordinators may tap the export button multiple times thinking it failed, generating duplicate exports and audit log entries. The progress indicator must display named processing stages (querying data, aggregating, deduplicating, generating file) with a visual progress bar and estimated time remaining. If the edge function times out or returns an error, the screen must display a clear failure state with a retry option and an error code for support.
User Story
Acceptance Criteria
- Given an export is triggered, when processing begins, then a progress indicator immediately appears showing the current stage name and a progress bar
- Given the export moves through processing stages, when each stage completes, then the stage label updates to the next stage and the progress bar advances proportionally
- Given the export takes longer than 30 seconds, when the coordinator is waiting, then an estimated time remaining is displayed based on the volume of records being processed
- Given the export edge function returns an error, when the failure is detected, then the progress screen transitions to an error state showing the error description and a retry button
- Given the export completes successfully, when the final stage finishes, then the progress indicator transitions to a success state showing the file size and a download button
- Given the coordinator navigates away during processing, when they return to the export screen, then the progress state is restored and the coordinator can see if the export completed while they were away
Business Value
Export processing feedback prevents duplicate submissions caused by coordinators re-triggering exports they believe have failed. For large organizations with thousands of records, processing can take 20–40 seconds — sufficient time for an impatient user to trigger multiple parallel exports. Clear progress visibility also builds trust in the system, which is critical for adoption among coordinators who are replacing manually verified Excel workflows they have used for years.
Components
- Export Progress Indicator ui
- Aggregation Progress Indicator ui
- Aggregation Summary Widget ui
- Bufdir Export Orchestrator Service service
- Bufdir Export Edge Function infrastructure