User Interface low complexity mobile
0
Dependencies
0
Dependents
0
Entities
0
Integrations

Description

Full-screen loading overlay displayed while the Supabase Edge Function processes the export. Shows progress messaging and cancellation option if the operation supports it.

Feature: Bufdir Report Export

export-progress-indicator

Summaries

The Export Progress Indicator protects user trust during one of the most critical moments in the reporting workflow: waiting for compliance data to be generated. By providing clear visual feedback and a cancellation option, this component prevents users from abandoning the export process prematurely due to uncertainty, which would otherwise lead to incomplete Bufdir submissions and potential regulatory risk. A smooth, transparent export experience directly reduces support escalations and increases confidence in the platform's reliability. For organisations using this tool to meet mandatory government reporting obligations, any friction in the export flow carries real compliance risk—this component mitigates that exposure at minimal development cost.

This is a low-complexity UI component scoped entirely to the mobile execution context, with no external dependencies, making it straightforward to deliver and test in isolation. Development effort is minimal—primarily wiring the overlay lifecycle (show/hide) to the edge function call in the parent export flow. Testing should cover the happy path (progress message updates), timeout handling, error state rendering, and the cancellation interaction if the underlying operation supports it. The main scheduling risk is dependency on the edge function integration being stable enough to emit meaningful status messages; if that interface is undefined at the time of delivery, stub messages should be used.

No database or repository dependencies means zero migration risk.

Export Progress Indicator is a stateless full-screen overlay widget for the mobile context, exposing a simple imperative API: `build()` constructs the widget tree, `show()`/`hide()` manage visibility, `updateStatus(message)` pushes progress strings into the UI, and `showError(error)` transitions to an error state. There are no repository or data model dependencies—all state is passed in from the calling screen. The component should be implemented as a Stack overlay or modal barrier to block interaction with the underlying screen. Status messages are expected to be streamed or polled from the Supabase Edge Function response; the caller is responsible for invoking `updateStatus()` as messages arrive.

Cancellation UI should be conditionally rendered based on a flag passed at `build()` time. Keep internal state minimal—visibility and current message string only.

Responsibilities

  • Indicate export is in progress
  • Display status messages from edge function
  • Handle timeout and error states

Interfaces

build()
show()
hide()
updateStatus(message)
showError(error)