low priority low complexity documentation pending documentor Tier 6

Acceptance Criteria

Documentation covers all three components: ReportHistoryScreen, ReportHistoryListItem, and ReportSummaryMetricsWidget
Each component's constructor parameters are listed with type, required/optional status, and a one-line description
Documentation explains how to provide the BLoC or Riverpod notifier to each component (with a minimal code example)
Documentation describes the data contract expected from ReportHistoryService — the shape of the data model returned and any nullable fields
Documentation explains the accessibility implementation decisions: why Semantics labels were chosen as they were, why live region announcements are used for state transitions
A usage example shows how to embed ReportSummaryMetricsWidget inside ReportHistoryListItem with correct parameter passing
Documentation explains session-scoped filter state behavior: what 'session-scoped' means, when filters reset, and how this was implemented
Documentation is written in English
Documentation is co-located with the source files (inline Dart doc comments /// on public constructors and key methods) or in a dedicated COMPONENTS.md in the component directory
A developer unfamiliar with the epic can understand how to use the components without reading the source code

Technical Requirements

frameworks
Flutter
BLoC
Riverpod
data models
bufdir_export_audit_log
annual_summary
security requirements
Documentation must not include real API keys, tokens, or credentials in code examples — use placeholder values
ui components
ReportHistoryScreen
ReportHistoryListItem
ReportSummaryMetricsWidget

Execution Context

Execution Tier
Tier 6

Tier 6 - 158 tasks

Can start after Tier 5 completes

Implementation Notes

Prefer Dart doc comments (///) directly on public constructors and key methods over a separate markdown file — this keeps documentation close to the code and visible in IDEs. Use @param and @returns tags in Dart doc where applicable. For the usage example, write a minimal but complete example (wrap in a fake BlocProvider/ProviderScope so it is clear what the setup requires). Explain the session-scoped filter state clearly — e.g., 'Filters reset when the user navigates away from ReportHistoryScreen; they are stored in the BLoC/notifier and not persisted to the database.' This is important context for future developers who might expect persistence.

Document the accessibility choices made in task-007 so future maintainers understand why certain Semantics decisions were made and do not accidentally remove them.

Testing Requirements

No automated tests for documentation. Manual review: a developer not involved in the epic should be able to read the documentation and integrate ReportSummaryMetricsWidget into a new screen without asking questions. Documentation review checklist: all constructor params listed, integration example compiles, filter behavior explained, accessibility decisions explained.

Component
Report History Screen
ui low
Epic Risks (2)
high impact medium prob integration

The ReportSummaryMetricsWidget must display metrics as they were at time of submission, not recalculated from current data. If the metrics are not stored as a JSON snapshot in the history record at export time, the widget will either show wrong data or require a full re-aggregation on every list load.

Mitigation & Contingency

Mitigation: Ensure the Bufdir export pipeline (bufdir-report-export feature) writes a summary_metrics JSONB column in the history record at export time, containing total_activities, total_hours, and participants_reached. The UI widget reads only from this snapshot field — never from live aggregation queries.

Contingency: If snapshot data is missing for historical records (e.g., older exports before the column existed), display a 'Metrics not available for this report' placeholder in the widget rather than showing zeros or triggering a live aggregation that could return different figures.

medium impact medium prob scope

Re-export can take several seconds (it runs the full generation pipeline). Without adequate progress feedback, coordinators may tap the button multiple times, triggering duplicate exports and duplicate history records.

Mitigation & Contingency

Mitigation: Disable the re-export button immediately on first tap and show an inline progress indicator on the list item. Guard against duplicate invocations at the service layer using an in-progress flag keyed by report ID. Display a loading state on the list item throughout the operation.

Contingency: If duplicate re-export records are created (e.g., due to a race condition), the history table will show multiple entries for the same original report — which is harmless but confusing. Add a deduplication UI hint ('Re-exported N times') and a backend guard that prevents more than one in-flight re-export for the same source record ID simultaneously.