Wire widgets to BufdirPreviewService decorated model
epic-bufdir-report-preview-ui-components-task-010 — Connect all three widgets to the decorated preview model from BufdirPreviewService via Riverpod providers. BufdirReportSectionWidget list is driven by the mapped section data, BufdirFieldRowWidget instances receive their validation states from the decorated model, and BufdirValidationSummaryBanner subscribes to the aggregated validation summary. Ensure reactive updates propagate correctly when the underlying preview data changes.
Acceptance Criteria
Technical Requirements
Execution Context
Tier 5 - 253 tasks
Can start after Tier 4 completes
Implementation Notes
Define a clear provider hierarchy: bufdirPreviewProvider (AsyncNotifierProvider
For the shimmer placeholder, use the existing design token spacing and card dimensions to match the real layout dimensions.
Testing Requirements
Write both widget tests and integration tests: (1) widget test — inject mock bufdirPreviewProvider with loading state, assert shimmer visible; (2) widget test — inject error state, assert error view with retry button visible; (3) widget test — inject data state with two sections, assert two BufdirReportSectionWidget instances in tree; (4) widget test — mutate a single field's validation via StateNotifier, assert only that field's BufdirFieldRowWidget rebuilds (use RenderObject.debugNeedsLayout counter or custom test hooks); (5) integration test — full provider graph wired to a mock BufdirPreviewService that returns deterministic data; verify banner counts match injected issue count. Use ProviderContainer for unit-testing provider logic in isolation.
Implementing the tap-to-scroll-and-focus behavior from the validation banner to a specific field row in a long scrollable list is complex in Flutter. If focus management is incorrectly implemented, VoiceOver users who navigate to the banner and select an issue will not be moved to the relevant field row, breaking the accessibility workflow and violating WCAG 2.4.3 (Focus Order).
Mitigation & Contingency
Mitigation: Use BufdirAccessibilityUtils focus management utilities (built in the foundation epic) with explicit GlobalKey-based scroll anchors on each field row. Test with a real iOS device running VoiceOver during widget development, not only in the Flutter accessibility inspector.
Contingency: If programmatic scroll-to-focus cannot be reliably achieved before the TestFlight deadline, fall back to a navigation approach where tapping a banner issue opens a modal detail sheet for that field row rather than scrolling in place, and file a follow-up ticket for the inline scroll implementation.
The validation summary banner must reactively update its issue count as underlying aggregated data changes (e.g., if the coordinator has navigated away and data was refreshed). If the banner's Riverpod provider is not correctly scoped, it may display stale issue counts or fail to disappear when all issues are resolved, eroding coordinator trust in the validation system.
Mitigation & Contingency
Mitigation: Drive the banner exclusively from the same Riverpod provider that powers the full preview model — do not maintain a separate local state for issue counts. Write a widget test that simulates a data refresh mid-review and asserts the banner updates within one frame.
Contingency: If stale state reaches production, add a manual refresh button to the banner as a short-term workaround while the provider scoping is corrected in the next release cycle.