critical priority medium complexity integration pending frontend specialist Tier 3

Acceptance Criteria

ConfirmBeforeSubmitScreen appears as the final step in every wizard flow managed by WizardStateManager before WizardSubmitted is dispatched
Tapping Confirm dispatches WizardSubmitted exactly once; tapping it a second time (e.g., double-tap) does not dispatch the event again
Tapping Go Back dispatches WizardStepAdvanced with a backward direction, landing on the immediately preceding wizard step
All field values entered in prior steps remain intact after returning from ConfirmBeforeSubmitScreen via Go Back
The device back button on ConfirmBeforeSubmitScreen behaves identically to the Go Back action (returns to previous step, no unintended submission)
WizardSubmitted is never fired if the user leaves ConfirmBeforeSubmitScreen via device back or Go Back — only via explicit Confirm tap
All existing wizard flows (activity wizard, event wizard) route through ConfirmBeforeSubmitScreen as their final step
No regression: previously passing wizard BLoC unit tests continue to pass after integration

Technical Requirements

frameworks
Flutter
BLoC
data models
activity
assignment
performance requirements
Screen transition to ConfirmBeforeSubmitScreen must complete within 200ms on mid-range Android devices
Go Back transition must be instantaneous with no visible field re-render flicker
security requirements
WizardSubmitted event must not be emittable from any code path other than explicit Confirm tap on ConfirmBeforeSubmitScreen
Prevent duplicate submissions via button debounce (minimum 800ms guard after first Confirm tap)
ui components
ConfirmBeforeSubmitScreen
WizardStateManager
AppButton

Execution Context

Execution Tier
Tier 3

Tier 3 - 413 tasks

Can start after Tier 2 completes

Implementation Notes

In WizardStateManager, add a dedicated 'confirmation' state that is the only state from which WizardSubmitted may be dispatched. Guard the submission handler with a boolean `_submitting` flag reset on BLoC close to prevent double-taps. For Go Back from the confirmation state, emit a WizardStepAdvanced event with `direction: WizardDirection.backward` and restore the previous step's copyWith snapshot from the state stack — do not pop route. Use a Navigator.canPop check to ensure device back button routes through the same BLoC event rather than popping the route directly.

All existing wizard routers must call `WizardStateManager.goToConfirmation()` before their final submit guard.

Testing Requirements

Unit tests: verify WizardStateManager transitions to ConfirmBeforeSubmitScreen state as the last wizard step; verify WizardSubmitted is emitted only from the confirm action. Widget tests: render ConfirmBeforeSubmitScreen within a BLoC test harness and verify Confirm dispatches WizardSubmitted and Go Back dispatches backward WizardStepAdvanced. State preservation test: simulate a full wizard fill, reach confirm screen, go back, verify BLoC state still holds all previously entered field values. Regression: run existing wizard BLoC and widget tests to confirm no breakage.

Component
Confirm Before Submit Screen
ui medium
Epic Risks (4)
high impact medium prob technical

The WizardStateManager BLoC must guarantee that step transitions only occur on explicit user action, never automatically. Subtle reactive patterns in Bloc (e.g. stream listeners triggering add() calls) could inadvertently auto-advance the wizard, violating the core cognitive accessibility rule and creating a regression that is difficult to detect without dedicated tests.

Mitigation & Contingency

Mitigation: Write a dedicated unit test that subscribes to the BLoC stream and asserts no StepChanged event is emitted for 5 seconds after a state update, without an explicit user-sourced event being dispatched. Make this test part of the CI gate for the WizardStateManager.

Contingency: If an auto-advance regression is discovered post-integration, introduce a mandatory UserActionToken parameter on all step-transition events so the BLoC can structurally refuse transitions that do not originate from a user gesture handler.

medium impact medium prob integration

The ConfirmBeforeSubmitScreen requires deep-linking back to specific wizard steps for corrections. Implementing bidirectional navigation within a multi-step wizard while preserving all previously entered state is architecturally non-trivial and may conflict with the existing StatefulShellRoute navigation setup described in the app architecture.

Mitigation & Contingency

Mitigation: Design the ConfirmBeforeSubmitScreen's back-navigation links to dispatch a GoToStep event on the WizardStateManager rather than using GoRouter's pop() chain. This keeps navigation state entirely in the BLoC and avoids coupling to the router's stack semantics.

Contingency: If BLoC-driven step navigation proves incompatible with the router, implement the correction flow as a dedicated sub-route that pre-populates its form from the WizardStateManager's current draft, then merges the edited field back into the draft on completion before returning to the confirm screen.

medium impact medium prob technical

The CognitiveAccessibilityAudit utility must inspect live widget trees for violations such as icon-only buttons. Flutter's widget tree inspection APIs are available in test mode but have limitations in identifying semantic intent (e.g. distinguishing a decorative icon from a navigation button). False negatives could give a false sense of compliance.

Mitigation & Contingency

Mitigation: Augment the audit with a convention-based approach: require all navigation buttons to use a named wrapper widget (e.g. LabelledNavigationButton) that the audit can detect by type, rather than relying solely on widget-tree semantics analysis.

Contingency: If widget-tree detection proves insufficiently reliable, scope the CognitiveAccessibilityAudit to route-configuration analysis (verifying back navigation availability per route) and static analysis of wizard step count definitions via the CognitiveLoadRuleEngine, which provides deterministic results.

low impact high prob scope

The InlineContextualHelpWidget sources content from a bundled JSON asset via the HelpContentRegistry. If help texts are missing for newly added screens or fields (a likely scenario as the 61-feature app grows), the widget silently shows nothing, degrading the accessibility experience without any visible failure.

Mitigation & Contingency

Mitigation: Integrate a CognitiveAccessibilityAudit check that verifies every registered (screenId, fieldId) pair that requests help has a corresponding entry in the HelpContentRegistry bundle. Run this check in CI as part of the audit report.

Contingency: Add a debug-mode overlay that highlights fields with missing help entries using a visible warning indicator, making coverage gaps immediately obvious to developers during local development before they reach CI.